/* Tealight: gettealight.com
   Tokens mirror brand/tokens.json. Dusk ground, one warm light. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --dusk: #E7EAF3;
  --mist: #F5F6FA;
  --field: #FFFFFF;
  --ink: #1F2236;
  --slate: #545A75;
  --glow: #F2B544;
  --glow-hover: #F5C365;
  --glow-soft: rgb(242 181 68 / 0.5);
  --wick: #7A4A00;
  --line: #CDD2E1;
  --on-glow: #1F2236;

  --radius-control: 10px;
  --radius-surface: 18px;
  --page: min(68rem, 100% - 2rem);
  --page-left: max(1rem, 50% - 34rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --dusk: #181B2A;
    --mist: #212538;
    --field: #181B2A;
    --ink: #ECEEF6;
    --slate: #A7ACC6;
    --glow: #F5C46B;
    --glow-hover: #F8D38E;
    --glow-soft: rgb(245 196 107 / 0.3);
    --wick: #F5C46B;
    --line: #33384F;
  }
}

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

/* Component display rules must never beat the hidden attribute. */
[hidden] { display: none !important; }

html { overflow-x: clip; }

body {
  position: relative;
  margin: 0;
  background: var(--dusk);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The light. It comes from the tealight in the header and warms the top of the page.
   This is the page's one unprompted animation. */
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(2.4rem - 30rem);
  left: calc(var(--page-left) + 1.15rem - 30rem);
  width: 60rem;
  height: 60rem;
  background: radial-gradient(closest-side, var(--glow-soft), transparent 72%);
  pointer-events: none;
  animation: light-on 1.6s ease-out 0.15s both;
}

@keyframes light-on {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  * { scroll-behavior: auto !important; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

a { color: var(--wick); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  z-index: 10;
  left: 0.75rem;
  top: -4rem;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--dusk);
  font-weight: 600;
}
.skip:focus { top: 0.75rem; }

/* Header */

.site-header,
main > section,
main > .pair,
.site-footer {
  width: var(--page);
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { width: 2.3rem; height: 2.3rem; }
.brand-name { font-size: 1.375rem; font-weight: 650; letter-spacing: -0.01em; }

.mark-flame { fill: var(--glow); }
.mark-wick { stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; fill: none; }
.mark-cup { fill: var(--ink); }
.mark-rim { fill: var(--slate); }
.mark-wax { fill: var(--dusk); }

.header-cta { font-weight: 600; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  align-items: center;
  gap: 3rem 4.5rem;
  padding-block: 4.5rem 6rem;
}

h1 {
  margin: 0 0 1.5rem;
  max-width: 11ch;
  font-size: clamp(2.75rem, 1.5rem + 4.8vw, 4.9rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.lead {
  margin: 0 0 2rem;
  max-width: 33rem;
  font-size: 1.3125rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin: 0;
}

.hero-note {
  max-width: 19rem;
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--glow);
  color: var(--on-glow);
  box-shadow: inset 0 -2px 0 rgb(31 34 54 / 0.16);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--glow-hover); }
.button:active { box-shadow: none; transform: translateY(1px); }
.button[disabled] { cursor: progress; opacity: 0.7; }

/* Demo: the capacity dial working on a real-looking list */

.demo {
  margin: 0;
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--mist);
}

.dial-label { margin: 0 0 0.625rem; font-size: 1rem; font-weight: 650; }

.dial-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: var(--dusk);
}

.dial-option {
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--slate);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}
.dial-option:hover { color: var(--ink); }
.dial-option[aria-pressed="true"] {
  background: var(--ink);
  color: var(--mist);
  font-weight: 650;
}

.demo-list { margin: 1.25rem 0 0; padding: 0; list-style: none; }
.demo-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  font-size: 1.0625rem;
}
.demo-list li + li { border-top: 1px solid var(--line); }
.demo-list .when { color: var(--slate); white-space: nowrap; font-variant-numeric: tabular-nums; }
.demo-list li.arriving { animation: settle 0.32s ease-out; }

@keyframes settle {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-list li.arriving { animation: none; }
}

.demo-rest { margin: 0.75rem 0 0; color: var(--slate); font-size: 1rem; line-height: 1.5; }

.demo figcaption { margin-top: 1.25rem; color: var(--slate); font-size: 0.875rem; line-height: 1.45; }

/* Sections */

main > section,
main > .pair { padding-block: 4.5rem; }

h2 {
  margin: 0 0 2rem;
  font-size: clamp(1.75rem, 1.25rem + 1.7vw, 2.4rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h3 { margin: 0 0 0.5rem; font-size: 1.25rem; font-weight: 650; line-height: 1.3; }

.how { border-top: 1px solid var(--line); }

.how-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 2.5rem 3.5rem;
}
.how-grid p { margin: 0; max-width: 34rem; }

.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 3rem 3.5rem;
  border-top: 1px solid var(--line);
}
.pair > section { padding: 0; }
.pair p { margin: 0 0 1rem; max-width: 34rem; }

.without ul { margin: 0; padding-left: 1.25rem; }
.without li + li { margin-top: 0.5rem; }
.without li::marker { color: var(--slate); }

/* Join */

.join {
  margin-block: 2rem 4.5rem;
  padding: clamp(1.5rem, 4vw, 3rem) !important;
  border: 1px solid var(--line);
  border-radius: var(--radius-surface);
  background: var(--mist);
}
.join > p { margin: -1rem 0 2rem; max-width: 36rem; }
.join-form, .joined { max-width: 38rem; }

.field { margin: 0 0 1.5rem; padding: 0; border: 0; min-width: 0; }

label, legend { font-weight: 650; }
.field > label:not(.check) { display: block; margin-bottom: 0.375rem; }
legend { padding: 0; margin-bottom: 0.5rem; }

input[type="email"],
input[type="text"],
select,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.875rem;
  border: 1.5px solid var(--slate);
  border-radius: var(--radius-control);
  background: var(--field);
  color: var(--ink);
  font: inherit;
}
textarea { resize: vertical; line-height: 1.5; }
[aria-invalid="true"] { border-color: var(--wick); border-width: 2px; }

input[type="checkbox"],
input[type="radio"] {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  accent-color: var(--ink);
}

.choices { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.choices-wide { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0 1.25rem; }
.choices label,
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding-block: 0.5rem;
  font-weight: 400;
  line-height: 1.45;
}

.details {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.details > legend { padding: 0 0.375rem; font-size: 1.125rem; }
.optional { color: var(--slate); font-weight: 400; }
.details-note { margin: 0.25rem 0 0.5rem; color: var(--slate); font-size: 1rem; line-height: 1.5; }
.check.consent { font-weight: 650; margin-bottom: 1rem; }
.details .consent + .error { margin: -0.75rem 0 1.25rem; }

.error { margin: 0.375rem 0 0; color: var(--wick); font-size: 0.9375rem; font-weight: 650; }
.form-status { margin: 0 0 1rem; color: var(--wick); font-weight: 650; }
.privacy-link { margin: 1rem 0 0; color: var(--slate); font-size: 0.9375rem; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.joined h3 { font-size: 1.5rem; }
.joined p { margin: 0; }
.joined:focus { outline: none; }

/* Footer */

.site-footer {
  padding-block: 2.5rem 3.5rem;
  border-top: 1px solid var(--line);
  color: var(--slate);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.site-footer p { margin: 0 0 0.75rem; max-width: 44rem; }
.site-footer a + a { margin-left: 1.25rem; }

/* Simple pages (privacy, thanks) */

.page {
  width: min(44rem, 100% - 2rem);
  margin-inline: auto;
  padding-block: 3rem 5rem;
}
.page h1 { max-width: none; font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.25rem); }
.page h2 { margin: 2.75rem 0 0.75rem; font-size: 1.5rem; font-weight: 650; }
.page p, .page li { max-width: 40rem; }
.page .updated { color: var(--slate); font-size: 0.9375rem; }

/* Small screens */

@media (max-width: 52rem) {
  .hero { grid-template-columns: 1fr; padding-block: 2.5rem 4rem; }
  .lead { font-size: 1.1875rem; }
  main > section, main > .pair { padding-block: 3.5rem; }
}
