/* Fonts are hosted here rather than loaded from Google, so no third party sees visitors. Licenses: fonts/LICENSES.txt */
@font-face { font-family: 'Bebas Neue'; src: url('/fonts/bebas-neue.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('/fonts/fraunces-italic.woff2') format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --bg: #120a1f;
  --bg-raised: #1d1230;
  --text: #f1eaf9;
  --muted: #b9a8d3;
  --accent: #a970ff;
  --accent-strong: #c49bff;
  --line: #3a2858;
  --error: #ff9aa8;
  --success: #a8f0c6;
  /* Poster-style display face for headings, Inter for reading, Fraunces italic for other people's words. */
  --display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --quote: Fraunces, Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(ellipse at top, #2a1548 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

a { color: var(--accent-strong); }

/* Purple rain: two tiled layers of thin streaks falling at different speeds. */
.rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='160'%3E%3Cg stroke='%23c49bff' stroke-width='1.5' stroke-linecap='round' opacity='.7'%3E%3Cpath d='M12 10v30M58 70v40M97 20v25M33 120v30'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='220'%3E%3Cg stroke='%23a970ff' stroke-width='1' stroke-linecap='round' opacity='.5'%3E%3Cpath d='M25 30v50M70 140v60'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 160px, 90px 220px;
  animation: fall 1.2s linear infinite;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  z-index: 0;
}

/* Each layer moves exactly one tile height per cycle so the loop is seamless. */
@keyframes fall {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 160px, 0 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .rain { animation: none; }
  html { scroll-behavior: auto; }
}

.hero, main, .footer {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  /* Top-aligned, so the pledge amounts opening below the email field push content down instead of shifting it up. */
  justify-content: flex-start;
  text-align: center;
  padding-top: clamp(2rem, 6vh, 4rem);
  padding-bottom: 3rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.15; letter-spacing: 0.01em; }
h3 { font-weight: 650; line-height: 1.25; }

h1 {
  margin: 0;
  font-size: clamp(3.4rem, 12vw, 6rem);
  line-height: 0.92;
  /* Even line lengths, so a word like "Cut" is never left alone on the last line. */
  text-wrap: balance;
}

.subhead {
  margin: 1rem auto 2.5rem;
  max-width: 30rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.hero-quote { margin: 0 auto 2.25rem; max-width: 32rem; }
.hero-quote blockquote { margin: 0; font-family: var(--quote); font-style: italic; font-weight: 350; font-size: 1.15rem; line-height: 1.45; }
.hero-quote blockquote p { margin: 0; }
.hero-quote figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem; }

.counter { margin: 0 auto 2rem; width: 100%; max-width: 24rem; }

.counter-number { margin: 0 0 0.6rem; font-size: 1.1rem; }

#count { font-family: var(--display); font-size: 2.6rem; color: var(--accent-strong); }

.progress {
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.8s ease;
}

.counter-goal { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.9rem; }

.button {
  display: inline-block;
  align-self: center;
  padding: 0.85rem 1.8rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #12071f;
  font: 600 1rem var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.button:hover, .button:focus-visible { background: var(--accent-strong); }
.button:disabled { opacity: 0.6; cursor: wait; }

:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }

.section { padding: 3.5rem 0; border-top: 1px solid var(--line); }

h2 { margin: 0 0 1.5rem; font-size: 2.8rem; line-height: 1; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.75rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-strong);
  font-family: var(--display);
  font-size: 1.15rem;
}

.steps h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--muted); }

.facts { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.facts li { margin-bottom: 1.5rem; }
.facts h3 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.facts p { margin: 0; color: var(--muted); }

.quotes { display: grid; gap: 1rem; }
.quotes figure {
  margin: 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  border-radius: 0 8px 8px 0;
}
.quotes blockquote { margin: 0; font-family: var(--quote); font-style: italic; font-weight: 350; font-size: 1.1rem; line-height: 1.5; }
.quotes blockquote p { margin: 0; }
.quotes figcaption { margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; }

.quotes-source { margin: 1rem 0 0; color: var(--muted); font-size: 0.85rem; }

.signup { width: 100%; max-width: 34rem; margin: 0 auto; }

.signup .button { display: block; margin: 1rem auto 0; min-width: 16rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Collapsed to zero height until revealed, then slides open (grid row 0fr -> 1fr). */
.pledge {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.4s ease, opacity 0.4s ease, visibility 0s linear 0.4s;
}

.pledge.revealed {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows 0.4s ease, opacity 0.4s ease;
}

/* Must come after the rules above to override their transitions. */
@media (prefers-reduced-motion: reduce) {
  .pledge, .pledge.revealed { transition: none; }
}

/* The padding keeps focus outlines from being clipped by overflow: hidden. */
.pledge-inner { min-height: 0; overflow: hidden; padding: 0 0.4rem; }

.other-amount label { display: block; margin-bottom: 0.4rem; }

input[type="email"], input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

fieldset { border: 0; margin: 1.25rem 0 0; padding: 0; }
legend { margin: 0 auto 0.75rem; padding: 0; }

.amounts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }

.amounts label {
  margin: 0;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.amounts label:has(input:checked) { border-color: var(--accent); background: rgba(169, 112, 255, 0.15); }
.amounts input { accent-color: var(--accent); margin-right: 0.3rem; }

.other-amount { margin-top: 1rem; }

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

.fine-print { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.85rem; }

.form-message { margin: 0.5rem 0 0; min-height: 1.6em; }

.back-to-join { margin-top: 2rem; text-align: center; }
.form-message.error { color: var(--error); }
.form-message.success { color: var(--success); }

.share { margin-top: 0.75rem; }
.share p { margin: 0 0 0.6rem; }
.share-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.share-button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.share-button:hover, .share-button:focus-visible { border-color: var(--accent); background: rgba(169, 112, 255, 0.15); }

.footer {
  width: calc(100% - 2rem);
  max-width: 42rem;
  padding: 0;
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer p { margin: 0.3rem 0; }

.legal { padding-top: 3rem; padding-bottom: 3rem; }
.legal h1 { font-size: 3.2rem; margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.8rem; margin: 2rem 0 0.5rem; }

.change-pledge { text-align: center; }
.change-pledge .signup { margin-top: 1.5rem; }
