/* =============================================================
   Narrative Sound Technology — blueprint stylesheet
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ブループリント：濃紺の紙に白いインク */
  --bg:        #0b2b4a;
  --bg-2:      #0e3355;
  --bg-3:      #123d63;
  --bg-deep:   #071f38;

  --line:      rgba(214, 233, 255, .30);
  --line-soft: rgba(214, 233, 255, .14);
  --grid:      rgba(214, 233, 255, .055);
  --grid-lg:   rgba(214, 233, 255, .085);

  --text:      #eaf3fc;
  --text-mid:  #a7c4e0;
  --text-dim:  #7196b8;

  --ink:       #ffffff;          /* 図面の線色 */
  --accent:    #ffffff;
  --accent-dim: rgba(255, 255, 255, .5);

  /* --------------------------------------------------------------
     ブランド書体
       欧文   Avenir（Adobe Fonts / macOS・iOS には標準搭載）
       日本語 FOT-筑紫ゴシック Pro（Fontworks LETS）
     欧文 → 日本語 → フォールバックの順に並べる。
     Web フォントの読み込みタグは index.html / order.html の <head> 参照。
     ウェイトは Medium(500) と Bold(700) の2つだけを使う。
     -------------------------------------------------------------- */
  --sans:
    avenir, 'Avenir Next', Avenir,
    'FOT-TsukuGoPro', 'FOT-筑紫ゴシック Pro', '筑紫ゴシック Pro',
    'Hiragino Sans', 'Noto Sans JP', system-ui, sans-serif;

  /* 既存クラス互換：見出し・図面注記も同じスタックを使う */
  --display: var(--sans);
  --serif:   var(--sans);
  --mono:    var(--sans);

  --max: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --section: clamp(88px, 12vw, 156px);
}

html { scroll-behavior: smooth; font-size: 16px; background: var(--bg); }

body {
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 500;
  line-height: 1.9;
  letter-spacing: .04em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 方眼紙（10px 細線 / 80px 太線） */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid-lg) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-lg) 1px, transparent 1px);
  background-size: 16px 16px, 16px 16px, 96px 96px, 96px 96px;
}
body > * { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--ink); color: var(--bg-deep); }

/* ---------- typography ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--accent-dim); }

/* 見出しはすべて欧文。和文向けの広い字間・行間だと間延びするため詰める */
.sec-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1.28;
  letter-spacing: .005em;
  text-wrap: balance;
  margin: 22px 0 0;
}

/* 和文の見出し（Knowledge ページ）。欧文向けの詰めた字組みだと窮屈なので戻す。
   長さも出るぶん一段小さくする。 */
.sec-title--ja {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  line-height: 1.5;
  letter-spacing: .04em;
}

.lead { color: var(--text-mid); max-width: 62ch; margin-top: 24px; }

.inner { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }

/* ---------- header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 43, 74, .55);
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s;
}
.header.is-scrolled { background: rgba(11, 43, 74, .93); border-bottom-color: var(--line-soft); }

.nav {
  max-width: var(--max); margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__logo { display: block; }
.nav__logo img { width: clamp(132px, 14vw, 162px); }

.nav__links { display: flex; align-items: center; gap: 30px; font-family: var(--mono); font-size: .74rem; letter-spacing: .18em; }
.nav__links a { color: var(--text-mid); transition: color .25s; }
.nav__links a:hover { color: var(--text); }
.nav__links .is-cta { color: var(--ink); border-bottom: 1px solid var(--accent-dim); padding-bottom: 2px; }

.nav__hamburger { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 24px; position: relative; }
.nav__hamburger span { position: absolute; left: 0; width: 100%; height: 1px; background: var(--text); transition: transform .3s, opacity .3s; }
.nav__hamburger span:nth-child(1) { top: 4px; }
.nav__hamburger span:nth-child(2) { top: 12px; }
.nav__hamburger span:nth-child(3) { top: 20px; }
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 30px;
  border: 1px solid var(--line);
  font-family: var(--mono); font-size: .76rem; letter-spacing: .16em;
  background: transparent; cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.btn::after { content: '→'; transition: transform .3s; }
.btn:hover { border-color: var(--ink); background: rgba(255,255,255,.07); }
.btn:hover::after { transform: translateX(5px); }
.btn--fill { background: var(--ink); border-color: var(--ink); color: var(--bg-deep); font-weight: 700; }
.btn--fill:hover { background: #dcecfb; border-color: #dcecfb; color: var(--bg-deep); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.btn:disabled:hover { border-color: var(--line); background: transparent; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; }
.hero__inner {
  max-width: var(--max); margin-inline: auto; width: 100%;
  padding: 132px var(--gutter) 92px;
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center;
}
.hero__title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.9rem, 3.5vw, 3.1rem); line-height: 1.18; letter-spacing: .005em;
  margin: 26px 0 0;
}
/* 狭い幅で折り返すとき、行の長さが偏らないようにする */
.hero__title span { display: block; text-wrap: balance; }
.hero__desc { color: var(--text-mid); margin-top: 28px; max-width: 44ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.hero__meta {
  display: flex; gap: 26px; flex-wrap: wrap; margin-top: 52px;
  font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; color: var(--text-dim);
}

/* 図面ビュー */
.blueprint { position: relative; }
.blueprint svg { width: 100%; height: auto; overflow: visible; }
.bp-line   { fill: none; stroke: var(--ink); stroke-width: 1.1; }
.bp-thin   { fill: none; stroke: var(--ink); stroke-width: .7; opacity: .75; }
.bp-hidden { fill: none; stroke: var(--ink); stroke-width: .7; stroke-dasharray: 6 5; opacity: .55; }
.bp-dim    { fill: none; stroke: var(--ink); stroke-width: .6; opacity: .45; }
.bp-fill   { fill: rgba(255,255,255,.05); }
.bp-txt    { fill: var(--ink); font-family: var(--mono); font-weight: 500; font-size: 9.5px; letter-spacing: .2em; opacity: .8; }
.bp-txt--sm{ font-size: 8px; opacity: .6; }

/* 線を描き起こすアニメーション */
.blueprint .draw {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  animation: draw 2.4s cubic-bezier(.35,.6,.25,1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.blueprint .fade { opacity: 0; animation: fadein .8s ease forwards; }
@keyframes fadein { to { opacity: .8; } }

/* ---------- photo ---------- */
.figure { border: 1px solid var(--line-soft); background: var(--bg-2); }
.figure img { width: 100%; }
.figure figcaption {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .16em;
  color: var(--text-dim); padding: 12px 14px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; gap: 14px;
}


/* =============================================================
   KNOWLEDGE（スピーカーの型と用語）
   ============================================================= */
.kn-head { padding-top: 148px; }   /* 左右は .inner のガターに任せる */

.kn-section { padding-block: clamp(64px, 9vw, 110px); }
.kn-section + .kn-section { border-top: 1px solid var(--line-soft); }

/* 罫線は outline で描く。項目数が列数の倍数でなくても空セルが色ブロックにならない。 */
.kn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 48px; border: 1px solid var(--line-soft); }
.kn-card { outline: 1px solid var(--line-soft); }
.kn-card { background: var(--bg); padding: 24px 22px 28px; transition: background .35s; }
.kn-card:hover { background: var(--bg-2); }

.kn-fig { border: 1px solid var(--line-soft); background: rgba(255,255,255,.02); padding: 6px; }
.kn-fig svg { display: block; width: 100%; height: auto; }

.kn-card__no { font-size: .6rem; letter-spacing: .2em; color: var(--accent-dim); margin-top: 18px; }
.kn-card__name { font-size: .96rem; font-weight: 700; letter-spacing: .05em; margin-top: 6px; }
.kn-card__en { font-size: .58rem; letter-spacing: .2em; color: var(--text-dim); margin-top: 5px; }
.kn-card__text { font-size: .78rem; color: var(--text-mid); line-height: 1.9; margin-top: 12px; }

/* ---------- 用語集 ---------- */
.gl-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 40px; }
.gl-search {
  flex: 1 1 280px; max-width: 420px;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  padding: 12px 15px; font-size: .86rem; transition: border-color .25s;
}
.gl-search:focus { outline: 0; border-color: var(--ink); }
.gl-count { font-size: .62rem; letter-spacing: .18em; color: var(--text-dim); }

/* 罫線は outline で描く。gap を色で埋めないので、
   最終行に項目が足りなくても空セルが色ブロックにならない。 */
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; margin-top: 28px; border: 1px solid var(--line-soft); }
.gl-item, .gl-group { outline: 1px solid var(--line-soft); }
.gl-group { grid-column: 1 / -1; background: var(--bg-deep); padding: 16px 22px; }
.gl-group h3 { font-size: .64rem; letter-spacing: .24em; font-weight: 500; color: var(--text-mid); }
.gl-item { background: var(--bg); padding: 22px 22px 24px; }
.gl-item.is-hidden, .gl-group.is-hidden { display: none; }
.gl-item dt { font-size: .9rem; font-weight: 700; letter-spacing: .05em; }
.gl-item dt span { display: block; font-size: .56rem; font-weight: 500; letter-spacing: .2em; color: var(--text-dim); margin-top: 5px; }
.gl-item dd { font-size: .8rem; color: var(--text-mid); line-height: 1.95; margin-top: 12px; }
.gl-empty { grid-column: 1 / -1; background: var(--bg); padding: 48px; text-align: center; font-size: .82rem; color: var(--text-dim); }

/* トップページからの導線 */
.kn-band { border-top: 1px solid var(--line-soft); background: var(--bg-2); }
.kn-band__inner {
  max-width: var(--max); margin-inline: auto; padding: clamp(48px,6vw,72px) var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
}
.kn-band__title { font-size: clamp(1.2rem, 2.4vw, 1.7rem); font-weight: 500; letter-spacing: .005em; line-height: 1.3; margin-top: 16px; }
.kn-band__text { font-size: .85rem; color: var(--text-mid); margin-top: 12px; max-width: 52ch; }

/* ---------- works（実績一覧 / CMS 連動） ---------- */
.works-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  margin-top: 56px;
}
.works-empty {
  grid-column: 1 / -1; color: var(--text-dim); font-size: .85rem;
  padding: 48px 0; text-align: center; border: 1px dashed var(--line-soft);
}

.work-card {
  display: block; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-soft); padding: 0;
  transition: border-color .3s, background .3s;
}
.work-card:hover { border-color: var(--line); background: var(--bg-3); }
.work-card:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

.work-card__media { position: relative; display: block; overflow: hidden; }
.work-card__media img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.7,.3,1);
}
.work-card:hover .work-card__media img { transform: scale(1.035); }
.work-card__no {
  position: absolute; left: 12px; top: 12px;
  font-size: .6rem; letter-spacing: .2em; color: var(--ink);
  background: rgba(7,31,56,.7); padding: 4px 9px;
}

.work-card__body { display: block; padding: 18px 18px 20px; }
.work-card__title { display: block; font-size: .95rem; font-weight: 700; letter-spacing: .05em; }
.work-card__meta {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 8px;
  font-size: .62rem; letter-spacing: .18em; color: var(--text-dim);
}

/* ---------- works 詳細モーダル ---------- */
.work-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(4, 18, 33, .86); backdrop-filter: blur(6px);
  padding: 5vh 20px; overflow-y: auto;
}
.work-modal.is-open { display: flex; }
.work-modal__panel {
  position: relative; width: min(860px, 100%);
  background: var(--bg); border: 1px solid var(--line);
  animation: modal-in .35s cubic-bezier(.2,.7,.3,1);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.work-modal__close {
  position: sticky; top: 0; float: right; z-index: 2;
  margin: 12px 12px 0; padding: 9px 14px;
  background: var(--bg-deep); border: 1px solid var(--line);
  font-size: .62rem; letter-spacing: .18em; cursor: pointer;
  transition: background .25s, border-color .25s;
}
.work-modal__close:hover { background: var(--bg-3); border-color: var(--ink); }

.work-detail { padding: 44px clamp(24px, 5vw, 52px) clamp(32px, 5vw, 52px); }
.work-detail__title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 500; letter-spacing: .06em; margin-top: 20px; }
.work-detail__en { font-size: .68rem; letter-spacing: .22em; color: var(--text-dim); margin-top: 10px; }

.work-detail__facts { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 28px; }
.work-detail__facts dt { font-size: .6rem; letter-spacing: .2em; color: var(--text-dim); }
.work-detail__facts dd { font-size: .88rem; margin-top: 4px; }

.work-detail__spec {
  margin-top: 28px; padding: 20px 22px;
  border: 1px solid var(--line-soft); background: var(--bg-2);
}
.work-detail__spec li {
  font-size: .78rem; color: var(--text-mid); letter-spacing: .08em;
  padding: 5px 0 5px 18px; position: relative;
}
.work-detail__spec li::before {
  content: ''; position: absolute; left: 0; top: 15px;
  width: 8px; height: 1px; background: var(--accent-dim);
}

.work-detail__body { font-size: .9rem; color: var(--text-mid); margin-top: 28px; white-space: pre-wrap; }
.work-detail__link { margin-top: 32px; }
.work-detail__images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 36px; }
.work-detail__images .figure img { aspect-ratio: 3/2; object-fit: cover; }

.gallery { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; margin-top: 56px; }
.gallery .figure { display: flex; flex-direction: column; }
.gallery .figure img { flex: 1; min-height: 0; object-fit: cover; }
.gallery .figure:nth-child(2) img { aspect-ratio: 2/3; }

/* ---------- cards ---------- */
.grid { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); margin-top: 56px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--bg); padding: 40px 34px; transition: background .35s; }
.card:hover { background: var(--bg-2); }
.card__no { font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; color: var(--accent-dim); }
.card__title { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; margin: 16px 0 12px; letter-spacing: .05em; }
.card__text { font-size: .88rem; color: var(--text-mid); line-height: 1.95; }

/* ---------- series ---------- */
.series-list { margin-top: 60px; border-top: 1px solid var(--line-soft); }
.series-row {
  display: grid; grid-template-columns: 250px 1fr auto; gap: 36px; align-items: baseline;
  padding: 38px 0; border-bottom: 1px solid var(--line-soft);
  transition: padding-left .35s, background .35s;
}
.series-row:hover { padding-left: 16px; background: rgba(255,255,255,.03); }
.series-row__name { font-family: var(--mono); font-size: 1rem; font-weight: 700; letter-spacing: .14em; line-height: 1.5; }
.series-row__tag { font-family: var(--serif); color: var(--text-mid); font-size: .92rem; margin-top: 6px; letter-spacing: .06em; }
.series-row__desc { font-size: .88rem; color: var(--text-mid); }
.series-row__spec { font-family: var(--mono); font-size: .68rem; color: var(--text-dim); margin-top: 10px; letter-spacing: .1em; }
.series-row__note, .opt__note {
  font-size: .72rem; line-height: 1.85; color: var(--text-dim);
  margin-top: 12px; padding-left: 1.15em; text-indent: -1.15em;
}
.series-row__note::before, .opt__note::before { content: '※ '; }
.opt__note {
  margin-top: 14px; padding: 10px 12px 10px calc(12px + 1.15em);
  border: 1px dashed var(--line-soft); background: rgba(255,255,255,.03);
}

.series-row__price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--text-mid); white-space: nowrap; }

/* ---------- material ---------- */
/* 点数が変わっても空セルが出ないよう auto-fit にし、罫線は outline で描く */
.mat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; margin-top: 56px; border: 1px solid var(--line-soft); }
.mat-cell { outline: 1px solid var(--line-soft); }
.mat-cell { background: var(--bg); padding: 26px 20px 30px; }
.mat-cell__chip { width: 100%; height: 150px; border: 1px solid var(--line-soft); }
.mat-cell__chip.is-hatch, .opt__swatch.is-hatch {
  background-color: var(--bg-3);
  background-image: repeating-linear-gradient(
    45deg, rgba(214,233,255,.20) 0 1px, transparent 1px 10px);
}
.mat-cell__name { font-size: .8rem; margin-top: 18px; letter-spacing: .05em; }
.mat-cell__desc { font-size: .74rem; color: var(--text-dim); margin-top: 8px; line-height: 1.8; }

/* ---------- process ---------- */
.process { margin-top: 56px; }
.process__item { display: grid; grid-template-columns: 90px 1fr; gap: 30px; padding: 32px 0; border-top: 1px solid var(--line-soft); }
.process__item:last-child { border-bottom: 1px solid var(--line-soft); }
.process__no { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: var(--accent-dim); padding-top: 6px; }
.process__title { font-family: var(--serif); font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; }
.process__text { font-size: .87rem; color: var(--text-mid); margin-top: 10px; }

/* ---------- faq ---------- */
.faq { margin-top: 50px; border-top: 1px solid var(--line-soft); }
.faq__item { border-bottom: 1px solid var(--line-soft); }
.faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 26px 44px 26px 0; position: relative; font-size: .95rem; letter-spacing: .05em;
}
.faq__q::after {
  content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--ink); font-family: var(--mono); transition: transform .3s;
}
.faq__item.is-open .faq__q::after { transform: translateY(-50%) rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.faq__a p { font-size: .87rem; color: var(--text-mid); padding-bottom: 28px; padding-right: 44px; }

/* ---------- cta ---------- */
.cta { border-top: 1px solid var(--line-soft); background: var(--bg-deep); }
.cta__inner { max-width: var(--max); margin-inline: auto; padding: clamp(64px,9vw,110px) var(--gutter); text-align: center; }
.cta__title { font-family: var(--serif); font-size: clamp(1.6rem,3.6vw,2.5rem); font-weight: 500; line-height: 1.28; letter-spacing: .005em; }
.cta__text { color: var(--text-mid); margin-top: 20px; }
.cta .btn { margin-top: 40px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); padding: 52px 0 40px; }
.footer__inner { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap; }
.footer__inner .nav__logo img { width: 168px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 26px; font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; color: var(--text-dim); }
.footer__links a:hover { color: var(--ink); }
.footer__copy { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; color: var(--text-dim); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.3,1), transform .9s cubic-bezier(.2,.7,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   ORDER / CONFIGURATOR
   ============================================================= */
.order-head { padding-top: 148px; }   /* 左右は .inner のガターに任せる */
/* 見出しは STEP ラベルより 10pt ほど左に出す（大きな文字の光学調整）。
   モバイルはガターが狭いので適用しない。 */
@media (min-width: 761px) {
  .order-head, .kn-head { padding-left: calc(var(--gutter) - 13px); }
}

.order-layout {
  max-width: var(--max); margin-inline: auto; padding: 56px var(--gutter) 120px;
  display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start;
}

.step { padding-block: 46px; border-top: 1px solid var(--line-soft); }
.step:first-of-type { border-top: 0; padding-top: 8px; }
.step__head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.step__no { font-family: var(--mono); font-size: .68rem; letter-spacing: .22em; color: var(--accent-dim); }
.step__label { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; letter-spacing: .08em; }
.step__caption { font-size: .82rem; color: var(--text-dim); margin-top: 12px; }

.opts { display: grid; gap: 12px; margin-top: 28px; }
.opts--series { grid-template-columns: repeat(2, 1fr); }
.opts--swatch { grid-template-columns: repeat(3, 1fr); }
.opts--addon { grid-template-columns: repeat(2, 1fr); }

.opt {
  position: relative; text-align: left; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line-soft);
  padding: 22px 22px 20px;
  transition: border-color .28s, background .28s;
  /* button は中身に余りが出ると上下中央に寄せられてしまうため、
     flex にして必ず上揃えにする（スウォッチの高さを揃えるため） */
  display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
}
.opt:hover { border-color: var(--line); background: var(--bg-3); }
.opt.is-selected { border-color: var(--ink); background: rgba(255,255,255,.08); }
.opt.is-selected::after {
  content: '✓'; position: absolute; top: 14px; right: 16px;
  color: var(--ink); font-family: var(--mono); font-size: .8rem;
}
.opt__name { font-size: .92rem; letter-spacing: .06em; }
.opt--series .opt__name { font-family: var(--mono); font-size: .95rem; font-weight: 700; letter-spacing: .14em; line-height: 1.5; }
.opt__tag { font-family: var(--serif); color: var(--text-mid); font-size: .84rem; margin-top: 6px; }
.opt__desc { font-size: .78rem; color: var(--text-mid); line-height: 1.85; margin-top: 12px; }
.opt__spec { font-family: var(--mono); font-size: .64rem; color: var(--text-dim); letter-spacing: .1em; margin-top: 14px; }
.opt__price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: .72rem; color: var(--text-mid); margin-top: 12px; letter-spacing: .08em; }
.opt__swatch { width: 100%; height: 92px; border: 1px solid var(--line-soft); margin-bottom: 16px; }

/* 図面アイコンのスウォッチ（スタイル選択） */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.opt__swatch--fig {
  height: auto; aspect-ratio: 240 / 150;
  background: rgba(255,255,255,.02); padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.opt__swatch--fig svg { width: 100%; height: 100%; }

/* ステップ見出しからの補助リンク */
.step__link {
  font-size: .62rem; letter-spacing: .16em; color: var(--text-dim);
  border-bottom: 1px solid var(--line-soft); padding-bottom: 2px;
  transition: color .25s, border-color .25s;
}
.step__link:hover { color: var(--ink); border-color: var(--accent-dim); }

/* summary */
.summary { position: sticky; top: 92px; border: 1px solid var(--line); background: var(--bg-deep); }
.summary__head { padding: 24px 24px 18px; border-bottom: 1px solid var(--line-soft); }
.summary__head h2 { font-family: var(--mono); font-size: .72rem; letter-spacing: .22em; font-weight: 500; color: var(--text-mid); }
.summary__body { padding: 8px 24px 4px; max-height: 44vh; overflow-y: auto; }
.summary__row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: .8rem; }
.summary__row:last-child { border-bottom: 0; }
.summary__row dt { color: var(--text-dim); font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; padding-top: 3px; white-space: nowrap; }
.summary__row dd { text-align: right; line-height: 1.7; }
.summary__row dd small { display: block; font-family: var(--mono); font-size: .64rem; color: var(--text-dim); }
.summary__foot { padding: 22px 24px 26px; border-top: 1px solid var(--line); }
.summary__total { display: flex; justify-content: space-between; align-items: baseline; }
.summary__total span { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; color: var(--text-dim); }
.summary__total strong { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 1.5rem; font-weight: 700; letter-spacing: .02em; color: var(--ink); }
.summary__note { font-size: .68rem; color: var(--text-dim); line-height: 1.8; margin-top: 12px; }
.summary__note.is-omakase {
  color: var(--text-mid); padding: 9px 11px;
  border: 1px dashed var(--line-soft); background: rgba(255,255,255,.04);
}
.summary__lead { font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; color: var(--text-mid); margin-top: 14px; }
.summary .btn { width: 100%; justify-content: center; margin-top: 20px; }

/* form */
.form { display: grid; gap: 22px; margin-top: 28px; }
.form__row { display: grid; gap: 22px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 9px; }
.field label { font-family: var(--mono); font-size: .64rem; letter-spacing: .18em; color: var(--text-dim); }
.field label .req { color: var(--ink); margin-left: 6px; }
.field input, .field textarea, .field select {
  background: var(--bg-2); border: 1px solid var(--line-soft); padding: 13px 15px;
  font-size: .88rem; transition: border-color .25s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--ink); }
.field textarea { resize: vertical; min-height: 128px; }
.field select option { background: var(--bg-2); color: var(--text); }
.field input:invalid:not(:placeholder-shown) { border-color: #e08a6f; }

/* ハニーポット。display:none だと一部の bot に見抜かれるので画面外へ逃がす */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__consent { display: flex; gap: 12px; align-items: flex-start; font-size: .78rem; color: var(--text-mid); }
.form__consent input { width: 17px; height: 17px; margin-top: 4px; accent-color: var(--ink); flex: none; }
.form__error { color: #f0a68c; font-size: .78rem; display: none; }
.form__error.is-shown { display: block; }

.done { border: 1px solid var(--ink); background: rgba(255,255,255,.07); padding: 40px 34px; text-align: center; display: none; }
.done.is-shown { display: block; }
.done h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; }
.done p { font-size: .85rem; color: var(--text-mid); margin-top: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__title { font-size: clamp(2rem, 6vw, 3rem); }
  .blueprint { max-width: 520px; }
  .order-layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .summary__body { max-height: none; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery .figure:first-child { grid-column: 1 / -1; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .kn-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav__hamburger { display: block; }
  /* .header の backdrop-filter が内包ブロックになるため inset:0 は使わず、
     ビューポート相当のサイズを明示して閉じたときに確実に画面外へ逃がす */
  .nav__links {
    position: fixed; top: 0; left: 0; z-index: 90;
    width: 100vw; height: 100svh;
    flex-direction: column; justify-content: center; gap: 30px;
    background: rgba(7, 31, 56, .985); font-size: .95rem;
    transform: translateY(-100%); transition: transform .45s cubic-bezier(.7,0,.3,1);
  }
  .nav__links.is-open { transform: none; }

  .grid--3 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; }
  .kn-grid { grid-template-columns: 1fr; }
  .glossary { grid-template-columns: 1fr; }
  .work-detail__images { grid-template-columns: 1fr; }
  .opts--series, .opts--swatch, .opts--addon { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }

  .series-row { grid-template-columns: 1fr; gap: 12px; }
  .process__item { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .blueprint .draw { stroke-dashoffset: 0; }
  .blueprint .fade { opacity: .8; }
}

/* ---------- 素材などの補足モーダル ---------- */
/* 説明文の末尾に置く「◯◯について」リンク。
   .opt が button なので、中身は span にして JS 側でクリックを拾う */
.opt__more {
  display: inline; cursor: pointer;
  color: var(--ink); border-bottom: 1px solid var(--accent-dim);
  padding-bottom: 1px;
  transition: border-color .25s, opacity .25s;
}
.opt__more::before { content: '　'; }
.opt__more:hover { border-color: var(--ink); opacity: .82; }

/* step__link は <a> と <button> の両方で使うため、button の既定を打ち消す */
button.step__link { background: none; cursor: pointer; font-family: inherit; }

.info-detail { padding: 44px clamp(24px, 5vw, 52px) clamp(36px, 5vw, 56px); }
.info-detail__eyebrow { font-family: var(--mono); font-size: .6rem; letter-spacing: .22em; color: var(--text-dim); }
.info-detail__title { font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 500; letter-spacing: .06em; margin-top: 14px; }
.info-detail__lead { font-size: .92rem; line-height: 2; margin-top: 22px; }
.info-detail__h {
  font-size: .72rem; letter-spacing: .16em; color: var(--text-dim);
  margin-top: 34px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}
.info-detail p { font-size: .84rem; line-height: 2.05; color: var(--text-mid); }
.info-detail__h + p { margin-top: 14px; }

.info-detail__facts { margin-top: 16px; }
.info-detail__facts > div { display: flex; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.info-detail__facts dt { flex: 0 0 84px; font-size: .62rem; letter-spacing: .18em; color: var(--text-dim); padding-top: 3px; }
.info-detail__facts dd { font-size: .84rem; line-height: 1.85; }

.info-detail__link { margin-top: 26px; }
.info-detail__link a {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .16em;
  color: var(--ink); border-bottom: 1px solid var(--accent-dim); padding-bottom: 3px;
}
.info-detail__link a:hover { border-color: var(--ink); }

@media (max-width: 640px) {
  .info-detail__facts > div { flex-direction: column; gap: 5px; }
  .info-detail__facts dt { flex: none; }
}

/* ---------- 店舗・商業空間ページ（space.html） ---------- */
.sp-grid {
  display: grid; gap: 1px; margin-top: 40px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* gap の下地が色ブロックに見えないよう、枠線は outline で描く */
  outline: 1px solid var(--line-soft); outline-offset: 0;
  background: var(--line-soft);
}
.sp-grid--tight { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.sp-card {
  background: var(--bg); padding: 30px 28px 32px;
  display: flex; flex-direction: column;
}
.sp-card__no {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .2em;
  color: var(--text-dim); margin-bottom: 14px;
}
.sp-card__title { font-size: .95rem; font-weight: 700; letter-spacing: .04em; line-height: 1.7; }
.sp-card__text { font-size: .82rem; line-height: 2; color: var(--text-mid); margin-top: 14px; }
.sp-card__meta {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em;
  color: var(--text-dim); margin-top: auto; padding-top: 20px;
}

/* 進め方 */
.sp-flow { margin-top: 40px; border-top: 1px solid var(--line-soft); }
.sp-flow__item {
  display: grid; gap: 6px 40px; padding: 28px 0;
  border-bottom: 1px solid var(--line-soft);
  grid-template-columns: 110px 1fr;
}
.sp-flow__step {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em;
  color: var(--text-dim); padding-top: 5px; grid-row: span 2;
}
.sp-flow__title { font-size: .95rem; font-weight: 700; letter-spacing: .04em; }
.sp-flow__text { font-size: .82rem; line-height: 2; color: var(--text-mid); }

/* 方式の比較表。狭い画面では表ごと横スクロールさせる */
.sp-table-wrap { margin-top: 40px; overflow-x: auto; }
.sp-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.sp-table th, .sp-table td {
  text-align: left; padding: 16px 20px 16px 0;
  border-bottom: 1px solid var(--line-soft); vertical-align: top;
}
.sp-table th {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .18em;
  color: var(--text-dim); font-weight: 500; white-space: nowrap;
}
.sp-table td { font-size: .82rem; line-height: 1.95; color: var(--text-mid); }
.sp-table tbody td:first-child { color: var(--ink); white-space: nowrap; }

.sp-note { font-size: .8rem; line-height: 2; color: var(--text-dim); margin-top: 28px; }
.sp-note a { color: var(--ink); border-bottom: 1px solid var(--accent-dim); padding-bottom: 1px; }
.sp-note a:hover { border-color: var(--ink); }

@media (max-width: 640px) {
  .sp-flow__item { grid-template-columns: 1fr; gap: 6px; }
  .sp-flow__step { grid-row: auto; padding-top: 0; }
}
