/* ==========================================================================
   GEO-SUR · main.css
   Design system + base styles. Variables, type, layout primitives,
   navbar, hero, sections, cards, forms, footer, floating WhatsApp.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Colors — navy dark ground, electric-blue accent */
  --color-bg:             oklch(11% 0.02 240);
  --color-surface:        oklch(15% 0.02 240);
  --color-surface-2:      oklch(19% 0.018 240);
  --color-surface-3:      oklch(23% 0.018 240);
  --color-accent:         oklch(65% 0.2 245);
  --color-accent-light:   oklch(74% 0.14 245);
  --color-accent-glow:    oklch(65% 0.2 245 / 0.18);
  --color-text-primary:   oklch(94% 0.004 240);
  --color-text-secondary: oklch(68% 0.006 240);
  --color-text-muted:     oklch(48% 0.006 240);
  --color-border:         oklch(94% 0.004 240 / 0.08);
  --color-border-strong:  oklch(94% 0.004 240 / 0.16);
  --color-border-accent:  oklch(65% 0.2 245 / 0.3);
  --color-whatsapp:       #25D366;

  /* Type — Barlow system */
  --font-display: 'Barlow Condensed', system-ui, sans-serif;
  --font-body:    'Barlow', system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;

  /* Scale */
  --fs-eyebrow:  0.78rem;
  --fs-body:     1.0625rem;
  --fs-body-lg:  1.1875rem;
  --fs-h3:       clamp(1.75rem, 2.6vw, 2.4rem);
  --fs-h2:       clamp(2.6rem, 6vw, 5.5rem);
  --fs-h1:       clamp(2.8rem, 6.5vw, 6.5rem);
  --fs-stat:     clamp(3.6rem, 7vw, 6rem);

  /* Layout */
  --container:   1280px;
  --gutter:      clamp(1.25rem, 4vw, 2.5rem);
  --section-y:   clamp(5rem, 11vw, 9rem);
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-pill: 999px;

  /* Motion */
  --ease-out:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast:      180ms;
  --t-med:       320ms;
  --t-slow:      700ms;

  /* Navbar */
  --navbar-height: 62px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--color-accent); color: white; }

/* Atmospheric grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--color-accent-light);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.1s linear;
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section {
  position: relative;
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.eyebrow::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--color-text-muted);
  display: inline-block;
  flex-shrink: 0;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.005em;
  color: var(--color-text-primary);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.005em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { margin: 0; text-wrap: pretty; }

.lead {
  font-size: var(--fs-body-lg);
  color: var(--color-text-secondary);
  max-width: 56ch;
}

.buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.25rem;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out),
              background var(--t-med) var(--ease-out),
              box-shadow var(--t-med) var(--ease-out),
              color var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out);
}
.btn .arrow {
  display: inline-block;
  transition: transform var(--t-med) var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }
.btn:active {
  transform: translateY(1px) !important;
  transition-duration: 60ms;
}

.btn-primary {
  background: oklch(45% 0.16 245);
  color: oklch(98% 0.004 240);
  font-weight: 500;
  box-shadow: 0 10px 26px -20px oklch(45% 0.16 245 / 0.65);
}
.btn-primary:hover {
  background: oklch(51% 0.17 245);
  box-shadow: 0 12px 28px -22px oklch(51% 0.17 245 / 0.65);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
}
.btn-ghost:hover {
  border-color: var(--color-text-primary);
  transform: translateY(-1px);
}
.hero-ctas .btn-ghost {
  border: none;
  padding-left: 0;
  padding-right: 0;
  color: var(--color-text-secondary);
}
.hero-ctas .btn-ghost:hover {
  border: none;
  color: var(--color-text-primary);
}
.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #062b14;
  font-weight: 600;
  box-shadow: 0 10px 28px -10px rgba(37, 211, 102, 0.55);
}
.btn-whatsapp:hover {
  background: #1fbf5b;
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.75rem 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--t-med) var(--ease-out),
              border-color var(--t-med) var(--ease-out),
              backdrop-filter var(--t-med) var(--ease-out),
              padding var(--t-med) var(--ease-out),
              transform 0.4s var(--ease-out);
}
.navbar.scrolled {
  background: oklch(11% 0.02 240 / 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
  padding: 0.48rem 0;
}
.navbar.hidden {
  transform: translateY(-110%);
  pointer-events: none;
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 3rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1;
}
.logo .mark {
  width: 34px; height: 34px;
  align-self: center;
  flex-shrink: 0;
  object-fit: contain;
}
.logo .wordmark {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
}
.logo .mark {
  transition: filter var(--t-med) var(--ease-out);
}
.logo:hover .mark {
  filter: drop-shadow(0 0 6px oklch(65% 0.2 245 / 0.5));
}
.logo .sub {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  font-weight: 400;
}
.nav-links {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  list-style: none;
  padding: 0; margin: 0;
}
.nav-links a {
  position: relative;
  font-size: 0.95rem;
  color: oklch(92% 0.006 240 / 0.82);
  text-shadow: 0 1px 14px oklch(6% 0.02 240 / 0.55);
  transition: color var(--t-fast) var(--ease-out);
  padding: 0.4rem 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--color-accent-light);
  transition: width var(--t-med) var(--ease-out);
}
.nav-links a:hover { color: oklch(98% 0.004 240); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: oklch(98% 0.004 240); }
.nav-links a.active::after { width: 100%; background: var(--color-accent); }
.nav-cta { display: inline-flex; }
.nav-cta .btn { padding: 0.55rem 1rem; font-size: 0.88rem; }

.nav-hamburger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.nav-hamburger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--color-text-primary);
  position: relative;
  transition: transform var(--t-med) var(--ease-out),
              opacity var(--t-fast) var(--ease-out);
}
.nav-hamburger span::before,
.nav-hamburger span::after {
  content: '';
  position: absolute; left: 0;
  width: 20px; height: 1.5px;
  background: currentColor;
  transition: transform var(--t-med) var(--ease-out);
}
.nav-hamburger span::before { top: -6px; }
.nav-hamburger span::after  { top:  6px; }
.nav-hamburger.open span { background: transparent; }
.nav-hamburger.open span::before { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span::after  { transform: translateY(-6px) rotate(-45deg); }

/* Mobile overlay */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: oklch(11% 0.02 240 / 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease-out);
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }
.nav-overlay ul {
  list-style: none;
  padding: 0; margin: 0;
  text-align: center;
  display: flex; flex-direction: column;
  gap: 1.5rem;
}
.nav-overlay a {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 4.5rem);
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.nav-overlay.open a { opacity: 1; transform: translateY(0); }
.nav-overlay.open li:nth-child(1) a { transition-delay: 0.05s; }
.nav-overlay.open li:nth-child(2) a { transition-delay: 0.12s; }
.nav-overlay.open li:nth-child(3) a { transition-delay: 0.19s; }
.nav-overlay.open li:nth-child(4) a { transition-delay: 0.26s; }
.nav-overlay.open li:nth-child(5) a { transition-delay: 0.33s; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--navbar-height);
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(13, 15, 20, 0.85), transparent);
  pointer-events: none;
  z-index: 3;
}
.hero-bg {
  position: absolute;
  inset: -10% 0 0 0;
  z-index: -2;
  overflow: hidden;
  will-change: transform;
  background: url('../assets/images/hero-bg.webp') center / cover no-repeat;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(
    105deg,
    rgba(13, 15, 20, 0.88) 0%,
    rgba(13, 15, 20, 0.72) 50%,
    rgba(13, 15, 20, 0.60) 100%
  );
}

/* Survey crosshair decoration */
.hero-crosshair {
  position: absolute;
  right: clamp(8%, 22vw, 28%);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(130px, 14vw, 200px);
  height: clamp(130px, 14vw, 200px);
  color: var(--color-accent);
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}

/* Content — vertically centered */
.hero-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2rem 0 clamp(5rem, 10vw, 8rem);
  position: relative;
  z-index: 1;
}
.hero-content {
  max-width: 720px;
}
.hero-content .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.60rem;
  margin-bottom: 0.75rem;
  font-size: 0.76rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.16em;
}
.hero-content .eyebrow::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--color-accent);
  flex-shrink: 0;
}
.hero-content h1 {
  max-width: 11.4ch;
  font-size: clamp(4.5rem, 7vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0.012em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
  font-kerning: normal;
}
.hero-h1-line {
  display: block;
  font-size: 0.78em;
  padding-left: 0.3rem;
  letter-spacing: 0.01rem;
}
.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  margin: 0 0 1.5rem;
  padding-left: 0.8em;
  color: var(--color-text-secondary);
  text-transform: uppercase;
}
.hero-h1-country {
  display: inline-block;
  color: oklch(45% 0.16 245);
}
.hero-ctas {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  flex-wrap: nowrap;
  margin-left: 0.60rem;
}
.hero-ctas .btn-primary {
  padding: 0.78rem 1.35rem;
}

/* GPS coordinates — absolute bottom left */
.hero-gps {
  position: absolute;
  bottom: clamp(2rem, 4vw, 3rem);
  left: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-left: 1rem;
  border-left: 1px solid var(--color-accent);
  z-index: 2;
}
.gps-country {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-primary);
}
.gps-coords {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
}
.gps-coords::after {
  content: '|';
  margin-left: 0.12em;
  color: var(--color-accent);
  opacity: 0.8;
  animation: cursor-blink 1.4s step-end infinite;
}

/* Scroll cue — absolute bottom center */
.hero-scroll-cue {
  position: absolute;
  bottom: clamp(2rem, 4vw, 3rem);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text-muted);
  z-index: 2;
  animation: scrollBob 2.5s ease-in-out infinite;
}
.hero-scroll-cue svg {
  width: 24px;
  height: 14px;
  display: block;
}
@keyframes scrollBob {
  0%, 100% { transform: translateX(-50%) translateY(0);   opacity: 0.55; }
  50%       { transform: translateX(-50%) translateY(5px); opacity: 1;    }
}

/* Pulsing GPS signal dot inside eyebrow */
.hero-eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0   oklch(65% 0.2 245 / 0.6); }
  50%       { opacity: 0.4; box-shadow: 0 0 0 5px oklch(65% 0.2 245 / 0);   }
}

/* Trust credential chips below CTAs */
.hero-trust {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 1.6rem;
}
.hero-trust span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  padding: 0 0.9rem;
  border-right: 1px solid var(--color-border-strong);
  line-height: 1.2;
}
.hero-trust span:first-child { padding-left: 0; }
.hero-trust span:last-child  { border-right: none; }

/* Survey signal readout — bottom right, mirrors GPS coords bottom left */
.hero-signal {
  position: absolute;
  bottom: clamp(2rem, 4vw, 3rem);
  right: var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-right: 1rem;
  border-right: 1px solid var(--color-accent);
  z-index: 2;
}
.signal-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}
.signal-key {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.signal-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-text-secondary);
  min-width: 4.5ch;
  text-align: right;
}
.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.signal-bars i {
  display: block;
  width: 3px;
  background: var(--color-accent);
  border-radius: 1px;
  font-style: normal;
}
.signal-bars i:nth-child(1) { height: 4px;  }
.signal-bars i:nth-child(2) { height: 7px;  }
.signal-bars i:nth-child(3) { height: 10px; }
.signal-bars i:nth-child(4) { height: 13px; }
.signal-bars i:nth-child(5) { height: 16px; opacity: 0.3; }

/* ==========================================================================
   HERO FEATURES
   ========================================================================== */
.hero-features {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.hf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.hf-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem 1.8rem;
  border-right: 1px solid var(--color-border);
}
.hf-item:last-child { border-right: none; }
.hf-icon {
  width: 30px; height: 30px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.hf-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-text-primary);
  margin-bottom: 0.35rem;
}
.hf-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-accent-light), transparent);
  animation: scrollDrop 2s var(--ease-out) infinite;
}
@keyframes scrollDrop {
  0%   { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51%  { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* ==========================================================================
   CERTIFICACIONES
   ========================================================================== */
.certs {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 4rem 0;
}
.certs-title {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: 2.5rem;
  max-width: 60ch;
  margin-left: auto; margin-right: auto;
}
.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.cert-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  padding: 1.4rem 1.6rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--t-med) var(--ease-out),
              background var(--t-med) var(--ease-out);
}
.cert-card:hover {
  border-color: var(--color-border-strong);
  background: var(--color-surface-2);
}
.cert-logo {
  display: block;
  max-height: 52px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--t-med) var(--ease-out);
}
.cert-card:hover .cert-logo { opacity: 1; }
/* RUPE tiene texto pequeño — necesita más altura para ser legible */
.cert-card:nth-child(1) .cert-logo { max-height: 72px; }

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 4rem;
}
.services-head h2 { margin-top: 1rem; }
.services-head .lead { justify-self: end; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}
.services-grid .service-card:nth-child(odd) {
  border-right: 1px solid var(--color-border);
}
.service-card {
  position: relative;
  padding: 2.8rem 2.4rem 2.4rem;
  background: transparent;
  border-top: 1px solid var(--color-border);
  border-radius: 0;
  overflow: hidden;
  transition: background var(--t-med) var(--ease-out);
}
.service-card:hover { background: oklch(17% 0.025 240 / 0.8); }
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(oklch(94% 0.004 240 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(94% 0.004 240 / 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-out);
}
.service-card:hover::after { opacity: 1; }
.service-card:hover .service-num { color: var(--color-accent-light); }
.service-card .service-num {
  display: inline-block;
  margin-bottom: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  color: var(--color-text-muted);
}
.service-card h3 {
  font-size: clamp(1.7rem, 2.4vw, 2.1rem);
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}
.service-card p {
  color: var(--color-text-secondary);
  max-width: 50ch;
  margin-bottom: 1.6rem;
}
.service-card .explore {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--color-text-primary);
  border-bottom: 1px solid var(--color-border-strong);
  padding-bottom: 0.25rem;
  transition: border-color var(--t-fast) var(--ease-out),
              gap var(--t-fast) var(--ease-out);
}
.service-card:hover .explore {
  gap: 0.7rem;
  border-color: var(--color-text-primary);
}

/* ==========================================================================
   SOBRE NOSOTROS
   ========================================================================== */
.about {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%);
}
.about-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 4rem;
  align-items: center;
}
.about-text h2 { margin-top: 1rem; margin-bottom: 1.8rem; }
.about-text p { color: var(--color-text-secondary); max-width: 56ch; }
.about-text p + p { margin-top: 1.2rem; }
.about-text .buttons { margin-top: 2.4rem; }
.about-image {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--color-surface-2);
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.1rem;
  row-gap: 1.5rem;
  max-width: 460px;
  margin-left: 0;
}
.team-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
/* Override fade-up cascade collision — animations.css loads after main.css */
.team-card.fade-up {
  transition: opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.team-card.fade-up.animate-hidden {
  transform: translateY(20px);
}
.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-border-accent);
  box-shadow: 0 16px 40px oklch(0% 0 0 / 0.35),
              0 0 0 1px var(--color-border-accent),
              0 0 24px var(--color-accent-glow);
}

/* Photo container */
.team-photo {
  position: relative;
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.team-photo::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to bottom, transparent 0%, var(--color-surface-2) 100%);
  pointer-events: none;
  z-index: 1;
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: drop-shadow(0 12px 32px oklch(0% 0 0 / 0.75)) drop-shadow(0 4px 10px oklch(0% 0 0 / 0.5));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.team-card:hover .team-photo img {
  transform: translateY(-10px) scale(1.03);
  filter: drop-shadow(0 20px 44px oklch(0% 0 0 / 0.85))
          drop-shadow(0 4px 12px oklch(0% 0 0 / 0.55))
          brightness(1.07);
}
.team-photo svg {
  width: 60%;
  height: 60%;
  color: var(--color-text-secondary);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.team-card:hover .team-photo svg {
  transform: scale(1.06);
}

/* Survey scan — sweeps once on entrance, referencing measurement instrument scans */
.team-photo::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 40%;
  background: linear-gradient(
    to bottom,
    oklch(65% 0.2 245 / 0) 0%,
    oklch(65% 0.2 245 / 0.12) 50%,
    oklch(65% 0.2 245 / 0) 100%
  );
  transform: translateY(-100%);
  pointer-events: none;
  will-change: transform;
  z-index: 2;
}
.team-card.is-visible .team-photo::after {
  animation: team-scan 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.15s;
}

@keyframes team-scan {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(350%);  }
}

/* Team info */
.team-info {
  position: relative;
  padding: 0.55rem 0.85rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.team-info::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: var(--color-accent);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.team-card:hover .team-info {
  transform: translateY(-4px);
}
.team-card:hover .team-info::before {
  width: 100%;
}
.team-name {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  transition: color 0.25s var(--ease-out);
}
.team-role {
  font-size: 0.65rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
  transition: color 0.25s var(--ease-out),
              letter-spacing 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.team-card:hover .team-role {
  color: var(--color-accent-light);
  letter-spacing: 0.1em;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .team-photo::after { display: none; }
  .team-card { transition: none; }
  .team-photo img, .team-photo svg { transition: none; }
  .team-role { transition: none; }
}

/* ==========================================================================
   STATS
   ========================================================================== */
.stats {
  position: relative;
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 3rem 0;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(oklch(94% 0.004 240 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(94% 0.004 240 / 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.stat {
  text-align: center;
  padding: 1rem 1.5rem;
  position: relative;
}
.stat + .stat::before {
  content: '';
  position: absolute;
  left: 0; top: 20%;
  width: 1px; height: 60%;
  background: linear-gradient(to bottom, transparent, var(--color-border-strong), transparent);
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: 700;
  line-height: 1;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
}
.stat-label {
  display: block;
  margin-top: 1rem;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.stat-countries {
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.stat-countries--visible {
  opacity: 1;
}

/* ==========================================================================
   PROYECTOS — stacking cards
   ========================================================================== */
.projects-section {
  position: relative;
  z-index: 0;
  padding-top: var(--section-y);
  padding-bottom: 4rem;
  background: var(--color-bg);
  isolation: isolate;
}
.projects-more-wrap { display: none; }

.projects-head {
  text-align: center;
  margin-bottom: 3.5rem;
}
.projects-head h2 { margin-top: 1rem; }

.stacking-wrapper {
  position: relative;
  height: 420vh;
}

.project-card {
  --stack-dim: 0;
  position: sticky;
  top: 110px;
  max-width: 980px;
  margin: 0 auto;
  padding: 3rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 52% 48%;
  gap: 2.5rem;
  align-items: center;
  overflow: hidden;
  transform-origin: top center;
  isolation: isolate;
  will-change: auto;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.projects-section.is-stacking .project-card {
  will-change: transform, opacity;
}
.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  background: oklch(5% 0.012 240);
  opacity: var(--stack-dim);
  pointer-events: none;
}
.project-card + .project-card { margin-top: 2rem; }

.project-card .card-content { display: flex; flex-direction: column; }
.project-card .project-tag {
  display: inline-block;
  margin-bottom: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.project-card h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}
.project-card p {
  color: var(--color-text-secondary);
  margin-bottom: 1.8rem;
  max-width: 46ch;
}
.project-card .buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.project-card .card-image {
  aspect-ratio: 4/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  contain: paint;
  margin: 0.5rem 0.75rem 0.5rem 0;
}
.project-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s var(--ease-out);
}
.project-card:hover .card-image img { transform: scale(1.03); }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section {
  position: relative;
  z-index: 2;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
  padding-top: clamp(8rem, 18vw, 14rem);
  background-color: var(--color-bg);
  background-image: linear-gradient(180deg, oklch(8% 0.012 240 / 0.54), oklch(7% 0.014 240 / 0.66));
  background-size: cover;
  background-position: center 54%;
}
.cta-section.is-bg-loaded {
  background-image:
    linear-gradient(180deg, oklch(8% 0.012 240 / 0.54), oklch(7% 0.014 240 / 0.66)),
    url("../assets/images/cta-project-bg.webp");
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, oklch(5% 0.012 240 / 0.3), transparent 48%, oklch(5% 0.012 240 / 0.38)),
    radial-gradient(ellipse at 50% 0%, oklch(65% 0.2 245 / 0.08) 0%, transparent 58%);
  pointer-events: none;
}
.cta-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(
      180deg,
      var(--color-bg) 0%,
      oklch(11% 0.02 240 / 0) 34%,
      oklch(11% 0.02 240 / 0) 58%,
      var(--color-surface) 100%
    );
  pointer-events: none;
}
.cta-section .container {
  position: relative;
  z-index: 1;
}
.cta-section h2 {
  margin: 0 auto 1.4rem;
  max-width: 20ch;
  text-shadow: 0 2px 20px oklch(5% 0.012 240 / 0.62);
}
.cta-section .lead {
  margin: 0 auto 2.4rem;
  text-shadow: 0 2px 14px oklch(5% 0.012 240 / 0.56);
}
.cta-section .buttons { justify-content: center; }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact { background: var(--color-surface); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-head { margin-bottom: 3rem; }
.contact-head h2 { margin-top: 1rem; }

/* Float-label form */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { position: relative; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 1.4rem 1rem 0.7rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--color-text-primary);
  transition: border-color var(--t-fast) var(--ease-out),
              box-shadow var(--t-fast) var(--ease-out),
              background var(--t-fast) var(--ease-out);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea {
  resize: vertical;
  min-height: 130px;
  padding-top: 1.6rem;
  line-height: 1.5;
}
.field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--color-text-secondary) 50%),
    linear-gradient(135deg, var(--color-text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 18px) 60%, calc(100% - 13px) 60%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  background-color: var(--color-surface-2);
}
.field select option { background: var(--color-surface-2); color: var(--color-text-primary); }
.field label {
  position: absolute;
  left: 1rem; top: 1rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: transform var(--t-fast) var(--ease-out),
              font-size var(--t-fast) var(--ease-out),
              color var(--t-fast) var(--ease-out);
  transform-origin: left top;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-glow);
  background: var(--color-surface-3);
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label,
.field select:focus + label,
.field select.has-value + label {
  transform: translateY(-12px) scale(0.78);
  color: var(--color-accent-light);
}
.field .error {
  display: none;
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: #f87171;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: #f87171; }
.field.has-error .error { display: block; }

.form-success {
  display: none;
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid var(--color-accent-light);
  background: rgba(37, 99, 235, 0.08);
  border-radius: var(--radius-md);
}
.form-success.visible { display: block; animation: fadeUp 0.6s var(--ease-out); }
.form-success svg { margin: 0 auto 1rem; width: 56px; height: 56px; color: var(--color-accent-light); }
.form-success h4 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.form-success p { color: var(--color-text-secondary); }

/* Contact info column */
.contact-info { display: flex; flex-direction: column; gap: 2.2rem; }
.contact-info .group { display: flex; flex-direction: column; gap: 1.2rem; }
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.contact-row .icon {
  width: 22px; height: 22px;
  color: var(--color-accent-light);
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-row .label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}
.contact-row .value { color: var(--color-text-primary); font-size: 0.98rem; }

.contact-social-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.7rem;
}
.social-mini { display: flex; gap: 0.7rem; }
.social-mini a {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-secondary);
  transition: color var(--t-fast) var(--ease-out),
              border-color var(--t-fast) var(--ease-out);
}
.social-mini a:hover { color: var(--color-accent-light); border-color: var(--color-accent-light); }
.social-mini svg { width: 16px; height: 16px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}
.footer-brand .tagline {
  margin-top: 1rem;
  color: var(--color-text-secondary);
  max-width: 38ch;
  font-size: 0.92rem;
}
.footer-brand .logo .mark {
  width: 42px;
  height: 42px;
}
.footer h5 {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}
.footer-links {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.footer-links a {
  color: var(--color-text-secondary);
  transition: color var(--t-fast) var(--ease-out);
  font-size: 0.95rem;
}
.footer-links a:hover { color: var(--color-text-primary); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom .meta { display: flex; gap: 1.6rem; }
.footer-bottom .meta a:hover { color: var(--color-text-primary); }

/* ==========================================================================
   FLOATING WHATSAPP
   ========================================================================== */
.wa-float {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 9999;
  width: 60px; height: 60px;
  background: var(--color-whatsapp);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.55);
  transition: transform var(--t-med) var(--ease-spring);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--color-whatsapp);
  animation: wa-pulse 2s var(--ease-out) infinite;
}
.wa-float svg { width: 32px; height: 32px; position: relative; z-index: 1; }
.wa-tooltip {
  position: absolute;
  right: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-primary);
  padding: 0.55rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-out),
              transform var(--t-fast) var(--ease-out);
}
.wa-float:hover .wa-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ==========================================================================
   LEGAL PAGES (privacidad.html, terminos.html)
   ========================================================================== */
.legal-hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--navbar-height) + 4rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--color-border);
  background:
    linear-gradient(135deg, oklch(15% 0.022 240 / 0.7), transparent 62%),
    repeating-linear-gradient(90deg, oklch(94% 0.004 240 / 0.035) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(0deg, oklch(94% 0.004 240 / 0.025) 0 1px, transparent 1px 88px);
}
.legal-hero::after {
  content: '';
  position: absolute;
  right: clamp(-6rem, -8vw, -2rem);
  bottom: -5rem;
  width: min(42vw, 34rem);
  aspect-ratio: 1;
  border: 1px solid oklch(74% 0.14 245 / 0.16);
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 22px, oklch(74% 0.14 245 / 0.1) 23px 24px);
  opacity: 0.55;
  pointer-events: none;
}
.legal-hero .container {
  position: relative;
  z-index: 1;
}
.legal-hero .eyebrow { margin-bottom: 1rem; }
.legal-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: 1;
  max-width: 10ch;
  margin: 0 0 1rem;
}
.legal-hero .lead {
  color: var(--color-text-secondary);
  max-width: min(48rem, calc(100vw - (var(--gutter) * 2)));
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.65;
}

.legal-body {
  padding-top: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}
.legal-layout {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 74ch);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
  justify-content: start;
  min-width: 0;
}
.legal-toc {
  position: sticky;
  top: calc(var(--navbar-height) + 2rem);
  min-width: 0;
  max-width: 100%;
  max-height: calc(100svh - var(--navbar-height) - 4rem);
  overflow: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
.legal-toc h5 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
}
.legal-toc ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.legal-toc a {
  display: block;
  min-height: 44px;
  padding: 0.6rem 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  transition: color var(--t-fast) var(--ease-out);
  line-height: 1.4;
}
.legal-toc a:hover,
.legal-toc a:focus-visible { color: var(--color-accent-light); }

.legal-content {
  min-width: 0;
  max-width: 100%;
}
.legal-section {
  scroll-margin-top: calc(var(--navbar-height) + 1.5rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--color-border);
}
.legal-section:first-child { padding-top: 0; margin-top: 0; border-top: none; }
.legal-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 2.6vw, 2.2rem);
  line-height: 1.1;
  margin: 0 0 1.05rem;
  color: var(--color-text-primary);
}
.legal-section p,
.legal-section li {
  color: var(--color-text-secondary);
  line-height: 1.78;
  margin: 0 0 0.75rem;
}
.legal-section ul, .legal-section ol {
  padding-left: 1.25rem;
  margin: 1rem 0 1.1rem;
}
.legal-section li { margin-bottom: 0.55rem; padding-left: 0.15rem; }
.legal-section strong { color: var(--color-text-primary); font-weight: 600; }
.legal-section a {
  color: var(--color-accent-light);
  text-underline-offset: 0.18em;
}
.legal-section a:hover { text-decoration: underline; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  transition: color var(--t-fast) var(--ease-out);
}
.legal-back:hover { color: var(--color-accent-light); }

/* ≤1023px: single column, TOC hidden */
@media (max-width: 1023px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
    max-width: 100%;
  }
  .legal-toc { display: none; }
  .legal-content {
    width: 100%;
    max-width: 100%;
  }
  .legal-section {
    scroll-margin-top: calc(var(--navbar-height) + 1.5rem);
  }
}

/* ≤767px: hero adjustments */
@media (max-width: 767px) {
  .legal-hero {
    padding-top: calc(var(--navbar-height) + 2.5rem);
    padding-bottom: 2rem;
  }
  .legal-hero::after {
    width: 15rem;
    right: -5.5rem;
    bottom: -6rem;
    opacity: 0.35;
  }
  .legal-hero h1 {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
    max-width: none;
  }
  .legal-hero .lead { font-size: 1rem; }
}

/* ≤419px: smallest phones */
@media (max-width: 419px) {
  .legal-hero h1 { font-size: 2.4rem; }
  .legal-section h2 { font-size: 1.45rem; }
  .legal-section p,
  .legal-section li { font-size: 1rem; }
}

/* ================================================================
   FAQ SECTION
   ================================================================ */
.faq-section { background: var(--color-bg); }

.faq-list {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 600;
  color: var(--color-text-primary);
  user-select: none;
  transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-accent);
  line-height: 1;
  transition: transform 0.25s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item[open] summary {
  color: var(--color-accent);
}

.faq-answer {
  padding-bottom: 1.5rem;
}

.faq-answer p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 72ch;
}

.faq-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 0;
}

.faq-tab {
  padding: 0.55rem 1.1rem;
  border-radius: 99px;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}

.faq-tab:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.faq-tab.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.faq-panel { margin-top: 2rem; }
.faq-panel[hidden] { display: none; }

/* Skip-to-content link (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: oklch(98% 0.005 240);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

