/* ==========================================================================
   SpendRight — landing styles
   White primary · #2563EB accent · light + dark mode
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand */
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-tint: #eff6ff;
  --accent-glow: rgba(37, 99, 235, 0.28);

  /* Surfaces (light) */
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-inset: #eef1f7;
  --card: #ffffff;
  --card-alt: #fafbfe;

  /* Text (light) */
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;

  /* Lines */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);

  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;

  --maxw: 1160px;
  --nav-h: 68px;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --accent: #3b82f6;
  --accent-strong: #60a5fa;
  --accent-ink: #ffffff;
  --accent-tint: rgba(59, 130, 246, 0.14);
  --accent-glow: rgba(59, 130, 246, 0.22);

  --bg: #06080f;
  --bg-soft: #0c1019;
  --bg-inset: #121826;
  --card: #0f1420;
  --card-alt: #131a28;

  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;

  --border: #1e293b;
  --border-strong: #334155;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section { padding: clamp(44px, 6vw, 76px) 0; }
.section-soft { background: var(--bg-soft); }

.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  margin: 14px 0 0;
}
.section-head p {
  margin-top: 16px;
  font-size: 1.1rem;
  color: var(--text-soft);
}

/* ---------- buttons ---------- */
.btn {
  --pad-y: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--pad-y) 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 6px 18px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-strong); box-shadow: 0 10px 26px var(--accent-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--text-muted); background: var(--bg-inset); }

.btn-lg { --pad-y: 16px; padding-inline: 30px; font-size: 1.05rem; }

.btn-nav {
  --pad-y: 9px;
  padding-inline: 18px;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-nav:hover { box-shadow: 0 8px 20px var(--accent-glow); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex-shrink: 1;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: var(--shadow-sm); }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-menu a.link {
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.96rem;
  font-weight: 500;
  color: var(--text-soft);
}
.nav-menu a.link:hover { color: var(--text); background: var(--bg-inset); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.settings-dropdown { position: relative; flex-shrink: 0; }

.settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 188px;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  z-index: 60;
}
.settings-menu[hidden] { display: none; }

.settings-label {
  margin: 0;
  padding: 6px 10px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.settings-lang {
  margin: 0;
  padding: 0;
  list-style: none;
}

.settings-lang li {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.94rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-soft);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.settings-lang li:hover { background: var(--bg-inset); color: var(--text); }
.settings-lang li[aria-selected="true"] {
  color: var(--accent);
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.settings-divider {
  margin: 6px 0;
  border: none;
  border-top: 1px solid var(--border);
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.settings-row:hover { background: var(--bg-inset); color: var(--text); }
.settings-row svg { width: 18px; height: 18px; flex-shrink: 0; }
.settings-row .i-sun { display: none; }
.settings-row .i-moon { display: block; }
html[data-theme="dark"] .settings-row .i-sun { display: block; }
html[data-theme="dark"] .settings-row .i-moon { display: none; }

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--bg-inset); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .i-sun { display: none; }
.icon-btn .i-moon { display: block; }
html[data-theme="dark"] .icon-btn .i-sun { display: block; }
html[data-theme="dark"] .icon-btn .i-moon { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 88px) 0 0;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 620px;
  background: radial-gradient(circle, var(--accent-glow), transparent 66%);
  pointer-events: none;
  z-index: 0;
}
.hero .wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}
.hero-badge b {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 999px;
}
.hero-copy {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.35rem, 5.2vw, 3.85rem);
  margin: 22px 0 0;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.hero h1 .hl {
  position: relative;
  white-space: nowrap;
  color: var(--text);
}
.hero h1 .hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.08em;
  height: 0.34em;
  background: color-mix(in srgb, var(--accent) 55%, #93c5fd);
  z-index: -1;
  border-radius: 3px;
}
html[data-theme="dark"] .hero h1 .hl::after {
  background: color-mix(in srgb, var(--accent) 45%, transparent);
}
.hero-sub {
  margin-top: 20px;
  font-size: 1.14rem;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 54ch;
}
.hero-cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.store-badges {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.store-badges img { height: 46px; width: auto; }

/* ---------- download modal ---------- */
body.modal-open { overflow: hidden; }
.download-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
}
.download-modal[hidden] { display: none; }
.download-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}
.download-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  padding: 32px 28px 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.download-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}
.download-modal-panel h2 {
  font-size: 1.35rem;
  margin: 0;
}
.download-modal-panel p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}
.download-modal-qr {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.download-modal-qr canvas,
.download-modal-qr img {
  display: block;
  width: 200px;
  height: 200px;
}

.hero-note {
  margin-top: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.hero-note svg { width: 16px; height: 16px; color: var(--accent); }

.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  margin: clamp(40px, 6vw, 64px) 0 0;
  padding: 0;
}
.hero-media::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  background: radial-gradient(ellipse at center, var(--accent-glow), transparent 70%);
  filter: blur(6px);
  z-index: 0;
}
.hero-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: min(700px, 100%);
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
}

/* ---------- features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  padding: 30px 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}
.feature .chip {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-tint);
  color: var(--accent);
  margin-bottom: 18px;
}
.feature .chip svg { width: 25px; height: 25px; }
.feature h3 { font-size: 1.22rem; margin-bottom: 8px; }
.feature p { color: var(--text-soft); font-size: 1rem; }

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius);
  background: var(--card-alt);
  border: 1px solid var(--border);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.18rem; margin-bottom: 8px; }
.step p { color: var(--text-soft); }

/* ---------- showcase (screenshots) ---------- */
.showcase { background: var(--bg-soft); overflow: hidden; }
.shots {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 22px 26px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: fit-content;
  margin-inline: auto;
}
.shots::-webkit-scrollbar { height: 8px; }
.shots::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.shots img {
  flex: 0 0 auto;
  width: 230px;
  border-radius: 22px;
  scroll-snap-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  background: var(--card);
}

/* ---------- privacy split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.privacy-panel {
  position: relative;
  padding: clamp(34px, 4vw, 52px);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, #60a5fa, #2563eb 55%, #1d4ed8);
  color: #ffffff;
  overflow: hidden;
}
.privacy-panel .big {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(3.4rem, 8vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.privacy-panel .cap {
  margin-top: 12px;
  font-size: 1.15rem;
  font-weight: 600;
  max-width: 22ch;
  opacity: 0.95;
}
.privacy-panel .ring {
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border: 22px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-soft); }
.check-list .tick {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.check-list .tick svg { width: 13px; height: 13px; }
.check-list b { color: var(--text); font-weight: 600; }

/* ---------- faq ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.qa {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  margin-bottom: 12px;
  overflow: hidden;
}
.qa summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--text);
}
.qa summary::-webkit-details-marker { display: none; }
.qa .plus {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  display: grid; place-items: center;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.qa[open] .plus { transform: rotate(45deg); background: var(--accent); color: var(--accent-ink); }
.qa .plus svg { width: 16px; height: 16px; }
.qa .answer {
  padding: 0 22px 22px;
  color: var(--text-soft);
  max-width: 68ch;
}

/* ---------- final cta ---------- */
.final {
  text-align: center;
  padding: clamp(44px, 6vw, 76px) 0;
}
.final-card {
  position: relative;
  overflow: hidden;
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(40px, 6vw, 68px) 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.final-card::before {
  content: "";
  position: absolute;
  top: -120px; left: 50%;
  transform: translateX(-50%);
  width: 420px; height: 320px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.final-card h2 {
  position: relative;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
}
.final-card p {
  position: relative;
  margin: 16px auto 0;
  max-width: 46ch;
  color: var(--text-soft);
  font-size: 1.12rem;
}
.final-card .store-badges { justify-content: center; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 40px 0;
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.footer .brand { font-size: 1.05rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer nav a { color: var(--text-muted); font-size: 0.94rem; }
.footer nav a:hover { color: var(--text); }
.footer .copy { color: var(--text-muted); font-size: 0.88rem; width: 100%; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .hero-media img { max-width: 100%; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .nav-menu { display: none; }
  .nav-actions { gap: 8px; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .icon-btn { width: 38px; height: 38px; }
  .btn-nav {
    --pad-y: 8px;
    padding-inline: 14px;
    font-size: 0.86rem;
  }
  .feature-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
}
