/* ============================================================
   DeepByte · design system v5 "the foundry"
   Obsidian and molten gold. A dark machine-atelier: warm
   near-black surfaces, porcelain type, one gold accent that
   behaves like heated metal. Bricolage Grotesque / Schibsted
   Grotesk / Fragment Mono. Signature: the WebGL particle core.
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
img, svg, canvas, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
ul[class], ol[class] { list-style: none; padding: 0; }

/* ---------- Tokens ---------- */
:root {
  --void: #060607;
  --coal: #0d0d10;
  --iron: #141419;
  --iron-2: #1a1a21;
  --porcelain: #f3f1ea;
  --ash: #a09c90;
  --ash-deep: #6d695f;
  --line: rgba(243, 241, 234, 0.1);
  --line-strong: rgba(243, 241, 234, 0.22);
  --gold: #e8b64c;
  --gold-hot: #f6cd6f;
  --gold-deep: #c4923a;
  --ember: rgba(232, 150, 60, 0.16);
  --live: #34d17d;

  /* architect studio keeps its own machine room (do not re-skin) */
  --m-bg-2: #131826;
  --m-line: rgba(255, 255, 255, 0.09);
  --m-text: #e8ebf3;
  --m-muted: #97a0b5;
  --m-glow: rgba(74, 105, 255, 0.35);
  --cobalt: #2c4bff;
  --cobalt-deep: #1e37d1;
  --pulse: #2bd97b;
  --amber: #f5b83d;

  --display: "Bricolage Grotesque", "Avenir Next", "Helvetica Neue", sans-serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", "SFMono-Regular", Consolas, monospace;

  --sect: clamp(110px, 13vw, 200px);
  --hd-h: 74px;
  --r: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-padding-top: calc(var(--hd-h) + 18px); background: var(--void); }
html.glide { scroll-behavior: auto; }
html:not(.glide) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto !important; } }
html, body { overflow-x: clip; }

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.66;
  color: var(--porcelain);
  background: var(--void);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: #14100a; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 500;
  background: var(--gold); color: #14100a; padding: 10px 16px; border-radius: 999px;
  font-weight: 600; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(1400px, calc(100% - clamp(40px, 6vw, 120px))); margin-inline: auto; }

/* ---------- Type ---------- */
.tag {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--ash);
}
.tag i { font-style: normal; color: var(--gold); letter-spacing: 0; }

.display {
  font-family: var(--display); font-weight: 480;
  line-height: 0.97; letter-spacing: -0.025em;
  text-wrap: balance; color: var(--porcelain);
}
.display em { font-style: italic; font-weight: 430; color: var(--gold); letter-spacing: -0.015em; }
.h-hero { font-size: clamp(58px, 10.4vw, 178px); }
.h-lg { font-size: clamp(40px, 5.8vw, 92px); }
.h-md { font-size: clamp(28px, 3.4vw, 50px); }

.lede { font-size: clamp(16.5px, 1.5vw, 19px); color: var(--ash); max-width: 540px; text-wrap: pretty; }
.lede strong { color: var(--porcelain); font-weight: 560; }

/* masked line reveals (JS adds html.app; without JS everything is visible) */
.lmask { display: block; overflow: hidden; padding: 0.16em 0.08em 0.08em 0; margin: -0.16em -0.08em -0.08em 0; }
.lmask > span { display: block; }
html.app .lmask > span { transform: translateY(114%); }
html.app .lmask.in > span { transform: none; transition: transform 1.15s var(--ease); }
html.app [data-r]:not(.lmask) { opacity: 0; transform: translateY(26px); }
html.app [data-r].in:not(.lmask) { opacity: 1; transform: none; transition: opacity 0.9s ease, transform 1.05s var(--ease); }
html.app [data-r].d1.in { transition-delay: 0.08s; }
html.app [data-r].d2.in { transition-delay: 0.16s; }
html.app [data-r].d3.in { transition-delay: 0.24s; }

/* scroll parallax hook (composable translate) */
html.app [data-plx] { translate: 0 var(--plx, 0px); will-change: translate; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 32px; border-radius: 999px;
  background: var(--gold); color: #14100a;
  font-weight: 650; font-size: 15px; letter-spacing: 0.01em; line-height: 1;
  text-decoration: none; border: 1px solid var(--gold);
  transition: background 0.25s, border-color 0.25s, color 0.25s, translate 0.25s var(--ease), box-shadow 0.25s;
}
.btn:hover { background: var(--gold-hot); border-color: var(--gold-hot); translate: 0 -2px; box-shadow: 0 14px 40px -14px rgba(232, 182, 76, 0.55); }
.btn--ghost { background: transparent; color: var(--porcelain); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(243, 241, 234, 0.06); border-color: var(--porcelain); box-shadow: none; }
.btn--sm { padding: 12px 22px; font-size: 13.5px; }
.btn--primary { background: var(--gold); }

.tlink {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--porcelain); font-weight: 550; font-size: 15px; text-decoration: none;
  border-bottom: 1px solid var(--line-strong); padding-bottom: 3px;
  transition: border-color 0.25s, color 0.25s;
}
.tlink:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Preloader ---------- */
#pre {
  position: fixed; inset: 0; z-index: 400;
  background: var(--void);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: transform 0.9s cubic-bezier(0.76, 0, 0.24, 1);
}
#pre.lift { transform: translateY(-101%); }
html.ready #pre { display: none; }
.pre__brand { font-family: var(--display); font-weight: 520; font-size: clamp(34px, 5vw, 56px); letter-spacing: -0.03em; color: var(--porcelain); }
.pre__brand i { font-style: normal; color: var(--gold); }
.pre__hint { font-family: var(--mono); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ash-deep); }
.pre__bar { width: min(240px, 56vw); height: 1px; background: var(--line); position: relative; overflow: hidden; }
.pre__bar i { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(var(--p, 0)); }
.pre__num { font-family: var(--mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }

/* ---------- Header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--hd-h); display: flex; align-items: center;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.top.scrolled {
  background: rgba(6, 6, 7, 0.72);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.top__in { display: flex; align-items: center; gap: 28px; }
.wordmark {
  font-family: var(--display); font-weight: 560; font-size: 21px; letter-spacing: -0.02em;
  color: var(--porcelain); text-decoration: none;
}
.wordmark i { font-style: normal; color: var(--gold); }
.top__nav { display: flex; gap: 30px; margin-inline: auto; }
.top__nav a {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ash); text-decoration: none; transition: color 0.2s;
}
.top__nav a:hover { color: var(--porcelain); }
.top__cta { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.burger { display: none; width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger span { display: block; width: 20px; height: 1.5px; background: var(--porcelain); transition: transform 0.3s, opacity 0.3s; }

@media (max-width: 900px) {
  .top__nav {
    position: fixed; inset: var(--hd-h) 0 auto 0; margin: 0;
    flex-direction: column; gap: 0; padding: 10px 24px 26px;
    background: rgba(6, 6, 7, 0.96); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .top__nav.open { display: flex; }
  .top__nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .top__nav a:last-child { border-bottom: 0; }
  .burger { display: flex; }
  .top__nav.open ~ * .burger span:nth-child(2) { opacity: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--hd-h) + 40px) 0 40px;
  overflow: clip;
}
.hero__glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(46% 38% at 64% 44%, rgba(232, 150, 60, 0.14), transparent 70%),
    radial-gradient(30% 26% at 64% 44%, rgba(246, 205, 111, 0.1), transparent 72%);
}
#core { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.6s ease 0.15s; }
#core.on { opacity: 1; }
html.no3d #core { display: none; }
.hero__veil {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(58% 52% at 30% 58%, rgba(6, 6, 7, 0.62), transparent 68%),
    linear-gradient(to bottom, rgba(6, 6, 7, 0.55), transparent 22%, transparent 72%, var(--void) 100%);
}
.hero .wrap { position: relative; z-index: 3; }
.hero__eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(22px, 3.2vw, 40px); }
.hero__eyebrow .tag, .hero__title { text-shadow: 0 1px 18px rgba(6, 6, 7, 0.7); }
.hero__title { max-width: 12ch; }
.hero__foot {
  margin-top: clamp(28px, 4vw, 52px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap;
}
.hero__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero__proof {
  position: relative; z-index: 3;
  margin-top: clamp(40px, 6.5vh, 84px);
  padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; gap: clamp(18px, 3vw, 44px); flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash);
}
.hero__proof span { display: inline-flex; align-items: center; gap: 9px; }
.hero__proof span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }
.hero__cue {
  position: absolute; z-index: 3; right: clamp(20px, 4vw, 60px); bottom: 110px;
  width: 1px; height: 72px; background: var(--line-strong); overflow: hidden;
}
.hero__cue::after { content: ""; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--gold); animation: cue 2.4s var(--ease) infinite; }
@keyframes cue { 0% { top: -40%; } 60%, 100% { top: 110%; } }
@media (max-width: 720px) {
  .hero__cue { display: none; }
  .hero__title { max-width: none; }
  .hero__glow {
    background:
      radial-gradient(64% 30% at 50% 16%, rgba(232, 150, 60, 0.15), transparent 70%),
      radial-gradient(40% 20% at 50% 16%, rgba(246, 205, 111, 0.1), transparent 72%);
  }
  .hero__veil {
    background:
      radial-gradient(90% 46% at 50% 62%, rgba(6, 6, 7, 0.66), transparent 74%),
      linear-gradient(to bottom, rgba(6, 6, 7, 0.4), transparent 20%, transparent 70%, var(--void) 100%);
  }
}

/* ---------- Sections ---------- */
.sec { padding: calc(var(--sect) * 0.75) 0; position: relative; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: clamp(30px, 4.5vw, 60px); }
.sec__head .tag:last-child i { color: var(--ash-deep); }
.sec__title { margin-top: 18px; max-width: 1000px; }
.sec__intro { margin-top: 22px; }

/* ---------- The deck (capabilities) ---------- */
.deck { display: grid; gap: clamp(16px, 2.2vw, 26px); }
.slab {
  background: linear-gradient(160deg, var(--iron) 0%, var(--coal) 78%);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(26px, 3.6vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 64px); align-items: center;
  transform: scale(calc(1 - var(--cv, 0) * 0.05));
  filter: brightness(calc(1 - var(--cv, 0) * 0.42));
}
@media (min-width: 901px) {
  html.app .slab { position: sticky; top: calc(var(--hd-h) + 14px + var(--i, 0) * 12px); will-change: transform, filter; }
  .slab { min-height: min(560px, 72vh); }
}
.slab__tag { margin-bottom: 20px; }
.slab__name { font-size: clamp(30px, 3.6vw, 54px); margin-bottom: 16px; }
.slab__what { color: var(--ash); font-size: clamp(15.5px, 1.35vw, 17.5px); max-width: 46ch; }
.slab__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.slab__chips li {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ash); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px;
}
.slab__media { position: relative; }
.slab__media img {
  /* height:auto beats the img height attribute so aspect-ratio can rule the box */
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: calc(var(--r) - 8px);
  border: 1px solid var(--line-strong);
}
.slab__media::after {
  content: ""; position: absolute; inset: 0; border-radius: calc(var(--r) - 8px);
  background: linear-gradient(200deg, transparent 55%, rgba(6, 6, 7, 0.5));
  pointer-events: none;
}
.slab__media--app {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  border-radius: calc(var(--r) - 8px); border: 1px solid var(--line);
  background:
    radial-gradient(62% 56% at 50% 44%, var(--ember), transparent 76%),
    linear-gradient(200deg, var(--iron-2), var(--coal));
}
.slab__media--app::after { display: none; }
.slab__media--app img {
  width: min(46%, 250px); height: auto; aspect-ratio: 760 / 1644; object-fit: cover;
  max-height: 86%;
  border-radius: clamp(16px, 1.6vw, 26px);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.9);
}
@media (max-width: 900px) {
  .slab { grid-template-columns: 1fr; }
  .slab__media { order: -1; }
  /* short, wide plates on small screens instead of full squares */
  .slab__media img { aspect-ratio: 16 / 10; }
  .slab__media--app { aspect-ratio: 16 / 10; align-items: flex-start; overflow: clip; }
  .slab__media--app img {
    width: 46%; height: auto; max-height: none; aspect-ratio: 760 / 1644;
    margin-top: 7%; border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  }
}

/* ---------- Proof stages (cases) ---------- */
.stage {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 80px); align-items: center;
  padding: clamp(40px, 6vw, 90px) 0;
}
.stage + .stage { border-top: 1px solid var(--line); }
.stage--flip .stage__media { order: 2; }
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .stage--flip .stage__media { order: 0; }
}
.stage__media {
  position: relative; border-radius: var(--r);
  background:
    radial-gradient(70% 62% at 50% 42%, var(--ember), transparent 74%),
    linear-gradient(170deg, var(--iron) 0%, var(--coal) 82%);
  border: 1px solid var(--line);
  padding: clamp(26px, 3.5vw, 54px) clamp(16px, 2.5vw, 40px);
  overflow: clip;
}
.fan { position: relative; height: clamp(340px, 36vw, 520px); perspective: 1200px; }
.fan img {
  position: absolute; left: 50%; top: 50%;
  width: clamp(150px, 15.5vw, 224px); height: auto;
  border-radius: clamp(18px, 2vw, 28px);
  border: 1px solid var(--line-strong);
  box-shadow: 0 50px 90px -34px rgba(0, 0, 0, 0.85);
  will-change: transform;
}
.fan img:nth-child(1) {
  z-index: 1;
  transform: translate(-96%, -47%) rotate(calc(-8.5deg - var(--fan, 0) * 2.5deg)) translateZ(-60px);
}
.fan img:nth-child(2) { z-index: 3; transform: translate(-50%, -52%) translateZ(20px); }
.fan img:nth-child(3) {
  z-index: 2;
  transform: translate(-4%, -47%) rotate(calc(8.5deg + var(--fan, 0) * 2.5deg)) translateZ(-60px);
}
.stage__idx { margin-bottom: 20px; }
.stage__name { font-size: clamp(34px, 4.2vw, 64px); margin-bottom: 18px; }
.stage__desc { color: var(--ash); max-width: 50ch; }
.stage__facts { margin-top: 26px; border-top: 1px solid var(--line); }
.stage__facts li {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.stage__facts li span:first-child { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash-deep); padding-top: 3px; }
.stage__facts li span:last-child { color: var(--porcelain); }
.stage__actions { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.stage__quiet { margin-top: 26px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; color: var(--ash-deep); text-transform: uppercase; }

/* ---------- Live demo (console) ---------- */
.demo__grid {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(30px, 5vw, 90px); align-items: center;
}
@media (max-width: 980px) { .demo__grid { grid-template-columns: 1fr; } }
.demo__note { margin-top: 18px; font-size: 13.5px; color: var(--ash-deep); }
.demo__note a { color: var(--ash); }
.demo__note a:hover { color: var(--gold); }

.console {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: linear-gradient(170deg, var(--iron) 0%, var(--coal) 70%);
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.9);
}
.console__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash);
}
.console__mode { display: inline-flex; align-items: center; gap: 8px; }
.console__led { width: 6px; height: 6px; border-radius: 50%; background: var(--ash-deep); }
.console__mode.is-live .console__led { background: var(--live); box-shadow: 0 0 9px rgba(52, 209, 125, 0.8); animation: led 1.8s infinite; }
.console__mode.is-live { color: var(--live); }
.console__mode.is-demo .console__led { background: var(--gold); }
@keyframes led { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.console__screen {
  height: clamp(280px, 34vh, 360px); overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.c-line { white-space: pre-wrap; word-break: break-word; color: var(--ash); }
.c-line--user { color: var(--porcelain); }
.c-line--user::before { content: "you › "; color: var(--gold); }
.c-line--bot { color: #cdc9bd; }
.c-caret { display: inline-block; width: 8px; height: 15px; background: var(--gold); margin-left: 3px; vertical-align: -2px; animation: led 1s steps(2) infinite; }
.c-speaking { font-family: var(--mono); font-size: 11px; color: var(--live); letter-spacing: 0.12em; }
.console__suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 16px; }
.console__suggest button {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--ash); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px;
  transition: color 0.2s, border-color 0.2s;
}
.console__suggest button:hover { color: var(--porcelain); border-color: var(--line-strong); }
.console__input { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 8px 8px 8px 20px; }
.console__caret { font-family: var(--mono); color: var(--gold); }
.console__input input {
  flex: 1; background: none; border: 0; outline: none; color: var(--porcelain);
  font-family: var(--mono); font-size: 13.5px; padding: 12px 0; min-width: 0;
}
.console__input input::placeholder { color: var(--ash-deep); }
.console__btn {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center;
  color: var(--ash); transition: color 0.2s, background 0.25s;
  flex: 0 0 auto;
}
.console__btn:hover { color: var(--porcelain); }
.console__btn--send { background: var(--gold); color: #14100a; }
.console__btn--send:hover { background: var(--gold-hot); color: #14100a; }
.console__btn--send:disabled { opacity: 0.45; }
.console__btn--voice[aria-pressed="true"] { color: var(--gold); }

/* ---------- Method ---------- */
.method__track { position: relative; height: 1px; background: var(--line); margin: clamp(34px, 5vw, 60px) 0 clamp(28px, 4vw, 48px); }
.method__fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold-hot)); transform-origin: left; transform: scaleX(var(--draw, 0)); }
html:not(.app) .method__fill { transform: none; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(22px, 3.5vw, 56px); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step__when { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.step h3 { font-family: var(--display); font-weight: 520; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -0.015em; margin: 14px 0 10px; }
.step p { color: var(--ash); font-size: 15.5px; max-width: 40ch; }

/* ---------- Terms / vault ---------- */
.vault { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.8vw, 24px); align-items: stretch; }
@media (max-width: 980px) { .vault { grid-template-columns: 1fr; max-width: 560px; } }
.vault__card {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, var(--iron) 0%, var(--coal) 80%);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(26px, 2.6vw, 38px);
  display: flex; flex-direction: column; gap: 6px;
}
.vault__card--rec { border-color: rgba(232, 182, 76, 0.55); background: linear-gradient(165deg, #17150e 0%, var(--coal) 80%); }
.vault__flag {
  position: absolute; top: 18px; right: 18px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #14100a; background: var(--gold); padding: 5px 10px; border-radius: 999px; font-weight: 600;
}
.vault__name { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ash); }
.vault__price { font-family: var(--display); font-weight: 500; font-size: clamp(38px, 3.6vw, 52px); letter-spacing: -0.02em; margin-top: 10px; }
.vault__price span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash-deep); display: block; margin-bottom: 6px; }
.vault__price small { font-size: 0.4em; font-weight: 450; color: var(--ash); letter-spacing: 0; }
.vault__for { color: var(--ash); font-size: 14.5px; margin-top: 6px; min-height: 3.2em; }
.vault__list { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 9px; flex: 1; }
.vault__list li { position: relative; padding-left: 22px; font-size: 14px; color: #cdc9bd; }
.vault__list li::before { content: "→"; position: absolute; left: 0; color: var(--gold); font-family: var(--mono); font-size: 12px; top: 2px; }
.vault__cta { margin-top: 24px; }
.vault__note { margin-top: 26px; font-size: 14px; color: var(--ash-deep); }
.vault__note a { color: var(--ash); }
.vault__note a:hover { color: var(--gold); }
.terms__lines { margin-bottom: clamp(36px, 5vw, 64px); display: grid; gap: 6px; }
.terms__line { font-family: var(--display); font-weight: 460; font-size: clamp(24px, 3.2vw, 46px); letter-spacing: -0.02em; line-height: 1.12; color: var(--porcelain); }
.terms__line em { font-style: italic; color: var(--gold); font-weight: 430; }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(28px, 4vw, 72px); }
@media (max-width: 860px) { .faq__grid { grid-template-columns: 1fr; } }
.acc { border-bottom: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 44px 22px 0; font-weight: 560; font-size: 16.5px; color: var(--porcelain);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%;
  font-family: var(--mono); font-size: 18px; color: var(--gold);
  transition: rotate 0.3s var(--ease);
}
.acc[open] summary::after { rotate: 45deg; }
.acc__body { padding: 0 0 22px; }
.acc__body p { color: var(--ash); font-size: 15px; max-width: 62ch; }

/* ---------- Contact ---------- */
.contact__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 5vw, 90px); align-items: center;
}
@media (max-width: 980px) { .contact__grid { grid-template-columns: 1fr; } }
.contact__mail { margin-top: 30px; }

.msgr {
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: linear-gradient(170deg, var(--iron) 0%, var(--coal) 70%);
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 0.9);
}
.msgr__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash);
}
.msgr__bar i { color: var(--live); font-style: normal; }
.msgr__screen { height: 230px; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.msgr__msg { max-width: 88%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.msgr__msg--us { background: rgba(243, 241, 234, 0.07); color: #d9d5ca; align-self: flex-start; border-bottom-left-radius: 4px; }
.msgr__msg--you { background: var(--gold); color: #14100a; align-self: flex-end; border-bottom-right-radius: 4px; }
.msgr__typing { color: var(--ash); letter-spacing: 2px; }
.msgr__id { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; padding: 0 18px 14px; }
.msgr__id.done { display: none; }
.msgr__id input {
  background: rgba(243, 241, 234, 0.04); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; color: var(--porcelain); outline: none; min-width: 0;
  transition: border-color 0.2s;
}
.msgr__id input:focus { border-color: var(--gold); }
.msgr__id input.bad { border-color: #f26d6d; }
.msgr__id input::placeholder { color: var(--ash-deep); }
.msgr__input { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 8px 8px 8px 18px; }
.msgr__input input { flex: 1; background: none; border: 0; outline: none; color: var(--porcelain); font-size: 14px; padding: 12px 0; min-width: 0; }
.msgr__input input::placeholder { color: var(--ash-deep); }
.msgr__send { width: 44px; height: 44px; border-radius: 999px; background: var(--gold); color: #14100a; display: grid; place-items: center; transition: background 0.2s; flex: 0 0 auto; }
.msgr__send:hover { background: var(--gold-hot); }
@media (max-width: 520px) { .msgr__id { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 90px) 0 34px; position: relative; overflow: clip; }
.footer__cta {
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  padding-bottom: clamp(40px, 5vw, 70px); margin-bottom: clamp(36px, 5vw, 60px);
  border-bottom: 1px solid var(--line);
}
.footer__cta h2 { max-width: 14ch; }
.footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 860px) { .footer__cols { grid-template-columns: 1fr 1fr; gap: 34px 20px; } }
.footer__col h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ash-deep); font-weight: 400; margin-bottom: 16px; }
.footer__col p { color: var(--ash); font-size: 14px; max-width: 34ch; }
.footer__col a { display: block; color: var(--ash); font-size: 14px; text-decoration: none; padding: 5px 0; transition: color 0.2s; }
.footer__col a:hover { color: var(--gold); }
.footer__bar {
  margin-top: clamp(40px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--ash-deep);
}

/* ---------- Architect FAB ---------- */
.arch-fab {
  position: fixed; right: clamp(16px, 2.5vw, 30px); bottom: clamp(16px, 2.5vw, 30px); z-index: 250;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: #14100a;
  font-weight: 650; font-size: 14px; padding: 15px 24px; border-radius: 999px;
  border: 1px solid var(--gold);
  box-shadow: 0 24px 60px -18px rgba(232, 182, 76, 0.5);
  opacity: 0; pointer-events: none; translate: 0 14px;
  transition: opacity 0.4s, translate 0.5s var(--ease), background 0.25s;
}
.arch-fab::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #14100a; animation: led 2.2s infinite; }
.arch-fab.show { opacity: 1; pointer-events: auto; translate: 0 0; }
.arch-fab.show:hover { background: var(--gold-hot); translate: 0 -3px; }
.arch-fab__sub { display: none; }
@media (max-width: 560px) { .arch-fab { padding: 12px 18px; font-size: 13px; } }

/* ============================================================
   Architect studio (working modal, its own machine room).
   Ported from v4 so architect.js keeps working untouched.
   ============================================================ */
.studio { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 18px; }
.studio[hidden] { display: none; }
.studio__scrim { position: absolute; inset: 0; background: rgba(4, 4, 5, 0.66); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); opacity: 0; transition: opacity 0.3s; }
.studio.is-open .studio__scrim { opacity: 1; }
.studio__panel {
  position: relative; width: min(1060px, 100%); max-height: min(760px, calc(100dvh - 36px));
  display: flex; flex-direction: column;
  background: var(--m-bg-2); color: var(--m-text);
  border: 1px solid var(--m-line); border-radius: 14px; overflow: hidden;
  box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.8);
  transform: translateY(18px) scale(0.98); opacity: 0;
  transition: transform 0.38s var(--ease), opacity 0.3s;
}
.studio.is-open .studio__panel { transform: none; opacity: 1; }
.studio__bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--m-line); flex: 0 0 auto; }
.studio__id { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 12px; color: var(--m-muted); letter-spacing: 0.06em; }
.studio__led { width: 8px; height: 8px; border-radius: 50%; background: var(--cobalt); box-shadow: 0 0 9px var(--m-glow); transition: background 0.3s; }
.studio.is-live .studio__led { background: var(--pulse); box-shadow: 0 0 9px rgba(43, 217, 123, 0.8); }
.studio__meta { margin-left: auto; }
.studio__state { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--m-muted); }
.studio[data-state="listening"] .studio__state { color: var(--pulse); }
.studio[data-state="thinking"] .studio__state { color: var(--amber); }
.studio[data-state="speaking"] .studio__state { color: #9db4ff; }
.studio__close { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; color: var(--m-muted); transition: color 0.2s, background 0.2s; }
.studio__close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.studio__body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); flex: 1; min-height: 0; }
@media (max-width: 860px) { .studio__body { grid-template-columns: 1fr; overflow-y: auto; } }
.studio__voice { display: flex; flex-direction: column; align-items: center; padding: 26px 24px 18px; border-right: 1px solid var(--m-line); min-height: 0; }
@media (max-width: 860px) { .studio__voice { border-right: 0; border-bottom: 1px solid var(--m-line); } }
.orb-wrap { position: relative; width: 168px; height: 168px; flex: 0 0 auto; }
.orb { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb-btn { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; color: rgba(255, 255, 255, 0.92); }
.orb-btn__stop { display: none; }
.studio[data-state="listening"] .orb-btn__mic { display: none; }
.studio[data-state="listening"] .orb-btn__stop { display: block; }
.studio__hint { margin-top: 16px; font-size: 14px; color: var(--m-muted); text-align: center; max-width: 300px; }
.studio__transcript { flex: 1; min-height: 80px; width: 100%; overflow-y: auto; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.t-msg { max-width: 92%; padding: 9px 13px; border-radius: 9px; font-size: 13.5px; line-height: 1.5; }
.t-msg--you { background: var(--cobalt); color: #fff; align-self: flex-end; }
.t-msg--ai { background: rgba(255, 255, 255, 0.06); color: var(--m-text); align-self: flex-start; }
.studio__type { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; border: 1px solid var(--m-line); border-radius: 9px; padding: 4px 4px 4px 14px; background: rgba(255, 255, 255, 0.03); }
.studio__type input { flex: 1; background: none; border: 0; outline: none; color: #fff; font-size: 14px; padding: 10px 0; min-width: 0; }
.studio__type input::placeholder { color: var(--m-muted); }
.studio__send { width: 40px; height: 40px; border-radius: 7px; background: var(--cobalt); color: #fff; display: grid; place-items: center; flex: 0 0 auto; }
.studio__send:hover { background: var(--cobalt-deep); }
.studio__plan { overflow-y: auto; padding: 26px 26px 30px; min-height: 0; scrollbar-width: thin; }
.plan-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--m-muted); }
.plan-empty__mark { color: rgba(255, 255, 255, 0.25); }
.plan-empty p { font-weight: 600; color: var(--m-text); }
.plan-empty span { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--m-muted); }
.plan-doc__eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--pulse); margin-bottom: 10px; }
.plan-doc h2, .plan-doc h3.plan-doc__title { font-weight: 650; font-size: 24px; color: #fff; line-height: 1.15; margin-bottom: 10px; font-family: var(--sans); }
.plan-doc__summary { color: var(--m-muted); font-size: 14.5px; margin-bottom: 18px; }
.plan-block { margin-bottom: 20px; }
.plan-block__label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--m-muted); margin-bottom: 10px; }
.plan-card { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--m-line); border-radius: 9px; padding: 13px 15px; margin-bottom: 9px; font-size: 14px; color: var(--m-text); }
.plan-card strong { color: #fff; }
.plan-card p, .plan-card span { color: var(--m-muted); font-size: 13px; }
.plan-phase { display: flex; gap: 13px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.08); font-size: 14px; }
.plan-phase:last-child { border-bottom: 0; }
.plan-phase__num { font-family: var(--mono); font-size: 11px; color: #9db4ff; flex: 0 0 auto; }
.plan-phase__body { color: var(--m-text); }
.plan-phase__body p, .plan-phase__body span { color: var(--m-muted); font-size: 13px; }
.plan-phase__dur { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--m-muted); white-space: nowrap; }
.plan-estimate { background: rgba(43, 217, 123, 0.06); border: 1px solid rgba(43, 217, 123, 0.22); border-radius: 9px; padding: 14px 16px; }
.plan-estimate__range { font-weight: 650; font-size: 22px; color: #fff; }
.plan-estimate__note { font-size: 12.5px; color: var(--m-muted); margin-top: 4px; }
.plan-prices { display: grid; gap: 10px; }
@media (min-width: 640px) { .plan-prices { grid-template-columns: repeat(3, 1fr); } }
.plan-price { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--m-line); border-radius: 9px; padding: 14px; position: relative; display: flex; flex-direction: column; gap: 5px; }
.plan-price--rec { border-color: rgba(43, 217, 123, 0.45); background: rgba(43, 217, 123, 0.05); }
.plan-price__flag { position: absolute; top: -9px; right: 10px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.12em; text-transform: uppercase; background: var(--pulse); color: #10141d; padding: 3px 8px; border-radius: 99px; font-weight: 600; }
.plan-price__name { font-weight: 650; color: #fff; font-size: 13.5px; }
.plan-price__for { font-size: 11.5px; color: var(--m-muted); }
.plan-price__top { margin-top: 2px; }
.plan-price__price { font-weight: 650; font-size: 19px; color: #fff; }
.plan-price__list { display: grid; gap: 4px; margin-top: 4px; }
.plan-price__list li { font-size: 11.5px; color: var(--m-muted); padding-left: 14px; position: relative; }
.plan-price__list li::before { content: "✓"; position: absolute; left: 0; color: var(--pulse); }
.plan-doc .btn { margin-top: 8px; background: var(--cobalt); border-color: var(--cobalt); color: #fff; border-radius: 9px; padding: 13px 22px; font-size: 14px; }
.plan-doc .btn:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); box-shadow: none; translate: none; }
.sk { animation: skPulse 1.4s ease-in-out infinite; }
@keyframes skPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.sk-line { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); margin-bottom: 9px; }
.sk-line:nth-child(2n) { width: 82%; }
.sk-line:nth-child(3n) { width: 64%; }
.sk-card { height: 54px; border-radius: 9px; background: rgba(255, 255, 255, 0.06); margin-bottom: 9px; }
.sk-phase { height: 34px; border-radius: 7px; background: rgba(255, 255, 255, 0.05); margin-bottom: 8px; }
.sk-eyebrow { width: 120px; height: 10px; border-radius: 5px; background: rgba(43, 217, 123, 0.25); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  #pre { display: none !important; }
  html.app [data-r], html.app [data-r]:not(.lmask) { opacity: 1; transform: none; }
  html.app .lmask > span { transform: none; }
  html.app .slab { position: static; }
  .slab { transform: none; filter: none; }
  /* core3d renders a single still frame under reduced motion */
  #core { opacity: 1; }
  .method__fill { transform: none; }
}
