/* assets/css/components.css — Borndium dark-luxury restyle of every wireframe selector.
   Preserves wireframe LAYOUT/structure + responsive behavior; swaps palette to dark tokens.
   Flat material (no shadows). Highlight = .panel-feature (lift + clay hairline), never dark fill. */

/* ============ header bar (fixed, izanami-style: brand + hamburger) ============ */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: var(--header-index); display: flex; align-items: center; justify-content: space-between; padding: 22px 48px; background: transparent; }
.brand { text-decoration: none; font-family: var(--serif); letter-spacing: .25em; font-size: 16px; color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 28px; }


/* hamburger toggle (bars -> X morph on nav-open) */
.nav-toggle { display: flex; align-items: center; background: none; border: 0; cursor: pointer; padding: 10px 6px; color: var(--text); }
.nav-toggle__bars { width: 24px; height: 1px; background: var(--text); position: relative; display: inline-block; transition: background .3s var(--ease); }
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; top: 7px; width: 24px; height: 1px; background: var(--text); transition: transform .3s var(--ease), top .3s var(--ease); }
html.nav-open .nav-toggle__bars { background: transparent; }
html.nav-open .nav-toggle__bars::after { top: 0; transform: rotate(45deg); }
html.nav-open .nav-toggle__bars::before { content: ""; position: absolute; left: 0; top: 0; width: 24px; height: 1px; background: var(--text); transform: rotate(-45deg); }

/* toggle text label ("menu" -> "close"); hidden on mobile */
.nav-toggle__label { margin-left: 8px; font-size: 14px; letter-spacing: .08em; text-transform: lowercase; }
.nav-toggle__label-close { display: none; }
html.nav-open .nav-toggle__label-open { display: none; }
html.nav-open .nav-toggle__label-close { display: inline; }

/* ============ full-screen nav overlay (semi-transparent veil, right-aligned) ============ */
.nav-overlay { position: fixed; inset: 0; z-index: var(--transition-index); display: flex; align-items: center; justify-content: flex-end; padding: 0 48px; background: rgba(15,14,12,.55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.nav-overlay.nav-open { opacity: 1; pointer-events: auto; }
.nav-overlay__nav { display: flex; flex-direction: column; align-items: flex-end; gap: 56px; }
.nav-overlay__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.nav-overlay__item { font-family: var(--body); font-size: clamp(34px, 6vw, 52px); line-height: 1.1; color: var(--text); cursor: pointer; text-align: right; transition: color .2s var(--ease); }
.nav-overlay__item:hover { color: var(--clay); }
.nav-overlay__cta { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }

/* ============ buttons (izanami underline + arrow style) ============ */
.btn { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; letter-spacing: .04em; color: var(--text); padding: 12px 0; border: 0; border-radius: 0; background: none; border-bottom: 1px solid var(--text); width: max-content; max-width: 100%; text-decoration: none; cursor: pointer; transition: color .3s var(--ease), border-color .3s var(--ease); }
.btn::after { content: "→"; transition: transform .3s var(--ease); }
.btn:hover { color: var(--clay); border-color: var(--clay); }
.btn:hover::after { transform: translateX(6px); }
.btn-primary, .btn-light { color: var(--clay); border-color: var(--clay); }
.btn-secondary { color: var(--text-muted); border-color: rgba(232,228,220,.3); }
.btn-ghost { color: var(--text); border-color: rgba(232,228,220,.22); }
.btn-wire { color: var(--clay); border-bottom-style: dashed; border-color: var(--clay-line); }

/* ============ section primitives ============ */
.section { padding: 140px 28px; position: relative; }
.section-head { display: grid; grid-template-columns: minmax(0,.92fr) minmax(290px,.54fr); gap: 42px; align-items: end; margin-bottom: 56px; }
.section-head > p { font-size: 18px; color: var(--text-muted); }
.sticky-wrap p { line-height: 1.95; }

/* ============ typography (izanami serif) ============ */
.eyebrow { font-family: var(--serif); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--clay); }
h1, h2, h3 { font-family: var(--body); font-weight: 500; letter-spacing: -.012em; color: var(--text); }
h1 { font-size: clamp(42px, 7.2vw, 86px); line-height: 1.08; }
h2 { font-size: clamp(30px, 4.8vw, 58px); line-height: 1.15; }
h3 { font-size: clamp(20px, 2vw, 27px); line-height: 1.18; }
.small { font-size: 14px; }
.muted { color: var(--text-muted); }

/* ============ cards (flat) ============ */
.card { background: var(--bg-lift); border: var(--hairline); border-radius: var(--radius-panel); padding: 22px; box-shadow: none; }
.card.flat { background: rgba(255,255,255,.03); }
/* old dark-fill highlight -> panel-feature (lift + clay hairline) */
.card.dark, .output-card.featured, .offer-card.primary, .flow-map-panel, .result-panel, .final, .step .step-number { background: var(--bg-lift); border-color: var(--clay-line); color: var(--text); }
.card.dark h3, .output-card.featured h3, .offer-card.primary h3 { color: var(--text); }
.card.dark p, .card.dark li, .output-card.featured p, .offer-card.primary p { color: var(--text-muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; }

/* ============ hero (transparent over canvas + clay glow) ============ */
.hero { background: transparent; color: var(--text); min-height: calc(100vh - 92px); display: flex; align-items: center; overflow: hidden; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 72% 22%, rgba(224,135,102,.10), transparent 30%); pointer-events: none; }
.hero-inner { position: relative; width: min(1180px,100%); margin: 0 auto; padding: 74px 28px 62px; display: grid; grid-template-columns: minmax(0,.88fr) minmax(360px,.68fr); gap: 56px; align-items: center; }
.hero h1 { color: var(--text); max-width: 760px; }
.hero .eyebrow { color: var(--clay); margin-bottom: 18px; }
.hero-copy { font-size: clamp(18px,2vw,22px); color: var(--text-muted); margin: 24px 0 28px; max-width: 720px; }
.hero-actions, .section-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 16px; color: var(--text-faint); font-size: 14px; }
.dashboard-wire { border: var(--hairline-clay); border-radius: 30px; padding: 15px; background: rgba(255,255,255,.04); }
.dashboard { background: var(--bg-lift); color: var(--text); border-radius: 20px; padding: 18px; }
.dash-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid rgba(232,228,220,.1); margin-bottom: 14px; }
.dash-title { font-family: var(--sans); font-size: 13px; color: var(--text-faint); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--role-positive); box-shadow: 0 0 0 6px rgba(159,176,102,.16); }
.today-card { background: rgba(255,255,255,.03); border: 1px solid rgba(232,228,220,.08); border-radius: 18px; padding: 17px; margin-top: 12px; }
.customer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 14px; background: var(--clay-soft); border: 1px solid var(--clay-line); display: grid; place-items: center; font-family: var(--body); color: var(--text); }
.tag { font-family: var(--sans); font-size: 12px; border-radius: var(--radius-pill); padding: 4px 8px; background: var(--clay-soft); color: var(--clay); white-space: nowrap; }
.mini-label { margin-top: 10px; font-family: var(--sans); color: var(--text-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.message-draft { margin-top: 8px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); font-size: 14px; color: var(--text-muted); }
.flow-strip { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 12px; }
.flow-strip span { text-align: center; font-family: var(--sans); font-size: 12px; background: rgba(255,255,255,.05); border-radius: 9px; padding: 7px 4px; color: var(--text-muted); }

/* ============ problem scene ============ */
.problem-card h3 { margin: 8px 0 10px; }
.problem-card p { color: var(--text-muted); }

/* ============ reframe (before/after role tokens) ============ */
.after-before { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.compare-row { display: grid; grid-template-columns: 1fr 1fr; border: var(--hairline); border-radius: 14px; overflow: hidden; background: var(--bg-lift); }
.compare-cell { padding: 14px; min-height: 74px; }
.compare-cell.before { background: var(--role-negative-soft); border-right: var(--hairline); }
.compare-cell.after { background: var(--role-positive-soft); }
.compare-cell b { display: block; font-family: var(--sans); font-size: 12px; color: var(--text-faint); margin-bottom: 5px; }

/* ============ flow-map panel (panel-feature) ============ */
.flow-map-panel { border-radius: 32px; padding: 40px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.flow-map-panel h2 { color: var(--text); }
.flow-map-panel p { color: var(--text-muted); max-width: 780px; margin-top: 14px; }
.flow-line { margin-top: 30px; display: grid; grid-template-columns: repeat(9,minmax(88px,1fr)); gap: 10px; align-items: center; overflow-x: auto; padding-bottom: 8px; }
.flow-node { min-height: 92px; border: 1px dashed rgba(232,228,220,.28); background: rgba(255,255,255,.04); border-radius: 18px; display: grid; place-items: center; text-align: center; padding: 10px; position: relative; font-weight: 700; color: var(--text-muted); }
.flow-node.hot { background: var(--clay-soft); border: var(--hairline-clay); color: var(--clay); }
.flow-node:not(:last-child)::after { content: "→"; position: absolute; right: -15px; color: var(--text-faint); }
.map-notes { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 18px; }
.map-note { border: var(--hairline); border-radius: 14px; padding: 12px; color: var(--text-muted); font-size: 14px; }

/* ============ method ============ */
.method-layout { display: grid; grid-template-columns: minmax(0,.72fr) minmax(360px,.72fr); gap: 24px; align-items: start; }
.field-list { display: grid; gap: 12px; }
.field-card { display: grid; grid-template-columns: 120px 1fr; gap: 14px; padding: 14px; border: var(--hairline); border-radius: 14px; background: var(--bg-lift); }
.field-card b { font-family: var(--sans); font-size: 12px; color: var(--role-positive); }
.scatter-board { background: var(--bg-lift); border: var(--hairline); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.scatter-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(255,255,255,.03); border-radius: 13px; padding: 11px 12px; margin-bottom: 9px; color: var(--text-muted); }
.source { font-family: var(--sans); font-size: 12px; color: var(--text-faint); }
.transition { text-align: center; font-family: var(--sans); color: var(--clay); margin: 12px 0; }
.structured-card { border: 1px solid rgba(159,176,102,.32); background: var(--role-positive-soft); border-radius: 18px; padding: 15px; }
.structured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.structured-grid div { background: rgba(255,255,255,.04); border-radius: 12px; padding: 10px; font-size: 13px; color: var(--text-muted); }
.structured-grid b { display: block; font-family: var(--sans); color: var(--role-positive); font-size: 12px; margin-bottom: 3px; }

/* ============ outputs / process / proof ============ */
.output-card, .proof-card, .offer-card { min-height: 190px; display: flex; flex-direction: column; gap: 10px; }
.process-grid { display: grid; grid-template-columns: repeat(7,minmax(140px,1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.step { min-height: 198px; position: relative; }
.step-number { width: 30px; height: 30px; border-radius: 10px; background: var(--clay); color: #1A1410; display: grid; place-items: center; font-family: var(--sans); font-size: 12px; margin-bottom: 16px; }
.proof-card { border-left: 4px solid var(--clay); }
.range-note { margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--clay-soft); border-left: 3px solid var(--clay); color: var(--text-muted); }

/* ============ pricing / offer ladder ============ */
.offer-ladder { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.price { font-family: var(--body); font-size: 30px; line-height: 1.1; color: var(--clay); }
.offer-meta { display: grid; gap: 8px; margin-top: auto; }
.offer-meta span { display: block; font-size: 14px; color: var(--text-muted); }

/* ============ FAQ ============ */
details { background: var(--bg-lift); border: var(--hairline); border-radius: 16px; padding: 18px 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 700; color: var(--text); }
details p { margin-top: 10px; color: var(--text-muted); }

/* ============ final CTA ============ */
.final { text-align: center; border-radius: 0; }
.final h2 { color: var(--text); max-width: 820px; margin: 0 auto 18px; }
.final p { color: var(--text-muted); max-width: 760px; margin: 0 auto 26px; }

/* ============ footer ============ */
.footer { padding: 42px 28px 92px; background: var(--bg-deep); color: var(--text-muted); border-top: var(--hairline-clay); }
.footer-grid { width: min(1180px,100%); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--clay-line); }

/* ============ modals + forms (dark legibility) ============ */
.modal-backdrop { position: fixed; inset: 0; z-index: var(--grid-index); background: rgba(15,14,12,.66); backdrop-filter: blur(10px); display: none; align-items: flex-start; justify-content: center; padding: 18px; overflow: auto; }
.modal-backdrop.open { display: flex; }
.modal { width: min(820px,100%); max-height: calc(100vh - 36px); margin: auto 0; overflow: auto; background: var(--bg-lift); color: var(--text); border-radius: 28px; border: var(--hairline-clay); }
.modal-head { position: sticky; top: 0; background: rgba(15,14,12,.94); backdrop-filter: blur(16px); display: flex; justify-content: space-between; align-items: start; gap: 18px; padding: 18px 22px; border-bottom: var(--hairline); z-index: 1; }
.modal-head h2 { font-size: 30px; color: var(--text); }
.close { width: 42px; height: 42px; border-radius: 50%; border: var(--hairline); background: rgba(255,255,255,.04); color: var(--text); font-size: 24px; line-height: 1; }
.diag-form { padding: 20px 22px 24px; display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
label, .legend { font-weight: 700; color: var(--text); font-size: 14px; }
input, textarea, select { width: 100%; border: 1px solid rgba(232,228,220,.18); border-radius: 14px; min-height: 42px; background: rgba(255,255,255,.04); padding: 10px 12px; color: var(--text); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(224,135,102,.35); }
input::placeholder, textarea::placeholder { color: var(--text-faint); }
textarea { min-height: 80px; resize: vertical; }
.choice-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.choice { display: flex; align-items: center; gap: 9px; background: rgba(255,255,255,.03); border: var(--hairline); border-radius: 14px; padding: 9px 11px; color: var(--text-muted); }
.choice input { width: 18px; min-height: 18px; accent-color: var(--clay); }
.form-note { background: var(--role-positive-soft); border-left: 3px solid var(--role-positive); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--text-muted); }

/* self-diagnosis result */
.result-panel { display: none; margin: 0 22px 24px; border-radius: 22px; padding: 20px; }
.result-panel.open { display: block; }
.result-panel h3 { color: var(--text); margin: 8px 0 10px; }
.result-panel p, .result-panel li { color: var(--text-muted); }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.result-card { background: rgba(255,255,255,.04); border: 1px solid rgba(232,228,220,.16); border-radius: 14px; padding: 13px; color: var(--text-muted); }
.result-card strong { color: var(--text); }
.result-score { font-family: var(--body); font-size: 44px; line-height: 1; color: var(--clay); }

/* ============ sticky mobile CTA ============ */
.sticky-mobile-cta { display: none; position: fixed; z-index: 45; left: 12px; right: 12px; bottom: 12px; gap: 8px; }

/* ============ responsive (wireframe breakpoints preserved) ============ */
@media (max-width:1080px) {
  .hero-inner, .section-head, .method-layout, .sticky-wrap { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-3, .offer-ladder { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero { min-height: auto; }
  .hero-inner { padding-top: 54px; }
  .map-notes { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(4,minmax(180px,1fr)); }
  .sticky-section__media { position: static; height: auto; }   /* collapse sticky pin */
}
/* ============ A2 unified card system: 2-step radius/padding tokens ============
   Consolidates previously mixed values (radius 13–32px, padding 11–40px) into
   panel-level (radius 20 / pad 28) and row-level (radius 14 / pad 16).
   panel-feature highlight (clay border + lift) on one card per section is preserved. */

/* panel-level cards */
.card, .flow-map-panel, .scatter-board, .dashboard { border-radius: var(--radius-panel); padding: var(--pad-panel); }
/* row-level cards */
.today-card, .field-card, .map-note, .structured-card, .details, .message-draft, .range-note, .result-card, .choice { border-radius: var(--radius-row); padding: var(--pad-row); }
.compare-row { border-radius: var(--radius-row); }
.compare-cell { padding: var(--pad-row); }
/* tight chips: unify radius only, keep compact padding */
.scatter-row, .flow-node { border-radius: var(--radius-row); }

@media (max-width:680px) {
  .nav { padding: 14px 18px; }
  .nav-cta { display: none; }
  .nav-toggle__label { display: none !important; }
  .section { padding: 96px 18px; }
  .hero-inner { padding: 42px 18px 86px; gap: 28px; }
  .hero-actions .btn, .section-actions .btn { width: 100%; }
  .dashboard-wire { padding: 8px; border-radius: 22px; }
  .dashboard { padding: 14px; border-radius: 17px; }
  .grid-2, .grid-3, .grid-4, .offer-ladder, .structured-grid, .form-grid, .choice-grid { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-cell.before { border-right: 0; border-bottom: var(--hairline); }
  .flow-line { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .flow-node { min-height: 62px; }
  .flow-node:not(:last-child)::after { content: "↓"; right: auto; bottom: -20px; left: 50%; transform: translateX(-50%); }
  .method-layout { gap: 18px; }
  .field-card { grid-template-columns: 1fr; gap: 5px; }
  .process-grid { grid-template-columns: 1fr; overflow: visible; }
  .step { min-height: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .sticky-mobile-cta { display: grid; grid-template-columns: 1fr 1fr; transform: translateY(130%); opacity: 0; pointer-events: none; transition: transform .18s ease, opacity .18s ease; }
  body.show-mobile-cta .sticky-mobile-cta { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .sticky-mobile-cta .btn { min-height: 48px; padding: 10px; font-size: 12px; }
  .result-grid { grid-template-columns: 1fr; }
}

/* ============ 3D glass card system + living scroll (spec: card-redesign / living-scroll) ============ */
/* depth on card-like surfaces: inset top highlight + soft elevation (flat premium -> subtle 3D) */
.card, .flow-map-panel, .scatter-board, .dashboard, .today-card, .field-card, .map-note,
.structured-card, .details, .result-card, .output-card, .proof-card, .offer-card, .choice {
  position: relative;
  transform: translateZ(0);
  transition: transform .5s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
  box-shadow: inset 0 1px 0 rgba(232,228,220,.06), 0 2px 10px -6px rgba(0,0,0,.7);
}
/* glass sheen + clay edge on the primary card surface */
.card {
  background-image: linear-gradient(135deg, rgba(232,228,220,.06), rgba(232,228,220,0) 42%);
}
/* hover: lift + pointer tilt (vars set by JS) + clay glow */
.card:hover, .flow-map-panel:hover, .scatter-board:hover, .today-card:hover,
.field-card:hover, .offer-card:hover, .output-card:hover, .proof-card:hover {
  transform: translateY(-5px) perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: var(--clay-line);
  box-shadow: inset 0 1px 0 rgba(232,228,220,.12), 0 22px 48px -20px rgba(0,0,0,.85), 0 0 0 1px var(--clay-line);
  z-index: 2;
}

/* scroll progress bar (clay) — fixed top, grows with scrollY */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: var(--grid-index);
  background: transparent; pointer-events: none; transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .12s linear;
}
.scroll-progress__bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--clay-deep), var(--clay)); }

/* section dots — right rail, marks position in the customer-flow story */
.scroll-dots {
  position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: var(--transition-index);
  display: flex; flex-direction: column; gap: 12px; pointer-events: none;
}
.scroll-dots__dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(232,228,220,.22); transition: background .3s var(--ease), transform .3s var(--ease); }
.scroll-dots__dot.is-active { background: var(--clay); transform: scale(1.5); }

/* parallax layers (data-depth) — translate at a fraction of scroll for depth */
[data-depth] { will-change: transform; transition: transform .25s ease-out; }

@media (hover: none) {
  .card:hover, .flow-map-panel:hover, .scatter-board:hover, .today-card:hover,
  .field-card:hover, .offer-card:hover { transform: none; }
}
@media (max-width: 760px) {
  .scroll-dots { display: none; }   /* right rail only on wide screens */
}
@media (prefers-reduced-motion: reduce) {
  .card, .flow-map-panel, .scatter-board, .today-card { transition: none; }
  .card:hover, .flow-map-panel:hover, .scatter-board:hover { transform: none; }
  [data-depth] { transition: none; }
  .scroll-progress { transition: none; }
}
