/* Hrrmony product page, in the Aurora Forge Lab system: night sky, aurora light,
   amber signal, and one motif: the lamp field. */

:root {
  --deep: #02060e;
  --night: #050c1a;
  --night-2: #0a1426;
  --night-3: #111e36;
  --ink: #eaf2f8;
  --ink-2: #c8d6e4;
  --muted: #93a7bb;
  --faint: #62778d;
  --line: rgba(150, 205, 245, .14);
  --line-2: rgba(150, 205, 245, .28);
  --aurora: #4fe3d0;
  --aurora-hi: #8cf2e6;
  --cyan: #4cc9f0;
  --blue: #5b8cff;
  --violet: #9b7dff;
  --amber: #ffb547;
  --amber-hot: #ff8a3d;
  --emerald: #58f0a8;
  --display: "Archivo", "Arial Narrow", Impact, sans-serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --nav-h: 68px;
  --gutter: max(clamp(16px, 5vw, 72px), calc((100% - 1240px) / 2));
  --ease: cubic-bezier(.16, 1, .3, 1);
  --chamfer: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
  --chamfer-lg: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  --cell: 12px;
  --seam: 3px;
  --seam-color: var(--deep);
  --lamps:
    repeating-linear-gradient(90deg, transparent 0 calc(var(--cell) - var(--seam)), var(--seam-color) 0 var(--cell)),
    repeating-linear-gradient(0deg, transparent 0 calc(var(--cell) - var(--seam)), var(--seam-color) 0 var(--cell));
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--deep); color-scheme: dark; scroll-padding-top: calc(var(--nav-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--deep); color: var(--ink);
  font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: clip; overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 {
  margin: 0; font-family: var(--display); font-stretch: 72%; font-weight: 800;
  line-height: .94; letter-spacing: -.01em; text-wrap: balance;
}
p { margin: 0; }
code { font: 500 .9em/1 var(--mono); color: var(--aurora-hi); white-space: nowrap; }
::selection { background: var(--aurora); color: var(--night); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 14px;
  background: var(--amber); color: var(--deep); font-weight: 600; text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* ---------- shared parts ---------- */
.kicker {
  margin-bottom: 20px; color: var(--aurora);
  font: 500 12.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.kicker::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 22px; vertical-align: .05em;
  background: currentColor; box-shadow: 12px 0 0 rgba(79, 227, 208, .35);
}
.kicker span { color: var(--faint); }
.sub { margin-top: 22px; max-width: 54ch; color: var(--muted); font-size: 18px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.button {
  --bg: var(--aurora); --fg: var(--night);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 14px 22px; border: 0; background: var(--bg); color: var(--fg);
  font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; clip-path: var(--chamfer);
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s;
}
.button:active { transform: translateY(1px) scale(.99); }
.button:focus-visible { clip-path: none; }
.button-primary:hover { --bg: var(--aurora-hi); }
.button-ghost { --bg: rgba(234, 242, 248, .06); --fg: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.button-ghost:hover { --bg: rgba(234, 242, 248, .11); box-shadow: inset 0 0 0 1px rgba(150, 205, 245, .45); }
.button-small { min-height: 40px; padding: 11px 16px; font-size: 14px; }
.text-link {
  color: var(--ink-2); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2);
  text-underline-offset: 5px; transition: color .2s, text-decoration-color .2s;
}
.text-link:hover { color: var(--ink); text-decoration-color: var(--amber); }

/* dot-matrix glyphs: text is the no-JS fallback, main.js draws lamps over it */
.glyph { position: relative; display: block; min-width: 0; overflow: hidden; }
.glyph canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.glyph-text { font: 800 1em/1 var(--display); font-stretch: 62%; color: var(--aurora); }
.glyph.is-drawn .glyph-text { visibility: hidden; }

/* cursor effects (fine pointers only; main.js writes --mx/--my and draws .heat) */
.heat { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
.hero > .heat { z-index: -1; }
.glow::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(79, 227, 208, .08), transparent 70%);
  transition: opacity .25s;
}
@media (hover: hover) and (pointer: fine) { .glow:hover::before { opacity: 1; } }
.glow > :not(.heat) { position: relative; z-index: 1; }
.card-media > .heat { z-index: 0; }
.card-media img, .card-media table { position: relative; z-index: 1; }
.card-media .glyph, .card-media figcaption { z-index: 1; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px; height: var(--nav-h); padding: 0 var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
}
.site-header.is-scrolled {
  background: rgba(5, 12, 26, .8); border-bottom-color: var(--line);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; image-rendering: pixelated; }
.brand-text { font: 700 19px/1 var(--display); font-stretch: 78%; letter-spacing: .005em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 9px 14px; color: var(--muted); font-size: 15px; font-weight: 500; text-decoration: none;
  clip-path: var(--chamfer); transition: color .2s, background-color .2s;
}
.nav-links a:hover, .nav-links a.is-current { color: var(--ink); background: rgba(79, 227, 208, .1); }
.nav-cta { justify-self: end; }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100svh; padding: calc(var(--nav-h) + 48px) var(--gutter) clamp(56px, 9vh, 104px); overflow: hidden;
  background:
    linear-gradient(180deg, #08102a 0 16%, #0c1734 16% 32%, #111f42 32% 48%, #172850 48% 64%, #1e3260 64% 76%, #0c182c 76%);
}
.sky { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; image-rendering: pixelated; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0; z-index: -1; height: 22%; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 12, 26, .7) 55%, var(--night));
}
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: end; gap: 48px; }
.hero-copy { max-width: 820px; }
.hero h1 { max-width: 12ch; font-size: clamp(54px, 8.2vw, 132px); line-height: .9; text-shadow: 0 2px 40px rgba(2, 6, 14, .6); }
.lede {
  margin-top: 28px; max-width: 54ch; color: var(--ink-2); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55;
  text-shadow: 0 1px 18px rgba(2, 6, 14, .9), 0 0 2px rgba(2, 6, 14, .6);
}
.hero .actions { margin-top: 34px; }

.lab-index {
  padding: 18px; background: rgba(5, 12, 26, .72); box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); clip-path: var(--chamfer);
}
.lab-index-head {
  display: flex; justify-content: space-between; color: var(--faint);
  font: 500 11.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.lab-index ol { margin: 12px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lab-index a {
  display: grid; grid-template-columns: 34px 1fr; gap: 2px 8px; padding: 13px 8px;
  border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color .2s;
}
.lab-index a:hover, .lab-index a:focus-visible { background: rgba(79, 227, 208, .07); }
.ix { grid-row: span 2; color: var(--amber); font: 600 13px/1.6 var(--mono); }
.ix-name { font: 700 21px/1.1 var(--display); font-stretch: 78%; }
.ix-status { color: var(--muted); font-size: 13.5px; }

/* ---------- statement ---------- */
.statement {
  position: relative; z-index: 1; height: 190vh; margin-top: -14vh;
  background: linear-gradient(180deg, transparent, var(--night) 12vh);
}
.statement .pin { position: sticky; top: 0; display: flex; align-items: center; height: 100svh; padding: var(--nav-h) var(--gutter) 0; }
.statement p {
  max-width: 24ch; font: 700 clamp(34px, min(5vw, 7.4vh), 84px)/1.04 var(--display); font-stretch: 74%;
  letter-spacing: -.005em; text-wrap: pretty;
}
.statement em { color: var(--amber); font-style: normal; }
.js .statement .w { color: rgba(234, 242, 248, .18); transition: color .35s var(--ease); }
.js .statement .w.lit { color: var(--ink); }
.js .statement .w.lit.hot { color: var(--amber); }

/* ---------- sections ---------- */
.listen, .features, .install, .cta { position: relative; padding: clamp(72px, 12vh, 140px) var(--gutter); background: var(--night); }
.section-head { max-width: 1000px; margin-bottom: clamp(40px, 7vh, 80px); }
.section-head h2, .cta h2 { font-size: clamp(46px, 6.4vw, 100px); }

/* ---------- demo player ---------- */
.player {
  position: relative; max-width: 1100px; background: linear-gradient(160deg, var(--night-3), var(--night-2) 55%);
  box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--chamfer-lg);
}
.player::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px; opacity: .8;
  background: linear-gradient(90deg, transparent, var(--amber) 30%, var(--aurora) 70%, transparent);
}
.viz { display: block; width: 100%; height: clamp(160px, 26vw, 300px); }
.player-bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 18px clamp(16px, 3vw, 28px) 22px; border-top: 1px solid var(--line);
}
.play {
  display: grid; place-items: center; width: 52px; height: 52px; border: 0; cursor: pointer;
  background: var(--aurora); color: var(--night); clip-path: var(--chamfer); transition: background-color .2s;
}
.play:hover { background: var(--aurora-hi); }
.play:focus-visible { clip-path: none; }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play .i-pause, .player.is-playing .play .i-play { display: none; }
.player.is-playing .play .i-pause { display: inline; }
.seek { position: relative; height: 12px; cursor: pointer; background: var(--lamps), rgba(234, 242, 248, .08); --seam-color: var(--night-2); --cell: 8px; --seam: 2px; }
.seek i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--lamps), var(--amber); --seam-color: var(--night-2); --cell: 8px; --seam: 2px; }
.time { color: var(--muted); font: 500 13px/1 var(--mono); min-width: 4ch; text-align: right; }

/* ---------- feature cards: stacked ---------- */
.card {
  position: sticky; top: calc(var(--nav-h) + 20px + var(--i, 0) * 18px);
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); min-height: min(72svh, 600px);
  margin-bottom: 28px; background: linear-gradient(160deg, var(--night-3), var(--night-2) 55%);
  box-shadow: inset 0 0 0 1px var(--line), 0 -24px 60px -40px rgba(0, 0, 0, .8);
  clip-path: var(--chamfer-lg); transform-origin: 50% 0;
}
.card-1 { --i: 0; --tint: #58f0a8; }
.card-2 { --i: 1; --tint: #ffb14a; }
.card-3 { --i: 2; --tint: #6aa7ff; }
.card-4 { --i: 3; --tint: #b48cff; }
.card::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px; opacity: .8;
  background: linear-gradient(90deg, transparent, var(--tint) 30%, var(--aurora) 70%, transparent);
}
.card-copy { position: relative; z-index: 1; display: flex; flex-direction: column; padding: clamp(28px, 4vw, 56px); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: auto; padding-bottom: 32px; }
.glyph-index { width: 66px; height: 42px; font-size: 40px; }
.status { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font: 500 12.5px/1.3 var(--mono); letter-spacing: .06em; text-align: right; }
.status span { flex: none; width: 8px; height: 8px; background: var(--amber); box-shadow: 0 0 12px rgba(255, 181, 71, .7); }
.card-kicker { color: var(--faint); font: 500 12.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.card h3 { margin-top: 14px; font-size: clamp(42px, 4.8vw, 76px); }
.card-lede { margin-top: 18px; max-width: 50ch; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.tags li { padding: 6px 10px; color: var(--ink-2); font: 500 12.5px/1.3 var(--mono); box-shadow: inset 0 0 0 1px var(--line-2); }
.card-media {
  position: relative; z-index: 1; margin: 0; display: grid; place-items: center; padding: clamp(24px, 3vw, 40px);
  background: radial-gradient(60% 60% at 50% 45%, color-mix(in srgb, var(--tint) 22%, transparent), transparent 75%),
    var(--slate, none) 0 0 / 64px 64px, var(--night);
  image-rendering: pixelated; box-shadow: inset 1px 0 0 var(--line);
}
.card-media figcaption { position: absolute; left: 20px; right: 20px; bottom: 16px; color: var(--muted); font: 500 12px/1.4 var(--mono); }
.glyph-art { width: min(100%, 440px); aspect-ratio: 40 / 18; display: grid; place-items: center; font-size: clamp(56px, 7vw, 110px); text-align: center; }
.glyph-art .glyph-text { color: var(--tint); }
.card-shot img { width: 100%; box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -30px rgba(0, 0, 0, .9); }
.metrics { width: min(100%, 420px); border-collapse: collapse; background: rgba(5, 12, 26, .82); font-size: 15px; }
.metrics caption { padding-bottom: 12px; color: var(--muted); font: 500 12px/1.4 var(--mono); text-align: left; }
.metrics th, .metrics td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.metrics thead th { color: var(--faint); font: 500 11.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.metrics td { font: 600 15px/1 var(--mono); color: var(--ink); }
.metrics td:last-child { color: var(--aurora); }
.metrics tbody th { font-weight: 500; color: var(--ink-2); }

/* ---------- install ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: step; border-top: 1px solid var(--line); }
.steps li { counter-increment: step; display: grid; align-content: start; gap: 14px; padding: 28px 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); color: var(--amber); font: 600 13px/1 var(--mono); }
.steps h3 { font-size: 34px; font-stretch: 74%; }
.steps p { color: var(--muted); font-size: 15px; }
.steps li > * { min-width: 0; }
.code { position: relative; max-width: 100%; background: var(--deep); box-shadow: inset 0 0 0 1px var(--line); clip-path: var(--chamfer); }
.code pre { margin: 0; padding: 16px 16px 56px; overflow-x: auto; font: 500 13px/1.6 var(--mono); color: var(--ink-2); white-space: pre; }
.code code { color: inherit; font: inherit; }
.code .copy { position: absolute; right: 10px; bottom: 10px; }

/* ---------- cta + footer ---------- */
.cta { display: grid; justify-items: start; gap: 34px; padding-bottom: calc(96px + clamp(72px, 10vh, 120px));
  background: linear-gradient(180deg, var(--night), #0c1734 45%, #172850); }
.cta > :not(.ground):not(.heat) { position: relative; z-index: 1; }
.ground { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 96px; image-rendering: pixelated; }
.site-footer > * { min-width: 0; }
.site-footer { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(36px, 6vh, 64px); padding: clamp(56px, 10vh, 96px) var(--gutter) 28px; background: var(--deep); }
.glyph-wordmark { width: min(100%, 900px); aspect-ratio: 41 / 7; font-size: clamp(48px, 12vw, 160px); }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-cols h2 { margin-bottom: 14px; color: var(--faint); font: 500 11.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.footer-cols a { display: block; padding: 5px 0; color: var(--ink-2); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); }
.footer-cols p { max-width: 42ch; color: var(--muted); font-size: 14px; }
.footer-base { padding-top: 22px; border-top: 1px solid var(--line); color: var(--faint); font: 500 12px/1.3 var(--mono); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .lab-index { max-width: 520px; }
  .card { position: relative; top: auto; grid-template-columns: 1fr; min-height: 0; }
  .card-media { min-height: 260px; box-shadow: inset 0 1px 0 var(--line); }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 26px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .footer-cols { grid-template-columns: 1fr; }
  .statement { height: auto; margin-top: 0; }
  .statement .pin { position: static; height: auto; padding: 96px var(--gutter); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
