/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:         hsl(210, 50%, 98%);
  --fg:         hsl(215, 88%, 15%);
  --primary:    hsl(215, 88%, 39%);
  --primary-fg: hsl(210, 50%, 98%);
  --muted:      hsl(210, 20%, 90%);
  --muted-fg:   hsl(215, 20%, 33%);
  --border:     hsl(210, 20%, 86%);
  --card:       #ffffff;
  --max-w:      72rem;
  --max-w-sm:   48rem;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; width: 100%; overflow-x: hidden; }

body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  width: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
address { font-style: normal; }
.privacy-body a:not([class]),
.accordion-body a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }

/* ── Focus ring ─────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Screen-reader utility ──────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  z-index: 200;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}
.skip-link:focus { left: 1rem; }

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(210, 50%, 98%, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo svg { border-radius: 0.75rem; }

.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-name {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--primary);
}
.nav-logo-by { font-size: 0.625rem; color: var(--muted-fg); font-family: 'Oxanium', sans-serif; letter-spacing: -0.04em; }

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-links a, .nav-links button {
  color: var(--muted-fg);
  transition: color 0.15s;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.nav-links a:hover, .nav-links button:hover { color: var(--primary); }

.nav-right { display: flex; align-items: center; gap: 0.75rem; }

/* Download button (shown when hero CTA scrolls out) */
.nav-download {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: background 0.15s, opacity 0.2s, transform 0.2s;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}
.nav-download.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.nav-download:hover { background: hsl(215, 88%, 34%); }

/* Mobile compact download */
.nav-download-mobile {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.375rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  transition: background 0.15s, opacity 0.2s, transform 0.2s;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}
.nav-download-mobile.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.nav-download-mobile:hover { background: hsl(215, 88%, 34%); }
@media (min-width: 768px) { .nav-download-mobile { display: none; } }
@media (min-width: 768px) { .nav-download { display: flex; } }

/* Hamburger */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: var(--muted-fg);
  transition: color 0.15s, background 0.15s;
}
.hamburger:hover { color: var(--fg); background: var(--muted); }
@media (min-width: 768px) { .hamburger { display: none; } }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 0.5rem 1.5rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }

.mobile-menu a, .mobile-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-fg);
  border-radius: 0.5rem;
  transition: color 0.15s, background 0.15s;
  text-align: left;
}
.mobile-menu a:hover, .mobile-menu button:hover {
  color: var(--primary);
  background: var(--muted);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 6rem 1.5rem 8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 800px;
  background: hsl(215, 88%, 39%, 0.05);
  border-radius: 50%;
  filter: blur(64px);
  z-index: -1;
  pointer-events: none;
}
.hero-inner { max-width: 52rem; margin: 0 auto; }

.hero-icon {
  width: 6rem; height: 6rem;
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px hsl(0, 0%, 0%, 0.25);
  margin: 0 auto 2rem;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--muted-fg);
  font-weight: 300;
  max-width: 38rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0 2rem;
  height: 3.5rem;
  border-radius: 9999px;
  font-size: 1.125rem;
  font-weight: 600;
  box-shadow: 0 10px 30px hsl(215, 88%, 39%, 0.2);
  transition: background 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  background: hsl(215, 88%, 34%);
  box-shadow: 0 10px 30px hsl(215, 88%, 39%, 0.35);
}

.btn-ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  transition: color 0.15s;
}
.btn-ghost-link:hover { color: var(--primary); }

.btn-help {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  color: var(--fg);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-help:hover { background: hsl(210, 50%, 94%); }

.btn-community {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid hsl(210, 50%, 98%, 0.4);
  color: var(--primary-fg);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-community:hover { background: hsl(210, 50%, 98%, 0.1); }

.btn-reddit-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-reddit-primary:hover { background: hsl(215, 88%, 34%); }

/* ── Section shared ────────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 2rem; }
.section-header h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.section-header p { color: var(--muted-fg); font-size: 1.125rem; max-width: 40rem; margin: 0 auto; }

/* ── Features ──────────────────────────────────────────────── */
.features-section {
  padding: 6rem 1.5rem;
  background: hsl(210, 20%, 90%, 0.3);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: var(--max-w);
  margin-inline: auto;
  margin-block-start: 2.5rem;
}
@media (min-width: 640px)  { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 4px hsl(0, 0%, 0%, 0.05);
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 1rem;
  align-items: start;
}

.feature-icon-wrap {
  width: 3rem; height: 3rem;
  background: hsl(215, 88%, 39%, 0.1);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  align-self: center;
}
.feature-icon-wrap svg { width: 1.5rem; height: 1.5rem; stroke: var(--primary); }

.feature-card h3 { font-weight: 600; font-size: 1.125rem; margin: 0; align-self: center; }
.feature-card p  { color: var(--muted-fg); font-size: 0.875rem; line-height: 1.6; grid-column: 1 / -1; margin-top: 1rem; text-align: justify; hyphens: auto; }

/* ── Screenshots ───────────────────────────────────────────── */
.screenshots-section { padding: 8rem 0; overflow: hidden; }

.screenshots-gallery {
  width: 100%;
  overflow-x: auto;
  padding: 1rem 1.5rem 2rem;
  display: flex;
  gap: 2.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.screenshots-gallery::-webkit-scrollbar { display: none; }
.screenshots-gallery { scrollbar-width: none; }

.screenshot-item { scroll-snap-align: center; flex-shrink: 0; }

/* Phone frame */
.phone-frame {
  position: relative;
  width: 260px;
  border-radius: 3.25rem;
  background: #0e0e0e;
  box-shadow: 0 25px 50px -12px hsl(0, 0%, 0%, 0.5);
  overflow: hidden;
  padding: 10px;
}
.phone-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3.25rem;
  box-shadow:
    inset 1px 1px 0 rgba(255,255,255,0.07),
    inset -1px -1px 0 rgba(0,0,0,0.3);
  pointer-events: none;
  z-index: 2;
}
.phone-screen {
  border-radius: 2.625rem;
  overflow: hidden;
  background: #111;
}
.phone-screen img { display: block; width: 100%; height: auto; }

/* ── Help teaser ───────────────────────────────────────────── */
.help-teaser-inner { max-width: 40rem; margin: 0 auto; }
.help-teaser {
  padding: 6rem 1.5rem;
  background: var(--primary);
  color: var(--primary-fg);
  text-align: center;
}
.help-teaser h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.help-teaser .sub { color: hsl(210, 50%, 98%, 0.8); font-size: 1.125rem; margin-bottom: 2rem; }

.help-teaser-divider {
  margin-top: 3.5rem;
  border-top: 1px solid hsl(210, 50%, 98%, 0.2);
  padding-top: 3rem;
}
.help-teaser-divider p:first-child {
  font-size: 1.25rem;
  font-weight: 600;
  color: hsl(210, 50%, 98%, 0.9);
  margin-bottom: 0.5rem;
}
.help-teaser-divider p:nth-child(2) {
  color: hsl(210, 50%, 98%, 0.7);
  font-size: 1rem;
  margin-bottom: 1.75rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-inner a { color: var(--muted-fg); transition: color 0.15s; }
.footer-inner a:hover { color: var(--fg); }
.footer-support { color: var(--primary) !important; }
.footer-support:hover { opacity: 0.8; }

.footer-sm {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
}
.footer-sm-inner {
  max-width: var(--max-w-sm);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
}
@media (min-width: 768px) {
  .footer-sm-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}
.footer-sm-inner a { color: var(--muted-fg); transition: color 0.15s; }
.footer-sm-inner a:hover { color: var(--fg); }
.footer-sm-inner .footer-support { color: var(--primary) !important; }
.footer-sm-inner .footer-support:hover { opacity: 0.8; }
.footer-sm--top-gap { margin-top: 2rem; }
.footer-sm-inner--centered { justify-content: center; }
@media (min-width: 768px) { .footer-sm-inner--centered { justify-content: center; } }

/* ── Scroll-to-top ─────────────────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px hsl(0, 0%, 0%, 0.15);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.2s, transform 0.2s, background 0.15s;
  pointer-events: none;
}
#scroll-top.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
#scroll-top:hover { background: hsl(215, 88%, 34%); }
#scroll-top svg { width: 1.25rem; height: 1.25rem; stroke: currentColor; }

/* ── Help page – page-nav ──────────────────────────────────── */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(210, 50%, 98%, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.page-nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.page-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.page-nav-logo:hover { opacity: 0.8; }
.page-nav-logo svg { border-radius: 0.75rem; }
.page-nav-back {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  transition: color 0.15s;
}
.page-nav-back:hover { color: var(--fg); }
.page-nav-back svg { width: 1rem; height: 1rem; stroke: currentColor; }

/* ── Help page – accordion ─────────────────────────────────── */
.help-main {
  width: 100%;
  max-width: var(--max-w-sm);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.help-main h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.help-main .help-intro { color: var(--muted-fg); font-size: 0.875rem; margin-bottom: 3rem; }

.accordion { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }

details.accordion-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.15s;
}
details.accordion-item[open] { border-color: hsl(215, 88%, 39%, 0.35); }

details.accordion-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  color: var(--fg);
  transition: color 0.15s;
  gap: 1rem;
}
details.accordion-item summary::-webkit-details-marker { display: none; }
details.accordion-item summary:hover { color: var(--primary); }

details.accordion-item summary::after {
  content: '';
  flex-shrink: 0;
  display: block;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted-fg);
  transition: transform 0.2s;
}
details.accordion-item[open] summary::after { transform: rotate(180deg); }

.accordion-body {
  padding: 0 1.25rem 1.5rem;
  color: var(--muted-fg);
  font-size: 1rem;
  line-height: 1.7;
}

/* ── Gesture animations ────────────────────────────────────── */
.gesture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.5rem;
  row-gap: 2.5rem;
  margin-top: 2rem;
}
@media (min-width: 640px) { .gesture-grid { grid-template-columns: repeat(4, 1fr); } }

.gesture-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.gesture-phone {
  position: relative;
  width: 100px;
  height: 178px;
  flex-shrink: 0;
}
.gesture-phone-border {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 2px solid hsl(215, 88%, 15%, 0.18);
  pointer-events: none;
}
.gesture-home-bar {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 9999px;
  background: hsl(215, 88%, 15%, 0.13);
  pointer-events: none;
}
.gesture-dot {
  position: absolute;
  border-radius: 50%;
  background: var(--primary);
  will-change: transform, opacity;
}
.gesture-ring {
  position: absolute;
  border-radius: 50%;
  background: hsl(215, 88%, 39%, 0.28);
  will-change: transform, opacity;
}
.gesture-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-fg);
  text-align: center;
  max-width: 116px;
  line-height: 1.3;
}

/* ── Community callout ─────────────────────────────────────── */
.community-callout {
  margin-top: 6rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: hsl(210, 20%, 90%, 0.5);
  padding: 2rem;
  text-align: center;
}
.community-callout p:first-child { font-weight: 600; font-size: 1.125rem; margin-bottom: 0.25rem; }
.community-callout p:nth-child(2) { color: var(--muted-fg); font-size: 0.875rem; margin-bottom: 1.25rem; }

/* ── Privacy page ──────────────────────────────────────────── */
.privacy-main {
  max-width: var(--max-w-sm);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.privacy-main h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.privacy-intro { color: var(--muted-fg); font-size: 0.875rem; margin-bottom: 3rem; }

.privacy-body { display: flex; flex-direction: column; gap: 2.5rem; font-size: 1rem; line-height: 1.75; }
.privacy-body p { text-align: justify; hyphens: auto; }
.privacy-body h2 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.privacy-body h3 { font-size: 1rem; font-weight: 600; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.privacy-body p + p { margin-top: 1rem; }
.privacy-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin-top: 0.75rem;
  color: var(--muted-fg);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.privacy-body address {
  margin-top: 0.75rem;
  padding-left: 1rem;
  border-left: 2px solid hsl(215, 88%, 39%, 0.3);
  color: var(--muted-fg);
  line-height: 1.8;
}
.privacy-body a { color: var(--primary); }
.privacy-body a:hover { text-decoration: underline; }
.privacy-body strong { color: var(--fg); }

/* ── Icons (SVG helpers) ───────────────────────────────────── */
.icon { display: inline-block; flex-shrink: 0; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-md { width: 1.25rem; height: 1.25rem; }

/* ── Utility ───────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin-inline: auto; padding: 0 1.5rem; }
