:root {
  --ink: #0b1535;
  --muted: #5a678a;
  --paper: #f6f8ff;
  --panel: #ffffff;
  --line: rgba(11, 21, 53, 0.1);
  --accent: #4a6cff;
  --wash: #e8edff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-weight: 700;
  color: var(--ink);
}
h1 { font-size: clamp(1.85rem, 4.5vw, 2.6rem); margin: 0 0 12px; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 10px; }
p { margin: 0 0 12px; color: var(--muted); }

body:not(.home) main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 72px;
}
body:not(.home) main h2 {
  font-size: 1.12rem;
  margin-top: 28px;
  font-family: "Outfit", system-ui, sans-serif;
  letter-spacing: -0.01em;
  font-weight: 700;
}

#cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  background: var(--panel);
  border-radius: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(11, 21, 53, 0.12);
}
#cookie p { color: var(--ink); margin-bottom: 12px; font-size: 0.94rem; }

button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  margin-right: 8px;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
}
button.reject {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.site-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 18px 24px;
}
.site-brand { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.site-brand img.mark { width: 34px; height: 34px; }
.site-brand span {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); }

.site-foot {
  max-width: 1040px;
  margin: 48px auto 0;
  padding: 28px 24px 40px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 16px;
}
.site-foot-links { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.site-foot-links a,
.site-foot-mail a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.site-foot-links a:hover,
.site-foot-mail a:hover { color: var(--ink); }

.legal-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.legal-back:hover { color: var(--ink); }

/* Home */
body.home {
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(74, 108, 255, 0.08), transparent 55%),
    var(--paper);
}

.site-top-home {
  position: relative;
  z-index: 3;
  max-width: none;
  padding-left: max(24px, calc((100% - 1100px) / 2));
  padding-right: max(24px, calc((100% - 1100px) / 2));
  background: transparent;
}
.site-top-home .site-brand span { color: #fff; }
.site-top-home .site-nav a { color: rgba(232, 236, 255, 0.7); }
.site-top-home .site-nav a:hover { color: #fff; }

.hero {
  margin: -76px 0 0;
  padding: 76px 0 0;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(920px 520px at 88% 12%, rgba(74, 108, 255, 0.42), transparent 55%),
    radial-gradient(640px 420px at 8% 88%, rgba(0, 197, 238, 0.18), transparent 50%),
    linear-gradient(165deg, #060b1c 0%, #0d1738 52%, #0b1535 100%);
  color: #e8ecff;
}

.hero-glow {
  position: absolute;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  right: 4%;
  bottom: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 108, 255, 0.35), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  animation: heroPulse 8s ease-in-out infinite alternate;
}

.hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  min-height: calc(100vh - 76px);
  padding: clamp(28px, 5vh, 48px) 24px clamp(48px, 8vh, 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

.hero-copy {
  max-width: 34rem;
  animation: heroRise 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-brand {
  margin: 0 0 14px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(3.6rem, 10vw, 5.8rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.88;
  color: #fff;
}

.hero-copy h1 {
  max-width: 14ch;
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  color: rgba(244, 246, 255, 0.96);
}

.hero-lead {
  margin-top: 16px;
  max-width: 32ch;
  font-size: 1.12rem;
  line-height: 1.45;
  color: rgba(232, 236, 255, 0.7);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: heroRise 1100ms 100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 16px 8px 8px;
}

.phone-stage::before {
  content: "";
  position: absolute;
  width: 70%;
  height: 24%;
  bottom: 4%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.4), transparent 70%);
  filter: blur(14px);
}

.phone {
  margin: 0;
  position: relative;
  width: min(132px, 34vw);
  background: transparent;
}

.phone img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1080 / 2309;
  object-fit: cover;
  object-position: top center;
  border-radius: 20px;
  background: #0a122c;
  box-shadow:
    0 0 0 6px #151d36,
    0 0 0 7px rgba(255, 255, 255, 0.06),
    0 16px 32px rgba(0, 0, 0, 0.38);
}

.phone-hero {
  width: min(142px, 36vw);
  animation: heroFloat 5.5s ease-in-out infinite alternate;
}

.phone figcaption {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

@keyframes heroRise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}
@keyframes heroPulse {
  from { opacity: 0.45; transform: scale(1); }
  to { opacity: 0.8; transform: scale(1.07); }
}

.story { padding: 0; }

.story-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(64px, 10vw, 104px) 24px;
}

.story-kicker {
  margin: 0 0 12px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.story h2 {
  max-width: 16ch;
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
}

.story p {
  max-width: 40ch;
  font-size: 1.1rem;
  color: var(--muted);
}

.story-why {
  background: linear-gradient(180deg, #eef1fb 0%, var(--paper) 100%);
}
.story-why-inner {
  max-width: 640px;
  margin-left: max(24px, calc((100% - 1100px) / 2));
  margin-right: auto;
}

.story-runway {
  background: #fff;
  border-top: 1px solid var(--line);
}

.runway-head {
  margin-bottom: 36px;
}
.runway-head h2 { max-width: 14ch; }

.runway {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(18px, 3vw, 36px);
  align-items: flex-start;
}

.runway .phone {
  width: 96px;
  flex: 0 0 auto;
  opacity: 0;
  transform: translateY(32px) scale(0.96);
  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.runway .phone img {
  border-radius: 18px;
  box-shadow:
    0 0 0 5px #121a33,
    0 0 0 6px rgba(11, 21, 53, 0.08),
    0 12px 24px rgba(11, 21, 53, 0.14);
}

.story-runway.is-in .runway .phone {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.story-runway.is-in .runway .phone:nth-child(1) { transition-delay: 40ms; }
.story-runway.is-in .runway .phone:nth-child(2) { transition-delay: 110ms; }
.story-runway.is-in .runway .phone:nth-child(3) { transition-delay: 180ms; }
.story-runway.is-in .runway .phone:nth-child(4) { transition-delay: 250ms; }
.story-runway.is-in .runway .phone:nth-child(5) { transition-delay: 320ms; }

.story-runway.is-in .runway .phone:hover {
  transition-delay: 0ms;
  transform: translateY(-6px) scale(1);
}

.runway-note {
  margin: 36px auto 0 !important;
  max-width: 48ch !important;
  text-align: center;
  font-size: 1.05rem !important;
}

.story-locate {
  background:
    radial-gradient(760px 400px at 90% 10%, rgba(74, 108, 255, 0.32), transparent 55%),
    radial-gradient(560px 340px at 5% 90%, rgba(0, 197, 238, 0.16), transparent 50%),
    #0b1535;
  color: #e8ecff;
}

.locate-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.story-locate .story-kicker { color: #8ec0ff; }
.story-locate h2 { color: #fff; max-width: 12ch; }
.story-locate p { color: rgba(232, 236, 255, 0.72); }

.locate-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-locate {
  width: min(148px, 38vw);
  animation: heroFloat 6s ease-in-out infinite alternate;
}

.phone-locate img {
  box-shadow:
    0 0 0 7px #151d36,
    0 0 0 8px rgba(255, 255, 255, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.45);
}

.locate-proof {
  display: grid;
  justify-items: start;
  gap: 12px;
  text-align: left;
  padding: 28px 0 0;
  max-width: 280px;
}

.locate-phone {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

.locate-bridge {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(260px, 100%);
}

.locate-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00c5ee;
  box-shadow: 0 0 0 7px rgba(0, 197, 238, 0.16);
}

.locate-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(0, 197, 238, 0.85), rgba(74, 108, 255, 0.95));
  animation: bridgePulse 2.4s ease-in-out infinite;
}

.locate-pin {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #4a6cff;
  box-shadow: 0 0 0 8px rgba(74, 108, 255, 0.2);
  animation: pinBeat 2.4s ease-in-out infinite;
}

.locate-caption {
  margin: 4px 0 0 !important;
  font-size: 0.98rem !important;
  color: rgba(232, 236, 255, 0.62) !important;
}

@keyframes bridgePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
@keyframes pinBeat {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(-45deg) scale(1.12); }
}

.story-close {
  background:
    radial-gradient(680px 300px at 0% 100%, rgba(74, 108, 255, 0.1), transparent 55%),
    var(--paper);
}
.story-close-inner {
  max-width: 560px;
  text-align: left;
}
.story-close .store-cta { margin-top: 26px; }

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 780ms cubic-bezier(0.22, 1, 0.36, 1), transform 780ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-visual,
  .phone-hero,
  .phone-locate,
  .hero-glow,
  .locate-line,
  .locate-pin,
  .runway .phone,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}

.store-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
}
.store-badge {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.store-badge:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.store-badge img {
  height: 44px;
  width: auto;
}
/* Play badge PNG includes padding — align with App Store height */
.store-badge-play img {
  height: 64px;
  margin: -10px -8px;
}

main#features {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 24px 24px;
}

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 48px;
  align-items: start;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}
.feature-copy p { max-width: 36ch; font-size: 1.05rem; }
.feature-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.closing {
  padding: 48px 0 16px;
  border-top: 1px solid var(--line);
}
.closing p { max-width: 40ch; font-size: 1.05rem; }

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
    gap: 20px;
  }
  .hero-visual { order: -1; min-height: auto; }
  .phone-hero { width: min(140px, 36vw); }
  .runway { gap: 20px 24px; }
  .runway .phone { width: 92px; }
  .phone-locate { width: min(132px, 34vw); }
  .locate-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .story-why-inner { margin-left: auto; }
  .feature { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 560px) {
  .site-top,
  .site-top-home,
  .hero-grid,
  .story-inner,
  main#features,
  .site-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .site-top-home {
    padding-left: 16px;
    padding-right: 16px;
  }
  .store-cta { width: 100%; }
  .hero-brand { font-size: clamp(2.9rem, 16vw, 3.8rem); }
}

.features-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}
.features-intro { margin-bottom: 12px; }
.features-intro p { max-width: 40ch; font-size: 1.08rem; }
.features-page .feature {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 28px 0;
}
.text-link {
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
}
.text-link:hover { text-decoration: underline; }
