/* Spatially — marketing site
   Layout: the plan on the left becomes the space on the right. Copy lives in
   a narrow left column; the stage bleeds off the right edge and stays put
   while the apartment travels from sketch to walkthrough. */

@font-face { font-family: "Outfit"; src: url("../assets/fonts/Outfit-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/InstrumentSans-Variable.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/InstrumentSans-Variable-Italic.woff2") format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../assets/fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../assets/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/IBMPlexMono-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* Five materials: paper, graphite, stone/plaster, oak, sky. Night is a scene. */
  --paper: #f5f0ea;
  --paper-raised: #fbf9f5;
  --paper-sunken: #ece9e4;
  --stone: #e3dfd6;
  --line: #ddd7cd;
  --line-strong: #86817a;
  --guide: #b9b2a6;
  --ink: #1b2327;
  --ink-muted: #5a6166;
  --ink-subtle: #7d8186;
  --primary: #1b2327;
  --primary-hover: #2c363b;
  --on-primary: #f5f0ea;
  --oak: #bea17f;
  --oak-text: #7a5a36;
  --oak-soft: #efe6da;
  --on-oak: #1b2327;
  --sky: #709fcc;
  --sky-text: #2d5d8c;
  --sky-soft: #e3ecf5;
  --night: #0b1820;
  --night-raised: #13232d;
  --on-night: #f2eee5;
  --on-night-muted: #a7aeb1;
  --night-line: #2a3d49;
  --focus: #2d5d8c;

  --font-display: "Outfit", "Avenir Next", "Century Gothic", system-ui, sans-serif;
  --font-sans: "Instrument Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --nav-h: 64px;
  --gutter: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  --container: 1280px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --shadow-md: 0 2px 4px #1b23270a, 0 12px 32px -6px #1b23271f;
  --focus-ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--focus);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--paper); }
img { max-width: 100%; display: block; }
::selection { background: var(--oak-soft); color: var(--ink); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
input { accent-color: var(--ink); caret-color: var(--oak-text); }
html { scrollbar-color: var(--guide) var(--paper); }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; text-wrap: balance; color: var(--ink); }
p { margin: 0; text-wrap: pretty; }
em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--oak-text); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--ink); color: var(--on-primary); padding: 8px 14px; border-radius: var(--radius-sm); text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: var(--radius-sm);
  font: 500 15px/1 var(--font-sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .18s, color .18s, border-color .18s, transform .18s var(--ease-out);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; transition: transform .25s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--paper-raised); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--stone); }
.btn-ghost { background: transparent; color: var(--ink); text-decoration: underline; text-decoration-color: var(--guide); text-underline-offset: 6px; padding: 0 8px; }
.btn-ghost:hover { text-decoration-color: var(--ink); }
.btn-onink { background: var(--on-night); color: var(--ink); }
.btn-onink:hover { background: #ffffff; }
.btn-onink:focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px #8db5de; }

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 32px; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; transition: transform .5s var(--ease-out); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.brand-word { width: auto; height: 22px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 15px; color: var(--ink-muted); text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }

/* ---------------- story ---------------- */
.story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 41fr) minmax(0, 59fr);
}
.stage {
  grid-column: 2; grid-row: 1;
  position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  height: calc(100svh - var(--nav-h) - env(safe-area-inset-top, 0px));
  z-index: 4;
  align-self: start;
  transition: background-color 1.2s ease;
  background: var(--paper);
}
.stage.is-evening { background: var(--night); }
.stage-inner { position: absolute; inset: 0; }
.plan, .scene { position: absolute; inset: 56px 0 44px 0; width: 100%; height: calc(100% - 100px); display: block; }
.plan { z-index: 1; overflow: visible; }
.scene { z-index: 2; opacity: 0; pointer-events: none; touch-action: pan-y; }
.scene.is-live { pointer-events: auto; cursor: grab; }
.scene.is-live:active { cursor: grabbing; }
.stage.is-walk .scene.is-live { cursor: crosshair; }

.chapters { grid-column: 1; grid-row: 1; position: relative; z-index: 3; }
.chapter {
  min-height: calc(100svh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  padding: 48px 32px 48px max(var(--gutter), calc((100vw - var(--container)) / 2 + 24px));
  max-width: 600px;
  box-sizing: content-box;
}
.chapter > * { max-width: 34rem; }
.chapter h2 { font-size: clamp(2rem, 3.1vw, 3rem); line-height: 1.04; letter-spacing: -0.028em; }
.chapter > p { font-size: 18px; line-height: 1.6; color: var(--ink-muted); }
.chapter > .price-note { font-size: 15px; }
.chapter > .try { font: italic 400 22px/1.3 var(--font-serif); color: var(--oak-text); }
.chapter-hero { gap: 26px; }
.chapter-hero h1 { font-size: clamp(2.6rem, 4.7vw, 4.6rem); line-height: 1.0; letter-spacing: -0.038em; }
.chapter-hero h1 em { letter-spacing: -0.02em; font-size: 1.06em; line-height: .9; }
.lead { font-size: 20px; line-height: 1.55; color: var(--ink-muted); }
.chapter-hero > .lead { font-size: clamp(18px, 1.5vw, 21px); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.price-note { font-size: 15px; color: var(--ink-muted); }
.price-note strong { font: 500 15px/1 var(--font-mono); color: var(--ink); letter-spacing: 0; }
.chapter > .scroll-cue { display: flex; align-items: center; gap: 12px; font: 500 12px/16px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); margin-top: 12px; }
.scroll-cue span { width: 1px; height: 36px; background: var(--guide); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 2.4s var(--ease-out) infinite; }
@keyframes cue { to { top: 100%; } }

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; margin: 4px 0 0; border-top: 1px solid var(--line); }
.spec div { padding: 12px 16px 0 0; }
.spec dt { font: 500 11px/14px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-subtle); }
.spec dd { margin: 6px 0 0; font: 500 14px/20px var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.try-touch { display: none; }
@media (hover: none) { .try-desktop { display: none; } .try-touch { display: inline; } }

/* rail */
.rail {
  position: absolute; z-index: 5; top: 16px; left: 24px; right: 24px;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.rail li { position: relative; }
.rail button {
  all: unset; cursor: pointer; display: block; width: 100%;
  padding: 12px 4px 0 0;
  font: 500 11px/14px var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-subtle); transition: color .3s;
}
.rail button span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail button:hover, .rail li.is-active button { color: var(--ink); }
.rail li.is-active button { color: var(--ink); }
.rail button:focus-visible { box-shadow: var(--focus-ring); }
.rail-track { position: absolute !important; left: 0; right: 0; top: 0; height: 1px; background: var(--line); grid-column: 1 / -1; }
.rail-track i { position: absolute; left: 0; top: -0.5px; height: 2px; width: 0; background: var(--oak); }
.stage.is-evening .rail button { color: var(--on-night-muted); }
.stage.is-evening .rail li.is-active button, .stage.is-evening .rail button:hover { color: var(--on-night); }
.stage.is-evening .rail-track { background: var(--night-line); }

.stage-caption {
  position: absolute; z-index: 5; left: 24px; bottom: 16px;
  font: 500 11px/14px var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); transition: color .6s;
}
.stage.is-evening .stage-caption { color: var(--on-night-muted); }

.stage-controls {
  position: absolute; z-index: 6; right: 20px; bottom: 12px; left: auto;
  display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px;
  max-width: calc(100% - 40px);
  animation: rise .6s var(--ease-out);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.seg, .rooms {
  display: inline-flex; padding: 3px; gap: 2px;
  background: color-mix(in srgb, var(--paper-raised) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-md);
}
.seg button, .rooms button, .tour-toggle {
  all: unset; cursor: pointer; box-sizing: border-box;
  height: 32px; padding: 0 12px; border-radius: 4px;
  font: 500 13px/32px var(--font-sans); color: var(--ink-muted); white-space: nowrap;
  transition: background-color .18s, color .18s;
}
.seg button:hover, .rooms button:hover { color: var(--ink); background: var(--stone); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-primary); }
.seg button:focus-visible, .rooms button:focus-visible, .tour-toggle:focus-visible { box-shadow: var(--focus-ring); }
.tour-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow-md); color: var(--ink);
}
.tour-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tour-toggle:hover { background: var(--stone); }

.stage-hint {
  position: absolute; z-index: 5; left: 50%; top: 64px; transform: translateX(-50%);
  font: 500 11px/14px var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); background: color-mix(in srgb, var(--paper-raised) 88%, transparent);
  padding: 8px 12px; border-radius: 4px; border: 1px solid var(--line); white-space: nowrap;
  transition: opacity .4s;
}
.stage.is-evening .stage-hint { color: var(--on-night-muted); background: color-mix(in srgb, var(--night-raised) 88%, transparent); border-color: var(--night-line); }

/* full-screen tour */
.stage.is-tour { position: fixed !important; inset: 0 !important; width: auto !important; height: auto !important; align-self: stretch; justify-self: stretch; z-index: 80; border: 0; box-shadow: none; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.stage.is-tour .stage-inner { inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.stage.is-tour .plan { display: none; }
.stage.is-tour .scene { inset: 0; height: 100%; touch-action: none; }
.stage.is-tour .rail, .stage.is-tour .stage-caption { display: none; }
.stage.is-tour .stage-controls { bottom: max(16px, env(safe-area-inset-bottom, 0px)); right: 16px; left: 16px; max-width: none; justify-content: center; }
.stage.is-tour .stage-hint { top: 20px; }
body.is-touring { overflow: hidden; }

/* ---------------- bands ---------------- */
.band { padding-block: clamp(80px, 10vw, 140px); }
.band h2 { font-size: clamp(2.1rem, 3.8vw, 3.5rem); line-height: 1.04; letter-spacing: -0.03em; }

/* delivery */
.delivery { border-top: 1px solid var(--line); }
.delivery-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.delivery-copy { display: flex; flex-direction: column; gap: 24px; }
.delivery-copy .lead { max-width: 34rem; }
.ways { list-style: none; margin: 16px 0 0; padding: 0; counter-reset: way; }
.ways li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 0; padding: 22px 0; border-top: 1px solid var(--line); counter-increment: way; }
.ways li::before { content: counter(way); grid-row: span 2; font: 500 30px/1 var(--font-display); color: var(--oak); letter-spacing: -0.02em; }
.ways h3 { font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.ways p { color: var(--ink-muted); max-width: 32rem; }

.package { margin: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--nav-h) + 40px); }
.package-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.package-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font: 500 14px/20px var(--font-mono); }
.package-head svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.5; flex: none; }
.package-head span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.package-head .size { margin-left: auto; color: var(--ink-muted); font-weight: 400; }
.tree { list-style: none; margin: 0; padding: 10px 20px 14px; }
.tree li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0 9px 22px; position: relative; border-bottom: 1px dashed var(--line); font-size: 14px; color: var(--ink-muted); }
.tree li:last-child { border-bottom: 0; }
.tree li::before { content: ""; position: absolute; left: 4px; top: 0; bottom: 50%; width: 10px; border-left: 1px solid var(--guide); border-bottom: 1px solid var(--guide); }
.tree .file { font: 500 14px/20px var(--font-mono); color: var(--ink); }
.tree li span:last-child { text-align: right; }
.code { margin: 0; overflow-x: auto; background: var(--night); color: var(--on-night); border-radius: var(--radius-md); padding: 20px 22px; font: 400 13px/22px var(--font-mono); }
.code .t { color: #8db5de; } .code .a { color: #cdb08c; } .code .s { color: #f2eee5; }
.package figcaption { font-size: 13px; color: var(--ink-subtle); }

/* audience */
.audience { background: var(--paper-sunken); }
.audience h2 { max-width: 20ch; }
.audience-list { list-style: none; margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; }
.audience-list li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 48px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--line-strong); }
.audience-list li:last-child { border-bottom: 1px solid var(--line-strong); }
.audience-list h3 { font-size: clamp(1.6rem, 2.6vw, 2.4rem); letter-spacing: -0.025em; line-height: 1.1; }
.audience-list p { font-size: 18px; color: var(--ink-muted); max-width: 36rem; }

/* pricing */
.pricing-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; }
.pricing-head h2 { max-width: 14ch; }
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 5vw, 64px); align-items: stretch; }
.tier {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px 28px 28px;
}
.tier h3 { font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.tier-what { font: 500 13px/18px var(--font-mono); letter-spacing: .02em; color: var(--ink-muted); }
.tier-price { font: 500 64px/1 var(--font-display); letter-spacing: -0.04em; margin-top: 14px; font-variant-numeric: tabular-nums; display: flex; align-items: flex-start; gap: 2px; flex-wrap: wrap; }
.tier-price .cur { font-size: 28px; margin-top: 7px; letter-spacing: 0; }
.tier-price .cents { font-size: 28px; margin-top: 7px; letter-spacing: -0.02em; }
.tier-price s { font: 400 16px/1 var(--font-mono); color: var(--ink-subtle); margin: 14px 0 0 12px; letter-spacing: 0; align-self: flex-start; }
.tier-unit { font-size: 15px; color: var(--ink-muted); min-height: 24px; }
.tier-list { list-style: none; margin: 10px 0 18px; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tier-list li { position: relative; padding-left: 26px; font-size: 15px; line-height: 22px; }
.tier-list li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 11px; height: 6px; border-left: 1.5px solid var(--sky-text); border-bottom: 1.5px solid var(--sky-text); transform: rotate(-45deg); }
.tier-list strong { font-weight: 600; }
.badge { position: absolute; top: -12px; left: 28px; font: 500 12px/24px var(--font-sans); padding: 0 10px; border-radius: 4px; letter-spacing: .01em; }
.badge-oak { background: var(--oak); color: var(--on-oak); }
.badge-on-ink { background: var(--oak); color: var(--on-oak); }
.tier-mid { border-color: var(--line-strong); }
.tier-best { background: var(--ink); border-color: var(--ink); color: var(--on-night); box-shadow: 0 4px 8px #1b23270d, 0 32px 64px -12px #1b232740; }
.tier-best h3, .tier-best .tier-price { color: var(--on-night); }
.tier-best .tier-what, .tier-best .tier-unit { color: var(--on-night-muted); }
.tier-best .tier-price s { color: #8a9296; }
.tier-best .tier-list { border-top-color: var(--night-line); }
.tier-best .tier-list li::before { border-color: #8db5de; }

.stack { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.stack h3 { font-size: 22px; line-height: 28px; }
.stack-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.stack-list li { position: relative; padding-left: 28px; color: var(--ink-muted); font-size: 16px; line-height: 1.5; }
.stack-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 1px; background: var(--oak); }
.stack-list b { color: var(--ink); font-weight: 600; }

.pricing-foot { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.calc, .guarantee { border-radius: var(--radius-lg); padding: 28px; }
.calc { background: var(--paper-sunken); display: flex; flex-direction: column; gap: 18px; }
.calc h3 { font-size: 22px; line-height: 28px; letter-spacing: -0.01em; }
.calc-row { display: flex; align-items: center; gap: 20px; }
.calc-row input { flex: 1; min-width: 0; height: 28px; }
.calc-row output { font: 500 40px/1 var(--font-display); letter-spacing: -0.03em; min-width: 2.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.calc-result { font-size: 16px; color: var(--ink-muted); min-height: 3.2em; }
.calc-result b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-result .save { color: var(--oak-text); font-weight: 600; }
input[type="range"] { -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(var(--ink), var(--ink)) 0 / var(--fill, 25%) 100% no-repeat, var(--line-strong); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 2px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border-radius: 50%; background: var(--paper-raised); border: 1.5px solid var(--ink); box-shadow: 0 1px 3px #1b232726; }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--paper-raised); border: 1.5px solid var(--ink); }
input[type="range"]:focus-visible { box-shadow: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: var(--focus-ring); }

.guarantee { border: 1px solid var(--oak); background: var(--oak-soft); display: flex; gap: 20px; align-items: flex-start; }
.guarantee svg { width: 48px; height: 48px; flex: none; fill: none; stroke: var(--oak-text); stroke-width: 1.5; stroke-linecap: square; }
.guarantee h3 { font-size: 22px; line-height: 28px; letter-spacing: -0.01em; margin-bottom: 8px; }
.guarantee p { color: var(--ink-muted); }

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 40px 64px; }
.faq h2 { max-width: 12ch; }
.faq-list { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; align-items: center;
  padding: 22px 0; font: 500 20px/1.3 var(--font-display); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq details p { padding: 0 48px 24px 0; color: var(--ink-muted); max-width: 40rem; }

/* closing + interactive mark */
.closing { border-top: 1px solid var(--line); padding-bottom: clamp(64px, 8vw, 112px); }
.closing-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 48px; align-items: center; }
.closing-copy { display: flex; flex-direction: column; gap: 24px; }
.closing h2 { font-size: clamp(2.6rem, 5vw, 4.75rem); line-height: 1; letter-spacing: -0.038em; }
.closing h2 em { font-size: 1.06em; }
.mark-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mark { all: unset; display: block; width: 100%; max-width: 760px; cursor: none; touch-action: pan-y; position: relative; border-radius: var(--radius-lg); }
.mark:focus-visible { box-shadow: var(--focus-ring); }
.mark-tilt { display: block; position: relative; aspect-ratio: 1400 / 1013; transform-style: preserve-3d; transition: transform .2s linear; will-change: transform; }
.mark-render, .mark-xray { position: absolute; inset: 0; width: 100%; height: 100%; }
.mark-render {
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 78%, transparent 100%);
}
.mark-xray {
  --x: 50%; --y: 50%; --r: 0px;
  background: var(--night);
  -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), #000 calc(var(--r) - 1px), transparent var(--r));
  mask-image: radial-gradient(circle at var(--x) var(--y), #000 calc(var(--r) - 1px), transparent var(--r));
}
.mark-xray img { width: 100%; height: 100%; }
.lens-ring {
  position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none;
  border-radius: 50%; border: 1.5px solid var(--sky); box-shadow: 0 0 0 6px #709fcc1f;
  transform: translate(-50%, -50%);
}
.lens-ring::before, .lens-ring::after { content: ""; position: absolute; background: var(--sky); }
.lens-ring::before { left: 50%; top: -10px; width: 1px; height: 8px; }
.lens-ring::after { top: 50%; left: -10px; height: 1px; width: 8px; }
.lens-ring span { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); font: 500 11px/14px var(--font-mono); letter-spacing: .08em; color: var(--sky-text); background: var(--paper); padding: 2px 4px; }
.mark.is-full .lens-ring { opacity: 0; }
.mark-lockup { width: min(380px, 70%); height: auto; opacity: .92; }

/* footer */
.footer { background: var(--paper-sunken); border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 40px; font-size: 14px; color: var(--ink-muted); }
.footer-inner img { height: 22px; width: auto; }
.footer nav { display: flex; gap: 24px; margin-left: auto; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.footer .copy { font: 400 13px/20px var(--font-mono); }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .nav-links { gap: 20px; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .tier-best { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  :root { --nav-h: 56px; --gutter: max(20px, env(safe-area-inset-left, 0px)); --gutter-r: max(20px, env(safe-area-inset-right, 0px)); }
  body { font-size: 16px; }
  .nav-links { display: none; }
  .story { display: flex; flex-direction: column; }
  .chapters { display: contents; }
  .chapter-hero { order: -1; }
  .stage { order: 0; width: 100%; height: 54svh; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); border-bottom: 1px solid var(--line); box-shadow: 0 10px 18px -14px #1b232733; }
  .chapter:not(.chapter-hero) { order: 1; }
  .plan, .scene { inset: 44px 0 34px 0; height: calc(100% - 78px); }
  .rail { left: 16px; right: 16px; top: 8px; }
  .rail button { font-size: 9.5px; letter-spacing: .04em; padding-top: 10px; }
  .stage-caption { left: 16px; bottom: 10px; font-size: 10px; }
  .stage-controls { right: 12px; bottom: 8px; }
  .stage:not(.is-tour) .stage-controls .seg, .stage:not(.is-tour) .stage-controls .rooms { display: none; }
  .chapter { min-height: 58svh; padding: 28px var(--gutter-r) 40px var(--gutter); max-width: none; justify-content: flex-start; gap: 16px; box-sizing: border-box; }
  .chapter:last-child { min-height: 66svh; }
  .chapter h2 { font-size: 1.85rem; }
  .chapter > p { font-size: 16px; line-height: 1.55; }
  .chapter > .try { font-size: 19px; }
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec div { padding-top: 10px; }
  .chapter > * { max-width: 36rem; }
  .chapter-hero { min-height: auto; padding-top: 28px; padding-bottom: 28px; gap: 18px; }
  .chapter-hero h1 { font-size: clamp(2.1rem, 8.4vw, 3rem); }
  .chapter > .scroll-cue { display: none; }
  .delivery-grid, .pricing-head, .faq-grid, .closing-grid, .stack, .pricing-foot { grid-template-columns: minmax(0, 1fr); }
  .package { position: static; }
  .audience-list li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .closing-grid .mark-wrap { order: -1; }
  .mark { cursor: pointer; }
}
@media (max-width: 640px) {
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .stack-list { grid-template-columns: minmax(0, 1fr); }
  .tier-price { font-size: 56px; }
  .tree li span:last-child { display: none; }
  .btn-lg { height: 50px; padding: 0 20px; }
  .cta-row .btn-primary { flex: 1 1 auto; }
  .nav .btn-sm { padding: 0 12px; }
  .footer nav { margin-left: 0; }
  .guarantee { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
