@font-face {
  font-family: 'Megrim Galactics';
  src: url('fonts/megrim.ttf') format('truetype');
  font-display: swap;
}

/* Matches the app's light "cream paper" theme (helper/color.ts → paper) */
:root {
  --paper: #fbf6ec;
  --bubble: #f1e8d7;
  --rule: #e6dcc8;
  --rule-strong: #cdbfa5;
  --ink: #3d3128;
  --ink-strong: #2b2119;
  --muted: #7d6c56;
  --tan: #b08a5e;
  --night: #1c2033;
  --night-ink: #efe6d6;
  --star: #c9a13b;
  --brand-a: #b08a5c;
  --brand-b: #8f6a42;
  --logo-a: #bb9563;
  --logo-b: #7a5634;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Raleway', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  color: var(--ink-strong);
  font-weight: 300;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand-b);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 20;
  background: var(--night);
  color: var(--night-ink);
  padding: 8px 14px;
  border-radius: 8px;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
}

.tagline {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding-left: 2px;
}

.wordmark {
  font-family: 'Megrim Galactics', 'Raleway', sans-serif;
  font-size: 1.7rem;
  line-height: 1;
  text-decoration: none;
  background: linear-gradient(90deg, var(--logo-a), var(--logo-b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hint {
  background: linear-gradient(90deg, var(--brand-b), #6f5033);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.btn {
  display: inline-block;
  background: var(--night);
  color: var(--night-ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.55em 1.2em;
  border-radius: 999px;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(241, 232, 215, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
}

.nav-links a:not(.btn) {
  text-decoration: none;
}

.nav-links a:not(.btn):hover {
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Store badges */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 12px;
}

.store {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 16px;
  background: var(--night);
  border-radius: 12px;
}

.store img {
  height: 34px;
  width: auto;
  display: block;
}

/* Hero */
.hero {
  padding: 64px 0 88px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  max-width: 13ch;
}

.hero-lede {
  font-size: 1.15rem;
  max-width: 34ch;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-visual .phone {
  width: 300px;
}

/* Orbit rings, planet dots and a faint sun, as in the App Store screenshots */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
}

.hero-orbits {
  position: absolute;
  top: -300px;
  right: -330px;
  width: 1000px;
  height: 1000px;
  pointer-events: none;
}

.hero-orbits svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-orbits .ring {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.hero-orbits .planet {
  fill: var(--brand-b);
  opacity: 0.55;
}

.hero-orbits .moon {
  fill: var(--brand-a);
  opacity: 0.45;
}

.hero-glyph {
  position: absolute;
  left: 37%;
  top: 37%;
  width: 26%;
  height: 26%;
  background: linear-gradient(90deg, var(--logo-a), var(--logo-b));
  -webkit-mask: url('images/sun.png') center / contain no-repeat;
  mask: url('images/sun.png') center / contain no-repeat;
  opacity: 0.22;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Phone frame + screenshot placeholder */
.phone {
  aspect-ratio: 1179 / 2556;
  border: 7px solid var(--ink-strong);
  border-radius: 34px;
  background: var(--bubble);
  overflow: hidden;
  box-shadow: 0 24px 48px -24px rgba(61, 49, 40, 0.45);
}

.phone {
  margin: 0;
}

.phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Until a screenshot exists, show its label */
.phone.empty img {
  display: none;
}

.phone.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 500;
}

.phone.empty::after {
  content: attr(data-label);
}


/* Pillars */
.pillar {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 72px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
  border-top: 1px solid var(--rule);
}

.pillar:nth-child(even) {
  grid-template-columns: 1fr 220px;
}

.pillar:nth-child(even) .phone {
  order: 2;
}

.pillar-text {
  max-width: 30rem;
}

.pillar-text p:first-of-type {
  font-size: 1.1rem;
}

/* Soulmate, Past Life, Star Seed */
.cosmic {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
}

.cosmic-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.cosmic-head .hint {
  white-space: nowrap;
}

/* Three screenshots fanned like a hand of cards */
.fan {
  position: relative;
  height: 470px;
}

.fan .phone {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 190px;
  transform-origin: 50% 100%;
}

.fan .phone:nth-child(1) {
  transform: translateX(-50%) translateX(-130px) rotate(-11deg);
}

.fan .phone:nth-child(2) {
  top: 0;
  z-index: 1;
  transform: translateX(-50%);
}

.fan .phone:nth-child(3) {
  transform: translateX(-50%) translateX(130px) rotate(11deg);
}

.cosmic-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 48px;
}

.cosmic-list h3 {
  font-size: 1.6rem;
  margin: 12px 0 8px;
}

.cosmic-glyph {
  display: inline-block;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--tan);
}

/* Feature list */
.features {
  padding: 88px 0;
  background: var(--bubble);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 48px;
  margin: 40px 0 0;
}

.feature-list > div {
  border-top: 1px solid var(--rule-strong);
  padding-top: 18px;
}

.feature-list dt {
  font-weight: 600;
  color: var(--ink-strong);
  margin-bottom: 6px;
}

.feature-list dd {
  margin: 0;
  font-size: 0.95rem;
}

.glyph {
  display: inline-block;
  width: 1.6em;
  font-size: 1.3em;
  color: var(--tan);
}

/* Reviews */
.reviews-section {
  padding: 96px 0;
}

.reviews {
  column-width: 300px;
  column-gap: 48px;
  margin-top: 40px;
}

.reviews figure {
  break-inside: avoid;
  margin: 0 0 40px;
}

.stars {
  color: var(--star);
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.reviews blockquote {
  margin: 8px 0 10px;
  font-weight: 300;
  line-height: 1.65;
}

.reviews figcaption {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Pricing */
.pricing {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
}

.lede {
  font-size: 1.1rem;
  max-width: 36ch;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 880px;
  margin-top: 40px;
}

.plan {
  border: 1px solid var(--rule-strong);
  border-radius: 20px;
  padding: 32px;
}

.plan h3 {
  font-size: 1.8rem;
  margin-bottom: 0.15em;
}

.plan-term {
  color: var(--muted);
  font-size: 0.95rem;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.plan li {
  padding: 10px 0 10px 28px;
  border-top: 1px solid var(--rule);
  position: relative;
}

.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--tan);
}

.plan-premium {
  background: var(--bubble);
  border-color: var(--tan);
}

/* FAQ */
.faq {
  padding: 0 0 96px;
}

.faq h2 {
  margin-bottom: 24px;
}

.faq details {
  max-width: 44rem;
  border-top: 1px solid var(--rule-strong);
}

.faq details:last-of-type {
  border-bottom: 1px solid var(--rule-strong);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 32px 18px 0;
  font-weight: 500;
  color: var(--ink-strong);
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  font-weight: 300;
  font-size: 1.4rem;
  line-height: 1;
  top: 16px;
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0 0 20px;
  max-width: 40rem;
}

/* Final call to action */
.cta {
  padding: 96px 0 104px;
  text-align: center;
  border-top: 1px solid var(--rule);
}

.cta h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
}

.cta .stores {
  justify-content: center;
}

/* Footer */
.footer {
  background: var(--bubble);
  border-top: 1px solid var(--rule);
  padding: 48px 0 32px;
  font-size: 0.95rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-inner p {
  margin-top: 12px;
  max-width: 30ch;
  color: var(--muted);
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer li + li {
  margin-top: 8px;
}

.footer ul a {
  text-decoration: none;
}

.footer ul a:hover {
  text-decoration: underline;
}

.footer-legal {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Terms, privacy, child safety */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px 96px;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin-top: 1em;
}

.legal h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2em;
}

.legal h3 {
  font-size: 1.1rem;
  font-weight: 600;
}

.legal p,
.legal li {
  line-height: 1.75;
}

.legal h1::first-letter,
.legal h2::first-letter,
.legal h3::first-letter {
  text-transform: uppercase;
}

.legal-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.legal .toc {
  background: var(--bubble);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 24px 0;
}

/* Tablet and phone */
@media (max-width: 860px) {
  .hero {
    padding: 40px 0 64px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-visual .phone {
    width: 240px;
  }
  .hero-orbits {
    top: -200px;
    right: -260px;
    width: 640px;
    height: 640px;
  }
  .hero-glyph {
    opacity: 0.16;
  }
  .pillar,
  .pillar:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .pillar .phone,
  .pillar:nth-child(even) .phone {
    order: 0;
    width: 200px;
    margin: 0 auto;
  }
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }
  .cosmic-list {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cosmic-head {
    grid-template-columns: 1fr;
  }
  .fan {
    height: 380px;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
  }
  .fan .phone {
    width: 150px;
  }
  .fan .phone:nth-child(1) {
    transform: translateX(-50%) translateX(-95px) rotate(-11deg);
  }
  .fan .phone:nth-child(3) {
    transform: translateX(-50%) translateX(95px) rotate(11deg);
  }
  .plans {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-inner > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .nav-links a:not(.btn) {
    display: none;
  }
  .feature-list {
    grid-template-columns: 1fr;
  }
  .plan {
    padding: 24px;
  }
}
