/* Curcuna — shared design system (warm light, Apple-like; the island stays dark).
   Mobile-first: base styles target ~360px; min-width breakpoints add columns. */

:root {
  --bg: #f7f5ef;        /* warm off-white ground */
  --panel: #ffffff;     /* cards */
  --panel2: #efeee9;    /* subtle fills */
  --line: #e5e3dc;      /* hairlines */
  --ink: #1b1c1f;       /* near-black text */
  --soft: #5f5e57;      /* secondary text */
  --faint: #918f86;     /* tertiary text */
  --accent: #b9791b;    /* amber — the "this needs a decision" signal, also the app/phone/admin accent */
  --fill: #e8a33d;      /* amber button / badge fill */
  --logo1: #c86a2a;
  --logo2: #eaa53d;
  --ok: #1f9d57;
  --no: #d6483f;
  --blue: #2f6fe0;
  --island-bg: #101012; /* the product element stays dark */
  --island-ink: #f4f4f2;
  --maxw: 980px;
  --radius: 4px;
  /* Body: clean neutral sans. Display: rounded + warm (native on Apple). */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Quicksand", var(--sans);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px; /* anchored sections clear the sticky nav */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (min-width: 640px) { body { font-size: 17px; } }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.narrow { max-width: 680px; }

/* ---- Typography (rounded, warm display; clean body) ---- */
h1, h2, h3 { font-family: var(--round); line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; font-weight: 700; }
.display { font-size: clamp(34px, 9.5vw, 84px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 5vw, 40px); font-weight: 750; }
h3 { font-size: clamp(19px, 2.2vw, 23px); font-weight: 700; letter-spacing: -0.008em; }
.lede { font-size: clamp(17px, 2.4vw, 21px); color: var(--soft); max-width: 62ch; line-height: 1.6; }
.eyebrow { font-family: var(--round); font-size: 12.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--soft); }
.small { font-size: 15px; }
.tiny { font-size: 13px; color: var(--faint); }
.center { text-align: center; }

/* ---- Nav (fixed and constant — no shrink, no blur, no scroll-triggered border) ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 10px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav .links { margin-left: auto; display: flex; gap: 2px; align-items: center; }
.nav .links a {
  color: var(--soft); font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  transition: color .14s ease-out;
}
.nav .links a:hover { color: var(--ink); }
.nav .links a.hideSmall { display: none; }
@media (min-width: 640px) {
  .nav { padding: 12px 24px; gap: 18px; }
  .nav .links { gap: 10px; }
  .nav .links a.hideSmall { display: inline-flex; }
}
.nav .links a.btn { min-height: 0; padding: 8px 16px; font-size: 14px; color: #241704; }
.nav .links a.btn:hover { color: #241704; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--round);
  font-weight: 750; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.brand .mark { width: 27px; height: 27px; flex: none; display: block; }
.brand .u-dot { color: var(--accent); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--round); font-size: 16px; font-weight: 650;
  cursor: pointer; min-height: 44px; padding: 12px 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); transition: background-color .14s ease-out, border-color .14s ease-out, filter .14s ease-out; }
.btn:hover { border-color: var(--soft); }
.btn.primary { background: var(--fill); border-color: var(--fill); color: #241704; }
.btn.primary:hover { filter: brightness(1.05); border-color: var(--fill); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---- Sections ---- */
.band { padding: clamp(48px, 10vw, 96px) 0; }
.band.tight { padding: clamp(32px, 6vw, 68px) 0; }
.band.fill { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---- Island (matches the app: square top, rounded bottom — the real notch shape, not a generic card radius) ---- */
.island { background: var(--island-bg); color: var(--island-ink); border-radius: 0 0 22px 22px;
  padding: 14px 14px; width: min(430px, 100%);
  display: flex; align-items: center; gap: 12px; }
.island .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fill); flex: none; }
.island .txt { min-width: 0; }
.island .proj { font-size: 13px; font-weight: 650; }
.island .cmd { font-family: var(--mono); font-size: 11.5px; color: rgba(244,244,242,.66);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.island .ctrls { margin-left: auto; display: flex; gap: 8px; flex: none; }
.island .pill { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #fff; }
.island .pill.ok { background: #31c07a; color: #04160c; }
.island .pill.no { background: #f0575c; }
.island .pill.jump { background: rgba(255,255,255,.14); }
@media (min-width: 640px) { .island { padding: 15px 16px; } .island .cmd { font-size: 12px; } }

/* ---- Hero: a continuous decision loop — two asks alternate with no dead
   air. Each plays the real product cycle: drop in, countdown drains, Allow
   press, resolved state, dismiss. Base state (reduced motion / no animation)
   is the two islands stacked statically. ---- */
.hero { position: relative; }
.hero .inner { position: relative; z-index: 1; text-align: center; padding-top: clamp(20px, 5vw, 56px); }
.hero .loop { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(430px, 100%); margin: 0 auto clamp(26px, 5vw, 48px); position: relative; }
.hero .loop .island { border-radius: 22px; }
.hero .loop .cd { position: absolute; left: 16px; bottom: 6px; height: 2px; width: calc(100% - 32px);
  background: var(--fill); border-radius: 1px; opacity: 0; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.hero .lede { margin-left: auto; margin-right: auto; }

@media (prefers-reduced-motion: no-preference) {
  .hero .loop { display: block; height: 64px; }
  .hero .loop .island { position: absolute; top: 0; left: 50%; }
  .hero .loop .ask1 { animation: askCycle 8s cubic-bezier(.16,.84,.36,1) infinite; }
  .hero .loop .ask2 { animation: askCycle 8s cubic-bezier(.16,.84,.36,1) -4s infinite; }
  .hero .loop .cd { animation: drain 8s linear infinite; }
  .hero .loop .ask2 .cd { animation-delay: -4s; }
  .hero .loop .dot { animation: resolved 8s ease-in-out infinite; }
  .hero .loop .ask2 .dot { animation-delay: -4s; }
  .hero .loop .pill.ok { animation: press 8s ease-in-out infinite; }
  .hero .loop .ask2 .pill.ok { animation-delay: -4s; }
  .hero .loop .cmd { animation: cmdFade 8s ease-in-out infinite; }
  .hero .loop .ask2 .cmd { animation-delay: -4s; }
}
@keyframes askCycle {
  0% { opacity: 0; transform: translate(-50%, -26px); }
  5% { opacity: 1; transform: translate(-50%, 0); }
  86% { opacity: 1; transform: translate(-50%, 0); }
  94%, 100% { opacity: 0; transform: translate(-50%, -14px); }
}
@keyframes drain {
  0% { opacity: 0; width: calc(100% - 32px); }
  7% { opacity: 1; width: calc(100% - 32px); }
  34% { opacity: 1; width: 0; }
  40%, 100% { opacity: 0; width: 0; }
}
@keyframes press {
  0%, 36%, 44%, 100% { transform: scale(1); }
  39% { transform: scale(.82); }
}
@keyframes resolved {
  0%, 44% { background: var(--fill); }
  50%, 100% { background: #31c07a; }
}
@keyframes cmdFade {
  0%, 46% { opacity: 1; }
  54%, 100% { opacity: .45; }
}

/* ---- Hero terminal chip (the headless one-liner, inline next to the CTA) ---- */
.termchip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  background: #14161a; color: #e4e8e0; border: 1px solid #22252b; border-radius: var(--radius);
  font-family: var(--mono); font-size: 13px; padding: 12px 14px; cursor: pointer; }
.termchip .prompt { color: #6f7580; }
.termchip .tc-cmd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.termchip .tc-copy { flex: none; color: #b9bdc4; border: 1px solid #2c2f36; border-radius: var(--radius);
  padding: 4px 8px; font-family: var(--mono); font-size: 12px; transition: color .14s ease-out, border-color .14s ease-out; }
.termchip:hover .tc-copy { color: #fff; border-color: #47505a; }
@media (max-width: 640px) {
  .hero .cta { flex-direction: column; align-items: stretch; }
  .hero .cta .btn, .hero .cta .termchip { justify-content: center; width: 100%; }
}

/* ---- Section rise-in (progressive enhancement: only when JS marks <html>
   with .js and the user allows motion; otherwise everything is simply
   visible). ---- */
@media (prefers-reduced-motion: no-preference) {
  .js .rise { opacity: 0; transform: translateY(14px); transition: opacity .35s ease-out, transform .35s ease-out; }
  .js .rise.in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- Agent grid (icon + name + tier) ---- */
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
@media (min-width: 760px) { .agents { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.agent { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.agent .mark { width: 26px; height: 26px; flex: none; color: var(--ink); }
.agent .who { min-width: 0; }
.agent .name { font-family: var(--round); font-weight: 700; font-size: 15px; letter-spacing: -0.008em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent .tier { display: inline-block; margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); }
.agent .tier.full { color: var(--accent); }

/* ---- Micro-facts row (mono, Anduril-ish spec lines) ---- */
.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: center; margin-top: 26px; }
.facts span { font-family: var(--mono); font-size: 12.5px; color: var(--soft); }
.facts b { color: var(--accent); font-weight: 700; }

/* ---- Decision loop: one ask mirrored on three product surfaces; the phone
   tap resolves them all and the terminal continues. Static state (reduced
   motion / no animation): everything pending, terminal waiting. ---- */
.sync { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 36px; align-items: center; }
@media (min-width: 900px) { .sync { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 44px; } }
.sync-left { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.mini.term.big { min-height: 118px; font-size: 13px; }
.t-swap { position: relative; min-height: 1.5em; }
.t-swap .la, .t-swap .lb { position: absolute; left: 0; top: 0; white-space: nowrap; }
.t-swap .lb { opacity: 0; color: #31c07a; }
.steps { list-style: none; }
.steps li { display: flex; gap: 14px; padding: 13px 2px; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .num { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--accent); padding-top: 4px; flex: none; }
.steps b { font-family: var(--round); font-size: 16.5px; font-weight: 700; letter-spacing: -0.008em; }
.steps .d { display: block; font-size: 14px; color: var(--soft); line-height: 1.5; }
.sync-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; position: relative; padding-left: 28px; }
.railnode { position: absolute; left: -10px; top: -9px; width: 22px; height: 22px; z-index: 1; }
.railnode svg { width: 100%; height: 100%; display: block; }
.sync-right::before, .sync-right::after { content: ""; position: absolute; left: 0; top: 12px; bottom: 30px;
  width: 2px; border-radius: 1px; background: var(--line); }
.sync-right::after { background: var(--fill); transform: scaleY(0); transform-origin: top; }
.surface { position: relative; }
.surface::after { content: ""; position: absolute; left: -28px; top: 58%; width: 28px; height: 2px;
  border-radius: 1px; background: var(--line); }
.slabel { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 7px; }
.island.solo { border-radius: 22px; width: 100%; position: relative; }
.scd { position: absolute; left: 16px; bottom: 6px; height: 2px; width: calc(100% - 32px);
  background: var(--fill); border-radius: 1px; opacity: 0; }
.mrow { position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 15px; }
.mtop { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.mtop b { font-family: var(--round); font-weight: 700; }
.mtag { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--faint); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.mcmd { font-family: var(--mono); font-size: 12px; color: var(--soft); margin-top: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcmd.dark { color: rgba(244,244,242,.66); }
.mbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.mbtn { font-size: 12px; font-weight: 650; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--soft); }
.mbtn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.mbtn.no { background: var(--no); border-color: var(--no); color: #fff; }
.phcard { position: relative; background: var(--island-bg); color: var(--island-ink);
  border-radius: 18px; padding: 14px 16px; }
.phtop { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.phtop b { font-family: var(--round); font-weight: 700; }
.phlive { margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: #31c07a; }
.phbtns { display: flex; gap: 10px; margin-top: 12px; }
.phbtn { position: relative; flex: 1; text-align: center; padding: 9px 0; border-radius: 12px;
  font-size: 13.5px; font-weight: 700; }
.phbtn.no { background: #f0575c; color: #2a0705; }
.phbtn.ok { background: #31c07a; color: #04160c; }
.sdot { width: 9px; height: 9px; border-radius: 50%; background: var(--fill); flex: none; }
.schip { position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; border-radius: 50%;
  background: #31c07a; color: #04160c; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; border: 2px solid var(--panel); opacity: 0; }
.tapring { position: absolute; inset: -5px; border-radius: 16px; border: 2px solid #31c07a;
  opacity: 0; pointer-events: none; }
.sync .island.solo, .sync .mrow, .sync .phcard { outline: 2px solid transparent; outline-offset: 2px; }
.mini.term { background: #14161a; border: 1px solid #22252b; border-radius: var(--radius);
  min-height: 96px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; justify-content: center;
  font-family: var(--mono); font-size: 12.5px; color: #e4e8e0; }
.mini .prompt { color: #6f7580; }
.mini .dim { color: rgba(244,244,242,.66); }
.mini .wait { color: var(--fill); }
.mini .caret { display: inline-block; width: 7px; height: 13px; background: var(--fill);
  margin-left: 4px; vertical-align: -2px; }

@media (prefers-reduced-motion: no-preference) {
  .mini .caret { animation: caretBlink 1.1s step-end infinite; }
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* One 12 s story, phased to the numbered steps: 01 the terminal waits,
   02 the ask lands surface by surface, 03 the phone tap resolves them all.
   The active step in the left list brightens in sync. */
@media (prefers-reduced-motion: no-preference) {
  .sync .s-notch { animation: srf1 12s cubic-bezier(.16,.84,.36,1) infinite; }
  .sync .s-mgr { animation: srf2 12s cubic-bezier(.16,.84,.36,1) infinite; }
  .sync .s-ph { animation: srf3 12s cubic-bezier(.16,.84,.36,1) infinite; }
  .sync .scd { animation: drain2 12s linear infinite; }
  .sync .sdot { animation: dotRes 12s ease-in-out infinite; }
  .sync .phbtn.ok { animation: tapPress 12s ease-in-out infinite; }
  .sync .tapring { animation: tapRing 12s ease-out infinite; }
  .sync .schip { animation: chipIn 12s cubic-bezier(.2,.9,.3,1.25) infinite; }
  .sync .t-swap .la { animation: lineA 12s ease-in-out infinite; }
  .sync .t-swap .lb { animation: lineB 12s ease-in-out infinite; }
  .sync .steps .st1 { animation: stp1 12s ease-in-out infinite; }
  .sync .steps .st2 { animation: stp2 12s ease-in-out infinite; }
  .sync .steps .st3 { animation: stp3 12s ease-in-out infinite; }
  .sync .island.solo, .sync .mrow, .sync .phcard { animation: cardRes 12s ease-in-out infinite; }
  .sync .sync-right::after { animation: railGrow 12s ease-in-out infinite; }
  .sync .s-notch::after { animation: tick1 12s ease-in-out infinite; }
  .sync .s-mgr::after { animation: tick2 12s ease-in-out infinite; }
  .sync .s-ph::after { animation: tick3 12s ease-in-out infinite; }
}
@keyframes railGrow {
  0%, 20% { transform: scaleY(0); background: var(--fill); opacity: 1; }
  34% { transform: scaleY(1); }
  58% { background: var(--fill); }
  63%, 88% { transform: scaleY(1); background: #31c07a; opacity: 1; }
  96%, 100% { transform: scaleY(1); background: #31c07a; opacity: 0; }
}
@keyframes tick1 { 0%, 26% { background: var(--line); } 30%, 58% { background: var(--fill); } 63%, 88% { background: #31c07a; } 94%, 100% { background: var(--line); } }
@keyframes tick2 { 0%, 28% { background: var(--line); } 32%, 58% { background: var(--fill); } 63%, 88% { background: #31c07a; } 94%, 100% { background: var(--line); } }
@keyframes tick3 { 0%, 30% { background: var(--line); } 34%, 58% { background: var(--fill); } 63%, 88% { background: #31c07a; } 94%, 100% { background: var(--line); } }
@keyframes cardRes {
  0%, 60% { outline-color: transparent; }
  65%, 86% { outline-color: #31c07a; }
  92%, 100% { outline-color: transparent; }
}
@keyframes srf1 {
  0%, 28% { opacity: 0; transform: translateX(-8px); }
  32%, 90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateX(-8px); }
}
@keyframes srf2 {
  0%, 30% { opacity: 0; transform: translateX(-8px); }
  34%, 90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateX(-8px); }
}
@keyframes srf3 {
  0%, 32% { opacity: 0; transform: translateX(-8px); }
  36%, 90% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateX(-8px); }
}
@keyframes drain2 {
  0%, 30% { opacity: 0; width: calc(100% - 32px); }
  33% { opacity: 1; }
  55% { opacity: 1; width: 0; }
  58%, 100% { opacity: 0; width: 0; }
}
@keyframes tapPress { 0%, 52%, 60%, 100% { transform: scale(1); } 56% { transform: scale(.93); } }
@keyframes tapRing {
  0%, 54% { opacity: 0; transform: scale(.7); }
  58% { opacity: .9; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.25); }
}
@keyframes dotRes { 0%, 58% { background: var(--fill); } 62%, 100% { background: #31c07a; } }
@keyframes chipIn {
  0%, 60% { opacity: 0; transform: scale(.6); }
  65%, 88% { opacity: 1; transform: scale(1); }
  94%, 100% { opacity: 0; }
}
@keyframes lineA { 0%, 6% { opacity: 0; } 9%, 58% { opacity: 1; } 63%, 100% { opacity: 0; } }
@keyframes lineB { 0%, 61% { opacity: 0; } 66%, 90% { opacity: 1; } 97%, 100% { opacity: 0; } }
@keyframes stp1 { 0%, 26% { opacity: 1; } 32%, 94% { opacity: .4; } 100% { opacity: 1; } }
@keyframes stp2 { 0%, 26% { opacity: .4; } 30%, 56% { opacity: 1; } 62%, 100% { opacity: .4; } }
@keyframes stp3 { 0%, 56% { opacity: .4; } 60%, 92% { opacity: 1; } 98%, 100% { opacity: .4; } }

/* ---- Footer ---- */
.footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--soft); background: var(--panel); }
.footer .row { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer a { color: var(--soft); } .footer a:hover { color: var(--ink); }
@media (min-width: 760px) {
  .footer { padding: 36px 0 52px; }
  .footer .row { flex-direction: row; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
  .footer .spacer { margin-left: auto; }
}

