/* ============================================================================
   Sunrise theme — home page only (exploration on the sunrise-theme branch)

   WHY a separate, opt-in stylesheet: styles.css is shared with the legal,
   blog and calculator pages. Loading this file only from index.astro, and
   scoping every rule under body.theme-sunrise, means the legal pages cannot
   change by accident while the home page tries the 1.0.11 app look.

   WHY only the hero changes colour: the sunrise is the brand moment; the
   sections below keep their existing grounds and coral accents, and the
   closing trust strip repeats the sunrise so the page opens and closes on
   the same landscape.
   ========================================================================== */

.theme-sunrise {
  /* Sunrise tokens, mirroring lib/core/theme/ori_colors.dart */
  --story-peach: #fbe2d2;
  --butter-pale: #fbf2d9;
  --sage-deep: #b8cdab;
  --land-pale: #f1f5eb;
  --butter-soft: #f5d98a;
  --sun-glow: #ffe6a3;

  /* WHY warm only, starting on the page cream: the sticky header sits above
     the hero and is transparent at the top, so the sky must begin on the
     same cream to avoid a seam, then warm towards the horizon. */
  --sunrise-sky: linear-gradient(
    180deg,
    var(--bg) 0%,
    var(--bg) 18%,
    var(--butter-pale) 52%,
    var(--story-peach) 92%
  );

  --ori-float-distance: -10px;
  --ori-float-duration: 6.5s;
}

/* WHY Inter italic, not Lora: the app's "gentle voice" moved to Inter
   italic, and the site should sound like the app it shows. */
.theme-sunrise .demo-content--serif {
  font-family: var(--body);
  font-style: italic;
}

/* ─── Premium card: light, outlined in green (no dark block) ─────────────
   Coral accents (tag, ticks, badge, button) stay as on master. */
.theme-sunrise .price-card--featured {
  background: #fff;
  color: var(--ink);
  border: 1.5px solid var(--green);
  box-shadow: 0 20px 44px -18px rgba(47, 111, 82, 0.35);
}
.theme-sunrise .price-card--featured:hover { box-shadow: 0 26px 52px -18px rgba(47, 111, 82, 0.42); }
.theme-sunrise .price-card--featured .plan-summary { color: rgba(14, 28, 20, 0.7); }
.theme-sunrise .price-card--featured .plan-fineprint { color: var(--muted); }

/* ─── Hero: warm sky, copy on top, landscape below ─────────────────────── */
.theme-sunrise .hero {
  padding: 56px 0 0;
  background: var(--sunrise-sky);
  overflow: hidden;           /* the landscape is full-bleed; never side-scroll */
  text-align: center;
}
.theme-sunrise .hero-copy--centred { max-width: 760px; margin: 0 auto; }
.theme-sunrise .hero-copy--centred .lead { margin-left: auto; margin-right: auto; max-width: 560px; }
.theme-sunrise .hero-copy--centred .hero-store-row { justify-content: center; }

.sunrise { position: relative; margin-top: 24px; }
/* WHY a wide viewBox with headroom + xMidYMax slice: narrow screens crop
   the sides (the mountain, Ori and sun stay centred), and wide screens have
   enough sky above Ori that the top is never cut off. */
.sunrise svg { display: block; width: 100%; height: clamp(270px, 30vw, 440px); }

/* Ori floats gently above the summit — one slow, small, vertical drift. */
.sunrise-ori {
  transform-box: fill-box;
  transform-origin: center;
  animation: ori-float var(--ori-float-duration) ease-in-out infinite alternate;
}
.sunrise-ori-shadow {
  transform-box: fill-box;
  transform-origin: center;
  animation: ori-shadow var(--ori-float-duration) ease-in-out infinite alternate;
}
@keyframes ori-float {
  from { transform: translateY(0); }
  to   { transform: translateY(var(--ori-float-distance)); }
}
/* The shadow on the summit softens as Ori lifts, so the float reads as
   height rather than a wobble. */
@keyframes ori-shadow {
  from { transform: scaleX(1);    opacity: 1; }
  to   { transform: scaleX(0.82); opacity: 0.7; }
}

/* ─── Trust strip: the same warm sky, with a sage hill line ─────────────── */
.section--sunrise {
  background: linear-gradient(180deg, var(--bg) 0%, var(--butter-pale) 45%, var(--story-peach) 100%);
  color: var(--green-deep);
  overflow: hidden;
  /* Room for the hill line so the copy never sits on the hills. */
  padding-bottom: calc(var(--hills-h) + 40px);
  --hills-h: clamp(64px, 8vw, 120px);
}
/* WHY the eyebrow too: on master it inherits the white .trust p colour,
   not coral, so on this light sky it takes the same dark green. */
.section--sunrise.trust p { color: var(--green-deep); }
.sunrise-hills {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: block; width: 100%; height: var(--hills-h);
}

@media (max-width: 900px) {
  .theme-sunrise .hero { padding: 32px 0 0; }
  .section--sunrise { padding-bottom: calc(var(--hills-h) + 32px); }
}

/* ─── Reduced motion: Ori rests on the air, no drift ───────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sunrise-ori,
  .sunrise-ori-shadow { animation: none !important; transform: none !important; }
}
