/* ============================================================
   POWER MONITOR — Main Stylesheet
   ============================================================ */

/* ---------- Google Fonts ---------- */
/* Loaded via <link> in HTML to avoid @import cascade delay – see <head> */

/* ---------- CSS Variables — Dark (default) ---------- */
:root {
  --bg:          #070c18;
  --bg2:         #0d1526;
  --bg3:         #141e32;
  --card:        #0f172a;
  --card2:       #1a2540;
  --border:      #1e2d4a;
  --border2:     #253557;

  --gold:        #f59e0b;
  --gold-light:  #fbbf24;
  --gold-dark:   #d97706;
  --gold-glow:   rgba(245,158,11,0.18);

  --indigo:      #6366f1;
  --indigo-light:#818cf8;
  --indigo-dark: #4338ca;
  --indigo-glow: rgba(99,102,241,0.18);

  --green:       #10b981;
  --red:         #ef4444;
  --cyan:        #06b6d4;

  --text:        #f1f5f9;
  --text2:       #cbd5e1;
  --text3:       #94a3b8;
  --text4:       #64748b;

  --shadow:      0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.5);
  --radius:      14px;
  --radius-lg:   22px;

  --nav-h:       72px;
  --transition:  0.25s cubic-bezier(.4,0,.2,1);
}

/* ---------- CSS Variables — Light ---------- */
[data-theme="light"] {
  --bg:          #f0f4fc;
  --bg2:         #e4eaf6;
  --bg3:         #d8e0f0;
  --card:        #ffffff;
  --card2:       #eef2fb;
  --border:      #c8d3e8;
  --border2:     #b0bdd8;

  --gold:        #23236A;
  --gold-light:  #2e2e88;
  --gold-dark:   #1a1a52;
  --gold-glow:   rgba(35,35,106,0.14);

  --indigo:      #4f46e5;
  --indigo-light:#6366f1;
  --indigo-dark: #3730a3;
  --indigo-glow: rgba(79,70,229,0.12);

  --green:       #059669;
  --red:         #dc2626;
  --cyan:        #0891b2;

  --text:        #0f172a;
  --text2:       #1e293b;
  --text3:       #475569;
  --text4:       #64748b;

  --shadow:      0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.16);
}

/* Light-mode specific overrides */
[data-theme="light"] #navbar {
  background: rgba(240,244,252,0.85);
}
[data-theme="light"] #navbar.scrolled {
  background: rgba(240,244,252,0.97);
}
[data-theme="light"] .mobile-nav {
  background: rgba(240,244,252,0.98);
}
[data-theme="light"] .hero-bg {
  background:
    radial-gradient(ellipse 80% 60% at 60% 20%, rgba(35,35,106,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 20% 60%, rgba(79,70,229,0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
[data-theme="light"] .hero-grid {
  background-image:
    linear-gradient(rgba(180,195,225,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,195,225,0.5) 1px, transparent 1px);
}
[data-theme="light"] .particle { background: var(--gold); }
[data-theme="light"] .btn-outline {
  border-color: var(--border2);
  color: var(--text);
}
[data-theme="light"] .btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}
[data-theme="light"] .btn-ghost {
  background: rgba(79,70,229,0.08);
  color: var(--indigo);
  border-color: rgba(79,70,229,0.25);
}
[data-theme="light"] .btn-ghost:hover {
  background: rgba(79,70,229,0.15);
  border-color: var(--indigo);
}
[data-theme="light"] .chat-msg.bot .chat-msg-bubble {
  background: var(--bg3);
  color: var(--text2);
}
[data-theme="light"] .chat-window {
  background: var(--bg2);
  border-color: var(--border2);
}
[data-theme="light"] .chat-header {
  background: linear-gradient(135deg, var(--bg3), var(--card2));
}
[data-theme="light"] .chat-input-area { background: var(--bg3); }
[data-theme="light"] .chat-input {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="light"] .special-plan {
  background: linear-gradient(135deg, #eef0ff, #f0f4fe);
}
[data-theme="light"] .pricing-card.featured {
  background: linear-gradient(145deg, #fff, #eeeefc);
}
[data-theme="light"] .stat-num,
[data-theme="light"] .pricing-price,
[data-theme="light"] .hero-stat-num {
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .about-metric-val { color: var(--gold); }
[data-theme="light"] #how-it-works { background: var(--bg2); }
[data-theme="light"] #cta {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%);
}
[data-theme="light"] #cta-bg-glow {
  background: radial-gradient(ellipse at center, rgba(35,35,106,0.07) 0%, transparent 70%);
}
[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #23236A;
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}
[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 8px 32px rgba(245,158,11,0.5);
}
[data-theme="light"] footer { background: var(--bg2); }
/* Light mode: footer text needs darker colour for AA contrast on light bg */
[data-theme="light"] .footer-brand p,
[data-theme="light"] .footer-col h4,
[data-theme="light"] .footer-col ul li a,
[data-theme="light"] .footer-bottom p { color: var(--text2); }
[data-theme="light"] .footer-col ul li a:hover { color: var(--gold); }
.logo-light { display: none; }
[data-theme="light"] .logo-dark  { display: none; }
[data-theme="light"] .logo-light { display: block; }

/* Side toolbar — fixed vertical strip, right edge */
.side-toolbar {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  right: 0;
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 20px rgba(0,0,0,0.25);
  transition: background var(--transition), border-color var(--transition);
}
.side-toolbar-divider {
  width: 20px; height: 1px; background: var(--border); margin: 2px 0;
}
.lang-btn {
  background: none;
  border: 1.5px solid transparent;
  border-radius: 7px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0.55;
  padding: 0;
}
.lang-btn .fi {
  width: 22px; height: 16px;
  border-radius: 3px;
  display: block;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
  flex-shrink: 0;
}
.lang-btn:hover  { opacity: 1; border-color: var(--border2); }
.lang-btn.active { opacity: 1; border-color: var(--gold); background: var(--gold-glow); }

/* Theme toggle button */
.theme-toggle {
  background: none;
  border: 1.5px solid transparent;
  color: var(--text3);
  width: 34px; height: 34px;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--border2); color: var(--gold); }
.theme-toggle .icon-dark  { display: block; }
.theme-toggle .icon-light { display: none; }
[data-theme="light"] .theme-toggle .icon-dark  { display: none; }
[data-theme="light"] .theme-toggle .icon-light { display: block; }

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html { font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  /* NO overflow-x here — setting overflow on body makes it the scroll container on all
     browsers, breaking position:fixed. Each section handles its own overflow instead. */
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ---------- Utility ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.text-gold  { color: var(--gold); }
.text-indigo{ color: var(--indigo-light); }
.text-muted { color: var(--text3); }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px; font-size: 0.78rem;
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.badge-gold   { background: rgba(245,158,11,0.12); color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
[data-theme="light"] .badge-gold { background: rgba(35,35,106,0.10); border-color: rgba(35,35,106,0.28); }
.badge-indigo { background: rgba(99,102,241,0.12); color: var(--indigo-light); border: 1px solid rgba(99,102,241,0.3); }
.badge-green  { background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }

.section-header { text-align: center; margin-bottom: 64px; }
.section-header .badge { margin-bottom: 16px; }
.section-header h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  font-weight: 800; line-height: 1.2; margin-bottom: 16px;
}
.section-header p { font-size: 1.1rem; color: var(--text3); max-width: 600px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  border: none; transition: var(--transition); white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #1a0a00;
  box-shadow: 0 4px 20px rgba(245,158,11,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245,158,11,0.5);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border2);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
.btn-ghost {
  background: rgba(99,102,241,0.1);
  color: var(--indigo-light);
  border: 1.5px solid rgba(99,102,241,0.2);
}
.btn-ghost:hover {
  background: rgba(99,102,241,0.2);
  border-color: var(--indigo-light);
  transform: translateY(-2px);
}
.btn-blue {
  background: #3b82f6;
  color: #fff;
  border: none;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
}
.btn-blue:hover {
  background: #2563eb;
  box-shadow: 0 8px 28px rgba(59,130,246,0.45);
  transform: translateY(-2px);
}
.btn-lg { padding: 17px 36px; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

/* ---------- NAVBAR ---------- */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(7,12,24,0.75);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}
#navbar.scrolled {
  background: rgba(7,12,24,0.95);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { width: 180px; height: auto; }
.nav-links {
  display: flex; align-items: center; gap: 8px;
}
.nav-links a {
  position: relative;
  padding: 8px 14px; border-radius: 8px; font-size: 0.9rem; font-weight: 500;
  color: var(--text2); transition: color var(--transition), background var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; right: 50%;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: left 0.25s ease, right 0.25s ease;
  opacity: 0;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
.nav-links a:hover::after {
  left: 14px; right: 14px;
  opacity: 1;
}
.nav-cta .btn i {
  transition: transform 0.22s ease;
}
.nav-cta .btn:hover i {
  transform: scale(1.2) rotate(-8deg);
}
.nav-cta  { display: flex; align-items: center; gap: 10px; }
.mobile-menu-btn {
  display: none; background: none; border: none; color: var(--text);
  padding: 8px; border-radius: 8px;
}

/* Mobile nav */
.mobile-nav {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: rgba(7,12,24,0.97); backdrop-filter: blur(20px);
  z-index: 999; flex-direction: column; padding: 24px;
  gap: 8px; overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 10px 18px; border-radius: 10px; font-size: 1rem; font-weight: 500;
  color: var(--text2); transition: var(--transition);
  border: 1px solid transparent;
}
.mobile-nav a:hover { background: var(--bg3); color: var(--text); border-color: var(--border); }
.mobile-nav .mobile-cta { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

/* ---------- HERO ---------- */
#hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 80px) 0 100px;
  min-height: 100vh; min-height: 100svh; /* svh = small viewport height — excludes browser chrome on iOS */
  display: flex; align-items: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 60% 20%, rgba(245,158,11,0.10) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 20% 60%, rgba(99,102,241,0.12) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(30,45,74,0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,45,74,0.4) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}
.hero-particles {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute; border-radius: 50%;
  background: var(--gold); opacity: 0.15;
  animation: float linear infinite;
}
@keyframes float {
  0%   { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.15; }
  90%  { opacity: 0.1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-content { max-width: 600px; }
.hero-content .badge { margin-bottom: 20px; }
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900; line-height: 1.1; margin-bottom: 22px;
  letter-spacing: -0.03em;
}
.hero-title span { color: var(--gold); }
.hero-desc {
  font-size: 1.15rem; color: var(--text2); margin-bottom: 36px;
  line-height: 1.7; max-width: 520px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-trial-note { font-size: 0.82rem; color: var(--text4); margin-bottom: 36px; letter-spacing: 0.01em; }
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding-top: 32px; border-top: 1px solid var(--border);
}
.hero-stat-num {
  font-size: 1.8rem; font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label { font-size: 0.8rem; color: var(--text4); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Dashboard mockup */
.hero-visual { position: relative; }
.dashboard-mockup {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 80px rgba(245,158,11,0.08);
}
.mockup-topbar {
  background: var(--bg3); padding: 12px 20px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid var(--border);
}
.mockup-dot { width: 11px; height: 11px; border-radius: 50%; }
.mockup-dot.red   { background: #ef4444; }
.mockup-dot.yellow{ background: #f59e0b; }
.mockup-dot.green { background: #22c55e; }
.mockup-url {
  flex: 1; background: var(--card2); border-radius: 6px;
  padding: 5px 12px; font-size: 0.75rem; color: var(--text4);
  margin-left: 8px;
}
.mockup-body { padding: 20px; }
.mockup-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.mockup-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; text-align: center;
}
.mockup-card-icon { font-size: 1.5rem; margin-bottom: 6px; }
.mockup-card-val { font-size: 1.4rem; font-weight: 800; }
.mockup-card-label { font-size: 0.67rem; color: var(--text4); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.mockup-card.status-ok  .mockup-card-val { color: var(--green); }
.mockup-card.status-warn .mockup-card-val { color: var(--gold); }
.mockup-card.status-err .mockup-card-val { color: var(--red); }
.mockup-alerts { display: flex; flex-direction: column; gap: 8px; }
.mockup-alert {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg3); border-radius: 8px; padding: 10px 14px;
  border-left: 3px solid;
  animation: slide-in 0.4s ease both;
}
.mockup-alert.ok   { border-left-color: var(--green); }
.mockup-alert.warn { border-left-color: var(--gold);  }
.mockup-alert.err  { border-left-color: var(--red);   }
.mockup-alert-icon { font-size: 1rem; }
.mockup-alert-text { font-size: 0.78rem; color: var(--text2); }
.mockup-alert-time { font-size: 0.7rem; color: var(--text4); margin-left: auto; }
@keyframes slide-in { from { opacity:0; transform: translateX(-10px); } to { opacity:1; transform: none; } }
.mockup-pulse {
  position: absolute; top: 20px; right: 20px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

/* ---------- STATS BAND ---------- */
#stats-band {
  padding: 52px 0;
  background: linear-gradient(90deg, var(--bg2) 0%, var(--bg3) 50%, var(--bg2) 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  text-align: center;
}
.stat-num {
  font-size: 2.4rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.stat-label { font-size: 0.85rem; color: var(--text3); margin-top: 6px; }
.stat-divider { width: 1px; background: var(--border); display: none; }

/* ---------- WHAT IS ---------- */
#about .about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
#about .about-text h2 {
  font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 800; line-height: 1.25; margin-bottom: 20px;
}
#about .about-text p { color: var(--text2); font-size: 1.05rem; margin-bottom: 20px; line-height: 1.75; }
.about-features { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; }
.about-feat {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; transition: var(--transition);
}
.about-feat:hover { border-color: var(--border2); transform: translateX(4px); }
.about-feat-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--gold-glow); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.about-feat-title { font-weight: 600; font-size: 0.95rem; }
.about-feat-text  { font-size: 0.85rem; color: var(--text3); margin-top: 2px; }

.about-visual { position: relative; overflow: hidden; }
.about-card-stack { position: relative; }
.about-card-bg {
  position: absolute; inset: 20px 0px -10px 10px;
  background: var(--card2); border-radius: 20px; border: 1px solid var(--border2);
  opacity: 0.5;
}
.about-card-main {
  position: relative; z-index: 1;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px; overflow: hidden;
}
.about-chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.about-chart-title { font-weight: 700; font-size: 1rem; }
.about-chart-badge {
  font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: rgba(16,185,129,0.12); color: var(--green); border: 1px solid rgba(16,185,129,0.3);
}
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 120px; margin-bottom: 8px; }
.chart-bar-group { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; justify-content: flex-end; gap: 4px; }
.chart-bar { width: 100%; border-radius: 6px 6px 0 0; transition: height 1s ease; }
.chart-bar.b1 { background: linear-gradient(to top, var(--indigo), var(--indigo-light)); }
.chart-bar.b2 { background: linear-gradient(to top, var(--gold-dark), var(--gold)); }
.chart-bar-label { font-size: 0.6rem; color: var(--text4); text-align: center; }
.about-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.about-metric {
  background: var(--bg3); border-radius: 10px; padding: 14px;
  border: 1px solid var(--border);
}
.about-metric-val { font-size: 1.5rem; font-weight: 800; color: var(--gold); }
.about-metric-label { font-size: 0.75rem; color: var(--text3); margin-top: 2px; }

/* ---------- MONITORING FEATURES ---------- */
#features { background: var(--bg2); }
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: var(--transition); position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity var(--transition);
}
.feature-card:hover { border-color: var(--border2); transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.feature-card:hover::before { opacity: 1; }
.feature-card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 20px;
}
.feature-card-icon.gold  { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.2); }
.feature-card-icon.purple{ background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.2); }
.feature-card-icon.green { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.2); }
.feature-card-icon.cyan  { background: rgba(6,182,212,0.12); border: 1px solid rgba(6,182,212,0.2); }
.feature-card-icon.red   { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.2); }
.feature-card-icon.orange{ background: rgba(249,115,22,0.12); border: 1px solid rgba(249,115,22,0.2); }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.feature-card p  { font-size: 0.9rem; color: var(--text3); line-height: 1.65; }
.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.feature-tag {
  font-size: 0.72rem; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  color: var(--text3);
}
.feature-card-wide { grid-column: span 3; }
.feature-card-wide-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}

/* ---------- MONITORING DETAIL ---------- */
#monitoring { }
.monitoring-tabs {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 48px;
}
.mon-tab {
  padding: 10px 22px; border-radius: 999px; border: 1.5px solid var(--border);
  background: transparent; color: var(--text3); font-size: 0.9rem; font-weight: 500;
  transition: var(--transition); cursor: pointer;
}
.mon-tab.active, .mon-tab:hover {
  background: var(--gold-glow); border-color: var(--gold); color: var(--gold);
}
.mon-content { display: none; }
.mon-content.active { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.mon-content-text h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.mon-content-text p { color: var(--text2); font-size: 1rem; margin-bottom: 24px; line-height: 1.75; }
.mon-checks { display: flex; flex-direction: column; gap: 10px; }
.mon-check {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.95rem; color: var(--text2);
}
.mon-check-icon { color: var(--green); font-size: 1rem; flex-shrink: 0; }
.mon-visual {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.mon-header { background: var(--bg3); padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.mon-header-title { font-weight: 600; font-size: 0.95rem; }
.pulse-green { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s infinite; box-shadow: 0 0 6px var(--green); }
.pulse-gold  { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse-dot 2s infinite; box-shadow: 0 0 6px var(--gold); }
.pulse-red   { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulse-dot 2s infinite; box-shadow: 0 0 6px var(--red); }
.mon-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.mon-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--bg3); border-radius: 10px; border: 1px solid var(--border);
}
.mon-row-name { font-size: 0.9rem; font-weight: 500; }
.mon-row-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}
.mon-row-status.ok   { background: rgba(16,185,129,0.12); color: var(--green); }
.mon-row-status.warn { background: rgba(245,158,11,0.12); color: var(--gold); }
.mon-row-status.err  { background: rgba(239,68,68,0.12);  color: var(--red); }
.mon-bar-outer { flex: 1; height: 6px; background: var(--bg2); border-radius: 999px; margin: 0 16px; }
.mon-bar-inner { height: 100%; border-radius: 999px; transition: width 1.5s ease; }
.mon-bar-inner.ok   { background: var(--green); }
.mon-bar-inner.warn { background: var(--gold); }
.mon-bar-inner.err  { background: var(--red); }

/* ---------- INVENTORY & REPORTS ---------- */
#inventory { background: var(--bg2); }
.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.inv-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px;
  transition: var(--transition); position: relative;
}
.inv-card:hover { border-color: var(--border2); box-shadow: var(--shadow); }
.inv-card-top { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.inv-card-icon-wrap {
  width: 60px; height: 60px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}
.inv-card-icon-wrap.blue   { background: rgba(6,182,212,0.12); border: 1px solid rgba(6,182,212,0.2); }
.inv-card-icon-wrap.purple { background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.2); }
.inv-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.inv-card p  { color: var(--text3); font-size: 0.95rem; line-height: 1.65; margin-bottom: 20px; }
.inv-list { display: flex; flex-direction: column; gap: 8px; }
.inv-item {
  display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--text2);
  padding: 8px 12px; background: var(--bg3); border-radius: 8px; border: 1px solid var(--border);
}
.inv-item-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.inv-item-dot.gold   { background: var(--gold); }
.inv-item-dot.indigo { background: var(--indigo-light); }
.inv-item-dot.green  { background: var(--green); }
.inv-item-dot.cyan   { background: var(--cyan); }

/* ---------- HOW IT WORKS ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.steps-grid::before {
  content: ''; position: absolute; top: 36px; left: calc(12.5% + 20px); right: calc(12.5% + 20px);
  height: 2px; background: linear-gradient(90deg, var(--border), var(--gold), var(--border));
  z-index: 0;
}
.step-card { text-align: center; position: relative; z-index: 1; }
.step-num {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bg3), var(--card2));
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 900; color: var(--gold);
  margin: 0 auto 20px;
  box-shadow: 0 0 24px rgba(245,158,11,0.2);
}
.step-icon { font-size: 2rem; }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-card p { font-size: 0.875rem; color: var(--text3); line-height: 1.6; }

/* ---------- PRICING ---------- */
#pricing { background: var(--bg2); }
.pricing-intro { text-align: center; margin-bottom: 48px; }
.pricing-intro p { color: var(--text3); font-size: 1rem; max-width: 560px; margin: 0 auto; }
.pricing-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px;
}
.pricing-card {
  background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 20px; text-align: center;
  transition: var(--transition); position: relative; overflow: hidden;
}
.pricing-card:hover { border-color: var(--border2); transform: translateY(-4px); box-shadow: var(--shadow); }
.pricing-card.featured {
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(245,158,11,0.12);
  background: linear-gradient(145deg, var(--card), #1a1500);
}
.pricing-card.featured::before {
  content: 'MAIS POPULAR'; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  color: #1a0a00; padding: 5px 16px; border-radius: 0 0 10px 10px;
}
.pricing-range { font-size: 0.78rem; font-weight: 600; color: var(--text4); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; margin-top: 10px; }
.pricing-price {
  font-size: 2.2rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1;
}
.pricing-period { font-size: 0.8rem; color: var(--text4); margin-top: 4px; margin-bottom: 16px; }
.pricing-items { font-size: 0.85rem; color: var(--text3); }
.pricing-items strong { color: var(--text); }
.pricing-cards-row2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto 16px; }

.pricing-what-is { 
  text-align: center; margin-top: 28px; padding: 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.pricing-what-is p { color: var(--text3); font-size: 0.9rem; }
.pricing-what-is strong { color: var(--text); }

/* Special plan */
.special-plan {
  margin-top: 48px; background: linear-gradient(135deg, #0a1628, #111b35);
  border: 1.5px solid var(--indigo);
  border-radius: var(--radius-lg); padding: 48px;
  position: relative; overflow: hidden;
  box-shadow: 0 0 60px rgba(99,102,241,0.12);
}
.special-plan::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
}
.special-plan-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.special-plan-label {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.3);
  color: var(--indigo-light); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px;
  margin-bottom: 16px;
}
.special-plan h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 16px; line-height: 1.3; }
.special-plan p { color: var(--text2); font-size: 1rem; line-height: 1.7; margin-bottom: 24px; }
.special-perks { display: flex; flex-direction: column; gap: 12px; }
.special-perk {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 0.95rem; color: var(--text2);
}
.special-perk-icon { color: var(--indigo-light); font-size: 1.1rem; margin-top: 2px; flex-shrink: 0; }
.special-cta { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.special-cta-box {
  text-align: center; background: var(--card); border: 1px solid rgba(99,102,241,0.3);
  border-radius: 16px; padding: 32px; width: 100%;
}
.special-cta-box .free-tag {
  font-size: 3rem; font-weight: 900;
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.special-cta-box p { font-size: 0.85rem; color: var(--text3); margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 960px; margin: 0 auto; }
.faq-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.faq-item:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.faq-item.open { border-color: var(--border2); border-left: 3px solid var(--gold); }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; cursor: pointer;
  font-weight: 600; font-size: 0.95rem; gap: 12px;
  transition: background var(--transition), color var(--transition);
}
.faq-question:hover { background: rgba(245,158,11,0.04); color: var(--text); }
.faq-arrow {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg3); display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.faq-item.open .faq-arrow { transform: rotate(180deg); background: var(--gold-glow); color: var(--gold); }
.faq-answer {
  padding: 0 22px; max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding 0.2s ease;
}
.faq-answer p { padding-bottom: 20px; font-size: 0.9rem; color: var(--text3); line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 300px; }
.faq-full { grid-column: span 2; }

/* ---------- CTA SECTION ---------- */
#cta {
  padding: 100px 0; text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 50%, var(--bg) 100%);
  position: relative; overflow: hidden;
}
#cta-bg-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 600px; height: 300px;
  background: radial-gradient(ellipse at center, rgba(245,158,11,0.08) 0%, transparent 70%);
  pointer-events: none;
}
#cta h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; margin-bottom: 18px; position: relative; }
#cta p { font-size: 1.1rem; color: var(--text3); max-width: 520px; margin: 0 auto 36px; position: relative; margin-top: 15px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }
.cta-trial-note { font-size: 0.82rem; color: var(--text4); margin-top: 20px; letter-spacing: 0.01em; position: relative; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--bg2); border-top: 1px solid var(--border); padding: 64px 0 32px;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px;
}
.footer-logo { height: 34px; display: block; margin-bottom: 16px; overflow: visible; }
.footer-brand p { font-size: 0.875rem; color: var(--text4); line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  display: inline-block;
  font-size: 0.875rem; color: var(--text4);
  transition: color var(--transition), transform var(--transition);
}
.footer-col ul li a:hover { color: var(--gold); transform: translateX(4px); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 0.8rem; color: var(--text4); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text4); font-size: 0.9rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}
.footer-social a:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-glow); transform: scale(1.15) rotate(6deg); }
.footer-powertuning { color: var(--gold); font-weight: 600; }

/* ---------- BACK TO HOME BAR (internal pages) ---------- */
.back-to-home-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.back-to-home-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--text3);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.18s;
}
.back-to-home-link i { font-size: 1.2rem; }
.back-to-home-link:hover { color: var(--indigo-light); }
.back-to-home-footer {
  display: block;
  font-size: 0.79rem;
  opacity: 0.7;
  color: inherit;
  text-decoration: none;
  margin-bottom: 8px;
}
.back-to-home-footer:hover { opacity: 1; color: var(--indigo-light); }

/* ---------- FLOATING BUTTONS ---------- */
.float-btn-group { position: fixed; bottom: 28px; right: 28px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }

/* WhatsApp */
.whatsapp-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition); text-decoration: none;
  font-size: 1.6rem;
  animation: wa-bounce 3s infinite;
}
.whatsapp-btn:hover { transform: scale(1.12); box-shadow: 0 8px 30px rgba(37,211,102,0.6); }
@keyframes wa-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Chatbot toggle */
.chat-toggle-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transition: var(--transition); font-size: 1.4rem;
}
.chat-toggle-btn:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }
.chat-toggle-btn .icon-open  { display: block; }
.chat-toggle-btn .icon-close { display: none; }
.chat-toggle-btn.active .icon-open  { display: none; }
.chat-toggle-btn.active .icon-close { display: block; }

/* Chat window */
.chat-window {
  position: fixed; bottom: 106px; right: 28px; z-index: 900;
  width: 380px; max-width: calc(100vw - 56px);
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(0.95); opacity: 0; pointer-events: none;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.3s ease;
  max-height: 540px;
}
.chat-window.open { transform: none; opacity: 1; pointer-events: all; }
.chat-header {
  background: linear-gradient(135deg, #1b213e, #1a2540);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px; display: flex; align-items: center; gap: 12px;
}
.chat-header-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 700; font-size: 0.95rem; }
.chat-header-status { font-size: 0.75rem; color: var(--green); display: flex; align-items: center; gap: 5px; }
.chat-header-status::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  max-height: 320px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 999px; }
.chat-msg { max-width: 88%; }
.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }
.chat-msg-bubble {
  padding: 10px 14px; border-radius: 12px; font-size: 0.875rem; line-height: 1.55;
}
.chat-msg.bot  .chat-msg-bubble { background: var(--card2); color: var(--text2); border-radius: 4px 12px 12px 12px; }
.chat-msg.user .chat-msg-bubble { background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: #fff; border-radius: 12px 4px 12px 12px; }
.chat-msg-bubble a { color: var(--gold); text-decoration: underline; }
.chat-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.chat-quick-btn {
  padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--border2);
  background: transparent; color: var(--text3); font-size: 0.78rem; cursor: pointer;
  transition: var(--transition);
}
.chat-quick-btn:hover { border-color: var(--indigo-light); color: var(--indigo-light); }
.chat-input-area {
  border-top: 1px solid var(--border); padding: 12px 16px;
  display: flex; gap: 8px; align-items: center; background: var(--bg3);
}
.chat-input {
  flex: 1; background: var(--card2); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 10px 14px; color: var(--text); font-size: 0.875rem;
  font-family: inherit; outline: none; transition: border-color var(--transition);
  resize: none; line-height: 1.4;
}
.chat-input:focus { border-color: var(--indigo); }
.chat-send-btn {
  width: 40px; height: 40px; border-radius: 10px; border: none; flex-shrink: 0;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
  color: #fff; font-size: 1rem; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.chat-send-btn:hover { transform: scale(1.08); }
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 4px 2px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text4); animation: typing 1.4s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

/* ---------- ANIMATIONS ---------- */
.fade-up { opacity: 0; transform: translateY(32px); transition: opacity 0.65s ease, transform 0.65s ease; }
.fade-up.visible { opacity: 1; transform: none; }
.fade-in { opacity: 0; transition: opacity 0.65s ease; }
.fade-in.visible { opacity: 1; }
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.2s; }
[data-delay="3"] { transition-delay: 0.3s; }
[data-delay="4"] { transition-delay: 0.4s; }
[data-delay="5"] { transition-delay: 0.5s; }
[data-delay="6"] { transition-delay: 0.6s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1100px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card-wide { grid-column: span 2; }
  .pricing-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 900px) {
  .hero-inner, #about .about-grid, .mon-content.active,
  .special-plan-inner, .inv-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-full { grid-column: span 1; }
  .nav-links, .nav-cta { display: none; }
  .mobile-menu-btn { display: flex; }
  .pricing-cards-row2 { grid-template-columns: 1fr 1fr; }
  .feature-card-wide-inner { grid-template-columns: 1fr; }
  .feature-card-wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-card-wide { grid-column: span 1; }
  .pricing-cards, .pricing-cards-row2 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .btn-lg { padding: 14px 21px; }
  .special-plan { padding: 28px 20px; }
  .special-plan-inner > div { min-width: 0; }
  .special-plan-label { white-space: normal; letter-spacing: 0.04em; font-size: 0.7rem; }
  .special-plan h3 { font-size: 1.35rem; }
  .special-plan p { font-size: 0.9rem; }
  .special-perk { font-size: 0.88rem; }
  .steps-grid { grid-template-columns: 1fr; }
  .monitoring-tabs { gap: 6px; }
  .mon-tab { padding: 8px 14px; font-size: 0.82rem; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-stats { gap: 20px; }
  .chat-window { right: 16px; bottom: 96px; }
  .side-toolbar { top: auto; bottom: 160px; border-radius: 12px 0 0 12px; }
}

/* ============================================================
   MOBILE APP BAR — visible only on ≤ 768px
   Replaces side-toolbar + float-btn-group; adds CTA shortcuts
   ============================================================ */
.mobile-app-bar { display: none; }
.mab-lang-overlay,
.mab-lang-sheet  { display: none; }

@media (max-width: 768px) {
  /* Safe space so page content is not hidden behind the bar */
  body { padding-bottom: 68px; padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }

  /* Hero: increase bottom padding so CTAs/stats are not hidden behind the fixed bar */
  #hero {
    padding-bottom: calc(100px + 68px);
    padding-bottom: calc(100px + 68px + env(safe-area-inset-bottom, 0px));
  }

  /* Mobile nav must stop above the app bar */
  .mobile-nav {
    bottom: 68px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    z-index: 1099;
  }

  /* Hide desktop-only elements superseded by the bar */
  .side-toolbar    { display: none !important; }
  /* WhatsApp + Chat float above the bar, right side — smaller on mobile */
  .float-btn-group {
    display: flex !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    right: 12px;
    gap: 8px;
  }
  .float-btn-group .whatsapp-btn,
  .float-btn-group .chat-toggle-btn {
    width: 46px;
    height: 46px;
    font-size: 1.2rem;
  }

  /* Chat window sits above the bar */
  .chat-window {
    bottom: 76px !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    right: 12px !important;
    max-width: calc(100vw - 24px) !important;
  }

  /* Bar item order: Lang | Install | Monitoring | Demo | Theme */
  #mabLangBtn          { order: 1; }
  #mabInstall          { order: 2; }
  #mabMonitor          { order: 3; }
  #mabDemo             { order: 4; }
  .mobile-app-bar .theme-toggle { order: 5; }

  /* Theme toggle inside the bar: reset fixed size from global .theme-toggle */
  .mobile-app-bar .theme-toggle {
    width: auto;
    height: auto;
    border: none;
    font-size: inherit;
    flex: 1;
  }

  /* ---- Bar container ---- */
  .mobile-app-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1100;
    height: 68px;
    height: calc(68px + env(safe-area-inset-bottom, 0px));
    padding-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: 4px;
    padding-right: 4px;
    /* Solid colour — no backdrop-filter to avoid Safari/iOS rendering bugs */
    background: #0d1526;
    border-top: 1px solid var(--border);
    align-items: stretch;
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.4);
    /* GPU compositing layer — keeps bar above scrolled content on iOS */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }
  /* Light mode: white bar with visible border + shadow so it's not invisible on the light bg */
  [data-theme="light"] .mobile-app-bar {
    background: #ffffff;
    border-top-color: #b8c6de;
    box-shadow: 0 -2px 20px rgba(30, 45, 100, 0.14);
  }

  /* ---- Generic tab item ---- */
  .mab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--text4);
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    padding: 8px 2px 6px;
    transition: color 0.18s, transform 0.12s;
    min-width: 0;
    -webkit-tap-highlight-color: transparent;
    position: relative;
  }
  .mab-btn:active { transform: scale(0.90); }

  .mab-icon { font-size: 1.3rem; line-height: 1; display: block; }

  .mab-label {
    font-size: 0.585rem;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    font-weight: 500;
    letter-spacing: 0.01em;
  }

  /* ---- CTA buttons ---- */
  .mab-cta {
    flex: 1.4;
    border-radius: 12px;
    margin: 7px 6px;
    padding: 5px 4px;
    gap: 2px;
  }
  .mab-cta-primary {
    /* Fixed gold — does NOT change with light theme (--gold becomes blue in light mode) */
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1a0a00 !important;
    box-shadow: 0 2px 14px rgba(245, 158, 11, 0.38);
  }
  .mab-cta-demo {
    background: linear-gradient(135deg, var(--indigo), var(--indigo-dark));
    color: #fff !important;
    box-shadow: 0 2px 14px rgba(79, 70, 229, 0.38);
  }
  .mab-cta .mab-icon  { font-size: 1.1rem; }
  .mab-cta .mab-label { font-weight: 700; }

  /* ---- Central Monitoring button ---- */
  #mabMonitor {
    flex: 1.4;
    border-radius: 12px;
    margin: 7px 6px;
    padding: 5px 4px;
    gap: 2px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff !important;
    box-shadow: 0 2px 14px rgba(14, 165, 233, 0.4);
  }
  #mabMonitor .mab-icon  { font-size: 1.1rem; }
  #mabMonitor .mab-label { font-weight: 700; }

  /* WhatsApp icon colour */
  .mab-icon-wa { color: #25d366 !important; font-size: 1.45rem !important; }

  /* Language flag */
  .mab-flag {
    width: 24px; height: 17px;
    border-radius: 3px;
    display: block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }

  /* Chat active state */
  .mab-btn.mab-chat-active { color: var(--indigo-light); }

  /* ---- Language overlay ---- */
  .mab-lang-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1099;
    background: rgba(0, 0, 0, 0.5);
  }
  .mab-lang-overlay.open { display: block; }

  /* ---- Language bottom sheet ---- */
  .mab-lang-sheet {
    display: flex;
    position: fixed;
    bottom: 68px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    left: 0; right: 0;
    z-index: 1100;
    background: var(--card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    padding: 8px 16px 20px;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
    /* 100% = own height, 68px = bar height — guarantees sheet is fully off-screen when closed */
    transform: translateY(calc(100% + 68px));
    transform: translateY(calc(100% + 68px + env(safe-area-inset-bottom, 0px)));
    transition: transform 0.3s cubic-bezier(.4, 0, .2, 1);
    pointer-events: none;
  }
  .mab-lang-sheet.open { transform: none; pointer-events: all; }
  [data-theme="light"] .mab-lang-sheet { background: var(--bg2); }

  .mab-lang-sheet-handle {
    width: 40px; height: 4px;
    background: var(--border2);
    border-radius: 999px;
    margin: 4px auto 8px;
    flex-shrink: 0;
  }

  .mab-lang-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    background: none;
    border: 1.5px solid var(--border);
    color: var(--text2);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-align: left;
    width: 100%;
    -webkit-tap-highlight-color: transparent;
  }
  .mab-lang-option:hover,
  .mab-lang-option:active { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }
  .mab-lang-option.active { border-color: var(--gold); color: var(--gold); background: var(--gold-glow); }

  .mab-lang-option .fi {
    width: 26px; height: 19px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  }
}

/* ========================================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================================== */

/* ── Skip-to-content link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--gold);
  color: #1a0a00;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 0 0 10px 10px;
  z-index: 9999;
  transition: top 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.skip-link:focus { top: 0; }

/* ── Focus-visible indicators ── */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(245,158,11,0.2);
}
.lang-btn:focus-visible  { outline-color: var(--indigo-light); }
.mon-tab:focus-visible   { outline-color: var(--gold); }
.chat-input:focus-visible { outline: none; } /* styled via border-color */
.faq-question:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  border-radius: var(--radius);
}

/* ── prefers-reduced-motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up, .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .particle { display: none; }
  .whatsapp-btn { animation: none; }
  .chat-toggle-btn { transition: none; }
}

/* ========================================================
   PERFORMANCE — content-visibility for off-screen sections
   ======================================================== */
#about, #features, #monitoring, #inventory, #how-it-works, #pricing, #faq {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}