/* Colors follow the app's Theme.swift, with the same dark-mode counterparts. */
:root {
  --navy: #1F3A5F;
  --brand-navy: #1F3A5F;
  --navy-raised: #2C4C75;
  --gold: #F2B33D;
  --bg: #F7F4EE;
  --card: #FFFFFF;
  --ink: #1E2430;
  --muted: #5A6372;
  --pale-blue: #E6EDF6;
  --peach: #FCE7C2;
  --line: #E3E7EE;
  --link: #1F5FA8;
  --shadow: 0 2px 12px rgba(31, 58, 95, 0.08);
  --bezel: #15181D;
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --navy: #9DB8DC;
    --bg: #15181E;
    --card: #22262E;
    --ink: #EEF0F4;
    --muted: #A3ABB8;
    --pale-blue: #2A3A52;
    --peach: #4A3A22;
    --line: #333944;
    --link: #9DC3F0;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --bezel: #3A404C;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
h1, h2, h3 { font-family: var(--font); color: var(--navy); }

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }

/* Header */
.site-header { padding: 1.4rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--navy); text-decoration: none; font: 700 1.1rem/1 var(--font); }
.brand img { width: 2.4rem; height: 2.4rem; border-radius: 0.6rem; box-shadow: var(--shadow); }
.site-nav { display: flex; gap: 1.4rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--link); }
.header-end { display: flex; align-items: center; gap: 1.4rem; }

/* Language menu: a <details> so it works without JavaScript. */
.lang-menu { position: relative; background: none; box-shadow: none; padding: 0; margin: 0; border-radius: 0; }
.lang-menu summary {
  display: flex; align-items: center; gap: 0.4rem; list-style: none;
  padding: 0.35rem 0.75rem; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); font-weight: 500; white-space: nowrap;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--link); border-color: var(--link); }
.lang-menu .lang-code { display: none; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 10;
  min-width: 12rem; margin: 0; padding: 0.4rem; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow);
}
.lang-menu li a { display: block; white-space: nowrap; padding: 0.5rem 0.8rem; border-radius: 0.6rem; color: var(--ink); text-decoration: none; }
.lang-menu li a:hover { background: var(--pale-blue); }
.lang-menu li a[aria-current="true"] { color: var(--link); font-weight: 700; }

/* Hero */
.hero { padding: 2.5rem 0 5rem; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 3rem; }
.eyebrow { display: inline-block; font: 800 0.8rem/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-navy); background: var(--gold); padding: 0.45rem 0.8rem; border-radius: 999px; margin-bottom: 1.2rem; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  font-weight: 700;
}
.hero p.lede { font-size: 1.2rem; color: var(--muted); max-width: 32em; margin: 0 0 2rem; }
.store-button {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--brand-navy); color: #fff; text-decoration: none;
  padding: 0.85rem 1.4rem; border-radius: 999px; font-weight: 700;
}
.store-button[aria-disabled="true"] { opacity: 0.9; cursor: default; }
.store-note { display: block; margin-top: 0.75rem; font-size: 0.9rem; color: var(--muted); }

/* Phone mockups, drawn in HTML after the app's Home, Pray and Story screens */
.phone {
  position: relative;
  width: min(340px, 100%);
  margin-inline: auto;
  aspect-ratio: 9 / 18.5;
  border-radius: 2.6rem;
  border: 10px solid var(--bezel);
  background: var(--bg);
  box-shadow: 0 30px 60px -20px rgba(31, 58, 95, 0.35);
  overflow: clip;
  font-family: var(--font);
}
.phone .screen { position: relative; min-height: 100%; padding: 2.4rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.7rem; }
.phone .hello { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.phone .title { font-size: 1.45rem; font-weight: 700; color: var(--navy); margin: -0.4rem 0 0.2rem; }
.phone .word {
  background: var(--brand-navy); color: #fff; border-radius: 1.3rem; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.phone .label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.phone .word q { font-size: 1.02rem; line-height: 1.3; font-weight: 500; quotes: "“" "”"; }
.phone .word .mystery { font-size: 1.02rem; font-weight: 600; }
.phone .word small { color: #C9D6E8; font-size: 0.72rem; }
.phone .tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.phone .tile {
  min-height: 4.6rem; border-radius: 1.1rem; background: var(--card); box-shadow: var(--shadow);
  padding: 0.7rem; display: flex; flex-direction: column; justify-content: space-between;
  font-size: 0.78rem; font-weight: 700; color: var(--ink);
}
.phone .tile.gold { background: var(--gold); color: var(--brand-navy); }
.phone .tile .big { font-size: 1.5rem; line-height: 1; font-weight: 600; }
.phone .tile svg { width: 1.2rem; height: 1.2rem; stroke: var(--navy); }
.phone .row {
  background: var(--card); border-radius: 1rem; padding: 0.65rem 0.8rem;
  display: flex; align-items: center; gap: 0.7rem; box-shadow: var(--shadow);
}
.phone .row b { display: block; font-size: 0.8rem; color: var(--ink); }
.phone .row span { display: block; font-size: 0.68rem; color: var(--muted); }
.phone .row .date {
  flex: none; width: 2.4rem; height: 2.4rem; border-radius: 0.7rem; background: var(--pale-blue);
  display: grid; place-items: center; font-size: 0.7rem; font-weight: 800; color: var(--navy); line-height: 1.05; text-align: center;
}
.phone .button { align-self: flex-start; background: var(--gold); color: var(--brand-navy); font-weight: 800; font-size: 0.75rem; padding: 0.45rem 0.9rem; border-radius: 999px; }
.phone .beads { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.phone .beads i { width: 0.8rem; height: 0.8rem; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.phone .beads i.done { background: var(--gold); }
.phone .screen.home { padding-bottom: 8.5rem; }
.phone .mascot { position: absolute; right: 0.4rem; bottom: 0.2rem; width: 6.2rem; }
.phone.small { width: min(280px, 100%); border-width: 8px; border-radius: 2.2rem; }

/* Sections */
section { padding: 4rem 0; }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); line-height: 1.1; margin: 0 0 0.75rem; }
.intro { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin: 0 0 2.5rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: step; }
.steps li { counter-increment: step; }
.steps .phone { margin-bottom: 1.5rem; }
.steps h3 { font-size: 1.3rem; margin: 0 0 0.4rem; display: flex; align-items: center; gap: 0.6rem; }
.steps h3::before {
  content: counter(step); flex: none;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--gold); color: var(--brand-navy);
  display: grid; place-items: center; font-size: 0.95rem;
}
.steps p { margin: 0; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin: 0; }
.feature { background: var(--card); border-radius: 1.4rem; padding: 1.4rem; box-shadow: var(--shadow); }
.feature dt { font: 700 1.1rem/1.3 var(--font); color: var(--navy); margin-bottom: 0.35rem; display: flex; align-items: center; gap: 0.55rem; }
.feature dt::before { content: ""; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--gold); flex: none; }
.feature dd { margin: 0; color: var(--muted); }

.quote-band { margin: 0; background: var(--brand-navy); color: #fff; border-radius: 2rem; padding: 3rem; display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; }
.quote-band img { width: 120px; }
.quote-band blockquote { margin: 0; font: 500 clamp(1.4rem, 3vw, 2rem)/1.3 var(--font); }
.quote-band cite { display: block; margin-top: 0.8rem; font: 600 1rem var(--text); font-style: normal; color: var(--gold); }

.privacy-band { background: var(--peach); border-radius: 2rem; padding: 2.5rem 3rem; }
.privacy-band h2 { margin-bottom: 0.5rem; }
.privacy-band p { max-width: 44em; margin: 0 0 1rem; }
.privacy-band a { font-weight: 700; }

/* Document pages (privacy, support) */
main.doc { padding: 2rem 0 4rem; }
main.doc .wrap { max-width: 760px; }
main.doc h1 { font-size: clamp(2.2rem, 5vw, 3rem); line-height: 1.1; margin: 0 0 0.5rem; }
main.doc h2 { font-size: 1.35rem; margin: 2.2rem 0 0.5rem; }
main.doc p, main.doc li { color: var(--ink); }
.updated { color: var(--muted); margin-top: 0; }
.contact-card { background: var(--card); border-radius: 1.4rem; padding: 1.6rem; box-shadow: var(--shadow); margin: 1.5rem 0 1rem; }
.contact-card p { margin: 0 0 0.5rem; color: var(--muted); }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card .email { font: 700 1.25rem var(--font); overflow-wrap: anywhere; }
details { background: var(--card); border-radius: 1rem; padding: 1rem 1.2rem; margin-bottom: 0.7rem; box-shadow: var(--shadow); }
summary { cursor: pointer; font-weight: 700; color: var(--navy); }
details p { margin: 0.7rem 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 1.4rem; }
.site-footer a { color: var(--muted); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .steps, .features { grid-template-columns: 1fr; }
  .steps { gap: 3rem; }
  .quote-band { grid-template-columns: 1fr; padding: 2rem; }
  .privacy-band { padding: 2rem; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .features { grid-template-columns: 1fr 1fr; }
  /* Mockup beside its caption, so the steps don't stack as three full-width phones. */
  .steps li { display: grid; grid-template-columns: 280px 1fr; grid-template-rows: 1fr auto auto 1fr; column-gap: 2rem; }
  .steps .phone { margin: 0; grid-row: 1 / -1; }
  .steps h3 { grid-column: 2; grid-row: 2; }
  .steps p { grid-column: 2; grid-row: 3; }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 2.5rem); }
  .store-button { font-size: 0.95rem; padding: 0.8rem 1.1rem; white-space: nowrap; }
  .contact-card .email { font-size: 1.05rem; }
  /* The app name gets its own row; the links and the language menu sit below it. */
  .site-header .wrap { row-gap: 0.9rem; }
  .brand { font-size: 1rem; gap: 0.55rem; }
  .brand img { width: 2rem; height: 2rem; }
  .site-nav { gap: 0.9rem; font-size: 0.95rem; }
  .header-end { width: 100%; justify-content: space-between; gap: 0.8rem; }
  /* Only the short code fits beside the brand and the links on a phone. */
  .lang-menu summary { padding: 0.3rem 0.55rem; font-size: 0.9rem; gap: 0.3rem; }
  .lang-menu .lang-name { display: none; }
  .lang-menu .lang-code { display: inline; }
}
