/* ==========================================================================
   LUMER STUDIO | Sitio one-page
   Sistema: paleta del manual (solo tokens abajo + mezclas), Satoshi Black en
   titulares/números, Inter en cuerpo. Motivos: anillos concéntricos, punto de
   luz vanilla, cortes a 45°.
   Forma: superficies rectas con UN corte a 45° (arriba-derecha), botones y
   chips en píldora, campos de formulario 10px, fotos 4px.
   Easing único: --ease (expo out). En GSAP: "expo.out".
   ========================================================================== */

/* Fallbacks con métricas ajustadas: el texto no salta cuando llegan Satoshi e Inter */
@font-face { font-family: "Satoshi-fb"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"); font-weight: 900; size-adjust: 87%; ascent-override: 116%; descent-override: 27.5%; line-gap-override: 0%; }
@font-face { font-family: "Inter-fb"; src: local("Arial"), local("ArialMT"), local("Helvetica Neue"); font-weight: 400; size-adjust: 106.5%; ascent-override: 91%; descent-override: 22.5%; line-gap-override: 0%; }
@font-face { font-family: "Inter-fb"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Neue Bold"); font-weight: 700 800; size-adjust: 101.6%; ascent-override: 95%; descent-override: 23.6%; line-gap-override: 0%; }

:root {
  /* Paleta del manual */
  --yale: #0F3C65;
  --teal: #73937E;
  --vanilla: #FFF2BA;
  --charcoal: #111820;
  --offwhite: #F9F9F6;

  /* Derivados (solo mezclas de la paleta) */
  --yale-deep: color-mix(in srgb, var(--yale) 62%, var(--charcoal));
  --yale-ink: color-mix(in srgb, var(--yale) 40%, var(--charcoal));
  --paper: color-mix(in srgb, var(--offwhite) 93%, var(--teal));
  --line-dark: color-mix(in srgb, var(--offwhite) 16%, transparent);
  --line-light: color-mix(in srgb, var(--charcoal) 14%, transparent);
  --muted-light: color-mix(in srgb, var(--charcoal) 72%, var(--offwhite));
  --muted-dark: color-mix(in srgb, var(--offwhite) 76%, var(--yale));

  --font-display: "Satoshi", "Satoshi-fb", "Inter", system-ui, sans-serif;
  --font-body: "Inter", "Inter-fb", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 72px;
  /* Alto real del nav fijo: incluye la muesca / Dynamic Island */
  --nav-total: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  /* Margen lateral fluido; en horizontal con muesca respeta el área segura */
  --gutter: max(clamp(18px, 4vw, 48px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --maxw: 1320px;
  --cut: 32px;
  --foot-cut: clamp(48px, 6vw, 96px);
  --section-y: clamp(96px, 11vw, 168px);
  --logo-dot: var(--vanilla);
  --focus: var(--yale);
}

/* ---------- Lenis (reglas oficiales) + bloqueo de scroll ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
html.is-locked, html.is-locked body { overflow: hidden; overscroll-behavior: none; }

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--offwhite);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; }
ul, ol { list-style: none; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
section[id], footer { scroll-margin-top: var(--nav-total); }
/* Controles con estado propio: sin el destello gris de toque */
.btn, .chip, .media-btn, .phone, .tile__btn, .photo__item, .press__row, .folder, .wa-float, .nav__toggle, .reel__toggle, .modal__close, .modal__nav { -webkit-tap-highlight-color: transparent; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
[data-theme="dark"], [data-theme="charcoal"], .nav[data-on="dark"], .nav[data-on="charcoal"], .menu, .modal { --focus: var(--vanilla); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip {
  position: fixed; left: 16px; top: -80px; z-index: 200; padding: 12px 18px;
  background: var(--vanilla); color: var(--yale); font-weight: 700; border-radius: 999px;
  text-decoration: none; transition: top .3s var(--ease);
}
.skip:focus { top: 16px; }

.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }

/* ---------- Tipografía ---------- */
.display, .h2, .h3, .case__name, .step__name, .folder__name, .press__title, .stats dd, .type__sample, .tile__word {
  font-family: var(--font-display);
  font-weight: 900;
}
.display { font-size: clamp(3rem, 7.4vw, 7.4rem); line-height: .94; letter-spacing: -.04em; }
.h2 { font-size: clamp(2.3rem, 4.8vw, 4.4rem); line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
.h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.08; letter-spacing: -.02em; }
.lead { font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.6; color: var(--muted-light); max-width: 58ch; margin-top: 24px; text-wrap: pretty; }
.lead--on-dark { color: var(--muted-dark); }
.eyebrow {
  font-family: var(--font-body); font-weight: 700; font-size: .75rem; line-height: 1.2;
  letter-spacing: .42em; text-transform: uppercase; margin-bottom: 28px;
}
.eyebrow--vanilla { color: var(--vanilla); }
.eyebrow--teal { color: var(--teal); }
.eyebrow--yale { color: var(--yale); }

/* Píldora (hero) */
.pill {
  display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 16px 0 12px; margin-bottom: 22px;
  border: 1px solid color-mix(in srgb, var(--vanilla) 70%, transparent); border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--vanilla);
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--vanilla); box-shadow: 0 0 10px color-mix(in srgb, var(--vanilla) 80%, transparent); }

/* Cabecera de sección: título a la izquierda, apoyo a la derecha (misma línea base) */
.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 24px 56px; }
.section-head__main .eyebrow { margin-bottom: 22px; }
.section-head__aside { margin: 0; justify-self: start; }
.section-head .lead { margin-top: 0; }

/* Punto de luz del logo como punto final de titulares */
.punto {
  display: inline-block; width: .17em; height: .17em; margin-left: .05em; border-radius: 50%;
  background: var(--vanilla); box-shadow: 0 0 .35em color-mix(in srgb, var(--vanilla) 70%, transparent);
  vertical-align: baseline;
}
.sw .punto { box-shadow: none; }

/* Líneas partidas por GSAP */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .12em; margin: 0 -.04em -.12em; }
.sw > span { display: inline-block; }
[data-reveal-cut] { clip-path: polygon(0 0, var(--p, 200%) 0, calc(var(--p, 200%) - 100%) 100%, 0 100%); }

/* ---------- Botones ---------- */
.btn {
  --h: 54px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  height: var(--h); padding: 0 26px; border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none; white-space: nowrap; border: 1px solid transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), scale .2s var(--ease);
}
.btn:active { scale: .97; }
[data-magnetic] { will-change: transform; }
.btn--sm { --h: 44px; padding: 0 20px; font-size: .88rem; }
.btn__arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
@media (hover: hover) and (pointer: fine) { .btn:hover .btn__arrow { transform: translate(3px, -3px); } }
.btn--vanilla { background: var(--vanilla); color: var(--yale); }
@media (hover: hover) and (pointer: fine) { .btn--vanilla:hover { background: var(--offwhite); } }
.btn--line { color: var(--offwhite); border-color: var(--line-dark); }
@media (hover: hover) and (pointer: fine) { .btn--line:hover { border-color: var(--offwhite); } }
.btn--yale { background: var(--yale); color: var(--offwhite); }
@media (hover: hover) and (pointer: fine) { .btn--yale:hover { background: var(--charcoal); } }
.btn--outline { color: var(--yale); border-color: color-mix(in srgb, var(--yale) 40%, transparent); }
@media (hover: hover) and (pointer: fine) { .btn--outline:hover { border-color: var(--yale); background: color-mix(in srgb, var(--yale) 6%, transparent); } }

/* ---------- Logos ---------- */
.logo { color: currentColor; height: auto; }

/* ==========================================================================
   LOADER
   ========================================================================== */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; align-content: center; gap: 28px;
  background: var(--yale); color: var(--offwhite);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% + 100vw));
  transition: clip-path 1.1s cubic-bezier(.76, 0, .24, 1);
  /* Si main.js no carga, el loader se va solo */
  animation: loaderFailsafe .6s ease 4.5s forwards;
}
.loader.is-done { clip-path: polygon(0 0, 100% 0, 100% -100vw, 0 0); pointer-events: none; }
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.loader__rings, .menu__rings, .process__rings, .contact__rings, .bento__rings {
  position: absolute; pointer-events: none; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 9%, transparent) 0 1px, transparent 1.5px 13px);
  -webkit-mask: radial-gradient(circle at center, #000 0 30%, transparent 70%);
  mask: radial-gradient(circle at center, #000 0 30%, transparent 70%);
}
.loader__rings { width: 150vmax; height: 150vmax; left: 50%; top: 50%; translate: -50% -50%; animation: ringsPulse 3s var(--ease) both; }
@keyframes ringsPulse { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } }

.loader__mark { width: clamp(64px, 9vw, 96px); position: relative; }
.loader__iso { width: 100%; overflow: visible; }
.loader__m { animation: isoWipe 1.1s var(--ease) .1s both; }
.loader__dot {
  transform-box: fill-box; transform-origin: center;
  animation: dotIn .8s var(--ease) .75s both;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--vanilla) 80%, transparent));
}
@keyframes isoWipe {
  from { clip-path: polygon(0 100%, 0 100%, 0 100%); }
  to { clip-path: polygon(0 100%, 0 -120%, 220% 100%); }
}
@keyframes dotIn { from { transform: scale(0); } to { transform: scale(1); } }
.loader__label { font-size: .72rem; font-weight: 700; letter-spacing: .5em; text-transform: uppercase; color: var(--muted-dark); margin-right: -.5em; animation: fadeUp .8s var(--ease) .5s both; }
.loader__count { position: absolute; right: var(--gutter); bottom: 28px; font-family: var(--font-display); font-weight: 900; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; color: var(--vanilla); font-variant-numeric: tabular-nums; }
.loader__count::after { content: "%"; font-size: .4em; margin-left: .1em; vertical-align: top; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px);
  color: var(--offwhite);
  transition: background-color .5s var(--ease), color .5s var(--ease), box-shadow .5s var(--ease), transform .6s var(--ease);
}
.nav__inner { height: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 40px; }
.nav__brand { display: inline-flex; align-items: center; flex-shrink: 0; min-height: 44px; }
.nav__brand .logo { width: 104px; }
.nav__links { display: flex; gap: 30px; margin-left: auto; }
.nav__links a { position: relative; font-size: .93rem; font-weight: 400; text-decoration: none; padding-block: 8px; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav__links a.is-current::after { transform: scaleX(1); transform-origin: left; }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover::after { transform: scaleX(1); transform-origin: left; } }
.nav.is-scrolled[data-on="charcoal"] { background: color-mix(in srgb, var(--charcoal) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 var(--line-dark); }
.nav.is-scrolled[data-on="dark"] { background: color-mix(in srgb, var(--yale-deep) 78%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); }
.nav[data-on="light"], .nav[data-on="vanilla"] { color: var(--yale); }
.nav.is-scrolled[data-on="light"] { background: color-mix(in srgb, var(--offwhite) 84%, transparent); -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%); box-shadow: 0 1px 0 var(--line-light); }
.nav.is-scrolled[data-on="vanilla"] { background: color-mix(in srgb, var(--vanilla) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line-light); }
.nav[data-on="light"] .nav__cta, .nav[data-on="vanilla"] .nav__cta { background: var(--yale); color: var(--offwhite); }
.nav[data-on="light"], .nav[data-on="vanilla"] { --logo-dot: var(--yale); }
.nav__toggle { display: none; width: 48px; height: 48px; margin-left: auto; position: relative; border-radius: 50%; }
.nav__toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.nav__toggle span:first-child { top: 19px; }
.nav__toggle span:last-child { top: 27px; right: 19px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 23px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 23px; right: 13px; transform: rotate(-45deg); }
.menu-open .nav { color: var(--offwhite); background: transparent !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; --logo-dot: var(--vanilla); }

/* Menú móvil */
.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--yale); color: var(--offwhite);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 32px) var(--gutter) calc(36px + env(safe-area-inset-bottom, 0px)); overflow: hidden auto;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path .8s cubic-bezier(.76, 0, .24, 1);
}
.menu.is-open { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% + 100vw)); }
.menu__rings { width: 130vmax; height: 130vmax; right: -60vmax; top: -40vmax; }
.menu__links { display: flex; flex-direction: column; gap: 6px; position: relative; }
.menu__links a { font-family: var(--font-display); font-weight: 900; font-size: clamp(2.3rem, 11vw, 4rem); line-height: 1.1; letter-spacing: -.03em; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .menu__links a:hover { color: var(--vanilla); } }
.menu__foot { position: relative; display: grid; gap: 20px; margin-top: 40px; color: var(--muted-dark); font-size: .95rem; }
.menu__foot .btn { justify-self: start; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--nav-total) + 40px) 0 72px; background: var(--yale); color: var(--offwhite); overflow: hidden; isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__texture {
  position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover; opacity: .55; mix-blend-mode: luminosity;
  -webkit-mask: radial-gradient(ellipse 80% 90% at 70% 50%, #000 20%, transparent 85%);
  mask: radial-gradient(ellipse 80% 90% at 70% 50%, #000 20%, transparent 85%);
}
.hero__light {
  --mx: 72%; --my: 44%;
  position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--vanilla) 26%, transparent), transparent 62%);
  mix-blend-mode: screen; transition: background-position .2s linear;
}
.hero__beam {
  position: absolute; left: 50%; top: 50%; width: 180vmax; height: 1px; translate: -30% -50%; rotate: -45deg;
  background: linear-gradient(90deg, transparent 30%, color-mix(in srgb, var(--vanilla) 55%, transparent) 50%, transparent 70%);
  opacity: .55;
}
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.hero__copy { grid-column: 1 / span 8; }
.hero__title { max-width: 11ch; }
.hero .pill { margin-bottom: 30px; }
.hero__lead { margin-top: 32px; max-width: 44ch; font-size: clamp(1.05rem, 1.35vw, 1.22rem); color: var(--muted-dark); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; position: relative; z-index: 2; }

.hero__reel { grid-column: 9 / -1; position: relative; justify-self: end; width: min(100%, 340px); }
.hero__reel::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 260%; aspect-ratio: 1; translate: -50% -50%; z-index: -1; border-radius: 50%; pointer-events: none; /* decorativo: no debe tapar los botones del hero */
  background: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 10%, transparent) 0 1px, transparent 1.5px 16px);
  -webkit-mask: radial-gradient(circle at center, #000 0 22%, transparent 64%);
  mask: radial-gradient(circle at center, #000 0 22%, transparent 64%);
  animation: ripple 9s ease-in-out infinite alternate;
}
@keyframes ripple { from { scale: .94; } to { scale: 1.06; } }
/* Indicador de scroll: línea con el punto de luz que baja */
.hero__scroll {
  position: absolute; left: max(var(--gutter), calc((100vw - var(--maxw)) / 2)); bottom: 28px;
  display: flex; align-items: center; gap: 14px; font-size: .7rem; font-weight: 700; letter-spacing: .42em; text-transform: uppercase; color: var(--muted-dark);
}
.hero__scroll-line { position: relative; width: 1px; height: 48px; background: var(--line-dark); overflow: hidden; }
.hero__scroll-line::after {
  content: ""; position: absolute; left: -2.5px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--vanilla);
  box-shadow: 0 0 8px var(--vanilla); animation: scrollDot 2.2s var(--ease) infinite;
}
@keyframes scrollDot { from { translate: 0 -8px; opacity: 0; } 30% { opacity: 1; } to { translate: 0 50px; opacity: 0; } }
.reel {
  position: relative; aspect-ratio: 9 / 16; background: var(--yale-deep); overflow: hidden;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.reel__video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.reel__shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--yale) 70%, transparent)); }
.reel__toggle {
  position: absolute; left: 14px; top: 14px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--charcoal) 55%, transparent); color: var(--offwhite);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background-color .3s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .reel__toggle:hover { background: var(--yale); } }
.reel__toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.reel__toggle .i-play { display: none; fill: currentColor; stroke: none; }
.reel__toggle[aria-pressed="true"] .i-play { display: block; }
.reel__toggle[aria-pressed="true"] .i-pause { display: none; }
.reel__badge {
  position: absolute; left: -64px; bottom: 56px; width: 136px; height: 136px; border-radius: 50%;
  background: var(--yale-deep); box-shadow: 0 0 0 1px var(--line-dark); overflow: visible;
  animation: spin 26s linear infinite;
}
.reel__badge text { font-family: var(--font-body); font-weight: 700; font-size: 11.5px; letter-spacing: .32em; fill: var(--offwhite); }
.reel__badge::after { content: ""; }
.hero__reel::after {
  content: ""; position: absolute; left: -64px; bottom: 56px; width: 136px; height: 136px; pointer-events: none;
  background: radial-gradient(circle at center, var(--vanilla) 0 7px, color-mix(in srgb, var(--vanilla) 35%, transparent) 8px, transparent 22px);
}
@keyframes spin { to { rotate: 360deg; } }

/* ==========================================================================
   CLIENTES (marquee)
   ========================================================================== */
.clients { background: var(--offwhite); padding: 56px 0 60px; border-bottom: 1px solid var(--line-light); }
.clients__head .eyebrow { margin-bottom: 14px; }
.clients__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.05; letter-spacing: -.03em; color: var(--yale); margin-bottom: 36px; text-wrap: balance; }
.marquee {
  overflow: hidden;
  /* panel gris azulado como en el portafolio: los logos claros (WR Autos) se leen sin alterar sus colores */
  background: color-mix(in srgb, var(--yale) 24%, var(--offwhite));
  padding-block: 22px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 36px 64px; padding-inline: var(--gutter); }
.marquee.is-ready .marquee__track { flex-wrap: nowrap; justify-content: flex-start; width: max-content; padding-inline: 0; animation: marquee 60s linear infinite; }
.marquee.is-ready:focus-within .marquee__track { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) { .marquee.is-ready:hover .marquee__track { animation-play-state: paused; } }
.marquee__track li { flex-shrink: 0; display: grid; place-items: center; width: 150px; height: 72px; }
.marquee__track li.is-wide { width: 196px; }
.marquee.is-ready .marquee__track li { margin-right: 56px; }
/* Caja óptica común: los logos se normalizan por alto y ancho máximos */
.marquee__track img { width: auto; height: auto; max-width: 140px; max-height: 54px; object-fit: contain; transition: transform .5s var(--ease); } /* logos con sus colores originales (decisión del cliente) */
.marquee__track li.is-wide img { width: 100%; max-width: 190px; max-height: 34px; }
@media (hover: hover) and (pointer: fine) { .marquee__track li:hover img { transform: scale(1.06); } }
/* Logos de bloque de color (escudo): gris medio, no mancha negra */
.marquee__word { font-weight: 800; font-size: .74rem; line-height: 1.35; letter-spacing: .2em; text-transform: uppercase; text-align: center; color: var(--charcoal); opacity: .9; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   NOSOTROS
   ========================================================================== */
.about { background: var(--offwhite); padding-bottom: clamp(64px, 7vw, 104px); }
.clients + .about { padding-top: clamp(72px, 8vw, 120px); }
.about__title { color: var(--yale); }
.about__intro { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.about__main { grid-column: 1 / span 8; }
.about__mark { grid-column: 9 / -1; position: relative; justify-self: center; width: min(100%, 340px); aspect-ratio: 1; display: grid; place-items: center; }
.about__rings { position: absolute; inset: 0; border-radius: 50%; background: var(--yale); overflow: hidden; }
.about__rings::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 11%, transparent) 0 1px, transparent 1.5px 14px);
}
.about__iso { position: relative; height: 46%; width: auto; color: var(--offwhite); --logo-dot: var(--vanilla); filter: drop-shadow(0 0 18px color-mix(in srgb, var(--vanilla) 30%, transparent)); }
.about__statement {
  margin-top: 48px; max-width: 30ch; font-size: clamp(1.55rem, 3.1vw, 2.8rem); line-height: 1.24; letter-spacing: -.022em;
  font-weight: 400; color: var(--charcoal); text-wrap: pretty;
}
.about__statement strong { font-weight: 800; color: var(--yale); background: linear-gradient(transparent 64%, var(--vanilla) 64%, var(--vanilla) 94%, transparent 94%); }
.about__statement .word { transition: opacity .2s linear; }
.pillars { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line-light); font-weight: 700; font-size: 1.02rem; color: var(--yale); }
.pillars li { display: flex; align-items: center; gap: 12px; }
.pillars__check { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--vanilla); flex-shrink: 0; }
.pillars__check svg { width: 16px; height: 16px; fill: none; stroke: var(--yale); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; margin-top: clamp(64px, 8vw, 104px); }
.bento__cell {
  position: relative; overflow: hidden; padding: clamp(28px, 3vw, 40px); min-height: 300px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.bento__cell p { max-width: 46ch; }
.bento__kicker { font-weight: 700; font-size: .95rem; }
.bento__icon { position: absolute; top: clamp(28px, 3vw, 40px); left: clamp(28px, 3vw, 40px); width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bento__icon .fill { fill: currentColor; }
.bento__cell--media { grid-column: 1 / span 7; grid-row: span 2; min-height: 640px; color: var(--offwhite); background: var(--charcoal); }
.bento__cell--media img, .bento__cell--media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transition: transform 1.2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .bento__cell--media:hover img, .bento__cell--media:hover video { transform: scale(1.04); } }
.bento__cell--media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, color-mix(in srgb, var(--charcoal) 88%, transparent) 88%); }
.bento__body { position: relative; z-index: 1; display: grid; gap: 12px; }
.bento__body p:not(.bento__kicker) { color: var(--muted-dark); }
.bento__cell--media .bento__kicker { color: var(--vanilla); }
.bento__cell--teal { grid-column: 8 / -1; background: var(--teal); color: var(--charcoal); }
.bento__cell--yale { grid-column: 8 / -1; background: var(--yale); color: var(--offwhite); }
.bento__cell--yale p:not(.bento__kicker) { color: var(--muted-dark); }
.bento__cell--yale .bento__kicker, .bento__cell--yale .bento__icon { color: var(--vanilla); }
.bento__rings { width: 520px; height: 520px; right: -200px; top: -200px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(72px, 9vw, 120px); padding-top: 40px; border-top: 1px solid var(--line-light); }
.stats__item { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 14px; }
.stats dd { font-size: clamp(3rem, 6vw, 5.6rem); line-height: .9; letter-spacing: -.04em; color: var(--yale); font-variant-numeric: tabular-nums; }
.stats__suffix { color: var(--teal); margin-left: .06em; font-size: .6em; letter-spacing: -.02em; }
.stats dt { font-size: .95rem; color: var(--muted-light); max-width: 24ch; }

/* ==========================================================================
   SERVICIOS (carpetas)
   ========================================================================== */
.services { background: var(--paper); }
.services .h2 { color: var(--yale); max-width: 16ch; }
.services__head .lead { max-width: 40ch; }
.folders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; margin-top: clamp(56px, 7vw, 88px); }
.folder {
  --f-front: var(--yale); --f-back: var(--yale-ink); --f-text: var(--offwhite); --f-icon: var(--vanilla);
  position: relative; display: block; aspect-ratio: 4 / 2.7; text-decoration: none; color: var(--f-text); perspective: 1100px;
}
.folder__back {
  position: absolute; inset: 0; background: var(--f-back);
  clip-path: polygon(0 0, 40% 0, calc(40% + 26px) 26px, 100% 26px, 100% 100%, 0 100%);
}
.folder__paper {
  position: absolute; left: 7%; right: 7%; top: 38px; height: 50%; background: var(--offwhite);
  box-shadow: 0 0 0 1px var(--line-light); opacity: 0; transition: transform .7s var(--ease), opacity .4s var(--ease);
}
.folder__paper::before, .folder__paper::after { content: ""; position: absolute; left: 12%; height: 3px; border-radius: 2px; background: var(--line-light); }
.folder__paper::before { top: 14px; right: 30%; }
.folder__paper::after { top: 24px; right: 48%; }
.folder__front {
  position: absolute; inset: 52px 0 0 0; background: var(--f-front); padding: clamp(20px, 2.2vw, 30px);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 0 100%);
  transform-origin: 50% 100%; transition: transform .7s var(--ease);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--offwhite) 14%, transparent);
}
.folder__icon { position: absolute; top: clamp(20px, 2.2vw, 30px); left: clamp(20px, 2.2vw, 30px); width: 42px; height: 42px; fill: none; stroke: var(--f-icon); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .7s var(--ease); }
.folder__icon .dots { stroke-width: 2.6; }
.folder__name { font-size: clamp(1.15rem, 1.55vw, 1.45rem); line-height: 1.1; letter-spacing: -.015em; overflow-wrap: break-word; }
.folder__desc { font-size: .9rem; line-height: 1.45; opacity: .82; max-width: 34ch; }
.folder:focus-visible .folder__front { transform: rotateX(-16deg); }
@media (hover: hover) and (pointer: fine) { .folder:hover .folder__front { transform: rotateX(-16deg); } }
.folder:focus-visible .folder__paper { opacity: 1; transform: translateY(-22px) rotate(-2deg); }
@media (hover: hover) and (pointer: fine) { .folder:hover .folder__paper { opacity: 1; transform: translateY(-22px) rotate(-2deg); } }
@media (hover: hover) and (pointer: fine) { .folder:hover .folder__icon { transform: translate(4px, -4px); } }
.folder:focus-visible { outline-offset: 6px; }
.folder--vanilla { --f-front: var(--vanilla); --f-back: color-mix(in srgb, var(--teal) 35%, var(--offwhite)); --f-text: var(--yale); --f-icon: var(--yale); }
.folder--charcoal { --f-front: var(--charcoal); --f-back: color-mix(in srgb, var(--charcoal) 70%, var(--yale)); --f-text: var(--offwhite); --f-icon: var(--vanilla); }
.folder--teal { --f-front: var(--teal); --f-back: color-mix(in srgb, var(--teal) 72%, var(--charcoal)); --f-text: var(--charcoal); --f-icon: var(--charcoal); }
.folder--light { --f-front: var(--offwhite); --f-back: color-mix(in srgb, var(--offwhite) 88%, var(--yale)); --f-text: var(--yale); --f-icon: var(--yale); }
.folder--light .folder__front { box-shadow: inset 0 0 0 1px var(--line-light); }

/* ==========================================================================
   PROCESO
   ========================================================================== */
.process { background: var(--yale); color: var(--offwhite); overflow: hidden; }
.process__rings { width: 1100px; height: 1100px; right: -380px; top: -420px; }
.process .container { position: relative; z-index: 1; }
.process__beam {
  position: absolute; left: 50%; top: 30%; z-index: 0; width: 220vmax; height: 1px; translate: -50% -50%; rotate: -45deg; pointer-events: none;
  background: linear-gradient(90deg, transparent 35%, color-mix(in srgb, var(--vanilla) 45%, transparent) 50%, transparent 65%);
  opacity: .3;
}
.process .lead { max-width: 44ch; }
.steps { position: relative; margin-top: clamp(64px, 8vw, 104px); }
.steps__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.steps__track, .steps__draw { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.steps__track { stroke: var(--line-dark); }
.steps__draw { stroke: var(--vanilla); }
.steps__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; position: relative; }
.step { position: relative; padding-top: 40px; }
.step:nth-child(1) { margin-top: 150px; }
.step:nth-child(2) { margin-top: 100px; }
.step:nth-child(3) { margin-top: 50px; }
.step__dot {
  /* Nodo en rombo: el corte a 45° del isotipo */
  position: absolute; left: 1px; top: 0; width: 16px; height: 16px; border-radius: 2px; translate: 0 -50%; rotate: 45deg;
  background: var(--yale); box-shadow: inset 0 0 0 1.5px var(--vanilla); transition: background-color .5s var(--ease), box-shadow .5s var(--ease);
}
.step.is-lit .step__dot { background: var(--vanilla); box-shadow: 0 0 0 6px color-mix(in srgb, var(--vanilla) 18%, transparent), 0 0 24px color-mix(in srgb, var(--vanilla) 60%, transparent); }
.step__name { font-size: clamp(1.5rem, 2.3vw, 2.1rem); line-height: 1.05; letter-spacing: -.02em; }
.step p { margin-top: 14px; color: var(--muted-dark); font-size: .98rem; max-width: 30ch; }

/* ==========================================================================
   PROYECTOS
   ========================================================================== */
.work { background: var(--charcoal); color: var(--offwhite); padding-bottom: clamp(56px, 6vw, 96px); }
.work__head .h2 { max-width: 15ch; }
.work__head { scroll-margin-top: calc(var(--nav-total) + 16px); }
.work__head .filters { margin-top: 0; justify-self: end; justify-content: flex-end; padding-bottom: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.chip {
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line-dark);
  font-size: .9rem; font-weight: 700; color: var(--offwhite); transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .chip:hover { border-color: var(--offwhite); } }
.chip.is-active { background: var(--vanilla); color: var(--yale); border-color: var(--vanilla); }
.work__group { margin-top: clamp(64px, 7vw, 96px); }
.work__group.is-hidden, .case.is-hidden, .tile.is-hidden { display: none; }
.work__sub { font-family: var(--font-body); font-weight: 700; font-size: 1.15rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line-dark); }
.work__sub span { font-size: .72rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--teal); }

.cases { display: grid; gap: 28px; margin-top: 32px; }
.case {
  --top: calc(var(--nav-total) + 20px);
  position: sticky; top: var(--top);
  display: grid; grid-template-columns: minmax(0, 1.05fr) auto minmax(0, 1fr); gap: clamp(28px, 3.2vw, 48px); align-items: center;
  min-height: min(620px, calc(100vh - var(--nav-h) - 60px)); min-height: min(620px, calc(100svh - var(--nav-h) - 60px)); padding: clamp(28px, 3vw, 44px);
  background: var(--yale-ink); color: var(--offwhite);
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 0 100%);
  transform-origin: 50% 0; will-change: transform; overflow: hidden;
}
.case + .case { margin-top: 16vh; }
.case:nth-child(2) { --top: calc(var(--nav-total) + 42px); background: var(--yale-deep); }
.case:nth-child(3) { --top: calc(var(--nav-total) + 64px); background: color-mix(in srgb, var(--yale) 48%, var(--charcoal)); }
.case:nth-child(4) { --top: calc(var(--nav-total) + 86px); background: var(--yale); }
.case:nth-child(5) { --top: calc(var(--nav-total) + 108px); background: color-mix(in srgb, var(--yale) 56%, var(--charcoal)); }
.case::before {
  content: ""; position: absolute; width: 640px; height: 640px; left: -260px; bottom: -320px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 7%, transparent) 0 1px, transparent 1.5px 12px);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%);
}
.case__info { position: relative; display: grid; gap: 18px; align-content: start; align-self: start; padding-top: 12px; }
.case__info > p:not(.case__tags):not(.case__metric) { color: var(--muted-dark); max-width: 42ch; }
.case__tags { font-size: .7rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--vanilla); line-height: 1.7; }
.case__name { font-size: clamp(2rem, 3.3vw, 3.1rem); line-height: 1; letter-spacing: -.03em; }
.case__name span { display: block; margin-top: 10px; font-family: var(--font-body); font-weight: 400; font-size: 1rem; letter-spacing: 0; color: var(--muted-dark); }
.case__metric { font-size: .95rem; color: var(--muted-dark); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: -4px; }
.case__metric strong { font-family: var(--font-display); font-weight: 900; font-size: 1.9rem; color: var(--vanilla); letter-spacing: -.02em; }
/* Enlace verificable al perfil real del caso */
.case__link {
  justify-self: start; display: inline-block; padding-block: 11px; margin-block: -11px -4px; line-height: 1.5;
  font-size: .92rem; font-weight: 700; color: var(--vanilla); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, var(--vanilla) 45%, transparent); transition: text-decoration-color .3s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .case__link:hover { text-decoration-color: var(--vanilla); } }
.case__link svg { display: inline-block; vertical-align: -2px; margin-left: 6px; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
@media (hover: hover) and (pointer: fine) { .case__link:hover svg { transform: translate(2px, -2px); } }

.phone {
  position: relative; width: clamp(200px, 17vw, 250px); aspect-ratio: 735 / 1598; border-radius: 36px; overflow: hidden;
  border: 8px solid var(--charcoal); background: var(--charcoal);
  box-shadow: 0 0 0 1px var(--line-dark), 0 40px 60px -30px color-mix(in srgb, var(--charcoal) 80%, transparent);
}
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case__media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; height: min(520px, calc(100vh - var(--nav-h) - 150px)); height: min(520px, calc(100svh - var(--nav-h) - 150px)); }
.case__media--wide { grid-template-rows: auto 1fr; }
.case__media--wide .media-btn:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.case__media--wide .media-btn:last-child { grid-column: 1 / -1; }
.media-btn { position: relative; overflow: hidden; border-radius: 4px; cursor: zoom-in; background: var(--charcoal); min-height: 0; }
.media-btn img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 30%); transition: transform .9s var(--ease); }
@media (hover: hover) and (pointer: fine) { .media-btn:hover img { transform: scale(1.05); } }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; margin-top: 36px; padding-bottom: 56px; }
.tile { transition: translate .8s var(--ease); }
.tiles:not(.is-filtered) .tile:nth-child(even) { translate: 0 32px; }
.tile__btn { display: grid; gap: 16px; width: 100%; text-align: left; cursor: pointer; }
.tile__btn--static { cursor: default; }
.tile__img { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--yale-ink); }
.tile__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .9s var(--ease); }
/* Pósters recortados a 4:5 por encima de los subtítulos; velo corto para asentar el pie */
.tile__img:not(.tile__img--type)::after {
  content: ""; position: absolute; inset: auto 0 0; height: 28%; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--charcoal) 55%, transparent));
}
@media (hover: hover) and (pointer: fine) { .tile__btn:hover .tile__img img { transform: scale(1.05); } }
.tile__play {
  position: absolute; z-index: 1; left: 50%; top: 50%; width: 68px; height: 68px; translate: -50% -50%; border-radius: 50%; display: grid; place-items: center;
  background: var(--vanilla); color: var(--yale); transition: transform .6s var(--ease);
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--vanilla) 22%, transparent);
}
.tile__play svg { width: 24px; height: 24px; fill: currentColor; margin-left: 3px; }
@media (hover: hover) and (pointer: fine) { .tile__btn:hover .tile__play { transform: scale(1.1); } }
.tile__cap { display: grid; gap: 4px; }
.tile__name { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.tile__name em { font-style: normal; font-weight: 400; color: var(--muted-dark); }
.tile__meta { font-size: .86rem; color: var(--teal); }
.tile__img--type { display: grid; place-items: center; background: var(--yale); container-type: inline-size; }
.tile__img--type::before {
  content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 8%, transparent) 0 1px, transparent 1.5px 11px);
}
.tile__img .tile__logo { position: absolute; inset: auto; width: 50%; height: auto; aspect-ratio: 1; object-fit: cover; top: 13%; left: 50%; translate: -50% 0; border-radius: 4px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--offwhite) 10%, transparent); transition: transform .9s var(--ease); }
.tile__word { position: relative; align-self: end; justify-self: start; max-width: 100%; padding: 22px; z-index: 1; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1; letter-spacing: -.02em; color: var(--offwhite); }
@container (max-width: 300px) { .tile__word { font-size: clamp(.95rem, 12.5cqi, 1.9rem); padding: clamp(12px, 8cqi, 22px); } }

.work__cta {
  margin-top: clamp(72px, 8vw, 112px); padding: clamp(28px, 3.5vw, 48px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  background: var(--yale); clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); position: relative; overflow: hidden;
}
.work__cta::before {
  content: ""; position: absolute; width: 640px; height: 640px; right: -240px; top: -300px; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 8%, transparent) 0 1px, transparent 1.5px 12px);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%);
}
.work__cta .h3 { position: relative; max-width: 20ch; }
.work__cta-actions { position: relative; display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   FOTOGRAFÍA (paneo horizontal)
   ========================================================================== */
.photo { background: var(--charcoal); color: var(--offwhite); padding-block: 40px clamp(96px, 10vw, 150px); overflow: hidden; }
.photo__track {
  display: flex; align-items: center; gap: clamp(24px, 3vw, 48px);
  padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2)); overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  scrollbar-width: thin; scrollbar-color: var(--line-dark) transparent; padding-bottom: 12px;
}
.photo__intro { position: relative; flex: 0 0 min(440px, 82vw); scroll-snap-align: start; }
.photo__intro > :not(.photo__rings) { position: relative; }
.photo__rings {
  position: absolute; width: 760px; height: 760px; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%; pointer-events: none;
  background: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 7%, transparent) 0 1px, transparent 1.5px 14px);
  -webkit-mask: radial-gradient(circle at center, #000 0 25%, transparent 66%); mask: radial-gradient(circle at center, #000 0 25%, transparent 66%);
}
.photo__intro .h2 { font-size: clamp(2.2rem, 4vw, 3.8rem); }
.photo__hint-touch, .photo__swipe, .photo__progress { display: none; }
.photo__swipe { margin-top: 22px; font-size: .72rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--vanilla); }
.photo__swipe span { display: inline-block; letter-spacing: 0; animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(6px); } }
.photo__progress { height: 2px; margin: 22px var(--gutter) 0; background: var(--line-dark); overflow: hidden; }
.photo__progress span { display: block; height: 100%; width: 100%; background: var(--vanilla); transform-origin: 0 50%; transform: scaleX(var(--p, .08)); }
.photo__list { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.photo__item { display: block; height: clamp(360px, 64vh, 600px); height: clamp(360px, 64svh, 600px); overflow: hidden; border-radius: 4px; cursor: zoom-in; scroll-snap-align: start; background: var(--yale-ink); }
.photo__item img { height: 100%; width: auto; max-width: none; transition: transform 1s var(--ease); }
@media (hover: hover) and (pointer: fine) { .photo__item:hover img { transform: scale(1.04); } }
.photo__list li { display: grid; gap: 14px; flex: 0 0 auto; }
.photo__cap { display: flex; align-items: baseline; gap: 12px; font-size: .72rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--muted-dark); }
.photo__cap span { font-family: var(--font-body); font-weight: 800; letter-spacing: 0; font-size: .9rem; color: var(--vanilla); }
.photo__count { display: none; }
.has-pan .photo__count {
  display: block; position: absolute; left: max(var(--gutter), calc((100vw - var(--maxw)) / 2)); bottom: 28px;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1; letter-spacing: -.03em;
  color: color-mix(in srgb, var(--offwhite) 35%, transparent); font-variant-numeric: tabular-nums;
}
.photo__count span { color: var(--vanilla); }
.has-pan .photo { padding-block: 0; }
.has-pan .photo__pin { position: relative; height: 100vh; height: 100svh; display: flex; align-items: flex-start; padding-top: calc(var(--nav-h) + clamp(24px, 5vh, 56px)); }
.has-pan .work { padding-bottom: clamp(24px, 3vw, 48px); }
.has-pan .photo__track { overflow: visible; scroll-snap-type: none; will-change: transform; padding-bottom: 0; }

/* ==========================================================================
   PRENSA
   ========================================================================== */
.press { background: var(--offwhite); }
.press__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.press__aside { grid-column: 1 / span 5; position: sticky; top: calc(var(--nav-total) + 32px); }
.press__aside .h2 { color: var(--yale); }
.outlets { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line-light); }
.outlets__label--next { margin-top: 18px; }
.outlets__label { font-size: .72rem; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--yale); margin-bottom: 12px; }
.outlets__list { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.outlets__list li { min-width: 0; overflow-wrap: anywhere; font-weight: 800; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-light); }
.press__preview {
  margin-top: 40px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--yale);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.press__preview img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transition: opacity .35s var(--ease), transform 1.2s var(--ease); }
.press__preview img.is-swapping { opacity: 0; transform: scale(1.04); }
.press__list { grid-column: 7 / -1; border-top: 1px solid var(--line-light); }
.press__cta { grid-column: 7 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 36px; padding-bottom: 72px; }
.press__cta p { font-weight: 700; color: var(--yale); max-width: 30ch; }
@media (min-width: 961px) { .press__row { padding-right: 64px; } }
.press__row {
  width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "media arrow" "title arrow";
  align-items: center; gap: 6px 24px; padding: 30px 0; border-bottom: 1px solid var(--line-light); color: var(--charcoal);
}
.press__thumb { display: none; }
.press__media { grid-area: media; font-size: .9rem; font-weight: 700; color: var(--yale); }
.press__title { grid-area: title; font-size: clamp(1.35rem, 2.3vw, 2.1rem); line-height: 1.08; letter-spacing: -.025em; transition: transform .6s var(--ease), color .4s var(--ease); }
.press__arrow { grid-area: arrow; width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease); }
button.press__row:focus-visible .press__title { transform: translateX(12px); color: var(--yale); }
@media (hover: hover) and (pointer: fine) { button.press__row:hover .press__title { transform: translateX(12px); color: var(--yale); } }
@media (hover: hover) and (pointer: fine) { button.press__row:hover .press__arrow { transform: translate(4px, -4px); } }
.press__row--static { grid-template-areas: "media arrow" "title arrow"; }
.press__tag { grid-area: arrow; align-self: center; justify-self: end; height: 28px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .08em; color: var(--charcoal); background: var(--teal); }

/* ==========================================================================
   BRANDING
   ========================================================================== */
.brand { background: var(--vanilla); color: var(--yale); }
.brand .lead { color: color-mix(in srgb, var(--yale) 82%, var(--charcoal)); }
.brand__head .h2 { max-width: 16ch; }
.brand__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(56px, 7vw, 88px);
  grid-template-areas: "a a b" "a a c" "d e f";
}
.brand__cell { position: relative; overflow: hidden; min-height: 0; aspect-ratio: 2752 / 1536; }
.brand__cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
@media (hover: hover) and (pointer: fine) { .brand__cell:hover img { transform: scale(1.03); } }
.brand__cell--a { grid-area: a; aspect-ratio: auto; }
.brand__cell--logo { grid-area: b; background: var(--yale); color: var(--offwhite); display: grid; place-items: center; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.brand__cell--logo .logo { width: 62%; }
.brand__cell--palette { grid-area: c; clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%); }
.brand__cell--type { grid-area: d; background: var(--charcoal); color: var(--offwhite); display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: clamp(18px, 2vw, 28px); }
.brand__cell--e { grid-area: e; }
.brand__cell--f { grid-area: f; }
.brand__cell--e, .brand__cell--f { outline: 1px solid color-mix(in srgb, var(--yale) 12%, transparent); outline-offset: -1px; }
.swatches { display: flex; height: 100%; }
.swatches li {
  flex: 1; background: var(--c); display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 14px 10px;
  color: var(--offwhite); transition: flex .7s var(--ease); min-width: 0;
}
@media (hover: hover) and (pointer: fine) { .swatches li:hover { flex: 2.4; } }
.swatches li.is-light { color: var(--yale); }
.swatches li:nth-child(2) { color: var(--charcoal); }
.swatches li:nth-child(5) { box-shadow: inset 0 0 0 1px var(--line-light); }
.swatches li.is-vanilla { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--yale) 25%, transparent); }
.swatches span { font-size: .7rem; font-weight: 700; line-height: 1.15; white-space: normal; overflow: visible; overflow-wrap: break-word; hyphens: manual; }
.swatches code { font-family: var(--font-body); font-size: .68rem; opacity: .85; }
.type__sample { font-size: clamp(4rem, 8vw, 7.5rem); line-height: .8; letter-spacing: -.05em; }
.type__meta { font-size: .85rem; line-height: 1.5; color: var(--muted-dark); text-align: right; }
.type__meta strong { color: var(--vanilla); }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact { background: var(--yale); color: var(--offwhite); overflow: hidden; padding-bottom: calc(clamp(64px, 6vw, 96px) + var(--foot-cut)); }
.contact__rings { width: 1200px; height: 1200px; left: -520px; bottom: -640px; }
.contact__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); align-items: start; }
.contact__title { font-size: clamp(3.4rem, 9vw, 8rem); }
.channels { margin-top: 44px; display: grid; gap: 26px; }
.channels li { display: flex; gap: 18px; align-items: flex-start; }
.channels__icon { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-dark); color: var(--vanilla); }
.channels__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.channels li > span:last-child { display: flex; flex-wrap: wrap; gap: 2px 18px; align-items: baseline; padding-top: 2px; }
.channels__label { width: 100%; font-size: .8rem; font-weight: 700; color: var(--muted-dark); }
.channels a, .channels__text { font-size: 1.12rem; font-weight: 400; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); overflow-wrap: break-word; }
.channels a { display: inline-block; padding-block: 11px; margin-block: -11px; background-origin: content-box; background-clip: content-box; }
@media (hover: hover) and (pointer: fine) { .channels a:hover { background-size: 100% 1px; color: var(--vanilla); } }

.form {
  background: var(--offwhite); color: var(--charcoal); padding: clamp(28px, 3.5vw, 48px); display: grid; gap: 20px;
  clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 0 100%); --focus: var(--yale);
}
.form__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.8rem, 2.4vw, 2.2rem); line-height: 1.05; letter-spacing: -.02em; color: var(--yale); }
.field { display: grid; gap: 8px; }
.field label { font-size: .88rem; font-weight: 700; }
.field__opt { font-weight: 400; color: var(--muted-light); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 13px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--charcoal) 32%, transparent);
  background: var(--offwhite); transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
#contactForm input, #contactForm select, #contactForm textarea { scroll-margin-top: calc(var(--nav-total) + 16px); scroll-margin-bottom: 24px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--yale); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yale) 22%, transparent); }
.select { position: relative; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--yale); border-bottom: 2px solid var(--yale); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.field__help { font-size: .82rem; color: var(--muted-light); }
.field__error { font-size: .85rem; font-weight: 700; color: var(--yale); display: flex; align-items: center; gap: 6px; }
.field__error::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--yale); color: var(--offwhite); font-size: .72rem; }
.field.has-error input, .field.has-error textarea { border-color: var(--yale); border-width: 2px; }
.form__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.form__status a { font-weight: 800; }
.form__copy { margin-left: 4px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; color: var(--yale); }
.form__note { font-size: .82rem; color: var(--muted-light); margin-top: -8px; }
.form__status { font-size: .9rem; font-weight: 700; color: var(--yale); min-height: 1.4em; }
/* Correo + WhatsApp lado a lado (al menos uno obligatorio) */
.field--pair { grid-template-columns: 1fr 1fr; column-gap: 14px; }
.field--pair > div { display: grid; gap: 8px; min-width: 0; }
.field--pair .field__error { grid-column: 1 / -1; }
@media (max-width: 480px) { .field--pair { grid-template-columns: 1fr; row-gap: 18px; } }
/* Antispam: invisible para personas, visible para bots */
.field--hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
/* Envío en curso / confirmación */
.form.is-sending [type="submit"] { opacity: .6; pointer-events: none; }
.form__status.is-ok { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; background: color-mix(in srgb, var(--teal) 16%, var(--offwhite)); color: var(--charcoal); }
.form__status.is-ok::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--vanilla); box-shadow: 0 0 0 3px var(--yale); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  position: relative; background: var(--charcoal); color: var(--offwhite); padding: clamp(80px, 9vw, 128px) 0 calc(32px + env(safe-area-inset-bottom, 0px));
  /* Transición al pie con el corte a 45° del isotipo */
  margin-top: calc(var(--foot-cut) * -1);
  clip-path: polygon(0 0, calc(100% - var(--foot-cut)) 0, 100% var(--foot-cut), 100% 100%, 0 100%);
}
.footer__top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: clamp(56px, 7vw, 96px); border-bottom: 1px solid var(--line-dark); }
.footer__logo { display: block; width: clamp(240px, 52vw, 760px); }
.footer__logo .logo { width: 100%; }
.footer__tag { font-size: .75rem; font-weight: 700; letter-spacing: .45em; text-transform: uppercase; color: var(--muted-dark); }
.footer__cols { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 40px; padding-block: 56px; }
.footer__label { font-size: .82rem; font-weight: 700; color: var(--teal); margin-bottom: 18px; }
.footer__cols ul { display: grid; gap: 0; color: var(--muted-dark); }
.footer__cols li { min-height: 44px; display: flex; align-items: center; }
.footer__cols a { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; overflow-wrap: break-word; text-decoration: none; transition: color .3s var(--ease); }
@media (hover: hover) and (pointer: fine) { .footer__cols a:hover { color: var(--vanilla); } }
.footer__cta { display: grid; gap: 18px; align-content: start; justify-items: start; }
.footer__cta p { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.8rem, 2.4vw, 2.2rem); letter-spacing: -.02em; line-height: 1.1; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 28px; border-top: 1px solid var(--line-dark); font-size: .75rem; letter-spacing: .35em; font-weight: 700; color: var(--muted-dark); }
.footer__top-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; letter-spacing: .08em; }
.footer__top-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .5s var(--ease); }
@media (hover: hover) and (pointer: fine) { .footer__top-link:hover { color: var(--vanilla); } }
@media (hover: hover) and (pointer: fine) { .footer__top-link:hover svg { transform: translateY(-3px); } }

/* Respuesta al toque (táctil): equivalente sobrio del hover */
@media (hover: none), (pointer: coarse) {
  .media-btn:active img, .phone:active img, .tile__btn:active .tile__img img, .photo__item:active img { transform: scale(.98); transition-duration: .2s; }
  .chip:active { border-color: var(--offwhite); background: color-mix(in srgb, var(--offwhite) 10%, transparent); }
  .chip.is-active:active { background: var(--vanilla); }
  .folder:active .folder__front { transform: rotateX(-8deg); transition-duration: .25s; }
  button.press__row:active .press__title { color: var(--yale); }
  .wa-float:active { transform: scale(.94); }
}

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--vanilla); color: var(--yale);
  box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--charcoal) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--yale) 14%, transparent);
  opacity: 0; transform: translateY(24px); pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.wa-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.wa-float.is-visible.is-tucked { opacity: 0; transform: translateY(24px); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .wa-float:hover { transform: translateY(-3px); } }
.wa-float svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.menu-open .wa-float { opacity: 0; pointer-events: none; }

/* ==========================================================================
   MODAL / LIGHTBOX
   ========================================================================== */
.modal { width: 100vw; height: 100vh; height: 100dvh; max-width: 100vw; max-height: 100vh; max-height: 100dvh; padding: 0; border: 0; background: transparent; color: var(--offwhite); overflow: hidden; }
.modal[open] { display: grid; place-items: center; align-content: center; gap: 14px; animation: modalIn .5s var(--ease); }
.modal::backdrop { background: color-mix(in srgb, var(--charcoal) 94%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalOut { from { opacity: 1; scale: 1; } to { opacity: 0; scale: .98; } }
.modal[open].is-closing { animation: modalOut .3s var(--ease) forwards; }
.modal.is-closing::backdrop { animation: modalOut .3s var(--ease) forwards; }
.modal__stage { position: relative; display: grid; place-items: center; max-width: min(92vw, 1240px); }
.modal__stage > * { grid-area: 1 / 1; }
.modal__stage img { transition: opacity .35s var(--ease); }
.modal__stage img.is-entering { opacity: 0; }
.modal__stage.is-loading::after {
  content: ""; grid-area: 1 / 1; width: 54px; height: 54px; border-radius: 50%; pointer-events: none;
  border: 2px solid color-mix(in srgb, var(--vanilla) 25%, transparent); border-top-color: var(--vanilla); animation: spin .9s linear infinite;
}
.modal__play {
  grid-area: 1 / 1; z-index: 1; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 24px; border-radius: 999px;
  background: var(--vanilla); color: var(--yale); font-weight: 700; font-size: .95rem;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--vanilla) 22%, transparent);
}
.modal__play svg { width: 20px; height: 20px; fill: currentColor; }
.modal__play--sound { align-self: end; margin-bottom: 64px; height: 46px; font-size: .88rem; }
.modal__stage img, .modal__stage video { max-width: min(92vw, 1240px); max-height: 82vh; max-height: 82dvh; width: auto; height: auto; border-radius: 4px; background: var(--charcoal); }
.modal__stage video { height: 82dvh; aspect-ratio: 9 / 16; }
.modal__error { max-width: 36ch; padding: 32px; text-align: center; font-size: 1rem; color: var(--offwhite); background: var(--yale-ink); border-radius: 4px; }
.modal__error a { color: var(--vanilla); font-weight: 700; }
.modal__caption { font-size: .9rem; color: var(--muted-dark); text-align: center; padding-inline: 24px; }
.modal__close, .modal__nav {
  position: fixed; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--offwhite) 12%, transparent); color: var(--offwhite); transition: background-color .3s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .modal__close:hover, .modal__nav:hover { background: var(--vanilla); color: var(--yale); } }
.modal__close { top: 20px; right: 20px; }
.modal__nav { top: 50%; translate: 0 -50%; }
.modal__nav--prev { left: 20px; }
.modal__nav--next { right: 20px; }
.modal__close svg, .modal__nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1180px) {
  /* Casos: el teléfono conserva su ancho y los medios ocupan el resto */
  .case { position: relative; top: auto; grid-template-columns: auto minmax(0, 1fr); min-height: 0; }
  .case + .case { margin-top: 0; }
  .case__info { padding-top: 0; grid-column: 1 / -1; }
  .folder { aspect-ratio: 4 / 3.05; }
  .case__media { grid-template-columns: 1fr 1fr; height: auto; align-self: stretch; min-width: 0; }
  .case__media--wide .media-btn:first-child { grid-row: auto; }
  .phone { width: clamp(170px, 24vw, 230px); align-self: start; }
  .tiles:not(.is-filtered) .tile:nth-child(even) { translate: none; }
  .brand__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "a a" "b c" "d e" "f f"; }
  .brand__cell--a { aspect-ratio: 2752 / 1536; }
  .brand__cell--f { aspect-ratio: 2752 / 1200; }
}

/* Tablet horizontal / laptop pequeño: el layout de 3 columnas del escritorio, comprimido */
@media (min-width: 961px) and (max-width: 1180px) {
  .case { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(22px, 2.6vw, 32px); }
  .case__info { grid-column: auto; align-self: center; }
  .phone { width: clamp(170px, 17vw, 200px); align-self: center; }
  .case__media { height: min(420px, calc(100vh - var(--nav-h) - 160px)); height: min(420px, calc(100svh - var(--nav-h) - 160px)); align-self: center; }
}

/* Proyectos: 4 columnas mientras quepan (sin huérfanas: 8 = 4 + 4) */
@media (max-width: 1180px) {
  .tiles { gap: 36px 16px; }
}
@media (max-width: 699px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
}

/* Nav completo solo con espacio y puntero fino; en tablets táctiles, menú */
@media (max-width: 960px), (max-width: 1023px) and (pointer: coarse) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; }
}

@media (max-width: 960px) {
  :root { --nav-h: 64px; --cut: 22px; }
  .nav__brand .logo { width: 92px; }

  .hero { min-height: 0; padding: calc(var(--nav-total) + 48px) 0 72px; }
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__copy, .hero__reel { grid-column: 1; }
  .hero__reel { justify-self: center; width: min(62vw, 300px); }
  .hero__reel::before { width: 300%; }
  .reel__badge, .hero__reel::after { width: 108px; height: 108px; left: -48px; bottom: 40px; }
  .hero__scroll { display: none; }
  .about__intro { grid-template-columns: 1fr; }
  .about__main { grid-column: 1; }
  .about__mark { display: none; }

  .section-head { grid-template-columns: 1fr; gap: 28px; }
  .work__head .filters { justify-self: start; justify-content: flex-start; }
  .bento__cell--media { grid-column: 1 / -1; grid-row: auto; min-height: 520px; }
  .bento__cell--teal, .bento__cell--yale { grid-column: span 6; }
  /* El icono ocupa su propio espacio: el texto nunca sube hasta él */
  .bento__cell--teal, .bento__cell--yale { justify-content: flex-start; min-height: 0; }
  .bento__icon { position: static; flex-shrink: 0; width: 40px; height: 40px; margin-bottom: auto; padding-bottom: 12px; box-sizing: content-box; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }

  .folders { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 18px; }
  /* La novena carpeta cierra la rejilla a ancho completo */
  .folders > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* La carpeta crece con su contenido: el icono tiene su espacio y el texto nunca lo pisa */
  .folders > li { display: grid; }
  .folder { aspect-ratio: auto; display: flex; flex-direction: column; }
  .folder__front { position: relative; inset: auto; flex: 1; margin-top: 52px; min-height: 190px; }
  .folders > li:last-child:nth-child(odd) .folder__front { min-height: 150px; }
  .folder__icon { position: static; flex-shrink: 0; margin-bottom: auto; }

  .steps__line { display: none; }
  .steps__list { grid-template-columns: 1fr; gap: 44px; padding-left: 40px; }
  .steps__list::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1.5px; background: linear-gradient(var(--vanilla), var(--line-dark)); }
  .step, .step:nth-child(n) { margin-top: 0; padding-top: 0; }
  .step__dot { left: -40px; top: 12px; }

  .press__grid { grid-template-columns: minmax(0, 1fr); }
  .press__aside { position: static; grid-column: 1; }
  .press__preview { display: none; }
  .press__list { grid-column: 1; margin-top: 40px; }
  .press__cta { grid-column: 1; padding-bottom: 88px; }
  .press__row { grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "thumb media arrow" "thumb title arrow"; column-gap: 18px; padding: 20px 0; }
  .press__thumb { display: block; grid-area: thumb; width: 88px; height: 66px; object-fit: cover; object-position: 50% 45%; border-radius: 4px; }
  .press__thumb--type {
    display: grid; place-items: center; color: var(--vanilla); background: var(--yale);
    background-image: repeating-radial-gradient(circle at center, color-mix(in srgb, var(--offwhite) 10%, transparent) 0 1px, transparent 1.5px 8px);
  }
  .press__thumb--type svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .press__arrow { width: 24px; height: 24px; }
  .press__row--static { grid-template-areas: "thumb media arrow" "thumb title arrow"; }
  .press__tag { height: 26px; padding: 0 10px; font-size: .75rem; }

  /* Paleta: los nombres no se parten letra a letra */
  .swatches span { overflow-wrap: normal; word-break: keep-all; hyphens: none; font-size: clamp(.62rem, 1.3vw, .72rem); }

  .contact__grid { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__cta { grid-column: 1 / -1; }
}

/* Tablet vertical: composiciones propias, no el móvil estirado */
@media (min-width: 700px) and (max-width: 960px) {
  .hero { min-height: 100vh; min-height: 100svh; }
  .hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }
  .hero__copy { grid-column: 1; }
  .hero__reel { grid-column: 2; width: 100%; max-width: 300px; justify-self: end; }
  .hero__title { font-size: clamp(3rem, 8vw, 4.4rem); }

  .section-head { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; gap: 32px; }

  .folders { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 14px; }
  .folders > li:last-child:nth-child(odd) { grid-column: auto; }
  .folders > li:last-child:nth-child(odd) .folder__front { min-height: 190px; }
  .folder__name { font-size: 1rem; }
  .folder__desc { font-size: .82rem; }

  .steps__list { grid-template-columns: 1fr 1fr; gap: 48px 40px; padding-left: 0; }
  .steps__list::before { display: none; }
  .step__dot { position: relative; left: 0; top: 0; display: block; translate: none; margin: 4px 0 22px 2px; }
}

/* 641-960: teléfono + medios lado a lado, paleta a lo ancho */
@media (min-width: 641px) and (max-width: 960px) {
  .case__media--wide .media-btn:last-child { aspect-ratio: 4 / 5; max-height: 62vh; max-height: 62svh; }
  .case__media--wide .media-btn:last-child img { object-position: var(--pos, 50% 25%); }
  .brand__grid { grid-template-areas: "a a" "c c" "b d" "e f"; }
  .brand__cell--palette { aspect-ratio: 16 / 6; }
  .brand__cell--f { aspect-ratio: 2752 / 1536; }
}

/* Fotografía como carrusel con swipe: celulares, tablets y cualquier pantalla táctil */
@media (max-width: 960px), (pointer: coarse) {
  .photo__track { flex-wrap: wrap; }
  .photo__intro { flex: 1 1 100%; scroll-snap-align: none; }
  .photo__hint-desk { display: none; }
  .photo__hint-touch { display: inline; }
  .photo__swipe, .photo__progress { display: block; }
  .photo__list { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); width: calc(100% + var(--gutter) * 2); overscroll-behavior-x: contain; }
  .photo__list::-webkit-scrollbar { display: none; }
  .photo__item img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 30%); }
  .photo__count {
    display: block; margin: 14px var(--gutter) 0; font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; line-height: 1; letter-spacing: -.02em;
    color: color-mix(in srgb, var(--offwhite) 45%, transparent); font-variant-numeric: tabular-nums;
  }
}
@media (max-width: 760px) {
  .photo__item { width: min(78vw, 340px); }
  .photo__item--wide { width: min(88vw, 480px); }
}
/* En tablet se ven unas dos fotos y media, sin recorte */
@media (min-width: 761px) and (max-width: 960px), (min-width: 761px) and (pointer: coarse) {
  .photo__item { height: min(56vh, 520px); height: min(56svh, 520px); width: auto; aspect-ratio: 533 / 800; }
  .photo__item--wide { aspect-ratio: 3 / 2; }
}
/* Paneo en laptops bajos (1366x768 y similares) */
@media (min-width: 961px) and (max-height: 820px) {
  .has-pan .photo__item { height: clamp(300px, 58vh, 480px); height: clamp(300px, 58svh, 480px); }
  .has-pan .photo__pin { padding-top: calc(var(--nav-h) + 16px); }
  .has-pan .photo__count { bottom: 16px; font-size: clamp(2rem, 5vh, 3rem); }
}

@media (max-width: 760px) {
  /* Clientes: marquee en bucle también en móvil (decisión del cliente).
     Sin JS o con movimiento reducido (.marquee sin .is-ready) queda la rejilla estática. */
  .marquee:not(.is-ready) { -webkit-mask: none; mask: none; }
  .marquee:not(.is-ready) .marquee__track {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; width: auto; padding-inline: var(--gutter);
  }
  .marquee:not(.is-ready) .marquee__track li, .marquee:not(.is-ready) .marquee__track li.is-wide { width: auto; height: 72px; }
  .marquee:not(.is-ready) .marquee__track img { max-width: 86%; max-height: 48px; }
  .marquee:not(.is-ready) .marquee__track li.is-wide img { width: 100%; max-width: 100%; max-height: 32px; }
  .marquee.is-ready .marquee__track { animation-duration: 42s; }
  .marquee.is-ready .marquee__track li { width: 96px; height: 64px; margin-right: 22px; }
  .marquee.is-ready .marquee__track li.is-wide { width: 136px; }
  .marquee.is-ready .marquee__track img { max-width: 92px; max-height: 46px; }
  .marquee.is-ready .marquee__track li.is-wide img { width: 100%; max-width: 132px; max-height: 30px; }

  .case__metric { padding-right: 32px; }

  /* WhatsApp flotante más discreto y respetando el área segura */
  .wa-float { width: 48px; height: 48px; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .wa-float svg { width: 22px; height: 22px; }
  .case__info > p:not(.case__tags):not(.case__metric) { max-width: calc(100% - 40px); }
}

@media (max-width: 640px) {
  :root { --section-y: clamp(72px, 18vw, 96px); }
  body { font-size: 1rem; }
  /* Nosotros: imagen arriba, texto sobre charcoal sólido (el monitor con el logo queda libre) */
  .bento__cell--media { padding: 0; min-height: 0; justify-content: flex-start; gap: 0; }
  .bento__cell--media img, .bento__cell--media video { position: static; height: auto; aspect-ratio: 16 / 9; object-position: 50% 50%; }
  .bento__cell--media::after { display: none; }
  .bento__cell--media .bento__body { padding: 24px 22px 28px; background: var(--charcoal); }
  .media-btn img { object-position: var(--pos-m, var(--pos, 50% 30%)); }
  .hero__ctas .btn { flex: 1 1 auto; }
  .pillars { flex-direction: column; gap: 14px; }
  .bento__cell--teal, .bento__cell--yale { grid-column: 1 / -1; }
  .bento__cell--teal, .bento__cell--yale { min-height: 0; }
  .bento__icon { width: 36px; height: 36px; }
  .stats { gap: 36px 20px; }
  .stats dt { font-size: .86rem; }
  .folder__front { inset: auto; clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%); }
  .folder__back { clip-path: polygon(0 0, 40% 0, calc(40% + 18px) 18px, 100% 18px, 100% 100%, 0 100%); }
  .folder__paper { top: 26px; }
  .folder__icon { width: 32px; height: 32px; }
  /* La carpeta crece con su contenido: nombre + descripción siempre visibles, sin pisar el icono */
  .folder__front { margin-top: 40px; min-height: 172px; }
  .folders > li:last-child:nth-child(odd) .folder__front { min-height: 136px; }
  .folder__desc { font-size: .8rem; line-height: 1.4; }
  .folder__name { font-size: 1.02rem; }
  .case { grid-template-columns: 1fr 1fr; gap: 20px; padding: 24px 20px 20px; clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%); }
  .phone { width: 100%; border-width: 6px; border-radius: 26px; }
  .case__media { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
  .case__media--wide .media-btn:first-child { aspect-ratio: auto; }
  .tiles { padding-bottom: 32px; }
  .work__cta { margin-top: 48px; }
  .tile__name { font-size: .94rem; }
  .tile__play { width: 52px; height: 52px; }
  .photo__item { height: 58vh; height: 58svh; max-height: 480px; }
  .brand__grid { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d" "e" "f"; gap: 14px; }
  .brand__cell--f { aspect-ratio: 2752 / 1536; }
  /* Paleta en filas: nombre y código completos, legibles */
  .brand__cell--palette { aspect-ratio: auto; }
  .swatches { flex-direction: column; }
  .swatches li { flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; min-height: 46px; padding: 10px 16px; }
  .swatches span { font-size: .78rem; }
  .swatches code { font-size: .74rem; }
  .form__actions .btn { width: 100%; }
  /* Clientes: tinta sólida legible (rejilla de respaldo a 2 columnas) */
  .marquee:not(.is-ready) .marquee__track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
  .marquee__track img { max-height: 48px; }
  .marquee__track li.is-wide img { width: 92%; min-height: 26px; max-height: 32px; }
  .marquee__track li:not(.is-wide) img { max-height: 40px; }
  .marquee__track li:has(img[src*="dr-jose-gomez"]) img, .marquee__track li:has(img[src*="juhnny-narvaez"]) img { max-height: 60px; }
  .marquee__track li:has(img[src*="sf-distrito"]) img, .marquee__track li:has(img[src*="copa-aficion"]) img, .marquee__track li:has(img[src*="la-guarida"]) img { max-height: 58px; }
  .marquee__word { font-size: .72rem; }
  .channels a, .channels__text { font-size: .98rem; }
  .channels li { gap: 14px; }
  .channels__icon { width: 42px; height: 42px; }
  .press__cta { padding-bottom: 56px; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; align-items: flex-start; letter-spacing: .25em; }
  .modal__nav { top: auto; bottom: 20px; bottom: max(20px, env(safe-area-inset-bottom)); translate: none; }
  .modal__stage img { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
  .modal__stage video { height: auto; width: 92vw; max-height: 78dvh; }
  .modal__caption { padding-inline: 72px; }
}

@media (max-width: 480px) {
  /* Prensa: la fila con etiqueta apila título y etiqueta; el título nunca queda en 4 líneas */
  .press__row { grid-template-columns: 72px minmax(0, 1fr) auto; column-gap: 14px; }
  .press__row--static { grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "thumb media" "thumb title" "thumb tag"; }
  .press__row--static .press__tag { grid-area: tag; justify-self: start; margin-top: 8px; }
  .press__thumb { width: 72px; height: 56px; }
  .press__title { font-size: clamp(1.15rem, 5.4vw, 1.35rem); }
}

@media (max-width: 374px) {
  /* Servicios en una columna compacta: icono al lado del texto */
  .folders { grid-template-columns: 1fr; gap: 16px; }
  .folder__front, .folders > li:last-child:nth-child(odd) .folder__front {
    min-height: 0; margin-top: 30px; display: grid; grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; row-gap: 4px; align-items: start; padding: 18px 18px 20px;
  }
  .folder__icon { grid-row: 1 / span 2; margin: 0; width: 30px; height: 30px; }
  .folder__name { align-self: end; }
  .outlets__list li { letter-spacing: .12em; font-size: .72rem; }
  .stats dd { font-size: clamp(2.4rem, 13vw, 3rem); }
  .stats { gap: 32px 14px; }
  .stats dt { font-size: .82rem; }
  .tile__play { width: 40px; height: 40px; box-shadow: 0 0 0 7px color-mix(in srgb, var(--vanilla) 22%, transparent); }
  .tile__play svg { width: 18px; height: 18px; }
  .tile__name { font-size: .88rem; }
  .tiles { gap: 24px 12px; }
  .channels a, .channels__text { font-size: .9rem; letter-spacing: -.01em; }
  .reel__badge, .hero__reel::after { width: 84px; height: 84px; left: -28px; bottom: 24px; }
  .hero__reel { width: min(70vw, 300px); }
}

/* Teléfonos bajos / horizontal: el menú cabe sin scroll */
@media (max-height: 640px) {
  .menu__links a { font-size: clamp(1.8rem, 8vw, 2.6rem); }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .loader { animation-delay: 1s !important; }
  .marquee.is-ready .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; padding-inline: var(--gutter); }
  .reel__badge { animation: none; }
}

/* ==========================================================================
   CASOS APILADOS TAMBIÉN EN TABLET Y CELULAR (pedido del cliente)
   Tarjeta compacta que cabe en una pantalla: info arriba, fila con
   teléfono + 2 piezas. main.js quita el sticky a la tarjeta que no quepa.
   ========================================================================== */
@media (max-width: 960px) {
  .case {
    position: sticky; top: var(--top);
    grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start;
    padding: 22px 18px 18px;
  }
  .case + .case { margin-top: 10vh; }
  .case:nth-child(1) { --top: calc(var(--nav-total) + 8px); }
  .case:nth-child(2) { --top: calc(var(--nav-total) + 16px); }
  .case:nth-child(3) { --top: calc(var(--nav-total) + 24px); }
  .case:nth-child(4) { --top: calc(var(--nav-total) + 32px); }
  .case:nth-child(5) { --top: calc(var(--nav-total) + 40px); }
  .case.is-unstacked { position: relative; top: auto; }
  .case__info { grid-column: 1 / -1; gap: 10px; padding-top: 0; }
  .case__info > p:not(.case__tags):not(.case__metric) { font-size: .92rem; line-height: 1.5; }
  .case__name { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .case__metric strong { font-size: 1.5rem; }
  .phone { grid-column: 1; width: 100%; border-width: 4px; border-radius: 18px; align-self: start; }
  .case__media, .case__media--wide {
    grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 12px; height: auto; align-self: start;
  }
  .case__media .media-btn, .case__media--wide .media-btn:first-child, .case__media--wide .media-btn:last-child { grid-column: auto; aspect-ratio: 560 / 1218; height: auto; max-height: none; grid-row: auto; }
  .case__media--wide .media-btn:first-child img { object-position: var(--pos-m, 50% 50%); }
  .case__media .media-btn img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
}
@media (min-width: 761px) and (max-width: 960px) {
  .case { gap: 20px; padding: 32px 28px 28px; }
  .case__media, .case__media--wide { gap: 20px; }
}
@media (min-width: 961px) and (max-width: 1180px) {
  .case { position: sticky; top: var(--top); }
  .case + .case { margin-top: 12vh; }
  .case.is-unstacked { position: relative; top: auto; }
}

/* ==========================================================================
   RONDA 5 · RESPONSIVE (móvil primero)
   Celular 320-430 y tablet 768-1024: nada se corta, tapa ni se pierde.
   ========================================================================== */

/* ---------- Teléfono del caso: se toca y se amplía ---------- */
.phone { display: block; padding: 0; cursor: zoom-in; text-align: left; }
.phone__zoom {
  position: absolute; right: 10px; bottom: 10px; z-index: 1; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: var(--offwhite);
  background: color-mix(in srgb, var(--charcoal) 72%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px var(--line-dark); transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.phone__zoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) {
  .phone__zoom { opacity: 0; transform: scale(.85); }
  .phone:hover .phone__zoom, .phone:focus-visible .phone__zoom { opacity: 1; transform: none; }
}

/* Oscurecido de la pila sin animar filter (táctil): lo mueve main.js con --dim */
.case::after { content: ""; position: absolute; inset: 0; z-index: 2; background: var(--charcoal); opacity: var(--dim, 0); pointer-events: none; }

/* Formulario: el texto del select nunca queda bajo la flecha; 16px evita el zoom de iOS */
.select select { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.field input, .field select, .field textarea { font-size: max(16px, 1em); }

/* Visor: botones sin demora de doble toque; el fondo no se arrastra en iOS */
.modal { overscroll-behavior: contain; }
.modal__nav, .modal__close, .modal__play { touch-action: manipulation; }
.modal__count { white-space: nowrap; }

/* Menú móvil: WhatsApp directo y correo con objetivo táctil de 44px */
.menu__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.menu__foot p a { display: inline-flex; align-items: center; min-height: 44px; }

/* Proyectos: pies de ficha alineados */
.tiles { align-items: start; }
.tile__name { text-wrap: balance; }

/* Carpetas en táctil: flecha que indica "tocar lo deja listo en el formulario" */
@media (hover: none) {
  .folder__front::after {
    content: ""; position: absolute; right: 14px; top: 14px; width: 18px; height: 18px; background: var(--f-icon); opacity: .8;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
  }
}

/* Nav: en táctil desde 1024 los enlaces miden 44px de alto */
@media (pointer: coarse) and (min-width: 1024px) {
  .nav__links a { padding-block: 12px; }
}

/* ---------- Fotografía en carrusel: cierre de sección más corto ---------- */
@media (max-width: 960px), (pointer: coarse) {
  .photo { padding-bottom: clamp(48px, 6vw, 72px); }
  .photo__count { margin-top: 10px; }
}

/* ==========================================================================
   TABLET VERTICAL (700-960)
   ========================================================================== */
@media (min-width: 700px) and (max-width: 960px) {
  /* Hero: sin franjas vacías y con pista de que hay más abajo */
  .hero { min-height: min(100vh, 860px); min-height: min(100svh, 860px); padding: calc(var(--nav-total) + 72px) 0 104px; }
  .hero__reel { max-width: 340px; }
  .hero__title { font-size: clamp(3.4rem, 9vw, 5rem); }
  .hero__scroll { display: flex; }
  .reel__badge, .hero__reel::after { width: 92px; height: 92px; left: -36px; bottom: -24px; }

  /* Nosotros: el isotipo vuelve a equilibrar el párrafo */
  .about__intro { grid-template-columns: minmax(0, 1fr) clamp(160px, 24vw, 220px); align-items: center; gap: 32px; }
  .about__main { grid-column: 1; }
  .about__mark { display: grid; grid-column: 2; }

  /* Prensa: la imagen editorial también en tablet */
  .press__preview { display: block; max-width: 560px; margin-top: 32px; }
}
@media (min-width: 700px) and (max-width: 900px) {
  /* Cubrimientos: 2 columnas de fichas apaisadas (8 = 4 filas, sin huérfanas) */
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
  .tile__img { aspect-ratio: 3 / 2; }
  .tile__img img { object-position: 50% 30%; }
  .tile__img .tile__logo { width: 32%; top: 12%; }
}
@media (min-width: 761px) and (max-width: 960px) {
  /* Carrusel de fotos: asoma un tercio de la siguiente */
  .photo__item { height: min(44vh, 440px); height: min(44svh, 440px); }
}

/* ==========================================================================
   TABLET HORIZONTAL / LAPTOP PEQUEÑO (961-1180)
   ========================================================================== */
@media (min-width: 961px) and (max-width: 1180px) {
  /* Casos: info arriba; teléfono + piezas en su proporción real (sin cortar texto quemado) */
  .case { --phone-w: clamp(190px, 19vw, 224px); grid-template-columns: auto minmax(0, 1fr); align-items: start; row-gap: 24px; }
  .case__info { grid-column: 1 / -1; align-self: start; max-width: 72ch; }
  .phone { width: var(--phone-w); align-self: start; }
  .case__media, .case__media--wide { display: flex; gap: 14px; height: auto; align-self: start; min-width: 0; }
  .case__media .media-btn, .case__media--wide .media-btn:first-child, .case__media--wide .media-btn:last-child {
    flex: 0 0 auto; height: calc(var(--phone-w) * 1598 / 735); aspect-ratio: 9 / 16; max-height: none;
  }
  .case__media--wide .media-btn:first-child { flex: 1 1 0; min-width: 0; aspect-ratio: auto; }

  /* Contacto: el formulario gana ancho y los botones van en una fila cuando caben */
  .contact__grid { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; }
  .form__actions .btn { flex: 1 1 auto; }
  .contact__title { font-size: clamp(3.4rem, 7vw, 6rem); }

  /* Marca: rejilla de 3 columnas como en escritorio (menos scroll) */
  .brand__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "a a b" "a a c" "d e f"; }
  .brand__cell--a { aspect-ratio: auto; }
  .brand__cell--f { aspect-ratio: 2752 / 1536; }
  .swatches li { padding-inline: 7px; }
  .swatches span { font-size: .6rem; overflow-wrap: normal; word-break: keep-all; hyphens: none; letter-spacing: -.01em; }

  /* Cifras: la cuarta, más larga, recibe más ancho */
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); column-gap: 28px; }
  .stats dt { max-width: 26ch; }

  /* Proceso: la diagonal se separa de la introducción */
  .steps { margin-top: clamp(96px, 14vh, 128px); margin-top: clamp(96px, 14svh, 128px); }
  .step:nth-child(1) { margin-top: 120px; }
  .step:nth-child(2) { margin-top: 80px; }
  .step:nth-child(3) { margin-top: 40px; }
}

/* Paneo fijado en laptops bajos: fotos más altas, contador más cerca */
@media (min-width: 961px) and (max-height: 820px) {
  .has-pan .photo__item { height: clamp(320px, 64vh, 520px); height: clamp(320px, 64svh, 520px); }
  .has-pan .photo__count { bottom: 24px; }
}

/* ==========================================================================
   CELULAR (≤760 / ≤640 / ≤480 / ≤374)
   ========================================================================== */
@media (max-width: 960px) {
  /* Pausa del reel abajo a la derecha: no compite con el nav ni con el sello */
  .reel__toggle { left: auto; top: auto; right: 12px; bottom: 12px; }
}

@media (max-width: 760px) {
  .marquee.is-ready .marquee__track { animation-duration: 32s; }
}

@media (max-width: 640px) {
  /* Hero: asoma más del reel en el primer pantallazo */
  .hero { padding: calc(var(--nav-total) + 28px) 0 48px; }
  .hero__grid { gap: 36px; }

  /* Casos: info arriba; teléfono grande a la izquierda y las 2 piezas apiladas a la derecha.
     La tarjeta sigue siendo compacta (cabe en una pantalla) y el teléfono se amplía al tocarlo. */
  .cases { gap: 16px; }
  .case { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 12px; row-gap: 16px; padding: 22px 18px 18px; }
  .phone { grid-column: 1; }
  .case__media, .case__media--wide {
    grid-column: 2; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-self: stretch;
  }
  .case__media .media-btn, .case__media--wide .media-btn:first-child, .case__media--wide .media-btn:last-child { aspect-ratio: auto; height: auto; min-height: 0; }
  .case__media .media-btn img { position: absolute; inset: 0; object-position: var(--pos-m, var(--pos, 50% 30%)); }
  .phone__zoom { width: 32px; height: 32px; right: 8px; bottom: 8px; }
  .phone__zoom svg { width: 16px; height: 16px; }

  /* Fotografía: fin de sección sin hueco */
  .photo { padding-bottom: 64px; }

  /* Pie: dos columnas (Explora | Contacto) y CTA a lo ancho */
  .footer__cols { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); column-gap: 20px; }
  .footer__cta { grid-column: 1 / -1; }

  /* Visor: leyenda entre las flechas, máximo 2 líneas */
  .modal__caption {
    position: fixed; left: 84px; right: 84px; bottom: max(28px, env(safe-area-inset-bottom)); padding: 0;
    font-size: .82rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .modal__stage img { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); }
}
@media (max-width: 640px) and (max-height: 640px) {
  .photo__item { height: 52vh; height: 52svh; }
}

@media (max-width: 480px) {
  /* Descriptores en mayúscula: menos tracking para no ocupar 3 líneas */
  .case__tags, .work__sub span { letter-spacing: .16em; font-size: .66rem; line-height: 1.6; }
}

@media (max-width: 374px) {
  .case { padding: 20px 14px 16px; column-gap: 10px; }
  .form { padding: 24px 18px; }
  .tile__meta { font-size: .8rem; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__cols nav ul { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  /* Celda tipográfica: "Aa" arriba y texto a la izquierda */
  .brand__cell--type { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 12px; aspect-ratio: auto; min-height: 190px; }
  .type__meta { text-align: left; }
}
@media (max-width: 374px) and (hover: none) {
  .folder__front, .folders > li:last-child:nth-child(odd) .folder__front { padding-right: 40px; }
}

/* Tarjetas que no caben (sin sticky): sin el recorrido extra de la pila */
.case.is-unstacked + .case.is-unstacked { margin-top: 0; }

/* Paleta en celular: mosaico (Yale protagonista + 2×2), no lista de filas */
@media (max-width: 760px) {
  .brand__cell--palette { aspect-ratio: auto; }
  .swatches { display: grid; grid-template-columns: 1fr 1fr; flex-direction: initial; height: auto; }
  .swatches li {
    flex: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
    gap: 4px; min-height: 104px; padding: 14px 16px;
  }
  .swatches li:first-child { grid-column: 1 / -1; min-height: 150px; }
  .swatches li:first-child span { font-size: 1.05rem; }
  .swatches span { font-size: .86rem; line-height: 1.15; letter-spacing: 0; }
  .swatches code { font-size: .76rem; }
}

/* Autorización de datos (Ley 1581) */
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .86rem !important; font-weight: 400 !important; line-height: 1.5; color: var(--charcoal); cursor: pointer; }
.consent input { flex: none; width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; padding: 0; accent-color: var(--yale); cursor: pointer; }
.consent a, .form__note a { color: var(--yale); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.field--consent.has-error .consent input { outline: 2px solid var(--yale); outline-offset: 2px; }
.footer__legal { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Videos horizontales en el modal + icono de reproducir en las piezas de los casos */
.modal__stage video.is-wide { aspect-ratio: 16 / 9; height: auto; width: min(92vw, 1240px); max-height: 82vh; max-height: 82dvh; }
.media-btn[data-video] { cursor: pointer; }
.media-btn__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--vanilla); color: var(--yale); box-shadow: 0 0 0 6px color-mix(in srgb, var(--vanilla) 22%, transparent); transition: transform .4s var(--ease); pointer-events: none;
}
.media-btn__play svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
@media (hover: hover) and (pointer: fine) { .media-btn[data-video]:hover .media-btn__play { transform: scale(1.1); } }
@media (max-width: 760px) { .media-btn__play { width: 34px; height: 34px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--vanilla) 22%, transparent); } .media-btn__play svg { width: 14px; height: 14px; } }

/* Servicios (11): en 3 columnas, la última fila de 2 queda centrada */
@media (min-width: 961px) {
  .folders { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .folders > li { grid-column: span 2; }
  .folders > li:nth-last-child(2):nth-child(3n + 1) { grid-column: 2 / span 2; }
  .folders > li:last-child:nth-child(3n + 1) { grid-column: 3 / span 2; }
}

/* Casos con cifra + enlace en celular: un poco más compactos para que sigan cabiendo en la pila */
@media (max-width: 760px) {
  .case__info .case__link { font-size: .86rem; padding-block: 6px; margin-block: -6px -2px; }
  .case__info { gap: 8px; }
}
