/* ==========================================================================
   home-sc.css — RETBA AI home on the scroll-craft engine.
   The engine (public/sc/scrollcraft.css) is the mechanism and is never edited.
   Here: (1) the theme — six colour roles + three faces — and (2) this page's
   OWN classes. No [data-sc-*] or .sc-stage/.sc-copy selector is restyled.
   Chaptered-editorial grammar. Identity: navy #0a1122 / teal #6fcabb /
   paper #f4f1e9, Cormorant Garamond + Inter + IBM Plex Mono.
   ========================================================================== */

:root {
  --sc-canvas:     #0a1122;
  --sc-surface:    #131e3a;
  --sc-ink:        #f4f1e9;
  --sc-ink-soft:   #9aa6bd;
  --sc-accent:     #6fcabb;
  --sc-accent-ink: #0a1122;
  --sc-font-display: 'Cormorant Garamond', Georgia, serif;
  --sc-font-text:    'Inter', -apple-system, 'Segoe UI', sans-serif;
  --sc-font-mono:    'IBM Plex Mono', 'SF Mono', monospace;

  /* page-local */
  --teal: #6fcabb;
  --paper: #f4f1e9;
  --navy-950: #0a1122;
  --navy-900: #0f1830;
}

body { font-weight: 300; }
.sc-display { font-weight: 500; }
.sc-display em { font-style: italic; font-weight: 400; color: var(--teal); }

/* ------------------------------------------------------------------ header */
.rz-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  background: color-mix(in oklab, var(--navy-950) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sc-hairline);
}
.rz-header .in {
  max-width: var(--sc-maxw); margin-inline: auto;
  padding: 0 var(--sc-gutter); height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.rz-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.rz-brand img { width: 30px; height: 30px; border-radius: 4px; }
.rz-brand span { font-family: var(--sc-font-display); font-weight: 600; font-size: 20px; letter-spacing: .08em; color: #fff; }
.rz-nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 34px); }
.rz-nav a { font-family: var(--sc-font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--sc-ink-soft); text-decoration: none; transition: color .16s var(--sc-ease-out); }
.rz-nav a:hover { color: var(--teal); }
.rz-lang { color: var(--sc-ink-soft); }

/* coords rail — the house signature, kept */
.rz-coords {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl; z-index: 40; pointer-events: none;
  font-family: var(--sc-font-mono); font-size: 9.5px; letter-spacing: .3em;
  color: color-mix(in oklab, var(--sc-ink) 34%, transparent); text-transform: uppercase;
}
@media (max-width: 980px) { .rz-coords { display: none; } }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sc-font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  padding: 15px 28px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .16s var(--sc-ease-out), color .16s var(--sc-ease-out), border-color .16s var(--sc-ease-out), transform .12s var(--sc-ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--paper); color: var(--navy-950); }
.btn-primary:hover { background: var(--teal); }
.btn-ghost { border-color: color-mix(in oklab, var(--sc-ink) 34%, transparent); color: #fff; }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-dark { background: var(--navy-950); color: var(--paper); }
.btn-dark:hover { background: var(--teal); color: var(--navy-950); }
.btn-small { padding: 11px 20px; }
.arrow { font-family: var(--sc-font-display); font-size: 15px; }

.all-link {
  display: inline-flex; align-items: center; gap: 12px; margin-top: var(--sc-6);
  font-family: var(--sc-font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--teal);
  text-decoration: none; transition: gap .18s var(--sc-ease-out);
}
.all-link:hover { gap: 20px; }

/* ================================================================= 1 · HERO */
.hero-stage { display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 30%, #0e1730 0%, var(--navy-950) 62%); }
.plane { position: absolute; inset: -12% -6%; pointer-events: none; }
.plane--glow { background: radial-gradient(48% 42% at 50% 34%, color-mix(in oklab, var(--teal) 20%, transparent) 0%, transparent 70%); }
.plane--orb { inset: 0; display: grid; place-items: center; opacity: .92; }
.plane--orb canvas { width: min(78vw, 78vh); height: min(78vw, 78vh); }
.plane--grid {
  background-image: linear-gradient(color-mix(in oklab, var(--sc-ink) 5%, transparent) 1px, transparent 1px),
                    linear-gradient(90deg, color-mix(in oklab, var(--sc-ink) 5%, transparent) 1px, transparent 1px);
  background-size: 64px 64px; opacity: .5;
  mask-image: radial-gradient(70% 60% at 50% 45%, transparent 30%, #000 100%);
}
.hero-veil { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(60% 46% at 50% 52%, color-mix(in oklab, var(--navy-950) 62%, transparent) 0%, transparent 70%); }
/* centred by the stage's own grid (place-items:center) — NOT .sc-copy absolute
   positioning, whose mobile rule (inset-inline:gutter) breaks the centring. */
.hero-copy { position: relative; z-index: 3; text-align: center; max-width: min(56rem, 88vw); margin-inline: auto; padding-inline: var(--sc-gutter); }
.hero-kicker { display: inline-block; margin-bottom: var(--sc-5); color: var(--teal); }
.hero-copy h1 { font-size: clamp(2.2rem, 5.2vw, 4.6rem); line-height: 1.04; letter-spacing: -.01em; margin: 0 auto var(--sc-5); max-width: 18ch; }
.hero-lede { margin: 0 auto var(--sc-6); max-width: 52ch; color: color-mix(in oklab, var(--sc-ink) 82%, var(--sc-ink-soft)); }
.hero-meta { margin-top: var(--sc-6); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; font-family: var(--sc-font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--sc-ink-soft); }
.hero-meta span::before { content: "◆ "; color: var(--teal); font-size: 7px; vertical-align: 2px; }

/* film beds shared by house + engine */
.film-bed { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: .5; }

/* ================================================================ 2 · HOUSE */
.house-stage { display: grid; align-items: center; }
.house-inner { position: relative; z-index: 3; max-width: var(--sc-maxw); margin-inline: auto; padding: 0 var(--sc-gutter); width: 100%; }
.house-inner > * { position: relative; }
.house-label { display: block; color: var(--teal); margin-bottom: var(--sc-6); }
.house-line { font-style: italic; max-width: 22ch; color: #fff; }
.house-inner .house-line + .house-line { margin-top: var(--sc-4); }
/* the three client sentences occupy the same block so they cross-fade in place */
.house-lines { position: relative; min-height: 4.2em; }
.house-lines .house-line { position: absolute; inset: 0; }
.house-answer { margin-top: var(--sc-8); color: var(--sc-ink-soft); font-style: normal; }
.house-answer em { color: var(--teal); font-style: normal; }

/* ============================================================ 3 · DISCIPLINES */
.rail { gap: var(--sc-5); padding-inline: var(--sc-gutter); align-items: stretch; }
.rail > * { flex: 0 0 auto; }
.rail-lead { width: min(30rem, 78vw); display: flex; flex-direction: column; justify-content: center; padding-right: var(--sc-6); }
.rail-lead h2 { margin: var(--sc-4) 0 var(--sc-5); }
.rail-lead p { color: var(--sc-ink-soft); max-width: 34ch; }
.disc-card {
  width: min(23rem, 82vw); background: var(--sc-surface);
  border: 1px solid var(--sc-hairline); box-shadow: var(--sc-e1), var(--sc-edge);
  padding: clamp(24px, 2.6vw, 40px); display: flex; flex-direction: column; gap: var(--sc-4);
}
.disc-no { font-family: var(--sc-font-display); font-weight: 500; font-size: 3rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px color-mix(in oklab, var(--teal) 60%, transparent); }
.disc-card h3 { font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.16; color: #fff; margin: 0; }
.disc-q { font-family: var(--sc-font-display); font-style: italic; font-size: 1.15rem; color: var(--teal); margin: 0; }
.disc-dlv { font-size: 13.5px; line-height: 1.7; color: var(--sc-ink-soft); margin: auto 0 0; padding-top: var(--sc-4); border-top: 1px solid var(--sc-hairline); }
.rail-tail { width: min(22rem, 78vw); display: flex; align-items: center; }

/* ============================================================ 4 · ENGINE/PEAK */
.engine-stage { display: grid; align-items: center; }
.engine-inner { position: relative; z-index: 3; max-width: var(--sc-maxw); margin-inline: auto; padding: 0 var(--sc-gutter); width: 100%; text-align: center; }
.engine-inner .sc-label { color: var(--teal); }
.engine-inner h2 { margin: var(--sc-4) auto var(--sc-7); }
.stats { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(28px, 6vw, 84px); margin-bottom: var(--sc-8); }
.stat b { display: block; font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; color: var(--teal); }
.stat span { font-family: var(--sc-font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--sc-ink-soft); }

/* the signature move: the quotation, sealed */
.quote-block { max-width: 48rem; margin: 0 auto; position: relative; }
.quotation { font-family: var(--sc-font-display); font-weight: 500; font-size: clamp(1.5rem, 2.6vw, 2.4rem); line-height: 1.35; color: var(--sc-ink-soft); }
.quotation .w { color: color-mix(in oklab, var(--sc-ink) 22%, transparent); transition: color .3s var(--sc-ease-out); }
.quotation .w.lit { color: var(--paper); }
.quotation .w.q { color: var(--teal); }
.quotation .w.q.lit { color: var(--teal); }
.seal { margin-top: var(--sc-6); display: inline-flex; align-items: center; gap: 16px; opacity: 0; transform: translateY(10px); transition: opacity .5s var(--sc-ease-out), transform .5s var(--sc-ease-out); }
.seal.on { opacity: 1; transform: none; }
.seal-mark { width: 58px; height: 58px; border-radius: 50%; border: 1px solid var(--teal); display: grid; place-items: center; position: relative; flex: 0 0 auto; }
.seal-mark::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed color-mix(in oklab, var(--teal) 50%, transparent); animation: seal-spin 24s linear infinite; }
.seal-mark span { font-family: var(--sc-font-mono); font-size: 8px; letter-spacing: .12em; color: var(--teal); }
@keyframes seal-spin { to { transform: rotate(360deg); } }
.seal-text { text-align: left; }
.seal-text b { display: block; font-family: var(--sc-font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--paper); }
.seal-text time { font-family: var(--sc-font-mono); font-size: 10px; letter-spacing: .14em; color: var(--sc-ink-soft); }
@media (prefers-reduced-motion: reduce) { .seal-mark::before { animation: none; } }

/* ============================================================ 5 · SERVE (reveal) */
.serve .serve-head { max-width: 44ch; }
.serve h2 { margin: var(--sc-4) 0 0; }
.serve-rule { height: 1px; background: linear-gradient(90deg, var(--teal), transparent); margin: var(--sc-7) 0; transform-origin: left; }
.serve-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: start; }
.serve-col h3.col-title { font-family: var(--sc-font-mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--sc-ink-soft); margin: 0 0 var(--sc-5); }
.lab-enter { margin-top: var(--sc-6); }
.mandate { padding: var(--sc-5) 0; border-top: 1px solid var(--sc-hairline); }
.mandate:first-of-type { border-top: 0; }
.mandate .mtag { font-family: var(--sc-font-mono); font-size: 9.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--teal); }
.mandate h4 { font-family: var(--sc-font-display); font-weight: 500; font-size: 1.5rem; color: #fff; margin: 6px 0 8px; }
.mandate p { font-size: 14px; line-height: 1.7; color: var(--sc-ink-soft); margin: 0; max-width: 46ch; }
.inst { padding: var(--sc-4) 0; border-top: 1px solid var(--sc-hairline); }
.inst:first-of-type { border-top: 0; }
.inst .chip { display: inline-flex; align-items: center; gap: 7px; font-family: var(--sc-font-mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--sc-ink-soft); }
.inst .chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.inst .chip[data-state="dev"] i { background: #e0b15c; box-shadow: 0 0 8px #e0b15c; }
.inst h4 { font-family: var(--sc-font-display); font-weight: 500; font-size: 1.3rem; color: #fff; margin: 8px 0 6px; }
.inst p { font-size: 13.5px; line-height: 1.65; color: var(--sc-ink-soft); margin: 0; max-width: 42ch; }

/* ============================================================ 6 · CREED */
.creed { text-align: center; }
.creed .sc-label { color: var(--teal); }
.creed-line { max-width: 24ch; margin: var(--sc-5) auto var(--sc-6); font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.14; color: #fff; }

/* ============================================================ 7 · CLOSE */
.close-stage {
  --sc-ink: #1a2332; --sc-ink-soft: #3d4a5f; color: var(--sc-ink);
  background: var(--paper);
  display: grid; grid-template-rows: 1fr auto; align-items: center;
}
.close-inner { max-width: var(--sc-maxw); margin-inline: auto; padding: var(--sc-9) var(--sc-gutter) 0; width: 100%; }
.close-inner .sc-label { color: color-mix(in oklab, var(--navy-950) 60%, transparent); }
.close-inner h2 { font-size: clamp(2.6rem, 6vw, 5rem); color: var(--navy-950); margin: var(--sc-4) 0 var(--sc-5); }
.close-inner h2 em { color: #2a8a7d; }
.close-body { font-size: var(--sc-t-lg); line-height: 1.5; color: var(--sc-ink-soft); max-width: 42ch; margin: 0 0 var(--sc-6); }
.close-mail { display: inline-block; font-family: var(--sc-font-display); font-size: clamp(1.4rem, 2.4vw, 2rem); color: var(--navy-950); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--navy-950) 30%, transparent); }
.close-mail:hover { color: #2a8a7d; border-color: #2a8a7d; }
.close-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sc-6); margin-top: var(--sc-6); }
.close-note { font-family: var(--sc-font-mono); font-size: 10.5px; letter-spacing: .1em; color: var(--sc-ink-soft); max-width: 34ch; }
.foot { border-top: 1px solid color-mix(in oklab, var(--navy-950) 14%, transparent); padding: var(--sc-5) var(--sc-gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; max-width: var(--sc-maxw); margin: 0 auto; width: 100%; }
.foot span, .foot a { font-family: var(--sc-font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--sc-ink-soft); text-decoration: none; }
.foot a:hover { color: #2a8a7d; }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 860px) {
  .rz-nav { display: none; }
  .rz-header .btn { display: none; }               /* CTA overflowed the bar; hero + close carry it */
  .serve-grid { grid-template-columns: 1fr; gap: var(--sc-7); }
  .hero-copy { max-width: 100%; width: 100%; }
  .hero-copy h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); max-width: 100%; text-wrap: normal; }  /* 18ch + balance overflowed under overflow-x:clip */
  .hero-kicker { font-size: 8.5px; letter-spacing: .1em; white-space: normal; line-height: 1.6; }  /* the mono line was wider than the phone */
  .hero-lede { max-width: 100%; }
  .house-line { max-width: 100%; }
  .stats { gap: 28px; }
  .quotation { font-size: clamp(1.3rem, 5vw, 1.7rem); }
}
