/* Rainbow Fireside. Mobile-first; no third-party requests. */

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}
/* Wordmark only: Fraunces pinned to opsz 72, wght 600, SOFT 10, WONK 0, subset to the wordmark glyphs. */
@font-face {
  font-family: "Fraunces Wordmark";
  src: url("/assets/fonts/fraunces-wordmark.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #17223b;
  --navy-raised: #1f2d4c;
  --navy-line: #34436a;
  --cream: #faf3e6;
  --offwhite: #faf9f6;
  --white: #ffffff;
  --ink: #231f20;
  --ink-soft: #5b5557;
  --warm: #f5f1e8;
  --warm-soft: #c9cddb;

  --rose: #c45d71;
  --gold: #cc9a3d;
  --amber: #cc7d49;
  --fern: #6b8f55;
  --olive: #8fa150;
  --violet: #8566a8;
  --slate: #4f7c96;
  --teal: #4f9683;

  --gutter: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
  --measure: 40rem;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; background: var(--navy); }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem; /* 17px */
  font-weight: 400;
  font-variation-settings: "opsz" 14;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-wrap: break-word;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-weight: 800;
  font-variation-settings: "opsz" 40;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--navy);
}
p { margin: 0 0 1rem; }

.wrap {
  width: 100%;
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.skip {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 10;
  background: var(--cream); color: var(--navy); padding: 0.75rem 1rem; border-radius: 8px;
}
.skip:focus { top: 0.5rem; }

.wordmark {
  font-family: "Fraunces Wordmark", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: 0;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.7rem 1.6rem;
  font: inherit; font-weight: 800; font-variation-settings: "opsz" 40;
  text-decoration: none; text-align: center;
  color: var(--navy); background: var(--gold);
  border-radius: 999px;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: #dbae56; }
.btn-lg { min-height: 3.4rem; padding-inline: 2.4rem; font-size: 1.125rem; }
.btn-sm { min-height: 2.75rem; padding: 0.4rem 1.25rem; }
.btn-dark { background: var(--navy); color: var(--cream); }
.btn-dark:hover { background: var(--navy-raised); }

/* Header */
.site-header { background: var(--navy); color: var(--warm); padding-block: 0.5rem; padding-top: max(0.5rem, env(safe-area-inset-top)); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: var(--warm); min-height: 2.75rem; }
.brand-mark { height: 2.25rem; width: auto; flex: none; }
.brand .wordmark { font-size: 1.3rem; line-height: 1; white-space: nowrap; }
.header-nav { display: flex; align-items: center; gap: 0.5rem; }
.icon-link { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; color: var(--warm); border-radius: 50%; transition: color 0.15s ease; }
.icon-link:hover { color: var(--gold); }
.nav-link { display: none; color: var(--warm); text-decoration: none; font-weight: 600; }
.nav-link:hover { text-decoration: underline; text-decoration-color: var(--gold); }

@media (max-width: 420px) {
  .brand .wordmark { font-size: 1.15rem; }
  .brand { gap: 0.5rem; }
}
@media (max-width: 339px) {
  .brand-mark { display: none; }
}

/* Hero */
.hero {
  background:
    radial-gradient(60% 50% at 50% 30%, rgba(204, 154, 61, 0.22), rgba(204, 154, 61, 0) 70%),
    radial-gradient(120% 80% at 50% 0%, #25345a 0%, var(--navy) 62%);
  color: var(--warm);
  padding-block: clamp(2rem, 7svh, 4.5rem) clamp(2.75rem, 8svh, 5rem);
}
.hero-inner { display: grid; justify-items: center; text-align: center; gap: clamp(1.25rem, 3.5svh, 2.25rem); }
.hero-mark { height: clamp(7.5rem, 24svh, 15rem); width: auto; }
.hero h1 { color: var(--warm); font-size: clamp(2.35rem, 11vw, 4rem); line-height: 1.05; margin-bottom: 0.6rem; }
.tagline { font-weight: 800; font-variation-settings: "opsz" 40; font-size: 1.15rem; color: var(--gold); margin-bottom: 1rem; }
.lede { font-size: 1.15rem; color: var(--warm-soft); max-width: 30rem; margin-inline: auto; margin-bottom: 1.75rem; }
.hero-actions { display: grid; gap: 1rem; justify-items: center; }
.hero-actions .btn { width: 100%; max-width: 20rem; }
.link-quiet { color: var(--warm); font-weight: 600; min-height: 2.75rem; display: inline-flex; align-items: center; text-decoration-color: var(--navy-line); }
.link-quiet:hover { text-decoration-color: var(--gold); }

.spectrum {
  height: 6px;
  background: linear-gradient(90deg,
    var(--rose) 0 12.5%, var(--amber) 0 25%, var(--gold) 0 37.5%, var(--olive) 0 50%,
    var(--fern) 0 62.5%, var(--teal) 0 75%, var(--slate) 0 87.5%, var(--violet) 0 100%);
}

/* Sections */
.section { padding-block: clamp(3.25rem, 9vw, 6rem); }
.section-cream { background: var(--cream); }
.section-white { background: var(--offwhite); }
.section-navy { background: var(--navy); color: var(--warm); }
.section-navy h2, .section-navy h3 { color: var(--warm); }
h2 { font-size: clamp(1.7rem, 6.5vw, 2.5rem); }
h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.section-head { margin-bottom: 2rem; max-width: var(--measure); }
.section-head p { margin: 0.75rem 0 0; color: var(--ink-soft); }

.split { display: grid; gap: 1.5rem; }
.split-body p:last-child { margin-bottom: 0; }
.big { font-size: 1.25rem; line-height: 1.5; color: var(--navy); }

/* Eligibility cards */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.card {
  background: var(--white);
  border: 1px solid #e8e1d2;
  border-top: 5px solid var(--card-accent, var(--gold));
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.1rem;
}
.card p { margin: 0; color: var(--ink-soft); }
.card-rose { --card-accent: var(--rose); }
.card-gold { --card-accent: var(--gold); }
.card-fern { --card-accent: var(--fern); }
.card-slate { --card-accent: var(--slate); }
.card-teal { --card-accent: var(--teal); }
.note { margin: 1.75rem 0 0; max-width: var(--measure); color: var(--ink-soft); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.75rem 3.75rem; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: var(--cream);
  font-weight: 800; font-variation-settings: "opsz" 40;
}
.steps li::after {
  content: ""; position: absolute; left: 1.2rem; top: 2.9rem; bottom: 0.4rem; width: 2px; background: #e0d6c0;
}
.steps li:last-child::after { display: none; }
.steps p { margin: 0; color: var(--ink-soft); }

/* Values */
.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.values li { background: var(--navy-raised); border: 1px solid var(--navy-line); border-radius: var(--radius); padding: 1.35rem 1.25rem; }
.values p { margin: 0; color: var(--warm-soft); }

/* FAQ */
.faq { border-top: 1px solid #e3dccb; max-width: 46rem; }
.faq details { border-bottom: 1px solid #e3dccb; }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.5rem; padding: 0.9rem 0;
  font-weight: 800; font-variation-settings: "opsz" 40; color: var(--navy); line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.65rem; height: 0.65rem;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { margin: 0 0 1.1rem; color: var(--ink-soft); padding-right: 1.75rem; }

/* CTA band */
.cta-inner { text-align: center; display: grid; justify-items: center; gap: 1rem; }
.cta-inner p { margin: 0; color: var(--warm-soft); font-size: 1.15rem; }
.cta-inner .btn { width: 100%; max-width: 20rem; margin-top: 0.5rem; }

.cta-inner .cta-social { font-size: 1rem; margin-top: 0.75rem; }
.cta-social a { color: var(--warm); text-decoration-color: var(--gold); }

/* Footer */
.site-footer {
  background: var(--navy); color: var(--warm-soft);
  border-top: 1px solid var(--navy-line);
  padding-block: 2.5rem; padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  font-size: 0.95rem;
}
.site-footer .wrap { display: grid; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.9rem; }
.footer-mark { height: 3rem; width: auto; }
.footer-brand p { margin: 0; }
.footer-brand .wordmark { color: var(--warm); font-size: 1.35rem; line-height: 1.1; }
.footer-tagline { color: var(--warm-soft); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--warm); text-decoration-color: var(--navy-line); }
.footer-nav a:hover { text-decoration-color: var(--gold); }
.disclaimer { max-width: 44rem; margin: 0; }
.copyright { margin: 0; color: #9aa1b8; }

/* Launch countdown (Join page) */
.countdown {
  background:
    radial-gradient(60% 70% at 50% 45%, rgba(204, 154, 61, 0.2), rgba(204, 154, 61, 0) 70%),
    radial-gradient(120% 90% at 50% 0%, #25345a 0%, var(--navy) 62%);
  color: var(--warm);
  padding-block: clamp(2.5rem, 9svh, 5rem) clamp(3rem, 10svh, 5.5rem);
  text-align: center;
}
.countdown-inner { display: grid; justify-items: center; gap: 0.25rem; }
.countdown-title { color: var(--warm-soft); font-size: clamp(1.1rem, 4.5vw, 1.5rem); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.countdown-num {
  margin: 0; min-height: 1em;
  font-size: clamp(7rem, 42vw, 15rem); line-height: 1;
  font-weight: 800; font-variation-settings: "opsz" 40; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.countdown-label { margin: 0; font-size: clamp(1.25rem, 5vw, 1.75rem); font-weight: 800; font-variation-settings: "opsz" 40; color: var(--warm); }
.countdown-fallback { margin: 1rem 0 0; font-size: 1.5rem; font-weight: 800; color: var(--warm); }

/* Join page after launch: prominent apply link */
.apply {
  background:
    radial-gradient(60% 70% at 50% 45%, rgba(204, 154, 61, 0.2), rgba(204, 154, 61, 0) 70%),
    radial-gradient(120% 90% at 50% 0%, #25345a 0%, var(--navy) 62%);
  color: var(--warm);
  padding-block: clamp(2.5rem, 8svh, 4.5rem);
  text-align: center;
}
.apply-inner { display: grid; justify-items: center; gap: 1.5rem; }
.apply h1 { margin: 0; color: var(--warm); font-size: clamp(2rem, 8vw, 3rem); }
.apply .btn { width: 100%; max-width: 20rem; }

/* Prose pages (legal, getting started, join, 404) */
.prose-wrap { padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(3rem, 8vw, 5rem); }
.prose { max-width: var(--measure); margin-inline: auto; }
.prose h1 { font-size: clamp(1.9rem, 7.5vw, 2.75rem); margin-bottom: 0.75rem; }
.prose h1 + p { color: var(--ink-soft); }
.prose h2 { font-size: clamp(1.4rem, 5.5vw, 1.75rem); margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.55rem; padding-left: 0.2rem; }
.prose li::marker { color: var(--amber); }
.prose a:not(.btn) { color: var(--navy); font-weight: 500; }
.prose strong { color: var(--ink); }
.prose .lead { font-size: 1.2rem; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid #e3dccb; margin: 2rem 0; }
.prose-cta { margin-top: 3rem; padding: 1.5rem; background: var(--white); border: 1px solid #e8e1d2; border-radius: var(--radius); display: grid; gap: 0.75rem; justify-items: start; }
.prose-cta p { margin: 0; font-weight: 800; font-variation-settings: "opsz" 40; color: var(--navy); }

.toc { margin: 1.5rem 0 2rem; background: var(--white); border: 1px solid #e8e1d2; border-radius: var(--radius); }
.toc summary { cursor: pointer; padding: 0.9rem 1.1rem; min-height: 3rem; display: flex; align-items: center; font-weight: 800; font-variation-settings: "opsz" 40; color: var(--navy); }
.toc summary { justify-content: space-between; list-style: none; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: ""; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(45deg) translateY(-2px); }
.toc[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.toc ol { margin: 0; padding: 0 1.1rem 0.9rem 2.5rem; }
.toc li { margin: 0; }
.toc a { display: inline-block; padding: 0.4rem 0; font-weight: 500; }

/* Wider screens */
@media (min-width: 640px) {
  .nav-link { display: inline; margin-right: 0.75rem; }
  .header-nav { gap: 0.75rem; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(3, 1fr); }
  .hero-actions { grid-auto-flow: column; justify-content: center; align-items: center; gap: 1.75rem; }
  .hero-actions .btn { width: auto; }
}
@media (min-width: 900px) {
  body { font-size: 1.125rem; }
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { grid-template-columns: auto minmax(0, 28rem); justify-items: start; text-align: left; gap: 5rem; justify-content: center; align-items: center; }
  .hero-mark { height: clamp(14rem, 40svh, 21rem); }
  .hero h1 { font-size: clamp(3rem, 5vw, 4.25rem); }
  .lede { margin-inline: 0; }
  .hero-actions { justify-content: start; }
  .footer-mark { height: 3.5rem; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
  .disclaimer, .copyright { grid-column: 1 / -1; }
}

/* Motion: one-shot only. Nothing loops. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
  /* Logo petals settle upward from the base, then the text follows. */
  .hero-mark .petal { animation: rise 0.65s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-mark .petal:nth-child(8) { animation-delay: 0.10s; }
  .hero-mark .petal:nth-child(9) { animation-delay: 0.16s; }
  .hero-mark .petal:nth-child(5) { animation-delay: 0.22s; }
  .hero-mark .petal:nth-child(3) { animation-delay: 0.28s; }
  .hero-mark .petal:nth-child(4) { animation-delay: 0.34s; }
  .hero-mark .petal:nth-child(6) { animation-delay: 0.40s; }
  .hero-mark .petal:nth-child(7) { animation-delay: 0.46s; }
  .hero-mark .petal:nth-child(1) { animation-delay: 0.52s; }
  .hero-mark .petal:nth-child(2) { animation-delay: 0.58s; }
  .hero-text > * { animation: rise 0.7s ease-out both; }
  .hero-text > :nth-child(1) { animation-delay: 0.7s; }
  .hero-text > :nth-child(2) { animation-delay: 0.78s; }
  .hero-text > :nth-child(3) { animation-delay: 0.86s; }
  .hero-text > :nth-child(4) { animation-delay: 0.94s; }

  /* Section content eases in as it enters the viewport (progressive enhancement; no JavaScript). */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}
