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

:root {
  --bg: #f4f5f8;
  --bg2: #eceef2;
  --accent: #4f46e5;
  --accent2: #6366f1;
  --accent-soft: rgba(79, 70, 229, 0.1);
  --red: #e11d48;
  --green: #059669;
  --text: #18181b;
  --text-dim: #71717a;
  --border: #e4e4e7;
  --card-bg: #ffffff;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 4px 24px rgba(15, 23, 42, 0.08);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --nav-bg-scrolled: rgba(255, 255, 255, 0.94);
  --btn-ghost-bg: #ffffff;
  --hero-blob-1: #c7d2fe;
  --hero-blob-2: #ddd6fe;
  --hero-blob-3: #a5b4fc;
  --hero-blob-3-opacity: 0.25;
  --page-glow: rgba(199, 210, 254, 0.5);
  --cta-glow: rgba(199, 210, 254, 0.45);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0c10;
  --bg2: #131318;
  --accent: #8b8cf8;
  --accent2: #a5b4fc;
  --accent-soft: rgba(139, 140, 248, 0.14);
  --red: #fb7185;
  --green: #34d399;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --border: rgba(255, 255, 255, 0.1);
  --card-bg: #18181f;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 8px 32px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 8px 36px rgba(0, 0, 0, 0.35);
  --nav-bg: rgba(12, 12, 16, 0.88);
  --nav-bg-scrolled: rgba(12, 12, 16, 0.95);
  --btn-ghost-bg: #1c1c24;
  --hero-blob-1: rgba(99, 102, 241, 0.35);
  --hero-blob-2: rgba(139, 92, 246, 0.28);
  --hero-blob-3: rgba(129, 140, 248, 0.22);
  --hero-blob-3-opacity: 0.4;
  --page-glow: rgba(99, 102, 241, 0.18);
  --cta-glow: rgba(99, 102, 241, 0.2);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 4rem;
  padding-top: max(1rem, calc(env(safe-area-inset-top, 0px) + 0.65rem));
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.navbar.navbar--scrolled {
  background: var(--nav-bg-scrolled);
  box-shadow: var(--shadow);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-logo {
  font-size: 1.25rem; font-weight: 800; letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links { list-style: none; display: flex; gap: 1.75rem; align-items: center; }
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.btn-nav {
  border: none !important;
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.5rem 1.25rem !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}
.btn-nav:hover {
  background: var(--accent2) !important;
  transform: translateY(-1px);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--btn-ghost-bg);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: rgba(79, 70, 229, 0.35);
}

html[data-theme="dark"] .theme-toggle:hover {
  border-color: rgba(139, 140, 248, 0.35);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle .theme-icon {
  display: block;
}

.theme-toggle .theme-icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-moon {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-icon-sun {
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: -0.25rem -0.5rem -0.25rem 0;
  border: none;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.navbar--open .nav-toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.navbar--open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.navbar--open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  -webkit-tap-highlight-color: transparent;
}

.nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.section-header--page {
  padding-top: max(6.5rem, calc(env(safe-area-inset-top, 0px) + 5.25rem));
}

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 4rem 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}
.hero-blob--1 {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  background: var(--hero-blob-1);
  top: -8%;
  right: -5%;
}
.hero-blob--2 {
  width: min(360px, 50vw);
  height: min(360px, 50vw);
  background: var(--hero-blob-2);
  bottom: 5%;
  left: -10%;
}
.hero-blob--3 {
  width: min(280px, 40vw);
  height: min(280px, 40vw);
  background: var(--hero-blob-3);
  top: 40%;
  left: 35%;
  opacity: var(--hero-blob-3-opacity);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
}

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-content h1 {
  font-size: clamp(2.35rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}
.hero-content h1 span {
  color: var(--accent);
}

.hero-content p {
  font-size: 1.125rem;
  color: var(--text-dim);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 0.75rem; margin-bottom: 2.5rem; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  padding: 0.8rem 1.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: var(--btn-ghost-bg);
  color: var(--text);
  padding: 0.8rem 1.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow);
}

/* ── HERO macOS CONSOLE ── */
.hero-console {
  --console-titlebar-top: #f5f5f5;
  --console-titlebar: #ececec;
  --console-titlebar-edge: #d8d8d8;
  --console-titlebar-inset: rgba(255, 255, 255, 0.9);
  --console-surface: #ffffff;
  --console-border: rgba(0, 0, 0, 0.08);
  --console-inset-ring: rgba(255, 255, 255, 0.8);
  --console-title-fg: #3c3c43;
  --console-log-fg: #3a3a3c;
  --console-log-muted: #86868b;
  --console-log-bg-top: #fafafa;
  --console-log-bg-bot: #ffffff;
  max-width: 440px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  background: var(--console-surface);
  border-radius: 10px;
  border: 1px solid var(--console-border);
  box-shadow:
    0 0 0 1px var(--console-inset-ring) inset,
    0 24px 56px rgba(15, 23, 42, 0.1),
    0 8px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

html[data-theme="dark"] .hero-console {
  --console-titlebar-top: #3a3a44;
  --console-titlebar: #2a2a32;
  --console-titlebar-edge: #1f1f26;
  --console-titlebar-inset: rgba(255, 255, 255, 0.06);
  --console-surface: #14141a;
  --console-border: rgba(255, 255, 255, 0.12);
  --console-inset-ring: rgba(255, 255, 255, 0.06);
  --console-title-fg: #e4e4e7;
  --console-log-fg: #d4d4d8;
  --console-log-muted: #a1a1aa;
  --console-log-bg-top: #121218;
  --console-log-bg-bot: #14141a;
  box-shadow:
    0 0 0 1px var(--console-inset-ring) inset,
    0 24px 56px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.hero-console-titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  background: linear-gradient(180deg, var(--console-titlebar-top) 0%, var(--console-titlebar) 100%);
  border-bottom: 1px solid var(--console-titlebar-edge);
  box-shadow: 0 1px 0 var(--console-titlebar-inset) inset;
}

.hero-console-traffic {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.12) inset,
    0 1px 2px rgba(0, 0, 0, 0.08);
}

.traffic-light--close {
  background: #ff5f57;
}

.traffic-light--min {
  background: #febc2e;
}

.traffic-light--zoom {
  background: #28c840;
}

.hero-console-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--console-title-fg);
  letter-spacing: -0.01em;
  opacity: 0.92;
  pointer-events: none;
  user-select: none;
  padding: 0 4.75rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.hero-console-body {
  background: var(--console-surface);
}

.hero-console-log {
  min-height: 9.5rem;
  padding: 1rem 1.05rem 1.15rem;
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--console-log-fg);
  background: linear-gradient(180deg, var(--console-log-bg-top) 0%, var(--console-log-bg-bot) 45%);
}

.hero-console-log .log-line {
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.2rem;
  transform-origin: left center;
}

.hero-console-log .log-line:last-child {
  margin-bottom: 0;
}

.hero-console-log .log-line--entering {
  animation: log-line-enter 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes log-line-enter {
  from {
    opacity: 0;
    transform: translateY(0.45rem);
    filter: blur(1.25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-console-log .log-line--reveal {
  animation: log-line-reveal 0.7s cubic-bezier(0.22, 1, 0.45, 1) forwards;
}

@keyframes log-line-reveal {
  0% {
    opacity: 0.82;
    transform: translateY(0.06rem) scale(0.992);
    filter: saturate(0.55) blur(0.35px);
  }
  55% {
    opacity: 1;
    filter: saturate(1.05) blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: saturate(1) blur(0);
  }
}

.hero-console-log .log-line--reveal .log-accent,
.hero-console-log .log-line--reveal .log-ok {
  display: inline-block;
  animation: log-token-emerge 0.55s cubic-bezier(0.34, 1.2, 0.64, 1) 0.12s backwards;
}

@keyframes log-token-emerge {
  from {
    opacity: 0.35;
    transform: translateY(0.2em) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-console-log .log-line--entering,
  .hero-console-log .log-line--reveal,
  .hero-console-log .log-line--reveal .log-accent,
  .hero-console-log .log-line--reveal .log-ok {
    animation: none;
  }

  .hero-console-log .log-line--entering {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

.hero-console-log .log-line-text {
  vertical-align: baseline;
}

.hero-console-log .log-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent);
  border-radius: 1px;
  opacity: 1;
  animation: log-cursor-blink 0.9s ease-in-out infinite;
}

@keyframes log-cursor-blink {
  0%,
  45% {
    opacity: 1;
  }
  50%,
  95% {
    opacity: 0.15;
  }
  100% {
    opacity: 1;
  }
}

.hero-console-log .log-dim {
  color: var(--console-log-muted);
}

.hero-console-log .log-accent {
  color: var(--accent);
  font-weight: 600;
}

.hero-console-log .log-ok {
  color: var(--green);
}

/* ── STATS ── */
.stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 4rem 3rem;
  background: var(--bg);
  max-width: 1000px;
  margin: 0 auto;
}

.stat-item {
  flex: 1;
  min-width: 160px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.stat-unit { font-size: 1.35rem; color: var(--accent); font-weight: 700; }
.stat-item p {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.35rem;
}

/* ── SECTION SHARED ── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 0.6rem;
}
.section-header h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}
.section-header p { color: var(--text-dim); max-width: 520px; margin: 0 auto; font-size: 1.02rem; }

/* ── FEATURES ── */
.features {
  padding: 5rem 4rem 6rem;
  background: var(--bg2);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: box-shadow 0.25s, transform 0.25s;
}
.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.feature-icon svg { width: 22px; height: 22px; stroke: var(--accent); stroke-width: 2; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 0.45rem; }
.feature-card p { color: var(--text-dim); font-size: 0.92rem; line-height: 1.65; }

/* ── MODULES ── */
.modules {
  padding: 6rem 4rem;
  background: var(--bg);
}

.modules-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.module-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr auto;
  align-items: center;
  gap: 1.25rem 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.module-row:hover { box-shadow: var(--shadow-hover); }

.module-main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.module-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.module-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  width: fit-content;
}
.module-desc { font-size: 0.9rem; color: var(--text-dim); line-height: 1.5; }
.module-status {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  background: rgba(5, 150, 105, 0.1);
  color: var(--green);
}
.module-status.beta {
  background: rgba(225, 29, 72, 0.08);
  color: var(--red);
}

.methods-more {
  text-align: center;
  margin-top: 1.75rem;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── PRICING ── */
.pricing {
  padding: 6rem 4rem;
  background: var(--bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.pricing-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.8rem 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.pricing-card:hover {
  border-color: rgba(79, 70, 229, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.popular-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent);
  color: #fff; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; padding: 0.25rem 0.75rem; border-radius: 999px;
}

.plan-name {
  font-size: 1rem; font-weight: 700; color: var(--text); letter-spacing: 0;
}

.plan-price {
  font-size: 2rem; font-weight: 800;
  color: var(--accent);
}
.plan-price span { font-size: 0.9rem; color: var(--text-dim); }

.plan-price-usd {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: -0.25rem;
}

.plan-features {
  list-style: none; display: flex; flex-direction: column; gap: 0.6rem; flex: 1;
}
.plan-features li {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--text-dim);
}
.plan-features li svg { width: 15px; height: 15px; flex-shrink: 0; stroke: var(--accent); }
.plan-features li svg.no { stroke: var(--red); }
.plan-features li svg.yes { stroke: var(--accent); }

.btn-plan {
  display: block; text-align: center;
  border: 1px solid var(--border);
  color: var(--text); padding: 0.6rem;
  border-radius: 6px; text-decoration: none;
  font-size: 0.85rem; font-weight: 600;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-plan:hover {
  border-color: var(--accent); color: var(--accent);
  background: var(--accent-soft);
}

@media (max-width: 768px) {
  .pricing { padding: 4rem 1.5rem; }
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}

/* ── PRICING PAGE (tier rows + addon panels) ── */
.pricing-page {
  min-height: 100vh;
  padding: 0 4rem 6rem;
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, var(--page-glow), transparent 55%),
    var(--bg);
}

.pricing-split {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 340px);
  gap: 3rem;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.pricing-split--plans {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}

.pricing-half {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pricing-half-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.pricing-half-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.pricing-page .section-header h2 { color: var(--text); }
.pricing-page .section-header p { color: var(--text-dim); }

.tier-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.tier-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(100px, 118px) 1fr auto;
  gap: 1.25rem 1.75rem;
  align-items: center;
  padding: 1.1rem 1.25rem 1.1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
}
.tier-row:hover {
  border-color: rgba(79, 70, 229, 0.2);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateX(2px);
}

.tier-row--popular {
  margin-top: 0.75rem;
  padding-top: 1.3rem;
  border-left-color: var(--accent);
  border-color: rgba(79, 70, 229, 0.25);
  background: linear-gradient(105deg, var(--accent-soft) 0%, var(--card-bg) 45%);
  box-shadow: var(--shadow-hover);
}

.tier-row-badge {
  position: absolute;
  top: 0;
  right: 1rem;
  transform: translateY(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
}

.tier-price-block {
  text-align: left;
}
.tier-price-main {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.tier-price-main .sym {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-right: 0.05em;
}
.tier-interval {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.35rem;
}
.tier-usd {
  font-size: 0.75rem;
  color: var(--accent);
  margin-top: 0.2rem;
  font-weight: 600;
}

.tier-body .tier-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.tier-row .plan-features {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
.tier-row .plan-features li {
  font-size: 0.72rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.tier-row .plan-features li svg {
  width: 12px;
  height: 12px;
}

.tier-row .btn-plan {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  background: var(--card-bg);
  font-weight: 600;
}
.tier-row .btn-plan:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.addons-band {
  max-width: 1180px;
  margin: 2.75rem auto 0;
  padding: 0;
}

.addons-band-title {
  margin-bottom: 1.25rem;
}

.addons-band-title::after {
  flex: 1;
}

.addon-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.addon-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  padding: 1.35rem 1.2rem 1.25rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.addon-panel:hover {
  border-color: rgba(79, 70, 229, 0.28);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.addon-panel-head {
  min-height: 1.45rem;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: flex-start;
}

.addon-panel--featured {
  border-style: solid;
  border-color: rgba(5, 150, 105, 0.35);
  background: linear-gradient(160deg, rgba(5, 150, 105, 0.06) 0%, var(--card-bg) 50%);
}
.addon-panel--featured:hover {
  border-color: rgba(5, 150, 105, 0.45);
}

.addon-panel-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--green);
  margin-bottom: 0;
  line-height: 1.3;
}

.addon-panel .plan-name {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.addon-panel .plan-price {
  font-size: 1.65rem;
  color: var(--accent);
  margin-bottom: 0.15rem;
}
.addon-panel .plan-price span {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.addon-panel .plan-price-usd {
  margin-bottom: 1rem;
}

.addon-panel .plan-features {
  flex: 1 1 auto;
  margin-bottom: 0;
  gap: 0.5rem;
}

.addon-panel .plan-features li {
  font-size: 0.84rem;
  line-height: 1.45;
}

.addon-panel .btn-plan {
  border-radius: 999px;
  border-color: var(--border);
  margin-top: auto;
  width: 100%;
  padding: 0.65rem 1rem;
}
.addon-panel:not(.addon-panel--featured) .btn-plan {
  border-color: var(--border);
}
.addon-panel--featured .btn-plan:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(5, 150, 105, 0.08);
}

.addon-panel--raw {
  border-style: solid;
  border-color: rgba(234, 88, 12, 0.35);
  background: linear-gradient(165deg, rgba(251, 146, 60, 0.08) 0%, var(--card-bg) 55%);
}
.addon-panel--raw:hover {
  border-color: rgba(234, 88, 12, 0.5);
}

.addon-panel-label--raw {
  color: #ea580c;
  letter-spacing: 0.18em;
}

.addon-panel--raw .plan-name {
  letter-spacing: 0.04em;
}

.addon-panel--raw .plan-price {
  color: #c2410c;
}

.addon-btn--raw:hover {
  border-color: #ea580c !important;
  color: #c2410c !important;
  background: rgba(251, 146, 60, 0.1) !important;
}

.pricing-cta {
  text-align: center;
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
.pricing-cta p {
  color: var(--text-dim);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

@media (max-width: 960px) {
  .pricing-split {
    grid-template-columns: 1fr;
  }
  .addon-stack {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (min-width: 640px) and (max-width: 960px) {
  .addon-stack {
    grid-template-columns: repeat(2, 1fr);
    max-width: 640px;
  }
  .addon-panel--featured {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .tier-row {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem 1.15rem;
    border-left-width: 3px;
  }
  .tier-price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
  }
  .tier-interval {
    display: inline;
    margin-top: 0;
  }
  .tier-row .btn-plan {
    width: 100%;
  }
  .addon-stack {
    grid-template-columns: 1fr;
    max-width: none;
  }
  .addon-panel--featured {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .pricing-page {
    padding: 0 max(1rem, env(safe-area-inset-left, 0px)) 4rem max(1rem, env(safe-area-inset-right, 0px));
  }
  .addons-band {
    margin-top: 2rem;
  }
  .tier-row .plan-features li {
    font-size: 0.78rem;
    padding: 0.35rem 0.6rem;
  }
  .tier-row--popular {
    margin-top: 1rem;
  }
}

/* ── CTA ── */
.cta {
  position: relative;
  overflow: hidden;
  padding: 6rem 4rem;
  text-align: center;
  background: var(--bg2);
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  height: 280px;
  background: radial-gradient(ellipse, var(--cta-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta h2 {
  position: relative;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.cta p { position: relative; color: var(--text-dim); margin-bottom: 2rem; font-size: 1.05rem; }

.cta-form {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
}
.cta-form input {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text); padding: 0.75rem 1.5rem;
  border-radius: 6px; font-size: 0.95rem;
  width: 300px; outline: none;
  transition: border-color 0.2s;
}
.cta-form input:focus { border-color: var(--accent); }
.cta-form input::placeholder { color: var(--text-dim); }

.btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0;
  background: #229ED9;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.65rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(34, 158, 217, 0.25);
}
.btn-telegram:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

.tg-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 0; }

/* ── FOOTER ── */
.footer {
  padding: 2.5rem 4rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--card-bg);
}
.footer-logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.5rem;
  text-decoration: none;
  display: inline-block;
}
.footer-logo span { color: var(--accent); }
.footer p { color: var(--text-dim); font-size: 0.85rem; }
.footer-copy { margin-top: 0.5rem; font-size: 0.75rem; }

/* ── LEGAL PAGES ── */
.legal-page {
  max-width: 780px; margin: 0 auto;
  padding: 8rem 2rem 6rem;
}

.legal-header { margin-bottom: 3rem; }
.legal-header h2 { font-size: 2.2rem; font-weight: 800; color: var(--text); margin-bottom: 0.4rem; }
.legal-date { color: var(--text-dim); font-size: 0.85rem; }

.legal-body { display: flex; flex-direction: column; gap: 2rem; }

.legal-block {
  border-left: 2px solid var(--border);
  padding-left: 1.5rem;
}
.legal-block h3 { color: var(--accent); font-size: 1rem; margin-bottom: 0.5rem; letter-spacing: 0.5px; }
.legal-block p, .legal-block li { color: var(--text-dim); font-size: 0.9rem; line-height: 1.8; }
.legal-block ul { padding-left: 1.2rem; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; }
.legal-block a { color: var(--accent); text-decoration: none; }
.legal-block a:hover { text-decoration: underline; }

.footer-links {
  display: flex; gap: 1.5rem; justify-content: center;
  margin: 0.5rem 0;
}
.footer-links a { color: var(--text-dim); font-size: 0.8rem; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: min(19rem, 88vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: calc(env(safe-area-inset-top, 0px) + 4.25rem) 1.35rem 2rem;
    padding-right: max(1.35rem, env(safe-area-inset-right, 0px));
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    background: var(--card-bg);
    box-shadow: -12px 0 48px rgba(15, 23, 42, 0.14);
    border-left: 1px solid var(--border);
    z-index: 101;
    transform: translateX(105%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .navbar--open .nav-links {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links li:last-child:has(.btn-nav) {
    margin-top: 0.25rem;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.25rem 0;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-links .btn-nav {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
    min-height: 48px;
    display: inline-flex !important;
    align-items: center;
  }

}

@media (max-width: 768px) {
  .navbar {
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) 0.75rem max(1rem, env(safe-area-inset-left, 0px));
  }

  .hero {
    min-height: unset;
    padding: max(6.5rem, calc(env(safe-area-inset-top, 0px) + 5rem)) max(1.15rem, env(safe-area-inset-left, 0px)) 2.75rem max(1.15rem, env(safe-area-inset-right, 0px));
    align-items: flex-start;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
  }

  .hero-console {
    max-width: 100%;
  }

  .features,
  .modules,
  .cta {
    padding: 3.5rem max(1.15rem, env(safe-area-inset-left, 0px)) 3.5rem max(1.15rem, env(safe-area-inset-right, 0px));
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
    padding: 0 0.15rem;
  }

  .stats {
    padding: 1.25rem max(1rem, env(safe-area-inset-left, 0px)) 2rem max(1rem, env(safe-area-inset-right, 0px));
    flex-direction: column;
    gap: 0.75rem;
  }

  .stat-item {
    min-width: unset;
  }

  .module-row {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    align-items: start;
    padding: 1.15rem 1.1rem;
  }

  .module-status {
    justify-self: start;
  }

  .tg-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-telegram {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }

  .footer {
    padding: 2rem max(1.15rem, env(safe-area-inset-left, 0px)) max(1.5rem, env(safe-area-inset-bottom, 0px)) max(1.15rem, env(safe-area-inset-right, 0px));
  }

  .legal-page {
    padding: max(6.5rem, calc(env(safe-area-inset-top, 0px) + 5rem)) max(1.15rem, env(safe-area-inset-left, 0px)) 4rem max(1.15rem, env(safe-area-inset-right, 0px));
  }

  .legal-header h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  @media (hover: none) {
    .tier-row:hover {
      transform: none;
    }

    .addon-panel:hover {
      transform: none;
    }
  }
}

@media (max-width: 420px) {
  .hero-console-log {
    font-size: 0.7rem;
    min-height: 8.5rem;
    padding: 0.85rem 0.75rem 1rem;
  }

  .hero-content h1 {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .addon-panel {
    padding: 1.2rem 1.05rem 1.1rem;
  }

  .addon-panel .plan-features li {
    font-size: 0.8rem;
  }
}
