/* ============================================================
   Helios — cold void, one warm sun.
   Display: Fraunces (high-contrast serif). Body: Hanken Grotesk.
   ============================================================ */

:root {
  --void: #050609;
  --void-2: #0a0c14;
  --ink: #eef0f7;
  --ink-dim: #aab0c4;
  --ink-mute: #6f7589;
  --line: rgba(255, 255, 255, 0.08);

  /* the only saturated hues in the whole page */
  --sun-1: #fff2cc;
  --sun-2: #ffcf6e;
  --sun-3: #ff9a3c;
  --sun-4: #ff6a2c;
  --glow: rgba(255, 173, 71, 0.55);

  --maxw: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--void);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--sun-3);
  color: #1a0d00;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- WebGL stage ---------- */
#stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#sun-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Fallback sun (no WebGL / reduced motion). Hidden once canvas takes over. */
.sun-fallback {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(56vw, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--sun-1) 0%, var(--sun-2) 22%, var(--sun-3) 42%, var(--sun-4) 56%, rgba(255, 106, 44, 0) 70%);
  filter: blur(2px);
  opacity: 0;
}
#stage.is-fallback .sun-fallback {
  opacity: 1;
  animation: breathe 7s var(--ease) infinite;
}
#stage.is-fallback #sun-canvas {
  display: none;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.035); }
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 35%, transparent 45%, rgba(2, 3, 6, 0.55) 100%);
  pointer-events: none;
}

/* ---------- meridian progress ---------- */
.meridian {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  background: var(--line);
}
.meridian__fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sun-3), var(--sun-2), var(--sun-1));
  box-shadow: 0 0 16px var(--glow);
  transition: width 0.1s linear;
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: linear-gradient(180deg, rgba(5, 6, 9, 0.7), rgba(5, 6, 9, 0));
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Fraunces", serif;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}
.brand__mark {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--sun-1), var(--sun-3) 60%, var(--sun-4));
  box-shadow: 0 0 14px var(--glow);
}
.nav__links {
  display: flex;
  gap: 1.6rem;
  font-size: 0.95rem;
  color: var(--ink-dim);
}
.nav__links a {
  position: relative;
  transition: color 0.25s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: var(--sun-2);
  transition: width 0.3s var(--ease);
}
.nav__links a:hover::after { width: 100%; }

/* ---------- buttons ---------- */
.btn {
  --bd: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 1.3rem;
  border-radius: 100px;
  border: var(--bd);
  font-family: "Hanken Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.3s var(--ease),
    background 0.3s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }

.btn--solar {
  color: #240f00;
  background: linear-gradient(135deg, var(--sun-1), var(--sun-2) 45%, var(--sun-3));
  box-shadow: 0 8px 30px rgba(255, 154, 60, 0.32), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.btn--solar:hover {
  box-shadow: 0 12px 44px rgba(255, 154, 60, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.btn--ghost {
  color: var(--ink);
  --bd: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover {
  --bd: 1px solid rgba(255, 207, 110, 0.5);
  background: rgba(255, 207, 110, 0.06);
}
.btn--ph {
  color: var(--ink);
  --bd: 1px solid rgba(255, 207, 110, 0.28);
  background: rgba(255, 154, 60, 0.07);
  font-size: 0.88rem;
  padding: 0.6rem 1rem;
}
.btn--ph:hover { --bd: 1px solid rgba(255, 207, 110, 0.6); }
.btn--ph-big { font-size: 1rem; padding: 0.8rem 1.4rem; margin-top: 0.4rem; }
.btn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sun-2);
  box-shadow: 0 0 10px var(--sun-2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

/* ---------- layout primitives ---------- */
main { position: relative; z-index: 10; }
section { position: relative; }

.eyebrow,
.kicker {
  font-size: 0.82rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.kicker--gold { color: var(--sun-2); }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--pad) clamp(3rem, 8vh, 6rem);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* darken the left and bottom (where the copy sits) while leaving the
     upper-right sun clear, so the hero text always reads on darkness */
  background:
    linear-gradient(90deg, rgba(5, 6, 9, 0.9) 0%, rgba(5, 6, 9, 0.45) 42%, rgba(5, 6, 9, 0) 72%),
    linear-gradient(0deg, rgba(5, 6, 9, 0.85) 0%, rgba(5, 6, 9, 0) 48%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero__title {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(2.7rem, 8.5vw, 6.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 1.1rem 0 1.4rem;
}
.hero__title .line { display: block; }
.line--accent {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(100deg, var(--sun-1), var(--sun-2) 40%, var(--sun-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  max-width: 46ch;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--ink-dim);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 2rem 0 1.2rem;
}
.hero__meta {
  font-size: 0.9rem;
  color: var(--ink-mute);
}
.scroll-hint {
  max-width: var(--maxw);
  margin: 3.5rem auto 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.scroll-hint__rule {
  position: relative;
  flex: 1;
  height: 1px;
  max-width: 120px;
  background: var(--line);
  overflow: hidden;
}
.scroll-hint__rule::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--sun-2), transparent);
  animation: slide 2.6s var(--ease) infinite;
}
@keyframes slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(360%); }
}

/* ---------- bands ---------- */
.band {
  padding: clamp(6rem, 16vh, 12rem) var(--pad);
}
.band__inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.band__inner--center {
  text-align: center;
  max-width: 900px;
}
.band__title {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 1.1rem 0;
}
.band__title--big { font-size: clamp(2.4rem, 7vw, 5.2rem); }
.band__title em {
  font-style: italic;
  color: var(--sun-2);
}
.band__lede {
  max-width: 54ch;
  margin: 1.4rem auto 0;
  color: var(--ink-dim);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.28rem);
}

/* problem band: deeper dark, parallax wash */
.band--problem { background: linear-gradient(180deg, transparent, rgba(2, 3, 6, 0.55) 30%, rgba(2, 3, 6, 0.55)); }
.parallax {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.parallax--slow {
  background: radial-gradient(60% 50% at 80% 10%, rgba(255, 106, 44, 0.06), transparent 70%);
  will-change: transform;
}
.dark-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 3rem;
}
.dark-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.8rem 1.6rem;
  background: rgba(255, 255, 255, 0.015);
  transition: border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.dark-card:hover {
  border-color: rgba(255, 207, 110, 0.32);
  transform: translateY(-4px);
}
.dark-card__num {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  color: var(--sun-2);
  display: block;
  margin-bottom: 0.6rem;
}
.dark-card p { color: var(--ink-dim); }

/* dawn band */
.band--dawn { background: linear-gradient(180deg, rgba(2, 3, 6, 0.55), transparent); }

/* ---------- features ---------- */
.features {
  padding: clamp(4rem, 10vh, 8rem) var(--pad) clamp(6rem, 14vh, 11rem);
}
.features__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.feature {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.2rem 1.9rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005));
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.feature::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 154, 60, 0.18), transparent 65%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.feature:hover {
  border-color: rgba(255, 207, 110, 0.34);
  transform: translateY(-6px);
}
.feature:hover::before { opacity: 1; }
.feature__glyph {
  font-size: 1.8rem;
  color: var(--sun-2);
  display: inline-block;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 12px var(--glow));
}
.feature h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.7rem;
}
.feature p { color: var(--ink-dim); font-size: 1rem; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: clamp(7rem, 18vh, 13rem) var(--pad);
  text-align: center;
  overflow: hidden;
}
.cta__sun {
  position: absolute;
  left: 50%;
  bottom: -55%;
  width: min(120vw, 1100px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, rgba(255, 207, 110, 0.12), rgba(255, 106, 44, 0.04) 40%, transparent 62%);
  pointer-events: none;
}
.cta__inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.cta__title {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.cta__lede {
  margin: 1.3rem auto 2.2rem;
  max-width: 48ch;
  color: var(--ink-dim);
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
}
.signup {
  display: flex;
  gap: 0.6rem;
  max-width: 460px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.signup__input {
  flex: 1;
  min-width: 220px;
  padding: 0.85rem 1.2rem;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.signup__input::placeholder { color: var(--ink-mute); }
.signup__input:focus {
  border-color: rgba(255, 207, 110, 0.55);
  background: rgba(255, 207, 110, 0.05);
}
.signup__input.is-bad { border-color: #ff6a6a; }
.signup__note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--ink-mute);
}
.signup__note.is-done { color: var(--sun-2); }

/* ---------- footer ---------- */
.foot {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 2.2rem var(--pad);
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: 0.9rem;
}
.foot__brand {
  font-family: "Fraunces", serif;
  font-size: 1.1rem;
  color: var(--ink);
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- focus-visible (keyboard accessibility) ---------- */
.nav__links a:focus-visible {
  outline: 2px solid var(--sun-2);
  outline-offset: 4px;
  border-radius: 3px;
  color: var(--ink);
}

.btn:focus-visible {
  outline: 2px solid var(--sun-2);
  outline-offset: 3px;
}

.signup__input:focus-visible {
  border-color: rgba(255, 207, 110, 0.8);
  outline: 2px solid rgba(255, 207, 110, 0.35);
  outline-offset: 2px;
}

/* ---------- responsive: tablet ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .dark-grid,
  .features__inner { grid-template-columns: 1fr; }
  .sun-fallback { top: 30%; width: 80vw; }
  .btn { min-height: 44px; }
  .signup__input { min-height: 44px; }
}

/* ---------- responsive: narrow mobile ---------- */
@media (max-width: 560px) {
  :root { --pad: 1.1rem; }

  /* hide nav PH button; the CTA is repeated in the signup section */
  .nav .btn--ph { display: none; }

  .hero__title {
    font-size: clamp(1.85rem, 9.5vw, 2.7rem);
  }

  .hero__lede {
    max-width: 100%;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .band__title {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .band__title--big {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .cta__title {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .signup {
    flex-direction: column;
    gap: 0.8rem;
  }

  .signup__input {
    min-width: unset;
    width: 100%;
  }

  .signup .btn {
    width: 100%;
    justify-content: center;
  }

  .sun-fallback {
    top: 18%;
    width: min(95vw, 380px);
  }

  .foot {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4rem;
  }

  .dark-card {
    padding: 1.5rem 1.3rem;
  }

  .feature {
    padding: 1.8rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn__dot,
  .scroll-hint__rule::after,
  #stage.is-fallback .sun-fallback { animation: none; }
}
