/* ============================================================
   ñeiden® — design-studio replica (study project)
   ============================================================ */

:root {
  --bg: #f0efe9;
  --bg-soft: #e8e6df;
  --ink: #101010;
  --ink-60: rgba(16, 16, 16, 0.62);
  --ink-40: rgba(16, 16, 16, 0.4);
  --line: rgba(16, 16, 16, 0.14);
  --red: #e30623;
  --brand-yellow: #ffc221; /* OVD yellow */
  --brand-blue: #007fb3; /* OVD blue */
  --card: #e9e7e1;
  --radius: 18px;
  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --pad: clamp(16px, 3.4vw, 48px);
  --header-h: 128px; /* 96px de logo + 16px de aire arriba y abajo (desktop) */
  /* ----- Escala tipográfica (estándar Tailwind, adoptada 2026-09-05) -----
     xs 12 · sm 14 · base 16 · lg 18 · xl 20 · 2xl 24 · 3xl 30 · 4xl 36
     5xl 48 · 6xl 64 · 7xl 72 · 8xl 96 · 9xl 128 (line-heights propios) */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  --text-6xl: 64px;
  --text-7xl: 80px;
  --text-8xl: 96px;
  --text-9xl: 128px;

  /* Tracking (letter-spacing) — escala tailwind */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  /* ----- Tamaños display fluidos (conservan su clamp) ----- */
  --text-hero: clamp(40px, 5.6vw, 96px);
  --text-display: clamp(38px, 5.2vw, 92px);
  --text-about: clamp(24px, 5vw, 96px);
  --text-about-tab: clamp(34px, 9.6vw, 72px);
  --text-hero-sub: clamp(16px, 1.4vw, 20px);
  --text-lede: clamp(17px, 1.5vw, 21px);
  --text-stat: clamp(34px, 4vw, 56px);
  --text-menu-m: clamp(32px, 8vw, 44px);
  --text-svc-h3: clamp(24px, 3vw, 40px);
  --text-mark: clamp(90px, 17.5vw, 300px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
.display, .about-display, .footer { scroll-margin-top: calc(var(--header-h) + 16px); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  position: relative;
}

/* stacking context that contains both the blended headline and the
   images it blends against — also carries the page background */
main {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

::selection { background: var(--red); color: #fff; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
sup { font-size: 0.45em; vertical-align: super; letter-spacing: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-sm); /* regla: IBM Plex siempre 14px (links y botones) */
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.muted { color: var(--ink-60); }
.dot, .dot * { color: var(--brand-blue); }

/* ---------- grain overlay ---------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.9s steps(4) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5%, 1%); }
  50% { transform: translate(1%, -1.5%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--brand-yellow);
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-header.hidden { transform: translateY(-100%); }

.header-inner {
  max-width: 1720px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  font-weight: 800;
  font-size: var(--text-2xl);
  letter-spacing: -0.04em;
  font-stretch: 110%;
}
.wordmark sup { color: var(--red); }
/* official OVD logo lockup in the header */
.wordmark-img { display: inline-flex; align-items: center; }
.wordmark-img img {
  display: block;
  height: 96px;
  max-height: calc(var(--header-h) - 24px); /* >=12px breathing room top & bottom */
  width: auto;
}

.main-nav { display: flex; gap: clamp(16px, 2.4vw, 40px); }
.main-nav a {
  font-family: var(--font-mono);
  font-size: var(--text-base); /* 16px desktop (la nav solo es visible >1120px) */
  text-transform: uppercase;
  letter-spacing: 0.06em;
  position: relative;
  padding: 6px 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.header-right { display: flex; align-items: center; gap: 18px; }
.clock { color: var(--ink-60); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.btn .arrow { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.btn:hover .arrow { transform: translate(3px, -3px); }
/* CTA del header a 16px en desktop (oculto ≤560px); los demás .btn siguen en 14px */
.site-header .btn { font-size: var(--text-base); }
.btn-ghost { background: var(--ink); color: #fff; }
.btn-ghost:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-red:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-small { padding: 10px 16px; }

.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  width: 24px; height: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}
.burger.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.burger.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 28px; text-align: center; }
.mobile-menu a {
  font-size: var(--text-menu-m);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.mobile-menu a sup { color: var(--red); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--brand-yellow) url("../img/diana.jpg") right center / cover no-repeat;
  padding: calc(var(--header-h) + clamp(36px, 5vw, 88px)) 0 clamp(36px, 5vw, 76px);
}
.hero-inner {
  max-width: 1720px;
  margin: 0 auto;
  padding-inline: var(--pad);
}



.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--ink-40);
  border-radius: 999px;
  color: var(--ink-60);
}
.chip-red {
  border-color: var(--red);
  color: var(--red);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}




/* ---------- hero main ---------- */
.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(48px, 7vw, 128px) 0;
}
.hero-sub { max-width: min(640px, 100%); }
.hero-heading { max-width: min(880px, 100%); }

.hero-heading h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.94;
  font-stretch: 112%;
  white-space: nowrap;
}
.hero-heading .dot { color: var(--brand-blue); }

.hero-sub {
  max-width: 58ch;
  margin-top: 24px;
  font-size: var(--text-hero-sub);
  color: var(--ink-60);
}

/* ---------- hero visual (imagen) ---------- */
.hero-visual {
  max-width: 640px;
  margin-inline: auto;
  width: 100%;
}
/* variante "bare": sin marco, sombra ni rotacion — la imagen tal cual */
.hero-visual-bare { transform: none; transition: none; }
.hero-visual-bare:hover { transform: none; }
.hero-visual-bare img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

/* ---------- hero foot ---------- */
.hero-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  border-top: 1px solid var(--line);
  padding-top: clamp(18px, 2.4vw, 32px);
}
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num {
  font-size: var(--text-stat);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-small { font-size: 0.5em; color: var(--ink-60); }
/* etiquetas de la data: 16px en desktop; ≤560px gana el override a var(--text-xs) 12px */
.hero-foot .mono { font-size: var(--text-base); }

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  max-width: 1720px;
  margin: 0 auto;
  padding: 80px var(--pad);
}


.display {
  font-size: var(--text-display);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.02;
  font-stretch: 110%;
  max-width: 22ch;
}
.section > .display { margin-bottom: clamp(32px, 4vw, 64px); }


/* ---------- reveal animation ---------- */
/* Hidden initial state applies ONLY when JS is running (html.js) and the
   element hasn't revealed yet — no JS = everything visible. */
.reveal {
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }
html.js .reveal:not(.in) { opacity: 0; transform: translateY(28px); }
/* opacity-only variant — used where the parallax engine owns `transform`
   (e.g. the blended about headline) */
.reveal-fade { transition: opacity 1.1s ease; }
.reveal-fade.in { opacity: 1; }
html.js .reveal-fade:not(.in) { opacity: 0; }

/* ============================================================
   ABOUT — overlapping composition (text blends over images)
   ============================================================ */

/* primera seccion tras el hero: el aire superior lo aporta el propio hero (sin doble espacio) */
.about { padding-top: 0; }
.about-hero {
  position: relative;
  padding: 0 0 24px;
}

.about-display {
  position: relative;
  z-index: 2;
  margin: 0;
  font-size: 6vw;
  font-size: var(--text-about);
  font-weight: 700;
  font-stretch: 106%;
  letter-spacing: -0.045em;
  line-height: 1.02;
  text-align: center;
  color: var(--ink);
}
/* Voladas/kickers de sección ("NOSOTROS", "SERVICIOS", …): IBM Plex Mono
   mayúsculas, azul marca, 20px desktop / 14px móvil, peso 600, tracking wider.
   Usar como <span class="kicker mono"> dentro del título correspondiente. */
.kicker {
  display: block;
  margin: 0 0 clamp(16px, 1.8vw, 24px);
  font-size: var(--text-xl);          /* 20px desktop */
  font-weight: 600;                   /* IBM Plex Mono SemiBold (debe estar en la URL de Google Fonts) */
  line-height: 1.5;                   /* anula alturas de línea estrechas del título */
  letter-spacing: var(--tracking-wider);
  color: var(--brand-blue);
}
@media (max-width: 560px) {
  .kicker {
    font-size: var(--text-sm);  /* 14px móvil */
    margin-bottom: 12px;        /* gap volada→título (la volada de About tiene su propio 8px) */
  }
}

/* Volada del About: el aire superior que antes llevaba el propio título
   (padding-top) ahora lo lleva la volada, así el ritmo vertical de la sección
   se mantiene exactamente igual. Vive dentro de .about-display. */
.about-kicker {
  padding-top: 8vw;
  padding-top: clamp(56px, 8vw, 130px);
  text-align: center;
}
@media (max-width: 560px) {
  .about-kicker { margin-bottom: 8px; }
}
/* palabras pasan de gris a tinta con el scroll (como el Neiden original) */
.about-display .w {
  color: rgba(16, 16, 16, 0.22);
  transition: color 0.25s ease;
}
.about-display .w.on { color: var(--ink); }

.about-lede {
  max-width: 1280px; /* 2 lineas en desktop a 24px (el copy nuevo no cabía en 1120) */
  margin: 24px auto 0;
  text-align: center;
}
/* móvil: aire título→texto = 28px totales en todas las secciones (excepto hero):
   About = 24px padding de about-hero + 4px margen del lede; Servicios/Clientes/
   Highlights = gap de su grid de cabecera */
@media (max-width: 560px) {
  .about-lede { margin-top: 4px; }
}
.about-lede > p {
  font-size: var(--text-lede);
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ink);
}
/* Aire entre "Un equipo con… convierten." y "Nuestros fundadores:" — desktop;
   móvil ya lo tenía (SET 7), misma medida 24px */
.about-lede > p + p { margin-top: 24px; }
.about-people {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2vw, 32px);
  margin-top: 56px; /* 24px extra de aire sobre el grid de 8px */
}
/* 3 fichas en fila; avatar y texto en la misma linea; todo sin saltos de linea */
.about-person {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 14px 18px;
  border: 1px solid var(--hairline);
  border-radius: 18px;
  flex: 1 1 auto;
}
.about-person img {
  width: 164px;
  height: 164px;
  border-radius: 50%;
  object-fit: cover;
  background: #d8d5cc; /* placeholder visible mientras no haya foto */
  flex: none;
}
.about-person div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.about-person strong { letter-spacing: -0.01em; font-size: var(--text-lg); white-space: nowrap; }
.about-person .muted { line-height: 1.4; font-size: var(--text-sm); white-space: nowrap; }
.about-person .muted b { color: var(--ink); font-weight: 600; }
@media (max-width: 1120px) {
  .about-people { display: grid; grid-template-columns: 1fr; grid-auto-rows: 1fr; gap: 12px; }
}


/* ============================================================
   SERVICES
   ============================================================ */
/* ============================================================
   SERVICES (estilo editorial: categoria + capacidades + caso)
   ============================================================ */
.services-band {
  max-width: none;
  background: var(--brand-yellow);
}
.services-band > * {
  max-width: 1720px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--pad); /* mismo inset que .section: alineacion exacta con las demas secciones */
}
.services-lead { /* patron exacto de .projects-head (Clientes) */
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.services-lead .muted { line-height: 1.6; max-width: 44ch; } /* tamano via regla 24px */

.svc-list { display: flex; flex-direction: column; }

/* acordeon: categoria colapsada, contenido se revela al click */
.svc { border-top: 1px solid var(--line); }
.svc:last-of-type { border-bottom: 1px solid var(--line); }

.svc-head {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(16px, 2.5vw, 40px);
  padding: clamp(24px, 3vw, 40px) 0;
}
.svc-head::-webkit-details-marker { display: none; }
.svc-head:hover h3 { color: var(--brand-blue); }
.svc-head h3 {
  font-family: var(--font-display);
  font-size: var(--text-svc-h3);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
}

.svc-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ink);
  background: var(--ink); /* solido negro */
  border-radius: 50%;
  position: relative;
  flex: none;
  transition: background 0.3s, transform 0.35s;
}
.svc-toggle::before,
.svc-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: #ffffff;
  transform: translate(-50%, -50%);
  transition: transform 0.35s, background 0.3s;
}
.svc-toggle::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc[open] .svc-toggle { background: var(--brand-blue); border-color: var(--brand-blue); transform: rotate(180deg); }
.svc[open] .svc-toggle::before,
.svc[open] .svc-toggle::after { background: var(--brand-yellow); }
.svc[open] .svc-toggle::after { transform: translate(-50%, -50%) rotate(0deg); }

@keyframes svcIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.svc[open] .svc-main { animation: svcIn 0.4s ease; }
.svc-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; row-gap: 24px; padding: 0 0 clamp(28px, 3.5vw, 48px); }
.svc-content { grid-column: 1; display: flex; flex-direction: column; gap: 24px; }
.svc-note { color: var(--ink-60); font-size: var(--text-xl); line-height: 1.6; }


.svc-cta { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 80px); }

@media (max-width: 560px) {
  .about-person .muted { white-space: normal; } /* el cargo largo fluye; el nombre sigue en 1 linea */
}
@media (max-width: 860px) {
  .svc-head { grid-template-columns: 1fr auto; gap: 14px; }
  .svc-toggle { width: 32px; height: 32px; }
  .svc-main { grid-template-columns: 1fr; row-gap: 20px; }
  .svc-content { grid-column: auto; }
}

/* ============================================================
   PORTFOLIO
   ============================================================ */
.projects-head {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.projects-head .muted { max-width: 40ch; }

/* ============================================================
   CLIENTES: muro de logotipos (5 col desktop / 3 tablet / 2 mobile)
   full-bleed; lineas internas reales de 1px #E0E0E0 (bordes por
   celda: color exacto y siempre visibles, sin seams de GPU)
   ============================================================ */
.section-clients { background: #ffffff; padding-bottom: 0; } /* sin aire inferior: el muro cierra */
.logos-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.logo-cell {
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid #E0E0E0;
  border-bottom: 1px solid #E0E0E0;
}
.logo-cell:nth-child(5n) { border-right: 0; }       /* fin de fila: sin vertical */
.logo-cell:nth-child(n + 21) { border-bottom: 0; }  /* ultima fila: sin horizontal */
.logo-cell img {
  display: block;
  width: 100%;      /* tamano provisto: a 1920px = 384x240 nativos */
  height: auto;
}
/* tablet: 3 por fila */
/* aparicion progresiva: estado inicial solo cuando JS activa la animacion */
.logos-grid.logo-anim .logo-cell {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
/* revelado uno por uno: escalon fijo por posicion en la fila */
.logos-grid.logo-anim .logo-cell:nth-child(5n + 1) { transition-delay: 0s; }
.logos-grid.logo-anim .logo-cell:nth-child(5n + 2) { transition-delay: 0.12s; }
.logos-grid.logo-anim .logo-cell:nth-child(5n + 3) { transition-delay: 0.24s; }
.logos-grid.logo-anim .logo-cell:nth-child(5n + 4) { transition-delay: 0.36s; }
.logos-grid.logo-anim .logo-cell:nth-child(5n + 5) { transition-delay: 0.48s; }
.logos-grid.logo-anim .logo-cell.on { opacity: 1; transform: none; }

@media (max-width: 1120px) {
  .logos-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logos-grid.logo-anim .logo-cell:nth-child(5n + 2) { transition-delay: 0s; }
  .logos-grid.logo-anim .logo-cell:nth-child(5n + 4) { transition-delay: 0s; }
  .logos-grid.logo-anim .logo-cell:nth-child(5n + 5) { transition-delay: 0s; }
  .logos-grid.logo-anim .logo-cell:nth-child(3n + 2) { transition-delay: 0.12s; }
  .logos-grid.logo-anim .logo-cell:nth-child(3n + 3) { transition-delay: 0.24s; }
  .logo-cell:nth-child(5n) { border-right: 1px solid #E0E0E0; }  /* restaurar */
  .logo-cell:nth-child(3n) { border-right: 0; }
  .logo-cell:nth-child(n + 21) { border-bottom: 1px solid #E0E0E0; }  /* restaurar */
  .logo-cell:nth-child(n + 25) { border-bottom: 0; }  /* ultima fila (25 sola) */
  .logo-cell:last-child { border-right: 0; }
}
/* movil: 2 por fila */
@media (max-width: 560px) {
  .logos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos-grid.logo-anim .logo-cell:nth-child(3n + 2) { transition-delay: 0s; }
  .logos-grid.logo-anim .logo-cell:nth-child(3n + 3) { transition-delay: 0s; }
  .logos-grid.logo-anim .logo-cell:nth-child(2n) { transition-delay: 0.12s; }
  .logo-cell:nth-child(3n) { border-right: 1px solid #E0E0E0; }  /* restaurar */
  .logo-cell:nth-child(2n) { border-right: 0; }
  .logo-cell:nth-child(n + 21) { border-bottom: 1px solid #E0E0E0; }  /* restaurar */
  .logo-cell:nth-child(n + 25) { border-bottom: 0; }
  .logo-cell:last-child { border-right: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  margin-top: 0;
  background: var(--brand-blue);
  color: #fff;
  border-top: 0;
  max-width: none; /* full-bleed: azul de borde a borde */
}
.footer > * {
  max-width: 1720px;
  margin-left: auto;
  margin-right: auto;
  padding-inline: var(--pad); /* mismo inset de contenido que las secciones */
}
.footer-cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 28px; padding-top: clamp(56px, 8vw, 128px); }
.footer-kicker {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: #ffffff;
}
.footer-cta .display { font-size: var(--text-display); max-width: none; }
.footer-cta .display { color: var(--brand-yellow); }
.footer-cta .dot { color: #ffffff; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* marca · © · Síguenos */
  gap: 24px;
  margin-top: clamp(56px, 7vw, 112px);
  padding-top: clamp(28px, 3vw, 48px);
  border-top: 1px solid var(--line);
  align-items: center;
}
.footer-copy { text-align: center; }
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer-brand img { width: min(240px, 100%); height: auto; }
.footer-grid > div { display: flex; flex-direction: column; gap: 10px; }
.footer-grid p.muted { color: rgba(255, 255, 255, 0.7); }
.footer-grid a { transition: color 0.3s; width: fit-content; color: #ffffff; }
.footer-grid a:hover { color: var(--brand-yellow); }
.footer-grid .muted { color: rgba(255, 255, 255, 0.7); }

/* Iconos sociales del footer: 24px en brand-yellow.
   Etiqueta + iconos en la MISMA línea (Síguenos ⟷ iconos 32px · entre iconos 24px), grupo a la derecha (móvil: centrado y sobre el logo) */
.footer-grid > div.footer-follow { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 32px; }
.footer-social { display: flex; gap: 24px; }
.footer-social a { width: 24px; height: 24px; color: var(--brand-yellow); transition: color 0.3s, transform 0.3s; }
.footer-social a:hover { color: #fff; transform: translateY(-2px); }
.footer-social svg { display: block; width: 24px; height: 24px; fill: currentColor; }

.footer-mark {
  font-size: var(--text-mark);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
  text-align: center;
  margin-top: clamp(32px, 5vw, 80px);
  font-stretch: 115%;
  user-select: none;
}
.footer-mark sup { color: var(--red); }

/* ============================================================
   FOOTER DESKTOP ≥1121px — 2026-09-11 (solo desktop, móvil intacto)
   1) Aire inferior de la página: 24px bajo la fila del footer
   2) Línea divisoria → fila (logo · © · Síguenos): clamp → 24px
   ============================================================ */
@media (min-width: 1121px) {
  .footer { padding-bottom: 24px; }
  .footer-grid { padding-top: 24px; }
}

/* ============================================================
   LOCATIONS MAP
   ============================================================ */
.locations-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(36px, 4vw, 64px);
}
.locations-head .muted { max-width: 44ch; }

.map-figure {
  position: relative;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: clamp(10px, 1.6vw, 24px);
}
.map-stage { position: relative; }
.world { display: block; width: 100%; height: auto; }

.world-dots circle {
  fill: var(--ink);
  opacity: 0;
  animation: dotIn 0.6s ease forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes dotIn { to { opacity: 0.5; } }

.world-arcs path {
  fill: none;
  stroke: #C79A19; /* amarillo oscuro de la paleta del amarillo de marca */
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  opacity: 0.55;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawArc 0.8s ease forwards;
  animation-delay: var(--d, 1200ms);
}
@keyframes drawArc { to { stroke-dashoffset: 0; } }

.travel-dot { fill: var(--brand-blue); opacity: 0; }

/* ---------- pins (HTML overlay) ---------- */
.map-pins { position: absolute; inset: 0; }
.map-pin {
  --pin-size: 30px;        /* pin width — tweak here to rescale all pins */
  --pin-ring-color: var(--brand-blue);
  position: absolute;
  width: var(--pin-size);
  transform: translate(-50%, -100%); /* anchor: the pin TIP sits on the city */
  transform-origin: 50% 100%;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
/* the image's own aspect ratio governs the height — the mark can never stretch */
.pin-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 6px rgba(16, 16, 16, 0.3));
}
.pin-ring {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 14px;
  height: 14px;
  margin: -7px; /* centers the ripple on the pin tip */
  border: 1.5px solid var(--pin-ring-color);
  border-radius: 50%;
  opacity: 0;
  animation: pinPulse 2.6s ease-out infinite;
  animation-delay: var(--d, 0ms);
}
@keyframes pinPulse {
  0% { transform: scale(0.4); opacity: 0.9; }
  70% { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}
.pin-label {
  position: absolute;
  left: calc(var(--pin-size) + 10px);
  top: 10%;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s, border-color 0.3s;
  pointer-events: none;
}
.map-pin.right .pin-label { left: auto; right: calc(var(--pin-size) + 10px); }
.map-pin:hover .pin-label,
.map-pin:focus-within .pin-label,
.map-pin.hovered .pin-label { opacity: 1; }
.map-pin:hover,
.map-pin.hovered { transform: translate(-50%, -100%) scale(1.14); }

/* ---------- legend ---------- */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: clamp(14px, 1.8vw, 22px) 4px 2px;
}
.map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: default;
  transition: border-color 0.3s, color 0.3s;
  color: var(--ink-60);
}
.map-legend li i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-blue);
}
.map-legend li em { font-style: normal; color: var(--ink-40); }
.map-legend li:hover,
.map-legend li.active { border-color: var(--red); color: var(--ink); }

.map-note { position: absolute; top: clamp(16px, 2vw, 26px); right: clamp(16px, 2.4vw, 30px); background: var(--bg); }

@media (max-width: 860px) {
  .locations-head { grid-template-columns: 1fr; }
  .services-lead { grid-template-columns: 1fr; gap: 18px; }
  .pin-label { display: none; }
  .map-pin { --pin-size: 20px; }
  .map-note { position: static; margin: 10px 4px 0; display: inline-flex; }
}

/* ============================================================
   SCROLL PARALLAX
   ============================================================ */
/* will-change only on the panning images — never on blended text
   (will-change can make browsers silently drop mix-blend-mode) */
img[data-px] { will-change: transform; }
/* images driven by the pan effect: transform is set per-frame by JS,
   so only the filter transition is needed */
img[data-px] { transition: filter 0.5s ease; }

.px-mask {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) - 6px);
}
.px-mask img { border-radius: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .img-left { width: 26vw; }
  .img-right { width: 31vw; }
  .projects-head { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 860px) {
  .main-nav, .header-right .clock { display: none; }
  .burger { display: flex; }
  .hero-main { grid-template-columns: 1fr; }
  .hero { background-position: 72% center; }
  .hero-collage { grid-template-columns: repeat(2, 1fr); }
  .hero-foot { flex-wrap: wrap; }
  .about-display { font-size: var(--text-about-tab); }
  .about-display .bp { display: none; }
}

@media (max-width: 560px) {
  .img-left { width: 36vw; top: 0; }
  .img-right { width: 42vw; }
  .footer-grid { grid-template-columns: 1fr; }
  .header-right .btn { display: none; }
  .hero-collage { gap: 10px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
  .reveal, .reveal-fade { opacity: 1; transform: none; }
  .about-display .w { color: var(--ink); }
}

/* ============================================================
   REGLA: textos "lead" (acompañantes de títulos display)
   = 24px fijos en desktop (text-2xl, en escala) · 16px en móvil ≤560
   El hero NO entra ("excepto hero"): su hero-sub conserva 24px explícitos.
   "Con décadas…" y "Nuestros fundadores:" = .about-lede > p.
   ============================================================ */
.about-lede > p,
.services-lead .muted,
.locations-head .muted,
.projects-head .muted {
  font-size: var(--text-2xl);
}
@media (max-width: 560px) {
  .about-lede > p,
  .services-lead .muted,
  .locations-head .muted,
  .projects-head .muted {
    font-size: var(--text-base);
  }
}
.hero-sub { font-size: var(--text-2xl); }

/* ---------- móvil: párrafo del hero más ligero (solo ≤560px) ---------- */
@media (max-width: 560px) {
  .hero-sub {
    font-size: var(--text-base);          /* 16px = leads de sección; baja de los 24px desktop */
    line-height: 1.6;         /* más aire, menos peso visual */
    max-width: 34ch;          /* medida cómoda en pantallas chicas */
    margin-top: 18px;
  }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-04 (solo móvil, desktop intacto)
   1) Logo del header 12px más pequeño (92 → 80px; header 116 → 104px)
   2) Stats del hero en 2 columnas (2×2), etiquetas en 2 líneas si hace falta
   3) Diana de fondo reducida, anclada arriba a la derecha
   ============================================================ */
@media (max-width: 560px) {
  /* 1 — logo más pequeño */
  :root { --header-h: 104px; } /* 80px logo + 12px de aire por lado */
  .wordmark-img img { height: 80px; }

  /* 2 — stats en 2 columnas */
  .hero-foot {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
    align-items: start;
  }
  .stat { min-width: 0; }

  /* 3 — diana reducida, arriba a la derecha (el resto queda amarillo de marca).
        Medido en navegador: 12% es el maximo que queda limpio incluso en 320px —
        contenido visible (dardo+trofeo+pata) a la derecha de "Más dirección."
        (texto termina ~x241) y por debajo del header fijo (104px). */
  .hero {
    background-size: auto 12%;
    background-position: right 12px top 108px;
  }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-04 (SET 2: solo móvil, desktop intacto)
   1) Logo del header 8px más pequeño (80 → 72px; header 104 → 96px)
   2) Diana de fondo +80px (mismo ancla, mismo resto del hero)
   3) Texto acompañante de display a 18px en móvil (hero-sub + 4 leads)
   4) Avatares del equipo −8px (164 → 156px)
   5) © 2026 OVD Media con la misma sangría que Menú/Síguenos (var(--pad))
   ============================================================ */
@media (max-width: 560px) {
  /* 1 — logo 8px más chico */
  :root { --header-h: 96px; } /* 72px logo + 12px de aire por lado */
  .wordmark-img img { height: 72px; }

  /* 2 — diana: se pidió +80px, pero a +80px literal las patas cruzan el
        párrafo (fondo ~273px vs tope del párrafo 258px) y el dardo toca el
        titular en 320px. Crecimiento máximo limpio: 153px de alto (límite
        vertical) o (138.55vw − 359px) en pantallas ≤370px (límite horizontal). */
  .hero {
    background-size: auto min(217px, calc(138.55vw - 295px));
    background-position: right 4px top 76px;
  }

  /* 3 — textos acompañantes a 18px en móvil */
  /* 3 — textos acompañantes: el tamaño lo heredan del base (16px desde la
         REGLA lead); aquí solo queda la altura de línea */
  .about-lede > p,
  .services-lead .muted,
  .locations-head .muted,
  .projects-head .muted {
    line-height: 1.6;
  }

  /* 4 — avatares del equipo −8px */
  .about-person img {
    width: 156px;
    height: 156px;
  }

}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-04 (SET 3: solo móvil, desktop intacto)
   1) Logo del header −8px (72 → 64px; header 96 → 88px)
   2) "Menos ruido." 12px hacia abajo
   3) line-height del h1 +4px (0.94→30.08px ⇒ 34px)
   4) Texto descriptivo de la data −2px (14 → 12px)
   ============================================================ */
@media (max-width: 560px) {
  /* 1 — logo 8px más chico */
  :root { --header-h: 88px; } /* 64px logo + 12px de aire por lado */
  .wordmark-img img { height: 64px; }

  /* 2+3 — titular del hero: 12px abajo y line-height +4px */
  .hero-heading h1 {
    margin-top: 20px;
    line-height: 40px;   /* era 0.94 (30.08px en 32px) + 4px — ahora 40px */
  }

  /* 4 — etiquetas de la data (décadas/ciudades/clientes/premios) −2px */
  .hero-foot .mono { font-size: var(--text-xs); }
}



/* ============================================================
   SET MÓVIL ≤560px — 2026-09-04 (SET 5: solo móvil, desktop intacto)
   1) Menos aire entre el párrafo del hero y la línea de la data
      (.hero-main padding-bottom 48px → 32px)
   2) Todos los títulos .display a 32px (Servicios, Clientes,
      Donde trabajamos, CTA del footer…)
   3) Avatares del equipo −8px (156 → 148px)
   ============================================================ */
@media (max-width: 560px) {
  /* 1 — espacio párrafo → línea de la data */
  .hero-main { padding-bottom: 32px; }

  /* 2 — títulos display a 32px → unificado a 30px (3xl) en el SET 10 */
  /* 3 — avatares −8px */
  .about-person img {
    width: 148px;
    height: 148px;
  }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-04 (SET 6: solo móvil, desktop intacto)
   1) Texto tras "Somos un estudio…" (.about-lede > p) a 16px
   2) Todos los títulos a font-weight 700 (h1 hero, .display, CTA footer)
   3) "Nuestros fundadores:" (párrafo añadido en HTML) — mismo estilo 16px
   4) Avatares −8px (148 → 140px)
   ============================================================ */
@media (max-width: 560px) {
  /* 1+3 — párrafos del bloque "Somos un estudio…" a 16px → ahora a nivel base
     (REGLA lead 16px para todos los viewports) */

  /* 2 — títulos con peso 700 */
  .hero-heading h1,
  .display,
  .footer-cta .display,
  .about-display { font-weight: 700; }

  /* 4 — avatares −8px */
  .about-person img {
    width: 140px;
    height: 140px;
  }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-04 (SET 7: solo móvil, desktop intacto)
   1) Breakpoint/aire entre "Un equipo con…" y "Nuestros fundadores:"
   2) Espacio "Nuestros fundadores:" → avatares a 48px (real era 56px)
   3) Mapa "Donde trabajamos": sin borde, full-bleed, 50% más grande
      (150vw) con scroll horizontal; al cargar (scroll 0) se ve
      Norteamérica + Sudamérica
   4) Leyenda de ciudades también en slider horizontal
   ============================================================ */
@media (max-width: 560px) {
  /* 1 — separación entre los dos párrafos del about */
  .about-lede > p + p { margin-top: 24px; }

  /* 2 — menos aire entre "Nuestros fundadores:" y los avatares */
  .about-people { margin-top: 48px; }

  /* 3 — mapa full-bleed + 50% más grande + scroll horizontal */
  .map-figure {
    border: 0;
    padding: 0;
    border-radius: 0;
    margin-inline: calc(-1 * var(--pad));
  }
  .map-stage {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .map-stage::-webkit-scrollbar { display: none; }
  .map-stage > svg { width: 195%; }
  .map-pins { left: 0; right: auto; width: 195%; }

  /* 4 — leyenda de ciudades en slider */
  .map-legend {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: 0;
  }
  .map-legend::-webkit-scrollbar { display: none; }
}

/* ============================================================
   TÍTULO alternativo móvil: "Donde trabajamos" → "6 ciudades,
   3 continentes." (solo ≤560px; desktop conserva el original)
   ============================================================ */
.show-mobile { display: none; }
@media (max-width: 560px) {
  .hide-mobile { display: none; }
  .show-mobile { display: inline; }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-04 (SET 8: solo móvil, desktop intacto)
   1) Mapa +30% (150% → 195%) — al cargar la zona de Lubbock sigue visible
   2) Chip "6 CIUDADES / 4 CONTINENTES" oculto en móvil
   3) Título de la sección cambiado a "6 ciudades, 3 continentes."
   ============================================================ */
@media (max-width: 560px) {
  .map-note { display: none; }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-05 (SETS 9+10: solo móvil, desktop intacto)
   Títulos de sección móvil a 30px fijos (paso text-3xl estándar Tailwind):
   títulos .display, CTA del footer y "Somos un estudio…" (.about-display).
   (SET 9 había puesto about-display a 32px; SET 10 unifica todo a 3xl.
   El H1 del hero pasó luego a 30px y en SET 11 a 36px = 4xl.)
   ============================================================ */
@media (max-width: 560px) {
  .display,
  .footer-cta .display,
  .about-display { font-size: var(--text-3xl); }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-05 (SET 11: solo móvil, desktop intacto)
   1) Números de la data del hero (.stat-num: +4, 10, +251, +8)
      34px → 30px → var(--text-3xl)
   2) Título del hero (.hero-heading h1) 30 → 36px → var(--text-4xl)
      (jerarquía móvil: hero 4xl > títulos de sección 3xl)
   Desktop/tablets intactos. Ojo: line-height del h1 sigue en 40px.
   ============================================================ */
@media (max-width: 560px) {
  .stat-num { font-size: var(--text-3xl); }
  .hero-heading h1 { font-size: var(--text-4xl); }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-05 (SET 12: solo móvil, desktop intacto)
   1) Nombre de la persona (About): 18px → 16px (text-base)
   2) Aire inferior de la sección About: medido desde la foto era ~95px
      (80px de padding de la sección + 14px de padding de la tarjeta
      + 1px de borde) → padding-bottom 65px para que foto→banda quede en 80px
   ============================================================ */
@media (max-width: 560px) {
  .about-person strong { font-size: var(--text-base); }
  .about { padding-bottom: 65px; }
}

/* ============================================================
   CAMBIO DESKTOP ≥1121px — 2026-09-05 (petición explícita)
   Todos los títulos de sección (excepto el hero) a 80px = text-7xl:
   los 9 .display (Servicios → footer CTA) + "Somos un estudio…"
   (.about-display). Valor fijo, sustituye al fluido:
   @1440: .display 74.9→80px / about 72→80px. ≤1120px intacto (fluido);
   móvil ≤560px intacto (3xl = 30px).
   ============================================================ */
@media (min-width: 1121px) {
  .display,
  .footer-cta .display,
  .about-display { font-size: var(--text-7xl); }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-05 (SET 13: solo móvil, desktop intacto)
   Aire título→descripción igualado a 28px en las cabeceras de
   Servicios y Clientes (28px = el del About). Al final
   del archivo para ganar la cascada a las bases y al ≤860.
   ============================================================ */
@media (max-width: 560px) {
  .services-lead,
  .projects-head { gap: 28px; }
  /* título de servicio ≤560: 24px → 20px; peso heredado del base */
  .svc-head h3 { font-size: var(--text-xl); }
}

/* ============================================================
   SET MÓVIL ≤560px — 2026-09-11 (footer: solo móvil, desktop intacto)
   1) Logo del footer −8px (240 → 232px)
   2) "Síguenos" encima del logotipo (order)
   3) Todo el footer alineado al centro
   4) © 2px más chico (14 → 12px = text-xs)
   5) Línea blanca superior del grid fuera
   ============================================================ */
@media (max-width: 560px) {
  /* 1 — logo −8px */
  .footer-brand img { width: min(232px, 100%); }
  /* 2 — Síguenos encima del logo */
  .footer-grid > div.footer-follow { order: -1; justify-content: center; }
  /* 3 — todo al centro */
  .footer-brand, .footer-grid > div { align-items: center; }
  /* 4 — © a 12px */
  .footer-copy { font-size: var(--text-xs); }
  /* 5 — sin la línea blanca */
  .footer-grid { border-top: 0; }
}
