@font-face {
  font-family: "Saira";
  src: url("assets/fonts/saira.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0e0e0e;
  --ink: #eef1f2;
  --ink-2: #a3a9ac;
  --ink-3: #8a9094;
  --rule: #2a2e30;
  --teal: #1de9d6;
  --cyan: #22b8e0;
  --peri: #6a7ff0;
  --error: #f3a1a1;

  --display: "Saira", "Arial Narrow", sans-serif;
  --text: "Hanken Grotesk", system-ui, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --hang: clamp(5.5rem, 14vw, 13rem);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: #2e3437 var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--teal); color: #061513; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2e3437; border: 3px solid var(--bg); border-radius: 0; }
:focus-visible { outline: 1px solid var(--teal); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
img { display: block; }
h1, h2, p, ol, dl, dd { margin: 0; }

/* ---------- Stage: globe and swoosh sit behind the page ---------- */

#globe {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms var(--ease-out);
}
.globe-ready #globe { opacity: 1; }

.swoosh {
  position: fixed;
  left: 0; top: 0;
  width: 100px; height: 100px;
  overflow: visible;
  z-index: 0;
  pointer-events: none;
  fill: #f6f8f9;
  opacity: 0;
}
.swoosh path {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1400ms var(--ease-in-out);
}
.swoosh path:last-child { transition-delay: 140ms; }
.globe-ready .swoosh path { clip-path: inset(0 -10% 0 -10%); transition-delay: 1100ms; }
.globe-ready .swoosh path:last-child { transition-delay: 1260ms; }

.globe-hit {
  position: absolute;
  border-radius: 50%;
  cursor: grab;
  /* Drags on the globe turn and tilt it on touch screens too; the page scrolls from anywhere else. */
  touch-action: none;
  z-index: 1;
}
.globe-hit.is-grabbing { cursor: grabbing; }
/* While the globe is being turned, nothing on the page can be selected and the grab cursor holds everywhere. */
.is-turning-globe, .is-turning-globe * { -webkit-user-select: none; user-select: none; cursor: grabbing; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--bg);
}
/* Scroll edge: content fades out under the nav rather than meeting a hard line. */
.nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 40px;
  background: linear-gradient(to bottom, var(--bg), rgb(14 14 14 / 0));
  pointer-events: none;
}
.nav__brand { display: flex; align-items: center; gap: 16px; }
.nav__mark { width: 52px; height: auto; }
.nav__word { height: 46px; width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); }
.nav__links a {
  font: 500 0.75rem/1 var(--display);
  font-stretch: 80%;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: 10px 0;
  transition: color 200ms ease;
}
.nav__links a.nav__cta { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .nav__links a:hover { color: var(--teal); }
}

main { position: relative; z-index: 1; }

/* ---------- Entry (first viewport) ---------- */

.entry {
  position: relative;
  min-height: 100svh;
  padding: 96px var(--gutter) 56px;
  display: grid;
  align-items: center;
}
.entry__text { max-width: min(36rem, 46vw); position: relative; z-index: 2; }

.headword {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 112%;
  font-size: clamp(3rem, 7.4vw, 6rem);
  line-height: 0.92;
  letter-spacing: 0.015em;
  display: grid;
}
.headword__line { display: block; white-space: nowrap; }

.phon {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  align-items: baseline;
  font-size: 1.0625rem;
  color: var(--ink-2);
}
.phon__say { font-family: var(--display); font-stretch: 90%; letter-spacing: 0.03em; color: var(--ink); }
.phon em { font-style: italic; }

.senses {
  list-style: none;
  padding: 0;
  margin-top: 1.9rem;
  counter-reset: sense;
  display: grid;
  gap: 0.7rem;
}
.senses li {
  counter-increment: sense;
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  font-size: clamp(1.125rem, 1.45vw, 1.3rem);
  line-height: 1.42;
  max-width: 30ch;
  text-wrap: pretty;
}
.senses li::before {
  content: counter(sense);
  font: 600 0.95em/1.5 var(--display);
  color: var(--peri);
}
.senses li:last-child::before { color: var(--teal); }

.readout {
  position: fixed;
  right: var(--gutter);
  bottom: 40px;
  z-index: 11;
  pointer-events: none;
  display: flex;
  gap: 1.4rem;
  font: 400 0.75rem/1 var(--display);
  font-stretch: 80%;
  letter-spacing: 0.22em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

/* ---------- Newsletter ---------- */

.subscribe { margin-top: 2.6rem; max-width: 27rem; }
.subscribe__label {
  display: block;
  font-size: 0.9375rem;
  color: var(--ink-2);
  margin-bottom: 0.7rem;
}
.subscribe__row {
  display: grid;
  grid-template-columns: 1fr auto;
  position: relative;
  border-bottom: 1px solid #454b4e;
}
.subscribe__row::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--peri));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 500ms var(--ease-out);
}
.subscribe__row:focus-within::after { transform: scaleX(1); }
.subscribe input {
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 14px 0;
  font: 400 1.0625rem/1.2 var(--text);
  color: var(--ink);
  caret-color: var(--teal);
  outline: none;
}
.subscribe input::placeholder { color: #80878b; }
.subscribe input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  transition: background-color 9999s;
}
.subscribe button {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: var(--ink);
  color: #0b0d0e;
  margin: 6px 0;
  padding: 0 20px;
  font: 600 0.75rem/1 var(--display);
  font-stretch: 85%;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  cursor: pointer;
  transition: box-shadow 220ms ease, transform 140ms var(--ease-out);
}
.subscribe button:active { transform: scale(0.97); }
/* The ramp arrives as light along the button's lower edge, never as a fill. */
@media (hover: hover) and (pointer: fine) {
  .subscribe button:hover { box-shadow: inset 0 -3px 0 var(--teal); }
}
.subscribe button:focus-visible { box-shadow: inset 0 -3px 0 var(--teal); }
.subscribe[aria-busy="true"] button { opacity: 0.6; pointer-events: none; }
.subscribe__msg {
  min-height: 1.5em;
  margin-top: 0.7rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.subscribe[data-state="error"] .subscribe__msg { color: var(--error); }
.subscribe[data-state="done"] .subscribe__msg { color: var(--teal); }
.subscribe[data-state="info"] .subscribe__msg { color: var(--ink); }
.subscribe input[aria-invalid="true"] { color: var(--error); }

/* ---------- Shared: hanging labels, dictionary style ---------- */

.usage, .origin {
  position: relative;
  display: grid;
  grid-template-columns: var(--hang) minmax(0, 1fr);
  column-gap: clamp(16px, 3vw, 48px);
  padding: clamp(96px, 16vh, 180px) var(--gutter);
}
/* Run-in headwords, as a dictionary sets them: the term leads the line in its own face. */
.runin {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0;
  color: var(--ink-2);
}

/* ---------- Usage ---------- */

.usage__lede, .origin__lede {
  grid-column: 2;
  font: 300 clamp(1.75rem, 3.4vw, 3rem)/1.12 var(--text);
  letter-spacing: -0.02em;
  max-width: 24ch;
  text-wrap: balance;
  margin: 0;
}
/* One line, set to span the content below it exactly: the heading is its own width container,
   and the text size is that width divided by the line's measured length in em (--fit, at -0.02em tracking). */
.lede--fit {
  max-width: 62rem;
  width: 100%;
  container-type: inline-size;
  text-align: center;
  text-wrap: nowrap;
}
.lede--fit span {
  display: block;
  font-size: calc(100cqi / var(--fit));
  /* Re-declared so the tracking scales with this size, not the h2's inherited pixel value. */
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.usage__list {
  grid-column: 2;
  margin-top: clamp(56px, 9vh, 96px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vh, 64px) clamp(32px, 5vw, 80px);
  max-width: 62rem;
}
.use {
  --c: color-mix(in oklab, var(--teal) calc((1 - var(--i, 0)) * 100%), var(--peri));
  position: relative;
  padding-top: 1.1rem;
}
/* A dotted rule that tightens and lights when the sense is read. */
.use::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background-image: radial-gradient(circle, #50575b 0.9px, transparent 1.1px);
  background-size: 7px 2px;
  transition: background-size 380ms var(--ease-out);
}
.use dt {
  font: 500 0.75rem/1.2 var(--display);
  font-stretch: 70%;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color 240ms ease;
}
.use dd {
  margin-top: 0.7rem;
  font: italic 400 1.1875rem/1.45 var(--text);
  max-width: 34ch;
  text-wrap: pretty;
}
@media (hover: hover) and (pointer: fine) {
  .use:hover::before { background-size: 3.5px 2px; background-image: radial-gradient(circle, var(--c) 0.9px, transparent 1.1px); }
  .use:hover dt { color: var(--c); }
}

/* ---------- Origin ---------- */

.origin__lede em { font-style: italic; }
.origin__body {
  grid-column: 2;
  margin-top: clamp(40px, 6vh, 64px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(32px, 5vw, 80px);
  max-width: 62rem;
}
.origin__body p { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); max-width: 38ch; text-wrap: pretty; }

/* ---------- Contact: the globe becomes the horizon ---------- */

.contact {
  position: relative;
  min-height: calc(100svh - 88px);
  padding: clamp(120px, 22vh, 220px) var(--gutter) 0;
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
}
.contact__title {
  font-family: var(--display);
  font-weight: 500;
  font-stretch: 100%;
  font-size: clamp(1.75rem, 3.6vw, 3.25rem);
  line-height: 1.12;
  letter-spacing: 0.005em;
  max-width: 24ch;
  text-wrap: balance;
}
.contact__mail {
  position: relative;
  margin-top: 2.2rem;
  font: 400 clamp(1.125rem, 1.8vw, 1.5rem)/1.3 var(--text);
  padding-bottom: 6px;
  color: var(--ink);
}
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--peri));
  opacity: 0.55;
  transition: opacity 240ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .contact__mail:hover::after { opacity: 1; }
}
.contact__mail:focus-visible::after { opacity: 1; }

.foot {
  position: relative;
  z-index: 1;
  height: 88px;
  padding: 0 var(--gutter);
  background: var(--bg);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 400 0.75rem/1 var(--display);
  font-stretch: 80%;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

/* ---------- Motion: one entrance for the entry, gentle arrivals below ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .headword__line,
  .js .phon, .js .senses li, .js .subscribe {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(14px);
    transition: opacity 900ms var(--ease-out), filter 900ms var(--ease-out), transform 900ms var(--ease-out);
  }
  .js.globe-ready .headword__line, .js.globe-ready .phon, .js.globe-ready .senses li, .js.globe-ready .subscribe {
    opacity: 1; filter: blur(0); transform: none;
  }
  .js .headword__line:nth-child(2) { transition-delay: 80ms; }
  .js .phon { transition-delay: 260ms; }
  .js .senses li:nth-child(1) { transition-delay: 380ms; }
  .js .senses li:nth-child(2) { transition-delay: 460ms; }
  .js .subscribe { transition-delay: 620ms; }

  .js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
    transition-delay: calc(var(--d, 0) * 60ms);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- Small screens ---------- */

@media (max-width: 899px) {
  .nav { height: 72px; }
  .nav__brand { gap: 10px; }
  .nav__word { height: 34px; }
  .nav__mark { width: 38px; }
  .entry {
    align-items: end;
    padding-top: calc(72px + 42svh);
    padding-bottom: 40px;
  }
  .entry__text { max-width: none; }
  .headword { font-size: clamp(2.6rem, 13vw, 4rem); }
  .phon { margin-top: 1rem; font-size: 1rem; }
  .senses { margin-top: 1.3rem; }
  .senses li { font-size: 1.0625rem; max-width: 34ch; }
  .subscribe { margin-top: 1.8rem; max-width: none; }
  /* On phones the readout sits in the top bar, right under Subscribe, so it stays in view while a thumb
     is on the globe. It fades out with the globe as the page scrolls on (main.js). */
  .readout {
    top: 50px;
    bottom: auto;
    gap: 0.9rem;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
  }

  .usage, .origin { display: block; padding-top: 88px; padding-bottom: 88px; }
  .usage__list, .origin__body { grid-template-columns: 1fr; }
  .usage__list { margin-top: 48px; gap: 36px; }
  .foot { flex-direction: column; justify-content: center; gap: 10px; }
}

/* At phone sizes (headlines around 20-25px) the light 300 weight reads thin; 450 matches the heft
   they have at desktop size. Heavier letters are wider, so the fit ratio is re-measured at this weight. */
@media (max-width: 600px) {
  .lede--fit span { font-weight: 450; font-size: calc(100cqi / var(--fit-small)); }
}

@media (max-width: 380px) {
  .nav__links { gap: 16px; }
  .nav__links a { letter-spacing: 0.2em; }
}
