/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --brand: #e3ff00;
  --brand-ink: #111111;

  --bg: #f6f6f1;
  --bg-alt: #ecece5;
  --surface: #ffffff;
  --text: #111111;
  --text-muted: #55554f;
  --border: #d9d9d0;
  --link: #111111;
  --focus: #111111;
  --btn-bg: #111111;
  --btn-fg: #ffffff;

  --radius: 10px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --bg-alt: #141414;
    --surface: #1a1a1a;
    --text: #f2f2ee;
    --text-muted: #a3a39b;
    --border: #2a2a2a;
    --link: var(--brand);
    --focus: var(--brand);
    --btn-bg: #f2f2ee;
    --btn-fg: #111111;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.15em; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 4.75rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.04em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px;
  padding: 8px 16px; background: var(--brand); color: var(--brand-ink); border-radius: 6px; z-index: 100;
}
.skip-link:focus { top: 16px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container-narrow { --container: 760px; }

.section { padding-block: clamp(64px, 10vw, 112px); }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: clamp(32px, 5vw, 56px); }

.eyebrow { font-size: 0.9375rem; font-weight: 600; color: var(--text-muted); margin-bottom: 1em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text-muted); max-width: 36ch; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 8px;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; text-decoration: none;
}
.btn:hover { opacity: 0.85; }
.btn-small { padding: 7px 14px; font-size: 0.9375rem; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px; min-width: 170px; border-radius: 10px;
  background: #000; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.125rem; line-height: 1.1;
  border: 1px solid rgb(255 255 255 / 0.15);
}
.store-btn:hover { background: #222; }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn small { display: block; font-size: 0.6875rem; font-weight: 400; opacity: 0.85; }
.store-btn.is-disabled { position: relative; background: #3a3a3f; cursor: not-allowed; }
.store-btn.is-disabled > :not(.store-badge) { opacity: 0.5; }
.store-badge {
  position: absolute; top: -9px; right: -8px;
  padding: 3px 7px; border-radius: 4px;
  background: var(--brand); color: var(--brand-ink); font-size: 0.6875rem; font-weight: 700;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; }
.brand img { border-radius: 8px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--text-muted); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--text); }

.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-toggle {
    display: grid; place-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); transition: transform 0.2s; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .site-nav:not(.site-nav-static) {
    position: absolute; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav:not(.site-nav-static) a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .site-nav .btn { margin-top: 16px; }
}

/* ==========================================================================
   Screenshots (plain rounded image, no fake phone bezel)
   ========================================================================== */
.device { margin: 0; width: min(100%, 300px); }
.device img { width: 100%; border-radius: 24px; border: 1px solid var(--border); }
.device-sm { width: min(100%, 260px); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding-block: clamp(40px, 7vw, 80px) clamp(56px, 9vw, 96px); }
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: clamp(32px, 5vw, 64px); }

.hero-visual { display: flex; justify-content: center; }
.hero-visual .device { width: min(100%, 290px); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual .device { width: min(100%, 240px); }
}

/* ==========================================================================
   Features (alternating rows)
   ========================================================================== */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(32px, 6vw, 80px);
  padding-top: clamp(40px, 6vw, 64px);
  border-top: 1px solid var(--border);
}
.feature + .feature { margin-top: clamp(40px, 6vw, 64px); }
.feature .device { justify-self: center; }
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature-copy p { color: var(--text-muted); max-width: 44ch; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 22px; margin-bottom: 6px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 10px; height: 2px; background: var(--text);
}

@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
}

/* ==========================================================================
   Screenshot gallery
   ========================================================================== */
.gallery { position: relative; }
.gallery-track {
  display: flex; gap: 20px;
  list-style: none; margin: 0;
  padding: 0 max(var(--gutter), (100% - var(--container)) / 2) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), (100% - var(--container)) / 2);
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track li { flex: 0 0 auto; scroll-snap-align: start; }

.shot {
  display: block; padding: 0; border: 1px solid var(--border); background: none; cursor: zoom-in;
  width: clamp(200px, 22vw, 250px);
  border-radius: 24px; overflow: hidden;
}

.gallery-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 1.75rem; line-height: 1; cursor: pointer;
}
.gallery-nav.prev { left: 16px; }
.gallery-nav.next { right: 16px; }
@media (hover: none), (max-width: 760px) {
  .gallery-nav { display: none; }
}

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: none; max-height: none;
}
.lightbox::backdrop { background: rgb(0 0 0 / 0.85); }
.lightbox img { max-height: 90vh; max-height: 90dvh; width: auto; border-radius: 28px; }
.lightbox-close {
  position: fixed; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgb(255 255 255 / 0.15); color: #fff; font-size: 1.75rem; cursor: pointer;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
details { border-bottom: 1px solid var(--border); }
details:first-of-type { border-top: 1px solid var(--border); }
summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-weight: 600; font-size: 1.125rem; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; font-weight: 400; color: var(--text-muted); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--text-muted); padding-bottom: 12px; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta {
  padding: clamp(40px, 7vw, 72px) clamp(24px, 6vw, 64px);
  border-radius: var(--radius);
  background: #111111;
  color: #f2f2ee;
  border: 1px solid var(--border);
}
.cta p { font-size: 1.125rem; margin-bottom: 0; color: #a3a39b; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border); padding-block: 32px; color: var(--text-muted); font-size: 0.9375rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner a { color: inherit; text-decoration: none; }
.footer-inner a:hover { color: var(--text); }

/* ==========================================================================
   Prose (privacy policy and other long-form pages)
   ========================================================================== */
.prose h1 { margin-bottom: 0.25em; }
.prose h2 { font-size: 1.5rem; margin-top: 2.5em; }
.prose h3 { font-size: 1.125rem; margin-top: 1.75em; }
.prose p, .prose li { color: var(--text-muted); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: 0.4em; }
.prose .meta { font-size: 0.9375rem; }
.toc {
  margin: 32px 0; padding: 20px 24px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius);
}
.toc ol { margin: 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
