/* =========================================================================
   MoonPal: base tokens and landing page styles.
   Palette mirrors the app (Assets.xcassets/Colors): off black night sky,
   deep purple glow, off white ink, gold moonlight accent.
   ========================================================================= */

@font-face {
  font-family: "Berkshire Swash";
  src: url("/assets/BerkshireSwash-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #1B1D28;
  --bg-glow: #2D1B4E;
  --surface: rgba(27, 29, 40, 0.82);
  --surface-strong: #14151e;
  --ink: #F1EFFC;
  --ink-70: rgba(241, 239, 252, 0.72);
  --ink-50: rgba(241, 239, 252, 0.5);
  --ink-35: rgba(241, 239, 252, 0.35);
  --accent: #F0CB75;
  --lavender: #B593CD;
  --frost: rgba(241, 239, 252, 0.06);
  --frost-strong: rgba(241, 239, 252, 0.12);
  --display: "Berkshire Swash", Georgia, serif;
  --body: "Avenir Next", Avenir, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.25, 0.8, 0.35, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--bg-glow) 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}

/* A light sprinkle of stars on every page, drawn with CSS (no image request). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(241, 239, 252, 0.7), transparent 60%),
    radial-gradient(1px 1px at 78% 12%, rgba(241, 239, 252, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 34% 62%, rgba(240, 203, 117, 0.6), transparent 60%),
    radial-gradient(1px 1px at 88% 48%, rgba(241, 239, 252, 0.5), transparent 60%),
    radial-gradient(1px 1px at 56% 84%, rgba(241, 239, 252, 0.6), transparent 60%),
    radial-gradient(1.5px 1.5px at 6% 72%, rgba(181, 147, 205, 0.7), transparent 60%),
    radial-gradient(1px 1px at 66% 34%, rgba(241, 239, 252, 0.4), transparent 60%),
    radial-gradient(1px 1px at 24% 92%, rgba(241, 239, 252, 0.5), transparent 60%);
  background-size: 420px 420px;
}

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

/* ------------------------------ Landing ------------------------------- */
/* landing main: fill viewport height so the footer pins to the bottom */
.page-main { flex: 1 0 auto; }

.hero {
  position: relative;
  isolation: isolate;
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 24px 40px;
  text-align: center;
}
/* The app's purple night sky (Cards/PurpleSky), never wider than its own 1232px so it
   stays sharp, fading into the page at every edge. */
.hero-sky {
  position: absolute;
  z-index: -1;
  top: 0;
  left: 50%;
  width: min(1232px, 100vw);
  height: 100%;
  transform: translateX(-50%);
  background: url("/assets/purple-sky.jpg") center 30% / cover no-repeat;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 40%, #000 30%, transparent 75%);
}
/* The eight moon characters in phase order, floating one after another. */
.phase-row {
  display: flex;
  justify-content: center;
  align-items: center; /* no stretch: a flex row would stretch every image to the tallest one */
  gap: clamp(6px, 1.6vw, 18px);
  margin: 28px auto 0;
}
.phase-row img {
  width: clamp(30px, 7.5vw, 64px);
  height: auto;
  aspect-ratio: 1;
  animation: phase-float 4s ease-in-out infinite;
}
.phase-row img:nth-child(2) { animation-delay: -0.5s; }
.phase-row img:nth-child(3) { animation-delay: -1s; }
.phase-row img:nth-child(4) { animation-delay: -1.5s; }
.phase-row img:nth-child(5) { animation-delay: -2s; }
.phase-row img:nth-child(6) { animation-delay: -2.5s; }
.phase-row img:nth-child(7) { animation-delay: -3s; }
.phase-row img:nth-child(8) { animation-delay: -3.5s; }
@keyframes phase-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .phase-row img { animation: none; }
}
.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 12px 40px rgba(240, 203, 117, 0.22);
}
.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  text-wrap: balance;
  font-size: clamp(38px, 6vw, 56px);
  line-height: 1.08;
  margin: 28px 0 12px;
}
.hero .tagline {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--ink-70);
  font-size: 18px;
}
/* Apple's official badge, unmodified (developer.apple.com/app-store/marketing/guidelines):
   white variant because it is the only badge on a dark page; at least 40px tall; clear
   space of at least a quarter of its height; never animated or restyled. */
.store-badge {
  display: inline-block;
  margin: 14px;
  line-height: 0;
}
.store-badge img {
  display: block;
  height: 56px;
  width: auto;
}

.features {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 24px 72px;
  display: grid;
  gap: 18px;
}
@media (min-width: 720px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  padding: 24px 22px;
  border-radius: 18px;
  background: var(--frost);
  border: 1px solid rgba(241, 239, 252, 0.1);
  text-align: left;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--accent);
}
.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--ink-70);
}

.honest-note {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px 72px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-50);
}
