/* =========================================================
   IoTWonders — Premium Design System
   Hand-written modern CSS. Self-contained. No external fetch.
   ========================================================= */

:root {
  /* Brand */
  --blue: #2563eb;
  --blue-600: #1d4ed8;
  --purple: #7c3aed;
  --cyan: #06b6d4;
  --grad: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grad-soft: linear-gradient(135deg, rgba(37,99,235,.12), rgba(124,58,237,.12));

  /* Light theme (default) */
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --surface: #ffffff;
  --glass: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.9);
  --text: #0b1220;
  --muted: #55617a;
  --line: #e6ebf3;
  --shadow: 0 10px 40px -12px rgba(20, 34, 71, 0.18);
  --shadow-lg: 0 30px 70px -20px rgba(20, 34, 71, 0.28);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --ring: rgba(37, 99, 235, 0.35);
  --header-h: 74px;
}

html[data-theme="dark"] {
  --bg: #070b16;
  --bg-alt: #0b1122;
  --surface: #0f1730;
  --glass: rgba(20, 28, 54, 0.55);
  --glass-border: rgba(120, 140, 200, 0.18);
  --text: #eaf0ff;
  --muted: #9aa8c7;
  --line: rgba(120, 140, 200, 0.16);
  --shadow: 0 12px 45px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  --nav-bg: rgba(9, 14, 28, 0.72);
  --ring: rgba(124, 58, 237, 0.5);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: min(1200px, 92%); margin-inline: auto; }
section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Section headers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
  padding: 7px 14px; border-radius: 100px;
  background: var(--grad-soft);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
html[data-theme="dark"] .eyebrow { color: #a9b6ff; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 14px; font-weight: 700; font-size: .96rem;
  cursor: pointer; border: 1px solid transparent; transition: transform .25s, box-shadow .25s, background .25s;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -10px rgba(37,99,235,.6); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -12px rgba(124,58,237,.6); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--blue); }
.btn-lg { padding: 16px 32px; font-size: 1.02rem; }

/* =========================================================
   Loader
   ========================================================= */
#loader {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg);
  display: grid; place-items: center; transition: opacity .5s, visibility .5s;
}
#loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 62px; height: 62px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--blue); border-right-color: var(--purple);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Scroll progress bar */
#progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1000; background: var(--grad); transition: width .1s; }

/* =========================================================
   Navigation
   ========================================================= */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--header-h);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
header.nav.scrolled { border-color: var(--line); box-shadow: var(--shadow); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.22rem; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 11px; background: var(--grad);
  display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px -6px rgba(37,99,235,.7);
}
.logo-mark svg { width: 21px; height: 21px; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 9px 13px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--muted);
  transition: color .2s, background .2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--grad-soft); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: var(--text);
  transition: transform .2s, border-color .2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--blue); }
.icon-btn svg { width: 19px; height: 19px; }
.sun { display: none; } html[data-theme="dark"] .sun { display: block; } html[data-theme="dark"] .moon { display: none; }

.hamburger { display: none; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 950; background: var(--bg);
  transform: translateX(100%); transition: transform .4s cubic-bezier(.6,.05,.1,1);
  padding: 90px 26px 40px; overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer a { display: block; padding: 15px 6px; font-size: 1.15rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.drawer .btn { width: 100%; margin-top: 22px; }
.drawer-close { position: absolute; top: 20px; right: 22px; }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding-top: calc(var(--header-h) + 60px); overflow: hidden; }
#particles { position: absolute; inset: 0; z-index: 0; }
.hero::before {
  content: ""; position: absolute; z-index: 0; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(37,99,235,.16), transparent 60%),
    radial-gradient(600px 400px at 85% 30%, rgba(124,58,237,.16), transparent 60%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.05fr .95fr; gap: 50px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; font-size: .82rem; font-weight: 600;
  padding: 8px 15px; border-radius: 100px; background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow); margin-bottom: 24px; backdrop-filter: blur(8px);
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); margin-bottom: 22px; }
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.24rem); color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }
.hero-trust { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.hero-trust .stars { color: #f59e0b; letter-spacing: 2px; }

/* Hero visual */
.hero-visual { position: relative; height: 480px; }
.device-card {
  position: absolute; border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(14px); padding: 18px 20px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.dc1 { top: 4%; left: 6%; width: 210px; animation-delay: 0s; }
.dc2 { top: 40%; right: 0; width: 235px; animation-delay: 1.2s; }
.dc3 { bottom: 3%; left: 14%; width: 250px; animation-delay: .6s; }
.device-card .dc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dc-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; color: #fff; }
.dc-ic svg { width: 20px; height: 20px; }
.device-card h4 { font-size: .98rem; }
.device-card small { color: var(--muted); font-size: .78rem; }
.dc-bar { height: 7px; border-radius: 20px; background: var(--line); overflow: hidden; margin-top: 6px; }
.dc-bar i { display: block; height: 100%; background: var(--grad); border-radius: 20px; }
.orbit-ring { position: absolute; inset: 10% 12%; border: 1.5px dashed var(--line); border-radius: 50%; animation: spinSlow 40s linear infinite; }
.orbit-ring::after { content:""; position:absolute; top:-6px; left:50%; width:12px;height:12px;border-radius:50%;background:var(--purple); box-shadow:0 0 16px 2px var(--purple); }
@keyframes spinSlow { to { transform: rotate(360deg); } }

/* =========================================================
   Marquee / trusted logos
   ========================================================= */
.marquee { overflow: hidden; padding: 34px 0; border-block: 1px solid var(--line); background: var(--bg-alt); }
.marquee-label { text-align: center; color: var(--muted); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 20px; }
.marquee-track { display: flex; gap: 60px; width: max-content; animation: scrollx 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-weight: 800; font-size: 1.35rem; color: var(--muted); opacity: .7; white-space: nowrap; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* =========================================================
   Stats
   ========================================================= */
.stats { background: var(--bg-alt); }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 22px; }
.stat {
  text-align: center; padding: 30px 16px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.stat .num { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 800; }
.stat .lbl { color: var(--muted); font-size: .92rem; margin-top: 4px; }

/* =========================================================
   Cards grid (generic)
   ========================================================= */
.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 30px; box-shadow: var(--shadow); transition: transform .35s, box-shadow .35s, border-color .35s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; background: var(--grad-soft); opacity: 0; transition: opacity .35s;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }
.card .ic {
  width: 56px; height: 56px; border-radius: 15px; background: var(--grad); color: #fff;
  display: grid; place-items: center; margin-bottom: 18px; box-shadow: 0 12px 26px -10px rgba(37,99,235,.6);
}
.card .ic svg { width: 27px; height: 27px; }
.card h3 { font-size: 1.24rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; margin-bottom: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: .74rem; font-weight: 600; padding: 5px 11px; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); }

/* =========================================================
   Industries
   ========================================================= */
.ind-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.ind {
  text-align: center; padding: 26px 12px; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); transition: transform .3s, box-shadow .3s; cursor: default;
}
.ind:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--shadow-lg); }
.ind .ic { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 14px; background: var(--grad-soft); color: var(--blue); display: grid; place-items: center; }
html[data-theme="dark"] .ind .ic { color: #a9b6ff; }
.ind .ic svg { width: 26px; height: 26px; }
.ind span { font-weight: 600; font-size: .9rem; }

/* =========================================================
   Technologies (chips)
   ========================================================= */
.tech-wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip {
  padding: 11px 20px; border-radius: 100px; font-weight: 600; font-size: .92rem;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .25s, border-color .25s, color .25s;
}
.chip:hover { transform: translateY(-4px); border-color: var(--blue); color: var(--blue); }

/* =========================================================
   Process timeline
   ========================================================= */
.timeline { position: relative; overflow-x: auto; padding-bottom: 14px; }
.timeline-track { display: flex; gap: 20px; min-width: max-content; padding: 6px; }
.tl-step {
  width: 230px; flex: 0 0 auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 24px; box-shadow: var(--shadow); position: relative; transition: transform .3s;
}
.tl-step:hover { transform: translateY(-6px); }
.tl-num {
  width: 44px; height: 44px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800;
  display: grid; place-items: center; margin-bottom: 14px; font-size: 1.05rem;
}
.tl-step h4 { font-size: 1.06rem; margin-bottom: 6px; }
.tl-step p { color: var(--muted); font-size: .88rem; }

/* =========================================================
   Portfolio / gallery filter
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 38px; }
.filter-btn {
  padding: 9px 18px; border-radius: 100px; font-weight: 600; font-size: .88rem; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); transition: all .25s;
}
.filter-btn.active, .filter-btn:hover { background: var(--grad); color: #fff; border-color: transparent; }

.portfolio-card { padding: 0; }
.portfolio-card .thumb { height: 190px; position: relative; overflow: hidden; }
.portfolio-card .thumb .pattern { position: absolute; inset: 0; background: var(--grad); opacity: .92; }
.portfolio-card .thumb svg.art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.portfolio-card .body { padding: 24px; }
.portfolio-card .cat { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
html[data-theme="dark"] .portfolio-card .cat { color: #a9b6ff; }
.portfolio-card.hide { display: none; }

/* =========================================================
   Case studies
   ========================================================= */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.case .cell { padding: 26px; border: 1px solid var(--line); }
.case .cell h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); margin-bottom: 10px; }
html[data-theme="dark"] .case .cell h4 { color: #a9b6ff; }
.case .cell p, .case .cell li { color: var(--muted); font-size: .94rem; }
.case .cell li { padding-left: 18px; position: relative; margin-bottom: 5px; }
.case .cell li::before { content: "▸"; position: absolute; left: 0; color: var(--blue); }

/* =========================================================
   Testimonials
   ========================================================= */
.testi { display: flex; flex-direction: column; }
.testi .stars { color: #f59e0b; letter-spacing: 2px; margin-bottom: 14px; }
.testi p { font-size: 1.02rem; color: var(--text); font-style: italic; margin-bottom: 20px; }
.testi .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; }
.testi .who strong { display: block; font-size: .95rem; }
.testi .who small { color: var(--muted); }

/* =========================================================
   FAQ accordion
   ========================================================= */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 12px; overflow: hidden; background: var(--surface); }
.faq-q { width: 100%; text-align: left; padding: 20px 22px; font-weight: 700; font-size: 1.02rem; background: none; border: none; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-q .plus { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--grad-soft); transition: transform .3s; font-size: 1.2rem; color: var(--blue); }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 22px 20px; color: var(--muted); }

/* =========================================================
   Blog / Careers / Contact
   ========================================================= */
.blog-card { padding: 0; }
.blog-card .thumb { height: 170px; background: var(--grad); position: relative; overflow: hidden; }
.blog-card .thumb svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.blog-card .body { padding: 24px; }
.blog-card .meta { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.blog-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.read-more { color: var(--blue); font-weight: 700; font-size: .9rem; }

.job { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.job .meta-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--ring); }
.contact-info-item { display: flex; gap: 15px; margin-bottom: 22px; align-items: flex-start; }
.contact-info-item .ic { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 13px; background: var(--grad-soft); color: var(--blue); display: grid; place-items: center; }
html[data-theme="dark"] .contact-info-item .ic { color: #a9b6ff; }
.map-holder { height: 220px; border-radius: 16px; margin-top: 20px; border: 1px solid var(--line); background:
  repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 12px, var(--surface) 12px, var(--surface) 24px);
  display: grid; place-items: center; color: var(--muted); font-weight: 600; }
.form-msg { padding: 12px 16px; border-radius: 12px; background: rgba(34,197,94,.12); color: #16a34a; font-weight: 600; margin-top: 14px; display: none; }
.form-msg.show { display: block; }

/* =========================================================
   CTA band
   ========================================================= */
.cta-band {
  background: var(--grad); color: #fff; border-radius: 28px; padding: clamp(40px, 6vw, 68px);
  text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 20% 10%, rgba(255,255,255,.2), transparent), radial-gradient(400px 200px at 80% 90%, rgba(255,255,255,.15), transparent); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); margin-bottom: 14px; }
.cta-band p { opacity: .92; max-width: 560px; margin: 0 auto 28px; font-size: 1.08rem; }
.cta-band .btn-primary { background: #fff; color: var(--blue-600); box-shadow: 0 14px 34px -10px rgba(0,0,0,.4); }
.cta-band .btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }

/* =========================================================
   Footer
   ========================================================= */
footer.site { background: var(--bg-alt); border-top: 1px solid var(--line); padding-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 34px; padding-bottom: 40px; }
.footer-grid h4 { font-size: .95rem; margin-bottom: 16px; }
.footer-grid a { display: block; color: var(--muted); padding: 5px 0; font-size: .92rem; transition: color .2s; }
.footer-grid a:hover { color: var(--blue); }
.footer-about p { color: var(--muted); margin: 14px 0 18px; font-size: .92rem; }
.socials { display: flex; gap: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; color: var(--text); }
.socials a:hover { background: var(--grad); color: #fff; border-color: transparent; }
.socials svg { width: 18px; height: 18px; }
.newsletter { display: flex; gap: 8px; margin-top: 12px; }
.newsletter input { flex: 1; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line); padding: 22px 0; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }
.footer-bottom .links { display: flex; gap: 18px; flex-wrap: wrap; }

/* =========================================================
   Floating action buttons
   ========================================================= */
.fabs { position: fixed; right: 20px; bottom: 22px; z-index: 700; display: flex; flex-direction: column; gap: 12px; }
.fab {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff;
  box-shadow: var(--shadow-lg); cursor: pointer; border: none; transition: transform .25s; position: relative;
}
.fab:hover { transform: scale(1.1); }
.fab svg { width: 24px; height: 24px; }
.fab.wa { background: #25d366; }
.fab.quote { background: var(--grad); }
.fab.top { background: var(--surface); color: var(--text); border: 1px solid var(--line); opacity: 0; pointer-events: none; transition: opacity .3s, transform .25s; }
.fab.top.show { opacity: 1; pointer-events: auto; }
.fab .tip { position: absolute; right: 64px; top: 50%; transform: translateY(-50%); background: var(--text); color: var(--bg); padding: 6px 12px; border-radius: 8px; font-size: .8rem; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s; }
.fab:hover .tip { opacity: 1; }

/* =========================================================
   Cookie banner + Chat + Modal
   ========================================================= */
.cookie {
  position: fixed; left: 20px; bottom: 22px; z-index: 720; max-width: 380px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow-lg);
  transform: translateY(160%); transition: transform .5s;
}
.cookie.show { transform: translateY(0); }
.cookie p { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.cookie .row { display: flex; gap: 10px; }

.chat-panel {
  position: fixed; right: 20px; bottom: 90px; z-index: 730; width: 340px; max-width: calc(100vw - 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg);
  overflow: hidden; transform: translateY(20px) scale(.96); opacity: 0; pointer-events: none; transition: all .3s;
}
.chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-head { background: var(--grad); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 10px; }
.chat-body { padding: 16px; height: 240px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 10px 14px; border-radius: 14px; font-size: .9rem; max-width: 85%; }
.bubble.bot { background: var(--bg-alt); align-self: flex-start; }
.bubble.me { background: var(--grad); color: #fff; align-self: flex-end; }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }

.modal-overlay { position: fixed; inset: 0; z-index: 940; background: rgba(3,7,18,.6); backdrop-filter: blur(4px); display: none; place-items: center; padding: 20px; }
.modal-overlay.open { display: grid; }
.modal { background: var(--surface); border-radius: 22px; padding: 34px; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); position: relative; }
.modal h3 { font-size: 1.5rem; margin-bottom: 8px; }
.modal p { color: var(--muted); margin-bottom: 20px; }
.modal-close { position: absolute; top: 16px; right: 18px; cursor: pointer; color: var(--muted); background: none; border: none; }

/* Quote calculator result */
.calc-out { margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--grad-soft); border: 1px solid var(--line); font-weight: 700; text-align: center; }

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .ind-grid { grid-template-columns: repeat(4, 1fr); }
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 380px; margin-top: 10px; }
  .g-3, .g-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; }
  .quote-btn-nav { display: none; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .ind-grid { grid-template-columns: repeat(2, 1fr); }
  .g-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .device-card { transform: scale(.85); }
}

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

::selection { background: rgba(124,58,237,.25); }
