/* Haku — theme tokens */
:root {
  --accent: #e15024;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in oklab, var(--accent) 12%, transparent);
  --accent-tint: color-mix(in oklab, var(--accent) 6%, #ffffff);
  --accent-edge: color-mix(in oklab, var(--accent) 30%, transparent);

  --bg: #fbfbfa;
  --bg-elev: #ffffff;
  --ink: #0b0b0c;
  --ink-2: #1a1a1d;
  --ink-3: #49494f;
  --ink-4: #8a8a92;
  --ink-5: #c6c6cc;
  --ink-6: #e8e8ea;
  --ink-7: #f3f3f2;

  --ok: #1c8a5a;
  --warn: #b25f00;
  --alert: #c9281a;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 22px;

  --maxw: 1240px;
  --gutter: 28px;

  --dur: 400ms;
  --ease: cubic-bezier(.2,.7,.2,1);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono { font-family: var(--font-mono); font-feature-settings: 'ss01','cv11'; letter-spacing: -0.01em; }
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  --h: 44px;
  height: var(--h);
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--accent); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-6);
}
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn .arr {
  transition: transform var(--dur) var(--ease);
}
.btn:hover .arr { transform: translateX(3px); }

.rule { height: 1px; background: var(--ink-6); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--font-mono);
  background: var(--ink-7);
  color: var(--ink-3);
  border: 1px solid var(--ink-6);
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-4); }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-edge); }
.chip.accent .dot { background: var(--accent); }

.section { padding: 120px 0; position: relative; }
.section-sm { padding: 72px 0; }

.h-eyebrow { margin-bottom: 24px; }
.h-title {
  font-size: clamp(40px, 5.4vw, 76px);
  letter-spacing: -0.04em;
  line-height: 0.96;
  font-weight: 600;
  font-family: var(--font-display);
  max-width: 18ch;
}
.h-sub {
  font-size: 18px;
  color: var(--ink-3);
  margin-top: 20px;
  max-width: 56ch;
  line-height: 1.5;
}

/* Section heads */
.sec-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 40px; margin-bottom: 56px; }
.sec-head h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 12px 0 0 0;
  max-width: 22ch;
}
.sec-head p { color: var(--ink-3); max-width: 42ch; font-size: 16px; margin: 0; }

/* Cards */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--ink-6);
  border-radius: var(--r-lg);
}

/* Scroll cue */
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.8); opacity: 0.35; }
}
.live-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--accent);
  position: relative;
}
.live-dot::after {
  content: '';
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--accent);
  animation: pulse-dot 1.6s var(--ease) infinite;
}

@keyframes slide-in-feed {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-out-feed {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

/* Utility */
.flex { display: flex; }
.grid { display: grid; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }

@media (max-width: 1100px) {
  .loop-grid { grid-template-columns: 1fr 1fr 1fr !important; }
  .loop-grid > div:nth-child(-n+3) { border-bottom: 1px solid var(--ink-6); }
  .loop-grid > div:nth-child(3) { border-right: none !important; }
  .loop-grid > div:nth-child(3) > div:last-child { display: none; }
}
@media (max-width: 760px) {
  .loop-grid { grid-template-columns: 1fr 1fr !important; }
  .loop-grid > div { border-right: none !important; border-bottom: 1px solid var(--ink-6); }
  .loop-grid > div:last-child { border-bottom: none; }
}

@media (max-width: 900px) {
  .dm-metrics { grid-template-columns: 1fr 1fr !important; }
  .dm-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink-6); }
  .dm-metrics > div:nth-child(2) { border-right: none !important; }
  .dm-grid { grid-template-columns: 1fr !important; }
}

.how-grid { }
@media (max-width: 1100px) {
  .how-grid { grid-template-columns: 1fr 1fr !important; }
  .how-grid > div:nth-child(1), .how-grid > div:nth-child(2) { border-bottom: 1px solid var(--ink-6); }
  .how-grid > div:nth-child(2) { border-right: none !important; }
}
@media (max-width: 760px) {
  .how-grid { grid-template-columns: 1fr !important; }
  .how-grid > div { border-right: none !important; border-bottom: 1px solid var(--ink-6); }
  .how-grid > div:last-child { border-bottom: none; }
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr !important; gap: 56px !important; }
  .float-chip-tl, .float-chip-br { display: none !important; }
  .dash-grid { grid-template-columns: 1fr !important; }
  .dash-sidebar, .dash-right { display: none !important; }
  .dash-table { grid-template-columns: 1fr 110px 160px !important; }
  .dash-header { grid-template-columns: 1fr 110px 160px !important; }
  .dash-action { display: none !important; }
  .uc-grid { grid-template-columns: 240px 1fr !important; }
  .test-grid { grid-template-columns: 1fr !important; gap: 56px !important; }
  .cta-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
}
@media (max-width: 760px) {
  .sec-head { grid-template-columns: 1fr !important; }
  .uc-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .nav-links { display: none !important; }
  .logo-strip-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .h-title { font-size: 44px !important; }
  .dash-table { grid-template-columns: 1fr 70px !important; }
  .dash-header { grid-template-columns: 1fr 70px !important; }
  .dash-signals-col { display: none !important; }
}
