:root {
  --bg: #fbf7ef;
  --bg-2: #f3ecdf;
  --card: #ffffff;
  --ink: #16263d;
  --ink-soft: #3d4d63;
  --muted: #6d7a8c;
  --navy: #1b3558;
  --navy-2: #2c4c77;
  --gold: #e9a94a;
  --gold-soft: #f6d9a3;
  --line: rgba(22, 38, 61, 0.1);
  --shadow: 0 30px 60px -30px rgba(27, 53, 88, 0.45);
  --btn-bg: #1b3558;
  --btn-ink: #ffffff;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 5vw, 56px);
  --max: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1726;
    --bg-2: #132036;
    --card: #17263d;
    --ink: #f4efe6;
    --ink-soft: #c9cfd9;
    --muted: #8e9aae;
    --navy: #9fbbe0;
    --navy-2: #c3d5ee;
    --gold: #f0b760;
    --gold-soft: #5a4424;
    --line: rgba(244, 239, 230, 0.12);
    --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
    --btn-bg: #f4efe6;
    --btn-ink: #0e1726;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1726;
  --bg-2: #132036;
  --card: #17263d;
  --ink: #f4efe6;
  --ink-soft: #c9cfd9;
  --muted: #8e9aae;
  --navy: #9fbbe0;
  --navy-2: #c3d5ee;
  --gold: #f0b760;
  --gold-soft: #5a4424;
  --line: rgba(244, 239, 230, 0.12);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --btn-bg: #f4efe6;
  --btn-ink: #0e1726;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-wrap: balance;
}
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.logo img { width: 32px; height: 32px; border-radius: 9px; }
.nav { display: none; gap: 1.75rem; font-size: 0.95rem; color: var(--ink-soft); }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--ink); }
@media (min-width: 820px) { .nav { display: flex; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.3rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--btn-bg);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn-small { padding: 0.55rem 1rem; font-size: 0.88rem; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-store { padding: 0.7rem 1.35rem 0.7rem 1.1rem; border-radius: 14px; text-align: left; line-height: 1.15; font-size: 1.15rem; }
.btn-store small { display: block; font-size: 0.68rem; font-weight: 500; opacity: 0.8; }

/* Hero */
.hero { position: relative; padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem); overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 90%;
  background:
    radial-gradient(600px 380px at 75% 30%, color-mix(in srgb, var(--gold) 38%, transparent), transparent 70%),
    radial-gradient(700px 420px at 15% 0%, color-mix(in srgb, var(--navy-2) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin-bottom: 1.1rem; }
.hero h1 em { font-style: italic; color: var(--gold); font-weight: 500; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--ink-soft); max-width: 34rem; margin-bottom: 1.8rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.hero-note { margin-top: 1.1rem; font-size: 0.88rem; color: var(--muted); }

.hero-visual { position: relative; }
.hero-visual .float {
  position: absolute;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1.3;
}
.float b { display: block; font-size: 0.9rem; }
.float .dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); font-size: 15px; flex: none; }
.float-a { top: 16%; left: max(0px, calc(50% - 250px)); }
.float-b { bottom: 14%; right: max(0px, calc(50% - 250px)); }
@media (max-width: 480px) { .float-a { left: 0; top: 8%; } .float-b { right: 0; bottom: 8%; } }

/* Sections */
section { scroll-margin-top: 72px; }
.section { padding: clamp(3.5rem, 9vw, 6.5rem) 0; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.7rem; }
.section h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

/* Spotlights */
.spot {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}
@media (min-width: 860px) {
  .spot { grid-template-columns: 1fr 1fr; }
  .spot.reverse .spot-copy { order: 2; }
}
.spot-copy h3 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.spot-copy p { color: var(--ink-soft); }
.ticks { display: grid; gap: 0.55rem; margin-top: 1.2rem; }
.ticks li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 4px var(--gold);
}

/* Feature grid */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 1.5rem; }
.card .ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--gold-soft); margin-bottom: 1rem; }
.card .ico svg { width: 22px; height: 22px; stroke: var(--ink); }
.card h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.card p { color: var(--ink-soft); font-size: 0.97rem; margin: 0; }

/* Translations */
.translations { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.translations li { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 0.55rem 1rem; font-size: 0.93rem; }
.translations li b { font-weight: 600; margin-right: 0.35rem; }
.translations li span { color: var(--muted); }

/* Pro */
.pro-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: clamp(2rem, 6vw, 4rem);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(20, 38, 66, 0.92), rgba(27, 53, 88, 0.72)),
    url("images/cross-amber-sky.jpg") center / cover;
  display: grid;
  gap: 2rem;
}
@media (min-width: 860px) { .pro-card { grid-template-columns: 1.1fr 0.9fr; align-items: center; } }
.pro-card .kicker { color: #f6d9a3; }
.pro-card h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.pro-card p { color: rgba(255,255,255,0.82); }
.pro-card .ticks li { color: rgba(255,255,255,0.9); }
.pro-card .ticks li::before { background: rgba(246,217,163,0.3); box-shadow: inset 0 0 0 4px #f0b760; }
.pro-card .btn { background: #fff; color: #16263d; border-color: #fff; margin-top: 1.5rem; }

/* Privacy band */
.promise { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.promise div { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.promise b { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 0.3rem; }
.promise span { color: var(--ink-soft); font-size: 0.97rem; }

/* FAQ */
.faq { max-width: 46rem; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--gold); transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin: 0.7rem 0 0; }

/* Final CTA */
.final { text-align: center; }
.final img { width: 88px; height: 88px; border-radius: 22px; margin: 0 auto 1.4rem; box-shadow: var(--shadow); }
.final h2 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
.final p { color: var(--ink-soft); max-width: 32rem; margin: 0 auto 1.8rem; }
.final .verse { font-family: var(--font-display); font-style: italic; color: var(--muted); margin-top: 2.2rem; font-size: 1.05rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--ink); }
.site-footer p { margin: 0; }

/* Legal pages */
.legal-hero { padding-top: clamp(2.5rem, 7vw, 4.5rem); padding-bottom: 1.5rem; }
.legal-hero, .legal { max-width: calc(46rem + 2 * var(--gutter)); }
.legal-hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); }
.legal-hero .lede { color: var(--ink-soft); max-width: 44rem; font-size: 1.08rem; }
.legal { padding-bottom: clamp(3rem, 8vw, 5rem); }
.legal h2 { font-size: 1.45rem; margin-top: 2.4rem; }
.legal h3 { font-size: 1.1rem; margin-top: 1.6rem; font-family: var(--font-body); letter-spacing: 0; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { list-style: disc; padding-left: 1.3rem; margin: 0 0 1rem; display: grid; gap: 0.4rem; }
.legal a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 3px; }
.legal .summary { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 1.3rem 1.5rem; margin: 1rem 0 1.5rem; }
.legal .summary h2 { margin-top: 0; font-size: 1.15rem; }
.legal .summary ul { margin-bottom: 0; }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 0 0 1rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-soft); }
.legal th { color: var(--ink); font-weight: 600; }
.page-meta { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-inview { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .alarm-card .type::after { animation: none; }
}

/* Real app screens (rendered from the App Store screenshot designs, bezel included) */
.shot {
  width: min(300px, 78vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 28px 36px rgba(27, 53, 88, 0.28));
}
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(62vw, 250px);
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0 1.5rem;
  margin: 0 calc(-1 * var(--gutter));
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
@media (min-width: 960px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding-left: 0; padding-right: 0; }
}
.gallery figure { margin: 0; scroll-snap-align: center; text-align: center; }
.gallery .shot { width: 100%; }
.gallery figcaption { margin-top: 0.9rem; font-size: 0.93rem; font-weight: 600; color: var(--ink-soft); }
