/* Sky Calendar landing page. Tokens mirror ios/WatchSky/DesignSystem/Theme.swift. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("assets/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("assets/fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("assets/fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("assets/fonts/Inter-Bold.woff2") format("woff2"); }

:root {
  /* Palette */
  --background: #0A0B12;
  --surface: #141623;
  --surface-raised: #1B1E2E;
  --hairline: rgba(255, 255, 255, 0.07);
  --chip: rgba(255, 255, 255, 0.06);
  --glass: rgba(16, 18, 30, 0.62);
  --glass-light: rgba(255, 255, 255, 0.10);
  --text: #F3F2F8;
  --text-muted: #A4A6B9;
  --text-subtle: #8C8FA6;
  --on-light: #0A0B12;
  --accent: #C8BBFF;
  --positive: #6FD3C3;
  --warning: #E8A25C;

  --tint-meteors: #9D8CFF;
  --tint-planets: #F0B97A;
  --tint-moon: #8FB0FF;
  --tint-iss: #6FD3C3;
  --tint-seasons: #F59E7A;
  --tint-eclipses: #E0C27A;
  --tint-aurora: #7FE0A8;
  --tint-comets: #9FD4FF;
  --tint-milkyway: #D9C6F5;

  --sky-top: #05060D;
  --sky-middle: #0B1024;
  --sky-horizon: #1A1F3A;

  /* Pale lilac phone finish, matched to the accent */
  --phone-frame-hi: #F4F0FF;
  --phone-frame: #DDD4FF;
  --phone-frame-lo: #B9ABF2;
  --phone-bezel: #07070C;
  --phone-shadow: rgba(157, 140, 255, 0.30);

  /* Metrics */
  --gutter: 20px;
  --page-width: 1200px;
  --radius-card: 22px;
  --radius-hero: 28px;
  --radius-tile: 15px;
  --radius-pill: 999px;
  --button-height: 52px;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 120px;

  /* Typography (Inter, as in the app) */
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --text-overline: 10.5px;
  --text-caption: 11.5px;
  --text-callout: 13px;
  --text-body: 15px;
  --text-lead: clamp(16px, 1.4vw, 19px);
  --text-title: 22px;
  --text-h2: clamp(30px, 4vw, 52px);
  --text-display: clamp(40px, 6vw, 84px);
  --tracking-tight: -0.035em;
  --tracking-overline: 0.08em;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 var(--text-body)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

.skip-link {
  position: absolute; left: var(--space-4); top: -60px; z-index: 100;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--text); color: var(--on-light); text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }

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

/* ---------- Backdrop: stars and drifting colour fields ---------- */

.starfield { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; transition: opacity 1.2s var(--ease-out); }

/* Colour only behind the hero; further down the sky goes dark and the stars fade */
.aura {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  --aura-a: var(--tint-meteors); --aura-b: var(--tint-moon); --aura-c: var(--accent);
  transition: opacity 1.2s var(--ease-out);
}
.aura:not([data-tone="hero"]) { opacity: 0; }
.aura:not([data-tone="hero"]) ~ .starfield { opacity: 0.3; }
.aura__blob {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: 0.30;
  animation: drift 26s ease-in-out infinite alternate;
}
.aura__blob--a { left: -18vmax; top: -22vmax; background-color: var(--aura-a); }
.aura__blob--b { right: -24vmax; top: 18vh; background-color: var(--aura-b); animation-duration: 32s; animation-delay: -8s; }
.aura__blob--c { left: 20vw; bottom: -36vmax; background-color: var(--aura-c); opacity: 0.22; animation-duration: 38s; animation-delay: -16s; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) { .aura__blob { animation: none; } }

/* ---------- Layout ---------- */

.container { width: 100%; max-width: var(--page-width); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: var(--space-9) 0; }
@media (max-width: 640px) { .section { padding: var(--space-8) 0; } }
/* Slides over the bottom of the hero phones */
.section--cover { z-index: 1; background: var(--background); border-top: 1px solid var(--hairline); }
.section-head { max-width: 640px; display: grid; gap: var(--space-4); margin-bottom: var(--space-7); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }

/* ---------- Type ---------- */

.display {
  font-size: var(--text-display); font-weight: 600; line-height: 1.0;
  letter-spacing: var(--tracking-tight);
}
.display__soft { color: var(--text-muted); }
.h2 { font-size: var(--text-h2); font-weight: 600; line-height: 1.06; letter-spacing: -0.03em; text-wrap: balance; }
.display, .feature-card h3 { text-wrap: balance; }
.lead { font-size: var(--text-lead); color: var(--text-muted); line-height: 1.55; }
.muted { color: var(--text-muted); }

.eyebrow {
  font-size: var(--text-overline); font-weight: 600; letter-spacing: var(--tracking-overline);
  text-transform: uppercase; color: var(--accent);
}

/* ---------- Primitives ---------- */

.chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 6px var(--space-3); border-radius: var(--radius-pill);
  background: var(--chip); border: 1px solid var(--hairline);
  font-size: var(--text-caption); font-weight: 500; color: var(--text-muted);
}
.chip--overline {
  font-size: var(--text-overline); font-weight: 600; letter-spacing: var(--tracking-overline);
  text-transform: uppercase; color: var(--text);
  background: rgba(10, 11, 18, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--button-height); padding: 0 var(--space-5); border-radius: var(--radius-pill);
  border: 0; font: 600 var(--text-body)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, opacity 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--light { background: var(--text); color: var(--on-light); }
.btn--light:hover { background: #FFFFFF; }
.btn--glass { background: var(--chip); color: var(--text); border: 1px solid var(--hairline); }
.btn--glass:hover { background: var(--glass-light); }
.btn--sm { height: 40px; padding: 0 var(--space-4); font-size: var(--text-callout); }

/* App Store button. Swap for Apple's official badge artwork before launch. */
.store-button {
  display: inline-flex; align-items: center; gap: var(--space-3);
  height: 58px; padding: 0 var(--space-5) 0 var(--space-4); border-radius: 16px;
  background: var(--text); color: var(--on-light); text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s;
  box-shadow: 0 10px 40px -10px var(--phone-shadow);
}
.store-button:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -12px var(--phone-shadow); }
.store-button svg { width: 26px; height: 26px; }
.store-button span { display: grid; line-height: 1.1; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.store-button small { font-size: var(--text-caption); font-weight: 500; letter-spacing: 0; }

.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-card);
}

/* Frosted panel, as `.skyPanel()` in the app */
.glass {
  background: var(--glass); border: 1px solid var(--hairline);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
}

/* Event icon on its tinted tile, as `IconTile` in the app */
.icon-tile {
  --size: 48px;
  --tint: var(--tint-meteors);
  flex: none; display: grid; place-items: center;
  width: var(--size); height: var(--size); border-radius: calc(var(--radius-tile) * var(--size) / 48px);
  background: radial-gradient(circle at 30% 25%,
    color-mix(in srgb, var(--tint) 42%, transparent) 0,
    color-mix(in srgb, var(--tint) 8%, transparent) calc(var(--size) * 0.85));
  color: var(--text);
}
.icon-tile svg { width: 62%; height: 62%; }
.icon-tile--sm { --size: 36px; }
.icon-tile--lg { --size: 64px; }
.icon-tile--xs { --size: 22px; }

/* "New in 1.1" pill */
.badge {
  display: inline-flex; width: fit-content; padding: 4px 10px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
  font-size: var(--text-overline); font-weight: 600; letter-spacing: var(--tracking-overline); text-transform: uppercase;
}

/* Small grey label, as `Tag` in the app */
.tag {
  display: inline-flex; padding: 3px 8px; border-radius: 7px; background: var(--chip);
  font-size: var(--text-overline); font-weight: 500; color: var(--text-muted);
}

/* On/off row, as `ToggleRow` in the app */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); width: 100%;
  padding: var(--space-3) 0; border: 0; background: none; color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.toggle-row + .toggle-row { border-top: 1px solid var(--hairline); }
.toggle-row strong { display: block; font-weight: 500; }
.toggle-row small { display: block; font-size: var(--text-caption); color: var(--text-subtle); }
.switch {
  position: relative; flex: none; width: 51px; height: 31px; border-radius: var(--radius-pill);
  background: var(--glass-light); transition: background-color 0.25s;
}
.switch::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); transition: translate 0.3s var(--ease-out);
}
[aria-checked="true"] > .switch { background: var(--accent); }
[aria-checked="true"] > .switch::after { translate: 20px 0; }

/* ---------- Phone mockup (pale lilac finish) ---------- */

.phone {
  --phone-w: 280px;
  position: relative; flex: none; margin: 0;
  width: var(--phone-w); aspect-ratio: 0.4794;
  padding: calc(var(--phone-w) * 0.034);
  border-radius: calc(var(--phone-w) * 0.175);
  background:
    linear-gradient(150deg, var(--phone-frame-hi) 0%, var(--phone-frame) 35%, var(--phone-frame-lo) 70%, var(--phone-frame) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 0 calc(var(--phone-w) * 0.02) rgba(120, 100, 200, 0.35),
    0 calc(var(--phone-w) * 0.12) calc(var(--phone-w) * 0.3) calc(var(--phone-w) * -0.06) var(--phone-shadow),
    0 2px 6px rgba(0, 0, 0, 0.4);
}
/* Side buttons */
.phone::before, .phone::after {
  content: ""; position: absolute; width: calc(var(--phone-w) * 0.012);
  background: linear-gradient(90deg, var(--phone-frame-lo), var(--phone-frame));
}
.phone::before { left: calc(var(--phone-w) * -0.010); top: 22%; height: 11%; border-radius: 2px 0 0 2px;
  box-shadow: 0 calc(var(--phone-w) * 0.30) 0 var(--phone-frame-lo); }
.phone::after { right: calc(var(--phone-w) * -0.010); top: 27%; height: 15%; border-radius: 0 2px 2px 0; }

.phone__screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: calc(var(--phone-w) * 0.142);
  background: var(--background);
  box-shadow: 0 0 0 calc(var(--phone-w) * 0.012) var(--phone-bezel);
}
.phone__screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Dynamic Island */
.phone__screen::after {
  content: ""; position: absolute; z-index: 5; left: 50%; top: 1.25%;
  width: 31%; height: 4.1%; transform: translateX(-50%);
  border-radius: var(--radius-pill); background: #000;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-3) max(var(--gutter), calc((100vw - var(--page-width)) / 2 + var(--gutter)));
  transition: background-color 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(10, 11, 18, 0.72); border-color: var(--hairline);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-3); font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav__links { display: flex; gap: var(--space-6); font-size: var(--text-callout); color: var(--text-muted); }
.nav__links a { text-decoration: none; transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
@media (max-width: 860px) { .nav__links { display: none; } }

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

/* Clipped sideways: on narrow screens the side phones reach past the edge, and iOS would zoom the whole page out */
.hero { position: relative; z-index: 0; padding: calc(var(--space-9) + 20px) 0 0; text-align: center; overflow: hidden; }
.hero__copy { display: grid; justify-items: center; gap: var(--space-5); max-width: 1100px; margin: 0 auto; }
.hero__copy .lead { max-width: 620px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-4); }
.cta-note { font-size: var(--text-callout); color: var(--text-subtle); }

/* The next section covers the bottom of the phones */
.hero__stage {
  --front-w: clamp(220px, 24vw, 320px);
  --side-w: clamp(180px, 20vw, 270px);
  position: relative; display: flex; justify-content: center;
  margin-top: var(--space-7); height: calc(var(--front-w) * 2.086 * 0.82);
}
.hero__stage .phone { --phone-w: var(--side-w); position: absolute; top: calc(var(--front-w) * 0.22); }
.hero__stage .phone--front { --phone-w: var(--front-w); top: 0; z-index: 2; }
.hero__stage .phone--left  { transform: translateX(-80%); z-index: 1; }
.hero__stage .phone--right { transform: translateX(80%); z-index: 1; }

.rise { opacity: 0; translate: 0 40px; animation: rise 1.1s var(--ease-out) forwards; }
.rise--1 { animation-delay: 0.05s; } .rise--2 { animation-delay: 0.15s; } .rise--3 { animation-delay: 0.25s; }
.rise--4 { animation-delay: 0.4s; } .rise--5 { animation-delay: 0.55s; }
@keyframes rise { to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; opacity: 1; translate: none; } }

@media (max-width: 760px) {
  .hero__stage { --front-w: 220px; --side-w: 170px; }
  .hero__stage .phone--left  { transform: translateX(-64%); }
  .hero__stage .phone--right { transform: translateX(64%); }
}

/* Stargazing score card, as `VisibilityScoreCard` in the app */
.score-card {
  display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-card);
  background: var(--surface-raised); border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.75);
}
.score-card__title { font-size: var(--text-caption); font-weight: 600; color: var(--text-subtle); }
.score-card__head { display: flex; align-items: center; gap: var(--space-3); margin-top: calc(var(--space-2) * -1); }
.score-card__score { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.score-card__score small { font-size: var(--text-body); font-weight: 500; color: var(--text-subtle); letter-spacing: 0; }
.score-card__verdict { font-size: var(--text-callout); font-weight: 600; line-height: 1.25; }
.score-card__best { font-size: var(--text-caption); color: var(--text-muted); }
.score-card__weather { flex: none; width: 24px; height: 24px; margin-left: auto; color: var(--text-muted); }
.score-card__chart { width: 100%; height: auto; overflow: visible; }
.score-card__grid line { stroke: var(--hairline); }
.score-card__labels, .score-card__labels text { font-size: 8.5px; fill: var(--text-subtle); font-family: var(--font); }
.score-card__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.score-card__dot { fill: var(--accent); }
.score-card__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.score-card__facts li { display: grid; grid-template-columns: 18px 1fr; gap: var(--space-2); font-size: var(--text-caption); color: var(--text-muted); line-height: 1.35; }
.score-card__facts svg { width: 16px; height: 16px; color: var(--text-subtle); }

/* ---------- Live AR demo ---------- */

.ar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8); align-items: center; }
.ar__copy { display: grid; gap: var(--space-5); max-width: 520px; }
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--radius-pill); width: fit-content; }
.segmented button {
  height: 40px; padding: 0 var(--space-5); border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-muted); font: 600 var(--text-callout)/1 var(--font); cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.segmented button[aria-pressed="true"] { background: var(--text); color: var(--on-light); }
.ar__hint { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-callout); color: var(--text-subtle); }
.ar__hint svg { width: 18px; height: 18px; }

.ar .phone { --phone-w: min(330px, 80vw); }
.ar-view { position: absolute; inset: 0; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.ar-view.is-dragging { cursor: grabbing; }
.ar-view__sky { position: absolute; left: 0; top: 0; display: flex; will-change: transform; }
.ar-view__tile { flex: none; background: url("assets/night-sky.webp") center / cover no-repeat; }
.ar-view__tile:nth-child(even) { transform: scaleX(-1); }
.ar-view__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ar-view__top { position: absolute; z-index: 2; top: 8.5%; left: 6%; right: 6%; display: flex; align-items: center; justify-content: center; }
.ar-view__close {
  position: absolute; left: 0; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
}
.ar-view__close svg { width: 16px; height: 16px; }
.ar-view__heading {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: var(--text-callout); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ar-view__heading svg { width: 13px; height: 13px; }
.ar-view__label {
  position: absolute; z-index: 2; transform: translate(-50%, 0); padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: var(--text-caption); font-weight: 600; white-space: nowrap; pointer-events: none;
  transition: opacity 0.3s;
}
.ar-view__panel {
  position: absolute; z-index: 2; left: 4.5%; right: 4.5%; bottom: 4%;
  display: grid; gap: 4px; padding: var(--space-4); border-radius: var(--radius-card);
}
.ar-view__title { font-size: var(--text-body); font-weight: 600; }
.ar-view__detail { font-size: var(--text-callout); color: var(--text-muted); }
.ar-view__note { font-size: var(--text-caption); color: var(--text-subtle); }

@media (max-width: 860px) {
  .ar { grid-template-columns: 1fr; justify-items: center; gap: var(--space-7); }
  .ar .phone { --phone-w: min(310px, 82vw); }
}

/* ---------- Event types: a strip that scrolls by on its own ---------- */

.types__note { margin-top: var(--space-6); font-size: var(--text-callout); color: var(--text-muted); text-align: center; }
.types__note strong { color: var(--text); }

.marquee {
  --marquee-gap: var(--space-4);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; gap: var(--marquee-gap); width: max-content; margin: 0; padding: var(--space-2) 0; list-style: none; }
.marquee__track > * { flex: 0 0 280px; }
/* JS repeats the cards once, so moving by half the track loops seamlessly */
.marquee.is-running .marquee__track { animation: marquee var(--marquee-duration, 60s) linear infinite; }
.marquee.is-running:hover .marquee__track, .marquee.is-running:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { translate: calc(-50% - var(--marquee-gap) / 2) 0; } }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee.is-running .marquee__track { animation: none; }
}

/* Glowing event card, as `HeroCardLayout` in the app: art top right, title at the bottom */
.highlight-card {
  --tint: var(--tint-meteors);
  position: relative; overflow: hidden; min-height: 260px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: var(--space-1);
  padding: var(--space-5); border-radius: var(--radius-hero); border: 1px solid var(--hairline);
  background:
    radial-gradient(260px circle at 75% 25%, color-mix(in srgb, var(--tint) 45%, transparent), transparent),
    radial-gradient(220px circle at 0% 100%, color-mix(in srgb, var(--tint-moon) 20%, transparent), transparent),
    var(--surface);
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.highlight-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.14); }
.highlight-card__art { position: absolute; top: var(--space-3); right: var(--space-4); width: 150px; height: 150px; color: var(--text); }
.highlight-card__art svg { width: 100%; height: 100%; }
.highlight-card h3 { font-size: var(--text-title); font-weight: 600; letter-spacing: -0.02em; }
.highlight-card p { font-size: var(--text-callout); color: var(--text-muted); line-height: 1.4; max-width: 30ch; }

/* ---------- Features: bento grid ---------- */

.bento { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, minmax(0, 1fr)); }

.feature-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-5);
  padding: var(--space-5) var(--space-5) 0; border-radius: var(--radius-hero);
  background:
    radial-gradient(320px circle at 50% 110%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
    var(--surface);
}
.feature-card__copy { display: grid; gap: var(--space-2); }
.feature-card h3 { font-size: var(--text-title); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.feature-card__copy p { font-size: var(--text-callout); color: var(--text-muted); line-height: 1.5; }
.feature-card__art { flex: 1; display: flex; justify-content: center; align-items: flex-start; padding-bottom: var(--space-5); }

/* A phone rising out of the card's bottom edge */
.feature-card__art--peek { height: 250px; flex: none; padding-bottom: 0; }
.feature-card__art--peek .phone { --phone-w: 230px; }
.feature-card .score-card { width: 100%; max-width: 340px; }

.feature-card--wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: var(--space-7); padding: var(--space-6); }
.feature-card--wide .feature-card__copy { flex: 1; max-width: 560px; }
.feature-card--wide .feature-card__art { padding: 0; flex: 1; }

/* In the city / outside the city tiles, as on the event page */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); width: 100%; max-width: 340px; }
.stat-tile { display: grid; padding: var(--space-3) var(--space-4); border-radius: var(--radius-tile); background: var(--surface-raised); border: 1px solid var(--hairline); }
.stat-tile--good { border-color: color-mix(in srgb, var(--tint-milkyway) 30%, transparent); }
.stat-tile__label { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-caption); font-weight: 600; margin-bottom: var(--space-3); }
.stat-tile__value { font-size: var(--text-title); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-tile__value small { font-size: var(--text-caption); font-weight: 500; color: var(--text-subtle); letter-spacing: 0; }
.stat-tile__sub { font-size: var(--text-overline); color: var(--text-subtle); margin-bottom: var(--space-2); }
.stat-tile__sub:last-child { margin-bottom: 0; }

/* An event in the list, as `EventRow` in the app */
.event-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; width: 100%; max-width: 420px;
  padding: var(--space-4); border-radius: var(--radius-card); background: var(--surface-raised); border: 1px solid var(--hairline);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75);
}
.event-row > div { display: grid; gap: 2px; justify-items: start; }
.event-row__title { font-weight: 600; }
.event-row__sub { font-size: var(--text-caption); color: var(--text-muted); margin-bottom: var(--space-1); }
.event-row__bell { width: 20px; height: 20px; color: var(--accent); }
.event-list { display: grid; gap: var(--space-2); width: 100%; max-width: 340px; margin: 0; padding: 0; list-style: none; }
.event-row--compact { grid-template-columns: auto 1fr; padding: var(--space-3); border-radius: var(--radius-tile); box-shadow: none; }
.event-row--compact .event-row__title { font-size: var(--text-callout); }
.event-row--compact .event-row__sub { margin-bottom: 0; }

/* Meteors per hour through the night, as `NightChartCard` in the app */
.night-chart {
  display: grid; gap: var(--space-3); width: 100%; max-width: 340px; padding: var(--space-4);
  border-radius: var(--radius-card); background: var(--surface-raised); border: 1px solid var(--hairline);
}
.night-chart__title { font-size: var(--text-caption); font-weight: 600; color: var(--text-subtle); }
.night-chart svg { width: 100%; height: auto; overflow: visible; }
.night-chart__best { fill: var(--chip); }
.night-chart__outside, .night-chart__city { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.night-chart__outside { stroke-dasharray: 5 4; }
.night-chart__legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: 0; padding: 0; list-style: none; font-size: var(--text-overline); color: var(--text-subtle); }
.night-chart__legend li { display: flex; align-items: center; gap: 6px; }
.night-chart__key { width: 14px; height: 0; border-top: 2px solid var(--accent); }
.night-chart__key--outside { border-top-style: dashed; }
.night-chart__key--best { height: 9px; border: 0; border-radius: 2px; background: var(--glass-light); }

@media (max-width: 960px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .bento { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .feature-card { padding: var(--space-5) var(--space-4) 0; gap: var(--space-4); }
  .feature-card__art { padding-bottom: var(--space-4); }
  .feature-card__art--peek { height: 220px; padding-bottom: 0; }
  .feature-card--wide { flex-direction: column; align-items: stretch; padding: var(--space-5) var(--space-4); gap: var(--space-4); }
}

/* ---------- Astronomer mode ---------- */

.astro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); align-items: center; }
.astro__copy { display: grid; gap: var(--space-5); max-width: 500px; }
.settings-card { padding: var(--space-1) var(--space-5); }

.astro__stage { position: relative; display: flex; justify-content: flex-start; align-items: center; min-height: 560px; }
.astro__stage .phone { --phone-w: min(280px, 62vw); }
/* Plain and astronomer versions sit on top of each other; the switch crossfades them */
.astro__screens { display: grid; }
.astro__screens > img { grid-area: 1 / 1; height: 100%; }
.astro-fact__value { display: grid; }
.astro-fact__value > span { grid-area: 1 / 1; }
.astro__plain, .astro__numbers { transition: opacity 0.45s var(--ease-out), visibility 0.45s; }
.astro__numbers { opacity: 0; visibility: hidden; }
[data-astronomer="on"] .astro__plain { opacity: 0; visibility: hidden; }
[data-astronomer="on"] .astro__numbers { opacity: 1; visibility: visible; }

.astro__facts {
  position: absolute; z-index: 2; right: 0; top: 50%; translate: 0 -50%;
  display: grid; gap: var(--space-3); width: min(300px, 58%); margin: 0; padding: 0; list-style: none;
}
.astro-fact { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-tile); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8); }
.astro-fact:nth-child(even) { translate: calc(var(--space-6) * -1) 0; }
.astro-fact__label { font-size: var(--text-caption); color: var(--text-subtle); }
.astro-fact__value { font-weight: 600; font-variant-numeric: tabular-nums; }


@media (max-width: 860px) {
  .astro { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
  .astro__stage { flex-direction: column; gap: var(--space-5); min-height: 0; }
  .astro__stage .phone { --phone-w: min(260px, 70vw); }
  .astro__facts { position: static; translate: none; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .astro-fact:nth-child(even) { translate: none; }
  .astro-fact { padding: var(--space-2) var(--space-3); }
  .astro-fact__value { font-size: var(--text-callout); }
}

/* ---------- Guides ---------- */

.guides__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.guides__list > li { display: flex; }
.guides__list > li[hidden] { display: none; }
.guides__more { display: flex; margin: var(--space-6) auto 0; }
.guides__more[hidden] { display: none; }
.guide-card {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: var(--space-5);
  padding: var(--space-5); text-decoration: none; border-radius: var(--radius-hero);
  background:
    radial-gradient(260px circle at 0% 0%, color-mix(in srgb, var(--tint) 22%, transparent), transparent),
    var(--surface);
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}
.guide-card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, 0.14); }
.guide-card__copy { display: grid; gap: var(--space-2); }
.guide-card__over { font-size: var(--text-overline); font-weight: 600; letter-spacing: var(--tracking-overline); text-transform: uppercase; color: var(--tint); }
.guide-card strong { font-size: var(--text-title); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
.guide-card__text { font-size: var(--text-callout); color: var(--text-muted); }
.guide-card__arrow {
  position: absolute; top: var(--space-5); right: var(--space-5);
  font-size: var(--text-title); color: var(--text-muted); transition: translate 0.3s var(--ease-out), color 0.3s;
}
.guide-card:hover .guide-card__arrow { translate: 4px 0; color: var(--text); }
@media (max-width: 960px) { .guides__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .guides__list { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .guide-card { padding: var(--space-5) var(--space-4); gap: var(--space-4); }
  .guide-card .icon-tile { --size: 48px; }
  .guide-card__arrow { top: var(--space-5); right: var(--space-4); }
}

/* ---------- Plans ---------- */

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); max-width: 880px; margin: 0 auto; }
.plan { padding: var(--space-6); display: grid; gap: var(--space-5); align-content: start; }
.plan--plus {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 85% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%),
    var(--surface-raised);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}
.plan__name { font-size: var(--text-title); font-weight: 600; }
.plan__sub { font-size: var(--text-callout); color: var(--text-muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: var(--space-3); font-size: var(--text-body); color: var(--text-muted); }
.plan li svg { width: 18px; height: 18px; margin-top: 3px; color: var(--positive); }
.plan--plus li svg { color: var(--accent); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Closing ---------- */

.closing { text-align: center; display: grid; justify-items: center; gap: var(--space-5); }
.closing__icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 20px 60px -10px var(--phone-shadow); }

.footer { padding: var(--space-7) 0; border-top: 1px solid var(--hairline); font-size: var(--text-callout); color: var(--text-subtle); }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); }
.footer nav { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }

/* Cookie consent banner (landing/consent.js) */
.consent {
  position: fixed; z-index: 60; left: var(--space-4); right: var(--space-4); bottom: var(--space-4);
  max-width: 560px; margin-inline: auto; padding: var(--space-4) var(--space-5);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4);
  background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-card);
  box-shadow: 0 20px 60px -10px var(--phone-shadow);
}
.consent__text { flex: 1 1 260px; margin: 0; font-size: var(--text-callout); color: var(--text-muted); }
.consent__text a { color: var(--text); }
.consent__actions { display: flex; gap: var(--space-2); }

/* Fade-up on scroll */
.reveal { opacity: 0; translate: 0 28px; transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out); }
.reveal.is-visible { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; translate: none; transition: none; } }
