/* ---------- Design tokens ---------- */
:root {
  --green-900: #0d3a30;
  --green-700: #14614f;
  --green-600: #1a7963;
  --green-500: #1F8A70;
  --green-400: #2fae90;
  --green-300: #67d9b8;
  --green-200: #94f5d6;
  --green-100: #d6fbee;

  --ink-900: #0b1210;
  --ink-800: #12201c;
  --ink-700: #1c2f29;

  --bg: #f6f8f7;
  --bg-elevated: #ffffff;
  --bg-soft: #eef4f1;
  --text: #12201c;
  --text-muted: #4d5c56;
  --text-faint: #7c8a84;
  --border: rgba(18, 32, 28, 0.09);
  --shadow-color: 160 30% 20%;

  --accent: var(--green-500);
  --accent-strong: var(--green-600);
  --accent-soft: var(--green-100);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 999px;

  --container-w: 1120px;
  --shadow-1: 0 1px 2px hsl(var(--shadow-color) / 0.06), 0 8px 24px hsl(var(--shadow-color) / 0.08);
  --shadow-2: 0 2px 8px hsl(var(--shadow-color) / 0.10), 0 20px 48px hsl(var(--shadow-color) / 0.14);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a1512;
  --bg-elevated: #101f1a;
  --bg-soft: #132921;
  --text: #eef7f3;
  --text-muted: #a9bdb5;
  --text-faint: #7b938a;
  --border: rgba(255, 255, 255, 0.09);
  --shadow-color: 160 60% 2%;
  --accent-soft: rgba(31, 138, 112, 0.18);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1512;
    --bg-elevated: #101f1a;
    --bg-soft: #132921;
    --text: #eef7f3;
    --text-muted: #a9bdb5;
    --text-faint: #7b938a;
    --border: rgba(255, 255, 255, 0.09);
    --shadow-color: 160 60% 2%;
    --accent-soft: rgba(31, 138, 112, 0.18);
    color-scheme: dark;
  }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background-color .3s ease, color .3s ease;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; }

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Background ambience ---------- */
.bg-orbs { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35; }
.orb-1 { width: 520px; height: 520px; background: var(--green-300); top: -180px; right: -160px; }
.orb-2 { width: 420px; height: 420px; background: var(--green-500); bottom: 10%; left: -180px; opacity: .18; }
:root[data-theme="dark"] .orb { opacity: .22; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .orb { opacity: .22; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-icon { border-radius: 9px; }
.nav-links { display: flex; gap: 18px; margin-left: 12px; }
.nav-links a {
  font-weight: 600; font-size: .93rem; color: var(--text-muted); transition: color .2s ease;
  padding: 13px 6px; /* keeps a 44px tap target on touch devices */
}
.nav-links a:hover { color: var(--accent-strong); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.theme-toggle {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-elevated);
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  position: relative;
}
.theme-toggle .icon-sun, .theme-toggle .icon-moon { position: absolute; transition: opacity .25s ease, transform .35s ease; }
.theme-toggle .icon-moon { opacity: 0; transform: scale(.5) rotate(-40deg); }
.theme-toggle .icon-sun { opacity: 1; transform: scale(1) rotate(0); }
:root[data-theme="dark"] .theme-toggle .icon-sun,
:root:not([data-theme="light"]):not([data-theme="dark"]) .theme-toggle .icon-sun { }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 1; transform: scale(1) rotate(0); }
:root[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0; transform: scale(.5) rotate(40deg); }

.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  cursor: pointer;
}
.menu-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s ease, opacity .25s ease; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: var(--radius-full);
  font-weight: 700; font-size: .95rem; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(31, 138, 112, 0.55);
}
.btn-primary:hover { box-shadow: 0 14px 30px -6px rgba(31, 138, 112, 0.6); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg-soft); }
.btn-small { padding: 12px 18px; font-size: .85rem; } /* keeps a 44px tap target */
.btn-large { padding: 17px 30px; font-size: 1.05rem; }

/* Official Google Play badge — used as-is per Google's brand guidelines
   (not recoloured or reshaped; only scaled). */
.play-badge { display: inline-block; line-height: 0; transition: transform .18s ease, filter .18s ease; }
.play-badge img { width: 201px; height: auto; }
.play-badge-lg img { width: 241px; }
.play-badge:hover { transform: translateY(-2px); filter: brightness(1.06); }
.play-badge:active { transform: scale(.97); }

/* a <button> that has to look like a footer link */
.linklike {
  font: inherit; background: none; border: 0; cursor: pointer;
  color: var(--text-muted); font-weight: 600; font-size: .88rem;
  padding: 13px 6px;
}
.linklike:hover { color: var(--accent-strong); }

.copy-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--accent-strong); color: #fff; font-size: .85rem; font-weight: 700;
  padding: 11px 20px; border-radius: var(--radius-full);
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  z-index: 60;
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: 64px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-strong); background: var(--accent-soft);
  padding: 7px 14px; border-radius: var(--radius-full); margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.08; letter-spacing: -.02em; font-weight: 800; margin-bottom: 20px;
}
.text-accent { color: var(--accent); }
.hero-sub { font-size: 1.08rem; color: var(--text-muted); line-height: 1.65; max-width: 520px; margin-bottom: 30px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-trust li { font-size: .85rem; color: var(--text-faint); position: relative; padding-left: 18px; }
.hero-trust li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green-400);
}

.hero-art { position: relative; display: flex; justify-content: center; }
.phone-stack { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1 / 1.05; }

/* ---- Real device mockup (Pixel 9 Pro frame, MIT licensed — see
   assets/mockup-frame/TELEPHONE_LICENSE.txt, source: github.com/sneas/telephone) ---- */
.pixel-mockup {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0; /* no inline-descender gap under the frame image */
  filter: drop-shadow(0 30px 46px rgba(4, 12, 9, 0.45)) drop-shadow(0 10px 18px rgba(4, 12, 9, 0.3));
}
.pixel-mockup-screenshot {
  /* Geometry derived from the frame SVG's inner screen cutout (x 15→335, y 16→730
     of a 353×745 viewBox, corner radius 44). The two-value border-radius keeps the
     corners circular at any scale: 13.75% of width and 6.16% of height both = 44px. */
  position: absolute;
  left: 4.1%; right: 4.9%; top: 2%; bottom: 1.85%;
  overflow: hidden;
  border-radius: 13.75% / 6.16%;
  z-index: 1;
}
.pixel-mockup-screenshot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
/* The frame image carries the intrinsic 353×745 size, so it defines the mockup's
   height — keeping the true device aspect ratio in every context. */
.pixel-mockup-frame { position: relative; width: 100%; height: auto; display: block; z-index: 2; pointer-events: none; }

.phone-back {
  position: absolute;
  width: 60%;
  right: 0; top: 6%; transform: rotate(7deg);
  opacity: .96; z-index: 1;
}
.phone-front {
  position: absolute;
  width: 64%;
  left: 2%; bottom: 0; transform: rotate(-6deg);
  z-index: 2; animation: floatY 6s ease-in-out infinite;
}
@keyframes floatY { 0%,100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(-6deg) translateY(-14px); } }

/* ---------- Strip ---------- */
.strip { position: relative; z-index: 1; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px 24px; gap: 20px; text-align: center; }
.strip-item strong { display: block; font-size: 1.6rem; font-weight: 800; color: var(--accent-strong); }
.strip-item span { font-size: .8rem; color: var(--text-muted); }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding: 96px 0; }

/* Showcase band: a contrast panel that still follows the site theme, so it
   doesn't look "stuck in dark mode" when the user picks light. */
.section-dark { background: var(--showcase-bg); color: var(--showcase-text); }
.section-dark .eyebrow { background: var(--showcase-eyebrow-bg); color: var(--showcase-eyebrow-fg); }
.section-dark .section-head p { color: var(--showcase-muted); }

/* Light theme: a soft tinted panel, not a dark slab — a dark band in light mode
   reads as "the page is broken / stuck in dark mode". */
:root {
  --showcase-bg: #e9f3ef;
  --showcase-text: var(--text);
  --showcase-muted: var(--text-muted);
  --showcase-eyebrow-bg: var(--accent-soft);
  --showcase-eyebrow-fg: var(--accent-strong);
  --showcase-scroll: rgba(18, 32, 28, .22);
}
:root[data-theme="dark"] {
  --showcase-bg: #0e211c;
  --showcase-text: #eef7f3;
  --showcase-muted: rgba(238, 247, 243, .68);
  --showcase-eyebrow-bg: rgba(148, 245, 214, .12);
  --showcase-eyebrow-fg: var(--green-200);
  --showcase-scroll: rgba(255, 255, 255, .18);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --showcase-bg: #0e211c;
    --showcase-text: #eef7f3;
    --showcase-muted: rgba(238, 247, 243, .68);
    --showcase-eyebrow-bg: rgba(148, 245, 214, .12);
    --showcase-eyebrow-fg: var(--green-200);
    --showcase-scroll: rgba(255, 255, 255, .18);
  }
}

.section-head { max-width: 620px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -.015em; margin-bottom: 14px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px 24px; box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.feature-icon {
  width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center;
  color: var(--tint, var(--accent)); background: color-mix(in srgb, var(--tint, var(--accent)) 14%, transparent);
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.08rem; font-weight: 800; margin-bottom: 10px; letter-spacing: -.01em; }
.feature-card p { color: var(--text-muted); font-size: .92rem; line-height: 1.6; }

/* ---------- Screenshot rail ---------- */
.shot-rail {
  display: flex; gap: 22px; overflow-x: auto; padding: 10px 4px 26px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.shot-rail::-webkit-scrollbar { height: 8px; }
.shot-rail::-webkit-scrollbar-thumb { background: var(--showcase-scroll); border-radius: 8px; }
.shot {
  flex: 0 0 auto; width: 208px; scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.shot-mockup { transition: transform .3s ease; }
.shot:hover .shot-mockup { transform: translateY(-6px); }
.shot span { font-size: .82rem; color: var(--showcase-muted); font-weight: 600; }

/* ---------- Why section ---------- */
.why-grid { display: grid; grid-template-columns: 1fr .8fr; gap: 60px; align-items: center; }
.section-lead { color: var(--text-muted); font-size: 1.05rem; line-height: 1.65; margin: 16px 0 30px; max-width: 520px; }
.why-list { display: flex; flex-direction: column; gap: 20px; }
.why-list li { font-size: .98rem; line-height: 1.6; color: var(--text-muted); padding-left: 26px; position: relative; }
.why-list li strong { color: var(--text); }
.why-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-size: .68rem; font-weight: 900;
  display: grid; place-items: center; line-height: 1;
}
.why-art { display: flex; justify-content: center; }
/* Width only — the frame image sets the height, as it does for every other mockup.
   Pinning an aspect-ratio here fought the frame's real 353:745 and pushed the screen
   cutout past the bottom bezel. */
.phone-solo { width: 240px; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 22px;
}
.faq-item summary {
  cursor: pointer; padding: 18px 0; font-weight: 700; font-size: .98rem;
  display: flex; justify-content: space-between; align-items: center; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--text-faint); margin-left: 16px; transition: transform .25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-muted); font-size: .93rem; line-height: 1.65; padding: 0 0 20px; }
.faq-item a { color: var(--accent-strong); font-weight: 700; }

/* ---------- Download CTA ---------- */
.download-cta {
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  color: #fff; border-radius: var(--radius-lg); margin: 0 24px; padding: 72px 24px;
  max-width: calc(var(--container-w) + 48px);
}
@media (min-width: 1150px) { .download-cta { margin: 0 auto; } }
.download-inner { max-width: 560px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta-icon { border-radius: 18px; margin-bottom: 24px; box-shadow: 0 16px 32px -10px rgba(0,0,0,.5); }
.download-cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 14px; letter-spacing: -.01em; }
.download-cta p { color: rgba(255,255,255,.75); font-size: 1.02rem; margin-bottom: 32px; }
.download-cta .btn-primary { background: #fff; color: var(--green-700); box-shadow: 0 14px 30px -8px rgba(0,0,0,.35); }
.download-cta .btn-primary:hover { box-shadow: 0 18px 36px -8px rgba(0,0,0,.4); }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); padding: 48px 0 36px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-brand img { border-radius: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-links a {
  font-size: .88rem; color: var(--text-muted); font-weight: 600;
  padding: 13px 6px; /* keeps a 44px tap target on touch devices */
}
.footer-links a:hover { color: var(--accent-strong); }
.footer-copy { width: 100%; font-size: .78rem; color: var(--text-faint); text-align: center; margin-top: 8px; }

/* ---------- Legal / privacy page ---------- */
.legal { position: relative; z-index: 1; padding: 56px 0 100px; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.legal .updated { color: var(--text-faint); font-size: .88rem; margin-bottom: 36px; }
.legal h2 {
  font-size: 1.18rem; font-weight: 800; margin: 40px 0 12px; letter-spacing: -.01em;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.legal h3 { font-size: 1rem; font-weight: 700; margin: 24px 0 8px; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); font-size: .97rem; line-height: 1.75; }
.legal p { margin-bottom: 12px; }
.legal p strong { color: var(--text); }
.legal ul { padding-left: 20px; list-style: disc; margin: 10px 0 18px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--accent-strong); font-weight: 700; overflow-wrap: anywhere; }
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em; background: var(--bg-soft); color: var(--text);
  padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border);
  overflow-wrap: anywhere;
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1.in-view { transition-delay: .12s; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .phone-stack { max-width: 300px; margin: 0 auto 20px; }
  .why-grid { grid-template-columns: 1fr; }
  .why-art { order: -1; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }
  .header-actions .btn-small { display: none; }
  .hero { padding: 40px 0 24px; }
  .section { padding: 64px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .download-cta { border-radius: 22px; padding: 48px 24px; margin: 0 16px; }
  .container { padding: 0 18px; }
}

/* Mobile nav drawer */
body.nav-open .nav-links {
  display: flex; flex-direction: column; position: fixed; inset: 72px 0 0 0;
  background: var(--bg); padding: 28px 24px; gap: 4px; z-index: 39;
  border-top: 1px solid var(--border);
}
body.nav-open .nav-links a { padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
