@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Colors come from the ZL Norman Labs mark: deep teal, cream, gold. One theme. */
:root {
  --ground: #10292a;
  --ground-2: #15393a;
  --ink: #f1ede3;
  --ink-2: #a9bdb7;
  --line: rgb(241 237 227 / .13);
  --gold: #c9a15e;
  --on-gold: #10292a;
  --shadow: 0 30px 60px -30px rgb(3 14 14 / .9), 0 0 0 1px rgb(241 237 227 / .06);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; background: var(--ground); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Hanken Grotesk", system-ui, sans-serif;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { margin: 0; font-family: "Newsreader", Georgia, serif; font-weight: 500; font-optical-sizing: auto; }
p { margin: 0; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
@media (min-width: 768px) { .wrap { width: min(1180px, 100% - 64px); } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 12px; z-index: 30; }
.skip:focus { left: 8px; }

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.mark img { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.top nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.top nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.top nav a:hover { color: var(--gold); }
@media (max-width: 420px) { .top nav a[href="#about"] { display: none; } }

/* Hero */
.hero { display: grid; gap: 32px; padding-block: 24px 64px; align-items: center; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; gap: 48px; padding-block: 32px 120px; min-height: min(760px, calc(100dvh - 76px)); }
}
h1 {
  font-size: clamp(3.4rem, 8.6vw, 7.4rem);
  font-weight: 450;
  line-height: .98;
  letter-spacing: -.025em;
}
h1 .line { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
h1 .line > span { display: block; }
.lede { margin-top: 28px; font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; max-width: 36ch; color: var(--ink-2); }
.lede a { color: var(--ink); text-decoration-color: var(--gold); }
.lede a:hover { color: var(--gold); }
.actions { margin-top: 36px; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--on-gold);
  text-decoration: none;
  font-weight: 650;
  padding: 13px 22px;
  border-radius: 999px;
  transition: transform .15s ease, background-color .15s ease;
}
.btn:hover { background: #d6b06e; }
.btn:active { transform: translateY(1px) scale(.98); }
.quiet { color: var(--ink); font-weight: 500; }

/* Constellation */
.sky { margin: 0; width: 100%; max-width: 560px; justify-self: center; }
@media (min-width: 900px) { .sky { justify-self: end; } }
.sky svg { width: 100%; height: auto; display: block; overflow: visible; transform-origin: 50% 40%; }
.sky figcaption { margin-top: 10px; font-size: .9rem; color: var(--ink-2); }
#dust circle { fill: var(--ink); }
.cline { fill: none; stroke: var(--gold); stroke-width: .28; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.clabel { fill: var(--ink-2); font: italic 400 3px "Newsreader", Georgia, serif; }
.star { cursor: pointer; }
.star:focus { outline: none; }
.star .halo { fill: url(#glow); opacity: .55; transition: opacity .2s ease; }
.star .core { fill: var(--gold); transform-box: fill-box; transform-origin: center; transition: transform .2s var(--ease-out); }
.star .hit { fill: transparent; }
.star.on .core, .star:focus-visible .core { transform: scale(1.7); }
.star.on .halo, .star:focus-visible .halo { opacity: 1; }
.tip { pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.tip.on { opacity: 1; }
.tip rect { fill: var(--ink); }
.tip text { fill: var(--ground); font: 600 2.7px "Hanken Grotesk", sans-serif; }

/* Sections */
section + section { border-top: 1px solid var(--line); }
h2 { font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1; letter-spacing: -.02em; }

.jk { padding-block: 80px; display: grid; gap: 48px; }
@media (min-width: 900px) {
  .jk { grid-template-columns: 5fr 7fr; column-gap: 64px; row-gap: 88px; padding-block: 120px; align-items: center; }
  .products, .fleet { grid-column: 1 / -1; }
}
.jk-text p, .labs-head p { margin-top: 20px; max-width: 46ch; color: var(--ink-2); }
.jk-text p a, .labs-head p a { font-weight: 600; }
.shot { margin: 0; }
.shot img, .site-shot img { border-radius: 12px; box-shadow: var(--shadow); }

.products { list-style: none; margin: 0; padding: 0; display: grid; gap: 36px 40px; }
@media (min-width: 600px) { .products { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .products { grid-template-columns: repeat(3, 1fr); } }
.products li { padding: 18px 14px 18px; margin: -18px -14px 0; border-radius: 10px; border-top: 1px solid transparent; transition: background-color .2s ease; }
.products h3 { font-size: 1.6rem; line-height: 1.15; }
.products h3 a, .index h3 a, .site h3 a { color: var(--ink); text-decoration-color: var(--gold); }
.products h3 a:hover, .index h3 a:hover, .site h3 a:hover { color: var(--gold); }
.products p { margin-top: 6px; color: var(--ink-2); max-width: 38ch; }
.on { background: rgb(201 161 94 / .1); }

.fleet {
  display: grid;
  gap: 28px;
  padding: clamp(24px, 4vw, 48px);
  background: var(--ground-2);
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color .2s ease;
}
.fleet.on { background: #1b4142; }
@media (min-width: 760px) { .fleet { grid-template-columns: 168px 1fr; gap: 48px; align-items: start; } }
.fleet-icon { width: 120px; height: 120px; }
@media (min-width: 760px) { .fleet-icon { width: 168px; height: 168px; } }
.fleet h3 { font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.05; }
.fleet-lede { margin-top: 14px; font-size: 1.15rem; max-width: 56ch; }
.fleet-points { margin: 22px 0 0; padding-left: 1.1em; display: grid; gap: 10px; color: var(--ink-2); max-width: 60ch; }
.fleet-points li::marker { color: var(--gold); }

/* Labs */
.labs { padding-block: 80px; }
@media (min-width: 900px) { .labs { padding-block: 120px; } }
.labs-head { display: grid; gap: 28px; align-items: center; padding: 14px; margin: -14px; border-radius: 16px; transition: background-color .2s ease; }
.labs-head img { width: 120px; height: 120px; border-radius: 24px; box-shadow: var(--shadow); }
@media (min-width: 700px) { .labs-head { grid-template-columns: 180px 1fr; gap: 48px; } .labs-head img { width: 180px; height: 180px; border-radius: 36px; } }
.sites { margin-top: 64px; display: grid; gap: 48px; }
@media (min-width: 760px) { .sites { grid-template-columns: 1fr 1fr; gap: 40px; } }
.site { padding: 14px; margin: -14px; border-radius: 16px; transition: background-color .2s ease; }
.site-shot { display: block; }
.site-shot img { transition: transform .35s var(--ease-out); }
.site-shot:hover img { transform: translateY(-4px); }
.site h3 { margin-top: 22px; font-size: 1.8rem; line-height: 1.1; }
.site p { margin-top: 8px; color: var(--ink-2); max-width: 44ch; }

/* Other projects */
.builds { padding-block: 80px; }
@media (min-width: 900px) { .builds { padding-block: 120px; } }
.index { list-style: none; margin: 48px 0 0; padding: 0; }
.index li { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 20px 14px; margin-inline: -14px; border-radius: 10px; transition: background-color .2s ease; }
.index h3 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.1; }
.index p { grid-column: 1; color: var(--ink-2); max-width: 60ch; }
.index time { grid-column: 2; grid-row: 1; align-self: baseline; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .index li { grid-template-columns: minmax(260px, 24rem) 1fr auto; align-items: baseline; }
  .index p { grid-column: 2; grid-row: 1; }
  .index time { grid-column: 3; }
}

/* About */
.about { padding-block: 80px 104px; display: grid; gap: 28px; align-items: center; }
@media (min-width: 700px) { .about { grid-template-columns: 200px minmax(0, 60ch); gap: 56px; padding-block: 120px; } }
.me { width: 200px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 0 0 10px rgb(201 161 94 / .08); }
.about p { margin-top: 18px; color: var(--ink-2); }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px 40px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--ink-2); }
.foot p:last-child { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--ink); }

.progress { display: none; }

/* ---------- Motion (all of it is off under reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Page load: name rises, constellation draws itself. */
  h1 .line > span { animation: rise 1s var(--ease-out) both; }
  h1 .line:nth-child(2) > span { animation-delay: .12s; }
  .lede, .actions { animation: fade .9s var(--ease-out) .35s both; }
  .sky.play .cline { animation: draw 1.4s var(--ease-out) both; animation-delay: var(--d); }
  .sky.play .star .core { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d); }
  .sky.play .star .halo { animation: fade 1s ease both; animation-delay: var(--d); }
  .sky.play .clabel { animation: fade 1s ease 1.4s both; }
  #dust .tw { animation: twinkle 4s ease-in-out infinite alternate; animation-delay: var(--t); }

  /* Scroll reveals (IntersectionObserver adds .in). */
  .js [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), background-color .2s ease; transition-delay: var(--i, 0s), var(--i, 0s), 0s; }
  .js [data-reveal].in { opacity: 1; transform: none; }

  /* Scroll-linked effects where the browser supports scroll timelines. */
  @supports (animation-timeline: view()) {
    /* Reveals ride the scroll position here, so nothing depends on JS to become visible. */
    .js [data-reveal] {
      opacity: 1; transform: none; transition: background-color .2s ease;
      animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 85%;
    }
    .progress {
      display: block; position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 20;
      background: var(--gold); transform-origin: 0 50%;
      animation: grow linear both; animation-timeline: scroll(root);
    }
    .sky svg { animation: drift linear both; animation-timeline: scroll(root); animation-range: 0 85vh; }
    .tilt img { animation: flatten linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .site.from-left { animation: in-left linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .site.from-right { animation: in-right linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .labs-head img { animation: spin-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .fleet-icon { animation: spin-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
    .me { animation: spin-in linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  }
}
@keyframes reveal { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: var(--len); } to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes twinkle { from { opacity: .15; } to { opacity: .7; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drift { to { transform: translateY(14%) rotate(-9deg) scale(1.1); opacity: .2; } }
@keyframes flatten { from { transform: perspective(1400px) rotateX(28deg) scale(.86) translateY(60px); opacity: .25; } to { transform: none; opacity: 1; } }
@keyframes in-left { from { transform: translateX(-14%) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes in-right { from { transform: translateX(14%) rotate(3deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin-in { from { transform: rotate(-14deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
