/* ============================================================
   NawRath Auditores Certificadores — V3 «Vanguardia Tech»
   Editorial oscura · light-dark() · Barlow auto-hospedada
   ============================================================ */

/* ---------- Fuentes (auto-hospedadas, subset latin) ---------- */
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/barlow-400.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/barlow-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("assets/fonts/barlow-800.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Paleta adaptativa (dark = canónico) */
  --bg: light-dark(#F7F9FC, #0A0E1A);
  --surface: light-dark(#FFFFFF, #101726);
  --text: light-dark(#101726, #F2F5FA);
  --text-muted: light-dark(#46536A, #A3AFC2);
  --accent: light-dark(#047857, #34D399);
  --accent-contrast: light-dark(#FFFFFF, #062016);
  --accent-btn-bg: light-dark(#047857, #34D399);
  --border: light-dark(rgba(16, 23, 38, .12), rgba(242, 245, 250, .14));
  --navy-heritage: #093B97; /* SOLO decorativo (glow/gradientes), nunca texto */

  /* Variantes fijas para header/hero/stats/footer (siempre oscuros) */
  --bg-dark-fixed: #0A0E1A;
  --surface-dark-fixed: #101726;
  --text-dark-fixed: #F2F5FA;
  --muted-dark-fixed: #A3AFC2;
  --accent-dark-fixed: #34D399;

  /* Tipografía */
  --font-sans: "Barlow", "Helvetica Neue", Arial, system-ui, sans-serif;
  --text-display: clamp(2.75rem, 1.1rem + 7vw, 6rem);
  --text-h2: clamp(1.9rem, 1.2rem + 3vw, 3.25rem);
  --text-h3: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem);
  --text-stat: clamp(2.5rem, 1.5rem + 4.5vw, 5rem);
  --text-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-body: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-small: 0.875rem;
  --text-eyebrow: 0.8125rem;

  /* Espaciado — base 4px */
  --space-1: .25rem;  --space-2: .5rem;  --space-3: .75rem; --space-4: 1rem;
  --space-6: 1.5rem;  --space-8: 2rem;   --space-12: 3rem;  --space-16: 4rem;
  --space-24: 6rem;
  --section-pad: clamp(4rem, 10vw, 8rem);
  --container: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --header-h: 4.5rem;

  /* Radios */
  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  /* Bordes, sombras y foco */
  --border-1: 1px solid var(--border);
  --shadow-card-light: 0 1px 2px rgba(16, 23, 38, .06), 0 8px 24px rgba(16, 23, 38, .08);
  --focus-ring: 2px solid var(--accent);
}

/* Zonas de marca siempre oscuras: re-anclan los tokens adaptativos */
.theme-dark {
  color-scheme: dark;
  --bg: var(--bg-dark-fixed);
  --surface: var(--surface-dark-fixed);
  --text: var(--text-dark-fixed);
  --text-muted: var(--muted-dark-fixed);
  --accent: var(--accent-dark-fixed);
  --accent-contrast: #062016;
  --accent-btn-bg: var(--accent-dark-fixed);
  --border: rgba(242, 245, 250, .14);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
}

/* Grano de página (estático, nunca animado) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  body::after { opacity: .03; }
}

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

h1, h2, h3, h4 { margin: 0 0 var(--space-4); color: var(--text); }
h1 { font-size: var(--text-display); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
h2 { font-size: var(--text-h2); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-size: var(--text-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

.eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.lead { font-size: var(--text-lead); line-height: 1.5; }
.muted { color: var(--text-muted); }

.prose-col > p,
.section-head > .lead { max-width: 65ch; }

.section-head { margin-bottom: var(--space-12); }

/* ---------- Botones ---------- */
.btn {
  display: inline-block;
  padding: .875rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--accent-btn-bg);
  color: var(--accent-contrast);
}

.btn-secondary {
  background: transparent;
  border: var(--border-1);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter .15s ease, transform .15s ease, border-color .15s ease; }
  .btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
  .btn-secondary:hover { transform: translateY(-1px); }
}

.text-link { font-weight: 600; }

.chip {
  display: inline-block;
  padding: .375rem .875rem;
  border-radius: var(--radius-pill);
  border: var(--border-1);
  font-size: var(--text-small);
  font-weight: 600;
}
.chip-accent {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 200;
  padding: .75rem 1.25rem;
  background: var(--accent-dark-fixed);
  color: #062016;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus-visible {
  top: 0;
  outline-offset: -3px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, #0A0E1A 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-1);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--header-h);
}

.brand { display: inline-flex; flex-shrink: 0; }
.brand img { width: 150px; height: auto; }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: .625rem .75rem;
  color: var(--text);
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.site-nav a:hover { color: var(--accent); }

.header-cta { flex-shrink: 0; }

/* Botón hamburguesa */
.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  padding: .5rem .875rem;
  background: transparent;
  border: var(--border-1);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-icon {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle-icon::before { top: -6px; }
.nav-toggle-icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 899.98px) {
  /* Solo con JS: sin script el botón no haría nada y la nav ya se muestra como lista */
  html.js .nav-toggle { display: inline-flex; }

  /* Con JS: panel overlay controlado por .open; sin JS la nav queda visible como lista */
  html.js .site-nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: 99;
    background: color-mix(in srgb, #0A0E1A 98%, transparent);
    padding: var(--space-8) var(--gutter);
    overflow-y: auto;
  }
  html.js .site-nav.open { display: block; }

  @media (prefers-reduced-motion: no-preference) {
    html.js .site-nav.open { animation: nav-fade .2s ease; }
  }

  .site-nav ul { flex-direction: column; gap: var(--space-2); }
  .site-nav a {
    font-size: var(--text-h3);
    padding: var(--space-3) var(--space-2);
  }

  html:not(.js) .site-nav {
    order: 3;
    width: 100%;
    padding-bottom: var(--space-4);
  }
  html:not(.js) .header-inner { flex-wrap: wrap; }
}

@keyframes nav-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 479.98px) {
  .header-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(92svh, 60rem);
  padding-block: var(--space-24);
  background-color: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* Glow decorativo (estático) */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 44rem;
  height: 44rem;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.hero::before {
  top: -18rem;
  left: -14rem;
  background: radial-gradient(circle, color-mix(in srgb, var(--navy-heritage) 45%, transparent), transparent 70%);
}
.hero::after {
  bottom: -20rem;
  right: -14rem;
  background: radial-gradient(circle, color-mix(in srgb, #34D399 22%, transparent), transparent 70%);
}

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: .5rem 1rem;
  border: var(--border-1);
  border-radius: var(--radius-pill);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-8);
}
.hero-badge img { width: auto; height: 24px; }

.hero h1 { max-width: 13ch; margin-bottom: var(--space-6); }
.hero-accent { color: var(--accent); }

.hero-lead {
  font-size: var(--text-lead);
  line-height: 1.5;
  color: var(--muted-dark-fixed);
  max-width: 62ch;
  margin-bottom: var(--space-8);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ---------- Stats ---------- */
.stats {
  background-color: var(--bg);
  color: var(--text);
  border-top: var(--border-1);
  border-bottom: var(--border-1);
  padding-block: var(--space-16);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-12);
}

.stat-figure {
  font-size: var(--text-stat);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.stat-label {
  font-size: var(--text-small);
  color: var(--text-muted);
  max-width: 26ch;
}

@media (max-width: 767.98px) {
  .stats-grid { grid-template-columns: 1fr; gap: var(--space-8); }
}

/* ---------- Explorador de servicios ---------- */
.services-explorer {
  display: grid;
  grid-template-columns: minmax(14rem, 18rem) 1fr;
  gap: var(--space-8);
  align-items: start;
}

.tablist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

[role="tab"] {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 44px;
  padding: .75rem 1.25rem;
  border: var(--border-1);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .9375rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

[role="tab"]:hover { border-color: var(--accent); }

[role="tab"][aria-selected="true"] {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.tab-badge {
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .06em;
  padding: .125rem .5rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  color: var(--accent);
}

/* Sin JS: el tablist se oculta (los 6 paneles quedan apilados y completos) */
html:not(.js) .tablist-wrap { display: none; }
html:not(.js) .services-explorer { grid-template-columns: 1fr; }
html:not(.js) .panel { margin-bottom: var(--space-8); }

.panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8);
  background: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-md);
}

/* display:grid le ganaría al [hidden] de la UA — reafirmarlo */
.panel[hidden] { display: none; }
@media (prefers-color-scheme: light) {
  .panel { box-shadow: var(--shadow-card-light); }
}

.panel-typographic { grid-template-columns: 1fr; }
.panel-typographic .panel-text { max-width: 55ch; }

.panel-text .chip { margin-bottom: var(--space-4); }

.panel-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-md);
  filter: grayscale(1) contrast(1.05);
}

/* Overlay duotono sobre la foto */
.panel-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.panel-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: var(--radius-md);
  background: linear-gradient(color-mix(in srgb, var(--accent) 12%, transparent), transparent);
}

@media (prefers-reduced-motion: no-preference) {
  html.js .panel:not([hidden]) { animation: panel-in .25s ease; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 991.98px) {
  .panel { grid-template-columns: 1fr; }
  .panel-media { order: -1; }
}

@media (max-width: 767.98px) {
  .services-explorer { grid-template-columns: 1fr; }

  .tablist-wrap {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    padding-bottom: var(--space-2);
    /* Fades laterales indicando scroll */
    mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
  }

  .tablist { flex-direction: row; width: max-content; }
  [role="tab"] { width: auto; white-space: nowrap; scroll-snap-align: start; }
}

/* Ventajas */
.advantages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin: var(--space-12) 0 0;
  padding: 0;
  list-style: none;
}

.advantage {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-6);
  background: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-md);
}
@media (prefers-color-scheme: light) {
  .advantage { box-shadow: var(--shadow-card-light); }
}

.advantage img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  filter: grayscale(1) invert(1) brightness(1.4);
}
@media (prefers-color-scheme: light) {
  .advantage img { filter: grayscale(1); }
}

.advantage h3 { font-size: 1.0625rem; margin-bottom: var(--space-1); }
.advantage p { font-size: var(--text-small); color: var(--text-muted); }

@media (max-width: 899.98px) {
  .advantages { grid-template-columns: 1fr; }
}

/* ---------- Spotlight Ley 21.719 ---------- */
.spotlight {
  padding: clamp(var(--space-8), 6vw, var(--space-16));
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius-lg);
}
@media (prefers-color-scheme: light) {
  .spotlight { box-shadow: var(--shadow-card-light); }
}

.spotlight > .chip { margin-bottom: var(--space-6); }
.spotlight > .lead,
.spotlight > p { max-width: 65ch; }
.spotlight h3 { margin-top: var(--space-8); }

.list-intro { font-weight: 600; margin-bottom: var(--space-2); }

.law-list {
  max-width: 65ch;
  padding-left: 1.25rem;
}
.law-list li { margin-bottom: var(--space-2); }
.law-list li::marker { color: var(--accent); }

.method-steps {
  list-style: none;
  counter-reset: paso;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  padding: 0;
  margin: 0 0 var(--space-8);
}

.method-steps li {
  counter-increment: paso;
  position: relative;
  padding: var(--space-6) var(--space-6) var(--space-6) 4.5rem;
  border: var(--border-1);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.method-steps li::before {
  content: counter(paso);
  position: absolute;
  left: var(--space-6);
  top: var(--space-6);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
}

.method-steps h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.method-steps p { font-size: var(--text-small); color: var(--text-muted); }

@media (max-width: 767.98px) {
  .method-steps { grid-template-columns: 1fr; }
}

.spotlight-close { font-weight: 600; margin-bottom: var(--space-6); }

/* ---------- Tecnología + expertos ---------- */
.alliance-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.alliance-card {
  padding: var(--space-8);
  background: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-md);
}
@media (prefers-color-scheme: light) {
  .alliance-card { box-shadow: var(--shadow-card-light); }
}

.alliance-card ul { margin: 0; padding-left: 1.25rem; }
.alliance-card li { margin-bottom: var(--space-3); }
.alliance-card li::marker { color: var(--accent); }

.alliance-note { color: var(--text-muted); margin-bottom: var(--space-6); }

@media (max-width: 767.98px) {
  .alliance-grid { grid-template-columns: 1fr; }
}

/* ---------- Pull-quote ---------- */
.quote-section { padding-block: calc(var(--section-pad) * .6); }

.pull-quote {
  position: relative;
  max-width: 52rem;
  margin: 0 auto;
  padding-left: clamp(var(--space-8), 8vw, var(--space-16));
}

.quote-mark {
  position: absolute;
  left: 0;
  top: -1.5rem;
  font-size: clamp(5rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  opacity: .5;
  user-select: none;
}

.pull-quote blockquote {
  margin: 0 0 var(--space-6);
  font-size: var(--text-lead);
  line-height: 1.5;
  font-weight: 400;
}

.quote-attribution {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-muted);
}
.quote-attribution img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  filter: grayscale(1);
}
.quote-attribution strong { color: var(--text); }

/* ---------- Equipo ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.team-card {
  padding: var(--space-6);
  background: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-md);
}
@media (prefers-color-scheme: light) {
  .team-card { box-shadow: var(--shadow-card-light); }
}

.team-photo {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 15rem;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: linear-gradient(color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface));
  overflow: hidden;
}

.team-photo img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
}
.team-photo .photo-sm { max-width: 240px; }

.team-card h3 { margin-bottom: var(--space-1); }
.team-role {
  font-size: var(--text-small);
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.team-card details p {
  font-size: var(--text-small);
  color: var(--text-muted);
  margin-top: var(--space-3);
}

.team-card summary {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--text-small);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  padding-block: calc((44px - 1.3125rem) / 2);
}
.team-card summary::-webkit-details-marker { display: none; }

.team-card .bio-close { display: none; }
.team-card details[open] .bio-open { display: none; }
.team-card details[open] .bio-close { display: inline; }

@media (max-width: 991.98px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599.98px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ---------- Clientes: marquee CSS-only ---------- */
.marquee {
  overflow: hidden;
  display: grid;
  gap: var(--space-8);
}

/* Filas focusables (tabindex="0"): el foco pausa la animación vía .marquee:focus-within */
.marquee-row { overflow: hidden; }
.marquee-row:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -3px; /* hacia adentro: la fila es full-bleed y el offset externo se recortaría */
}

/* Botón pausar/reanudar (WCAG 2.2.2) — solo útil con JS; con reduced-motion no hay nada que pausar */
.marquee-toggle {
  display: none;
  align-items: center;
  margin-top: var(--space-6);
  min-height: 44px;
  padding: .5rem 1.125rem;
  background: transparent;
  border: var(--border-1);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 600;
  cursor: pointer;
}
html.js .marquee-toggle { display: inline-flex; }
.marquee-toggle:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  html.js .marquee-toggle { display: none; }
}

.track {
  display: flex;
  width: max-content;
}

.logo-strip {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin: 0;
  padding: 0 calc(var(--space-12) / 2);
  list-style: none;
}

.logo-strip img {
  height: 52px;
  width: auto;
  filter: grayscale(1) invert(1);
  mix-blend-mode: screen;
  opacity: .75;
}
.logo-strip img:hover,
.logo-strip img:focus { opacity: 1; }

@media (prefers-color-scheme: light) {
  .logo-strip img {
    filter: grayscale(1);
    mix-blend-mode: multiply;
    opacity: .7;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .track { animation: marquee 45s linear infinite; }
  .track-reverse { animation-direction: reverse; }
  .marquee:hover .track,
  .marquee:focus-within .track,
  .marquee.is-paused .track { animation-play-state: paused; }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Reduced motion: grilla estática, sin duplicados */
@media (prefers-reduced-motion: reduce) {
  .track { width: auto; }
  .track .logo-strip {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: var(--space-6);
  }
  .track .logo-strip[aria-hidden="true"] { display: none; }
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 22rem) 1fr;
  gap: var(--space-12);
  align-items: start;
}

.contact-data ul {
  list-style: none;
  margin: 0 0 var(--space-8);
  padding: 0;
}
.contact-data li {
  display: grid;
  gap: var(--space-1);
  padding-block: var(--space-4);
  border-bottom: var(--border-1);
}
.contact-label {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-form {
  padding: var(--space-8);
  background: var(--surface);
  border: var(--border-1);
  border-radius: var(--radius-md);
}
@media (prefers-color-scheme: light) {
  .contact-form { box-shadow: var(--shadow-card-light); }
}

.field { margin-bottom: var(--space-6); }

.field label {
  display: block;
  font-weight: 600;
  font-size: var(--text-small);
  margin-bottom: var(--space-2);
}

.field input,
.field textarea {
  width: 100%;
  padding: .75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: var(--border-1);
  border-radius: var(--radius-sm);
}

.field input:focus-visible,
.field textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field textarea { resize: vertical; min-height: 8rem; }

/* Honeypot fuera de vista y del orden de tabulación */
.hp { position: absolute; left: -9999px; }

.form-status { margin-top: var(--space-4); font-weight: 600; color: var(--accent); }
.form-status:empty { margin: 0; }
.form-fallback { margin-top: var(--space-4); font-size: var(--text-small); }
.form-microcopy { margin-top: var(--space-2); font-size: var(--text-small); color: var(--text-muted); }

@media (max-width: 899.98px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg);
  color: var(--text);
  border-top: var(--border-1);
  padding-block: var(--space-16) var(--space-8);
  font-size: var(--text-small);
}

.footer-seals { margin-bottom: var(--space-12); }
.footer-seals-label {
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.footer-seals ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-seals img { height: 44px; width: auto; }

.footer-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
  padding-block: var(--space-8);
  border-top: var(--border-1);
  border-bottom: var(--border-1);
  margin-bottom: var(--space-8);
}

.footer-brand img { width: 180px; height: auto; margin-bottom: var(--space-4); }
.footer-brand p { color: var(--text-muted); max-width: 34ch; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav a {
  display: inline-block;
  padding: var(--space-3) var(--space-2);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.footer-nav a:hover { color: var(--accent); }

.footer-data,
.footer-alliance { color: var(--text-muted); margin-bottom: var(--space-3); }
.footer-copyright { color: var(--text-muted); margin: 0; }

/* ---------- Reveals de scroll (solo con JS + motion permitido) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .6s ease, transform .6s ease;
  }
  html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
  /* Stagger suave en grillas */
  html.js .stats-grid [data-reveal]:nth-child(2),
  html.js .team-grid [data-reveal]:nth-child(3n + 2) { transition-delay: .12s; }
  html.js .stats-grid [data-reveal]:nth-child(3),
  html.js .team-grid [data-reveal]:nth-child(3n) { transition-delay: .24s; }
}
