/* ================================================
   _base.css — 構造・レイアウト共通スタイル
   色・角丸・影はすべて CSS カスタムプロパティ経由
   ================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic UI', sans-serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-head, var(--font-body, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif));
  letter-spacing: var(--head-ls, -.02em);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Container ── */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Scroll reveal ── */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: .10s; }
.rv.d2 { transition-delay: .20s; }
.rv.d3 { transition-delay: .30s; }
.rv.d4 { transition-delay: .40s; }

/* ── Section defaults ── */
section { padding: 88px 0; }
section.alt { background: var(--surface-alt); }

/* ── Section heading ── */
.sec-head { margin-bottom: 48px; }
.sec-head.center { text-align: center; }
.sec-head.center .sec-ttl::after { margin: 10px auto 0; }

.sec-label {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--label-color);
  margin-bottom: 8px;
}
.sec-ttl {
  font-size: clamp(1.5rem, 3.5vw, 1.9rem);
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 6px;
}
.sec-ttl::after {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--primary);
  margin-top: 10px;
  border-radius: 2px;
}
.sec-sub {
  font-size: .88rem;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.8;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: .93rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  transition: background .2s, border-color .2s, transform .15s, opacity .2s;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}
.btn-primary:hover { background: var(--btn-hover); }

.btn-outline {
  background: transparent;
  color: var(--btn-out-text);
  border: 1.5px solid var(--btn-out-border);
}
.btn-outline:hover { background: var(--btn-out-hover-bg); }

.btn-line-lg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #06c755;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 20px 40px;
  border-radius: var(--radius);
  transition: opacity .2s, transform .15s;
  min-width: 260px;
}
.btn-line-lg:hover { opacity: .88; transform: translateY(-1px); }
.btn-line-lg .line-icon { font-size: 1.5rem; }

/* ──────────────────────────────
   HEADER
   ────────────────────────────── */
#hdr {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow .3s;
}
.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 20px;
}
.hdr-logo {
  font-size: .98rem;
  font-weight: 900;
  letter-spacing: .03em;
  color: var(--text);
  flex-shrink: 0;
}
.hdr-logo small {
  font-size: .68rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
/* ── Desktop nav ── */
.hdr-nav {
  display: flex;
  align-items: center;
}
.hdr-nav > ul {
  display: flex;
  gap: 26px;
  list-style: none;
  align-items: center;
}
.hdr-nav > ul > li > a {
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color .2s;
}
.hdr-nav > ul > li > a:hover { color: var(--text); }

/* ── Hamburger button (hidden on desktop) ── */
.hdr-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  z-index: 210;
  flex-shrink: 0;
}
.hdr-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
  transform-origin: center;
}
.hdr-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr-burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hdr-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hdr-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.hdr-tel {
  font-size: .88rem;
  font-weight: 700;
  color: var(--tel-color);
  display: flex;
  align-items: center;
  gap: 5px;
}
.hdr-tel::before { content: '📞'; font-size: .75rem; }
.btn-hdr {
  background: var(--btn-bg);
  color: var(--btn-text);
  font-size: .75rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: background .2s;
}
.btn-hdr:hover { background: var(--btn-hover); }

/* ──────────────────────────────
   HERO
   ────────────────────────────── */
#hero {
  padding-top: 62px;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
}
.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--hero-deco);
}
.hero-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--hero-glow) 0%, transparent 65%);
  top: -150px;
  right: -200px;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding: 64px 28px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--badge-bg);
  border: 1px solid var(--badge-bdr);
  color: var(--badge-text);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-badge::before { content: '●'; font-size: .42em; }
.hero-title {
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -.02em;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-name-block {
  margin-bottom: 36px;
}
.hero-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.hero-name span {
  font-size: .8rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 8px;
}
.hero-trade { font-size: .85rem; color: var(--muted); }

.hero-stats {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; }
.stat-n {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: var(--accent);
}
.stat-u {
  font-size: .72rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 3px;
}
.stat-l {
  font-size: .68rem;
  color: var(--muted);
  margin-top: 5px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: .6rem;
  letter-spacing: .2em;
  color: var(--muted);
  animation: scroll-bob 2.2s ease-in-out infinite;
  opacity: .6;
}
.hero-scroll::after { content: '↓'; font-size: .9rem; }
@keyframes scroll-bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(7px); }
}

/* ──────────────────────────────
   ABOUT
   ────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 52px;
  align-items: start;
}
.about-photo .photo-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--ph-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
}
.photo-frame .ph-ico { font-size: 52px; opacity: .28; }
.photo-frame .ph-txt { font-size: .62rem; color: var(--muted); text-align: center; line-height: 1.7; opacity: .7; }

.about-name {
  font-size: 1.45rem;
  font-weight: 900;
  margin-bottom: 4px;
}
.about-name span { font-size: .82rem; font-weight: 400; color: var(--muted); margin-left: 8px; }
.about-trade-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--label-color);
  margin-bottom: 16px;
}
.about-text p {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 14px;
}
.cred-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cred-item {
  background: var(--cred-bg);
  color: var(--cred-text);
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius);
  letter-spacing: .02em;
  border: 1px solid var(--cred-border);
}

/* ──────────────────────────────
   SERVICES
   ────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.svc-icon { font-size: 2.2rem; margin-bottom: 14px; }
.svc-name { font-size: 1rem; font-weight: 800; margin-bottom: 8px; }
.svc-desc { font-size: .83rem; color: var(--muted); line-height: 1.85; }

/* ──────────────────────────────
   WORKS / PORTFOLIO
   ────────────────────────────── */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.work-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.work-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.work-img {
  aspect-ratio: 4/3;
  background: var(--ph-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}
.work-img .ph-ico { font-size: 32px; opacity: .28; }
.work-img .ph-txt { font-size: .58rem; color: var(--muted); text-align: center; line-height: 1.7; opacity: .7; }
.work-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--work-tag-bg);
  color: var(--work-tag-text);
  font-size: .62rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: .04em;
}
.work-info { padding: 16px 18px; }
.work-title { font-size: .92rem; font-weight: 800; margin-bottom: 6px; }
.work-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: .72rem;
  color: var(--muted);
}

/* ──────────────────────────────
   VOICE / TESTIMONIALS
   ────────────────────────────── */
.voice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.voice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.voice-stars {
  font-size: .82rem;
  color: var(--star-c);
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.voice-quote {
  font-size: 2.8rem;
  line-height: 1;
  color: var(--primary);
  opacity: .35;
  margin-bottom: 8px;
  font-family: Georgia, serif;
}
.voice-body {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 16px;
}
.voice-from {
  font-size: .78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.voice-from::before { content: '—'; color: var(--primary); }

/* ──────────────────────────────
   AREA
   ────────────────────────────── */
.area-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.area-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: .82rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 100px;
  border: 1px solid var(--tag-border);
}
.area-note {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.9;
}

/* ──────────────────────────────
   CONTACT
   ────────────────────────────── */
#contact {
  background: var(--cta-bg);
  text-align: center;
}
.contact-ttl { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 900; margin-bottom: 10px; }
.contact-lead { font-size: .9rem; color: var(--muted); margin-bottom: 40px; }
.contact-wrap {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
}
.contact-tel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 40px;
  min-width: 260px;
}
.contact-tel-label {
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .1em;
  margin-bottom: 8px;
}
.contact-tel {
  display: block;
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--tel-color);
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.contact-tel-note { font-size: .72rem; color: var(--muted); }

/* ──────────────────────────────
   FOOTER
   ────────────────────────────── */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 24px 0;
}
.ftr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.ftr-brand { font-size: .88rem; font-weight: 800; }
.ftr-links { display: flex; gap: 18px; }
.ftr-links a { font-size: .72rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.ftr-copy { font-size: .7rem; color: var(--muted); }

/* ──────────────────────────────
   RESPONSIVE — MOBILE
   ────────────────────────────── */
@media (max-width: 640px) {
  section { padding: 60px 0; }
  .container { padding: 0 20px; }

  /* ── Header: hamburger visible, desktop elements hidden ── */
  .hdr-burger  { display: flex; }
  .hdr-actions { display: none; }
  .hdr-logo small { display: none; }

  /* ── Mobile nav overlay ── */
  .hdr-nav {
    display: none;          /* closed: 完全非表示 */
    position: fixed;
    top: 62px;
    right: 0;
    left: 0;
    height: calc(100svh - 62px); /* bottom:0 は backdrop-filter 祖先で誤算されるため明示指定 */
    z-index: 190;
    background: var(--bg);
    border-top: 1px solid var(--border);
    overflow-y: auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  /* open 状態 */
  .hdr-nav.is-open {
    display: flex;
    animation: nav-open .22s ease;
  }
  @keyframes nav-open {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }

  /* リスト: 縦並び */
  .hdr-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 340px;
  }
  .hdr-nav > ul > li { border-bottom: 1px solid var(--border); }

  /* モバイルのリンク — 高い詳細度でテーマCSSを上書き */
  .hdr-nav > ul > li > a {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 20px 24px;
    color: var(--text) !important;   /* テーマCSSの同名セレクタに勝つ */
    text-align: center;
    transition: background .15s;
  }
  .hdr-nav > ul > li > a:hover {
    background: rgba(128,128,128,.08);
    color: var(--text) !important;
  }

  /* ── Contact block inside mobile menu ── */
  .hdr-nav-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 36px;
    padding: 0 24px;
    width: 100%;
    max-width: 320px;
  }
  .hdr-nav-foot .nav-tel {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--tel-color);
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .hdr-nav-foot .nav-cta {
    width: 100%;
    justify-content: center;
  }

  /* ── Hero ── */
  .hero-title { font-size: 2.2rem; letter-spacing: -.01em; }
  .hero-stats { gap: 24px; }
  .stat-n { font-size: 1.7rem; }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn, .hero-ctas .btn-outline { width: 100%; }

  /* ── About ── */
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { display: flex; justify-content: center; }
  .about-photo .photo-frame {
    width: 140px;
    height: 140px;
    aspect-ratio: 1/1;
    border-radius: 50%;
  }

  /* ── Grids ── */
  .services-grid { grid-template-columns: 1fr; }
  .works-grid    { grid-template-columns: 1fr; }
  .voice-grid    { grid-template-columns: 1fr; }

  /* ── Contact ── */
  .contact-wrap { flex-direction: column; align-items: center; }
  .contact-tel-card { width: 100%; max-width: 340px; }
  .btn-line-lg { width: 100%; max-width: 340px; }

  /* ── Footer ── */
  .ftr-inner { flex-direction: column; text-align: center; gap: 8px; }
}

/* hdr-nav-foot は desktop では非表示 */
.hdr-nav-foot { display: none; }
@media (max-width: 640px) { .hdr-nav-foot { display: flex; } }

/* ──────────────────────────────
   WORK IMAGE MODAL
   ────────────────────────────── */
.wk-modal {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility 0s .25s;
}
.wk-modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity .25s ease, visibility 0s 0s;
}
.wk-modal-bd {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  cursor: pointer;
}
.wk-modal-box {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: min(620px, 100%);
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  transform: scale(.94) translateY(14px);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
}
.wk-modal.is-open .wk-modal-box {
  transform: none;
}
/* モーダル内の work-img をフル幅・大きく */
.wk-modal-box .work-img {
  aspect-ratio: 4/3;
  width: 100%;
  border-radius: 0;
}
.wk-modal-box .work-img .ph-ico { font-size: 72px; }
.wk-modal-box .work-img .ph-txt { font-size: .92rem; }
.wk-modal-foot {
  padding: 18px 22px 20px;
  border-top: 1px solid var(--border);
}
.wk-modal-title { font-size: 1.05rem; font-weight: 800; margin-bottom: 7px; }
.wk-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: .78rem;
  color: var(--muted);
}
.wk-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.wk-modal-close:hover { background: rgba(0,0,0,.7); }

/* クリック可能な work-card */
.work-card { cursor: pointer; }
.work-card:hover .work-img .ph-ico { opacity: .45; }
