/* ============================================================
   Elsewhere — promo
   Hybrid: warm cream paper · navy ink · sky-blue + sun-gold accents
   Display = Literata italic (editorial warmth) · Body = Geist
   ============================================================ */

:root {
  /* ── Surfaces — cool & calm: pale blue-grey frame, near-white card,
     lavender panel pulled from Elsewhere's moon-blue ── */
  --canvas: oklch(0.93 0.012 262); /* outer frame — pale cool blue-grey */
  --paper: oklch(0.98 0.005 265); /* hero card — cool near-white */
  --paper-deep: oklch(0.955 0.008 265); /* inset / hover */
  --paper-edge: oklch(0.9 0.012 268); /* hairline borders */
  --panel: oklch(0.905 0.038 286); /* lavender panel — moon-blue, muted */
  --panel-edge: oklch(0.86 0.046 286);

  /* ── Ink — Elsewhere's deep navy (cool), the brand anchor ── */
  --ink: oklch(0.26 0.04 268);
  --ink-soft: oklch(0.46 0.034 264);
  --ink-faint: oklch(0.6 0.026 268);

  /* ── Accents — muted periwinkle (calmer than sky-blue) + sun-gold ── */
  --route: oklch(0.55 0.13 272); /* periwinkle — primary accent */
  --route-deep: oklch(0.47 0.14 272);
  --gold: oklch(0.74 0.135 76); /* sun gold */
  --cheaper: oklch(0.56 0.12 150); /* delta — cheaper */
  --pricier: oklch(0.56 0.17 30); /* delta — pricier */

  /* ── Always-dark slab (the night phone, footer) — don't flip ── */
  --night: oklch(0.205 0.035 268);
  --night-soft: oklch(0.28 0.035 266);
  --on-night: oklch(0.96 0.008 250);

  /* ── Radii ── */
  --r-pill: 9999px;
  --r-card: 22px;
  --r-phone: 44px;

  /* ── Spacing (4pt scale, semantic) ── */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* ── Type scale (fluid display, fixed body) ── */
  --t-display: clamp(2rem, 1.3rem + 2.4vw, 3.4rem);
  --t-eyebrow: 0.72rem;
  --t-lede: clamp(1.05rem, 0.98rem + 0.4vw, 1.25rem);
  --t-body: 1rem;

  /* ── Shadows — navy-tinted, soft ── */
  --shadow-card:
    0 1px 2px -1px rgb(28 32 56 / 0.12), 0 12px 28px -12px rgb(28 32 56 / 0.18);
  --shadow-phone:
    0 2px 6px -2px rgb(18 22 42 / 0.28), 0 30px 60px -24px rgb(18 22 42 / 0.42),
    0 50px 90px -40px rgb(18 22 42 / 0.3);

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

/* ── reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
:focus-visible {
  outline: 2.5px solid var(--route);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   NAV
   ============================================================ */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 2 * var(--space-sm));
  max-width: 1320px;
  margin: var(--space-sm) auto;
  padding: var(--space-md) clamp(var(--space-lg), 4vw, var(--space-3xl))
    var(--space-lg);
  background: var(--paper);
  border-radius: clamp(20px, 3vw, 36px);
  box-shadow:
    0 1px 2px rgb(28 32 56 / 0.06),
    0 30px 60px -30px rgb(28 32 56 / 0.16);
}
/* faint watermark of the app's day scene, filling the right-side dead space.
   Masked + low opacity so it stays behind the phones and never touches copy. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: url("../img/scene-day.jpg") no-repeat right center / auto 108%;
  opacity: 0.3;
  filter: saturate(0.85);
  -webkit-mask-image: linear-gradient(to left, #000 32%, transparent 78%);
  mask-image: linear-gradient(to left, #000 32%, transparent 78%);
}
/* footer credit — sits in the bottom slack of the full-height card */
.hero__foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: var(--space-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs) 1.25ch;
  font-size: 0.74rem;
  color: var(--ink-faint);
}
.hero__foot-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
}
.hero__foot-sep {
  opacity: 0.55;
}
.hero__foot-link {
  color: var(--ink-soft);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--ink-soft) 35%, transparent);
  text-underline-offset: 2px;
  transition:
    color 0.18s ease,
    text-decoration-color 0.18s ease;
}
.hero__foot-link:hover {
  color: var(--route);
  text-decoration-color: var(--route);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-xs);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
}
.brand__mark {
  display: inline-flex;
}
.nav__links {
  display: flex;
  gap: var(--space-xl);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav__links a {
  position: relative;
  padding-block: 4px;
  transition: color 0.18s ease;
}
.nav__links a:hover {
  color: var(--ink);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--route);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s var(--ease-out);
}
.nav__links a:hover::after {
  transform: scaleX(1);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 20px;
  min-height: 44px;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.16s var(--ease-out),
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.btn--lg {
  padding: 15px 26px;
  font-size: 1.02rem;
}
.btn--solid {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 2px rgb(20 24 42 / 0.18);
}
.btn--solid:hover {
  background: oklch(0.31 0.045 268);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgb(20 24 42 / 0.5);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--paper-edge);
}
.btn--ghost:hover {
  background: var(--paper-deep);
  border-color: var(--ink-faint);
  transform: translateY(-1px);
}
.btn__arrow {
  width: 19px;
  height: 19px;
  transition: transform 0.2s var(--ease-out);
}
.btn--solid:hover .btn__arrow {
  transform: translateX(3px);
}

/* ============================================================
   HERO LAYOUT — asymmetric two-column
   ============================================================ */
.hero__head {
  margin-top: clamp(var(--space-xs), 1.4vw, var(--space-md));
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: end;
  gap: 0;
  margin-top: clamp(var(--space-sm), 1.6vw, var(--space-md));
}
.hero__panel {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: clamp(20px, 2.4vw, 30px);
  padding: clamp(var(--space-lg), 2.6vw, var(--space-2xl));
  max-width: 40rem;
}
/* faint squiggle — echoes the app's from→to route line */
.hero__panel::after {
  content: "";
  position: absolute;
  right: -6%;
  bottom: -14%;
  width: 66%;
  height: 78%;
  pointer-events: none;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cpath d='M8 130 C 80 40 150 180 228 92 S 358 18 396 116' fill='none' stroke='%23ffffff' stroke-opacity='0.5' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 14px 6px 12px;
  border-radius: var(--r-pill);
  background: var(--paper-deep);
  border: 1px solid var(--paper-edge);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--route);
  box-shadow: 0 0 0 3px oklch(0.55 0.13 272 / 0.18);
}

.display {
  margin-top: var(--space-md);
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: var(--t-display);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.display__bold {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
}
.display__accent {
  display: block;
  font-weight: 500;
}

.lede {
  max-width: 36ch;
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* the two offerings — Compare + Explore */
.features {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.feature {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--ink-soft);
}
.feature__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: color-mix(in oklch, var(--paper) 75%, transparent);
  border: 1px solid var(--panel-edge);
  color: var(--route);
}
.feature__icon svg {
  width: 17px;
  height: 17px;
}
.feature__text strong {
  color: var(--ink);
  font-weight: 700;
}

/* ── Waitlist capture ──────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.waitlist {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  max-width: 30rem;
}
.waitlist__input {
  flex: 1 1 14rem;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--paper-edge);
  background: oklch(1 0 0);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.waitlist__input::placeholder {
  color: var(--ink-faint);
}
.waitlist__input:focus-visible {
  outline: 2.5px solid var(--route);
  outline-offset: 2px;
  border-color: var(--route);
}
.waitlist__btn {
  flex: 0 0 auto;
}
.waitlist__msg {
  flex-basis: 100%;
  margin-top: 2px;
  min-height: 1.2em;
  font-size: 0.9rem;
  font-weight: 500;
}
.waitlist__msg.is-error {
  color: var(--pricier);
}
.waitlist__msg.is-success {
  color: var(--cheaper);
}
.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}
.waitlist__note {
  margin-top: var(--space-md);
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ============================================================
   PHONES
   ============================================================ */
.hero__art {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin-left: clamp(-140px, -7vw, -48px);
}
.phones {
  position: relative;
  width: min(100%, 326px);
  height: 418px;
}
.phone {
  position: absolute;
  width: 166px;
  border-radius: var(--r-phone);
  background: oklch(0.16 0.02 268);
  padding: 9px;
  box-shadow: var(--shadow-phone);
}
.phone__screen {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  aspect-ratio: 1206 / 2622;
  background: oklch(0.16 0.02 268);
}
.phone__shot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.phone--night {
  top: 8px;
  left: 0;
  transform: rotate(-5deg);
  z-index: 1;
}
.phone--day {
  top: 44px;
  right: 0;
  transform: rotate(4deg);
  z-index: 2;
}

/* ============================================================
   REVEAL — one orchestrated page-load stagger
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
.reveal[data-d="1"].is-in {
  transition-delay: 0.02s;
}
.reveal[data-d="2"].is-in {
  transition-delay: 0.1s;
}
.reveal[data-d="3"].is-in {
  transition-delay: 0.2s;
}
.reveal[data-d="4"].is-in {
  transition-delay: 0.32s;
}
.reveal[data-d="5"].is-in {
  transition-delay: 0.42s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ── Tablet / mobile: stack cleanly, let the page scroll ── */
@media (max-width: 880px) {
  .hero {
    min-height: 0;
    margin: var(--space-md) auto;
    padding: var(--space-xl) clamp(var(--space-lg), 6vw, var(--space-2xl))
      var(--space-2xl);
  }
  /* small screens scroll freely, so restore standard breathing room
     (the desktop no-scroll tightening shouldn't apply here) */
  .hero__head {
    margin-top: var(--space-xl);
  }
  .display {
    margin-top: var(--space-lg);
  }
  .hero::before {
    display: none;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: var(--space-2xl);
    margin-top: var(--space-lg);
  }
  .hero__panel {
    max-width: none;
  }
  .hero__art {
    margin-left: 0;
  }
  /* scene watermark sits behind the phones on small screens */
  .hero__art::before {
    content: "";
    position: absolute;
    inset: -24px -8px -12px;
    z-index: -1;
    background: url("../img/scene-day.jpg") no-repeat center / cover;
    opacity: 0.32;
    filter: saturate(0.85);
    -webkit-mask-image: radial-gradient(
      115% 95% at 50% 42%,
      #000 52%,
      transparent 100%
    );
    mask-image: radial-gradient(
      115% 95% at 50% 42%,
      #000 52%,
      transparent 100%
    );
  }
  /* contain the two phones so they never spill onto the footer */
  .phones {
    aspect-ratio: auto;
    width: min(100%, 384px);
    height: 520px;
    margin-inline: auto;
  }
  .phone--night {
    top: 8px;
  }
  .phone--day {
    top: 56px;
  }
  .hero__foot {
    margin-top: var(--space-xl);
  }
}
@media (max-width: 420px) {
  .phones {
    height: 472px;
  }
  .phone {
    width: 178px;
  }
  .phone--day {
    top: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn,
  .btn__arrow,
  .nav__links a::after {
    transition: none;
  }
}
