@font-face {
  font-family: "Switzer";
  src: url("/fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("/fonts/switzer-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #e8e8e3;
  --ink: #181715;
  --muted: #63625c;
  --accent: #bfb21a;
  --accent-ink: #181715;
  --field-accent: #bfb21a;
  --margin: clamp(16px, 3vw, 40px);
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Switzer", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181715;
    --ink: #e8e8e3;
    --muted: #9b9a92;
    --field-accent: #6b6420;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--font);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--margin); top: 12px; z-index: 5; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; }

/* Top bar */
.bar {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px var(--margin);
  font-size: 15px;
}
.bar a { text-decoration: none; }
.bar a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.02em; }
.wordmark svg { width: 20px; height: 20px; flex: none; }

/* Hero */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 96px var(--margin) 72px;
}
.display {
  margin: 0;
  font-weight: 600;
  font-size: clamp(6rem, 22vw, 19rem);
  line-height: 0.82;
  letter-spacing: -0.055em;
}
.line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.line > span { display: inline-block; }
.line-2 { color: var(--muted); }
.lead {
  margin: clamp(32px, 5vw, 56px) 0 0;
  max-width: 34ch;
  font-size: var(--step-lead);
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.lead a { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.btn {
  margin-top: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 32px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.25s;
}
.btn:hover { transform: translateY(-2px); background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(0) scale(0.98); }

/* Inverted field */
.field {
  background: var(--ink); color: var(--bg);
  text-align: center;
  padding: clamp(120px, 16vw, 220px) var(--margin);
}
.stack { list-style: none; margin: 0; padding: 0; }
.stack li {
  font-weight: 600;
  font-size: clamp(2rem, 8.6vw, 7.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}
.stack li:nth-child(2) { color: var(--field-accent); }
.note { margin: clamp(40px, 5vw, 64px) auto 0; max-width: 40ch; font-size: var(--step-lead); line-height: 1.35; text-wrap: balance; }

/* Closing field */
.close {
  background: var(--accent); color: var(--accent-ink);
  min-height: 90svh;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  padding: 24px var(--margin) 28px;
}
.close-top { width: 100%; display: flex; justify-content: space-between; font-size: 15px; }
.close-top a { text-decoration: none; }
.close-top a:hover { text-decoration: underline; }
.close-label {
  margin: auto 0 12px;
  font-size: var(--step-lead); font-weight: 400; letter-spacing: -0.015em;
}
.email {
  font-weight: 600;
  font-size: clamp(2.4rem, 7.6vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.email:hover { text-decoration: underline; text-decoration-thickness: 0.05em; text-underline-offset: 0.12em; }
.copy {
  margin-top: 28px;
  min-height: 48px; padding: 0 24px;
  border: 2px solid currentColor; border-radius: 999px;
  background: transparent; color: inherit;
  font: 600 1rem var(--font); letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.copy:hover { background: var(--accent-ink); color: var(--accent); }
.copy:active { transform: scale(0.97); }
.close-meta {
  width: 100%; margin-top: auto; padding-top: 64px;
  display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  font-size: 1rem;
}

@media (max-width: 640px) {
  .email span { display: block; }
  .email { font-size: 12.5vw; }
  .close-meta { flex-direction: column; align-items: center; }
}

/* Motion: hidden states only apply once JS has marked the page */
.js .line > span { transform: translateY(105%); }
.js .reveal { opacity: 0; transform: translateY(24px); }
.js.ready .line > span { transform: none; transition: transform 0.9s var(--ease); }
.js.ready .line-2 > span { transition-delay: 0.11s; }
.js .reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .line > span, .js .reveal { transform: none !important; transition: none !important; }
  .js .reveal { opacity: 1; }
}

/* 404 */
.notfound { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 96px var(--margin); }
.notfound .display { font-size: clamp(6rem, 26vw, 20rem); }
