/* =========================================================================
   Vigiar Sistemas - base styles shared by every page
   Dark first (security/tech look), light theme by the sun/moon button
   ========================================================================= */

:root {
  --bg: #07090c;
  --bg-2: #0b0f14;
  --surface: #10151c;
  --surface-2: #161c25;
  --surface-3: #1d2530;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #eef2f6;
  --text-muted: #98a4b4;
  --primary: #ff6a13;
  --primary-2: #ffa24a;
  --primary-text: #ff8a3d;
  --primary-soft: rgba(255, 106, 19, .12);
  --on-primary: #140800;
  --whatsapp: #25d366;
  --success: #31d07a;
  --danger: #ff5d5d;
  --glow: rgba(255, 106, 19, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .45);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --container: 1200px;
  --header-h: 72px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-title: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  /* Device drawings */
  --d-body: #e7ebf0;
  --d-shade: #b4bdc9;
  --d-dark: #141920;
  --d-lens: #3b4757;
  --d-key: #cfd6df;
  --d-bars: #7d8899;
  --d-floor: rgba(0, 0, 0, .45);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-2: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e7eaef;
  --border: rgba(10, 20, 35, .09);
  --border-strong: rgba(10, 20, 35, .18);
  --text: #0c1117;
  --text-muted: #566170;
  --primary-text: #b84700;
  --primary-soft: rgba(255, 106, 19, .1);
  --glow: rgba(255, 106, 19, .22);
  --shadow-sm: 0 1px 2px rgba(10, 20, 35, .06), 0 1px 3px rgba(10, 20, 35, .08);
  --shadow-md: 0 12px 32px rgba(10, 20, 35, .10);
  --shadow-lg: 0 30px 80px rgba(10, 20, 35, .16);
  --d-body: #ffffff;
  --d-shade: #c9d0da;
  --d-dark: #1a2029;
  --d-floor: rgba(10, 20, 35, .1);
  color-scheme: light;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* clip (not hidden): cuts sideways overflow without turning body into a scroll box, which would break position: sticky */
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p a, .faq a, .section-head a { color: var(--primary-text); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-title); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--primary); color: var(--on-primary); }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; }
.skip-link:focus { top: 12px; }

/* Highlighted words look like a camera detection box: corner brackets + a small label (data-label) */
.frame-word {
  --c: var(--primary);
  position: relative; display: inline-block; padding: 0 .14em; margin: 0 -.02em; color: var(--primary-text);
  background:
    linear-gradient(var(--c), var(--c)) left top / .32em 2px, linear-gradient(var(--c), var(--c)) left top / 2px .32em,
    linear-gradient(var(--c), var(--c)) right top / .32em 2px, linear-gradient(var(--c), var(--c)) right top / 2px .32em,
    linear-gradient(var(--c), var(--c)) left bottom / .32em 2px, linear-gradient(var(--c), var(--c)) left bottom / 2px .32em,
    linear-gradient(var(--c), var(--c)) right bottom / .32em 2px, linear-gradient(var(--c), var(--c)) right bottom / 2px .32em;
  background-repeat: no-repeat;
}
/* A top margin on an inline-block grows its line, leaving room for the label above the word */
.frame-word[data-label] { margin-top: 22px; }
.frame-word[data-label]::after {
  content: attr(data-label); position: absolute; left: 0; bottom: 100%; margin-bottom: 4px;
  padding: 3px 6px; background: var(--primary); color: var(--on-primary);
  font: 700 clamp(.55rem, .9vw, .68rem)/1 var(--font-mono); letter-spacing: .08em; white-space: nowrap;
}

.kicker {
  display: flex; align-items: center; gap: 10px; margin: 0 0 18px;
  font: 500 .76rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted);
}
.kicker::before { content: ''; width: 8px; height: 8px; background: var(--primary); flex-shrink: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn i { font-size: 1.2em; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(180deg, #ff7a26, var(--primary)); color: var(--on-primary); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 8px 24px -8px var(--glow); }
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .2) inset, 0 12px 32px -6px var(--glow); }
.btn-ghost { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-muted); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-text); }
.btn-whatsapp { background: var(--whatsapp); color: #04210f; }
.btn-whatsapp:hover { box-shadow: 0 10px 28px -8px rgba(37, 211, 102, .55); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.added { background: var(--success); color: #03200f; border-color: transparent; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  font-size: 1.3rem; transition: background .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--primary); color: var(--on-primary);
  font-size: .72rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg);
}
.badge[hidden] { display: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 .76rem/1.2 var(--font-mono); text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-muted); margin-bottom: 16px;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--primary); flex-shrink: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px;
  border-radius: 999px; background: var(--primary-soft); color: var(--primary-text);
  font-size: .8rem; font-weight: 600; border: 1px solid rgba(255, 106, 19, .25);
}
.chip i { font-size: 1.05rem; }
.lead { font-size: 1.13rem; color: var(--text-muted); max-width: 620px; }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--primary-text); font-size: .92rem; }
.link-arrow i { transition: transform .2s; }
a:hover .link-arrow i { transform: translateX(4px); }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--bg-2); border-bottom: 1px solid var(--border); font-size: .82rem; color: var(--text-muted); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar i { color: var(--primary-text); vertical-align: -2px; }
.topbar-links { display: flex; gap: 20px; }
.topbar-links a:hover { color: var(--text); }

.header {
  position: sticky; top: 0; z-index: 90; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 100%; }
.brand { flex-shrink: 0; }
.brand-logo { display: inline-flex; align-items: center; gap: 10px; }
.brand-icon { filter: drop-shadow(0 4px 14px var(--glow)); }
.brand-icon .arc { animation: signal 2.4s ease-in-out infinite; }
.brand-icon .arc-3 { animation-delay: .3s; }
@keyframes signal { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-title); font-weight: 700; font-size: 1.4rem; letter-spacing: .04em; }
.brand-tagline { font-size: .62rem; text-transform: uppercase; letter-spacing: .2em; color: var(--text-muted); margin-top: 4px; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.main-nav > a, .nav-item > a {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 999px;
  font-size: .93rem; font-weight: 500; color: var(--text-muted); transition: color .2s, background .2s;
}
.main-nav > a:hover, .nav-item > a:hover, .main-nav .is-active { color: var(--text); background: var(--surface-2); }
.nav-mobile-cta { display: none !important; }

.nav-item { position: relative; }
.mega {
  position: absolute; top: calc(100% + 14px); left: -20px; width: 640px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 14px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.has-mega:hover .mega, .has-mega:focus-within .mega, .has-mega.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.mega-grid a { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; transition: background .2s; }
.mega-grid a:hover { background: var(--surface-2); }
.mega-grid i { font-size: 1.35rem; color: var(--primary-text); background: var(--primary-soft); border-radius: 10px; padding: 8px; }
.mega-grid strong { display: block; font-size: .93rem; }
.mega-grid small { color: var(--text-muted); font-size: .8rem; }
.mega-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: .88rem; color: var(--text-muted); }
.mega-cta strong { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-toggle { display: none; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-tight { padding: 56px 0 96px; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
.section-head p { color: var(--text-muted); font-size: 1.08rem; margin: 0; }
.section-head-left { margin: 0 0 56px; text-align: left; max-width: 780px; }
.section-head-left h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -.035em; }
.section-head-row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; text-align: left; }

.hero-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.grid-lines {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; }
.glow-1 { width: 560px; height: 560px; background: radial-gradient(circle, rgba(255, 106, 19, .55), transparent 65%); top: -180px; right: -120px; animation: float 14s ease-in-out infinite; }
.glow-2 { width: 420px; height: 420px; background: radial-gradient(circle, rgba(255, 170, 80, .3), transparent 65%); bottom: -200px; left: -120px; animation: float 18s ease-in-out infinite reverse; }
[data-theme="light"] .glow { opacity: .35; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40px, 30px); } }

.page-hero { position: relative; padding: 96px 0 72px; border-bottom: 1px solid var(--border); overflow: hidden; }
.page-hero-sm { padding: 64px 0 48px; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); max-width: 860px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-muted); margin-bottom: 22px; }
.crumbs a:hover { color: var(--text); }
.crumbs i { opacity: .6; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

/* Reveal on scroll (the class js-reveal is set in the layout only when supported) */
.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
.js-reveal .reveal.visible { opacity: 1; transform: none; }

/* ---------- Device drawings ---------- */
.device-art { width: 100%; height: auto; overflow: visible; }
.d-body { fill: var(--d-body); }
.d-shade { fill: var(--d-shade); }
.d-dark { fill: var(--d-dark); }
.d-lens { fill: var(--d-lens); }
.d-glint { fill: #fff; opacity: .8; }
.d-accent { fill: var(--primary); }
.d-led { fill: var(--success); animation: blink 2s ease-in-out infinite; }
.d-ledoff { fill: var(--d-lens); }
.d-floor { fill: var(--d-floor); }
.d-key rect, .d-key { fill: var(--d-key); }
.d-bars rect, .d-bars { fill: var(--d-bars); }
.d-wave, .d-arrow, .d-face-scan { stroke: var(--primary); }
.d-wire { stroke: var(--d-shade); }
.d-print { stroke: var(--on-primary); }
.d-screen-dots circle { fill: #7f8b9c; }
.d-screen-text { fill: var(--success); font: 700 10px var(--font-body); letter-spacing: .12em; }
.d-wave path { animation: blink 2.4s ease-in-out infinite; }
.d-wave path:nth-child(2) { animation-delay: .4s; }
.scanline { animation: scan 2.6s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes scan { 0%, 100% { transform: translateY(-22px); } 50% { transform: translateY(26px); } }

/* ---------- Product card (home, store, solution pages) ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-grid-3 { grid-template-columns: repeat(3, 1fr); }
.product-card {
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.product-card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-media {
  position: relative; display: grid; place-items: center; aspect-ratio: 5 / 4; padding: 28px 32px 18px;
  background: radial-gradient(circle at 50% 35%, var(--surface-3), var(--surface-2) 70%);
  border-bottom: 1px solid var(--border);
}
.product-media .device-art { max-width: 200px; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.product-card:hover .device-art { transform: scale(1.06) rotate(-1deg); }
.tag { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 4px 10px; border-radius: 999px; font-size: .72rem; font-weight: 700; background: var(--text); color: var(--bg); }
.tag-off { left: auto; right: 14px; background: var(--primary); color: var(--on-primary); }
.pdp-price .tag-off, .was .tag-off { position: static; }
.product-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 18px 20px; flex: 1; }
.product-brand { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); font-weight: 600; }
.product-body h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; margin: 0; }
.product-body h3 a:hover { color: var(--primary-text); }
.price { display: flex; flex-direction: column; margin: 6px 0 14px; margin-top: auto; padding-top: 8px; }
.price s { font-size: .82rem; color: var(--text-muted); }
.price strong { font-family: var(--font-title); font-size: 1.45rem; letter-spacing: -.01em; }
.price strong small { font-family: var(--font-body); font-size: .75rem; font-weight: 600; color: var(--success); }
.price span { font-size: .82rem; color: var(--text-muted); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); counter-increment: step; }
.step::after { content: '0' counter(step); position: absolute; top: 20px; right: 24px; font-family: var(--font-title); font-size: 2.6rem; font-weight: 700; color: var(--border-strong); line-height: 1; }
.step-icon, .feature-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-text); font-size: 1.6rem; border: 1px solid rgba(255, 106, 19, .25); margin-bottom: 18px; }
.step h3 { font-size: 1.2rem; }
.step p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* ---------- Checklist ---------- */
.check-list { display: grid; gap: 12px; margin: 24px 0 30px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-muted); }
.check-list i { flex-shrink: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-size: 1rem; margin-top: 1px; }
.check-list strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { font-size: 1.3rem; color: var(--primary-text); transition: transform .25s; flex-shrink: 0; }
.faq details[open] summary i { transform: rotate(45deg); }
.faq details p { padding: 0 24px 22px; margin: 0; color: var(--text-muted); }

/* ---------- Quote list drawer ---------- */
.overlay { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 130; width: min(420px, 100%); height: 100%;
  display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-strong);
  /* Hidden in place (clipped), never pushed off-screen: off-screen fixed boxes widen the page on phones */
  clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path .4s cubic-bezier(.2, .7, .2, 1), visibility 0s .4s; box-shadow: var(--shadow-lg);
}
.drawer.open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .4s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
.drawer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 24px; border-bottom: 1px solid var(--border); }
.drawer-header h2 { font-size: 1.35rem; margin-bottom: 4px; }
.drawer-header p { margin: 0; color: var(--text-muted); font-size: .9rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer-empty { text-align: center; color: var(--text-muted); padding: 48px 12px; }
.drawer-empty i { font-size: 3rem; color: var(--border-strong); }
.list-item { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list-item strong { font-size: .93rem; font-weight: 600; }
.list-item small { color: var(--text-muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 999px; }
.qty button { width: 30px; height: 30px; border: 0; background: none; font-size: 1rem; color: var(--text); }
.qty span { min-width: 22px; text-align: center; font-weight: 600; font-size: .9rem; }
.list-remove { border: 0; background: none; color: var(--text-muted); font-size: .8rem; padding: 0; justify-self: start; }
.list-remove:hover { color: var(--danger); }
.drawer-footer { padding: 20px 24px 24px; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.drawer-footer[hidden] { display: none; }
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; color: var(--text-muted); }
.drawer-total strong { font-family: var(--font-title); font-size: 1.4rem; color: var(--text); }

.toasts { position: fixed; bottom: calc(100px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 150; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 18px; white-space: nowrap; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); animation: toast-in .3s ease; }
.toast i { color: var(--primary); font-size: 1.2rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Phones: quote list bar fixed at the bottom ---------- */
.cartbar { display: none; }
@media (max-width: 900px) {
  .cartbar {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 100;
    display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--border-strong);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-lg);
    animation: cartbar-in .35s cubic-bezier(.2, .7, .2, 1);
  }
  .cartbar.bump { animation: cartbar-bump .45s ease; }
  .cartbar-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 4px; border: 0; background: none; text-align: left; }
  .cartbar-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); font-size: 1.35rem; }
  .cartbar-icon b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font-size: .7rem; border: 2px solid var(--surface); }
  .cartbar-text { display: grid; line-height: 1.15; min-width: 0; }
  .cartbar-text strong { font-family: var(--font-title); font-size: 1.05rem; white-space: nowrap; }
  .cartbar-text small { font-size: .74rem; color: var(--text-muted); white-space: nowrap; }
  .cartbar .btn { flex-shrink: 0; padding: 12px 16px; font-size: .9rem; }
  /* Room so the bar never covers the end of the page, and one WhatsApp button at a time */
  body.has-cartbar { padding-bottom: 84px; }
  body.has-cartbar .wa-float { display: none; }
}
@keyframes cartbar-in { from { transform: translateY(120%); opacity: 0; } }
@keyframes cartbar-bump { 30% { transform: scale(1.04); } 60% { transform: scale(.98); } }
@media (max-width: 360px) {
  .cartbar .btn { padding: 12px; font-size: 0; gap: 0; }
  .cartbar .btn i { font-size: 1.5rem; }
}

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 100; display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--whatsapp); color: #04210f; font-weight: 700; font-size: .92rem;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6); transition: transform .2s;
}
.wa-float i { font-size: 1.8rem; }
.wa-float:hover { transform: translateY(-3px); }
.wa-float::before { content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--whatsapp); animation: ring 2.4s ease-out infinite; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.35); opacity: 0; } }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); margin-top: 0; }
.footer-cta {
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  padding-top: 64px; padding-bottom: 64px; border-bottom: 1px solid var(--border);
}
.footer-cta h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 620px; margin-bottom: 10px; }
.footer-cta p { color: var(--text-muted); margin: 0; }
.footer-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 56px; padding-bottom: 48px; }
.footer-brand p { color: var(--text-muted); font-size: .93rem; margin: 18px 0; max-width: 300px; }
.social { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .93rem; }
.social i { font-size: 1.4rem; color: var(--primary-text); }
.footer-links h3 { font-family: var(--font-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted); margin-bottom: 16px; font-weight: 600; }
.footer-links a, .footer-links p { display: block; font-size: .93rem; margin-bottom: 10px; color: var(--text); }
.footer-links p { color: var(--text-muted); }
.footer-links a:hover { color: var(--primary-text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0 96px; font-size: .82rem; color: var(--text-muted); }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--text); }

/* "Desenvolvido por NGTech Solutions": grey logo that lights up on hover */
.dev-credit { display: inline-flex; align-items: center; gap: .5em; color: var(--text-muted); font-size: .85rem; transition: color .2s; }
.dev-credit .ng-logo { flex-shrink: 0; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.dev-credit strong { font-weight: 700; transition: color .2s; }
.dev-credit:hover, .dev-credit:hover strong { color: var(--text); }
.dev-credit:hover .ng-logo { filter: none; opacity: 1; }

/* NGTech logo: the pieces of the "N" come together, a shine passes, then it starts over */
.ng-logo { display: block; overflow: visible; }
.ng-animated .ng-piece { transform-box: fill-box; transform-origin: center; animation: ng-assemble 4.8s cubic-bezier(.3, .7, .2, 1) infinite; }
.ng-animated .ng-left { --from: translate(-18%, -12%) rotate(-8deg); }
.ng-animated .ng-right { --from: translate(18%, -14%) rotate(8deg); animation-delay: .15s; }
.ng-animated .ng-bottom { --from: translate(10%, 22%) rotate(-6deg); animation-delay: .3s; }
.ng-animated .ng-shine { animation: ng-shine 4.8s ease-in-out infinite; }
@keyframes ng-assemble {
  0% { opacity: 0; transform: var(--from) scale(.85); }
  14%, 82% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: scale(.92); }
}
@keyframes ng-shine {
  0%, 30% { transform: skewX(-20deg) translateX(0); }
  62%, 100% { transform: skewX(-20deg) translateX(560px); }
}
.dev-credit:hover .ng-animated .ng-piece, .dev-credit:hover .ng-animated .ng-shine { animation-duration: 2.4s; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field span { font-size: .88rem; font-weight: 600; }
.field input, .field textarea, .field select, .search-field input, .select-field select {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .search-field input:focus, .select-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.field textarea { resize: vertical; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-cta { display: none; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  /* The header's blur (backdrop-filter) would make the fixed menu live inside the header,
     so it is turned off while the menu is open; --nav-top is the header's bottom (set in site.js) */
  .header.menu-open { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .main-nav {
    position: fixed; top: var(--nav-top, calc(var(--header-h) + 38px)); left: 0; right: 0; bottom: 0; margin: 0; z-index: 95;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 20px 24px 40px;
    background: var(--bg); overflow-y: auto; clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path .35s cubic-bezier(.2, .7, .2, 1), visibility 0s .35s;
  }
  .header.menu-open .main-nav { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .35s cubic-bezier(.2, .7, .2, 1), visibility 0s; }
  .main-nav > a, .nav-item > a { font-size: 1.1rem; padding: 14px 12px; border-radius: 12px; }
  .nav-item > a i { margin-left: auto; transition: transform .25s; }
  .has-mega.open > a i { transform: rotate(180deg); }
  .main-nav > a.nav-mobile-cta { color: var(--on-primary); justify-content: center; font-weight: 700; }
  .header.menu-open ~ .wa-float { display: none; }
  .mega { position: static; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 8px; background: none; display: none; }
  .has-mega.open .mega { display: block; }
  .mega-grid { grid-template-columns: 1fr; }
  .mega-cta { display: none; }
  .nav-mobile-cta { display: inline-flex !important; margin-top: 16px; padding: 16px !important; }
  .section { padding: 80px 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .topbar-inner > span:first-child { display: none; }
  .topbar-links { width: 100%; justify-content: space-between; }
  .brand-tagline { display: none; }
  .product-grid, .product-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-media { padding: 18px; }
  .product-body { padding: 14px; }
  .price strong { font-size: 1.15rem; }
  .product-card .btn { padding: 11px 8px; font-size: .86rem; }
  .hide-sm { display: none; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .section-head { margin-bottom: 40px; }
  .wa-float span { display: none; }
  .wa-float { padding: 14px; }
  .icon-btn { width: 40px; height: 40px; }
}

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