/* Layout: one left-weighted reading column floating over a live, scroll-driven light field.
   Sections are separated by space and soft scrims, never by boxes. Single dark theme by choice:
   the field is a night sky, and the page commits to it. */
:root {
  --night: #090c13;        /* page ground, blue-biased near-black */
  --night-2: #111622;      /* raised wash for fields */
  --frost: #ecebf3;        /* primary text, faintly violet white */
  --haze: #a7abbd;         /* secondary text */
  --dim: #6f7489;          /* tertiary, rules */
  --lilac: #c8b8ff;        /* links, focus, the one UI accent */
  --ember: #ffbf9a;        /* tiny warm signal: live dot, success */

  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.4vw, 2.6rem);
  --step-hero: clamp(3.6rem, 1.6rem + 10vw, 11.5rem);

  --gutter: clamp(16px, 4vw, 56px);
  --col: 40rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

@font-face { font-family: "Familjen Grotesk"; src: url("/fonts/familjen.414d5dfe5f.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/atkinson.18b2a1a39a.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url("/fonts/martian.f9c1655c2c.woff2") format("woff2"); font-weight: 300 500; font-stretch: 75% 112.5%; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: transparent; /* html carries the ground so the fixed canvas can sit behind the content */
  color: var(--frost);
  font: 400 var(--step-0)/1.6 var(--body);
  padding-inline: var(--gutter);
  padding-block: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
::selection { background: color-mix(in oklab, var(--lilac) 45%, transparent); color: var(--frost); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 4px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the field ---------- */
#field, .field-fallback, .grain {
  position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
#field { z-index: -3; display: block; }
.field-fallback {
  z-index: -4;
  background:
    radial-gradient(60% 50% at 78% 28%, rgba(120, 220, 200, .28), transparent 70%),
    radial-gradient(50% 60% at 92% 70%, rgba(170, 140, 255, .26), transparent 70%),
    radial-gradient(40% 40% at 60% 8%, rgba(255, 190, 150, .14), transparent 70%),
    var(--night);
}
.has-gl .field-fallback { opacity: 0; transition: opacity 1.2s; }
.grain {
  z-index: -2; opacity: .11; mix-blend-mode: overlay;
  background-image: url("/img/grain.63cda3004f.png");
  background-size: 160px;
}
/* a soft dark wash on the reading side so text never fights the art */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(9, 12, 19, .82) 0%, rgba(9, 12, 19, .55) 38%, rgba(9, 12, 19, 0) 70%),
    linear-gradient(0deg, rgba(9, 12, 19, .55), rgba(9, 12, 19, 0) 35%);
}
@media (max-width: 720px) {
  body::before { background: linear-gradient(180deg, rgba(9, 12, 19, .12), rgba(9, 12, 19, .62) 50%, rgba(9, 12, 19, .74)); }
}

/* ---------- chrome ---------- */
.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 10;
  background: var(--frost); color: var(--night); padding: .5rem .8rem; border-radius: 4px; text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 12px); }

.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.1rem;
  font: 400 var(--step--1)/1 var(--mono);
  letter-spacing: .02em;
}
.top::before {
  content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1;
  background: linear-gradient(180deg, rgba(9, 12, 19, .78), rgba(9, 12, 19, 0));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}
.mark {
  font: 700 1.15rem/1 var(--display); letter-spacing: -.04em; text-decoration: none;
  display: inline-grid; place-items: center; width: 2.3rem; height: 2.3rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(200, 184, 255, .35), rgba(200, 184, 255, .05) 70%);
}
.top nav { display: flex; gap: clamp(.9rem, 2.4vw, 2rem); flex-wrap: wrap; justify-content: flex-end; }
.top nav a { text-decoration: none; color: var(--haze); padding-block: .4rem; transition: color .3s; }
.top nav a:hover, .top nav a[aria-current="true"] { color: var(--frost); }
.top nav a[aria-current="true"]::before { content: "\2022 "; color: var(--ember); }
@media (max-width: 520px) {
  .top nav a:not([href="#contact"]) { display: none; }
}

/* ---------- type ---------- */
.eyebrow {
  font: 400 var(--step--1)/1.4 var(--mono);
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--haze); margin: 0;
}
.eyebrow .sep { color: var(--dim); margin-inline: .35em; }
.eyebrow .kp[hidden], .eyebrow .sep:has(+ .kp[hidden]) { display: none; }
.kp-high { color: var(--ember); }
h2 {
  font: 600 var(--step-2)/1.05 var(--display);
  letter-spacing: -.025em; margin: .6rem 0 1.4rem;
  text-wrap: balance; max-width: 18ch;
}
.prose { max-width: var(--col); display: grid; gap: 1rem; }
.prose p, .prose-line { margin: 0; color: color-mix(in oklab, var(--frost) 88%, var(--haze)); }
.prose-line { max-width: var(--col); }

/* ---------- hero ---------- */
main { display: grid; gap: clamp(7rem, 16vw, 13rem); padding-bottom: 6rem; }
.hero { padding-top: clamp(4rem, 14vh, 9rem); }
.name {
  font: 700 var(--step-hero)/.84 var(--display);
  letter-spacing: -.055em;
  margin: 1.4rem 0 2rem -.05em;
  display: flex; flex-direction: column;
}
.name .line { display: block; white-space: nowrap; }
.name .line + .line { padding-left: .62em; color: color-mix(in oklab, var(--frost) 82%, var(--lilac)); }
.name .g { display: inline-block; }
.name .g.scr { font-family: var(--mono); font-weight: 300; color: var(--lilac); font-stretch: 75%; }
.lede {
  font-size: var(--step-1); line-height: 1.45; max-width: 32ch; margin: 0;
  text-wrap: pretty;
}
.hint {
  margin: 2.6rem 0 0; display: flex; align-items: center; gap: .7rem;
  font: 400 var(--step--1)/1.4 var(--mono); color: var(--haze); max-width: 36ch;
  transition: opacity .8s;
}
.hint.gone { opacity: 0; }
.no-gl .hint { display: none; }
.hint-dot {
  flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--ember);
  box-shadow: 0 0 0 0 rgba(255, 191, 154, .6);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 191, 154, .55); } 80%, 100% { box-shadow: 0 0 0 .9rem rgba(255, 191, 154, 0); } }

/* ---------- bands ---------- */
.band { position: relative; scroll-margin-top: 5rem; }

.promises {
  list-style: none; padding: 0; margin: 2.2rem 0 0; max-width: 46rem;
  display: grid; gap: 0;
}
.promises li {
  display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); gap: 1.2rem;
  padding-block: 1.05rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(167, 171, 189, .35), rgba(167, 171, 189, 0) 85%) 1;
}
.promises .k { font: 600 var(--step-0)/1.4 var(--display); }
.promises .v { color: var(--haze); }
@media (max-width: 560px) { .promises li { grid-template-columns: minmax(0, 1fr); gap: .2rem; } }

.sub { margin-top: 3.6rem; }
.sub h3 { font: 600 var(--step-1)/1.2 var(--display); letter-spacing: -.01em; margin: 0 0 .8rem; }

.cta-line { margin: 2rem 0 0; }
.text-link {
  font: 500 var(--step-0)/1.3 var(--display); text-decoration: none; color: var(--frost);
  background: linear-gradient(90deg, var(--lilac), var(--ember)) 0 100% / 100% 1px no-repeat;
  padding-bottom: .25rem; transition: background-size .4s var(--ease);
}
.text-link::after { content: "  \2192"; color: var(--lilac); }
.text-link:hover { background-size: 100% 3px; }
.inline-link { color: var(--frost); text-decoration-color: var(--lilac); text-underline-offset: .2em; }
.inline-link:hover { color: var(--lilac); }

/* ---------- lab ---------- */
.path { margin: 3rem 0 0; max-width: 58rem; }
.path .eyebrow { margin-bottom: 1.4rem; }
.hops { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 0; }
.hops::before {
  content: ""; position: absolute; left: .32rem; top: .9rem; bottom: .9rem; width: 1px;
  background: linear-gradient(180deg, rgba(200, 184, 255, .5), rgba(143, 227, 200, .4) 60%, rgba(255, 191, 154, .5));
}
.hops li {
  position: relative; display: grid; grid-template-columns: minmax(6rem, 9rem) minmax(0, 1fr);
  gap: 1rem; padding: .7rem 0 .7rem 1.8rem; align-items: baseline;
}
.hops li::before {
  content: ""; position: absolute; left: 0; top: 1.05rem; width: .65rem; height: .65rem; border-radius: 50%;
  background: var(--night); border: 1px solid rgba(200, 184, 255, .7);
  transition: background .35s, box-shadow .35s;
}
.hops li.lit::before { background: var(--lilac); box-shadow: 0 0 18px 4px rgba(200, 184, 255, .45); }
.hop-k { font: 400 var(--step--1)/1.6 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--frost); }
.hop-v { color: var(--haze); }
.hops .split .hop-v { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; }
.gpu { font: 500 var(--step-0)/1.4 var(--display); color: var(--frost); }
.gpu em { font: 400 var(--step--1)/1 var(--mono); font-style: normal; color: var(--haze); margin-left: .4rem; }
@media (max-width: 560px) { .hops li { grid-template-columns: minmax(0, 1fr); gap: .1rem; } }

.facts {
  margin: 4rem 0 0; display: grid; gap: 2.2rem 3rem; max-width: 64rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.facts div { min-width: 0; }
.facts dt { font: 600 var(--step-1)/1.2 var(--display); letter-spacing: -.01em; margin-bottom: .6rem; }
.facts dd { margin: 0; color: var(--haze); }

/* ---------- contact ---------- */
.form { margin-top: 2.4rem; max-width: 40rem; display: grid; gap: 1.6rem; position: relative; }
.form::before {
  /* a feathered pool of darkness under the form, no edges */
  content: ""; position: absolute; inset: -3rem -4rem; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(9, 12, 19, .75), rgba(9, 12, 19, 0));
}
.topics { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.topics label { position: relative; cursor: pointer; }
.topics input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.topics span {
  display: inline-block; padding: .55rem 1rem; border-radius: 999px;
  font: 400 var(--step--1)/1.2 var(--mono); color: var(--haze);
  background: rgba(236, 235, 243, .05);
  box-shadow: inset 0 0 0 1px rgba(167, 171, 189, .25);
  transition: color .25s, background .25s, box-shadow .25s;
}
.topics input:checked + span { color: var(--night); background: var(--frost); box-shadow: none; }
.topics input:focus-visible + span { outline: 2px solid var(--lilac); outline-offset: 3px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.6rem; }
.field { display: grid; gap: .45rem; min-width: 0; }
.field > span { font: 400 var(--step--1)/1 var(--mono); color: var(--haze); letter-spacing: .03em; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--frost);
  background: rgba(17, 22, 34, .55);
  border: 0; border-radius: 6px 6px 0 0;
  box-shadow: inset 0 -1px 0 rgba(167, 171, 189, .45);
  padding: .8rem .9rem; resize: vertical;
  transition: box-shadow .3s, background .3s;
}
.field input:focus, .field textarea:focus {
  outline: none; background: rgba(17, 22, 34, .8);
  box-shadow: inset 0 -2px 0 var(--lilac);
}
.field input:user-invalid, .field textarea:user-invalid { box-shadow: inset 0 -2px 0 var(--ember); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
button {
  font: 600 var(--step-0)/1 var(--display); color: var(--night); cursor: pointer;
  border: 0; border-radius: 999px; padding: 1rem 1.6rem;
  background: linear-gradient(100deg, var(--frost), color-mix(in oklab, var(--lilac) 55%, var(--frost)));
  transition: transform .25s var(--ease), filter .25s;
}
button:hover { transform: translateY(-2px); filter: brightness(1.06); }
button:disabled { opacity: .55; cursor: progress; transform: none; }
.status { margin: 0; font: 400 var(--step--1)/1.5 var(--mono); color: var(--haze); max-width: 30ch; }
.status.ok { color: var(--ember); }
.status.err { color: var(--frost); }

/* ---------- footer ---------- */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem;
  padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px));
  font: 400 var(--step--1)/1.6 var(--mono); color: var(--dim);
}
.foot p { margin: 0; }
.specs { max-width: 52ch; }

/* ---------- scroll-driven entrances (progressive; content is visible without them) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .band h2, .band .prose, .promises li, .facts div, .hops li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from { opacity: .15; transform: translateY(2.2rem); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
