/* ==========================================================================
   idSwift — Design system
   Brand colors (oficial): forest #27524e · mint #91cca9
   Fonts: Croogla 4F (wordmark), Ubuntu (headings + body)
   Principio: plano, sin degradados, espaciado amplio, bordes 1px sutiles
   ========================================================================== */

/* Croogla 4F — wordmark oficial (auto-hospedada) */
@font-face {
  font-family: 'Croogla 4F';
  src: url('../media/fonts/Croogla-4F-Bold.woff2') format('woff2'),
       url('../media/fonts/Croogla-4F-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Croogla 4F';
  src: url('../media/fonts/Croogla-4F-Medium.woff2') format('woff2'),
       url('../media/fonts/Croogla-4F-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Croogla 4F';
  src: url('../media/fonts/Croogla-4F-Regular.woff2') format('woff2'),
       url('../media/fonts/Croogla-4F-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Paleta oficial */
  --forest: #27524e;
  --forest-deep: #1d3f3c;
  --mint: #91cca9;
  --mint-soft: #d6ecdf;
  --cream: #f5f1e8;
  --paper: #faf7f0;
  --ink: #1a2e2a;
  --muted: #607471;
  --line: #e4dfd3;
  --line-dark: rgba(245, 241, 232, 0.16);

  /* Aliases compat (para clases existentes) */
  --bg: var(--paper);
  --bg-2: var(--cream);
  --text: var(--ink);
  --brand: var(--forest);
  --brand-2: var(--mint);
  --accent: var(--mint);
  --ok: #1b7f55;
  --err: #c4473d;
  --card: #ffffff;
  --border: var(--line);

  --radius: 16px;
  --max: 1200px;
  --header-height: 72px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding-top: var(--header-height);
  font-family: 'Ubuntu', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.page-home main { scroll-padding-top: var(--header-height); }

a {
  color: var(--forest);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

main { display: block; }

.container {
  width: min(100%, var(--max));
  margin-inline: auto;
  padding: 24px 32px;
}
@media (max-width: 600px) {
  .container { padding: 20px; }
}

ul {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--muted);
}
ul li { margin-bottom: 6px; }

.text-center { text-align: center; }

/* ==========================================================================
   Header + wordmark (idSwift con Croogla + anillo hueco)
   ========================================================================== */
header {
  position: fixed;
  inset: 0 0 auto 0;
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  text-decoration: none;
  font-family: 'Croogla 4F', 'Ubuntu', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--forest);
  line-height: 1;
  font-size: 38px;
}
.logo:hover { text-decoration: none; }
.logo img { display: none; }

.logo .word { font-size: 1em; line-height: 1; }
.logo .s-cap {
  font-size: 1.135em;
  line-height: 1;
  display: inline-block;
  letter-spacing: -0.02em;
  margin: 0 -0.015em;
}
.logo .ring {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  border-radius: 50%;
  border: 0.04em solid currentColor;
  vertical-align: baseline;
  align-self: baseline;
  margin-left: 0.06em;
  box-sizing: border-box;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--forest);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.menu-toggle:hover {
  border-color: var(--forest);
  background: var(--mint-soft);
}
.menu-toggle__icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}
.menu-toggle__icon span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle.is-active .menu-toggle__icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-active .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .menu-toggle__icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Nav links */
.nav a.btn {
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  font-size: 14px;
  font-weight: 500;
  box-shadow: none;
  transition: background 0.15s ease;
}
.nav a.btn:hover {
  background: var(--mint-soft);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}
.nav a[aria-current='page'] {
  background: var(--mint-soft);
  color: var(--forest);
}

/* Language switcher — pill segmented control */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--forest);
  font-family: 'Ubuntu', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-btn img { display: none; }
.lang-btn::before {
  content: attr(data-lang);
}
.lang-btn:hover { background: var(--mint-soft); }
.lang-btn.is-active,
.lang-btn[aria-pressed='true'] {
  background: var(--forest);
  color: var(--mint);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: #fff;
  color: var(--forest);
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  appearance: none;
  box-shadow: none;
}
.btn:hover {
  text-decoration: none;
  border-color: var(--forest);
  background: var(--mint-soft);
  transform: none;
  box-shadow: none;
}
.btn.primary {
  background: var(--mint);
  color: var(--forest);
  border-color: transparent;
}
.btn.primary:hover {
  background: var(--forest);
  color: var(--mint);
  border-color: transparent;
}
.btn.secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn.secondary:hover {
  background: var(--forest);
  color: var(--mint);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
  font-family: 'Ubuntu', sans-serif;
  color: var(--forest);
  letter-spacing: -0.02em;
}
.h1 {
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--forest);
  font-weight: 300;
}
.h1 b { font-weight: 700; color: var(--mint); }
.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.small {
  color: var(--muted);
  font-size: 13px;
}

.section h2 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.1;
  margin: 0 0 20px;
  font-weight: 700;
  letter-spacing: -0.022em;
  max-width: 820px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
#home { scroll-margin-top: calc(var(--header-height) + 24px); }
#services { scroll-margin-top: var(--header-height); }

.hero { padding: 36px 16px 36px; }

.hero-min {
  position: relative;
  width: min(100%, 1200px);
  /* Altura fija ligeramente menor que la anchura (caja un pelín más ancha que alta) */
  height: clamp(420px, 58vh, 620px);
  margin: 0 auto;
  display: grid;
  justify-items: center;
  /* Texto y CTAs anclados a la parte inferior del rectángulo */
  align-content: end;
  padding: clamp(28px, 4.5vh, 56px) clamp(24px, 4vw, 48px) clamp(28px, 4.5vh, 56px);
  isolation: isolate;
  overflow: hidden;
  border-radius: 40px;
  background: #000;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #000;
  pointer-events: none;
  border-radius: inherit;
  overflow: hidden;
}
.hero-video {
  width: 100%;
  height: 100%;
  /* cover llena la caja. Anclado hacia arriba (25%) → recorta más por abajo. */
  object-fit: cover;
  object-position: 50% 25%;
  pointer-events: none;
  background: #000;
  /* Realce sutil de luz/contraste; saturación atenuada para reducir el tono amarillo. */
  filter: brightness(1.06) saturate(0.82) contrast(1.03) hue-rotate(-6deg);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Tinte uniforme; al pausar el vídeo, una segunda capa funde hacia forest-deep. */
  background: rgba(29, 63, 60, 0.28);
  pointer-events: none;
  border-radius: inherit;
}
/* Capa que aparece progresivamente cuando el vídeo se pausa */
.hero-min::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg,
    rgba(29, 63, 60, 0.05) 0%,
    rgba(29, 63, 60, 0.55) 45%,
    rgba(15, 38, 36, 0.95) 100%);
  opacity: 0;
  transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-min.is-paused::after { opacity: 1; }
/* Mantener el contenido por encima de la capa de fade */
.hero-wrap { z-index: 2; }

.hero-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  display: grid;
  gap: 20px;
  justify-items: start;
}
.hero-wrap .small {
  color: var(--mint);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.hero-wrap .small::before {
  content: "";
  width: 40px; height: 1px;
  background: var(--mint);
  display: inline-block;
}
.hero-wrap .h1 { color: #fff; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.08; }
.hero-wrap .lead { color: rgba(255,255,255,0.85); max-width: 640px; font-size: clamp(15px, 1.2vw, 17px); }

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ==========================================================================
   Sections — planas, alternadas
   ========================================================================== */
.section {
  padding: 112px 0;
  border-bottom: 1px solid var(--line);
}
.section.section-dark {
  background: var(--forest);
  border-bottom-color: var(--line-dark);
}
.section.section-dark h2, .section.section-dark h3 { color: var(--mint); }
.section.section-dark p { color: rgba(245, 241, 232, 0.78); }

/* CTA band: last section with .cta-grid — mockup's mint-soft band */
.section:has(> .container > .cta-grid) {
  background: var(--mint-soft);
  padding: 128px 0;
}
.section:has(> .container > .cta-grid) .cta-grid {
  border: 0;
  background: transparent;
  margin-bottom: 32px;
}
.section:has(> .container > .cta-grid) .cta-grid article {
  border: 0;
  padding: 0 0 0;
  background: transparent;
}
.section:has(> .container > .cta-grid) .cta-grid h2 {
  color: var(--forest);
}

.hero-teasers {
  position: relative;
  z-index: 2;
  padding: 0 0 64px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hero-teasers .container { padding-top: 0; padding-bottom: 0; }
.hero-teasers .grid { margin-top: 0; }

/* Security page hero — mismo tamaño y forma que el rectángulo del vídeo */
.security-hero { padding: 36px 16px 0; }
.security-hero-frame {
  position: relative;
  width: min(100%, 1200px);
  height: clamp(420px, 58vh, 620px);
  margin: 0 auto;
  border-radius: 40px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-content: end;
  padding: clamp(28px, 4.5vh, 56px) clamp(24px, 4vw, 48px);
  background:
    radial-gradient(1200px 600px at 80% -20%, rgba(122, 210, 156, 0.25) 0%, transparent 60%),
    linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 60%, #244f4b 100%);
  color: var(--cream);
  box-shadow: 0 24px 48px -28px rgba(29, 63, 60, 0.4);
}
.security-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(245, 241, 232, 0.18) 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 60%, rgba(122, 210, 156, 0.32) 50%, transparent 51%),
    radial-gradient(2px 2px at 40% 80%, rgba(245, 241, 232, 0.12) 50%, transparent 51%),
    radial-gradient(2px 2px at 85% 25%, rgba(245, 241, 232, 0.16) 50%, transparent 51%);
  pointer-events: none;
}
.security-hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  margin: 0 auto;
  display: grid;
  gap: 18px;
  justify-items: start;
}
.security-hero .small {
  color: var(--mint);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.security-hero .small::before {
  content: "";
  width: 40px; height: 1px;
  background: var(--mint);
  display: inline-block;
}
.security-hero .h1 {
  color: var(--cream);
  font-weight: 300;
  /* Mismo tamaño que el h1 del hero de Home */
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.security-hero .h1 b { font-weight: 700; color: var(--mint); }
.security-hero .lead { color: rgba(245, 241, 232, 0.82); max-width: 720px; }

/* Section eyebrow (Direction B) — thin line + uppercase label */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest);
  font-weight: 600;
  margin: 0 0 24px;
}
.section-eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--forest);
}
.section-eyebrow.on-dark { color: var(--mint); }
.section-eyebrow.on-dark::before { background: var(--mint); }
.section-lead { max-width: 640px; margin: 0 0 56px; }
.section-lead.on-dark { color: rgba(245, 241, 232, 0.72); }

/* Services section — "What we deliver" + "Work phases" unified bajo un eyebrow */
.services-combined { padding-top: 56px; }
.services-combined .services-subtitle {
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 24px;
  color: var(--forest);
}
.services-combined .section-eyebrow { margin-bottom: 16px; }
.services-combined .services-subtitle + .grid { margin-top: 0; }
.services-combined .grid + .services-subtitle { margin-top: 56px; }

/* ==========================================================================
   Stats section (paper · forest + mint)
   ========================================================================== */
.stats-section { background: var(--paper); }
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.stat-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin: 0;
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  color: var(--forest);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-num { font-size: clamp(56px, 6vw, 72px); }
.stat-unit { font-size: 28px; font-weight: 400; color: var(--forest); margin-left: 4px; }
.stat-delta {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 14px;
  text-transform: lowercase;
}
.stat-foot {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Stat bars (before/after) */
.stat-compare { display: flex; flex-direction: column; gap: 14px; }
.bar-row {
  display: grid;
  grid-template-columns: 96px 1fr 84px;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}
.bar-tag { color: var(--muted); font-weight: 500; }
.bar-track {
  height: 10px;
  background: var(--mint-soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transform-origin: left center;
}
.stats-section.in-view .bar-fill {
  animation: bar-grow 1.4s cubic-bezier(0.22, 0.68, 0.12, 1) 0.2s forwards;
}
.bar-fill--muted { background: var(--muted); opacity: 0.45; }
.bar-fill--mint { background: var(--mint); }
.stats-section.in-view .bar-fill--mint { animation-delay: 0.6s; }
.bar-amount { color: var(--forest); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
@keyframes bar-grow { to { width: var(--w); } }

/* Stat ring (OCR accuracy) */
.stat-ring { align-items: center; text-align: center; }
.stat-ring .stat-label { align-self: flex-start; text-align: left; width: 100%; }
.ring-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 4px auto 0;
}
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track {
  fill: none;
  stroke: var(--mint-soft);
  stroke-width: 8;
}
.ring-fill {
  fill: none;
  stroke: var(--mint);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
}
.stats-section.in-view .ring-fill {
  animation: ring-draw 1.8s cubic-bezier(0.22, 0.68, 0.12, 1) 0.3s forwards;
}
@keyframes ring-draw { to { stroke-dasharray: 97.8 100; } }
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  color: var(--forest);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}
.ring-num { font-size: 56px; line-height: 1; display: inline-block; }
.ring-unit { font-size: 22px; opacity: 0.6; align-self: center; margin-left: 2px; }
.stat-ring .stat-foot { width: 100%; text-align: left; }

/* Stat scan (OCR animation — exact design embedded via iframe) */
.stat-scan {
  gap: 14px;
  grid-column: 1 / -1; /* span full stats-grid row */
}
.stat-scan .stat-label { align-self: flex-start; width: 100%; }
.scan-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 550;
  overflow: hidden;
  container-type: inline-size;
}
.scan-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 550px;
  border: 0;
  pointer-events: none;
  background: transparent;
  transform-origin: top left;
  transform: scale(calc(100cqw / 1920px));
}

/* ── Document (left) ─────────────────────────────── */
.scan-doc {
  position: relative;
  border: 1.5px solid var(--forest);
  border-radius: 12px;
  background: var(--cream);
  padding: 10px 12px;
  overflow: hidden;
  font-family: 'Ubuntu Mono', monospace;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 250px;
}
.scan-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 9px;
  color: var(--forest);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: 700;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--forest);
}
.scan-doc-header .native {
  font-size: 9.5px;
  letter-spacing: 0.5px;
  opacity: 0.7;
  text-align: right;
  line-height: 1.1;
}
.scan-doc-body {
  display: flex;
  gap: 10px;
  flex: 1;
  min-height: 0;
}
.scan-doc-photo {
  width: 50px;
  height: 64px;
  border: 1px solid var(--forest);
  border-radius: 3px;
  color: var(--forest);
  flex-shrink: 0;
  overflow: hidden;
  background: rgba(245, 241, 232, 0.6);
}
.scan-doc-photo svg { width: 100%; height: 100%; display: block; }
.scan-doc-fields {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.scan-doc-fields .row,
.scan-doc-fields .mrz {
  position: relative;
}
.scan-doc-fields .lbl {
  display: block;
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scan-doc-fields .ln {
  display: block;
  height: 6px;
  background: rgba(29, 63, 60, 0.22);
  border-radius: 1px;
}
.scan-doc-fields .ln.short { width: 70%; }
.scan-doc-fields .row.split {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 6px;
}
.scan-doc-fields .row.split .col {
  display: flex;
  flex-direction: column;
}
.scan-doc-fields .mrz .mrz-strip {
  display: block;
  height: 14px;
  border: 1px dashed var(--forest);
  background: repeating-linear-gradient(90deg, rgba(29,63,60,.18) 0, rgba(29,63,60,.18) 6px, transparent 6px, transparent 9px);
  opacity: 0.5;
  border-radius: 2px;
}

/* Detection box — popping in around each field row when scan crosses */
.scan-doc-fields .detect {
  position: absolute;
  inset: -3px -4px;
  border: 1.5px solid var(--mint);
  background: rgba(145, 204, 169, 0.08);
  border-radius: 3px;
  opacity: 0;
  transform: scale(0.92);
  transform-origin: top left;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.scan-doc-fields .detect::before,
.scan-doc-fields .detect::after,
.scan-doc-fields .row.is-detected .detect::before,
.scan-doc-fields .row.is-detected .detect::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border: 2px solid var(--mint);
}
.scan-doc-fields .detect::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.scan-doc-fields .detect::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.scan-doc-fields .row.is-detected .detect {
  opacity: 1;
  transform: scale(1);
}
.scan-doc-fields .row.is-detected .detect.is-dim {
  opacity: 0.32;
}
.scan-doc-fields .pill {
  position: absolute;
  top: -10px;
  right: -2px;
  background: var(--mint);
  color: var(--forest-deep);
  font-family: 'Ubuntu Mono', monospace;
  font-size: 7.5px;
  font-weight: 700;
  padding: 1px 5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 2px;
}

/* Scan beam */
.scan-line {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint), 0 0 16px var(--mint);
  opacity: 0;
  pointer-events: none;
  animation: scan-beam var(--scan-dur) linear infinite;
}
@keyframes scan-beam {
  0%   { transform: translateY(0);    opacity: 0; }
  6%   { opacity: 1; }
  82%  { transform: translateY(248px); opacity: 1; }
  90%  { transform: translateY(248px); opacity: 0; }
  100% { transform: translateY(248px); opacity: 0; }
}
.scan-trail {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 0;
  background: linear-gradient(180deg, rgba(145,204,169,0) 0%, rgba(145,204,169,0.18) 100%);
  pointer-events: none;
  animation: scan-trail var(--scan-dur) linear infinite;
}
@keyframes scan-trail {
  0%   { height: 0;     opacity: 0; }
  6%   { opacity: 1; }
  82%  { height: 248px; opacity: 1; }
  90%  { height: 248px; opacity: 0; }
  100% { height: 0;     opacity: 0; }
}

/* ── JSON output panel (right) ─────────────────── */
.scan-output {
  position: relative;
  background: var(--forest-deep);
  color: var(--cream);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 11px;
  line-height: 1.45;
  overflow: hidden;
}
.scan-output-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245,241,232,0.16);
  margin-bottom: 8px;
}
.scan-output-head .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: scan-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
@keyframes scan-pulse {
  0%, 100% { transform: scale(1);   opacity: 1; }
  50%      { transform: scale(1.6); opacity: 0.4; }
}
.scan-output-head .label {
  color: var(--mint);
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scan-output-head .filename {
  color: rgba(245,241,232,0.5);
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.scan-json {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scan-json li {
  height: 19px;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  overflow: hidden;
}
.scan-json li.row {
  padding-left: 14px;
  gap: 4px;
}
.scan-json .brace {
  color: rgba(245,241,232,0.55);
  font-size: 13px;
}
.scan-json .k {
  color: var(--mint);
  font-weight: 700;
}
.scan-json .sep {
  color: rgba(245,241,232,0.5);
}
.scan-json .v {
  color: var(--cream);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  visibility: hidden;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.scan-json .v.is-on { visibility: visible; }

.scan-stamp {
  position: absolute;
  top: 6px;
  right: 8px;
  font-family: 'Ubuntu', sans-serif;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #1b7f55;
  border: 2px solid #1b7f55;
  background: rgba(245,241,232,0.92);
  padding: 3px 7px;
  border-radius: 2px;
  transform: scale(0.6) rotate(-4deg);
  transform-origin: center;
  opacity: 0;
  transition: opacity .35s ease, transform .35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.scan-stamp.is-on {
  opacity: 1;
  transform: scale(1) rotate(-4deg);
}

/* ── Timer bar (under both panels) ─────────────── */
.scan-timer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  height: 18px;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.scan-timer .time {
  color: var(--forest);
  font-variant-numeric: tabular-nums;
  min-width: 70px;
}
.scan-timer .time.is-done { color: #1b7f55; }
.scan-timer .bar {
  position: relative;
  height: 2px;
  background: rgba(39, 82, 78, 0.12);
  overflow: hidden;
  border-radius: 1px;
}
.scan-timer .fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--mint);
  transition: background 0.2s ease;
}
.scan-timer .fill.is-done { background: #1b7f55; }
.scan-timer .status {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-align: right;
  white-space: nowrap;
}
.scan-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0;
  --scan-dur: 3s;
}
.scan-doc {
  position: relative;
  border-radius: 10px;
  border: 1.5px solid var(--forest);
  background: var(--mint-soft);
  padding: 12px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 158px;
  font-family: 'Ubuntu Mono', monospace;
}
.scan-doc-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 10px;
  color: var(--forest);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.scan-doc-native {
  font-size: 10.5px;
  opacity: 0.7;
  font-weight: 700;
  text-align: right;
  line-height: 1.1;
}
.scan-doc-body {
  display: flex;
  gap: 14px;
  flex: 1;
  min-height: 0;
  align-items: center;
}
.scan-doc-photo {
  width: 70px;
  height: 90px;
  border-radius: 4px;
  background: var(--cream);
  border: 1px solid var(--forest);
  color: var(--forest);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.scan-doc-photo svg { width: 100%; height: 100%; display: block; }
.scan-doc-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
}
.scan-doc-lines .line {
  display: block;
  height: 6px;
  background: rgba(29, 63, 60, 0.22);
  border-radius: 2px;
}
.scan-doc-lines .line-name { width: 60%; }
.scan-doc-lines .line-surname { width: 88%; }
.scan-doc-lines .line-dob { width: 45%; }
.scan-doc-lines .line-num { width: 70%; }
.scan-doc-lines .line-exp { width: 35%; }
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint), 0 0 20px var(--mint);
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
  animation: scan-pass var(--scan-dur) linear infinite;
}
@keyframes scan-pass {
  0%   { transform: translateY(0);     opacity: 0; }
  6%   { opacity: 1; }
  80%  { transform: translateY(156px); opacity: 1; }
  88%  { transform: translateY(156px); opacity: 0; }
  100% { transform: translateY(156px); opacity: 0; }
}

/* JSON-style output panel */
.scan-output {
  background: var(--forest-deep);
  color: var(--cream);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 11px;
  line-height: 1.4;
}
.scan-output-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(245, 241, 232, 0.16);
  margin-bottom: 8px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scan-output-head .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px var(--mint);
  animation: scan-pulse 1.8s ease-out infinite;
  flex-shrink: 0;
}
@keyframes scan-pulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%      { transform: scale(1.6); opacity: 0.4; }
}
.scan-output-head .head-l {
  color: var(--mint);
  font-weight: 600;
  flex: 1;
}
.scan-output-head .head-r {
  color: rgba(245, 241, 232, 0.55);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: none;
  font-weight: 400;
}
.scan-json {
  list-style: none;
  margin: 0;
  padding: 0;
}
.scan-json li {
  height: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scan-json li.row {
  padding-left: 14px;
}
.scan-json .brace {
  color: rgba(245, 241, 232, 0.55);
  font-size: 13px;
}
.scan-json .k {
  color: var(--mint);
  font-weight: 700;
}
.scan-json .sep {
  color: rgba(245, 241, 232, 0.5);
}
.scan-json .v {
  color: var(--cream);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  visibility: hidden;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scan-json .v.is-on {
  visibility: visible;
}

/* Timer bar */
.scan-timer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  height: 18px;
}
.scan-timer-time {
  color: var(--forest);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
}
.scan-timer-time.is-done { color: #1b7f55; }
.scan-timer-bar {
  position: relative;
  height: 3px;
  background: rgba(39, 82, 78, 0.12);
  overflow: hidden;
  border-radius: 2px;
}
.scan-timer-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: var(--mint);
  transition: background 0.2s ease;
}
.scan-timer-fill.is-done { background: #1b7f55; }
.scan-timer-label {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-align: right;
}

/* SES Hospedajes card */
.stat-ses { background: var(--forest); color: var(--cream); border-color: var(--forest); }
.stat-ses .stat-label { color: var(--mint); }
.stat-ses .stat-foot {
  color: rgba(245, 241, 232, 0.55);
  border-top-color: rgba(245, 241, 232, 0.14);
}
.ses-title {
  margin: 0;
  font-size: 26px;
  font-weight: 400;
  color: var(--cream);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
}
.ses-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--mint);
  color: var(--forest-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.ses-desc {
  margin: 0;
  font-size: 14px;
  color: rgba(245, 241, 232, 0.72);
  line-height: 1.55;
}
.ses-checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ses-checks li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  color: rgba(245, 241, 232, 0.82);
  line-height: 1.45;
}
.ses-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 8px;
  border-left: 1.5px solid var(--mint);
  border-bottom: 1.5px solid var(--mint);
  transform: rotate(-45deg);
}

@media (max-width: 1000px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-ses { grid-column: span 2; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .stat-ses { grid-column: span 1; }
  .bar-row { grid-template-columns: 72px 1fr 64px; gap: 10px; font-size: 12px; }
}

/* ==========================================================================
   Live check-ins chart (dark · Direction B)
   ========================================================================== */
.live-chart-section { padding: 112px 0; }
.live-head {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: end;
  margin-bottom: 48px;
}
.live-head h2 {
  color: var(--cream);
  font-weight: 300;
  white-space: nowrap;
  font-size: clamp(26px, 3.1vw, 42px);
}
.live-head .section-lead { margin-bottom: 0; }
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(145, 204, 169, 0.6);
  animation: pulse-dot 1.8s ease-out infinite;
  margin-right: 2px;
}
.section-eyebrow.on-dark .live-dot { margin-left: -6px; }
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(145, 204, 169, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(145, 204, 169, 0); }
  100% { box-shadow: 0 0 0 0 rgba(145, 204, 169, 0); }
}

.live-meters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(245, 241, 232, 0.12);
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 10px;
  overflow: hidden;
}
.meter {
  padding: 16px 18px;
  background: var(--forest);
}
.meter-label {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint);
  font-weight: 600;
}
.meter-value {
  margin: 0;
  font-size: 28px;
  font-weight: 300;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.meter-value small {
  font-size: 13px;
  color: rgba(245, 241, 232, 0.5);
  margin-left: 4px;
  font-weight: 400;
}

.live-chart {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: 1fr auto;
  gap: 0;
  background: var(--forest);
  border: 1px solid rgba(245, 241, 232, 0.12);
  border-radius: 12px;
  padding: 24px 28px 14px 20px;
}
.live-lanes {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 10px 0 0;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(245, 241, 232, 0.4);
  font-weight: 700;
  text-align: right;
  line-height: 1;
}
.live-plot {
  position: relative;
  height: 260px;
  border-left: 1px solid rgba(245, 241, 232, 0.12);
  border-bottom: 1px solid rgba(245, 241, 232, 0.12);
  overflow: hidden;
}
.live-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, rgba(245, 241, 232, 0.06) 1px, transparent 1px);
  background-size: 100% 25%;
  pointer-events: none;
}
.live-cursor {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(145, 204, 169, 0.7), transparent);
  left: 0;
  transition: left 0.4s linear;
  pointer-events: none;
  z-index: 2;
}
.live-bars { z-index: 1; }
.live-cursor::after {
  content: "";
  position: absolute;
  top: 0;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 12px rgba(145, 204, 169, 0.7);
}
.live-bars {
  position: absolute;
  inset: 0;
}
.live-bar {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: var(--mint);
  bottom: 0;
  transform-origin: bottom center;
  animation: bar-pop 0.5s cubic-bezier(0.22, 0.68, 0.12, 1) forwards;
  opacity: 0.92;
}
.live-bar[data-lane="1"] { background: var(--mint); }
.live-bar[data-lane="2"] { background: #7cbf98; }
.live-bar[data-lane="3"] { background: #68ad85; }
.live-bar[data-lane="4"] { background: #4f9c71; }
@keyframes bar-pop {
  0% { transform: scaleY(0); opacity: 0; }
  60% { transform: scaleY(1.08); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0.92; }
}
.live-axis {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  font-family: 'Ubuntu Mono', monospace;
  font-size: 10px;
  color: rgba(245, 241, 232, 0.4);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.live-foot {
  margin: 24px 0 0;
  font-size: 13px;
  color: rgba(245, 241, 232, 0.5);
  max-width: 720px;
}

@media (max-width: 900px) {
  .live-head { grid-template-columns: 1fr; gap: 28px; align-items: start; }
  .live-meters { grid-template-columns: repeat(3, 1fr); }
  .live-plot { height: 200px; }
}
@media (max-width: 540px) {
  .live-meters { grid-template-columns: 1fr; }
  .meter-value { font-size: 22px; }
  .live-chart { padding: 16px 16px 10px 12px; grid-template-columns: 32px 1fr; }
}

/* ==========================================================================
   Grids / cards — bordes planos, sin sombras
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  margin-top: 40px;
}
.section-dark .grid { border-color: var(--line-dark); }

.card {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 36px 32px;
  box-shadow: none;
  transition: background 0.2s ease;
}
.section-dark .card {
  border-right-color: var(--line-dark);
  border-bottom-color: var(--line-dark);
}
.card:hover {
  background: rgba(145, 204, 169, 0.08);
  transform: none;
  box-shadow: none;
}
.section-dark .card:hover { background: rgba(245, 241, 232, 0.04); }

.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: -0.012em;
  color: var(--forest);
}
.section-dark .card h3 { color: var(--mint); }
.card p {
  color: var(--muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
.section-dark .card p { color: rgba(245, 241, 232, 0.72); }

/* Work phases (4 col + numbered) */
.work-phases .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.work-phases .card { padding: 32px 24px; }
.work-phases h3 {
  font-size: 17px;
  margin: 0 0 8px;
  color: var(--forest);
}
.section-dark.work-phases h3 { color: var(--cream); }
.work-phases p { font-size: 14px; line-height: 1.5; }

/* Hero teasers */
.hero-teasers .grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* CTA dual section */
.cta-grid {
  display: grid;
  gap: 0;
  margin-bottom: 40px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.cta-grid article {
  padding: 40px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  border-radius: 0;
}
.cta-grid h2 { margin-bottom: 12px; font-size: clamp(26px, 3.4vw, 36px); }
@media (min-width: 768px) {
  .cta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .work-phases .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .work-phases .grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Mobile nav
   ========================================================================== */
@media (max-width: 900px) {
  .nav { position: relative; }
  .menu-toggle { display: inline-flex; }
  .nav-actions {
    position: absolute;
    top: calc(100% + 12px);
    right: 24px;
    left: 24px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    z-index: 90;
  }
  .nav-actions.is-open { display: flex; }
  .nav-actions nav { display: grid; gap: 8px; }
  .nav-actions nav a.btn {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
  }
  .nav-actions .lang-switcher {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .nav-actions .lang-switcher .lang-btn { width: 100%; }
}

/* ==========================================================================
   Forms
   ========================================================================== */
.contact {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; }
}

form { display: grid; gap: 16px; }
label { font-weight: 600; color: var(--forest); font-size: 14px; }

input, textarea {
  width: 100%;
  padding: 13px 16px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(145, 204, 169, 0.3);
}
textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-row-inline input[type='checkbox'] {
  margin: 0;
  width: 16px;
  height: 16px;
}
.form-row-inline label { margin: 0; line-height: 1.35; font-weight: 400; color: var(--muted); }

.form-message-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
}
.form-message-row .field { display: grid; gap: 6px; }
.message-actions { display: flex; align-items: flex-end; }
@media (max-width: 720px) {
  .form-message-row { grid-template-columns: 1fr; }
  .message-actions { justify-content: flex-start; }
}

.status {
  display: none;
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.status.ok {
  display: block;
  background: rgba(27, 127, 85, 0.08);
  color: var(--ok);
  border-color: rgba(27, 127, 85, 0.2);
}
.status.err {
  display: block;
  background: rgba(196, 71, 61, 0.08);
  color: var(--err);
  border-color: rgba(196, 71, 61, 0.2);
}

/* ==========================================================================
   Page headers (subpages)
   ========================================================================== */
.page-header {
  padding: 36px 16px 0;
  background: transparent;
  border: 0;
  text-align: left;
}
.page-header > .container {
  position: relative;
  width: min(100%, 1200px);
  height: clamp(420px, 58vh, 620px);
  margin: 0 auto;
  padding: clamp(28px, 4.5vh, 56px) clamp(24px, 4vw, 48px);
  border-radius: 40px;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  align-content: end;
  gap: 14px;
  background:
    radial-gradient(1200px 600px at 80% -20%, rgba(122, 210, 156, 0.25) 0%, transparent 60%),
    linear-gradient(135deg, var(--forest-deep) 0%, var(--forest) 60%, #244f4b 100%);
  color: var(--cream);
  box-shadow: 0 24px 48px -28px rgba(29, 63, 60, 0.4);
}
.page-header h1 {
  margin: 0;
  /* Misma tipografía que el h1 del hero del vídeo */
  color: #fff;
  font-family: 'Ubuntu', sans-serif;
  font-size: clamp(32px, 4.4vw, 56px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-transform: none;
}
.page-header p {
  margin: 0;
  max-width: 680px;
  color: rgba(245, 241, 232, 0.82);
  font-size: 17px;
}

.page-contact .page-header,
.page-privacy .page-header,
.page-textual .page-header { padding: 36px 16px 36px; }

/* Páginas con poco copy en el header → rectángulo más bajo que el hero principal */
.page-contact .page-header > .container,
.page-privacy .page-header > .container,
.page-textual .page-header > .container {
  height: clamp(220px, 32vh, 340px);
}

/* Reducir el aire del primer bloque de contenido tras el rectángulo */
.page-textual .section.policy,
.page-textual .section { padding-top: 48px; }
.page-contact main > .section { padding-top: 48px; }

.page-privacy .section { padding: 64px 0; }
.page-privacy .policy .grid { gap: 0; }

.policy {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.policy .card {
  background: transparent;
  box-shadow: none;
}
.policy h3 { margin: 10px 0 4px; }

blockquote {
  background: transparent;
  border: 0;
  border-left: 3px solid var(--mint);
  padding: 4px 0 4px 20px;
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}
blockquote p { margin: 0 0 10px; }

.kbd {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer.legal-footer {
  padding: 64px 0 40px;
  color: var(--muted);
  background: var(--paper);
  font-size: 14px;
}
.footer-content { display: block; }
.footer-row {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.footer-brand {
  display: inline-flex;
  align-items: baseline;
  font-family: 'Croogla 4F', 'Ubuntu', sans-serif;
  font-weight: 700;
  color: var(--forest);
  text-decoration: none;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.footer-brand .s-cap { font-size: 1.135em; line-height: 1; display: inline-block; letter-spacing: -0.02em; margin: 0 -0.015em; }
.footer-brand .ring {
  display: inline-block;
  width: 0.17em; height: 0.17em;
  border-radius: 50%;
  border: 0.04em solid currentColor;
  align-self: baseline;
  margin-left: 0.06em;
  box-sizing: border-box;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--forest); }
.footer-copy { color: var(--muted); }

.footer-compliance {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}
.aepd-seal { display: inline-flex; cursor: pointer; }
a.aepd-seal { text-decoration: none; }
.aepd-seal img {
  display: block;
  width: 60px;
  height: 60px;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.aepd-seal img:hover { opacity: 1; }

/* Floating, scroll-following seal — visible from typical laptop widths
   upward. Sits flush against the right edge with a soft shadow so it
   never overlaps the 1200px-wide content container. */
@media (min-width: 1024px) {
  .aepd-seal {
    position: fixed;
    right: 16px;
    bottom: 16px;
    top: auto;
    transform: none;
    z-index: 50;
    /* Override the inherited visibility:hidden from .footer-compliance below */
    visibility: visible;
    /* Circular blurred backdrop, same family as the top header but lighter. */
    padding: 4px;
    border-radius: 50%;
    background: rgba(250, 247, 240, 0.8);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: 0 6px 18px rgba(15, 38, 36, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
  }
  .aepd-seal:hover { transform: scale(1.04); background: rgba(250, 247, 240, 0.92); }
  .aepd-seal img {
    width: 110px;
    height: 110px;
    opacity: 1;
    display: block;
    /* The seal's design sits a few pixels above its bounding-box centre;
       nudge it up so the backdrop circle reads as visually lower. */
    transform: translateY(-3px);
  }
  /* Hide the in-footer instance to avoid duplication when floating */
  .footer-compliance { visibility: hidden; height: 0; margin: 0; padding: 0; }
}
@media (min-width: 1488px) {
  .aepd-seal { right: 24px; bottom: 24px; padding: 5px; }
  .aepd-seal img { width: 120px; height: 120px; }
}

@media (max-width: 720px) {
  .footer-row { justify-content: center; text-align: center; }
  .footer-compliance { justify-content: center; }
}

/* ==========================================================================
   Cookie bar
   ========================================================================== */
.cookiebar {
  position: fixed;
  inset: auto 16px 16px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: none;
  gap: 12px;
  align-items: center;
  box-shadow: 0 10px 40px rgba(39, 82, 78, 0.12);
  z-index: 70;
}
.cookiebar.show { display: flex; }
.cookiebar.is-configuring { align-items: stretch; flex-direction: column; }
.cookiebar p { margin: 0; font-size: 14px; color: var(--muted); }
.cookiebar .actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.cookiebar-panel .actions { margin-left: 0; justify-content: flex-start; }
.cookiebar .text-link { font-weight: 600; color: var(--forest); }
.cookiebar-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.cookiebar.is-configuring .cookiebar-panel { display: flex; }
.cookiebar-option {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.cookiebar-option .title {
  margin: 0;
  font-weight: 700;
  color: var(--forest);
}
.cookiebar-option .desc {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 42px;
  height: 24px;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: relative;
  display: inline-block;
  width: 100%;
  height: 100%;
  background: var(--line);
  border-radius: 999px;
  transition: background 0.2s ease;
}
.switch .slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.switch input:checked + .slider { background: var(--mint); }
.switch input:checked + .slider::after { transform: translateX(18px); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .hero-teasers { padding: 64px 0; }
  .cookiebar {
    inset: auto 12px 12px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .cookiebar .actions {
    margin-left: 0;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  .cookiebar .actions .btn { flex: 1 1 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  html { scroll-behavior: auto; }
}

.user-tabbing .btn:focus,
.user-tabbing a:focus,
.user-tabbing button:focus {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}

/* =================================================
   Stage cards (services section, home)
   ================================================= */
.stage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 32px; }
.stage-card { display: flex; flex-direction: column; min-height: 240px; padding: 22px 22px 24px; background: var(--card-bg, #fbf7ee); border: 1px solid var(--line, rgba(0,0,0,0.08)); border-radius: 18px; }
.stage-card .stage-label { font-family: 'Ubuntu Mono', monospace; font-size: 11.5px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(29, 63, 60, 0.55); margin: 0 0 10px; }
.stage-card h3 { margin: 4px 0 0; font-size: 19px; line-height: 1.25; }
.stage-card .card-tagline { font-size: 13.5px; line-height: 1.45; color: rgba(29, 63, 60, 0.65); margin: 8px 0 0; }

.product-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.product-chip { display: inline-flex; align-items: center; gap: 6px; font-family: 'Ubuntu Mono', monospace; font-size: 11.5px; padding: 4px 10px; border-radius: 999px; background: rgba(29, 63, 60, 0.08); color: var(--forest-deep, #1d3f3c); border: 1px solid rgba(29, 63, 60, 0.15); letter-spacing: 0.2px; text-decoration: none; transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }
a.product-chip:hover { background: #1d3f3c; color: #f6efe2; border-color: #1d3f3c; }
.product-chip.is-new { background: #1d3f3c; color: #f6efe2; border-color: #1d3f3c; }
a.product-chip.is-new:hover { background: #16302e; }
.product-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.product-chip.tag-new { background: #f2c94c33; border-color: #c39323; color: #7a5c10; }

/* =================================================
   Header dropdown menu (Servicios)
   ================================================= */
#site-navigation .nav-item-dropdown { position: relative; display: inline-block; }
#site-navigation .nav-item-dropdown > .btn::after { content: " ▾"; font-size: 10px; opacity: 0.6; margin-left: 2px; }
.nav-dropdown {
  position: absolute; top: 100%; left: 50%; transform: translate(-50%, 8px);
  min-width: 760px; background: #fbf7ee;
  border: 1px solid rgba(29, 63, 60, 0.12); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 38, 36, 0.18);
  padding: 18px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 18px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 200;
}
.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dropdown .menu-col h4 {
  font-family: 'Ubuntu Mono', monospace;
  font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(29, 63, 60, 0.55);
  margin: 4px 0 8px;
}
.nav-dropdown .menu-item {
  display: block; padding: 8px 10px; border-radius: 8px;
  font-size: 13.5px; color: #1d3f3c;
  text-decoration: none; line-height: 1.25;
}
.nav-dropdown .menu-item:hover { background: rgba(29, 63, 60, 0.08); }
.nav-dropdown .menu-item small { display: block; font-size: 11.5px; color: rgba(29, 63, 60, 0.55); margin-top: 2px; font-weight: normal; }
.nav-dropdown .new-tag { display: inline-block; margin-left: 6px; font-size: 9px; padding: 2px 6px; border-radius: 4px; background: #f2c94c; color: #5a4408; vertical-align: 2px; font-family: 'Ubuntu Mono', monospace; letter-spacing: 0.5px; }

@media (max-width: 1024px) {
  .nav-dropdown { display: none; }
  #site-navigation .nav-item-dropdown > .btn::after { content: ""; }
}

/* =================================================
   Product page (under /productos)
   ================================================= */
.product-hero { padding: clamp(48px, 9vh, 96px) 16px clamp(24px, 4vh, 40px); }
.product-hero .container { max-width: 880px; }
.product-hero .stage-label { font-family: 'Ubuntu Mono', monospace; font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: rgba(29, 63, 60, 0.6); margin: 0 0 14px; display: block; }
.product-title {
  font-family: 'Croogla 4F', 'Ubuntu', sans-serif;
  font-weight: 700; letter-spacing: -0.012em; line-height: 1.05;
  font-size: clamp(44px, 7.2vw, 76px);
  color: var(--forest, #1d3f3c);
  margin: 0;
}
.product-title .word { font-size: 1em; line-height: 1; }
.product-title .s-cap { font-size: 1.135em; line-height: 1; display: inline-block; letter-spacing: -0.02em; margin: 0 -0.015em; }
.product-title .product-word {
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 0.7em;
  color: var(--mint-deep, #2c8772);
  margin-left: 0.22em;
  letter-spacing: -0.01em;
  display: inline-block;
}
@media (max-width: 640px) { .product-title .product-word { display: block; margin-left: 0; margin-top: 6px; } }
.product-hero .product-tagline { font-size: 18px; line-height: 1.45; color: rgba(29, 63, 60, 0.78); margin: 24px 0 0; max-width: 640px; }

.product-body { padding: 24px 16px clamp(48px, 8vh, 96px); }
.product-body .container { max-width: 880px; }
.product-body p { font-size: 16.5px; line-height: 1.65; color: rgba(29, 63, 60, 0.86); }
.product-body h2 { font-size: 24px; margin-top: 36px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 28px 0; }
.feature-tile { background: rgba(29, 63, 60, 0.04); border: 1px solid rgba(29, 63, 60, 0.10); border-radius: 14px; padding: 18px 18px 16px; }
.feature-tile h3 { font-size: 15px; margin: 0 0 6px; line-height: 1.25; }
.feature-tile p { font-size: 13.5px; color: rgba(29, 63, 60, 0.7); margin: 0; line-height: 1.5; }

.product-cta { padding: clamp(40px, 6vh, 64px) 16px clamp(40px, 6vh, 80px); text-align: center; background: rgba(29, 63, 60, 0.03); border-top: 1px solid rgba(29, 63, 60, 0.08); border-bottom: 1px solid rgba(29, 63, 60, 0.08); }
.product-cta h2 { font-size: 26px; margin: 0 0 8px; }
.product-cta p { color: rgba(29, 63, 60, 0.7); margin: 0 0 22px; }
.product-back { display: inline-flex; align-items: center; gap: 8px; font-family: 'Ubuntu Mono', monospace; font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(29, 63, 60, 0.6); text-decoration: none; margin-bottom: 18px; }
.product-back:hover { color: var(--forest, #1d3f3c); }
