/* LRS for Faces. Monochrome by principle: off-white type on near-black.
   One switch, data-direction on <html> (set from site.json), picks the
   display treatment:
     a  heavy caps after PRS: Archivo Black, uppercase, poster scale
     b  heavy sentence case after MCPS: Inter Tight 800, centred
   Everything else is shared. Two weights only: the display weight and 400. */

@font-face {
  font-family: 'Archivo Black';
  src: url('/fonts/archivo-black-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('/fonts/inter-tight-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Dark only, so a light-mode OS never produces a mixed state. */
  color-scheme: only dark;
  --ground: #121212;
  --type: #f2f1ed;
  --type-soft: rgba(242, 241, 237, 0.68);
  --rule: rgba(242, 241, 237, 0.22);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --halo: 0 0 2px var(--ground), 0 0 12px var(--ground), 0 0 28px var(--ground);
}

[data-direction='a'] {
  --display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
  --display-weight: 400;
  --display-case: uppercase;
  --display-tracking: -0.015em;
  --display-leading: 0.92;
  --headline-size: clamp(3rem, 9.6vw, 9.5rem);
  /* Largest type on the page; sized so PROMOTIONAL fits the column. */
  --standard-size: clamp(2.6rem, 10.4vw, 10.5rem);
  --hero-align: start;
}

[data-direction='b'] {
  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --display-weight: 800;
  --display-case: none;
  --display-tracking: -0.028em;
  --display-word-spacing: 0.06em;
  --display-leading: 0.98;
  --headline-size: clamp(3rem, 9vw, 9rem);
  --standard-size: clamp(3rem, 9vw, 9rem);
  --hero-align: center;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--type);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--type); color: var(--ground); }

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
}

main, .footer { position: relative; z-index: 1; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.display {
  font-family: var(--display);
  font-weight: var(--display-weight);
  text-transform: var(--display-case);
  letter-spacing: var(--display-tracking);
  word-spacing: var(--display-word-spacing, normal);
  line-height: var(--display-leading);
  hyphens: none;
}

/* Hero */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 48px) var(--gutter) clamp(40px, 9vh, 112px);
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.hero-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: var(--hero-align);
  text-align: var(--hero-align);
  padding-top: 48px;
}

[data-direction='b'] .hero-body { justify-content: center; }

.headline {
  margin: 0;
  max-width: 12ch;
  font-size: var(--headline-size);
  text-shadow: var(--halo);
}

.strap {
  margin: clamp(20px, 3.5vh, 36px) 0 0;
  max-width: 34ch;
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  line-height: 1.35;
  text-shadow: var(--halo);
}

[data-direction='b'] .strap { color: var(--type-soft); }

.cta {
  display: inline-block;
  margin-top: clamp(24px, 4vh, 40px);
  padding: 14px 24px;
  border: 1px solid var(--type);
  background: var(--type);
  color: var(--ground);
  font-size: 1rem;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
}

.cta:hover { background: var(--ground); color: var(--type); }

/* MCPS direction: nothing in the first viewport but wordmark, headline, strap. */
[data-direction='b'] .cta { display: none; }

/* Scroll beats over the face */

.beat {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 12vh var(--gutter);
  text-align: center;
}

.beat-line {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(1.6rem, 3.4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-shadow: var(--halo);
}

.beat-promise { min-height: 120vh; min-height: 120svh; }

/* The line over the head. "shoulders": the head is raised (field.js) and the
   line sits low, across the neck and shoulders. "delay": the head is centred
   and the line only appears once it has formed. field.js publishes --face. */
[data-resolve='shoulders'] #resolve { padding-top: 30vh; padding-bottom: 10vh; }
[data-resolve='delay'] #resolve .beat-line {
  opacity: calc((var(--face, 1) - 0.9) * 10);
  transform: translateY(calc((1 - clamp(0, (var(--face, 1) - 0.9) * 10, 1)) * 12px));
}

.standard {
  margin: 0;
  max-width: 15ch;
  font-size: var(--standard-size);
  text-shadow: var(--halo);
}

/* Model */

.model {
  max-width: calc(38rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: 24vh var(--gutter) 22vh;
}

.model p {
  margin: 0 0 1.4em;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.62;
  text-shadow: var(--halo);
}

/* Footer */

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 56px;
  padding: 56px var(--gutter) 40px;
  border-top: 1px solid var(--type);
  background: var(--ground);
  font-size: 0.9375rem;
  line-height: 1.5;
}

@media (min-width: 800px) {
  .footer { grid-template-columns: minmax(0, 28rem) minmax(0, 1fr); gap: 80px; }
  .footer-meta { justify-self: end; text-align: right; align-self: end; }
}

.footer-heading,
.launch,
.page h2 {
  font-family: var(--display);
  font-weight: var(--display-weight);
  text-transform: var(--display-case);
  letter-spacing: var(--display-tracking);
}

.footer-heading { margin: 0 0 24px; font-size: 1.75rem; line-height: 1.1; }

.waitlist { display: grid; gap: 10px; }

.field-label {
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--type-soft);
}

.field-input {
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--type);
  border-radius: 0;
  background: transparent;
  color: var(--type);
  font: inherit;
  font-size: 1.0625rem;
}

.field-input:focus { outline: none; border-bottom-width: 2px; padding-bottom: 9px; }

.choice {
  margin: 18px 0 8px;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

.choice legend { padding: 0; margin-bottom: 8px; }

.choice-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.choice-option input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--type);
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: transparent;
}

.choice-option input::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--type);
  transform: scale(0);
  transition: transform 120ms ease;
}

.choice-option input:checked::before { transform: scale(1); }

.button {
  justify-self: start;
  margin-top: 14px;
  padding: 13px 22px;
  border: 1px solid var(--type);
  border-radius: 0;
  background: var(--type);
  color: var(--ground);
  font: inherit;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.button:hover { background: var(--ground); color: var(--type); }
.button[disabled] { opacity: 0.5; cursor: progress; }

.note, .status { margin: 4px 0 0; font-size: 0.8125rem; color: var(--type-soft); }
.status:empty { display: none; }
.status { color: var(--type); }

.result { display: none; margin: 16px 0 0; font-size: 0.9375rem; }
.result:target { display: block; }

.footer-meta p { margin: 0 0 8px; }
.launch { font-size: 1.25rem; }
.copyright { margin-top: 24px !important; color: var(--type-soft); }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--type); outline-offset: 3px; }
.field-input:focus-visible { outline: none; }

/* Privacy page */

.page {
  max-width: calc(40rem + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter) 96px;
}

.page .wordmark { display: block; margin-bottom: clamp(56px, 10vh, 112px); }
.page .wordmark a { text-decoration: none; }

.page h1 { margin: 0 0 40px; font-size: clamp(2.25rem, 6vw, 4rem); }
.page h2 { margin: 48px 0 12px; font-size: 1.25rem; line-height: 1.3; }
.page p { margin: 0 0 1em; }
.page-footer { margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--type); font-size: 0.9375rem; color: var(--type-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
