/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Design tokens ── */
:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --bg: #ffffff;
  --surface: #f4f6fb;
  --text: #0f172a;
  --text-secondary: #475569;
  --border: #e2e8f0;
  --good: #16a34a;
  --good-bg: #dcfce7;
  --attention: #ea580c;
  --attention-bg: #ffedd5;
  --fix: #dc2626;
  --fix-bg: #fee2e2;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(15,23,42,0.08);
  --shadow-lg: 0 12px 48px rgba(15,23,42,0.14);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #3b82f6;
    --brand-dark: #2563eb;
    --bg: #0f1117;
    --surface: #1a1d27;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #2d3148;
    --good: #22c55e;
    --good-bg: #052e16;
    --attention: #f97316;
    --attention-bg: #431407;
    --fix: #ef4444;
    --fix-bg: #450a0a;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.5);
  }
}

body { background: var(--bg); color: var(--text); }

/* ── Utilities ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ── CTA button ── */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
  min-width: 180px;
}
.btn-appstore:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-appstore svg { flex-shrink: 0; }
.btn-appstore-label { display: flex; flex-direction: column; line-height: 1.2; text-align: right; margin-left: auto; }
.btn-appstore-label span:first-child { font-size: 0.65rem; font-weight: 400; opacity: 0.75; }
.btn-appstore-label span:last-child { font-size: 1rem; font-weight: 700; }
nav .btn-appstore { min-width: auto; }
nav .btn-appstore-label { display: block; font-size: 0.9rem; font-weight: 700; line-height: 1; }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
}
.nav-logo svg { color: var(--brand); }
.nav-logo-icon { border-radius: 6px; }

/* ── Hero ── */
.hero {
  padding: 80px 0 96px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-block;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.hero-tagline {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}
.hero-sub {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: 36px;
  max-width: 48ch;
}
.hero-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-icon {
  height: 60vh;
  width: auto;
  border-radius: 32px;
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-icon { animation: none; }
}
@media (max-width: 767px) {
  .hero { padding: 48px 0 64px; }
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  .hero-img-wrap { order: -1; }
  .hero-sub { margin-left: auto; margin-right: auto; }
}

/* ── Section shared ── */
section { padding: 80px 0; }
.section-heading {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.section-sub {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 52ch;
}
.section-header { margin-bottom: 48px; }

/* ── Features slider ── */
.features { background: var(--surface); overflow: hidden; }
.features-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 24px 8px;
}
.features-track::-webkit-scrollbar { display: none; }
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 28px 32px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
  width: min(320px, 82vw);
  scroll-snap-align: start;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--brand);
}
.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ── How it works ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  position: relative;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.step p { color: var(--text-secondary); font-size: 0.9375rem; }

/* ── Split-logo scroll animation ── */
.how { padding-top: 0; }
.split-logo {
  display: flex;
  width: 100%;
  height: 400px;
  overflow: hidden;
  margin-bottom: 48px;
}
.split-logo-half {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.split-logo-left {
  background: #ffffff;
  justify-content: flex-end;
}
.split-logo-right {
  background: #045f76;
  justify-content: flex-start;
}
.split-logo-svg {
  width: 200px;
  height: 200px;
  will-change: transform;
}
.split-logo-svg--left {
  transform: translateY(120%);
}
.split-logo-svg--right {
  transform: translateY(-120%);
}
.split-logo-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}
.split-logo-text {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.split-logo-left .split-logo-text {
  color: #045f76;
  margin-right: 40px;
}
.split-logo-right .split-logo-text {
  color: #ffffff;
  margin-left: 40px;
}
.split-logo-svg--left {
  margin-right: -100px;
}
.split-logo-svg--left svg {
  clip-path: inset(0 49.8% 0 0);
}
.split-logo-svg--right {
  margin-left: -100px;
}
.split-logo-svg--right svg {
  clip-path: inset(0 0 0 49.8%);
}
@media (prefers-reduced-motion: reduce) {
  .split-logo-svg--left,
  .split-logo-svg--right { transform: translateY(0) !important; }
}
@media (max-width: 767px) {
  .split-logo { height: 280px; margin-bottom: 32px; }
  .split-logo-svg { width: 140px; height: 140px; }
  .split-logo-svg--left { margin-right: -70px; }
  .split-logo-svg--right { margin-left: -70px; }
  .split-logo-left .split-logo-text { margin-right: 20px; }
  .split-logo-right .split-logo-text { margin-left: 20px; }
}

/* ── Condition ratings callout ── */
.ratings-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ratings-band .section-header { margin-bottom: 36px; }
.ratings-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.rating-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9375rem;
  flex: 1;
  min-width: 200px;
}
.rating-badge.good    { background: var(--good-bg);       color: var(--good); }
.rating-badge.attn    { background: var(--attention-bg);  color: var(--attention); }
.rating-badge.fix     { background: var(--fix-bg);        color: var(--fix); }
.rating-badge-desc {
  font-weight: 400;
  font-size: 0.8125rem;
  opacity: 0.8;
  margin-top: 2px;
  display: block;
}

/* ── Download CTA ── */
.cta { text-align: center; }
.cta .section-heading { margin-bottom: 8px; }
.cta .section-sub { margin: 0 auto 36px; }
.cta-action {
  display: inline-flex;
  align-items: center;
  gap: 40px;
}
.cta-logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}
.cta-logo {
  border-radius: 18px;
}
.cta-logo-label {
  margin-top: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}
.cta-meta {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  letter-spacing: 0.03em;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
}
.footer-logo svg { color: var(--brand); }
.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  width: 100%;
}
.footer-lang {
  display: flex;
  gap: 12px;
  list-style: none;
}
.footer-lang a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}
.footer-lang a:hover { color: var(--text); }
.footer-lang a[aria-current="true"] {
  color: var(--text);
  font-weight: 600;
}
@media (max-width: 600px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ── Screenshots slider ── */
.screenshots { overflow: hidden; padding: 96px 0; }
.screenshots .section-header { margin-bottom: 40px; }
.slider-track {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 16px 24px 16px;
}
.slider-track::-webkit-scrollbar { display: none; }
.slider-track img {
  scroll-snap-align: center;
  flex-shrink: 0;
  height: 560px;
  width: auto;
  border-radius: 20px;
  margin: 10px 18px;
  box-shadow: var(--shadow);
}
.screenshot-item {
  scroll-snap-align: center;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 10px 18px;
}
.screenshot-item img {
  scroll-snap-align: none;
  margin: 0;
}
.screenshot-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.screenshot-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}
.screenshot-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.slider-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.slider-dots button.active {
  background: var(--brand);
  transform: scale(1.3);
}
@media (max-width: 767px) {
  .slider-track img { height: 420px; }
}

/* ── Prose content (legal pages) ── */
.prose {
  max-width: 72ch;
  margin: 0 auto;
  padding: 64px 24px;
}
.prose h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: 32px; }
.prose h2 { font-size: 1.25rem; font-weight: 600; margin: 40px 0 12px; }
.prose p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 16px; }
.prose li { color: var(--text-secondary); line-height: 1.75; margin-bottom: 8px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; font-size: 0.9375rem; }
.prose th { font-weight: 600; }
.prose a { color: var(--brand); text-decoration: underline; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.prose strong { font-weight: 600; color: var(--text); }

/* ── 404 ── */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px;
  gap: 16px;
}
.not-found-code {
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
  opacity: 0.15;
  letter-spacing: -0.05em;
}
.not-found-heading {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-top: -8px;
}
.not-found-sub {
  color: var(--text-secondary);
  max-width: 400px;
}
.not-found-btn {
  margin-top: 8px;
  text-decoration: none;
}
