/* Periscope — 2026 landing site
   Light & minimal, with a dark theme. Single stylesheet, no framework. */

/* ---------- Fonts (self-hosted, latin subset) ----------
   Inter / Inter Tight variable fonts, served from same origin so the page
   loads no third-party resources (no SRI gap, no Google Fonts dependency). */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url("../fonts/inter-tight-latin.woff2") format("woff2");
}

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

* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

ul { list-style: none; padding: 0; }

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

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-soft: #edf5f4;
  --surface: #ffffff;

  --text: #18323b;
  --text-body: #50646b;
  --text-muted: #7e9298;

  --border: #dce8e7;
  --border-strong: #c2d5d4;

  --primary: #277f8e;
  --primary-dark: #165461;
  --primary-soft: #e3eff1;
  --accent: #7dbbc8;

  --ok: #1f9e63;
  --ok-soft: #e6f8ef;

  --footer-bg: #17353d;

  --header-bg: rgba(255, 255, 255, .82);
  --radius-sm: 8px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(33, 64, 74, .07), 0 1px 3px rgba(33, 64, 74, .06);
  --shadow: 0 14px 34px -18px rgba(24, 50, 59, .2);
  --shadow-lg: 0 34px 76px -34px rgba(24, 50, 59, .32);

  --max: 1180px;
  --gutter: 24px;

  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Inter Tight", var(--font-body);
}

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

  --bg: #0b0f18;
  --bg-soft: #111b20;
  --surface: #17232a;

  --text: #eef1f6;
  --text-body: #adbac0;
  --text-muted: #74858d;

  --border: #25333a;
  --border-strong: #35474f;

  --primary: #62b5c3;
  --primary-dark: #8fd0da;
  --primary-soft: #17222c;
  --accent: #8fc7d4;

  --ok: #4fd99e;
  --ok-soft: rgba(39, 194, 129, .16);

  --footer-bg: #10141f;

  --header-bg: rgba(11, 15, 24, .82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow: 0 16px 36px -16px rgba(0, 0, 0, .6);
  --shadow-lg: 0 40px 80px -28px rgba(0, 0, 0, .7);
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--bg);
  transition: background-color .25s ease, color .25s ease;
}

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

h1 { font-size: 4rem; }
h2 { font-size: 2.85rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.18rem; letter-spacing: 0; }

p { text-wrap: pretty; }

strong { font-weight: 700; color: inherit; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 112px; }
.section--soft { background: var(--bg-soft); }

.section-head {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 56px;
}
.section-head p { margin-top: 14px; font-size: 1.12rem; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(56, 135, 154, .5);
}
.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -10px rgba(56, 135, 154, .55);
}
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn--lg { padding: 16px 32px; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .25s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 74px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: 0;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand h1 { font-size: 1.3rem; font-weight: 700; }

/* Theme-aware brand logo */
.brand-logo--dark { display: none; }
:root[data-theme="dark"] .brand-logo--light { display: none; }
:root[data-theme="dark"] .brand-logo--dark { display: block; }

/* Theme-aware images (swap variant in dark mode) */
.only-dark { display: none; }
:root[data-theme="dark"] .only-light { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }

.nav-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a {
  font-weight: 500;
  font-size: .98rem;
  color: var(--text-body);
  transition: color .15s ease;
}
.nav-links a:hover { color: var(--text); }

.nav-end {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--border);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: border-color .15s ease, color .15s ease;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--border);
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: 86px 104px;
  background:
    linear-gradient(180deg, rgba(39, 127, 142, .08), transparent 42%),
    var(--bg);
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: .96fr 1.04fr;
  gap: 72px;
  align-items: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 7px 15px 7px 9px;
  border-radius: 999px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--text-body);
  margin-bottom: 26px;
}
.hero-pill b {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .76rem;
  letter-spacing: 0;
  padding: 3px 9px;
  border-radius: 999px;
}
.hero h1 { margin-bottom: 22px; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary-dark), var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  font-size: 1.18rem;
  max-width: 43ch;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  font-size: .92rem;
  color: var(--text-muted);
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-meta svg { color: var(--primary); flex-shrink: 0; }

.hero-visual { position: relative; }

/* Connection card mockup */
.conn-card {
  width: min(100%, 520px);
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}
.conn-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text);
}
.conn-live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #27c281;
  box-shadow: 0 0 0 4px rgba(39, 194, 129, .16);
}
.conn-pill {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-soft);
  padding: 4px 11px;
  border-radius: 999px;
}
.conn-body { padding-block: 20px; }
.conn-node {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.conn-node-ico {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
}
.conn-node-ico--home { color: var(--accent); }
.conn-node strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .98rem;
  color: var(--text);
}
.conn-node span { font-size: .82rem; color: var(--text-muted); }
.conn-link {
  position: relative;
  height: 46px;
  margin-left: 36px;
  border-left: 2px dashed var(--border-strong);
  display: flex;
  align-items: center;
}
.conn-link span {
  margin-left: 22px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 4px 11px;
  border-radius: 999px;
}
.conn-link::before {
  content: "";
  position: absolute;
  left: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(39, 127, 142, .25);
  animation: conn-flow 2.4s ease-in-out infinite;
}
@keyframes conn-flow {
  0%   { top: -4px; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { top: 42px; opacity: 0; }
}
.conn-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: .88rem;
  color: var(--text-body);
}
.conn-foot svg { color: #27c281; flex-shrink: 0; }

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--primary-soft), var(--surface));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.feature-icon img {
  width: auto;
  height: auto;
  max-width: 38px;
  max-height: 38px;
  object-fit: contain;
}
.feature-card h4 { margin-bottom: 10px; }
.feature-card p { font-size: .98rem; }

/* ---------- Split content rows ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 84px);
  align-items: center;
}
.split + .split { margin-top: clamp(64px, 8vw, 112px); }
.split--flip .split-media { order: -1; }
.split-media img {
  width: 100%;
  border-radius: var(--radius-lg);
}
.split-copy h2 { margin-bottom: 14px; }
.split-copy > p { font-size: 1.08rem; }

/* Steps */
.steps { margin-top: 30px; display: grid; gap: 22px; }
.step { display: flex; gap: 18px; }
.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--font-head);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.step h4 { margin-bottom: 4px; }
.step p { font-size: .97rem; }

/* Checklist */
.checklist { margin-top: 26px; display: grid; gap: 20px; }
.checklist li { display: flex; gap: 15px; }
.check-mark {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  display: grid;
  place-items: center;
}
.check-mark svg { color: #fff; }
.checklist h4 { margin-bottom: 3px; font-size: 1.06rem; }
.checklist p { font-size: .96rem; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.price-card--featured {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
}
.price-tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: 0;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.price-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.price-head img { width: 48px; height: 48px; }
.price-amount {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 2.7rem;
  color: var(--text);
  line-height: 1;
  letter-spacing: 0;
}
.price-amount span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}
.price-card > p { font-size: .96rem; margin: 14px 0 22px; }
.price-features {
  display: grid;
  gap: 13px;
  margin-bottom: 28px;
}
.price-features li {
  display: flex;
  gap: 11px;
  font-size: .95rem;
  color: var(--text-body);
}
.price-features svg { color: var(--primary); flex-shrink: 0; margin-top: 4px; }
.price-card .btn { margin-top: auto; }

/* ---------- Download CTA ---------- */
.download-section {
  padding-block: 112px;
  background: linear-gradient(180deg, #17353d, #1f606a);
}
.download-panel {
  color: #fff;
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 54px;
  align-items: start;
}
.download-panel h2,
.download-panel h3 { color: #fff; }
.download-copy {
  position: sticky;
  top: 104px;
}
.download-copy p {
  margin-top: 16px;
  color: rgba(255, 255, 255, .78);
  font-size: 1.08rem;
}
.download-notes {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}
.download-notes span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .82);
  font-weight: 600;
  font-size: .94rem;
}
.download-notes span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.download-card {
  min-height: 100%;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.download-card--mobile {
  background: rgba(255, 255, 255, .16);
}
.download-card h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
}
.download-card p {
  min-height: 54px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, .76);
  font-size: .96rem;
  line-height: 1.55;
}
.cta-label {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
  margin-bottom: 12px;
}
.store-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.store-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 62px;
  padding: 0 24px;
  background: #102a30;
  color: #fff;
  border-radius: var(--radius);
  transition: transform .16s ease, background-color .16s ease;
}
.store-btn:hover { transform: translateY(-2px); background: #0a1f24; }
.store-btn svg { width: 26px; height: 26px; flex-shrink: 0; }
.store-btn-text { display: flex; flex-direction: column; line-height: 1.25; }
.store-btn-text small { font-size: .72rem; color: rgba(255, 255, 255, .62); }
.store-btn-text b { font-family: var(--font-head); font-weight: 600; font-size: 1.02rem; }

.store-badge { display: inline-flex; transition: transform .16s ease; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { height: 62px; width: auto; }
.qr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: var(--radius);
}
.qr-card img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
  flex-shrink: 0;
}
.qr-card span {
  font-size: .92rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, .85);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: rgba(255, 255, 255, .66);
  padding-block: 64px 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.footer-brand img { width: 32px; height: 32px; border-radius: 8px; }
.footer-col p { font-size: .95rem; }
.footer-col h4 {
  color: #fff;
  font-size: .82rem;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: .95rem;
  padding: 5px 0;
  color: rgba(255, 255, 255, .66);
  transition: color .15s ease;
}
.footer-col a:hover { color: #fff; }
.footer-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 48px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .86rem;
  color: rgba(255, 255, 255, .5);
}
.footer-cookie {
  color: rgba(255, 255, 255, .72);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color .15s ease;
}
.footer-cookie:hover { color: #fff; }

/* ---------- Cookie consent ---------- */
.cookie-consent[hidden],
.cookie-modal[hidden] {
  display: none !important;
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 18px;
  pointer-events: none;
}
.cookie-card {
  width: min(100%, 1120px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}
.cookie-copy h2,
.cookie-dialog h2,
.cookie-option h3 {
  letter-spacing: 0;
}
.cookie-copy h2 {
  margin-bottom: 8px;
  font-size: 1.28rem;
}
.cookie-copy p {
  max-width: 72ch;
  font-size: .96rem;
  line-height: 1.55;
}
.cookie-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-family: var(--font-head);
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
}
.cookie-actions,
.cookie-dialog-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.cookie-actions .btn,
.cookie-dialog-actions .btn {
  padding: 12px 18px;
  font-size: .92rem;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 22px;
}
.cookie-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 22, .48);
}
.cookie-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 660px);
  max-height: min(720px, calc(100vh - 44px));
  overflow: auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.cookie-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.cookie-dialog h2 {
  font-size: 1.8rem;
}
.cookie-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: var(--text);
  flex-shrink: 0;
  transition: border-color .15s ease, color .15s ease;
}
.cookie-close:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.cookie-options {
  display: grid;
  gap: 12px;
}
.cookie-option {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.cookie-option h3 {
  margin-bottom: 5px;
  font-size: 1.06rem;
}
.cookie-option p,
.cookie-note {
  font-size: .94rem;
  line-height: 1.5;
}
.cookie-lock {
  color: var(--primary);
  font-weight: 700;
  font-size: .86rem;
  white-space: nowrap;
}
.cookie-option--toggle {
  cursor: pointer;
}
.cookie-option--toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cookie-switch {
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color .18s ease;
}
.cookie-switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease;
}
.cookie-option--toggle input:checked + .cookie-switch {
  background: var(--primary);
}
.cookie-option--toggle input:checked + .cookie-switch::after {
  transform: translateX(22px);
}
.cookie-option--toggle input:focus-visible + .cookie-switch {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.cookie-note {
  margin-top: 16px;
  color: var(--text-muted);
}
.cookie-dialog-actions {
  margin-top: 24px;
}
body.has-cookie-modal {
  overflow: hidden;
}
body.has-cookie-banner .to-top {
  bottom: 168px;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px -8px rgba(56, 135, 154, .55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary-dark); }

/* ---------- Scroll reveal ---------- */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
}
.reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  h1 { font-size: 3.15rem; }
  h2 { font-size: 2.25rem; }
  .section,
  .download-section { padding-block: 84px; }

  .nav-toggle { display: block; }
  .nav-end { margin-left: auto; }
  .nav-menu {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 14px var(--gutter) 22px;
    clip-path: inset(0 0 100% 0);
    transition: clip-path .28s ease;
  }
  .nav-menu.is-open { clip-path: inset(0 0 0 0); }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-links a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 1.05rem;
  }
  .nav-menu .btn { margin-top: 16px; }

  .hero {
    padding-block: 64px 78px;
  }
  .hero .container {
    grid-template-columns: 1fr;
    gap: 46px;
  }
  .hero-lede, .hero h1 { max-width: none; }
  .hero-copy { order: 1; }
  .hero-visual { order: 2; }
  .conn-card {
    margin-inline: auto;
  }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin-inline: auto; }
  .price-card--featured { order: -1; }

  .split { grid-template-columns: 1fr; }
  .split--flip .split-media,
  .split .split-media { order: -1; }

  .download-panel {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .download-copy { position: static; }
  .download-grid { grid-template-columns: 1fr; }

  .cookie-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .cookie-actions {
    justify-content: flex-start;
  }
  body.has-cookie-banner .to-top {
    bottom: 236px;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 520px) {
  h1 { font-size: 2.45rem; }
  h2 { font-size: 1.95rem; }
  body { font-size: 16px; }
  .container { padding-inline: 18px; }
  .section,
  .download-section { padding-block: 70px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .hero-meta { gap: 12px; }
  .conn-card { padding: 18px; }
  .conn-node { align-items: flex-start; }
  .conn-link span { margin-left: 18px; }
  .download-card { padding: 22px; }
  .store-btn, .store-badge { width: 100%; }
  .store-badge img { height: 56px; }
  .qr-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .qr-card img {
    width: 104px;
    height: 104px;
  }
  .cookie-consent {
    padding: 12px;
  }
  .cookie-card,
  .cookie-dialog {
    padding: 18px;
  }
  .cookie-actions,
  .cookie-dialog-actions {
    flex-direction: column;
  }
  .cookie-actions .btn,
  .cookie-dialog-actions .btn {
    width: 100%;
  }
  .cookie-option {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .cookie-lock,
  .cookie-switch {
    justify-self: start;
  }
  body.has-cookie-banner .to-top {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal-ready [data-reveal] { opacity: 1; transform: none; transition: none; }
  * {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ---------- iOS download bar (non-Safari fallback) ----------
   In normal flow at the very top, so it pushes content down and scrolls away
   with the page — mirroring the native Smart App Banner. Theme-aware via tokens. */
.ios-app-bar[hidden] { display: none; }
.ios-app-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
}
.ios-app-bar__close {
  flex: none;
  width: 24px;
  height: 24px;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: color .18s ease;
}
.ios-app-bar__close:hover,
.ios-app-bar__close:focus-visible { color: var(--text); }
.ios-app-bar__icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 9px;
}
.ios-app-bar__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
  line-height: 1.25;
}
.ios-app-bar__text strong { font-size: .9rem; color: var(--text); }
.ios-app-bar__text span { font-size: .75rem; color: var(--text-muted); }
.ios-app-bar__cta {
  flex: none;
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  transition: transform .18s ease, background-color .18s ease;
}
.ios-app-bar__cta:hover,
.ios-app-bar__cta:focus-visible { background: var(--primary-dark); transform: translateY(-2px); }
.ios-app-bar__cta:active { transform: translateY(0); }
