/* ==========================================================================
   AUMIC ENGINEERING — Demo site design system
   Dark industrial theme in the spirit of Titans of CNC, built around
   Aumic's own brand blue. No external fonts/scripts — system font stack
   keeps this at zero third-party requests.
   ========================================================================== */

:root {
  --bg: #08090c;
  --bg-alt: #111319;
  --bg-elev: #171a22;
  --bg-elev-2: #1e222c;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --blue: #2554e8;
  --blue-light: #5c85ff;
  --blue-dark: #0f2276;
  --blue-glow: rgba(37, 84, 232, 0.35);

  --steel: #97a1b3;
  --silver: #d7dce4;
  --white: #f6f7fa;

  --ok: #2fbf71;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1240px;
  --radius: 6px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);

  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--silver);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  color: var(--white);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); text-transform: uppercase; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); text-transform: uppercase; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; color: var(--steel); }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--blue-light);
  display: inline-block;
}

.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-light); }
.btn-outline { border-color: var(--line-strong); color: var(--white); }
.btn-outline:hover { border-color: var(--blue-light); color: var(--blue-light); }
.btn-ghost { color: var(--white); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-ghost::after { content: "→"; margin-left: 6px; transition: transform 0.2s ease; }
.btn-ghost:hover::after { transform: translateX(4px); }
.btn-block { width: 100%; }
.btn-lg { padding: 18px 36px; font-size: 0.9rem; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--blue-dark);
  color: var(--silver);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.topbar .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 38px;
}
.topbar-marquee {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 32px, #000 calc(100% - 32px), transparent);
}
.topbar-track {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  animation: topbarScroll 26s linear infinite;
}
.topbar-marquee:hover .topbar-track { animation-play-state: paused; }
.topbar-msg {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}
.topbar-msg span { display: inline-flex; align-items: center; }
.topbar-msg span:not(:last-child)::after {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--blue-light);
  margin: 0 28px;
  flex-shrink: 0;
}
@keyframes topbarScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .topbar-track { animation: none; }
}
.topbar-links { display: flex; gap: 20px; flex-shrink: 0; }
.topbar-links a { color: var(--steel); transition: color 0.15s; }
.topbar-links a:hover { color: var(--white); }
.topbar-links a strong { color: var(--white); font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(8, 9, 12, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 38px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--silver);
  border-radius: 3px;
  transition: color 0.15s ease, background 0.15s ease;
}
.main-nav a:hover { color: var(--white); background: var(--bg-elev); }
.main-nav a.active { color: var(--white); }
.main-nav a.active { position: relative; }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 5px;
  height: 2px;
  background: var(--blue-light);
}

.header-cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header-cta .btn { padding: 12px 20px; }
.header-phone { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--white); display: block; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  animation: heroZoom 22s ease-in-out infinite alternate;
  opacity: 0.55;
}
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,9,12,0.55) 0%, rgba(8,9,12,0.35) 40%, rgba(8,9,12,0.92) 100%),
    linear-gradient(90deg, rgba(8,9,12,0.92) 0%, rgba(8,9,12,0.35) 55%, rgba(8,9,12,0.55) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 780px; padding: 140px 0 100px; }
.hero-content p.lead { font-size: 1.15rem; color: var(--silver); max-width: 560px; }
.hero-actions { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 26px; margin-top: 56px; flex-wrap: wrap; align-items: center; }
.hero-badges .badge { display: flex; align-items: center; gap: 10px; color: var(--steel); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.hero-badges .badge svg { flex-shrink: 0; color: var(--blue-light); }

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--steel); font-size: 0.7rem; letter-spacing: 0.15em;
  text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll::after {
  content: ""; width: 1px; height: 34px; background: linear-gradient(var(--blue-light), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine { 0%{opacity:0.2} 50%{opacity:1} 100%{opacity:0.2} }

/* ---------- Page header (inner pages) ---------- */
.page-hero {
  position: relative;
  padding: 168px 0 72px;
  background: linear-gradient(180deg, #0c0e13 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero-bg { position: absolute; inset: 0; z-index: 1; opacity: 0.22; }
.page-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,12,0.4), var(--bg) 92%); }
.breadcrumb { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--white); }
.breadcrumb span { margin: 0 8px; opacity: 0.5; }

/* ---------- Team band (photo banner, no individual photos available) ---------- */
.team-band {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #000;
}
.team-band-media { position: absolute; inset: 0; }
.team-band-media img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.team-band-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,9,12,0.95) 0%, rgba(8,9,12,0.75) 45%, rgba(8,9,12,0.5) 100%);
}
.team-band .container { position: relative; z-index: 2; }
.team-band-content { max-width: 620px; }
.team-band-content p { font-size: 1.02rem; }

/* ---------- Stats ---------- */
.stats-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 46px 24px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
.stat .num {
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.stat .num span.suffix { color: var(--blue-light); }
.stat .label { margin-top: 6px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); font-weight: 700; }

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

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--bg-elev-2); }
.card .icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-dark);
  border-radius: 8px;
  color: var(--blue-light);
  margin-bottom: 20px;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.94rem; }
.card .num-tag { font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em; color: var(--blue-light); margin-bottom: 14px; display: block; }

/* Service detail row (services page) */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
.service-row:last-child { border-bottom: 0; }
.service-row.reverse .service-media { order: 2; }
.service-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.service-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-index { font-size: 0.8rem; font-weight: 800; color: var(--blue-light); letter-spacing: 0.1em; margin-bottom: 14px; }
.service-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.service-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--silver); font-size: 0.94rem; }
.service-list li svg { color: var(--blue-light); flex-shrink: 0; margin-top: 3px; }

/* ---------- Industries ---------- */
.industry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.industry-tile {
  background: var(--bg);
  padding: 40px 24px;
  text-align: center;
  transition: background 0.2s ease;
}
.industry-tile:hover { background: var(--bg-elev); }
.industry-tile .icon { color: var(--blue-light); margin-bottom: 16px; }
.industry-tile h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.04em; margin: 0; }

/* ---------- Certifications strip ---------- */
.certs-strip { padding: 44px 0; border-top: 1px solid var(--line); }
.certs-row { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.certs-row .cert-name { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); font-weight: 700; }

.cert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.cert-badge img { height: 46px; width: auto; display: block; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  padding: 90px 0;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, var(--blue-dark) 0%, var(--bg) 65%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-band h2 { max-width: 760px; margin-left: auto; margin-right: auto; }
.cta-band .btn { margin-top: 30px; }

/* ---------- Gallery ---------- */
.gallery-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.gallery-filters button {
  background: transparent; border: 1px solid var(--line-strong); color: var(--steel);
  padding: 9px 18px; border-radius: 30px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: all 0.15s ease;
}
.gallery-filters button:hover { color: var(--white); border-color: var(--blue-light); }
.gallery-filters button.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer; background: var(--bg-elev);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 16px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent);
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--white);
  opacity: 0; transform: translateY(8px); transition: all 0.25s ease;
}
.gallery-item:hover .cap { opacity: 1; transform: translateY(0); }

.lightbox {
  position: fixed; inset: 0; z-index: 1000; background: rgba(4,5,7,0.94);
  display: none; align-items: center; justify-content: center; padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 84vh; border-radius: 4px; box-shadow: var(--shadow); }
.lightbox-close {
  position: absolute; top: 24px; right: 28px; background: none; border: 0;
  color: var(--white); font-size: 2rem; cursor: pointer; line-height: 1;
}

/* ---------- Testimonial ---------- */
.quote-block {
  border-left: 3px solid var(--blue);
  padding-left: 32px;
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 600;
  line-height: 1.5;
}
.quote-attrib { margin-top: 20px; font-size: 0.85rem; color: var(--steel); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

/* ---------- About page bits ---------- */
.timeline { display: grid; gap: 0; margin-top: 20px; }
.timeline-item { display: grid; grid-template-columns: 90px 1fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.timeline-item:first-child { border-top: 0; }
.timeline-year { font-weight: 800; color: var(--blue-light); font-size: 1.1rem; }

.value-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.value-list li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.value-list .n { font-weight: 800; color: var(--blue-light); font-size: 1.1rem; }
.value-list h4 { margin: 0 0 4px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.03em; }
.value-list p { font-size: 0.92rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: start; }
.contact-cards { display: grid; gap: 16px; margin-bottom: 32px; }
.contact-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); }
.contact-card .icon { width: 42px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--blue-dark); border-radius: 8px; color: var(--blue-light); }
.contact-card h4 { margin: 0 0 4px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--steel); }
.contact-card a, .contact-card div.val { color: var(--white); font-weight: 700; font-size: 1rem; }
.contact-card a:hover { color: var(--blue-light); }

.form-panel { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 13px 14px; color: var(--white); font-family: var(--font); font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-light); }
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 0.78rem; color: var(--steel); margin-top: 14px; }
.form-status { margin-top: 16px; padding: 12px 14px; border-radius: 4px; font-size: 0.85rem; font-weight: 700; display: none; }
.form-status.ok { display: block; background: rgba(47, 191, 113, 0.12); color: var(--ok); border: 1px solid rgba(47,191,113,0.3); }
.form-status.err { display: block; background: rgba(220, 60, 60, 0.12); color: #ff8a8a; border: 1px solid rgba(220,60,60,0.3); }
.hp-field { position: absolute; left: -9999px; opacity: 0; }

.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-top: 20px; }
.map-embed img { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 72px 0 0; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.footer-brand img { height: 34px; margin-bottom: 18px; }
.footer-brand p { font-size: 0.9rem; max-width: 320px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.footer-social a:hover { transform: translateY(-3px); filter: brightness(1.12); }
.footer-social a.ig-brand { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.footer-social a.fb-brand { background: #1877F2; }
.footer-social a.li-brand { background: #0A66C2; }
.footer-social a.yt-brand { background: #FF0000; }
.footer-social a.tt-brand { background: #010101; }
.footer-social a.wa-brand { background: #25D366; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--white); margin-bottom: 18px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: var(--steel); font-size: 0.9rem; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.78rem; color: var(--steel); flex-wrap: wrap; gap: 10px;
}

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 400;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #08090c;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Chat widget float ---------- */
.chat-float {
  position: fixed; right: 22px; bottom: 90px; z-index: 400;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  transition: transform 0.2s ease;
  border: 0; cursor: pointer;
}
.chat-float:hover { transform: scale(1.08); }

/* ---------- Demo: before/after compare ---------- */
.compare-trigger {
  position: fixed; left: 22px; bottom: 22px; z-index: 400;
  display: none; align-items: center; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--line-strong);
  color: var(--white); padding: 13px 20px 13px 16px; border-radius: 30px;
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase;
  cursor: pointer; box-shadow: var(--shadow);
}
body.demo-mode .compare-trigger { display: inline-flex; }
.compare-trigger:hover { border-color: var(--blue-light); }
.compare-trigger svg { color: var(--blue-light); }

.compare-overlay {
  position: fixed; inset: 0; z-index: 1000; background: #000;
  display: none; flex-direction: column;
}
.compare-overlay.open { display: flex; }
.compare-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; background: var(--bg-elev); border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.compare-stat { font-size: 0.8rem; color: var(--steel); font-weight: 700; }
.compare-stat strong { color: var(--blue-light); }
.compare-close { background: none; border: 0; color: var(--white); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.compare-stage { position: relative; flex: 1; overflow: hidden; }
.compare-stage > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; z-index: 1; }
.compare-layer-old {
  position: absolute; inset: 0; z-index: 2;
  clip-path: inset(0 50% 0 0);
  overflow: hidden;
}
.compare-layer-old iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.compare-tag { position: absolute; top: 16px; z-index: 3; padding: 6px 14px; border-radius: 20px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
.compare-tag.old { left: 16px; background: rgba(0,0,0,0.75); color: #ff8a8a; }
.compare-tag.new { right: 16px; background: rgba(0,0,0,0.75); color: var(--blue-light); }
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 0; z-index: 4;
  transform: translateX(-50%); cursor: ew-resize; touch-action: none;
}
.compare-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 2px; background: var(--blue-light); }
.compare-handle::after {
  content: "⇔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%; background: var(--blue);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  box-shadow: var(--shadow);
}

/* ---------- Chat panel ---------- */
.chat-panel {
  position: fixed; right: 22px; bottom: 90px; z-index: 450;
  width: 360px; max-width: calc(100vw - 44px); height: 480px; max-height: calc(100vh - 120px);
  background: var(--bg-elev); border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(0.98); opacity: 0; pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-panel-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px; background: var(--blue-dark); border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.chat-panel-head strong { display: block; color: var(--white); font-size: 0.9rem; }
.chat-panel-head span { display: block; color: var(--steel); font-size: 0.72rem; margin-top: 2px; }
.chat-panel-close { background: none; border: 0; color: var(--white); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.chat-panel-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 85%; padding: 10px 13px; border-radius: 10px; font-size: 0.86rem; line-height: 1.45; }
.chat-msg.bot { align-self: flex-start; background: var(--bg-elev-2); color: var(--silver); border-bottom-left-radius: 2px; }
.chat-msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 2px; }
.chat-msg.error { align-self: center; background: rgba(220,60,60,0.12); color: #ff8a8a; font-size: 0.78rem; text-align: center; }
.chat-msg.typing { align-self: flex-start; background: var(--bg-elev-2); display: flex; gap: 4px; padding: 13px; }
.chat-msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--steel); animation: chatTyping 1.2s infinite ease-in-out; }
.chat-msg.typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes chatTyping { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-panel-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); flex-shrink: 0; }
.chat-panel-form input {
  flex: 1; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 10px 16px; color: var(--white); font-family: var(--font); font-size: 0.86rem;
}
.chat-panel-form input:focus { outline: none; border-color: var(--blue-light); }
.chat-panel-form button {
  width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff;
  border: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.chat-panel-form button:disabled { opacity: 0.5; cursor: default; }

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .main-nav, .header-cta .btn-outline { display: none; }
  .nav-toggle { display: flex; }
  .contact-wrap { grid-template-columns: 1fr; }
  .service-row, .service-row.reverse { grid-template-columns: 1fr; }
  .service-row.reverse .service-media { order: 0; }
}

@media (max-width: 720px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .topbar-links { display: none; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
  position: fixed; inset: 0; z-index: 600;
  background: var(--bg); transform: translateX(100%);
  transition: transform 0.3s ease; display: flex; flex-direction: column;
  padding: 100px 32px 40px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  font-size: 1.5rem; font-weight: 800; text-transform: uppercase;
  color: var(--white); padding: 16px 0; border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: 28px; }
.mobile-close { position: absolute; top: 24px; right: 24px; background: none; border: 0; color: var(--white); font-size: 2rem; cursor: pointer; }
body.nav-open { overflow: hidden; }
