/* ============================================================================
   Foluka waitlist: one stylesheet for every page of foluka.com's waitlist site.

   The colours, radii, type and motion are the product's own tokens
   (src/design/tokens.css), copied here because this site is deployed on its own
   and cannot read the app's files. waitlist/test/site.test.js compares every
   value below with tokens.css, so the two cannot drift apart unseen.

   The rules this page keeps, as the app does: nothing a person must read is
   under 12px; every button, field and standalone link is at least 44px tall;
   one focus ring; motion is silent and stops under "reduce motion"; light and
   dark follow the visitor's system.
   ============================================================================ */

/* The three typefaces the product uses, served from here (no request to Google).
   Latin subsets only; licences are beside the files. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/DMSans-var-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/SourceSerif4-var-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/DMMono-500-latin.woff2') format('woff2');
}

:root {
  color-scheme: light;

  --bg: #fdfbf7;
  --sunk: #f5f1ea;
  --surface: #ffffff;
  --surface-2: #f1ede5;

  --ink: #1a1715;
  --ink-2: #625c55;
  --ink-3: #726a60;

  --line: rgba(26, 23, 21, 0.15);
  --line-soft: rgba(26, 23, 21, 0.08);
  --control-line: #8c8173;
  --dot: rgba(26, 23, 21, 0.07);

  --accent: #c04a17;
  --accent-text: #c03a12;
  --accent-hover: #b8400f;
  --accent-ink: #ffffff;
  --accent-soft: #ffe9e1;
  --accent-line: #ffc7b4;

  --good: #0b7a3d;
  --good-soft: #ddf6e7;
  --danger: #c81e3c;
  --danger-soft: #ffe2df;

  --focus-ring: var(--accent-text);

  --shadow-sm: 0 1px 2px rgba(31, 30, 29, 0.08), 0 1px 1px rgba(31, 30, 29, 0.04);
  --shadow-md: 0 2px 4px rgba(31, 30, 29, 0.06), 0 10px 24px -10px rgba(31, 30, 29, 0.18);

  --r-xs: 8px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 999px;

  --font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-data: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(0.32, 0.72, 0.34, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.18s;
  --dur: 0.25s;
  --dur-slow: 0.45s;

  --gutter: max(16px, min(5vw, 40px));
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #1a1715;
    --sunk: #201c1a;
    --surface: #262220;
    --surface-2: #322d29;

    --ink: #faf7f2;
    --ink-2: #b8b0a6;
    --ink-3: #9e968a;

    --line: rgba(250, 247, 242, 0.12);
    --line-soft: rgba(250, 247, 242, 0.07);
    --control-line: #857b6e;
    --dot: rgba(250, 247, 242, 0.06);

    --accent: #ff5f35;
    --accent-text: #ff8a66;
    --accent-hover: #ff7a55;
    --accent-ink: #2a0e03;
    --accent-soft: #45210f;
    --accent-line: #7d3a20;

    --good: #2ee27a;
    --good-soft: #13301e;
    --danger: #ff5c7a;
    --danger-soft: #40201b;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.26), 0 8px 20px -12px rgba(0, 0, 0, 0.5);
  }
}

/* Under "reduce motion" nothing animates and every duration is zero. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0s;
    --dur: 0s;
    --dur-slow: 0s;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- base ------------------------------------------------------------------ */

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  font: 400 1rem / 1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
  overflow-wrap: break-word;
}

ul {
  padding: 0;
  list-style: none;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* One focus ring, the product's: 2px in the accent text colour, off the edge. */
:where(a, button, input, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

main:focus,
[tabindex='-1']:focus {
  outline: none;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: calc(1120px + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip {
  position: fixed;
  left: 12px;
  top: -64px;
  z-index: 10;
  padding: 12px 16px;
  border-radius: var(--r-xs);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}

.skip:focus {
  top: 12px;
}

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

/* ---- header -------------------------------------------------------------------- */

.top {
  padding-top: max(12px, env(safe-area-inset-top, 0px));
}

.top__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
  min-height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
  transition: transform var(--dur-slow) var(--ease-out);
}

.wordmark:hover svg {
  transform: rotate(-18deg) scale(1.06);
}

.wordmark span {
  font: 600 1.3125rem / 1 var(--font-display);
  letter-spacing: -0.012em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.nav a,
.foot__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}

.nav a:hover,
.foot__nav a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

.nav a[aria-current='page'] {
  color: var(--ink);
}

/* ---- type ------------------------------------------------------------------------ */

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--accent-text);
  font: 500 0.75rem / 1 var(--font-data);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.kicker::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* The full stop at the end of a headline is coral, as on the product's page titles. */
.stop {
  color: var(--accent);
}

.title {
  max-width: 18ch;
  font: 430 clamp(2.25rem, 1.4rem + 3.6vw, 4rem) / 1.05 var(--font-display);
  letter-spacing: -0.03em;
  text-wrap: balance;
  font-optical-sizing: auto;
}

.title--page {
  max-width: 18ch;
  font-size: clamp(1.875rem, 1.3rem + 2.2vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.lede {
  max-width: 34em;
  margin-top: 20px;
  color: var(--ink-2);
  font-size: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

/* ---- buttons and fields ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font: 600 1rem / 1.2 var(--font-body);
  letter-spacing: 0.005em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    box-shadow var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent-ink) 18%, transparent),
    0 1px 2px color-mix(in srgb, var(--accent) 30%, transparent),
    0 10px 24px -14px color-mix(in srgb, var(--accent) 85%, transparent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn--primary:active {
  transform: translateY(0) scale(0.99);
}

.btn--ghost {
  min-height: 44px;
  padding: 0 20px;
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  color: var(--ink);
  font-size: 0.9375rem;
}

.btn--ghost:hover {
  border-color: color-mix(in srgb, var(--ink) 22%, transparent);
  background: var(--surface);
}

.btn[aria-disabled='true'] {
  cursor: progress;
}

.btn--primary[aria-disabled='true'],
.btn--primary[aria-disabled='true']:hover {
  background: var(--accent-hover);
  transform: none;
}

.btn__dots {
  display: inline-flex;
  gap: 4px;
}

.btn__dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1s var(--ease) infinite;
}

.btn__dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.btn__dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 1;
  }
}

.field label,
.label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.field__hint {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--control-line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  font: 400 1rem / 1.2 var(--font-body);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

textarea.input {
  min-height: 112px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}

.input::placeholder {
  color: var(--ink-3);
}

.input:hover {
  border-color: var(--ink-2);
}

/* A field's ring is one 2px line hugging it, the border giving way to it. */
.input:focus-visible {
  border-color: transparent;
  outline-offset: 0;
  border-radius: var(--r-md);
}

.input[aria-invalid='true'] {
  border-color: var(--danger);
}

/* The bot-check box: invisible unless Cloudflare needs the person to do something. */
.check {
  margin-top: 12px;
}

.check:empty {
  display: none;
}

/* The trap field: out of sight and out of the tab order; people never meet it. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- the sign-up ------------------------------------------------------------------ */

.join {
  max-width: 540px;
  margin-top: 32px;
}

.join__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.join__row .field {
  flex: 1 1 260px;
}

.join__row .btn {
  flex: 0 0 auto;
}

@media (max-width: 559px) {
  .join__row .btn {
    width: 100%;
  }
}

.fine {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 36em;
}

/* A link inside small print: its tap area is 44px tall without moving the text. */
.fine a {
  display: inline-block;
  padding: 12px 2px;
  margin: -12px -2px;
}

/* Errors: ink on a faint wash inside a hairline, as the product draws a problem. */
.alert {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  border-radius: var(--r-md);
  background: var(--danger-soft);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.alert p,
.panel .alert p:not(.kicker) {
  margin: 0;
  color: var(--ink);
}

.notice {
  border-color: var(--line);
  background: var(--surface-2);
}

/* After a good sign-up: the form gives way to a calm card. */
.done {
  max-width: 540px;
  margin-top: 32px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.done h2,
.panel h2 {
  font: 430 1.75rem / 1.15 var(--font-display);
  letter-spacing: -0.02em;
}

.done p,
.panel p:not(.kicker) {
  margin-top: 10px;
  color: var(--ink-2);
}

/* The address you typed, on its own line so a hyphen never splits it. */
.done__email {
  display: block;
  margin: 6px 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 600;
}

.done .btn,
.panel .btn {
  margin-top: 20px;
}

@media (prefers-reduced-motion: no-preference) {
  .done,
  .alert {
    animation: rise var(--dur-slow) var(--ease-out) both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}

/* ---- hero ------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-block: clamp(32px, 8vh, 88px) clamp(48px, 9vh, 96px);
  /* The glow behind the headline reaches past the window; it must not widen the page. */
  overflow-x: clip;
}

.hero::before {
  content: '';
  position: absolute;
  top: -240px;
  right: -12%;
  z-index: -1;
  width: min(1000px, 110vw);
  height: 800px;
  pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent-soft) 80%, transparent), transparent);
  opacity: 0.8;
}

.hero__grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: 72px;
  }
}

/* The lit sphere: dots in a grid, brighter towards the upper left, the same
   idea as the app's Home. Decorative only; not drawn on a narrow screen. */
.orb {
  display: none;
  justify-self: center;
  width: min(100%, 380px);
  aspect-ratio: 1;
  color: var(--accent);
  background-image: radial-gradient(circle, currentColor 1.6px, transparent 2.1px);
  background-size: 14px 14px;
  background-position: center;
  -webkit-mask-image:
    radial-gradient(circle farthest-corner at 34% 28%, #000 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.1) 100%),
    radial-gradient(circle closest-side at 50% 50%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    radial-gradient(circle farthest-corner at 34% 28%, #000 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.1) 100%),
    radial-gradient(circle closest-side at 50% 50%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

@media (min-width: 960px) {
  .orb {
    display: block;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .orb {
    animation: orb-in 900ms var(--ease-out) both;
  }

  @keyframes orb-in {
    from {
      opacity: 0;
      transform: scale(0.94);
    }
  }
}

/* ---- what Foluka is ---------------------------------------------------------------- */

.about {
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(56px, 10vh, 104px);
}

.about h2,
.prose h1 {
  max-width: 20ch;
  font: 430 clamp(1.75rem, 1.2rem + 2vw, 2.75rem) / 1.12 var(--font-display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.about__lead {
  max-width: 38em;
  margin-top: 16px;
  color: var(--ink-2);
  font-size: 1.125rem;
}

.items {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--line-soft);
}

@media (min-width: 720px) {
  .items {
    grid-template-columns: 1fr 1fr;
    column-gap: 56px;
  }
}

.item {
  padding-block: 24px;
  border-bottom: 1px solid var(--line-soft);
}

.item__num {
  color: var(--accent-text);
  font: 500 0.75rem / 1 var(--font-data);
  letter-spacing: 0.12em;
}

.item h3 {
  margin: 10px 0 6px;
  font: 600 1.0625rem / 1.3 var(--font-body);
}

.item p {
  max-width: 32em;
  color: var(--ink-2);
}

.notes {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 720px) {
  .notes {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }
}

.note h3 {
  font: 600 0.9375rem / 1.3 var(--font-body);
}

.note p {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

/* ---- the little pages: confirm, confirmed, unsubscribe, 404 ------------------------------ */

.panel {
  max-width: 560px;
  margin: clamp(24px, 9vh, 88px) auto clamp(48px, 12vh, 120px);
  padding-inline: var(--gutter);
}

.panel .title {
  max-width: none;
}

.panel .lede {
  margin-top: 16px;
}

.panel .kicker,
.prose .kicker {
  margin-top: 0;
}

.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.panel__actions .btn {
  margin-top: 0;
}

.panel form {
  margin-top: 24px;
}

.panel .done {
  margin-top: 24px;
}

.counter {
  margin-top: 6px;
  color: var(--ink-3);
  font-size: 0.875rem;
  text-align: right;
}

/* ---- legal and contact pages ------------------------------------------------------------ */

.prose {
  max-width: 40rem;
  margin: clamp(16px, 6vh, 64px) auto clamp(56px, 12vh, 120px);
  padding-inline: var(--gutter);
}

.prose h1 {
  max-width: none;
}

.prose__meta {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.prose h2 {
  margin-top: 40px;
  font: 600 1.25rem / 1.3 var(--font-body);
  letter-spacing: -0.005em;
}

.prose p:not(.kicker),
.prose ul {
  margin-top: 12px;
  color: var(--ink-2);
}

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.prose li + li {
  margin-top: 8px;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---- footer ---------------------------------------------------------------------------- */

.foot {
  flex-shrink: 0;
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
  padding-block: 28px max(28px, env(safe-area-inset-bottom, 0px));
}

.foot__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}

.foot__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-inline: -12px;
}

.foot__base {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 0.8125rem;
}

/* ---- forced colours ------------------------------------------------------------------- */

@media (forced-colors: active) {
  .btn,
  .input,
  .done,
  .alert {
    border-color: ButtonText;
  }

  .orb,
  .hero::before {
    display: none;
  }

  :where(a, button, input, textarea, summary, [tabindex]):focus-visible {
    outline-color: Highlight;
  }
}
