/* hz/craft. — coming soon. Clean static styles, no framework.
   Color + type tokens lifted from the HzCraft design system (dark + paper). */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@600;700;800&family=Hanken+Grotesk:wght@400;500;600&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --bg-1: oklch(0.184 0.020 236);
  --fg-0: oklch(0.980 0.007 82);
  --fg-1: oklch(0.935 0.008 80);
  --fg-2: oklch(0.822 0.007 78);
  --fg-3: oklch(0.700 0.008 260);
  --fg-4: oklch(0.585 0.009 255);
  --line: oklch(0.305 0.015 250 / 0.9);
  --line-soft: oklch(0.305 0.015 250 / 0.5);
  --accent: oklch(0.735 0.120 176);
  --accent-fg: oklch(0.180 0.030 200);
  --accent-2: oklch(0.628 0.208 30);
  --success: oklch(0.730 0.150 152);
  --caution: oklch(0.805 0.135 82);
  --grid-line: oklch(0.305 0.015 250 / 0.35);
}

[data-theme="paper"] {
  --bg-1: oklch(0.970 0.005 85);
  --fg-0: oklch(0.205 0.012 255);
  --fg-1: oklch(0.255 0.012 255);
  --fg-2: oklch(0.400 0.012 255);
  --fg-3: oklch(0.520 0.012 255);
  --fg-4: oklch(0.620 0.012 255);
  --line: oklch(0.300 0.010 250 / 0.16);
  --line-soft: oklch(0.300 0.010 250 / 0.09);
  --accent: oklch(0.560 0.110 178);
  --accent-fg: oklch(0.985 0.005 90);
  --accent-2: oklch(0.560 0.200 30);
  --grid-line: oklch(0.300 0.010 250 / 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── layered, instrument-grade background ───────────────────────────────── */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 104px 104px;
  opacity: 0.5;
  -webkit-mask-image: radial-gradient(135% 105% at 50% 48%, #000 38%, transparent 94%);
          mask-image: radial-gradient(135% 105% at 50% 48%, #000 38%, transparent 94%);
}
[data-theme="paper"] .bg-grid { opacity: 0.7; }
.bg-scan {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(140, 190, 184, 0.05) 0 1px, transparent 1px 3px);
}
[data-theme="paper"] .bg-scan { display: none; }
.bg-grain {
  position: absolute; inset: 0;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
[data-theme="paper"] .bg-grain { opacity: 0.07; mix-blend-mode: multiply; }
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(125% 95% at 50% 42%, transparent 48%, rgba(0, 0, 0, 0.58) 100%);
}
[data-theme="paper"] .bg-vignette {
  background: radial-gradient(125% 95% at 50% 42%, transparent 55%, rgba(40, 48, 58, 0.13) 100%);
}

/* ── header rail ────────────────────────────────────────────────────────── */
.cs-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(20px, 3.4vw, 40px) clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--font-mono); font-weight: 600; font-size: 30px;
  letter-spacing: 0.04em; color: var(--fg-0); line-height: 1; white-space: nowrap;
}
.logo i { font-style: normal; color: var(--accent); }
.head-right { display: flex; align-items: center; gap: 24px; }

.mono {
  font-family: var(--font-mono); font-weight: 500; font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-4);
}

.toggle {
  display: flex; align-items: center; gap: 2px; padding: 2px;
  border: 1px solid var(--line); border-radius: 999px;
}
.toggle button {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  border: none; padding: 5px 11px; border-radius: 999px;
  background: transparent; color: var(--fg-3);
}
.toggle button:hover { color: var(--fg-1); }
.toggle button[aria-pressed="true"] { background: #34BDAE; color: #0b1a18; }

/* ── signal band (the hero) ─────────────────────────────────────────────── */
.band {
  position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-50%);
  height: min(48vh, 460px); z-index: 1;
}
.band-frame {
  position: absolute; inset: 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
#scope { width: 100%; height: 100%; display: block; }
.band-label { position: absolute; font-size: 11px; }
.lbl-out { left: clamp(24px, 5vw, 72px); top: -11px; color: var(--accent); }
.lbl-in  { right: clamp(24px, 5vw, 72px); top: -11px; color: var(--fg-2); }
.lbl-tr  { right: clamp(24px, 5vw, 72px); bottom: -11px; color: var(--fg-4); }

/* ── footer ─────────────────────────────────────────────────────────────── */
.cs-footer {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: clamp(24px, 4vw, 56px) clamp(24px, 5vw, 72px); gap: 32px;
}
.foot-left { display: flex; flex-direction: column; gap: 16px; }
.tagline {
  margin: 0; font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 4vw, 46px); letter-spacing: -0.025em;
  line-height: 1.05; max-width: 640px; color: var(--fg-0);
}
.status { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--caution); --dot-color: var(--caution);
  animation: hzpulse 1s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.status .mono { color: var(--fg-2); }
.status .sub  { color: var(--fg-4); }
.cs-venture { font-size: 11px; text-align: right; white-space: nowrap; line-height: 1.7; }

@keyframes hzpulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--dot-color, var(--success)); }
  50%      { opacity: 0.25; box-shadow: 0 0 0 5px transparent; }
}
@media (prefers-reduced-motion: reduce) { .status .dot { animation: none; } }

/* ── mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .cs-hlabel { display: none; }
  .cs-venture { display: none; }
  .cs-footer { flex-direction: column; align-items: flex-start; gap: 18px; }
}
