/* ==========================================================================
   SubGuard website - style.css
   --------------------------------------------------------------------------
   CONTENTS
    1. Design tokens (light / dark)
    2. Base & layout helpers
    3. Background orbs & progress bar
    4. Navigation
    5. Buttons & pills
    6. Phone frame
    7. Hero
    8. Sections, stats, cards, icons
    9. App tour, swatches, steps, install, CTA band
   10. FAQ, blog posts, documents (legal / articles)
   11. Help centre, how-to steps, screenshots, timeline
   12. Footer
   13. Floating UI (back-to-top, sticky download bar, modal)
   14. Reveal animation & reduced motion
   15. Responsive (tablet <= 900px, phone <= 560px)
   ========================================================================== */


/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
  --bg: #F1F6FA;
  --surface: #FFFFFF;
  --surface-2: #F4F8FC;
  --text: #0F172A;
  --muted: #475569;
  --line: #E2E8F0;
  --accent: #2563EB;
  --accent-2: #06B6D4;
  --accent-ink: #0B2A55;
  --glow-a: rgba(37, 99, 235, 0.16);
  --glow-b: rgba(20, 184, 166, 0.14);
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.16);
  --radius: 22px;
}

/* dark theme: chosen with the toggle button */
:root[data-theme="dark"] {
  --bg: #0B132B;
  --surface: #16203A;
  --surface-2: #1B2540;
  --text: #F8FAFC;
  --muted: #CBD5E1;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #38BDF8;
  --accent-2: #14B8A6;
  --accent-ink: #082F49;
  --glow-a: rgba(56, 189, 248, 0.20);
  --glow-b: rgba(20, 184, 166, 0.16);
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
}

/* dark theme: follows the phone/PC setting until the user picks one */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B132B;
    --surface: #16203A;
    --surface-2: #1B2540;
    --text: #F8FAFC;
    --muted: #CBD5E1;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #38BDF8;
    --accent-2: #14B8A6;
    --accent-ink: #082F49;
    --glow-a: rgba(56, 189, 248, 0.20);
    --glow-b: rgba(20, 184, 166, 0.16);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.55);
  }
}


/* ==========================================================================
   2. Base & layout helpers
   ========================================================================== */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: Inter, Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.07; margin: 20px 0; letter-spacing: -.035em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); letter-spacing: -.025em; margin: 6px 0 10px; line-height: 1.15; }

.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }
.sub { color: var(--muted); max-width: 620px; margin: 0 0 34px; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 540px; }
.meta { color: var(--muted); font-size: .9rem; }

section { padding: 64px 0; }
/* the browser skips painting sections that are far off-screen (big scroll speed-up) */
section:not(.hero):not(.stats) { content-visibility: auto; contain-intrinsic-size: auto 640px; }


/* ==========================================================================
   3. Background orbs & progress bar
   ========================================================================== */
.orbs {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(520px 520px at 100% 0%, var(--glow-a), transparent 70%),
    radial-gradient(460px 460px at 0% 100%, var(--glow-b), transparent 70%),
    radial-gradient(300px 300px at 45% 40%, color-mix(in srgb, var(--glow-a) 50%, transparent), transparent 70%);
  transform: translateZ(0);
}
.orbs i { display: none; }

.progress {
  position: fixed; left: 0; top: 0; z-index: 50;
  height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform;
}


/* ==========================================================================
   4. Navigation
   ========================================================================== */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.nav.scrolled { border-color: var(--line); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.22rem; color: var(--text); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 6px 16px rgba(2, 8, 23, 0.25); }
.brand b { color: var(--accent); }

.links { display: flex; align-items: center; gap: 26px; }
.links a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.links a:hover { color: var(--text); text-decoration: none; }

.nav-actions { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  cursor: pointer; font-size: 1.05rem;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.icon-btn:hover { transform: scale(1.06); }
.burger { display: none; }


/* ==========================================================================
   5. Buttons & pills
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px;
  font-weight: 700; color: #fff !important;
  background: linear-gradient(135deg, var(--accent-ink), var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform .18s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--text) !important; border: 1px solid var(--line); box-shadow: var(--shadow); }
.btn.sm { padding: 9px 20px; font-size: .92rem; }
.btn svg { width: 20px; height: 20px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 15px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.pill:before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 25%, transparent);
}


/* ==========================================================================
   6. Phone frame (used by hero, tour, steps and screenshots)
   ========================================================================== */
.phone {
  position: relative;
  border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #1E293B, #0B1226);
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 255, 255, 0.10);
}
.phone img { width: 100%; height: auto; border-radius: 31px; background: #fff; }


/* ==========================================================================
   7. Hero
   ========================================================================== */
.hero { padding: 70px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }

h1 em {
  display: inline-block;
  padding-bottom: .16em;          /* room for g, y, p descenders (gradient text is clipped to its box) */
  margin-bottom: -.16em;          /* keeps the line spacing unchanged */
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.rot { display: inline-block; min-width: 1ch; transition: opacity .3s, transform .3s; }
.rot.out { opacity: 0; transform: translateY(10px); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 22px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.trust span:before { content: "\2713"; color: var(--accent-2); font-weight: 800; margin-right: 6px; }

/* two overlapping phones */
.stage { position: relative; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 1 / 1.22; perspective: 1200px; }
.stage .phone { position: absolute; transition: transform .25s ease-out; will-change: transform; }
.stage .p1 { right: 0; top: 0; width: 58%; z-index: 2; }
.stage .p2 { left: 0; top: 11%; width: 50%; z-index: 1; }

.chip-float {
  position: absolute; z-index: 3;
  padding: 10px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: .82rem; font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: bob 5s ease-in-out infinite;
  will-change: transform;
}
.chip-float small { display: block; color: var(--muted); font-weight: 500; }
.chip-float.c1 { right: -2%; top: 8%; }
.chip-float.c2 { left: 2%; bottom: 8%; animation-delay: -2.5s; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}


/* ==========================================================================
   8. Sections, stats, cards, icons
   ========================================================================== */
.stats { padding: 20px 0 0; }
.stats .box {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 26px; border-radius: 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stats b {
  display: block; font-size: 2.3rem; line-height: 1.1;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { color: var(--muted); font-size: .92rem; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.card {
  --mx: 50%; --my: 50%;                      /* cursor spotlight position (set by JS) */
  position: relative; overflow: hidden;
  padding: 24px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.card:before {                               /* soft corner glow */
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-a), transparent 70%);
}
.card:after {                                /* cursor spotlight */
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  transition: opacity .25s;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.card:hover { transform: translateY(-4px); }
.card:hover:after { opacity: 1; }
.card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.ico {
  width: 48px; height: 48px; margin-bottom: 14px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--accent-ink), var(--accent));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.ico svg { width: 24px; height: 24px; }


/* ==========================================================================
   9. App tour, swatches, steps, install, CTA band
   ========================================================================== */
/* app tour */
.tour { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.tabs { display: flex; flex-direction: column; gap: 12px; }
.tab {
  text-align: left; cursor: pointer; font: inherit; color: var(--text);
  padding: 16px 18px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .15s, border-color .2s, box-shadow .2s;
}
.tab strong { display: block; }
.tab span { color: var(--muted); font-size: .92rem; }
.tab:hover { transform: translateX(4px); }
.tab.active { border-color: var(--accent); box-shadow: 0 10px 26px color-mix(in srgb, var(--accent) 22%, transparent); }
.tour-stage { display: flex; justify-content: center; }
.tour-stage .phone { width: min(290px, 80vw); }
.tour-stage img { transition: opacity .25s; }

/* colour swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 22px 0 8px; }
.sw {
  width: 44px; height: 44px; border-radius: 14px; cursor: pointer;
  border: 3px solid var(--surface); box-shadow: var(--shadow);
  transition: transform .15s;
}
.sw:hover { transform: scale(1.12); }
.sw.on { outline: 3px solid var(--accent); outline-offset: 2px; }

/* onboarding steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { text-align: center; }
.step .phone { width: 190px; margin: 0 auto 18px; padding: 7px; border-radius: 30px; }
.step .phone img { border-radius: 23px; }
.step h3 { margin: 0 0 4px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: .92rem; }

/* install section */
.install { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: i; }
.install .card { padding-top: 30px; }
.install .card h3:before {
  counter-increment: i; content: counter(i);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-right: 10px; border-radius: 50%;
  color: #fff; font-size: .9rem;
  background: linear-gradient(135deg, var(--accent-ink), var(--accent));
}
.apk-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; margin-top: 20px; color: var(--muted); font-size: .9rem; font-weight: 600; }

/* big call-to-action band */
.band {
  position: relative; overflow: hidden;
  padding: 52px 28px; border-radius: 32px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--accent-ink), var(--accent) 60%, var(--accent-2));
  border: 1px solid rgba(255, 255, 255, .25);
  box-shadow: 0 26px 56px color-mix(in srgb, var(--accent) 35%, transparent);
}
.band:after {
  content: ""; position: absolute; right: -60px; top: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .35), transparent 70%);
}
.band h2, .band p { position: relative; z-index: 1; color: #fff; }
.band p { opacity: .92; max-width: 560px; margin: 0 auto 24px; }
.band .btn { position: relative; z-index: 1; background: #fff; color: #0B2A55 !important; border: 0; }


/* ==========================================================================
   10. FAQ, blog posts, documents (legal pages and articles)
   ========================================================================== */
details {
  margin-bottom: 12px; padding: 16px 20px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin: 10px 0 0; }

.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post { display: block; color: var(--text); }
.post:hover { text-decoration: none; }
.post .k { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.page { padding: 52px 0 76px; }
.doc { max-width: 800px; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.doc h2 { font-size: 1.35rem; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--muted); }
.doc ul { padding-left: 20px; }

.box {
  margin: 20px 0; padding: 14px 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
}
.warn { border-left-color: #EF4444; }

table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: .92rem; }
th { background: var(--surface-2); }


/* ==========================================================================
   11. Help centre, how-to steps, screenshots, timeline
   ========================================================================== */
.search { position: relative; max-width: 580px; margin: 0 auto 38px; }
.search input {
  width: 100%; padding: 16px 22px 16px 50px; border-radius: 999px; outline: none;
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.search svg { position: absolute; left: 18px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--muted); }

.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1.05rem; }
.cat .ico { width: 38px; height: 38px; margin: 0; border-radius: 12px; }
.cat .ico svg { width: 20px; height: 20px; }
.cat a.art { position: relative; z-index: 1; display: block; padding: 9px 0; border-top: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .94rem; }
.cat a.art:hover { color: var(--accent); text-decoration: none; }
.cat a.art small { display: block; color: var(--muted); font-weight: 400; font-size: .82rem; }
.no-results { display: none; padding: 30px 0; text-align: center; color: var(--muted); }

.crumbs { margin-bottom: 6px; color: var(--muted); font-size: .9rem; }

/* numbered how-to list */
ol.how { counter-reset: h; list-style: none; padding: 0; margin: 20px 0; }
ol.how li { counter-increment: h; position: relative; padding: 2px 0 2px 52px; margin-bottom: 18px; color: var(--muted); }
ol.how li b, ol.how li strong { color: var(--text); }
ol.how li:before {
  content: counter(h); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-ink), var(--accent));
  box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* screenshot row inside articles */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 26px 0; }
.shots figure { margin: 0; text-align: center; }
.shots .phone { width: min(210px, 100%); margin: 0 auto 12px; padding: 7px; border-radius: 30px; }
.shots .phone img { border-radius: 23px; }
.shots figcaption { color: var(--muted); font-size: .9rem; }

.helpful { margin-top: 36px; padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.related { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.related a { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .88rem; }

/* release notes timeline */
.timeline { position: relative; margin: 30px 0; padding-left: 28px; border-left: 2px solid var(--line); }
.release { position: relative; margin-bottom: 34px; }
.release:before {
  content: ""; position: absolute; left: -37px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
}
.release.planned:before { background: var(--surface); border-color: var(--accent); }
.release .ver { display: inline-block; padding: 3px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; color: #fff; background: linear-gradient(135deg, var(--accent-ink), var(--accent)); }
.release h3 { margin: 8px 0 4px; font-size: 1.25rem; }


/* ==========================================================================
   12. Footer
   ========================================================================== */
footer { margin-top: 30px; padding: 38px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }


/* ==========================================================================
   13. Floating UI: back-to-top, sticky download bar, install modal
   ========================================================================== */
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 30; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 35; display: none; transform: translateY(120%); transition: transform .3s; }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; }

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(2, 8, 23, .6); backdrop-filter: blur(6px);
}
.modal.open { display: flex; }
.modal .sheet {
  width: min(460px, 100%); padding: 28px; border-radius: 28px; text-align: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); animation: pop .25s ease-out;
}
.modal img { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 20px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 6px; font-size: 1.3rem; }
.modal ol { margin: 14px 0 20px; padding-left: 20px; text-align: left; color: var(--muted); font-size: .94rem; }
.modal .btn { width: 100%; }

@keyframes pop {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}


/* ==========================================================================
   14. Reveal animation & reduced motion
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; will-change: auto; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* touch screens have no hover: remove those effects completely */
@media (hover: none) {
  .card:hover { transform: none; }
  .card:after { display: none; }
  .btn:hover, .tab:hover, .sw:hover, .icon-btn:hover { transform: none; }
}

/* ==========================================================================
   15. Responsive
   ========================================================================== */
/* ---- tablet and phone: up to 900px ---- */
@media (max-width: 900px) {
  /* layout */
  .hero .wrap, .tour { grid-template-columns: 1fr; }
  .grid, .posts, .steps, .cats { grid-template-columns: 1fr 1fr; }
  .stats .box { grid-template-columns: 1fr 1fr; }
  .install { grid-template-columns: 1fr; }
  .stage { max-width: 420px; }

  /* phones: no blur filters (they are the heaviest effect on mobile GPUs) */
  .nav { backdrop-filter: none; background: var(--bg); }
  .modal { backdrop-filter: none; }

  /* menu: hamburger, and no Download button inside it */
  .links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 14px;
    padding: 18px 22px; background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .links.open { display: flex; }
  .links .btn { display: none; }
  .burger { display: inline-block; }

  /* sticky download bar + back-to-top position */
  .sticky-cta { display: block; }
  .to-top { bottom: 78px; }

  /* footer: stacked, links in two tidy columns, space for the sticky bar */
  footer { padding: 32px 0 110px; }
  footer .wrap { flex-direction: column; align-items: flex-start; gap: 22px; }
  footer nav { display: block; column-count: 2; column-gap: 24px; width: 100%; }
  footer nav a { display: block; break-inside: avoid; margin-bottom: 12px; font-weight: 600; }
  footer > .wrap > span { width: 100%; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; }
}

/* ---- small phones: up to 560px ---- */
@media (max-width: 560px) {
  .grid, .posts, .steps, .cats, .shots { grid-template-columns: 1fr; }
  .chip-float { display: none; }
}