/* ── blackbox landing — SEALED palette (shared with the platform UI) ── */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrainsmono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrainsmono-500.woff2') format('woff2'); }

:root {
  /* SEALED tokens — match tee/ui tailwind.config */
  --background: #FAF5ED;
  --foreground: #161311;
  --muted-fg: #6B5F50;
  --border: #D8CFC0;
  --card: #F2EBE0;
  --cream-200: #EBE2D0;
  --emerald: #0F4F3F;
  --emerald-dark: #0A3B2F;
  --emerald-light: #2C7A66;
  --gold: #B89030;
  --gold-light: #D4AE56;
  --vermillion: #C8412B;
  --panel: #14110E;           /* warm near-black instrument panel */
  --mint: #4ED3A6;            /* glow color inside the dark panel */

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --stage-w: min(50vw, 860px);
  --gutter: clamp(24px, 5.5vw, 90px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--sans);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(15, 79, 63, .18); }
.mono { font-family: var(--mono); }

/* ── header ── */
#brand {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter);
}
.brand-mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--foreground); }
.brand-box {
  width: 15px; height: 15px; border: 2px solid var(--emerald); border-radius: 3px;
  position: relative;
}
.brand-box::after { content: ""; position: absolute; inset: 3.5px; background: var(--emerald); border-radius: 1px; }
.brand-name { font-weight: 650; letter-spacing: -.01em; font-size: 17px; }

/* ── the instrument panel (3D stage), right side ── */
#stage {
  position: fixed; z-index: 1;
  top: 84px; bottom: 84px;
  right: var(--gutter);
  width: var(--stage-w);
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow:
    0 30px 80px rgba(22, 19, 17, .18),
    0 6px 18px rgba(22, 19, 17, .08);
  overflow: hidden;
}
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 40%, transparent 60%, rgba(0,0,0,.38) 100%);
  border-radius: inherit;
}
.stage-caption {
  position: absolute; left: 18px; bottom: 14px; z-index: 3;
  font-size: 10px; letter-spacing: .16em; color: rgba(250, 245, 237, .55);
  transition: opacity .4s ease;
}

/* 3D node labels (inside the panel) */
#labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.node-label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -130%);
  opacity: 0; transition: opacity .5s ease;
  text-align: center; white-space: nowrap;
}
.node-label.on { opacity: 1; }
.node-label .nl-title {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  color: var(--mint); text-transform: uppercase;
}
.node-label .nl-sub { font-size: 10.5px; color: rgba(250,245,237,.5); margin-top: 1px; }
.enc-label .nl-title { color: var(--gold-light); letter-spacing: .2em; }
.enc-label .nl-sub { color: rgba(78,211,166,.75); }
.url-label .nl-title { color: #e26a55; letter-spacing: .08em; text-transform: none; }
.url-label .nl-sub { color: rgba(226,106,85,.6); text-transform: uppercase; letter-spacing: .12em; font-family: var(--mono); font-size: 8.5px; }
.url-label.rejected .nl-title { color: #ff8a75; letter-spacing: .14em; }
.url-label.rejected .nl-sub { color: rgba(250,245,237,.55); text-transform: none; }

/* ── copy column, left side ── */
#sections { position: relative; z-index: 4; }
.panel {
  height: 100vh; height: 100dvh;
  display: flex; align-items: center;
  padding: 90px var(--gutter) 90px var(--gutter);
  position: fixed; inset: 0;
  width: calc(100% - var(--stage-w) - var(--gutter));
  visibility: hidden; pointer-events: none;
}
.panel.active { visibility: visible; }
.panel.active .copy { pointer-events: auto; }

.copy { max-width: 520px; }
.copy-wide { max-width: 560px; }

.copy > * {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.panel.active .copy > * { opacity: 1; transform: none; }
.panel.active .copy > *:nth-child(1) { transition-delay: .1s }
.panel.active .copy > *:nth-child(2) { transition-delay: .19s }
.panel.active .copy > *:nth-child(3) { transition-delay: .28s }
.panel.active .copy > *:nth-child(4) { transition-delay: .37s }
.panel.active .copy > *:nth-child(5) { transition-delay: .46s }
.panel.active .copy > *:nth-child(6) { transition-delay: .55s }
.panel.leaving .copy > * { opacity: 0; transform: translateY(-14px); transition-duration: .35s; transition-delay: 0s; }

.kicker {
  font-size: 11px; letter-spacing: .26em; color: var(--emerald);
  margin-bottom: 20px; text-transform: uppercase; font-weight: 500;
}

h1.problem {
  font-size: clamp(30px, 2.9vw, 44px);
  font-weight: 700; letter-spacing: -.035em; line-height: 1.12;
  min-height: 3.5em; /* reserve all three lines while the text types in */
}
h1.problem .dim { color: var(--muted-fg); }
h1.problem .leak { color: var(--vermillion); }
.caret {
  color: var(--emerald); font-weight: 400;
  animation: caret-blink 0.85s steps(1) infinite;
}
.caret.off { display: none; }
@keyframes caret-blink { 50% { opacity: 0 } }

/* hero copy is revealed by the typing timeline, not the default cascade */
#hero.active .copy > .lede,
#hero.active .copy > .answer,
#hero.active .copy > .hint {
  opacity: 0; transform: translateY(22px); transition-delay: 0s;
}
#hero.active .copy > .show { opacity: 1; transform: none; }
#hero.panel.active.leaving .copy > * { opacity: 0; transform: translateY(-14px); }

.answer {
  margin-top: 30px;
  font-size: clamp(24px, 2.2vw, 34px);
  font-weight: 700; letter-spacing: -.03em;
  display: flex; align-items: baseline; flex-wrap: wrap;
}
.answer-brand { color: var(--emerald); display: inline-flex; align-items: center; gap: 10px; }
.answer-box {
  width: .62em; height: .62em; border: 2.5px solid var(--emerald); border-radius: 4px;
  position: relative; display: inline-block;
  animation: sealbox 3.2s ease-in-out infinite;
}
.answer-box::after { content: ""; position: absolute; inset: 22%; background: var(--emerald); border-radius: 1px; }
@keyframes sealbox { 0%,100% { box-shadow: 0 0 0 0 rgba(15,79,63,.25) } 50% { box-shadow: 0 0 0 7px rgba(15,79,63,0) } }
.answer-dot { color: var(--gold); }

h2 {
  font-size: clamp(32px, 3.4vw, 50px);
  font-weight: 700; letter-spacing: -.03em; line-height: 1.05;
}
h2.h2-sm { font-size: clamp(26px, 2.6vw, 38px); margin-bottom: 6px; }

.lede {
  margin-top: 18px; font-size: clamp(15px, 1.25vw, 17.5px);
  line-height: 1.65; color: var(--muted-fg);
}
.lede strong { color: var(--foreground); font-weight: 600; }

.hint { margin-top: 46px; font-size: 11px; letter-spacing: .2em; color: var(--muted-fg); }
.key-cap {
  display: inline-block; border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 9px; margin-right: 10px; color: var(--emerald);
  background: var(--card); animation: nudge 2.2s ease-in-out infinite;
}
@keyframes nudge { 0%,100% { transform: translateX(0) } 50% { transform: translateX(5px) } }

.chips { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 9px; list-style: none; }
.chips li {
  font-size: 10px; letter-spacing: .13em; color: var(--emerald);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px;
  background: var(--card); font-weight: 500;
}

/* ── product cards (overview) ── */
.product-grid { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.pcard {
  display: flex; align-items: center; gap: 16px; text-align: left;
  padding: 12px 16px; width: 100%;
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; text-decoration: none; font-family: var(--sans);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.pcard:hover {
  transform: translateX(4px);
  border-color: var(--emerald-light);
  box-shadow: 0 10px 26px rgba(22,19,17,.10);
}
.picon {
  flex: 0 0 44px; width: 44px; height: 44px;
  display: grid; place-items: center;
  color: var(--emerald); background: var(--background);
  border: 1px solid var(--border); border-radius: 10px;
}
.picon svg { width: 26px; height: 26px; overflow: visible; }
.ptext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pname { font-size: 15.5px; font-weight: 650; letter-spacing: -.01em; }
.parrow { font-style: normal; color: var(--emerald); opacity: 0; transition: opacity .2s, transform .2s; display: inline-block; }
.pcard:hover .parrow { opacity: 1; transform: translateX(2px); }
.pdesc { font-size: 12.5px; line-height: 1.45; color: var(--muted-fg); }
.pfor { font-size: 9px; letter-spacing: .14em; color: var(--gold); margin-top: 2px; }

/* animated icons */
.icon-rag .cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0 } }
.icon-icpt .radar { transform-origin: 18px 17px; animation: radar 2.4s ease-out infinite; }
@keyframes radar { 0% { transform: scale(.35); opacity: 1 } 70% { transform: scale(1.45); opacity: 0 } 100% { opacity: 0 } }
.icon-room .keyhole { animation: pulse-k 2.2s ease-in-out infinite; }
.icon-room .shackle { transform-origin: 18px 14px; animation: shackle 4.4s ease-in-out infinite; }
@keyframes pulse-k { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@keyframes shackle { 0%,12%,100% { transform: translateY(0) } 5% { transform: translateY(-2px) } }
.icon-compute .gear { transform-origin: 18px 18px; animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.icon-verif .check { stroke-dasharray: 22; animation: draw 2.6s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 22 } 40%,70% { stroke-dashoffset: 0 } 100% { stroke-dashoffset: -22 } }

/* ── encryption pathway diagram (RAG deep dive) ── */
.pathway {
  margin-top: 26px; display: flex; align-items: center; gap: 0;
  padding: 16px 18px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
}
.pw-node {
  font-size: 9.5px; letter-spacing: .12em; line-height: 1.5; text-align: center;
  color: var(--foreground); font-weight: 500;
  border: 1.5px solid var(--emerald); border-radius: 8px; padding: 8px 10px;
  background: var(--background); white-space: nowrap;
}
.pw-node.pw-core { background: var(--emerald); color: var(--background); border-color: var(--emerald); }
.pw-link { flex: 1; position: relative; text-align: center; min-width: 54px; }
.pw-link i {
  display: block; height: 0; margin: 0 6px;
  border-top: 2px dashed var(--emerald-light);
  animation: dashmove 1.2s linear infinite;
}
@keyframes dashmove { to { transform: translateX(8px) } }
.pw-link { overflow: hidden; padding: 12px 0; }
.pw-link em {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  font-style: normal; font-size: 8.5px; letter-spacing: .14em; color: var(--gold);
  white-space: nowrap;
}
.forline { margin-top: 22px; font-size: 10px; letter-spacing: .16em; color: var(--gold); }

/* ── CTA ── */
.cta-row { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 10px; text-decoration: none;
  font-size: 15px; font-weight: 600; letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: var(--emerald); color: var(--background);
  box-shadow: 0 10px 26px rgba(15, 79, 63, .28);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--emerald-dark); box-shadow: 0 14px 34px rgba(15,79,63,.35); }
.btn-ghost {
  color: var(--muted-fg); border: 1px solid var(--border); font-size: 13px; background: var(--card);
}
.btn-ghost:hover { color: var(--emerald); border-color: var(--emerald-light); }
.footnote { margin-top: 56px; font-size: 9.5px; letter-spacing: .22em; color: rgba(107, 95, 80, .65); }

/* ── dots nav ── */
#dots {
  position: fixed; left: calc(var(--gutter) / 2 - 4px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 13px; z-index: 10;
}
#dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--border);
  background: transparent; cursor: pointer; padding: 0;
  transition: all .3s ease; position: relative;
}
#dots button:hover { border-color: var(--emerald); }
#dots button.active { background: var(--emerald); border-color: var(--emerald); transform: scale(1.2); }
#dots button .tip {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--muted-fg);
  opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap;
  text-transform: uppercase;
}
#dots button:hover .tip { opacity: 1; }

/* ── arrows ── */
#navarrows {
  position: fixed; bottom: 26px; left: var(--gutter); z-index: 10;
  display: flex; gap: 10px;
}
.navarrow {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--card);
  color: var(--emerald); font-size: 18px; cursor: pointer;
  transition: all .25s ease;
}
.navarrow:hover { background: var(--emerald); color: var(--background); transform: scale(1.06); }
.navarrow:disabled { opacity: .25; cursor: default; transform: none; background: var(--card); color: var(--muted-fg); }

/* ── loader ── */
#loader {
  position: fixed; inset: 0; z-index: 50; background: var(--background);
  display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center;
  transition: opacity .6s ease; font-size: 11px; letter-spacing: .3em; color: var(--emerald);
}
#loader.done { opacity: 0; pointer-events: none; }
.loadbar { width: 170px; height: 2px; background: var(--cream-200); overflow: hidden; border-radius: 2px; }
.loadbar i { display: block; height: 100%; width: 40%; background: var(--emerald); animation: load 1.1s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%) } 100% { transform: translateX(450%) } }

/* ── responsive ── */
@media (max-width: 980px) {
  :root { --stage-w: 100vw; }
  #stage {
    top: 64px; bottom: auto; left: 14px; right: 14px; width: auto; height: 36vh;
  }
  .panel {
    width: 100%;
    align-items: flex-start;
    padding-top: calc(36vh + 92px);
  }
  .copy { max-width: 100%; overflow-y: auto; max-height: calc(100vh - 36vh - 110px); }
  #dots { display: none; }
  .brand-status { display: none; }
  #navarrows { left: auto; right: 16px; }
  h1.problem { font-size: clamp(26px, 6.4vw, 38px); }
  .pw-link em { font-size: 7.5px; }
  .pdesc { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .key-cap, .loadbar i, .answer-box, .caret,
  .icon-rag .cursor, .icon-icpt .radar, .icon-room .keyhole, .icon-room .shackle,
  .icon-compute .gear, .icon-verif .check, .pw-link i { animation: none; }
  .copy > * { transition-duration: .01s; }
}
