/* ============================================================
   Termixa — design system
   Dark-first, emerald accent, terminal-native aesthetic.
   Themes via [data-theme] on <html>; toggle persisted in JS.
   ============================================================ */

:root {
  --bg: #070c14;
  --bg-2: #0a111d;
  --bg-3: #0e1726;
  --card: rgba(255, 255, 255, 0.028);
  --card-solid: #0d1522;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2f7;
  --muted: #9aa8bb;
  --dim: #64748b;
  --accent: #10b981;
  --accent-bright: #34d399;
  --accent-dim: rgba(16, 185, 129, 0.12);
  --accent-line: rgba(16, 185, 129, 0.32);
  --amber: #f59e0b;
  --danger: #ef4444;
  --term-bg: #0b1220;
  --term-chrome: #101a2b;
  --shadow: 0 24px 80px -24px rgba(0, 0, 0, 0.7);
  --glow: 0 0 120px 10px rgba(16, 185, 129, 0.13);
  --nav-bg: rgba(7, 12, 20, 0.72);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #fafcfb;
  --bg-2: #f2f6f4;
  --bg-3: #e9efec;
  --card: #ffffff;
  --card-solid: #ffffff;
  --line: rgba(13, 26, 22, 0.1);
  --line-strong: rgba(13, 26, 22, 0.18);
  --text: #0c1a15;
  --muted: #46584f;
  --dim: #6b7d74;
  --accent: #0c9b6c;
  --accent-bright: #10b981;
  --accent-dim: rgba(16, 185, 129, 0.1);
  --accent-line: rgba(12, 155, 108, 0.35);
  --term-bg: #0b1220;      /* terminals stay dark in light mode — they're terminals */
  --term-chrome: #101a2b;
  --shadow: 0 24px 60px -28px rgba(10, 40, 30, 0.25);
  --glow: 0 0 120px 10px rgba(16, 185, 129, 0.10);
  --nav-bg: rgba(250, 252, 251, 0.8);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

.mono { font-family: "JetBrains Mono", "SF Mono", Menlo, monospace; }

::selection { background: rgba(16, 185, 129, 0.3); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Background texture ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 10%, transparent 70%);
  opacity: 0.5;
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,0.14), transparent 65%);
  top: -280px; right: -160px;
  filter: blur(20px);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 28px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 28px; letter-spacing: -0.5px;
}
.brand .glyph {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  display: grid; place-items: center;
  color: var(--accent-bright);
  font-family: "JetBrains Mono", monospace; font-size: 14px; font-weight: 700;
}
.brand em { color: var(--accent-bright); font-style: normal; }
.brand .glyph-img { width: 40px; height: 40px; object-fit: contain; }

.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  padding: 8px 13px; border-radius: 9px;
  color: var(--muted); font-size: 14.5px; font-weight: 500;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--card); }
.nav-links a.active { color: var(--accent-bright); }
.nav-links a.nav-cta {
  color: #04140d; background: var(--accent);
  font-weight: 700; margin-left: 8px;
  box-shadow: 0 4px 20px -6px rgba(16,185,129,0.5);
}
.nav-links a.nav-cta:hover { background: var(--accent-bright); color: #04140d; }

.theme-toggle {
  width: 38px; height: 38px; margin-left: 6px;
  border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--muted);
  display: grid; place-items: center;
  transition: color 0.15s, border-color 0.15s, transform 0.3s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); transform: rotate(15deg); }
.theme-toggle svg { width: 17px; height: 17px; }
[data-theme="light"] .icon-sun { display: none; }
html:not([data-theme="light"]) .icon-moon { display: none; }

.nav-burger {
  display: none; margin-left: auto;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; color: var(--text);
}

@media (max-width: 880px) {
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
    padding: 12px 16px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links a.nav-cta { margin-left: 0; text-align: center; margin-top: 6px; }
  .nav-burger { display: grid; place-items: center; }
  .theme-toggle { margin-left: 8px; }
}

/* ---------- Type ---------- */
.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-bright);
  display: inline-flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: "//"; opacity: 0.6; }

h1.display {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.06; font-weight: 800; letter-spacing: -0.03em;
  margin: 18px 0;
}
h1.display .grad {
  background: linear-gradient(100deg, var(--accent-bright), #6ee7b7 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
h2.title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15; font-weight: 800; letter-spacing: -0.025em;
  margin: 14px 0 12px;
}
.lead { font-size: 18px; color: var(--muted); max-width: 640px; }
.section { padding: 96px 0; position: relative; }
.section.tight { padding: 64px 0; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 12px;
  font-size: 15.5px; font-weight: 700; border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: #04140d;
  box-shadow: 0 8px 28px -8px rgba(16, 185, 129, 0.55);
}
.btn-primary:hover { background: var(--accent-bright); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--line-strong); color: var(--text); background: var(--card);
}
.btn-ghost:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.btn .mono-hint { font-family: "JetBrains Mono", monospace; font-weight: 500; opacity: 0.75; font-size: 13px; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent-line); box-shadow: var(--shadow); }
.card .card-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  display: grid; place-items: center; color: var(--accent-bright);
}
.card h3 { font-size: 18.5px; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 880px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Terminal window mock ---------- */
.term {
  background: var(--term-bg);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow), var(--glow);
  font-family: "JetBrains Mono", monospace; font-size: 13px; line-height: 1.75;
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  background: var(--term-chrome);
  padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.term-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.term-bar .term-title {
  margin-left: 8px; color: #64748b; font-size: 12px;
  font-family: "JetBrains Mono", monospace;
}
.term-body { padding: 18px 20px; color: #c8d3e0; min-height: 200px; }
.term-body .tp { color: #34d399; }     /* prompt */
.term-body .tc { color: #e2e8f0; }     /* command */
.term-body .td { color: #7c8ba1; }     /* dim output */
.term-body .ta { color: #f59e0b; }     /* highlight */
.cursor {
  display: inline-block; width: 8px; height: 15px; margin-left: 2px;
  background: #34d399; vertical-align: -2px;
  animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Phone mock ---------- */
.phone {
  width: 250px; border-radius: 36px; padding: 10px;
  background: linear-gradient(160deg, #2a3648, #0d1420);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 90px -20px rgba(0,0,0,0.75);
}
.phone-screen {
  border-radius: 28px; overflow: hidden; background: #0b1220;
  border: 1px solid rgba(255,255,255,0.07);
}
.phone-notch {
  width: 86px; height: 22px; margin: 8px auto 4px;
  background: #05080d; border-radius: 12px;
}
.phone .term { position: static; border: none; border-radius: 0; box-shadow: none; font-size: 10.5px; }
.phone .term-body { min-height: 210px; padding: 12px 13px; white-space: nowrap; overflow: hidden; }

/* Mini app chrome inside the phone mock — status bar, tab pills, input bar —
   so it reads as the actual Termixa app, not a floating code snippet. */
.phone-status {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px 6px; background: #0b1220;
  font-family: "JetBrains Mono", monospace; font-size: 9.5px; color: #64748b;
}
.phone-status .ps-dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px #34d399; }
.phone-tabs {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px 8px; background: #0b1220;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.phone-tabs .pt {
  font-family: "JetBrains Mono", monospace; font-size: 9px; color: #64748b;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  padding: 3px 9px; border-radius: 7px;
}
.phone-tabs .pt.active {
  color: #34d399; border-color: rgba(16,185,129,0.4); background: rgba(16,185,129,0.1);
}
.phone-tabs .pt-add {
  margin-left: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(16,185,129,0.35); background: rgba(16,185,129,0.1);
  color: #34d399; font-size: 11px; display: grid; place-items: center;
}
.phone-input {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px 12px; background: #0b1220;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-family: "JetBrains Mono", monospace; font-size: 10px; color: #64748b;
}
.phone-input .pi-field {
  flex: 1; border: 1px solid rgba(255,255,255,0.09); border-radius: 9px;
  background: rgba(255,255,255,0.03); padding: 6px 10px;
}
.phone-input .pi-send {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: #10b981; color: #04140d; font-size: 11px;
  display: grid; place-items: center; font-weight: 800;
}

/* ---------- Hero composition ---------- */
.hero { padding: 84px 0 56px; position: relative; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
/* Hero visual: one phone frame with a real app screenshot inside. */
.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-visual::before {
  /* soft emerald halo behind the phone */
  content: ""; position: absolute; inset: 8% 12%;
  background: radial-gradient(closest-side, rgba(16,185,129,0.22), transparent 72%);
  filter: blur(12px); z-index: 0;
}
.phone-hero {
  width: 344px; position: relative; z-index: 1;
  transform: rotate(1.5deg);
  transition: transform 0.4s ease;
}
.phone-hero:hover { transform: rotate(0deg) translateY(-6px); }
.phone-hero .phone-screen img { width: 100%; height: auto; display: block; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 18px; color: var(--dim); font-size: 13.5px; }
.hero-note b { color: var(--muted); }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .phone-hero { width: 300px; }
}

/* ---------- AI strip ---------- */
.ai-strip {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px 34px; padding: 26px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-family: "JetBrains Mono", monospace; font-size: 13.5px;
}
.ai-strip b { color: var(--muted); font-weight: 600; }
.ai-strip .sep { color: var(--accent); opacity: 0.7; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.step { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.step .num {
  font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700;
  color: var(--accent-bright); letter-spacing: 0.1em; margin-bottom: 14px; display: block;
}
.step h3 { font-size: 17.5px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }
.step::after {
  content: "→"; position: absolute; top: 50%; right: -17px; transform: translateY(-50%);
  color: var(--accent); font-size: 20px; z-index: 1;
}
.step:last-child::after { display: none; }
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; }
  .step::after { content: "↓"; top: auto; bottom: -24px; right: 50%; transform: translateX(50%); }
}

/* ---------- Feature split rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-top: 70px; }
.split.flip .split-copy { order: 2; } .split.flip .split-visual { order: 1; }
.split h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 12px 0 12px; }
.split p { color: var(--muted); font-size: 16px; }
.split ul { margin-top: 16px; list-style: none; }
.split li { padding: 7px 0 7px 30px; position: relative; color: var(--muted); font-size: 15px; }
.split li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  width: 20px; height: 20px; border-radius: 6px; font-size: 12px;
  background: var(--accent-dim); color: var(--accent-bright);
  display: grid; place-items: center; font-weight: 800;
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split.flip .split-copy { order: 1; } .split.flip .split-visual { order: 2; }
}

/* ---------- Compare table ---------- */
.compare { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: 14.5px; }
.compare th, .compare td { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.compare th { color: var(--dim); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.compare td:first-child, .compare th:first-child { text-align: left; color: var(--muted); }
.compare .col-us { background: var(--accent-dim); }
.compare th.col-us { color: var(--accent-bright); }
.compare .yes { color: var(--accent-bright); font-weight: 700; }
.compare .no { color: var(--dim); }
.compare-scroll { overflow-x: auto; }

/* ---------- Pricing ---------- */
.price-toggle {
  display: inline-flex; margin: 28px auto 0; padding: 4px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
}
.price-toggle button {
  padding: 9px 20px; border-radius: 9px; border: none; background: transparent;
  color: var(--muted); font-weight: 600; font-size: 14.5px;
}
.price-toggle button.active { background: var(--accent); color: #04140d; }
.price-toggle .save { color: var(--accent-bright); font-size: 12px; margin-left: 6px; }
.price-toggle button.active .save { color: #04140d; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 420px)); gap: 22px; justify-content: center; margin-top: 40px; }
.plan { padding: 34px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); position: relative; }
.plan.featured { border-color: var(--accent-line); box-shadow: var(--glow); }
.plan .tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #04140d;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em;
  padding: 5px 14px; border-radius: 999px; text-transform: uppercase;
}
.plan h3 { font-size: 20px; }
.plan .amount { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; margin: 14px 0 2px; }
.plan .amount span { font-size: 16px; font-weight: 500; color: var(--dim); }
.plan .per { color: var(--dim); font-size: 14px; min-height: 20px; }
.plan ul { list-style: none; margin: 24px 0 28px; }
.plan li { padding: 8px 0 8px 30px; position: relative; color: var(--muted); font-size: 15px; }
.plan li::before {
  content: "✓"; position: absolute; left: 0; top: 7px;
  width: 20px; height: 20px; border-radius: 6px; font-size: 12px;
  background: var(--accent-dim); color: var(--accent-bright);
  display: grid; place-items: center; font-weight: 800;
}
.plan li.na { color: var(--dim); }
.plan li.na::before { content: "—"; background: transparent; border: 1px solid var(--line); color: var(--dim); }
.plan .btn { width: 100%; justify-content: center; }
@media (max-width: 880px) { .plans { grid-template-columns: 1fr; } }

/* ---------- Download cards ---------- */
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.dl-card { padding: 30px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); position: relative; transition: transform 0.25s, border-color 0.25s; }
.dl-card:hover { transform: translateY(-3px); border-color: var(--accent-line); }
.dl-card.detected { border-color: var(--accent-line); box-shadow: var(--glow); }
.dl-card .os-badge {
  position: absolute; top: 18px; right: 18px;
  font-family: "JetBrains Mono", monospace; font-size: 11px; font-weight: 700;
  color: var(--accent-bright); background: var(--accent-dim);
  border: 1px solid var(--accent-line); padding: 4px 10px; border-radius: 999px;
  display: none;
}
.dl-card.detected .os-badge { display: block; }
.dl-card .os-icon { width: 46px; height: 46px; margin-bottom: 16px; color: var(--text); }
.dl-card h3 { font-size: 19px; margin-bottom: 4px; }
.dl-card .meta { color: var(--dim); font-size: 13px; margin-bottom: 20px; font-family: "JetBrains Mono", monospace; }
.dl-card .btn { width: 100%; justify-content: center; margin-bottom: 10px; }
.dl-card .alt { display: block; text-align: center; color: var(--muted); font-size: 13.5px; padding: 8px; border-radius: 8px; }
.dl-card .alt:hover { color: var(--accent-bright); background: var(--card); }
@media (max-width: 880px) { .dl-grid { grid-template-columns: 1fr; } }

.store-badge {
  display: inline-flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 12px 22px; background: var(--card-solid);
  transition: transform 0.2s, border-color 0.2s;
}
.store-badge:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.store-badge svg { width: 30px; height: 30px; }
.store-badge .s1 { font-size: 11px; color: var(--dim); line-height: 1.2; }
.store-badge .s2 { font-size: 17px; font-weight: 700; line-height: 1.2; }

/* ---------- Code block ---------- */
.codeblock {
  background: var(--term-bg); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; padding: 18px 20px; overflow-x: auto;
  font-family: "JetBrains Mono", monospace; font-size: 13.5px; line-height: 1.8;
  color: #c8d3e0; margin: 18px 0;
}
.codeblock .c { color: #64748b; }
.codeblock .g { color: #34d399; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 40px auto 0; }
.faq details {
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent-bright); font-size: 20px; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 22px 18px; color: var(--muted); font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--accent-line); border-radius: 24px;
  padding: 64px 40px; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 120% at 50% -20%, rgba(16,185,129,0.16), transparent),
    var(--card);
}
.cta-band h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; }
.cta-band p { color: var(--muted); margin: 12px auto 28px; max-width: 520px; }

/* ---------- Guide layout ---------- */
.guide { max-width: 780px; margin: 0 auto; }
.guide h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 56px 0 14px; padding-top: 16px; }
.guide h2 .gnum { color: var(--accent-bright); font-family: "JetBrains Mono", monospace; font-size: 20px; margin-right: 10px; }
.guide p { color: var(--muted); margin-bottom: 12px; }
.guide ul, .guide ol { color: var(--muted); padding-left: 22px; margin-bottom: 14px; }
.guide li { margin-bottom: 8px; }
.guide b, .guide strong { color: var(--text); }
.guide .tip {
  border: 1px solid var(--accent-line); background: var(--accent-dim);
  border-radius: 12px; padding: 14px 18px; margin: 18px 0;
  color: var(--muted); font-size: 14.5px;
}
.guide .tip b { color: var(--accent-bright); }
.kbd {
  font-family: "JetBrains Mono", monospace; font-size: 12.5px;
  border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: 6px; padding: 1.5px 7px; color: var(--text); background: var(--card);
}

/* ---------- Ports screen mock (guides §04 — mirrors the mobile app) ---------- */
.ports-mock {
  max-width: 340px; margin: 26px auto; padding: 16px 14px 14px;
  background: #0b1220; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px; box-shadow: var(--shadow), var(--glow);
  font-family: "Inter", sans-serif;
}
.ports-mock .pm-head {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #eef2f7; font-weight: 700; font-size: 14.5px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 12px;
}
.ports-mock .pm-head .pm-globe { color: #34d399; display: grid; place-items: center; }
.ports-mock .pm-label {
  color: #64748b; font-size: 11.5px; font-weight: 600; margin: 2px 2px 8px;
}
.ports-mock .pm-row {
  display: flex; align-items: center; gap: 12px;
  background: #121f2e; border: 1px solid rgba(255,255,255,0.05);
  border-radius: 13px; padding: 11px 12px; margin-bottom: 8px;
}
.ports-mock .pm-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3);
  display: grid; place-items: center; color: #34d399;
}
.ports-mock .pm-row b { color: #f1f5f9; font-size: 13.5px; font-weight: 600; display: block; }
.ports-mock .pm-row span { color: #64748b; font-size: 11px; }
.ports-mock .pm-chev { margin-left: auto; color: #475569; font-size: 15px; }
.ports-mock .pm-open {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
}
.ports-mock .pm-open .pm-field {
  flex: 1; background: #0e1726; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 11px; padding: 9px 12px; color: #475569;
  font-family: "JetBrains Mono", monospace; font-size: 12px;
}
.ports-mock .pm-open .pm-add {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.4);
  color: #34d399; font-size: 17px; font-weight: 700;
  display: grid; place-items: center;
}
.ports-mock .pm-tip { color: #64748b; font-size: 10.5px; margin-top: 10px; line-height: 1.5; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 460px)); gap: 20px; justify-content: center; margin-top: 44px; }
.contact-layout { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 20px; margin-top: 44px; align-items: start; }
.contact-side { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 880px) { .contact-grid, .contact-layout { grid-template-columns: 1fr; } }

/* Contact form */
.contact-form .f-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 0 7px; }
.f-input {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--bg-2);
  color: var(--text); font: inherit; font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.f-input:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-dim); }
.f-input.f-err { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,0.12); }
textarea.f-input { resize: vertical; min-height: 120px; }
.f-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cap-head { display: flex; align-items: baseline; justify-content: space-between; margin-top: 20px; }
.cap-hint { font-size: 12.5px; color: var(--dim); }
.cap-row { display: flex; align-items: stretch; gap: 10px; margin-top: 8px; }
.cap-img {
  display: grid; place-items: center; min-width: 180px; height: 56px;
  border: 1px solid var(--line-strong); border-radius: 11px; background: var(--bg-2);
  user-select: none; -webkit-user-select: none;
}
.cap-img svg { display: block; }
.cap-refresh {
  width: 44px; border-radius: 11px; border: 1px solid var(--line-strong);
  background: var(--bg-2); color: var(--muted); font-size: 18px;
  transition: color 0.15s, border-color 0.15s, transform 0.3s;
}
.cap-refresh:hover { color: var(--accent-bright); border-color: var(--accent-line); transform: rotate(90deg); }
.cap-in { flex: 1; font-family: "JetBrains Mono", monospace; letter-spacing: 0.2em; text-transform: uppercase; }
.f-status { min-height: 20px; margin-top: 12px; font-size: 14px; color: var(--danger); text-align: center; }
.f-status.ok { color: var(--accent-bright); }
@media (max-width: 520px) {
  .cap-row { flex-wrap: wrap; }
  .cap-in { min-width: 100%; order: 3; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 48px 0 40px; }
.footer-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; justify-content: space-between;
}
.footer .fcol { display: flex; flex-direction: column; gap: 9px; }
.footer .fhead { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin-bottom: 4px; }
.footer a { color: var(--muted); font-size: 14px; }
.footer a:hover { color: var(--accent-bright); }
.footer .fine { width: 100%; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 880px) {
  /* Mobile: brand row on top, link columns in a tidy 2-up grid. */
  .footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .footer .fcol:first-child { grid-column: 1 / -1; max-width: none !important; }
  .footer .fine { grid-column: 1 / -1; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 4px; }
}

/* ---------- Legal pages (terms/privacy/support) ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 60px 24px 80px; }
.legal h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.legal .updated { color: var(--dim); font-size: 13.5px; margin-bottom: 34px; }
.legal h2 { font-size: 20px; font-weight: 700; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.legal ul, .legal ol { padding-left: 22px; }
.legal ol { margin-bottom: 10px; }
.legal a { color: var(--accent-bright); }
.legal h3 { font-size: 16px; font-weight: 700; margin: 22px 0 8px; color: var(--text); }
.legal .lead-note { color: var(--muted); font-size: 15.5px; margin-bottom: 22px; }
.legal .toc { border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 6px 0 30px; background: var(--card); }
.legal .toc-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 10px; }
.legal .toc ol { columns: 2; column-gap: 26px; padding-left: 20px; margin: 0; font-size: 13.5px; }
.legal .toc a { color: var(--muted); }
.legal .toc a:hover { color: var(--accent-bright); }
.legal .callout {
  border: 1px solid var(--accent-line); border-left: 3px solid var(--accent-bright);
  background: rgba(16,185,129,0.06); border-radius: 12px; padding: 16px 20px; margin: 18px 0;
}
.legal .callout strong { color: var(--text); }
.legal section { scroll-margin-top: 90px; }
@media (max-width: 560px) { .legal .toc ol { columns: 1; } }

/* ---------- Cookie consent ---------- */
.cookie-consent {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: min(360px, calc(100vw - 40px));
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--card); backdrop-filter: blur(14px);
  box-shadow: 0 24px 70px -18px rgba(0,0,0,0.7);
  padding: 20px 20px 18px; font-size: 13.5px;
  transform: translateY(24px); opacity: 0; pointer-events: none;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.cookie-consent.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-consent h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.cookie-consent p { color: var(--muted); margin-bottom: 14px; line-height: 1.5; }
.cookie-consent p a { color: var(--accent-bright); }
.cookie-consent .cc-actions { display: flex; gap: 10px; }
.cookie-consent .cc-btn {
  flex: 1; text-align: center; padding: 9px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--line);
  background: transparent; color: var(--muted); transition: all 0.2s ease;
}
.cookie-consent .cc-btn:hover { border-color: var(--accent-line); color: var(--text); }
.cookie-consent .cc-btn.primary { background: var(--accent-bright); border-color: var(--accent-bright); color: #04140d; }
.cookie-consent .cc-btn.primary:hover { filter: brightness(1.06); }
@media (max-width: 560px) { .cookie-consent { right: 12px; left: 12px; bottom: 12px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
