/* ==========================================================================
   JL Engenharia e Automação — Design System
   Dark tech: azul-marinho + laranja + azul elétrico
   ========================================================================== */

:root {
  --bg-primary: #0A1420;
  --bg-secondary: #0F1B2E;
  --bg-elevated: #14213A;
  --bg-card: #16233D;
  --orange: #F5760B;
  --orange-light: #FF8C1A;
  --orange-dark: #C95F08;
  --blue: #1E6FD9;
  --blue-light: #2E86DE;
  --line: #2A3F5F;
  --line-soft: rgba(42, 63, 95, 0.4);
  --text: #F2F2F2;
  --text-muted: #A9B7CC;
  --text-dim: #7C8CA6;
  --white: #FFFFFF;

  /* Light-section tokens (AA-contrast variants used on light backgrounds) */
  --bg-light: #FFFFFF;
  --bg-light-alt: #F3F5F9;
  --text-onlight: #16202E;
  --text-onlight-muted: #55637A;
  --text-onlight-dim: #5C6A84;
  --orange-onlight: #A34C00;
  --blue-onlight: #1E6FD9;
  --line-onlight: rgba(22, 32, 46, 0.16);
  --line-onlight-soft: rgba(22, 32, 46, 0.09);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-card-light: 0 8px 24px rgba(22, 32, 46, 0.08);
  --shadow-orange: 0 8px 24px rgba(245, 118, 11, 0.35);

  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1180px;
}

/* Sections that sit on a light background: swap the dark-bg tokens for
   AA-contrast light-bg equivalents. Everything nested (cards, headings,
   icons, labels) reads these vars, so no per-component overrides needed. */
.section-light {
  background: var(--bg-light-alt);
  --text: var(--text-onlight);
  --text-muted: var(--text-onlight-muted);
  --text-dim: var(--text-onlight-dim);
  --bg-card: #FFFFFF;
  --line: var(--line-onlight);
  --line-soft: var(--line-onlight-soft);
  --orange-light: var(--orange-onlight);
  --blue-light: var(--blue-onlight);
  --shadow-card: var(--shadow-card-light);
}
.section-light.section-white { background: var(--bg-light); }
.section-light.section-white .pillar-card,
.section-light.section-white .service-card,
.section-light.section-white .project-card { background: var(--bg-light-alt); }

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

:focus-visible {
  outline: 2px solid var(--orange-light);
  outline-offset: 2px;
}

/* ---- Circuit background pattern ---- */
.circuit-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 30% 20%, #000 0%, transparent 75%);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange-light);
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.section-label::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--orange);
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  color: var(--text);
  margin-bottom: 14px;
}
.section-title span { color: var(--orange-light); }
.section-sub {
  color: var(--text-muted);
  max-width: 620px;
  font-size: 1.05rem;
  margin-bottom: 44px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
  color: var(--bg-primary);
  box-shadow: var(--shadow-orange);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(245, 118, 11, 0.45); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--line);
}
.btn-secondary:hover { border-color: var(--blue-light); color: var(--blue-light); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 20, 32, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s ease;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { width: 58px; height: 58px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--white); letter-spacing: -0.01em; }
.brand-text span { font-size: 0.74rem; color: var(--orange-light); font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }

.main-nav ul { display: flex; gap: 34px; }
.main-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
  position: relative;
}
.main-nav a:hover { color: var(--white); }
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 18px; }
.header-cta .btn-primary { padding: 11px 22px; font-size: 0.92rem; }

/* ---- Animated hamburger (hambúrguer -> X, SVG puro) ---- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--orange-light);
  position: relative;
  z-index: 1101;
}
.nav-toggle svg { width: 24px; height: 24px; }
.menu-icon-line {
  transform-origin: center;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), opacity 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-toggle[aria-expanded="true"] .menu-icon-line-1 { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .menu-icon-line-2 { opacity: 0; transform: scaleX(0.2); }
.nav-toggle[aria-expanded="true"] .menu-icon-line-3 { transform: translateY(-5px) rotate(-45deg); }
@media (prefers-reduced-motion: reduce) {
  .menu-icon-line { transition: none; }
}

/* ---- Mobile menu overlay panel ----
   Fica ABAIXO do header (z-index menor) e recebe padding-top igual à altura
   do header fixo, para que o botão hambúrguer permaneça visível e clicável
   por cima do painel — um único botão abre e fecha. Transição é só
   opacity + visibility (fade em tela cheia), sem deslocamento. */
.mobile-menu-panel {
  position: fixed;
  inset: 0;
  z-index: 950;
  padding-top: 102px;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms ease-out, visibility 500ms ease-out;
}
.mobile-menu-panel.open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 12px;
}
.mobile-menu-list a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 60px;
  padding: 10px 20px;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.0625rem;
  transition: background-color 0.2s ease;
}
.mobile-menu-list a:hover,
.mobile-menu-list a:focus-visible { background: var(--bg-secondary); }
.mobile-menu-list a .menu-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease;
}
.mobile-menu-list a:hover .menu-icon { border-color: var(--orange); }
.mobile-menu-list a .menu-icon svg { width: 20px; height: 20px; color: var(--orange-light); }
.mobile-menu-list a .menu-label { flex: 1; }
.mobile-menu-list a .menu-chevron {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform 0.2s ease;
}
.mobile-menu-list a:hover .menu-chevron { transform: translateX(3px); }
.mobile-menu-list a.is-cta .menu-icon { border-color: var(--orange); background: rgba(245, 118, 11, 0.12); }
.mobile-menu-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 18px 20px calc(28px + env(safe-area-inset-bottom));
}
.mobile-menu-footer a {
  color: var(--orange-light);
  transition: opacity 0.2s ease;
}
.mobile-menu-footer a:hover { opacity: 0.7; }
.mobile-menu-footer a svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-panel { transition: none; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 196px 0 110px;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 80% 10%, rgba(30, 111, 217, 0.18), transparent 60%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(245, 118, 11, 0.12);
  border: 1px solid rgba(245, 118, 11, 0.35);
  color: var(--orange-light);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
  white-space: nowrap;
  max-width: 100%;
}
.hero-badge svg { flex-shrink: 0; }
.hero-badge span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  color: var(--white);
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--orange-light); }
.hero h1 .accent-blue { color: var(--blue-light); }
.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-coverage {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 600;
}
.hero-coverage svg { width: 18px; height: 18px; color: var(--orange-light); flex-shrink: 0; }

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-visual .ring, .error-mark .ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--line);
}
.hero-visual .ring-1, .error-mark .ring-1 { inset: 0; animation: spin 40s linear infinite; }
.hero-visual .ring-2, .error-mark .ring-2 { inset: 12%; border-style: dashed; border-color: rgba(30,111,217,0.4); animation: spin-rev 55s linear infinite; }
.hero-visual .core, .error-mark .core {
  position: relative;
  z-index: 2;
  width: 58%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--bg-card), var(--bg-secondary));
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 80px rgba(245, 118, 11, 0.15);
}
.hero-visual .core svg { width: 46%; height: 46%; color: var(--orange-light); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }

/* ---- Service carousel (inside hero) ---- */
.service-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  margin-top: 84px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.service-track {
  display: flex;
  justify-content: center;
  width: max-content;
  margin: 0 auto;
  animation: service-scroll 34s linear infinite;
}
.service-carousel:hover .service-track { animation-play-state: paused; }
.service-track-group {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
  padding-right: 20px;
}
.service-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(6px);
  padding: 12px 30px 12px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.service-chip:hover { border-color: var(--orange); background: rgba(245, 118, 11, 0.08); }
.service-chip-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(245, 118, 11, 0.15);
  border: 1px solid rgba(245, 118, 11, 0.4);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.service-chip-icon svg { width: 24px; height: 24px; color: var(--orange-light); }
.service-chip span:last-child { font-weight: 600; font-size: 1.02rem; color: var(--text); }
@keyframes service-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .service-track { animation: none; }
  .service-carousel { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .service-track-group[aria-hidden="true"] { display: none; }
}

/* ---- Trust strip (estatísticas) ---- */
.trust-strip {
  position: relative;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 40px 0;
}

/* ---- Stats ---- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line-soft);
}
.stat { text-align: left; }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.1rem; color: var(--orange-light); }
.stat span { color: var(--text-dim); font-size: 0.88rem; font-weight: 600; }

/* ---- About / Pillars ---- */
.section { padding: 100px 0; position: relative; }
.section-alt { background: var(--bg-secondary); }

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.pillar-card:hover { transform: translateY(-4px); border-color: var(--orange); }
.pillar-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(245, 118, 11, 0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.pillar-icon svg { width: 26px; height: 26px; color: var(--orange-light); }
.pillar-card h3 { font-size: 1.15rem; color: var(--text); margin-bottom: 10px; }
.pillar-card p { color: var(--text-muted); font-size: 0.94rem; }

/* ---- Services detail ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  padding: 34px 28px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.service-card:hover { border-color: var(--blue-light); transform: translateY(-4px); }
.service-card .num {
  position: absolute;
  top: 16px; right: 20px;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--line);
  opacity: 0.6;
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245,118,11,0.18), rgba(30,111,217,0.18));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; color: var(--orange-light); }
.service-card h3 { font-size: 1.2rem; color: var(--text); margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 16px; }
.service-link { color: var(--blue-light); font-size: 0.88rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.service-link svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.service-card:hover .service-link svg { transform: translateX(4px); }

/* ---- Process ---- */
.process-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-track::before {
  content: '';
  position: absolute;
  top: 28px; left: 8%; right: 8%;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px);
  z-index: 0;
}
.process-step { position: relative; z-index: 1; text-align: center; padding: 0 16px; }
.process-num {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--orange);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--orange-light);
  margin: 0 auto 20px;
}
.process-step h3 { font-size: 1.05rem; color: var(--text); margin-bottom: 8px; }
.process-step p { color: var(--text-muted); font-size: 0.88rem; }

/* ---- Projects / Social proof ---- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.project-thumb {
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}
.project-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-info { padding: 20px 22px; }
.project-info span { color: var(--orange-light); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.project-info h3 { font-size: 1.05rem; color: var(--text); margin: 8px 0 4px; }
.project-info p { color: var(--text-dim); font-size: 0.86rem; }

/* ---- FAQ ---- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line-soft);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 4px;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}
.faq-question svg { width: 20px; height: 20px; color: var(--orange-light); flex-shrink: 0; transition: transform 0.25s ease; }
.faq-item.open .faq-question svg { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0 4px;
}
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 24px; }

/* ---- Final CTA ---- */
.cta-final {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--orange-dark), var(--orange) 55%, var(--blue));
  padding: 80px 0;
  text-align: center;
}
.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 32, 0.45);
  z-index: 0;
}
.cta-final .circuit-bg { opacity: 0.15; mix-blend-mode: overlay; }
.cta-final .container { position: relative; z-index: 1; }
.cta-final h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: var(--white); margin-bottom: 14px; }
.cta-final p { color: rgba(255,255,255,0.95); font-size: 1.1rem; margin-bottom: 34px; }
.cta-final .btn-primary { background: var(--bg-primary); color: var(--white); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.cta-final .btn-primary:hover { background: var(--bg-secondary); }

/* ---- Footer ---- */
.site-footer { background: var(--bg-secondary); padding: 70px 0 30px; border-top: 1px solid var(--line-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--text-dim); font-size: 0.9rem; max-width: 300px; }
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 18px; letter-spacing: 0.5px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--orange-light); }
.footer-col .contact-line { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; }
.footer-col .contact-line svg { width: 16px; height: 16px; color: var(--orange-light); flex-shrink: 0; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  border-top: 1px solid var(--line-soft);
  color: var(--text-dim);
  font-size: 0.82rem;
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--orange-light); }

/* ---- WhatsApp float ---- */
.wa-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 900;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-orange);
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; color: var(--bg-primary); }

/* ---- Cookie banner ---- */
.cookie-banner {
  position: fixed;
  left: 20px; bottom: 20px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  z-index: 1200;
  transform: translateY(140%);
  transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; }
.cookie-banner p a { color: var(--blue-light); text-decoration: underline; }
.cookie-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 9px 16px; font-size: 0.82rem; }
.cookie-actions .btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--text);
}
.cookie-actions .btn-ghost:hover { border-color: var(--text-muted); }
.cookie-actions .btn-link {
  color: var(--text-dim);
  text-decoration: underline;
  font-weight: 600;
  font-size: 0.85rem;
  flex: 0 0 auto;
}

.cookie-prefs {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.75);
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.cookie-prefs.visible { display: flex; }
.cookie-prefs-modal {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  max-width: 520px;
  width: 100%;
  padding: 32px;
  max-height: 85vh;
  overflow-y: auto;
}
.cookie-prefs-modal h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 8px; }
.cookie-prefs-modal > p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 22px; }
.cookie-category {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.cookie-category h4 { color: var(--white); font-size: 0.98rem; margin-bottom: 4px; }
.cookie-category p { color: var(--text-dim); font-size: 0.84rem; }

.switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0;
  background: var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: var(--text);
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.switch input:checked + .slider { background: var(--orange); }
.switch input:checked + .slider::before { transform: translateX(20px); background: var(--white); }
.switch input:disabled + .slider { opacity: 0.6; cursor: not-allowed; }

.cookie-prefs-actions { display: flex; gap: 12px; margin-top: 26px; }
.cookie-prefs-actions .btn { flex: 1; padding: 12px 18px; font-size: 0.9rem; }

/* ---- Legal pages ---- */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 148px 0 52px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--line-soft);
}
.legal-hero .container { position: relative; z-index: 1; max-width: 820px; }
.legal-hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); color: var(--white); margin-bottom: 10px; }
.legal-hero .updated { color: var(--text-dim); font-size: 0.9rem; }

.legal-page { padding: 56px 0 100px; min-height: 60vh; }
.legal-page .container { max-width: 820px; }
.legal-page h2 { font-size: 1.3rem; color: var(--orange-light); margin: 36px 0 14px; }
.legal-page h2:first-child { margin-top: 0; }
.legal-page p, .legal-page li { color: var(--text-muted); font-size: 0.98rem; margin-bottom: 12px; }
.legal-page ul { padding-left: 20px; list-style: disc; }
.legal-page a { color: var(--blue-light); text-decoration: underline; }

/* ---- 404 ---- */
.error-page {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 40px 24px;
}
.error-content { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }
.error-mark {
  position: relative;
  width: 130px;
  aspect-ratio: 1 / 1;
  margin: 0 auto 28px;
}
.error-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--orange-light);
  letter-spacing: -0.02em;
}
.error-page h1 { color: var(--white); font-size: clamp(1.5rem, 3.4vw, 2rem); margin-bottom: 12px; }
.error-page p { color: var(--text-muted); margin-bottom: 32px; }
.error-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line-soft);
}
.error-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.error-links a:hover { color: var(--orange-light); }
.error-links a svg { width: 16px; height: 16px; flex-shrink: 0; }

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

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 340px; margin: 0 auto; }
  .pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .process-track { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .process-track::before { display: none; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); row-gap: 30px; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .header-cta-btn { display: none; }
  .nav-toggle { display: flex; }
  .header-cta { gap: 10px; }
  .services-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .process-track { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 64px 0; }
  .hero { padding: 148px 0 60px; }
}

@media (min-width: 861px) {
  .mobile-menu-panel { display: none; }
}

@media (max-width: 640px) {
  .cookie-banner {
    left: 0; right: 0; bottom: 0;
    max-width: none;
    border-radius: 0;
    border-left: none; border-right: none; border-bottom: none;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }
  body.cookie-banner-open .wa-float { display: none; }
}

@media (max-width: 560px) {
  .header-back-btn { display: none; }
  .header-cta .btn-primary { padding: 11px 18px; font-size: 0.88rem; }
}

@media (max-width: 480px) {
  .cookie-actions .btn { flex: 1; min-width: 0; }
  .hero h1 { font-size: 1.9rem; }
  .section-title { font-size: 1.6rem; }
  .cta-final h2 { font-size: 1.5rem; }
  .btn { padding: 14px 22px; font-size: 0.95rem; }
}
