/*
  Skystra — variant 5, "Hybrid".

  Variant 1's immersive dawn-sky hero (full-viewport gradient,
  rising sun, drifting haze, sparkles, plum mountains dissolving
  into cream mist, frosted-glass waitlist card) merged with
  variant 4's playful body: chunky tilted pillar cards with
  pure-CSS icons on a light-peach band, "How it works" steps
  riding a dotted sun's arc, and a light dusk band to close —
  sunrise at the top of the page, sunset at the bottom. Blobby
  wave dividers stitch the bands together.

  Palette: the app's "Dawn Soft" light tokens.

    canvas      #FFF7EE   cream page background
    ink         #1A0F2E   deep plum text
    coral       #FF8A65   primary accent
    coral-deep  #E76A45   pressed / emphasis coral
    gold        #FFD974   capture-gradient partner color
    sky         #7AC8FF   cool accent
    peach       #FFD4A8   soft warm fill

  Type: Space Grotesk. Radii: 14px (SkyTheme.cornerRadius) for
  buttons, fields and the glass card; 28px for the chunky
  storybook pillar cards.
*/

:root {
  --canvas: #FFF7EE;
  --ink: #1A0F2E;
  --ink-55: rgba(26, 15, 46, 0.55);
  --ink-08: rgba(26, 15, 46, 0.08);
  --coral: #FF8A65;
  --coral-deep: #E76A45;
  --gold: #FFD974;
  --sky: #7AC8FF;
  --peach: #FFD4A8;
  --band: #FFEFE0;          /* pillars band — light peach tint  */
  --dusk-top: #FFE2C9;      /* closing band, still light        */
  --dusk-bottom: #FFD2B4;
  --radius: 14px;
  --radius-card: 28px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* belt-and-suspenders: the sky never causes sideways scroll */
}

/* The hidden attribute must always win — several elements it lands
   on (the waitlist form) otherwise carry a display value. */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ======================= Wordmark ======================= */

.wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.wordmark.small {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--ink-55);
}

/* The wordmark's star twinkles gently, everywhere it appears. */
.star {
  display: inline-block;
  animation: star-twinkle 3.2s ease-in-out infinite;
}

@keyframes star-twinkle {
  0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
  50%      { opacity: 0.55; transform: scale(0.82) rotate(22deg); }
}

/* ======================= Hero: the dawn sky ======================= */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 34px 24px 30px;
  text-align: center;
  overflow: hidden;
  /* The sky itself: cream up top, peach through the middle,
     deepening warmth toward the horizon. */
  background: linear-gradient(to bottom,
    #FFF7EE 0%,
    #FFF3E4 30%,
    #FFE7C9 52%,
    var(--peach) 72%,
    #FFC796 100%);
}

/* Readable content floats above every sky layer. */
.hero > .wordmark,
.hero > .hero-inner,
.hero > .scroll-cue {
  position: relative;
  z-index: 3;
}

.sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.sparkles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* ---- Breathing warmth across the whole scene ---- */
.sky-breathe {
  position: absolute;
  inset: -20% -30% -10%;
  background:
    radial-gradient(42% 36% at 28% 30%,
      rgba(255, 217, 116, 0.28) 0%, rgba(255, 217, 116, 0) 70%),
    radial-gradient(46% 40% at 74% 48%,
      rgba(255, 212, 168, 0.45) 0%, rgba(255, 212, 168, 0) 70%),
    radial-gradient(34% 30% at 50% 12%,
      rgba(122, 200, 255, 0.14) 0%, rgba(122, 200, 255, 0) 70%);
  animation: sky-breathe 11s ease-in-out infinite alternate;
}

@keyframes sky-breathe {
  from { transform: translateY(0) scale(1);       opacity: 0.7; }
  to   { transform: translateY(-2%) scale(1.06);  opacity: 1; }
}

/* ---- Drifting haze bands in the upper sky ---- */
.cloud {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  filter: blur(26px);
  animation: cloud-drift var(--drift, 60s) ease-in-out infinite alternate;
}

.cloud-a {
  --drift: 58s;
  top: 12%;
  left: -6%;
  width: 42%;
  height: 64px;
}

.cloud-b {
  --drift: 74s;
  top: 24%;
  right: -8%;
  width: 36%;
  height: 52px;
  animation-delay: -20s;
  opacity: 0.8;
}

.cloud-c {
  --drift: 66s;
  top: 40%;
  left: 14%;
  width: 30%;
  height: 44px;
  animation-delay: -40s;
  opacity: 0.6;
}

@keyframes cloud-drift {
  from { transform: translateX(-6%); }
  to   { transform: translateX(10%); }
}

/* ---- Coral glow pooling at the horizon ---- */
.horizon-glow {
  position: absolute;
  left: 50%;
  bottom: -14%;
  width: 130%;
  height: 62%;
  transform: translateX(-50%);
  background: radial-gradient(50% 55% at 50% 100%,
    rgba(255, 138, 101, 0.42) 0%,
    rgba(255, 138, 101, 0.20) 45%,
    rgba(255, 138, 101, 0) 75%);
  animation: horizon-breathe 8s ease-in-out infinite alternate;
}

@keyframes horizon-breathe {
  from { opacity: 0.75; }
  to   { opacity: 1; }
}

/* ---- The rising sun ---- */
.sun-wrap {
  --sun-size: clamp(150px, 22vw, 240px);
  position: absolute;
  left: 50%;
  bottom: clamp(48px, 9vh, 110px);
  width: 0;   /* children center on this point */
  height: 0;
}

/* On narrow screens the sun rides a little higher so it still
   peeks over the mountains behind the frosted card. */
@media (max-width: 600px) {
  .sun-wrap {
    --sun-size: 172px;
    bottom: 128px;
  }
}

.sun-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(300px, 46vw, 560px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 217, 116, 0.60) 0%,
    rgba(255, 212, 168, 0.32) 42%,
    rgba(255, 247, 238, 0) 70%);
  animation: glow-breathe 6s ease-in-out infinite alternate;
}

@keyframes glow-breathe {
  from { transform: translate(-50%, -50%) scale(1);    opacity: 0.8; }
  to   { transform: translate(-50%, -50%) scale(1.14); opacity: 1; }
}

.sun {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--sun-size);
  aspect-ratio: 1;
  margin-left: calc(var(--sun-size) / -2);
  margin-top: calc(var(--sun-size) / -2);
  border-radius: 50%;
  background: linear-gradient(165deg, var(--gold) 10%, var(--coral) 85%);
  box-shadow: 0 0 60px rgba(255, 217, 116, 0.55);
  animation:
    sunrise 2.2s cubic-bezier(0.22, 1, 0.36, 1) both,
    sun-breathe 6s ease-in-out 2.2s infinite alternate;
}

@keyframes sunrise {
  from { transform: translateY(9vh); opacity: 0.4; }
  to   { transform: translateY(0);   opacity: 1; }
}

/* Runs after sunrise finishes; animates filter so it never fights
   sunrise's transform. */
@keyframes sun-breathe {
  from { filter: brightness(1)    saturate(1); }
  to   { filter: brightness(1.05) saturate(1.12); }
}

/* ---- Mountain silhouettes: barely-there plum ink ---- */
.mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(110px, 20vh, 210px);
  display: block;
}

.mountains .range-back  { fill: var(--ink); fill-opacity: 0.08; }
.mountains .range-front { fill: var(--ink); fill-opacity: 0.12; }

/* ---- Mist at the base, easing the scene into the cream page ---- */
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 84px;
  background: linear-gradient(to bottom,
    rgba(255, 247, 238, 0) 0%,
    rgba(255, 247, 238, 0.65) 60%,
    var(--canvas) 100%);
}

/* ---- Twinkling ✦ sparkles (seeded by script.js) ---- */
.sparkle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  font-size: var(--size);
  color: var(--color);
  opacity: 0;
  animation:
    twinkle var(--duration) ease-in-out var(--delay) infinite,
    sparkle-drift calc(var(--duration) * 3) ease-in-out var(--delay) infinite alternate;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  50%      { opacity: var(--peak); transform: scale(1) rotate(45deg); }
}

@keyframes sparkle-drift {
  from { translate: 0 0; }
  to   { translate: 0 -14px; }
}

/* ---- Hero copy ---- */

.hero-inner {
  width: 100%;
  max-width: 640px;
  margin: auto;             /* vertically centers between wordmark and cue */
  padding: 48px 0;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  animation: rise-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Let the headline wrap naturally on narrow screens instead of
   forcing the desktop two-line break. */
@media (max-width: 600px) {
  .hero h1 br {
    display: none;
  }
}

/* Sunset-gradient shimmer on the key word in the headline. */
.glow-word {
  background: linear-gradient(100deg,
    var(--coral-deep), var(--coral), var(--gold),
    var(--coral), var(--coral-deep));
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: glow-word-sweep 5s ease-in-out infinite;
}

@keyframes glow-word-sweep {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.subhead {
  max-width: 470px;
  margin: 22px auto 36px;
  font-size: 17px;
  color: var(--ink-55);
  animation: rise-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Frosted-glass waitlist card ---- */

.glass-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 22px 16px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow:
    0 18px 50px rgba(231, 106, 69, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: rise-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

/* ---- Scroll cue perched on the horizon ---- */

.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--ink-55);
  font-size: 18px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: cue-bob 2.6s ease-in-out infinite;
  transition: color 0.15s ease, background 0.15s ease;
}

.scroll-cue:hover {
  color: var(--coral-deep);
  background: rgba(255, 255, 255, 0.65);
}

@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ======================= Waitlist form ======================= */

.waitlist {
  display: flex;
  gap: 10px;
}

/* `display: flex` above would otherwise beat the `hidden`
   attribute set on successful signup (also guarded globally). */
.waitlist[hidden] {
  display: none;
}

.waitlist input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--ink-08);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.waitlist input::placeholder {
  color: rgba(26, 15, 46, 0.35);
}

.waitlist input:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 138, 101, 0.18);
}

.waitlist button {
  padding: 14px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(135deg, var(--coral), var(--gold), var(--coral));
  background-size: 220% 220%;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 4px 14px rgba(255, 138, 101, 0.35);
  animation: gradient-drift 6s ease-in-out infinite alternate;
}

/* Shared by the two CTAs — the warm gradient slowly wanders so
   the buttons feel lit rather than painted. */
@keyframes gradient-drift {
  from { background-position: 0% 0%; }
  to   { background-position: 100% 100%; }
}

.waitlist button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 138, 101, 0.45);
}

.waitlist button:active {
  transform: translateY(0);
}

.form-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-55);
  min-height: 1.4em;
}

.form-note.success {
  color: var(--coral-deep);
  font-weight: 500;
  animation: note-pop 0.6s cubic-bezier(0.22, 1.4, 0.36, 1) both;
}

@keyframes note-pop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.form-note.error {
  color: #C44A3A;
  font-weight: 500;
}

@media (max-width: 520px) {
  .waitlist {
    flex-direction: column;
  }

  .waitlist button {
    width: 100%;
  }

  .glass-card {
    padding: 18px 16px 12px;
  }
}

/* ======================= Wave dividers ======================= */

.wave {
  display: block;
  width: 100%;
  height: 64px;
  margin-top: -1px;
  margin-bottom: -1px;
}

/* The wave "cuts into" the band above it, so its backdrop is
   the previous section's color and its fill is the next one's. */
.wave-to-band  { background: var(--canvas); }
.wave-to-cream { background: var(--band); }
.wave-to-dusk  { background: var(--canvas); }

/* ======================= Pillars (peach band) ======================= */

.band-pillars {
  background: var(--band);
  padding: 56px 24px 92px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .pillars {
    grid-template-columns: 1fr;
    max-width: 440px;
  }
}

/* Chunky rounded cards, each resting at a slight storybook tilt
   that straightens out when you look at it (hover). */
.pillar {
  --tilt: 0deg;
  background: #fff;
  border: 2px solid rgba(255, 138, 101, 0.22);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: 0 10px 26px rgba(231, 106, 69, 0.10);
  transform: rotate(var(--tilt));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease, border-color 0.3s ease;
}

.pillar:nth-child(1) { --tilt: -1.5deg; }
.pillar:nth-child(2) { --tilt: 0deg; }
.pillar:nth-child(3) { --tilt: 1.5deg; }

.pillar:hover,
.js .pillar.reveal.visible:hover {
  transform: rotate(0deg) translateY(-6px);
  border-color: rgba(255, 138, 101, 0.5);
  box-shadow: 0 18px 38px rgba(231, 106, 69, 0.18);
}

.pillar h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pillar p {
  font-size: 15px;
  color: var(--ink-55);
}

/* ---- Big friendly CSS icons (no emoji, all shapes) ---- */

.p-icon {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  margin: 4px 0 22px;
}

/* Little sun: mini ray burst + warm core. */
.p-icon-sun::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(255, 138, 101, 0.5) 0deg 8deg,
    rgba(255, 138, 101, 0) 8deg 30deg);
  -webkit-mask: radial-gradient(circle,
    transparent 32%, #000 38%, transparent 74%);
  mask: radial-gradient(circle,
    transparent 32%, #000 38%, transparent 74%);
  animation: rays-turn 26s linear infinite;
}

@keyframes rays-turn {
  to { transform: rotate(360deg); }
}

.p-icon-sun::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold), var(--coral));
  box-shadow: 0 4px 12px rgba(255, 160, 100, 0.5);
}

/* Golden-hour clock: cream face, coral rim, hands near sunset. */
.p-icon-clock {
  border-radius: 50%;
  border: 6px solid var(--coral);
  background:
    radial-gradient(circle at 50% 50%,
      var(--coral-deep) 0 4px, transparent 5px),
    linear-gradient(160deg, #FFFDF8, var(--peach));
  box-shadow: 0 4px 12px rgba(255, 138, 101, 0.3);
  animation: clock-tick 4s ease-in-out infinite;
}

@keyframes clock-tick {
  0%, 88%, 100% { transform: rotate(0deg); }
  92%           { transform: rotate(-5deg); }
  96%           { transform: rotate(4deg); }
}

.p-icon-clock::before,
.p-icon-clock::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 50%;
  border-radius: 3px;
  transform-origin: 50% 100%;
  background: var(--coral-deep);
}

.p-icon-clock::before {           /* hour hand   */
  width: 5px;
  height: 16px;
  margin-left: -2.5px;
  transform: rotate(-55deg);
}

.p-icon-clock::after {            /* minute hand */
  width: 5px;
  height: 22px;
  margin-left: -2.5px;
  transform: rotate(60deg);
}

/* Friendly camera: sky-blue body, gold lens, cream flash dot. */
.p-icon-camera {
  width: 78px;
  height: 58px;
  margin-top: 12px;
  margin-bottom: 24px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 82% 26%, #FFFDF8 0 4.5px, transparent 5.5px),
    linear-gradient(160deg, var(--sky), #58AEE8);
  box-shadow: 0 4px 12px rgba(122, 200, 255, 0.45);
  animation: camera-snap 5s ease-in-out infinite;
}

@keyframes camera-snap {
  0%, 90%, 100% { transform: rotate(0deg) scale(1); }
  94%           { transform: rotate(-3deg) scale(1.06); }
}

.p-icon-camera::before {          /* lens */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 5px solid #FFFDF8;
  background: linear-gradient(160deg, var(--gold), var(--coral));
}

.p-icon-camera::after {           /* viewfinder bump */
  content: "";
  position: absolute;
  top: -9px;
  left: 14px;
  width: 26px;
  height: 14px;
  border-radius: 8px 8px 0 0;
  background: #58AEE8;
}

/* ======================= How it works: the sun's arc ======================= */

.how {
  max-width: 1000px;
  margin: 0 auto;
  padding: 84px 24px 96px;
}

.section-title {
  text-align: center;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 44px;
}

.steps-wrap {
  position: relative;
}

/* Dotted arc across the sky, from horizon to horizon. */
.steps-arc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 220px;
  pointer-events: none;
}

.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.steps li {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  align-content: start;
  padding-top: var(--arc-y, 45px);
}

/* Riding the arc: outer steps sit lower, inner steps near the
   peak (matches the dotted path drawn above). */
.steps li:nth-child(1),
.steps li:nth-child(4) { --arc-y: 115px; }
.steps li:nth-child(2),
.steps li:nth-child(3) { --arc-y: 45px; }

/* Each step dot is a little sun. */
.step-sun {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--gold), var(--coral));
  color: var(--ink);
  font-weight: 700;
  font-size: 17px;
  box-shadow:
    0 0 0 6px rgba(255, 217, 116, 0.3),
    0 6px 14px rgba(255, 160, 100, 0.4);
}

.step-sun::before {
  content: "";
  position: absolute;
  inset: -13px;
  z-index: -1;
  border-radius: 50%;
  background: repeating-conic-gradient(
    rgba(255, 217, 116, 0.6) 0deg 9deg,
    rgba(255, 217, 116, 0) 9deg 32.7273deg);
  -webkit-mask: radial-gradient(circle,
    transparent 34%, #000 40%, transparent 76%);
  mask: radial-gradient(circle,
    transparent 34%, #000 40%, transparent 76%);
  animation: rays-turn 22s linear infinite;
}

.steps h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.steps p {
  font-size: 14.5px;
  color: var(--ink-55);
  max-width: 240px;
}

/* Mobile: the arc folds into a dotted vertical sunbeam. */
@media (max-width: 780px) {
  .steps-arc {
    display: none;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 34px;
    max-width: 460px;
    margin: 0 auto;
    position: relative;
  }

  .steps::before {
    content: "";
    position: absolute;
    left: 23px;
    top: 24px;
    bottom: 24px;
    border-left: 3px dotted rgba(255, 138, 101, 0.45);
  }

  .steps li {
    grid-template-columns: 48px 1fr;
    column-gap: 18px;
    justify-items: start;
    text-align: left;
    padding-top: 0 !important;
  }

  .step-sun {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }

  .steps h3,
  .steps p {
    grid-column: 2;
  }

  .steps p {
    max-width: none;
  }
}

/* ======================= Closing: dusk vibes (still light) ======================= */

.dusk {
  background: linear-gradient(180deg, var(--dusk-top), var(--dusk-bottom));
}

.closing {
  text-align: center;
  padding: 56px 24px 88px;
}

/* A tiny sun settling onto the horizon for the evening — the
   sunrise from the hero, coming back down to bookend the page. */
.dusk-sun {
  position: relative;
  width: 88px;
  height: 44px;
  margin: 0 auto 30px;
  border-radius: 88px 88px 0 0;
  background: linear-gradient(180deg, var(--gold), var(--coral-deep));
  box-shadow: 0 -8px 30px rgba(231, 106, 69, 0.45);
  animation: dusk-settle 7s ease-in-out infinite alternate;
}

@keyframes dusk-settle {
  from { transform: translateY(0); }
  to   { transform: translateY(6px); }
}

.dusk-sun::after {                /* the horizon line it rests on */
  content: "";
  position: absolute;
  left: -46px;
  right: -46px;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(to right,
    rgba(231, 106, 69, 0) 0%,
    rgba(231, 106, 69, 0.5) 50%,
    rgba(231, 106, 69, 0) 100%);
}

.closing-line {
  font-size: clamp(20px, 3.5vw, 27px);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 30px;
}

/* Like the hero headline, wrap naturally on narrow screens
   instead of forcing the desktop two-line break. */
@media (max-width: 600px) {
  .closing-line br {
    display: none;
  }
}

.closing-cta {
  display: inline-block;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(135deg, var(--coral), var(--gold), var(--coral));
  background-size: 220% 220%;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(231, 106, 69, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  animation: gradient-drift 6s ease-in-out infinite alternate;
}

.closing-cta:hover,
.js .closing-cta.reveal.visible:hover {
  transform: translateY(-2px) rotate(1deg) scale(1.03);
  box-shadow: 0 10px 26px rgba(231, 106, 69, 0.5);
}

/* ======================= Footer ======================= */

footer {
  text-align: center;
  padding: 0 24px 52px;
}

footer p:last-child {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-55);
}

/* ======================= Scroll reveal (wobble in) ======================= */

/* Only hide things when JS is running (script.js stamps `js` on
   <html>) — with JS off the page renders fully visible. The
   wobble respects each pillar's resting tilt via --tilt. */
.js .reveal {
  opacity: 0;
  transform: translateY(34px) rotate(calc(var(--tilt, 0deg) - 3deg)) scale(0.94);
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--tilt, 0deg)) scale(1);
  animation: wobble-in 0.85s cubic-bezier(0.34, 1.3, 0.5, 1) backwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes wobble-in {
  0% {
    opacity: 0;
    transform: translateY(34px) rotate(calc(var(--tilt, 0deg) - 3deg)) scale(0.94);
  }
  62% {
    opacity: 1;
    transform: translateY(-8px) rotate(calc(var(--tilt, 0deg) + 1.4deg)) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(var(--tilt, 0deg)) scale(1);
  }
}

/* ======================= Success burst ======================= */

/* ✦ burst spawned by script.js when a signup succeeds. Each
   star gets its own flight vector via --bx / --by. */
.burst-star {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  color: var(--coral);
  animation: burst 0.9s cubic-bezier(0.16, 0.8, 0.4, 1) both;
}

@keyframes burst {
  from {
    transform: translate(0, 0) scale(0.4) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate(var(--bx), var(--by)) scale(1.1) rotate(160deg);
    opacity: 0;
  }
}

/* ======================= Reduced motion ======================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .sparkle,
  .cloud {
    display: none;
  }

  .js .reveal,
  .js .reveal.visible {
    opacity: 1;
    transform: rotate(var(--tilt, 0deg));
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
