@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/figtree-latin.woff2') format('woff2');
}

:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --line: #D9D2C6;
  --text: #22252A;
  --text-2: #5E5A54;
  --primary: #1F4D45;
  --primary-dark: #12302B;
  --accent: #F2A65A;
  --error: #B4553A;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --gutter: clamp(20px, 5.5vw, 80px);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
button { font-family: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

.page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Figtree, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 32px var(--gutter) 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.brand img { width: 40px; height: 40px; display: block; }
.brand-name { font-size: 36px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; color: var(--primary); }
.greeting { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text-2); }

/* Main */
main { flex-grow: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; padding: 32px var(--gutter) 48px; max-width: 1440px; width: 100%; margin: 0 auto; }
.col { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.col.art { flex-direction: row; justify-content: center; }
.intro { display: flex; flex-direction: column; gap: 20px; }
.eyebrow { margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--primary); }
h1 { margin: 0; font-size: clamp(48px, 7vw, 96px); line-height: 1.15em; font-weight: 600; letter-spacing: -0.02em; color: var(--primary); }
.words-window { display: block; height: 1.15em; overflow: hidden; }
.wv-words { display: flex; flex-direction: column; }
.wv-words > span { height: 1.15em; white-space: nowrap; }
.h1-rest { display: block; color: var(--text); }
.lede { margin: 0; max-width: 520px; font-size: 18px; line-height: 28px; color: var(--text-2); }

/* Signup */
.signup { display: flex; flex-direction: column; gap: 12px; max-width: 520px; }
.signup form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.signup label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; }
.field-row input { flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-family: inherit; font-size: 17px; }
.field-row input.invalid { border: 2px solid var(--error); }
.field-row button { flex: 0 0 auto; height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--primary); color: var(--bg); font-size: 16px; font-weight: 600; cursor: pointer; transition: background 150ms var(--ease); }
.field-row button:hover { background: var(--primary-dark); }
.field-row button:disabled { opacity: .7; cursor: default; }
.help { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-2); }
.help.error { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 20px; background: var(--surface); box-shadow: 0 1px 2px rgba(34,37,42,.06), 0 4px 12px rgba(34,37,42,.06); }
.done-dot { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 999px; background: var(--accent); }
.done-title { font-size: 17px; line-height: 22px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.done-body { font-size: 15px; line-height: 20px; color: var(--text-2); }

/* Area chips */
.areas { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 16px 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; }
.chip.active { border-color: var(--primary); }
.area-line { margin: 0; min-height: 40px; font-size: 15px; line-height: 20px; color: var(--text-2); }

/* Rings */
#rings { width: 100%; max-width: 720px; height: auto; display: block; overflow: visible; }
.area-ring { transition: opacity 250ms var(--ease); }
.area-ring.dim { opacity: .16; }
.wv-ring { transform-origin: 400px 400px; animation: wv-spin linear infinite; }
.wv-ring circle { animation: wv-draw 1.6s var(--ease) both; }
.r1 { animation-duration: 140s; }
.r2 { animation-duration: 110s; animation-direction: reverse; animation-delay: -30s; }
.r3 { animation-duration: 90s; animation-delay: -50s; }
.r4 { animation-duration: 72s; animation-direction: reverse; animation-delay: -12s; }
.r5 { animation-duration: 56s; animation-delay: -20s; }
.r6 { animation-duration: 44s; animation-direction: reverse; animation-delay: -8s; }
.r1 circle { animation-delay: .2s; }
.r2 circle { animation-delay: .35s; }
.r3 circle { animation-delay: .5s; }
.r4 circle { animation-delay: .65s; }
.r5 circle { animation-delay: .8s; }
.r6 circle { animation-delay: .95s; }
.wv-track { animation: wv-fade 1.2s var(--ease) both; }
.wv-day { transform-origin: 400px 400px; transition: transform 2.4s var(--ease); }
.wv-glow { transform-box: fill-box; transform-origin: center; animation: wv-glow 4s var(--ease) 2.6s infinite both; }

/* Footer */
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px var(--gutter) 28px; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; color: var(--text-2); }

/* Motion */
@keyframes wv-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wv-draw { from { stroke-dashoffset: 84; } to { stroke-dashoffset: 0; } }
@keyframes wv-spin { from { transform: rotate(-25deg); } to { transform: rotate(335deg); } }
@keyframes wv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wv-glow { 0% { transform: scale(1); opacity: .45; } 70% { transform: scale(3.2); opacity: 0; } 100% { transform: scale(3.2); opacity: 0; } }
@keyframes wv-words {
  0%, 13.33% { transform: translateY(0); }
  16.67%, 30% { transform: translateY(-1.15em); }
  33.33%, 46.67% { transform: translateY(-2.3em); }
  50%, 63.33% { transform: translateY(-3.45em); }
  66.67%, 80% { transform: translateY(-4.6em); }
  83.33%, 96.67% { transform: translateY(-5.75em); }
  100% { transform: translateY(-6.9em); }
}
.wv-rise { animation: wv-rise .7s var(--ease) both; }
.d1 { animation-delay: .1s; }
.d2 { animation-delay: .2s; }
.d3 { animation-delay: .3s; }
.d4 { animation-delay: .45s; }
.d5 { animation-delay: .6s; }
.d6 { animation-delay: .75s; }
.d7 { animation-delay: .9s; }
.wv-words { animation: wv-words 18s var(--ease) 1.4s infinite; }

@media (prefers-reduced-motion: reduce) {
  .wv-rise, .wv-words, .wv-ring, .wv-ring circle, .wv-track, .wv-glow { animation: none; }
  .wv-ring { transform: rotate(-25deg); }
  .wv-glow { opacity: 0; }
  .wv-day { transition: none; }
}

@media (max-width: 480px) {
  .field-row button { flex: 1 1 100%; }
  .brand-name { font-size: 30px; }
}
