:root {
  --ink: #15181d;
  --ink-2: #2a2f37;
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --paper: #f6f7f9;
  --card: #ffffff;
  --muted: #5b636e;
  --line: rgba(21, 24, 29, 0.12);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1040px;
  --doc: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
img { display: block; max-width: 100%; height: auto; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* Top bar */
.top { border-bottom: 1px solid var(--line); background: var(--card); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { display: flex; align-items: center; }
.brand img { height: 28px; width: auto; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 0.95rem; }
.top nav a { color: var(--ink); text-decoration: none; opacity: 0.75; }
.top nav a:hover, .top nav a[aria-current="page"] { opacity: 1; }

/* Home */
.hero { padding-block: 72px 56px; }
.eyebrow { font: 600 0.8rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); margin: 0 0 18px; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 650; margin: 0 0 20px; max-width: 18ch; }
.lede { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 58ch; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding-bottom: 56px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card h2 { font-size: 1.05rem; font-weight: 650; margin: 0 0 8px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }
.section { padding-bottom: 56px; }
.section > h2 { font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 12px; }
.section > p, .section li { color: var(--ink-2); max-width: 70ch; }
.section ul { padding-left: 1.2em; }
.cta { display: inline-block; margin-top: 8px; background: var(--blue); color: #fff; text-decoration: none; border-radius: 8px; padding: 9px 16px; font-weight: 600; }
.cta:hover { background: var(--blue-deep); color: #fff; }

/* Scenes: a dark stage across the paper page. Each scene is an inline SVG
   animated in CSS alone; the bars stand in for text on purpose, so the page
   shows the shape of the work and not its content. Every element rests in its
   final state, so with reduced motion (or no animation support) the scenes
   are still complete drawings. */
.scenes {
  --lit: #6f9dff;
  --stage: #1c2027;
  --panel: #262b34;
  --hair: rgba(255, 255, 255, 0.14);
  --sk: rgba(255, 255, 255, 0.2);
  --dim: #b4bcc7;
  background: var(--ink);
  color: #f6f7f9;
  padding-block: 72px;
  margin-bottom: 56px;
}
.scenes .eyebrow { color: var(--lit); }
.scenes h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 650; margin: 0 0 12px; max-width: 20ch; }
.scenes-lede { color: var(--dim); font-size: 1.08rem; max-width: 52ch; margin: 0 0 36px; }
.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.scene { margin: 0; background: var(--stage); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 14px; overflow: hidden; }
.stage { background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 1.5px) 0 0 / 16px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.stage svg { display: block; width: 100%; height: auto; }
.scene figcaption { padding: 18px 22px 22px; }
.scene-tag { display: block; font: 600 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--lit); margin-bottom: 10px; }
.scene h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 4px; }
.scene p { margin: 0; color: var(--dim); font-size: 0.97rem; }
.scenes-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 32px; }
.scenes-foot p { margin: 0; color: var(--dim); }
.scenes-foot .cta { margin-top: 0; }
@media (max-width: 720px) {
  .scenes { padding-block: 56px; }
  .scene-grid { grid-template-columns: 1fr; }
}

/* Shared marks */
.stage .sheet, .stage .panel { fill: var(--panel); stroke: var(--hair); }
.stage .sheet-back { opacity: 0.45; }
.stage .sheet-mid { opacity: 0.7; }
.stage .sk rect, .stage .skb { fill: var(--sk); }
.stage .skw { fill: rgba(255, 255, 255, 0.85); }
.stage .mine, .stage .dot { fill: var(--blue); }
.stage .tick { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage .scan, .stage .answer, .stage .bub, .stage .bub circle, .stage .pass, .stage .seal, .stage .mate, .stage .halo { transform-box: fill-box; transform-origin: center; }

/* Scene 1, reading: a light runs down the page, one line is found, the answer cites it */
.scene-read .scan { opacity: 0; animation: sc-scan 7s linear infinite; }
.scene-read .scan-edge { fill: var(--lit); }
.scene-read .sk .found { fill: var(--lit); animation: sc-found 7s linear infinite; }
.scene-read .link { fill: none; stroke: var(--lit); stroke-width: 1.5; stroke-dasharray: 100; animation: sc-link 7s linear infinite; }
.scene-read .answer { animation: sc-answer 7s ease-out infinite; }
@keyframes sc-scan { 0% { transform: translateY(0); opacity: 0; } 3%, 40% { opacity: 1; } 44%, 100% { transform: translateY(108px); opacity: 0; } }
@keyframes sc-found { 0%, 22% { fill: var(--sk); } 26%, 94% { fill: var(--lit); } 100% { fill: var(--sk); } }
@keyframes sc-link { 0%, 44% { stroke-dashoffset: 100; opacity: 1; } 54%, 94% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes sc-answer { 0%, 52% { opacity: 0; transform: translateX(-6px); } 60%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }

/* Scene 2, conversation: a question, the agent typing, the answer, a thank-you */
.scene-chat .typing { opacity: 0; animation: sc-typing 7s linear infinite; }
.scene-chat .typing circle { fill: rgba(255, 255, 255, 0.6); animation: sc-dot 1s ease-in-out infinite; }
.scene-chat .typing circle:nth-of-type(2) { animation-delay: 0.15s; }
.scene-chat .typing circle:nth-of-type(3) { animation-delay: 0.3s; }
.scene-chat .b1 { animation: sc-b1 7s ease-out infinite; }
.scene-chat .reply { animation: sc-reply 7s ease-out infinite; }
.scene-chat .b2 { animation: sc-b2 7s ease-out infinite; }
@keyframes sc-typing { 0%, 13% { opacity: 0; } 17%, 38% { opacity: 1; } 41%, 100% { opacity: 0; } }
@keyframes sc-dot { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-3px); } }
@keyframes sc-b1 { 0%, 3% { opacity: 0; transform: translateY(6px); } 9%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sc-reply { 0%, 40% { opacity: 0; transform: translateY(6px); } 46%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sc-b2 { 0%, 62% { opacity: 0; transform: translateY(6px); } 68%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }

/* Scene 3, trial: the checks pass one by one and the ring closes */
.scene-trial .rule { fill: none; stroke: rgba(255, 255, 255, 0.08); }
.scene-trial .ring { fill: none; stroke: var(--hair); stroke-width: 1.5; }
.scene-trial .track { fill: none; stroke: rgba(255, 255, 255, 0.1); stroke-width: 6; }
.scene-trial .gauge { fill: none; stroke: var(--lit); stroke-width: 6; stroke-dasharray: 100; animation: sc-gauge 7s ease-in-out infinite; }
.scene-trial .seal { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; animation: sc-seal 7s ease-out infinite; }
.scene-trial .p1 { animation: sc-p1 7s ease-out infinite; }
.scene-trial .p2 { animation: sc-p2 7s ease-out infinite; }
.scene-trial .p3 { animation: sc-p3 7s ease-out infinite; }
.scene-trial .p4 { animation: sc-p4 7s ease-out infinite; }
@keyframes sc-p1 { 0%, 10% { opacity: 0; transform: scale(0.4); } 14%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sc-p2 { 0%, 24% { opacity: 0; transform: scale(0.4); } 28%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sc-p3 { 0%, 38% { opacity: 0; transform: scale(0.4); } 42%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sc-p4 { 0%, 52% { opacity: 0; transform: scale(0.4); } 56%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes sc-gauge { 0%, 10% { stroke-dashoffset: 100; } 16%, 24% { stroke-dashoffset: 75; } 30%, 38% { stroke-dashoffset: 50; } 44%, 52% { stroke-dashoffset: 25; } 58%, 94% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 100; } }
@keyframes sc-seal { 0%, 58% { opacity: 0; transform: scale(0.6); } 64%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }

/* Scene 4, team: the Arena hands work out to each agent and gets it back */
.scene-team .edge { fill: none; stroke: var(--hair); stroke-width: 1.5; }
.scene-team .pulse { fill: none; stroke: var(--lit); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 10 200; stroke-dashoffset: 10; animation: sc-pulse 8s linear infinite; }
.scene-team .role { fill: rgba(255, 255, 255, 0.45); animation: sc-role 8s linear infinite; }
.scene-team .mate { animation: sc-mate 8s ease-out infinite; }
.scene-team .tb, .scene-team .tb .role { animation-delay: 2s; }
.scene-team .tc, .scene-team .tc .role { animation-delay: 4s; }
.scene-team .td, .scene-team .td .role { animation-delay: 6s; }
.scene-team .lead { fill: var(--blue); }
.scene-team .lead-a { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.scene-team .halo { fill: none; stroke: var(--lit); stroke-width: 1.5; opacity: 0; animation: sc-halo 2s ease-out infinite; }
@keyframes sc-pulse { 0% { stroke-dashoffset: 10; } 11%, 14% { stroke-dashoffset: -100; } 25%, 100% { stroke-dashoffset: 10; } }
@keyframes sc-mate { 0%, 10% { transform: none; } 12% { transform: scale(1.12); } 16%, 100% { transform: none; } }
@keyframes sc-role { 0%, 10% { fill: rgba(255, 255, 255, 0.45); } 12%, 22% { fill: var(--lit); } 30%, 100% { fill: rgba(255, 255, 255, 0.45); } }
@keyframes sc-halo { 0% { opacity: 0.5; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }

@media (prefers-reduced-motion: reduce) {
  .stage * { animation: none !important; }
}

/* Legal documents */
.doc.doc-head { padding-block: 48px 8px; }
.doc.doc-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); max-width: none; margin-bottom: 8px; }
.doc.doc-head p { color: var(--muted); margin: 0; font-family: var(--mono); font-size: 0.85rem; }
.doc { width: min(var(--doc), 100% - 32px); margin-inline: auto; padding-bottom: 64px; }
.doc h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; margin: 40px 0 10px; }
.doc h3 { font-size: 1.05rem; font-weight: 650; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink-2); }
.doc p { margin: 0 0 12px; }
.doc ul { padding-left: 1.2em; margin: 0 0 12px; }
.doc li { margin-bottom: 6px; }
.summary { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: 12px; padding: 18px 20px; margin-top: 24px; }
.summary p:last-child { margin-bottom: 0; }
blockquote { margin: 12px 0; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; font-size: 0.95rem; }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(21, 24, 29, 0.06); padding: 1px 5px; border-radius: 4px; }

/* Footer */
.footer { border-top: 1px solid var(--line); background: var(--card); font-size: 0.9rem; color: var(--muted); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
