/* Weepline. Dark-only by brand decision (brand board is dark-first).
   Radius rule: interactive controls are full pills, panels and cells are 16px. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0f12;
  --surface: #1a1d23;
  --surface-2: #14161b;
  --line: rgb(245 246 247 / 0.09);
  --line-strong: rgb(245 246 247 / 0.16);
  --text: #f5f6f7;
  --muted: #a3a8b3;      /* 7.6:1 on --bg */
  --dim: #7d828d;        /* 4.8:1 on --bg */
  --blue: #2d8cff;
  --blue-soft: rgb(45 140 255 / 0.14);
  --amber: #ffb020;
  --amber-soft: rgb(255 176 32 / 0.12);
  --r-panel: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wrap: 1240px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.08; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 30;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 999px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Icons: Phosphor Light SVGs used as masks so they take currentColor */
.icon {
  display: inline-block; width: 24px; height: 24px; flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 550; text-decoration: none; white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
/* White on #2D8CFF is only 3.4:1, so the label uses the brand near-black (5.9:1). */
.btn-primary { background: var(--blue); color: var(--bg); }
.btn-primary:hover { background: #4a9bff; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: rgb(245 246 247 / 0.32); background: rgb(245 246 247 / 0.04); }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgb(14 15 18 / 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand img { height: 16px; width: auto; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 767px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
}

/* Hero */
.hero { padding: 88px 0 112px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 550; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue); margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 4.6vw, 60px); max-width: 15ch; }
.lede { margin-top: 24px; font-size: 19px; color: var(--muted); max-width: 44ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-visual {
  margin: 0; position: relative; aspect-ratio: 7 / 5;
  border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden;
  background: var(--surface-2);
}
.hero-visual canvas { width: 100%; height: 100%; }
@media (max-width: 899px) {
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; min-height: 0; }
}

/* Section rhythm */
section h2 { font-size: clamp(30px, 3.6vw, 46px); max-width: 20ch; }
.section-lede { margin-top: 18px; font-size: 18px; color: var(--muted); max-width: 60ch; }
.problem, .how, .platform, .capabilities { padding: 112px 0; }
@media (max-width: 767px) { .problem, .how, .platform, .capabilities { padding: 72px 0; } }

/* Problem figures */
.problem { border-top: 1px solid var(--line); }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 64px; }
.figure { border-top: 1px solid var(--line-strong); padding-top: 28px; }
.figure-num { font-size: clamp(48px, 7vw, 96px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.figure-text { margin-top: 16px; font-size: 18px; color: var(--muted); max-width: 30ch; }
.source { margin-top: 40px; font-size: 13px; color: var(--dim); }
@media (max-width: 767px) { .figures { grid-template-columns: 1fr; gap: 40px; margin-top: 40px; } }

/* How it works: steps hang off a vertical pipe that fills on scroll */
.how-grid { display: grid; grid-template-columns: 4fr 7fr; gap: 64px; align-items: start; }
.how h2 { position: sticky; top: 120px; }
.steps { list-style: none; margin: 0; padding: 0 0 0 56px; position: relative; display: grid; gap: 64px; }
.steps::before, .steps::after {
  content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px;
}
.steps::before { background: var(--line-strong); }
.steps::after { background: var(--blue); transform-origin: top; transform: scaleY(0); }
/* Fallback: fill once the list is on screen. Scroll-driven browsers override below. */
.steps.is-in::after { transform: scaleY(1); transition: transform 1.6s var(--ease); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .steps { view-timeline-name: --steps; }
    .steps::after, .steps.is-in::after { transition: none; animation: pipe-fill linear both; animation-timeline: --steps; animation-range: entry 30% cover 65%; }
  }
}
@keyframes pipe-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.step { position: relative; }
.step-dot {
  position: absolute; left: -62px; top: -6px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; z-index: 1;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--blue);
}
.step-dot .icon { width: 18px; height: 18px; }
.step h3 { font-size: 24px; }
.step p { margin-top: 10px; color: var(--muted); max-width: 52ch; }
@media (max-width: 899px) {
  .how-grid { grid-template-columns: 1fr; gap: 48px; }
  .how h2 { position: static; }
}

/* Platform console (real SVG component, sample data) */
.console {
  margin-top: 56px; display: grid; grid-template-columns: 64px 1fr 300px;
  border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden;
  background: var(--surface-2); min-height: 480px;
}
.console-rail { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 26px 0; border-right: 1px solid var(--line); color: var(--dim); }
.console-rail .is-active { color: var(--blue); }
.console-map { position: relative; min-width: 0; }
.console-map svg { width: 100%; height: 100%; }
.console-panel { border-left: 1px solid var(--line); padding: 26px 24px; background: var(--surface); }
.alert-title { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--amber); }
.alert-ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--amber); }
.alert-label { margin-top: 28px; font-size: 13px; color: var(--muted); }
.alert-conf { font-size: 44px; font-weight: 600; letter-spacing: -0.03em; color: var(--amber); font-variant-numeric: tabular-nums; line-height: 1.1; }
.alert-spark { margin-top: 12px; width: 100%; height: 48px; }
.alert-spark path { fill: none; stroke: var(--amber); stroke-width: 1.5; stroke-linejoin: round; }
.alert-meta { margin: 24px 0 0; display: grid; gap: 16px; }
.alert-meta dt { font-size: 12px; color: var(--dim); }
.alert-meta dd { margin: 2px 0 0; font-size: 14px; color: var(--text); }
.console-panel.is-swapping .alert-conf,
.console-panel.is-swapping .alert-meta dd { opacity: 0; transform: translateY(4px); }
.alert-conf, .alert-meta dd { transition: opacity 0.35s var(--ease), transform 0.35s var(--ease); }
.caption { margin-top: 14px; font-size: 13px; color: var(--dim); }
@media (max-width: 899px) {
  .console { grid-template-columns: 1fr; }
  .console-rail { display: none; }
  .console-map { aspect-ratio: 5 / 3; }
  .console-panel { border-left: 0; border-top: 1px solid var(--line); }
}

/* Network SVG styling */
#network .street { stroke: rgb(245 246 247 / 0.05); stroke-width: 1; }
#network .main { stroke: var(--blue); stroke-width: 1.6; fill: none; opacity: 0.85; }
#network .node { fill: var(--bg); stroke: var(--blue); stroke-width: 1.5; }
#network .leak-path { stroke: var(--amber); stroke-width: 2.4; fill: none; }
#network .leak-core { fill: var(--amber); }
#network .leak-halo { fill: none; stroke: var(--amber); stroke-width: 1.5; }

/* Capabilities bento */
.bento { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cell {
  position: relative; overflow: hidden; border-radius: var(--r-panel);
  border: 1px solid var(--line); background: var(--surface-2); padding: 32px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
}
.cell h3 { font-size: 22px; }
.cell p { color: var(--muted); max-width: 42ch; }
.cell-wide { grid-column: span 2; }
.cell-icon { color: var(--blue); margin-bottom: auto; width: 28px; height: 28px; }
.cell-blue { background: radial-gradient(120% 90% at 100% 0%, rgb(45 140 255 / 0.22), transparent 60%), var(--surface-2); }
.cell-amber {
  flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px;
  background: radial-gradient(90% 120% at 100% 100%, rgb(255 176 32 / 0.16), transparent 60%), var(--surface-2);
}
.cell-amber .cell-icon { color: var(--amber); margin: 0; }
.cell-icon-lg { width: 56px; height: 56px; }
.cell-wave { justify-content: space-between; }
.cell-wave .cell-copy { order: 2; }
.bars { order: 1; display: flex; align-items: center; gap: 5px; height: 96px; }
.bars span { flex: 1; max-width: 6px; border-radius: 3px; background: var(--blue); opacity: 0.35; height: var(--h, 20%); transform-origin: center; }
.bars span.is-peak { opacity: 1; }
@media (max-width: 899px) {
  .bento { grid-template-columns: 1fr; }
  .cell-wide { grid-column: auto; }
  .cell { min-height: 0; padding: 28px; }
}

/* Pilot CTA */
.pilot { position: relative; padding: 40px 0 128px; border-top: 1px solid var(--line); }
.pilot-line { display: flex; align-items: flex-start; width: 100%; }
.pl-run { flex: 1; height: 2.5px; margin-top: 12.75px; background: var(--blue); }
.pl-left { transform-origin: left; }
.pl-right { transform-origin: left; }
.pl-drop { flex: none; overflow: visible; }
.pl-drop path { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pilot-inner { margin-top: 40px; display: grid; justify-items: center; text-align: center; gap: 20px; }
.pilot-inner h2 { max-width: 18ch; }
.pilot-inner p { color: var(--muted); max-width: 48ch; font-size: 18px; }
.pilot-inner .btn { margin-top: 12px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: start; }
.footer-inner img { height: 13px; width: auto; }
.footer-inner > div p { margin-top: 14px; font-size: 14px; color: var(--muted); }
.footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer nav a { font-size: 14px; color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.copyright { grid-column: 1 / -1; font-size: 13px; color: var(--dim); }
@media (max-width: 767px) { .footer-inner { grid-template-columns: 1fr; } }

/* Motion: reveal on enter, line drawing. All gated on reduced-motion preference. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  /* The pipe draws left to right: left run, then the drop, then the right run. */
  .js .pl-run { transform: scaleX(0); transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1); }
  .js .pl-drop path { stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s linear 0.95s; }
  .js .pl-right { transition-delay: 1.8s; }
  .js .pilot.is-in .pl-run { transform: scaleX(1); }
  .js .pilot.is-in .pl-drop path { stroke-dashoffset: 0; }
  #network .leak-halo { transform-box: fill-box; transform-origin: center; animation: halo 2s ease-out infinite; }
  .bars span { animation: bar 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -90ms); }
  .alert-ring { animation: ring 2s ease-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .steps::after { transform: scaleY(1); }
}
@keyframes bar { 0%, 100% { transform: scaleY(0.55); } 50% { transform: scaleY(1); } }
@keyframes halo { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgb(255 176 32 / 0.5); } 100% { box-shadow: 0 0 0 10px rgb(255 176 32 / 0); } }
