/* ==========================================================================
   Corina Ochoa — Portfolio
   Réplica del sitio de Framer (corinaochoa.framer.website)
   Breakpoints: desktop ≥1100px · tablet 768–1099px · phone ≤767px
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --black: #000;
  --white: #fff;
  --gray-90: #5a5a5a;
  --gray-46: #2e2e2e;
  --gray-138: #8a8a8a;
  --gray-115: #737373;
  --purple: #9a17c2;
  --purple-deep: #8a069c;
  --purple-btn: #631dac;
  --border-soft: #eee;
  --border-btn: #e8e8e8;
  --line: rgba(0, 0, 0, 0.2);

  --font-inter: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-manrope: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-jakarta: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Curvas de Framer */
  --ease-framer: cubic-bezier(0.44, 0, 0.56, 1);
  --ease-overshoot: cubic-bezier(0.59, 0.25, 0.12, 1.17);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Las variables de animación no se heredan, así cada elemento usa solo las suyas */
@property --ax { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --ay { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --a0 { syntax: "<number>"; inherits: false; initial-value: 0.001; }
@property --ao { syntax: "<number>"; inherits: false; initial-value: 1; }
@property --dur { syntax: "<time>"; inherits: false; initial-value: 0.8s; }
@property --delay { syntax: "<time>"; inherits: false; initial-value: 0s; }

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-inter);
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, ul { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }

/* "Inter Display" = Inter con eje óptico al máximo */
.display { font-variation-settings: "opsz" 32; }

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

/* ---------- Animaciones de aparición ---------- */
.js [data-anim] {
  opacity: var(--a0);
  transform: translate3d(var(--ax), var(--ay), 0);
  transition:
    opacity var(--dur) var(--ease, var(--ease-framer)) var(--delay),
    transform var(--dur) var(--ease, var(--ease-framer)) var(--delay);
}
.js [data-anim].is-in { opacity: var(--ao); transform: none; }

/* Texto palabra por palabra */
.js [data-words] .w {
  display: inline-block;
  opacity: 0.001;
  transform: translateY(var(--wy, 10px));
  filter: blur(var(--wb, 0px));
  transition:
    opacity var(--wdur, 1s) var(--wease, var(--ease-overshoot)) calc(var(--wdelay, 0s) + var(--i, 0) * var(--wstag, 0.05s)),
    transform var(--wdur, 1s) var(--wease, var(--ease-overshoot)) calc(var(--wdelay, 0s) + var(--i, 0) * var(--wstag, 0.05s)),
    filter var(--wdur, 1s) var(--wease, var(--ease-overshoot)) calc(var(--wdelay, 0s) + var(--i, 0) * var(--wstag, 0.05s));
}
.js [data-words].is-in .w { opacity: 1; transform: none; filter: none; }

/* Texto que se ilumina con el scroll */
.js [data-scroll-words] .w { opacity: 0.2; }

@media (prefers-reduced-motion: reduce) {
  .js [data-anim] { opacity: var(--ao); transform: none; transition: none; }
  .js [data-words] .w { opacity: 1; transform: none; filter: none; transition: none; }
  .js [data-scroll-words] .w { opacity: 1 !important; }
}

/* ---------- Layout ---------- */
.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  overflow-x: clip;
}

.container {
  width: 100%;
  max-width: 1400px;
  padding: 0 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 140px;
  overflow: hidden;
}

/* ---------- Navegación ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  background: var(--white);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 25px 80px 24px;
}

.nav-logo-row {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
}

.logo { position: relative; display: block; flex: none; width: 60px; height: 28px; }
.logo-track { position: absolute; inset: 0; overflow: hidden; }
.logo-slides { display: flex; flex-direction: column; transition: transform 0.45s var(--ease-snap); }
.logo:hover .logo-slides,
.logo:focus-visible .logo-slides { transform: translateY(-28px); }
.logo-slide { position: relative; flex: none; width: 60px; height: 28px; }
.logo-slide--main svg { position: absolute; top: 0; left: -7px; width: 75px; height: 30px; }

.nav-links { display: flex; align-items: center; gap: 32px; }

/* Link con texto que "rueda" hacia arriba */
.roll {
  display: inline-flex;
  flex-direction: column;
  height: 22px;
  overflow: hidden;
  font-family: var(--font-inter);
  font-variation-settings: "opsz" 32;
  font-size: 18px;
  line-height: 1.4;
  color: var(--black);
  white-space: nowrap;
}
.roll-inner { display: flex; flex-direction: column; transition: transform 0.45s var(--ease-snap); }
.roll:hover .roll-inner,
.roll:focus-visible .roll-inner { transform: translateY(calc(-100% + 22px)); }

/* Botón hamburguesa (solo móvil) */
.burger { display: none; position: relative; flex: none; width: 32px; height: 32px; overflow: hidden; }
.bar {
  position: absolute;
  left: calc(50% - 12px);
  width: 24px;
  height: 2px;
  border-radius: 10px;
  background: var(--black);
  transition: transform 0.4s var(--ease-snap), top 0.4s var(--ease-snap), bottom 0.4s var(--ease-snap), opacity 0.2s linear;
}
.bar--top { top: 7px; }
.bar--mid { top: calc(50% - 1px); }
.bar--bottom { bottom: 7px; }
.nav.is-open .bar--top { top: 15px; transform: rotate(45deg); }
.nav.is-open .bar--mid { opacity: 0; }
.nav.is-open .bar--bottom { bottom: 15px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  width: 100%;
  height: 55vh;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.hero-title {
  width: 100%;
  max-width: 770px;
  font-weight: 500;
  font-size: 96px;
  line-height: 1;
  letter-spacing: -2px;
}
.accent { color: var(--purple); }

/* Texto a la izquierda y contacto a la derecha, centrados en el mismo eje */
.hero-main {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.hero-text { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-contact { flex: none; }

.hero-sub {
  max-width: 600px;
  font-weight: 400;
  font-size: 22px;
  line-height: 1.4;
}
.hero-sub strong { font-weight: 700; color: var(--purple-deep); }

.hero-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  height: 205px;
  overflow: hidden;
}

.hero-avatar {
  flex: 1 1 0;
  min-height: 1px;
  width: 150px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-avatar-img { height: 100%; aspect-ratio: 1; }
.hero-avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.hero-email {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 55px;
  overflow: hidden;
}

.hero-scroll {
  opacity: 0.5;
  font-size: 18px;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

/* ---------- Hero: cuadrícula con cubos de color ----------
   Canvas detrás del contenido; lo dibuja main.js (initHeroGrid).
   Se extiende hasta los bordes del contenedor y nunca recibe clics. */
.hero { position: relative; isolation: isolate; --hero-bleed: 80px; }
.hero > :not(.hero-grid) { position: relative; z-index: 1; }

.hero-grid {
  position: absolute;
  top: 0;
  left: calc(var(--hero-bleed) * -1);
  z-index: 0;
  display: block;
  width: calc(100% + var(--hero-bleed) * 2);
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 82%, transparent 100%);
}

@media (max-width: 1099.98px) { .hero { --hero-bleed: 40px; } }
@media (max-width: 767.98px) { .hero { --hero-bleed: 20px; } }

/* ---------- Texto letra por letra ([data-chars], efecto "gradual spacing") ----------
   Cada letra: opacidad 0 → 1 y desplazamiento -20px → 0 en 0.5s,
   escalonada --cstep por letra (0.04s por defecto) después de --cdelay. */
.chars-word { display: inline-block; white-space: nowrap; }
.js [data-chars] .c {
  display: inline-block;
  opacity: 0;
  transform: translateX(var(--cx, -20px));
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.05));
  transition:
    opacity var(--cdur, 0.5s) var(--cease, ease-out) calc(var(--cdelay, 0s) + var(--i, 0) * var(--cstep, 0.04s)),
    transform var(--cdur, 0.5s) var(--cease, ease-out) calc(var(--cdelay, 0s) + var(--i, 0) * var(--cstep, 0.04s));
}
.js [data-chars].is-in .c { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-chars] .c { opacity: 1; transform: none; transition: none; }
}

/* ---------- Texto manuscrito ([data-handwriting], ver main.js) ---------- */
[data-handwriting] { white-space: nowrap; }
.js [data-handwriting].is-pending { color: transparent; }
.handwriting-svg { display: inline-block; overflow: visible; }

/* ---------- Proyectos ---------- */
.works {
  width: 100%;
  max-width: 1440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 37px;
  overflow: hidden;
}

.works-title {
  width: 100%;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  text-align: left;
}

.works-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(50px, 1fr));
  gap: 20px;
}

.work-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
}

.work-card-media {
  width: 100%;
  aspect-ratio: 1.47059;
  border-radius: 15px;
  overflow: hidden;
}
.work-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-framer);
}
.work-card:hover .work-card-img { transform: scale(1.05); }

.work-card-details {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 15px 20px;
}

.work-card-year {
  font-family: var(--font-manrope);
  font-size: 14px;
  line-height: 1.4;
  color: var(--gray-90);
  white-space: nowrap;
}

.work-card-title { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.work-card-title h3 {
  font-family: var(--font-manrope);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
}
.work-card-title p {
  font-family: var(--font-manrope);
  font-size: 14px;
  line-height: 1.4;
  color: var(--gray-90);
}

/* Icono circular con flecha que "salta" en diagonal */
.flip-icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50px;
  background: var(--black);
  color: var(--white);
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.flip-window { position: relative; width: 50%; height: 50%; overflow: hidden; }
.flip-grid {
  position: absolute;
  top: 0;
  right: 0;
  width: 200%;
  height: 200%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  transition: transform 0.4s cubic-bezier(0.34, 1.25, 0.64, 1);
}
.flip-grid svg { display: block; width: 100%; height: 100%; }
.flip-grid .flip-a { grid-column: 2; grid-row: 1; }
.flip-grid .flip-b { grid-column: 1; grid-row: 2; }
.work-card:hover .flip-grid,
.tag:hover .flip-grid { transform: translate(50%, -50%); }

/* ---------- About me (tarjeta) ---------- */
.about {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 98px;
  scroll-margin-top: 50px;
}

.about-card {
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 365px 1fr;
  grid-template-rows: 1fr auto auto auto auto 1fr;
  grid-template-areas:
    "photo ."
    "photo title"
    "photo text"
    "photo stacks"
    "photo btn"
    "photo .";
  column-gap: 10px;
  row-gap: 24px;
}

.about-photo { grid-area: photo; width: 365px; aspect-ratio: 0.76652; border-radius: 15px; overflow: hidden; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.about-title,
.about-text,
.about-side > * { padding-inline: 36px; }

.about-title {
  grid-area: title;
  font-family: var(--font-jakarta);
  font-weight: 600;
  font-size: 32px;
  line-height: 1.5;
}

.about-text {
  grid-area: text;
  font-family: var(--font-jakarta);
  font-weight: 500;
  font-size: 18px;
  line-height: 2;
}

.about-side { display: contents; }
.stacks { grid-area: stacks; display: flex; flex-wrap: wrap; align-items: center; padding-top: 10px; }
.about-btn-wrap { grid-area: btn; }

.stack {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  transition: padding 0.35s var(--ease-snap), background-color 0.35s linear, border-color 0.35s linear, border-radius 0.35s linear;
}
.stack.is-active {
  padding: 7px 20px 7px 8px;
  border-color: var(--border-soft);
  background: var(--white);
  border-radius: 999px;
}
.stack-img { flex: none; width: 42px; height: 42px; border-radius: 999px; overflow: hidden; }
.stack-img img { width: 100%; height: 100%; object-fit: cover; }
.stack-label {
  display: none;
  font-family: var(--font-jakarta);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}
.stack.is-active .stack-label { display: block; }

/* Botón morado */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 31px;
  border: 1px solid var(--border-btn);
  border-radius: 6px;
  background: var(--purple-btn);
  color: var(--white);
  font-family: var(--font-manrope);
  font-weight: 600;
  font-size: 14px;
  line-height: 24px;
  white-space: nowrap;
}
.btn-icon { display: flex; align-items: center; width: 14px; height: 18px; transition: transform 0.35s var(--ease-snap); }
.btn-icon svg { width: 14px; height: 14px; }
.btn-primary:hover .btn-icon { transform: rotate(45deg); }

/* ---------- Galería (ticker) ---------- */
.gallery {
  width: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 72px;
  overflow: hidden;
}
.gallery-inner { width: 100%; max-width: 1440px; padding: 0 100px; }

.ticker { position: relative; width: 100%; overflow: hidden; }
.ticker-track { display: flex; width: max-content; height: 100%; will-change: transform; }

.ticker--gallery {
  height: 370px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 75%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 25%, #000 75%, transparent 100%);
}
.ticker--gallery .ticker-track { gap: 24px; padding: 10px 0; }
.gallery-item {
  flex: none;
  width: 470px;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item img { width: 100%; height: 100%; object-fit: contain; border-radius: 16px; }

/* ---------- Footer ---------- */
.footer { width: 100%; display: flex; flex-direction: column; gap: 80px; overflow: hidden; }
.footer-top { width: 100%; display: flex; align-items: flex-start; overflow: hidden; }
.footer-info { width: 65%; padding-right: 150px; }
.footer-info h2 { font-weight: 400; font-size: 24px; line-height: 1.4; color: var(--gray-46); }
.footer-explore { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.footer-label { font-weight: 700; font-size: 10px; line-height: 1.4; color: var(--gray-46); }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }

/* ==========================================================================
   Tablet
   ========================================================================== */
@media (max-width: 1099.98px) {
  .container { padding: 0 40px 40px; gap: 80px; }

  .nav { padding: 25px 40px 24px; }
  .nav-links .only-desktop { display: none; }
  .roll { font-size: 16px; }

  .hero { height: 42vh; justify-content: center; gap: 10px; padding-top: 50px; }
  .hero-title { max-width: 689px; font-size: 64px; }
  .hero { height: auto; min-height: 42vh; padding-bottom: 40px; }
  .hero-main { flex-direction: column; align-items: stretch; gap: 32px; }
  .hero-contact { align-self: flex-end; }
  .hero-sub { max-width: 430px; }
  .hero-avatar-img { width: 110px; height: auto; }
  .hero-scroll { font-size: 16px; }

  .works { gap: 80px; }
  .works-title { font-size: 28px; }
  .works-grid { grid-template-columns: 1fr; }

  .about-card {
    grid-template-columns: 40% 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "title title"
      "text text"
      "photo side";
    align-items: center;
  }
  .about-photo { width: 100%; }
  .about-title,
  .about-text { padding-inline: 0; }
  .about-side { grid-area: side; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
  .about-side > * { padding-inline: 0; }
  .stacks { padding-top: 5px; }
  .btn-primary { gap: 8px; padding: 9px 16px; }

  .gallery { gap: 40px; padding: 60px 0; }
  .gallery-inner { padding: 0 80px; }

  .footer-info { padding-right: 75px; }
  .footer-info h2 { font-size: 22px; }
  .footer-label { font-size: 13px; }
}

/* ==========================================================================
   Phone
   ========================================================================== */
@media (max-width: 767.98px) {
  .page { padding-top: 80px; }
  .container { padding: 0 20px 40px; gap: 80px; }

  .nav-wrap { position: fixed; left: 0; right: 0; }
  .nav {
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    max-height: 80px;
    padding: 25px 20px 24px;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-snap), padding 0.5s var(--ease-snap);
  }
  .nav.is-open { max-height: 400px; padding: 15px 20px; }
  .nav-logo-row { flex: none; width: 100%; }
  .burger { display: block; }
  .nav-links { flex-direction: column; width: 100%; gap: 20px; }
  .nav-links .only-desktop { display: inline-flex; }

  .hero { height: 60vh; min-height: 400px; justify-content: flex-start; gap: 32px; padding: 50px 0 40px; }
  .hero-title { font-size: 40px; letter-spacing: -1px; }
  .hero-main { flex-direction: column; align-items: flex-start; gap: 32px; }
  .hero-contact { align-self: stretch; }
  .hero-contact { flex-direction: row; justify-content: space-between; width: 100%; height: auto; gap: 0; }
  .hero-avatar { order: 1; flex: none; width: auto; height: auto; z-index: 1; }
  .hero-avatar-img { width: 100px; }
  .hero-email { order: 0; align-items: flex-start; gap: 5px; height: auto; }

  .works { gap: 60px; }

  .about { gap: 30px; padding: 50px 0; }

  .gallery { gap: 24px; padding: 40px 16px; }
  .gallery-inner { padding: 0; }
  .ticker--gallery { height: 276px; }
  .gallery-item { width: 351px; }

  .footer-top { flex-direction: column; gap: 40px; }
  .footer-info { width: 100%; padding: 0; }
  .footer-explore { flex: none; width: 100%; }
  .footer-label { font-size: 10px; }
}

/* ---------- Logo alterno (hover) ---------- */
.logo-slide--alt { color: var(--purple); } /* al pasar el mouse: "Corina" en morado */

/* ==========================================================================
   Páginas de proyecto
   Breakpoints propios de Framer: desktop ≥1200px · tablet 810–1199px · phone ≤809px
   ========================================================================== */
.project {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 90px;
  padding-bottom: 140px;
}

/* Encabezado */
.p-header { width: 100%; display: flex; justify-content: center; padding: 0 40px 20px; overflow: hidden; }
.p-header-inner { flex: 1 1 0; min-width: 0; max-width: 1440px; display: flex; align-items: center; gap: 50px; overflow: hidden; }
.p-cover { flex: 1 1 0; min-width: 0; height: 450px; border-radius: 15px; overflow: hidden; }
.p-cover img { width: 100%; height: 100%; object-fit: cover; }
.p-details { flex: none; width: 35%; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.p-title-block,
.p-meta { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.p-title { font-family: var(--font-manrope); font-weight: 500; font-size: 56px; line-height: 1.2; }
.p-desc,
.p-meta-text,
.p-fact-value,
.p-did-text { font-family: var(--font-manrope); font-size: 16px; line-height: 1.4; }
.p-tags { display: flex; flex-wrap: wrap; gap: 20px; }

/* Chip con flecha */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-manrope);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  color: var(--black);
  white-space: nowrap;
}
.flip-icon--sm { width: 15px; height: 15px; border-radius: 100px; opacity: 1; }
.flip-icon--sm .flip-window { width: 73%; height: 73%; }

/* Secciones */
.p-section { width: 100%; display: flex; justify-content: center; overflow: hidden; }
.p-section--about { padding: 20px 40px 40px; }
.p-section--challenges { padding: 50px 40px 40px; }
.p-section--research { padding: 70px 40px 100px; }
.p-section--other { padding: 100px 40px; }

.p-inner { flex: 1 1 0; min-width: 0; max-width: 1440px; display: flex; flex-direction: column; align-items: center; gap: 100px; overflow: hidden; }
.p-inner--about { gap: 51px; }
.p-inner--challenges { gap: 80px; }

.p-sec-head { width: 100%; display: flex; align-items: flex-start; gap: 20px; padding-top: 10px; border-top: 1px solid var(--line); overflow: hidden; }
.p-sec-head--center { align-items: center; }
.p-sec-head--center .p-h2 { flex: 1 1 0; min-width: 0; }

.p-label { flex: none; width: 265px; display: flex; align-items: center; gap: 10px; }
.p-label-icon { flex: none; width: 22px; height: 22px; border-radius: 50px; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; }
.p-label-icon svg { width: 73%; height: 73%; }
.p-label p { font-family: var(--font-manrope); font-size: 16px; line-height: 1.4; white-space: nowrap; }

.p-head-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.p-head-main--stack { gap: 50px; }
.p-head-row { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-start; gap: 80px; }
.p-head-row .p-rich { flex: 1 1 0; min-width: 0; }

.p-h2 { font-family: var(--font-manrope); font-weight: 500; font-size: 44px; line-height: 1.2; }
.p-h2--fixed { flex: none; width: 465px; max-width: 100%; }

/* About the project */
.p-about-content { width: 100%; display: flex; align-items: flex-start; gap: 100px; overflow: hidden; }
.p-facts { flex: 1 1 0; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(50px, 1fr)); gap: 50px; }
.p-fact { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.p-fact--industry { grid-column: span 2; }
.p-fact--duration { gap: 0; }
.p-fact-label { font-family: var(--font-manrope); font-size: 14px; line-height: 1.4; color: var(--gray-90); }
.p-duration { display: flex; align-items: flex-end; gap: 5px; }
.p-duration-num { font-family: var(--font-manrope); font-weight: 500; font-size: 56px; line-height: 1.2; }
.p-duration-unit { padding-bottom: 10px; font-family: var(--font-manrope); font-size: 16px; line-height: 1.4; color: var(--gray-90); }
.p-services { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.p-did { flex: 1 1 0; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.p-did-title { font-family: var(--font-manrope); font-weight: 500; font-size: 24px; line-height: 1.2; }

/* Imágenes */
.p-gallery { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.p-img { border-radius: 15px; overflow: hidden; }
.p-img img { width: 100%; height: 100%; object-fit: cover; }
.p-img--wide { width: 100%; aspect-ratio: 2; }
.p-img-row { width: 100%; display: flex; gap: 20px; }
.p-img--a { flex: none; width: 532px; height: 401px; }
.p-img--b { flex: 1 1 0; min-width: 0; height: 401px; }
.p-img-row--three .p-img { flex: 1 1 0; min-width: 0; aspect-ratio: 1.30303; }

/* Challenges / Research */
.p-blocks { width: 100%; max-width: 750px; display: flex; flex-direction: column; gap: 30px; }
.p-block { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.p-h6 { font-family: var(--font-manrope); font-weight: 500; font-size: 20px; line-height: 1.2; color: var(--gray-90); }
.p-rich { font-size: 18px; line-height: 1.4; }
.p-rich > * + * { margin-top: 32px; }
.p-rich ul { padding-left: 1.5em; }
.p-insights { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 50px; }
.p-insights .p-rich { width: 100%; }

/* Botón negro "See more works" */
.btn-dark {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--black);
  border-radius: 8px;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-manrope);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}
.btn-dark-text { position: relative; display: block; }
.btn-dark-spacer { display: block; visibility: hidden; }
.btn-dark-flip { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; gap: 10px; transition: transform 0.4s var(--ease-framer); }
.btn-dark:hover .btn-dark-flip { transform: translateY(calc(-50% - 5px)); }
.btn-dot { flex: none; width: 10px; height: 10px; display: flex; align-items: center; justify-content: center; }
.btn-dot::before { content: ""; width: 80%; aspect-ratio: 1; border-radius: 50px; background: var(--white); transition: width 0.4s var(--ease-framer); }
.btn-dark:hover .btn-dot::before { width: 100%; }

@media (max-width: 1199.98px) {
  .p-header { padding: 20px 30px 80px; }
  .p-header-inner { flex-direction: column; gap: 30px; }
  .p-cover { flex: none; width: 100%; }
  .p-details { width: 100%; align-self: auto; justify-content: center; gap: 0; }

  .p-section--about,
  .p-section--research,
  .p-section--other { padding: 80px 30px; }
  .p-section--challenges { padding: 40px 30px 80px; }
  .p-inner--about,
  .p-inner--research,
  .p-inner--other { gap: 80px; }

  .p-sec-head { gap: 30px; }
  .p-label { width: auto; }
  .p-h2 { font-size: 36px; }
  .p-h2--fixed { width: 100%; }
  .p-head-row { flex-direction: column; gap: 20px; }
  .p-head-row .p-rich { flex: none; width: 100%; }

  .p-about-content { gap: 50px; }
  .p-facts { grid-template-columns: repeat(3, minmax(50px, 1fr)); gap: 30px; }
  .p-fact--services { grid-column: span 3; }
  .p-did { justify-content: center; gap: 50px; }

  .p-img--a { flex: 1 1 0; width: auto; min-width: 0; height: 300px; }
  .p-img--b { height: 300px; }
  .p-rich { font-size: 16px; }

  .project .works-grid { grid-template-columns: 1fr; }
}

@media (max-width: 809.98px) {
  .page--project { padding-top: 0; }

  .p-header,
  .p-section--about,
  .p-section--challenges,
  .p-section--research,
  .p-section--other { padding: 60px 15px; }
  .p-details { gap: 30px; }

  .p-inner--about,
  .p-inner--challenges,
  .p-inner--research,
  .p-inner--other { gap: 60px; }

  .p-sec-head { flex-direction: column; }
  .p-sec-head--center { align-items: flex-start; }
  .p-head-main,
  .p-head-row { flex: none; width: 100%; }
  .p-h2 { font-size: 30px; }

  .p-about-content { flex-direction: column; gap: 50px; }
  .p-facts { flex: none; width: 100%; grid-template-columns: 1fr; gap: 30px; }
  .p-fact--industry,
  .p-fact--services { grid-column: span 1; }
  .p-did { flex: none; width: 100%; align-self: auto; justify-content: center; gap: 30px; }

  .p-img-row--two { flex-direction: column; }
  .p-img--a,
  .p-img--b { flex: none; width: 100%; height: 300px; }
  .p-img-row--three { display: grid; grid-template-columns: repeat(2, minmax(50px, 1fr)); }
  .p-img-row--three .p-img:last-child { grid-column: span 2; }
}

/* ==========================================================================
   Studio (About me)
   ========================================================================== */
.page--studio .container { gap: 40px; background: var(--white); }

.studio-hero { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; padding: 12px 0 20px; }
.studio-intro { width: 100%; font-weight: 400; font-size: 24px; letter-spacing: -0.02em; line-height: 1.6; }

.studio-ticker-wrap { position: relative; z-index: 1; width: 940px; max-width: 100%; height: 411px; display: flex; align-items: center; }
.ticker--studio { height: 360px; overflow: visible; }
.ticker--studio .ticker-track { align-items: center; gap: 24px; }
.studio-shot { flex: none; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); }
.studio-shot img { width: 100%; height: 100%; object-fit: cover; }
.studio-shot--square { width: 360px; height: 360px; }
.studio-group { flex: none; display: flex; align-items: center; gap: 24px; height: 360px; }
.studio-shot--tall { width: 211px; height: 361px; }
.studio-col { flex: none; display: flex; flex-direction: column; gap: 24px; width: 378px; height: 360px; }
.studio-col .studio-shot { flex: 1 1 0; min-height: 0; width: 100%; }
.studio-shot--phone { width: 224px; height: 361px; }
.studio-shot--hero { width: 540px; height: 360px; }
.studio-shot--wide { width: 446px; height: 360px; }
.studio-shot--portrait { width: 270px; height: 360px; }
.studio-shot--landscape { width: 480px; height: 360px; }

.studio-approach {
  width: 940px;
  max-width: 100%;
  font-feature-settings: "salt" on;
  font-weight: 400;
  font-size: 44px;
  letter-spacing: -0.04em;
  line-height: 1.4;
  text-align: center;
}

.studio-skills { width: 100%; display: flex; align-items: flex-start; gap: 40px; }
.studio-skills--first { padding-top: 40px; }
.studio-skills-title { flex: none; width: 50%; font-weight: 500; font-size: 56px; letter-spacing: -1px; line-height: 1.3; }
.studio-skills-list { flex: 1 1 0; min-width: 0; margin: 0; padding-left: 1.5em; font-size: 22px; line-height: 1.4; color: var(--gray-138); }
.studio-title-phone { display: none; }
.is-gray-138 { color: var(--gray-138); }
.is-gray-115 { color: var(--gray-115); }
.is-white { color: var(--white); }

@media (max-width: 1099.98px) {
  .page--studio .container { gap: 70px; padding: 40px; }
  .studio-hero { justify-content: center; gap: 10px; padding: 0; }
  .studio-intro { max-width: 770px; }
  .studio-ticker-wrap { width: auto; height: auto; }
  .studio-approach { width: auto; font-size: 32px; }
  .studio-skills-title { width: 40%; font-size: 32px; }
}

@media (max-width: 767.98px) {
  .page--studio .container { gap: 30px; padding: 40px 20px; }
  .studio-hero { min-height: 400px; padding: 50px 0 40px; }
  .studio-approach { font-size: 28px; }
  .studio-skills { flex-direction: column; gap: 24px; }
  .studio-skills-title { width: 100%; letter-spacing: -0.5px; }
  .studio-skills-list { flex: none; width: 100%; }
  .studio-title-default { display: none; }
  .studio-title-phone { display: block; }
}

/* ==========================================================================
   Hero: espaciado centrado
   Mismo aire arriba (desde la navegación) que abajo (hasta "Projects").
   El margen negativo cancela el gap del contenedor debajo del hero.
   ========================================================================== */
.hero { height: auto; min-height: 0; justify-content: center; padding: 120px 0; margin-bottom: -140px; }
.hero-text { gap: 64px; }

@media (max-width: 1099.98px) {
  .hero { height: auto; min-height: 0; padding: 80px 0; margin-bottom: -80px; }
  .hero-text { gap: 48px; }
}

@media (max-width: 767.98px) {
  .hero { height: auto; min-height: 0; padding: 60px 0; margin-bottom: -80px; }
  .hero-text { gap: 32px; }
}

/* ---------- Hero: recuadro blanco detrás del h1 y h2 ----------
   Blanco al 50% para que los cubos se vean más suaves detrás del texto.
   main.js (initHeroGrid) lo coloca alineado a las líneas de la cuadrícula,
   así tapa celdas completas y no corta los cubos a la mitad. */
.hero > .hero-grid-veil {
  position: absolute;
  z-index: 0;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

/* ==========================================================================
   Nav: se contrae al hacer scroll (main.js añade .is-scrolled a .nav-wrap)
   Arriba: ancho completo y transparente, logo a la izquierda y menú a la derecha.
   Al bajar: "píldora" centrada a la mitad del ancho, fondo gris claro al 70%
   con desenfoque y borde blanco.
   ========================================================================== */
.nav-wrap {
  height: 81px; /* altura fija: el contenido de la página no salta al contraerse */
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  pointer-events: none; /* la franja transparente no bloquea clics */
}

.nav {
  pointer-events: auto;
  border: 1px solid transparent;
  border-radius: 0;
  background-color: rgba(232, 232, 232, 0);
  transition:
    max-width 0.6s var(--ease-snap),
    margin 0.6s var(--ease-snap),
    padding 0.6s var(--ease-snap),
    border-radius 0.6s var(--ease-snap),
    background-color 0.4s ease,
    border-color 0.4s ease,
    -webkit-backdrop-filter 0.4s ease,
    backdrop-filter 0.4s ease;
}

.nav-wrap.is-scrolled .nav {
  max-width: 720px;
  margin-top: 12px;
  padding: 10px 24px;
  border-color: var(--white);
  border-radius: 50px;
  background-color: rgba(232, 232, 232, 0.7);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

@media (max-width: 1099.98px) {
  .nav-wrap.is-scrolled .nav { max-width: 600px; }
}

@media (max-width: 767.98px) {
  .nav-wrap { height: auto; }

  .nav {
    transition:
      max-width 0.6s var(--ease-snap),
      max-height 0.5s var(--ease-snap),
      margin 0.6s var(--ease-snap),
      padding 0.5s var(--ease-snap),
      border-radius 0.6s var(--ease-snap),
      background-color 0.4s ease,
      border-color 0.4s ease,
      -webkit-backdrop-filter 0.4s ease,
      backdrop-filter 0.4s ease;
  }

  /* Menú abierto o página con scroll: mismo fondo desenfocado */
  .nav.is-open,
  .nav-wrap.is-scrolled .nav {
    border-color: var(--white);
    background-color: rgba(232, 232, 232, 0.7);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }

  .nav-wrap.is-scrolled .nav {
    max-width: calc(100% - 24px);
    max-height: 58px;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 28px;
  }
  .nav-wrap.is-scrolled .nav.is-open { max-height: 400px; }
}

/* ==========================================================================
   Hero: pila de fotos (reemplaza la foto redonda)
   Cards apiladas y giradas; al pasar el mouse se abren un poco y al hacer
   clic la foto de enfrente pasa al fondo (main.js actualiza data-pos).
   ========================================================================== */
@font-face {
  font-family: "Caveat";
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/caveat-500.woff") format("woff");
}

/* gap amplio: las cards giradas sobresalen de la pila */
.hero-contact { height: auto; overflow: visible; gap: 72px; }
.hero-email { height: auto; }

.hero-photos { position: relative; }

.photo-stack {
  position: relative;
  display: block;
  width: 340px;
  aspect-ratio: 4 / 5;
  cursor: pointer;
  border-radius: 24px;
}

.photo-card {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: #1d1d1f;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.6s var(--ease-snap), box-shadow 0.4s ease;
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }

/* Posición de cada card en la pila (0 = enfrente) */
.photo-card[data-pos="0"] { z-index: 4; transform: none; }
.photo-card[data-pos="1"] { z-index: 3; transform: translate(32px, -22px) rotate(10deg); }
.photo-card[data-pos="2"] { z-index: 2; transform: translate(-38px, 12px) rotate(-12deg); }
.photo-card[data-pos="3"] { z-index: 1; transform: translate(20px, 26px) rotate(6deg); }

/* Al pasar el mouse las cards de atrás se abren un poco más */
.photo-stack:hover .photo-card[data-pos="0"],
.photo-stack:focus-visible .photo-card[data-pos="0"] { transform: translateY(-6px) rotate(-1deg); }
.photo-stack:hover .photo-card[data-pos="1"],
.photo-stack:focus-visible .photo-card[data-pos="1"] { transform: translate(50px, -34px) rotate(15deg); }
.photo-stack:hover .photo-card[data-pos="2"],
.photo-stack:focus-visible .photo-card[data-pos="2"] { transform: translate(-58px, 16px) rotate(-17deg); }
.photo-stack:hover .photo-card[data-pos="3"],
.photo-stack:focus-visible .photo-card[data-pos="3"] { transform: translate(30px, 40px) rotate(9deg); }

.photo-badge {
  position: absolute;
  top: 9%;
  right: -16%;
  z-index: 5;
  padding: 6px 20px 8px;
  border: 2px solid var(--purple);
  border-radius: 999px;
  background: var(--white);
  color: var(--purple);
  font-family: "Caveat", var(--font-inter);
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
  transform: rotate(-8deg);
  box-shadow: 0 6px 16px -6px rgba(154, 23, 194, 0.35);
  transition: transform 0.6s var(--ease-snap);
}
.photo-stack:hover .photo-badge { transform: rotate(-11deg) translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  .photo-card,
  .photo-badge { transition: none; }
}

@media (max-width: 1099.98px) {
  .hero-contact { align-self: center; }
  .photo-stack { width: 290px; }
  .photo-badge { font-size: 24px; }
}

@media (max-width: 767.98px) {
  .hero-contact { flex-direction: column; align-items: center; gap: 60px; }
  .hero-photos { margin-top: 32px; } /* aire para las cards giradas bajo el subtítulo */
  .hero-email { align-items: center; }
  .photo-stack { width: 240px; border-radius: 18px; }
  .photo-card { border-radius: 18px; }
  .photo-badge { right: -12%; font-size: 20px; padding: 5px 14px 6px; }
}

/* ---------- Hero: flechas para cambiar de foto ---------- */
.hero-contact { gap: 28px; }

.photo-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 56px; /* libra las cards giradas */
}

.photo-arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-snap);
}
.photo-arrow svg { width: 18px; height: 18px; }
.photo-arrow:hover,
.photo-arrow:focus-visible {
  background: var(--purple);
  border-color: var(--purple);
  color: var(--white);
}
.photo-arrow:active { transform: scale(0.94); }

@media (max-width: 767.98px) {
  .hero-contact { gap: 24px; }
  .photo-controls { margin-top: 48px; }
}

/* ---------- Hero: h1 un poco más arriba (solo escritorio) ----------
   Más espacio bajo el h1 y margen inferior en el bloque: el h1 sube ~32px
   y el subtítulo se queda prácticamente en su lugar. */
@media (min-width: 1100px) {
  .hero-text { gap: 96px; margin-bottom: 32px; }
}

/* ==========================================================================
   Caso de estudio (formato Inaudito): encabezado + galería de piezas
   Solo en páginas con .page--case (hoy: Misión Cotija). Fondo papel con
   textura sutil; Lora en el título, Newsreader en textos, Archivo en etiquetas.
   ========================================================================== */
.page--case {
  --paper: #FFFFFF;
  --rule: rgba(0, 0, 0, 0.12);
  --body: var(--black);
  --quiet: var(--gray-90);
  --gut: clamp(1.25rem, 5vw, 3.5rem);
  --ease-cs: cubic-bezier(0.2, 0.75, 0.2, 1);
  /* Tipografías del sitio */
  --f-display: var(--font-inter);
  --f-body: "Newsreader", Georgia, "Times New Roman", serif; /* párrafos como en Inaudito */
  --f-hero: var(--font-inter);
  background-color: var(--white);
}

.cs-intro { width: 100%; }
.cs-wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gut); }

/* Encabezado */
.cs-hero { padding-block: clamp(4rem, 12vh, 8rem) clamp(3rem, 8vh, 5rem); color: var(--body); }

.cs-eyebrow {
  margin: 0 0 1.75rem;
  font-family: var(--f-display);
  font-variation-settings: "opsz" 32;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
}

.cs-title {
  margin: 0 0 1.75rem;
  font-family: var(--f-hero);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--body);
}

.cs-lede {
  max-width: 40ch;
  margin: 0 0 clamp(2.5rem, 6vh, 4rem);
  font-family: var(--f-body);
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--quiet);
}

.cs-meta {
  display: grid;
  gap: 1.25rem 2.5rem;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.cs-meta dt {
  margin-bottom: 0.35rem;
  font-family: var(--f-display);
  font-variation-settings: "opsz" 32;
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--quiet);
}
.cs-meta dd { margin: 0; font-family: var(--f-body); font-size: 0.95rem; color: var(--body); }

@media (min-width: 700px) {
  .cs-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Galería de piezas: 1 ancha · 35/65 · 3 */
.cs-plates { padding-block: clamp(1rem, 3vh, 2rem) clamp(2rem, 6vh, 4rem); }
.plates { display: grid; gap: 1rem; width: min(100% - 2 * var(--gut), 1400px); margin-inline: auto; }
.plates__row { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }

.plate {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #f5f5f5;
}
.plate > button { all: unset; position: absolute; inset: 0; display: block; cursor: zoom-in; }
.plate > button:focus-visible { outline: 2px solid var(--tint, var(--purple)); outline-offset: -3px; }
.plate img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-cs); }

.plate__cap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 55%);
  color: #fff;
  font-family: var(--f-display);
  font-variation-settings: "opsz" 32;
  font-weight: 500;
  font-size: 0.82rem;
  line-height: 1.35;
}

/* Con mouse, el pie de foto aparece al pasar por encima; en táctil queda visible */
@media (hover: hover) {
  .plate__cap { opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s var(--ease-cs); }
  .plate > button:hover .plate__cap,
  .plate > button:focus-visible .plate__cap { opacity: 1; transform: none; }
  .plate > button:hover img { transform: scale(1.02); }
}

@media (min-width: 640px) {
  .plates__row--split { grid-template-columns: 35fr 65fr; }
  .plates__row--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plates__row--three > :last-child { grid-column: span 2; }
  .plate--full { aspect-ratio: 2 / 1; }
  .plates__row--split .plate:last-child { aspect-ratio: auto; height: 100%; }
}

@media (min-width: 900px) {
  .plates__row--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plates__row--three > :last-child { grid-column: auto; }
}

@media (max-width: 767.98px) {
  .cs-hero { padding-top: 7rem; } /* el nav es fijo en móvil */
}

/* Visor de imágenes ampliadas */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(0, 0, 0, 0.8);
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  cursor: default;
}
.lightbox__close {
  all: unset;
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 2.4rem;
  line-height: 1;
  color: #fff;
  cursor: pointer;
}
.lightbox__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ==========================================================================
   Home: slider infinito de disciplinas (tags)
   Mismo formato que la franja de "What we do" de Inaudito: píldoras con
   ícono en un loop continuo con bordes desvanecidos. Adaptado a fondo blanco.
   El movimiento lo hace el ticker de main.js ([data-ticker]).
   ========================================================================== */
/* dos filas: la primera va a la izquierda y la segunda a la derecha */
.tags-strip { width: 100%; display: flex; flex-direction: column; gap: 0.75rem; }
.tags-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ticker--tags {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.tags-track { align-items: center; margin: 0; padding: 0; list-style: none; }
/* el espacio va dentro de cada tag para que la unión del loop no se note */
.tag-item { flex: none; padding-right: 0.75rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.7); /* texto e íconos al 70% (los íconos usan currentColor) */
  font-family: var(--font-inter);
  font-variation-settings: "opsz" 32;
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.chip__i {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Párrafos del caso en Newsreader, con el tamaño e interlineado del texto de Inaudito */
.page--case .p-rich,
.page--case .p-rich li p,
.page--case .p-did-text {
  font-family: var(--f-body);
  font-variation-settings: normal;
  font-weight: 400;
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.65;
}
