/* reLapse — Liquid Glass design tokens from ../../DESIGN.md.
   No web fonts and no external requests: the whole page is one HTML file
   plus this stylesheet, which keeps LCP off the critical network path. */

:root {
  color-scheme: light dark;

  --bg-base: #f4f3f7;
  --glass-surface: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-shadow: rgba(28, 28, 34, 0.08);
  --text-primary: #1c1c22;
  --text-secondary: #55555f;
  --divider: rgba(28, 28, 34, 0.1);

  --mesh-1: #d7d3f5;
  --mesh-2: #f5d9e8;
  --mesh-3: #d6ecf5;

  /* Icon green is too light to sit on white, so light mode gets a darker
     tint of the same hue. Both clear 4.5:1 against their own background. */
  --brand: #3f6b25;
  --brand-quiet: #eef5e4;
  --pro: #6a4fd8;
  --positive: #2f7a55;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3.5rem;
  --radius-card: 20px;
  --radius-pill: 999px;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-base: #0e0e12;
    --glass-surface: rgba(28, 28, 34, 0.55);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --text-primary: #f2f2f5;
    --text-secondary: #a3a3af;
    --divider: rgba(255, 255, 255, 0.1);

    --mesh-1: #221e3d;
    --mesh-2: #2b1e33;
    --mesh-3: #1b2536;

    --brand: #afd489;
    --brand-quiet: rgba(175, 212, 137, 0.14);
    --pro: #a996f5;
    --positive: #5fbf92;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg-base);
  /* Mesh gradient as three fixed radial stops — the ambient depth from
     DESIGN.md §2 without shipping a background image. */
  background-image:
    radial-gradient(58rem 42rem at 12% -8%, var(--mesh-1), transparent 62%),
    radial-gradient(52rem 40rem at 92% 8%, var(--mesh-2), transparent 60%),
    radial-gradient(60rem 46rem at 50% 108%, var(--mesh-3), transparent 62%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  z-index: 10;
}
.skip-link:focus { left: var(--space-md); top: var(--space-md); }

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.prose { max-width: var(--measure); }

/* ---------- glass ---------- */

.glass {
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px var(--glass-shadow), 0 12px 32px -20px var(--glass-shadow);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

/* DESIGN.md §5: the flat tier is an accessibility requirement, not just a
   performance one. Reduced transparency drops the blur entirely. */
@media (prefers-reduced-transparency: reduce) {
  .glass {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--bg-base);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg-base) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--divider);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  min-height: 4rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  text-decoration: none;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text-primary); text-decoration: underline; }

/* ---------- type ---------- */

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 var(--space-md); }
h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 650; margin-top: 0; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 var(--space-md); }

.lede { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--text-secondary); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 var(--space-sm);
}
.muted { color: var(--text-secondary); }
.small { font-size: 0.88rem; }

section { padding-block: var(--space-2xl); }
section > .wrap > h2 { max-width: var(--measure); }

/* ---------- hero ---------- */

.hero { padding-top: var(--space-2xl); }
.hero .wrap {
  display: grid;
  gap: var(--space-2xl);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 62rem) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; }
}
.hero-shot { justify-self: center; max-width: 340px; width: 100%; }
.hero-shot img { border-radius: 28px; box-shadow: 0 30px 70px -40px rgba(0,0,0,0.7); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-lg);
}

/* Official Apple / Google download badges. Guidelines for both require the
   artwork unmodified and with clear space around it, so this is deliberately
   unstyled beyond sizing and a hover/focus affordance that never touches the
   image itself — no pill, no background, no border, no recolouring. */
.store-badges { align-items: center; }
.store-badge {
  display: inline-flex;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 150ms ease-out, transform 150ms ease-out;
}
.store-badge img { display: block; }
.store-badge:hover { opacity: 0.85; }
.store-badge:active { transform: scale(0.97); }
@media (prefers-reduced-motion: reduce) {
  .store-badge { transition: none; }
  .store-badge:active { transform: none; }
}

/* ---------- cards ---------- */

.grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.card { padding: var(--space-lg); }
.card h3 { margin-bottom: var(--space-sm); }
.card p:last-child { margin-bottom: 0; }

.feature {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  grid-template-columns: 1fr;
  padding-block: var(--space-xl);
}
@media (min-width: 52rem) {
  .feature { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
  .feature.flip .feature-text { order: 2; }
}
.feature-shot { justify-self: center; max-width: 300px; width: 100%; }
.feature-shot img { border-radius: 24px; box-shadow: 0 24px 60px -40px rgba(0,0,0,0.7); }

/* A rendered notification, for the one feature with no screenshot to show —
   the whole point of it is that it appears on a lock screen, not in the app. */
.notif-preview { padding: 1.1rem 1.2rem 1.3rem; text-align: left; }
.notif-preview-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.notif-preview-head img { border-radius: 5px; }
.notif-preview-head span:first-of-type {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.notif-preview-time {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.notif-preview-title {
  margin: 0 0 0.2rem;
  font-weight: 650;
  color: var(--text-primary);
}
.notif-preview-body { margin: 0; color: var(--text-secondary); }

/* ---------- pricing ---------- */

.plans {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  align-items: start;
}
.plan { padding: var(--space-lg); }
.plan.featured { border-color: color-mix(in srgb, var(--pro) 55%, transparent); }
.plan .price { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }
.plan .price span { font-size: 0.95rem; font-weight: 400; color: var(--text-secondary); }
.plan ul { list-style: none; margin: var(--space-md) 0 0; padding: 0; }
.plan li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand);
}
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--pro) 18%, transparent);
  color: var(--pro);
  margin-left: var(--space-sm);
  vertical-align: middle;
}

/* ---------- faq ---------- */

.faq { max-width: var(--measure); }
.faq details {
  border-bottom: 1px solid var(--divider);
  padding: var(--space-md) 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details > *:not(summary) { margin-top: var(--space-sm); }

/* ---------- legal documents ---------- */

.doc { padding-block: var(--space-2xl); }
.doc .prose h2 { margin-top: var(--space-xl); font-size: 1.35rem; }
.doc .prose h3 { margin-top: var(--space-lg); font-size: 1.05rem; }
.doc .prose ul, .doc .prose ol { padding-left: 1.25rem; }
.doc .prose li { margin-bottom: var(--space-sm); }
.doc .prose table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0 var(--space-lg);
  font-size: 0.93rem;
}
.doc .prose th, .doc .prose td {
  text-align: left;
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
.doc .prose th { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.doc-meta {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

.callout {
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--brand);
  background: var(--brand-quiet);
  border-radius: 0 12px 12px 0;
  margin: var(--space-lg) 0;
}
.callout p:last-child { margin-bottom: 0; }

.todo {
  border-left-color: #d1873a;
  background: color-mix(in srgb, #d1873a 12%, transparent);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--divider);
  padding-block: var(--space-xl);
  margin-top: var(--space-2xl);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg) var(--space-xl);
  justify-content: space-between;
}
.site-footer nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--text-primary); text-decoration: underline; }
.site-footer .colophon { color: var(--text-secondary); max-width: 34ch; }
