/* =====================================================================
   PORTAFOLIO JOSE YEPEZ
   Tokens: cambia colores y tipografía aquí.
   ===================================================================== */
/* =====================================================================
   PALETA "CLAROSCURO CREPUSCULAR" — copy.ooh
   Base digital (noche) + papel de marca (crema) + chispa de idea (ámbar).
   Reglas de legibilidad (contraste medido):
   - Sobre NOCHE: texto en crema, rosa, ámbar, terracota o malva. Taupe y salvia solo en textos grandes.
   - Sobre CREMA: solo texto azul noche o carbón. Ámbar, rosa, terracota y malva NO son legibles como texto sobre crema.
   - Sobre fondos cálidos (ámbar, terracota, rosa, malva): texto azul noche.
   ===================================================================== */
:root {
  /* paleta base */
  --night: #1A2332;       /* Deep Night Blue: base digital / estrategia */
  --charcoal: #1C1E24;    /* Deep Charcoal: profundidad (pie, fondos de video) */
  --cream: #F5F2EB;       /* Soft Cream: papel / branding / texto */
  --amber: #C48A4A;       /* Soft Amber: la idea, acento principal */
  --rose: #D4A5A5;        /* Dusty Rose */
  --terracotta: #BE7964;  /* Soft Terracotta */
  --mauve: #9A868C;       /* Light Dusty Mauve */
  --sage: #707C72;        /* Muted Sage Green (solo decoración / texto grande) */
  --taupe: #8B7D73;       /* Warm Muted Taupe (solo decoración / texto grande) */

  /* roles que usa el sitio */
  --paper: var(--night);                 /* fondo de página */
  --ink: var(--cream);                   /* texto principal */
  --mute: #B4AFA8;                       /* texto secundario (crema apagado, 7:1 sobre noche) */
  --rule: var(--cream);                  /* líneas */
  --accent: var(--amber);                /* acento principal */
  --accent-ink: var(--night);            /* texto sobre el acento */
  --deep: var(--charcoal);               /* fondos profundos */
  --band: var(--cream);                  /* franja clara ("papel") */
  --band-ink: var(--night);              /* texto sobre la franja clara */
  --band-mute: color-mix(in srgb, var(--night) 70%, var(--cream));
  --surface: color-mix(in srgb, var(--cream) 8%, var(--night));   /* bloques elevados */

  color-scheme: dark;

  /* tipografía, medidas y animación */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wdth-display: 118;
  --wdth-body: 92;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1680px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 900ms;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { background: var(--paper); scroll-padding-top: env(safe-area-inset-top, 0px); scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-variation-settings: "wdth" var(--wdth-body);
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img, video { max-width: 100%; display: block; }
button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: var(--paper);
  border-bottom: 2px solid var(--accent);
}
.top .wrap {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 64px; gap: 24px;
}
.brand { font-weight: 700; font-variation-settings: "wdth" 105; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--mute); font-weight: 500; }
.nav { display: flex; gap: clamp(16px, 2.5vw, 40px); justify-content: center; }
.nav a { font-weight: 600; position: relative; padding: 4px 0; }
.nav a.is-active::after, .nav a:hover::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--accent);
}
.lang { justify-self: end; display: flex; gap: 4px; font-weight: 600; }
.lang button { padding: 6px 8px; border-radius: 0; }
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }


/* ---------- Views ---------- */
.view { display: none; }
.view.is-current { display: block; }

/* ---------- Hero ---------- */
.hero {
  position: sticky; top: 64px; z-index: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: clamp(52px, 11vh, 120px);
  padding-bottom: clamp(44px, 9vh, 100px);
  background: var(--paper);
}
.hero h1 {
  margin: 0;
  font-weight: 800;
  font-variation-settings: "wdth" var(--wdth-display);
  font-size: clamp(34px, 6vw, 108px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  text-wrap: balance;
  max-width: 18ch;
  transform-origin: left bottom;
  will-change: transform, opacity;
}
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: top; }
.hero h1 .w > span { display: inline-block; transform: translateY(110%); animation: rise var(--dur) var(--ease) forwards; animation-delay: calc(var(--i) * 70ms + 120ms); }
@keyframes rise { to { transform: translateY(0); } }
.hero-intro {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter);
  opacity: 0; animation: fade 900ms var(--ease) 700ms forwards;
}
@keyframes fade { to { opacity: 1; } }
.hero-intro p { margin: 0; max-width: 60ch; }
.hero-intro .i1 { grid-column: 1 / span 5; font-weight: 600; font-size: 1.1em; }
.hero-intro .i2 { grid-column: 7 / span 5; }
.hero-meta { grid-column: 1 / -1; color: var(--mute); font-size: 0.9em; margin-top: 8px; }
@media (max-width: 900px) {
  .hero-intro .i1, .hero-intro .i2 { grid-column: 1 / -1; }
}

/* ---------- Sections that slide over the hero ---------- */
.sheet { position: relative; z-index: 2; background: var(--paper); border-top: 2px solid var(--rule); }
.section-title {
  margin: 0; padding: clamp(28px, 4vh, 48px) 0 clamp(16px, 2vh, 24px);
  font-weight: 700; font-size: clamp(22px, 2.4vw, 34px); letter-spacing: -0.02em;
  font-variation-settings: "wdth" 105;
}

/* Index of work: a big typographic list */
.index { list-style: none; margin: 0; padding: 0 0 clamp(40px, 8vh, 120px); }
.index li { border-top: 2px solid var(--rule); }
.index li:last-child { border-bottom: 2px solid var(--rule); }
.index a {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px;
  padding: clamp(18px, 2.6vh, 34px) var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  transition: background 220ms var(--ease), color 220ms var(--ease);
}
.index li { --hue: var(--amber); }
.index li:nth-child(4n+2) { --hue: var(--terracotta); }
.index li:nth-child(4n+3) { --hue: var(--rose); }
.index li:nth-child(4n+4) { --hue: var(--mauve); }
.index a:hover, .index a:focus-visible { background: var(--hue); color: var(--night); outline: none; }
.index .t {
  font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  font-size: clamp(28px, 4.6vw, 76px);
  font-variation-settings: "wdth" 108;
  text-wrap: balance;
}
.index .c { display: block; margin-top: 10px; font-weight: 500; color: var(--mute); }
.index a:hover .c, .index a:focus-visible .c { color: var(--night); }
.index .h { text-align: right; line-height: 1; }
.index .h b { color: var(--hue); display: block; font-size: clamp(28px, 4vw, 64px); font-weight: 800; letter-spacing: -0.03em; font-variation-settings: "wdth" 118; }
.index .h small { display: block; max-width: 18ch; margin-left: auto; margin-top: 6px; font-size: 0.85em; font-weight: 500; color: var(--mute); }
.index a:hover .h small, .index a:focus-visible .h small, .index a:hover .h b, .index a:focus-visible .h b { color: var(--night); }
.index .badge { display: inline-block; margin-left: 14px; padding: 1px 8px; border: 2px solid currentColor; font-size: 0.85em; font-weight: 600; color: var(--hue); }
.index a:hover .badge, .index a:focus-visible .badge { color: var(--night); }
@media (max-width: 720px) {
  .index a { grid-template-columns: 1fr; }
  .index .h { text-align: left; }
  .index .h small { margin-left: 0; }
}

/* Art index: quieter */
.index.art .t { font-size: clamp(24px, 3vw, 44px); font-variation-settings: "wdth" 100; font-weight: 600; }

/* About */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding-bottom: clamp(40px, 8vh, 120px); }
.about .text { grid-column: 1 / span 7; }
.about .text p { max-width: 62ch; margin: 0 0 1.2em; font-size: 1.1em; }
.about .text p:first-child { font-size: clamp(22px, 2.4vw, 34px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.about .portrait { grid-column: 9 / span 4; aspect-ratio: 4 / 5; background: var(--accent); overflow: hidden; }
.about .portrait img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) { .about .text, .about .portrait { grid-column: 1 / -1; } .about .portrait { max-width: 420px; } }

/* Footer / contact */
.foot { background: var(--deep); color: var(--ink); padding: clamp(48px, 10vh, 140px) 0 clamp(32px, 6vh, 72px); }
.foot .big {
  font-weight: 800; font-size: clamp(28px, 6vw, 104px); letter-spacing: -0.035em; line-height: 0.95;
  font-variation-settings: "wdth" 118; word-break: break-word; display: block; margin-bottom: 32px;
}
.foot .big:hover { color: var(--accent); }
.foot .links { display: flex; flex-wrap: wrap; gap: 8px 32px; font-weight: 600; }
.foot .links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.foot .fine { margin-top: 40px; color: var(--mute); font-size: 0.85em; }

/* ---------- Case / art detail ---------- */
.detail { position: relative; z-index: 2; background: var(--paper); }
.detail .head { padding: clamp(24px, 4vh, 48px) 0 clamp(32px, 5vh, 64px); border-bottom: 2px solid var(--rule); }
.back { display: inline-block; font-weight: 600; margin-bottom: clamp(24px, 4vh, 48px); }
.back:hover { color: var(--accent); }
.detail h1 {
  margin: 0 0 24px; font-weight: 800; letter-spacing: -0.035em; line-height: 0.92;
  font-size: clamp(40px, 7.5vw, 136px); font-variation-settings: "wdth" 115; text-wrap: balance;
}
.meta { display: flex; flex-wrap: wrap; gap: 6px 40px; font-weight: 500; color: var(--mute); }
.meta b { color: var(--ink); font-weight: 600; }
.meta .badge { padding: 4px 10px; border: 2px solid var(--accent); color: var(--accent); font-weight: 600; }

.body { padding: clamp(24px, 5vh, 72px) 0 clamp(8px, 1vh, 16px); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 0; }
.body p { grid-column: 3 / span 8; margin: 0 0 1.3em; font-size: clamp(19px, 1.5vw, 26px); line-height: 1.4; max-width: 62ch; }
.body p.lead { font-size: clamp(24px, 2.3vw, 38px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.body p.s-b { font-weight: 700; }
.body p.s-i { font-style: italic; }
.body p.s-label { font-size: 0.8em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.6em; }
.body p.s-statement { font-size: clamp(22px, 2vw, 32px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
@media (max-width: 900px) { .body p { grid-column: 1 / -1; } }

.media { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); padding-bottom: clamp(24px, 5vh, 72px); }
.media figure { margin: 0; grid-column: span 6; }
.media figure:only-child, .media figure.wide { grid-column: 1 / -1; }
.media figure img, .media figure video, .media .frame { width: 100%; background: var(--deep); }
.media figure video { max-height: 85vh; object-fit: contain; background: var(--deep); }
.media .frame { aspect-ratio: 16 / 9; position: relative; }
.media .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media audio { width: 100%; margin-top: 8px; }
.media figcaption { margin-top: 10px; font-size: 0.9em; color: var(--mute); }
.media .missing {
  aspect-ratio: 16 / 10; display: grid; place-items: center; padding: 24px; text-align: center;
  border: 2px dashed var(--mute); color: var(--mute); font-size: 0.9em;
}
.media .missing code { font-family: inherit; color: var(--ink); font-weight: 600; }
@media (max-width: 720px) { .media figure { grid-column: 1 / -1; } }

.results { background: var(--accent); color: var(--accent-ink); padding: clamp(40px, 8vh, 120px) 0; }
.results h2 { margin: 0 0 clamp(24px, 4vh, 48px); font-weight: 600; font-size: 1.1em; }
.results .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gutter); }
.results .grid > div { min-width: 0; }
.results .n { white-space: nowrap; font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; font-size: clamp(56px, 8vw, 150px); font-variation-settings: "wdth" 120; }
.results .l { margin-top: 12px; max-width: 24ch; font-size: 1.05em; }

.next { display: block; padding: clamp(40px, 8vh, 120px) 0; border-top: 2px solid var(--rule); }
.next small { display: block; font-weight: 600; color: var(--mute); margin-bottom: 12px; }
.next .t { font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; font-size: clamp(36px, 6vw, 110px); font-variation-settings: "wdth" 115; }
.next:hover .t { color: var(--accent); }

/* Poems and prose */
.poem { padding: clamp(32px, 6vh, 96px) 0; display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 0; }
.poem .stanza { grid-column: 3 / span 8; font-size: clamp(20px, 1.8vw, 30px); line-height: 1.35; }
.poem .stanza .ln { display: block; min-height: 1.35em; }
.poem .lead-note { grid-column: 3 / span 8; color: var(--mute); margin: 0 0 32px; font-style: italic; }
.poem .tag { grid-column: 3 / span 8; margin: 48px 0 8px; font-weight: 600; color: var(--mute); border-top: 2px solid var(--rule); padding-top: 16px; }
.lyrics { grid-column: 3 / span 8; white-space: pre; overflow-x: auto; font-size: 0.95em; line-height: 1.5; padding: 24px; background: var(--surface); }
@media (max-width: 900px) { .poem .stanza, .poem .lead-note, .poem .tag, .lyrics { grid-column: 1 / -1; } }

/* ---------- Scroll reveals ---------- */
.rv { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.rv.in { opacity: 1; transform: none; }
.rv-wipe { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease); }
.rv-wipe.in { opacity: 1; transform: none; filter: none; }
.rv-line { opacity: 0; transform: translateX(-12px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.rv-line.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv, .rv-wipe, .rv-line { opacity: 1; transform: none; filter: none; transition: none; }
  .hero h1 .w > span { animation: none; transform: none; }
  .hero-intro { animation: none; opacity: 1; }
  .hero h1 { transform: none !important; opacity: 1 !important; }
}

/* Progress bar at the very top */
.progress { position: fixed; top: env(safe-area-inset-top, 0px); left: 0; height: 3px; width: 0; background: var(--accent); z-index: 50; }


/* ---------- Portadas junto a los títulos (página principal) ---------- */
.index a.has-cover { grid-template-columns: clamp(150px, 21vw, 360px) 1fr auto; align-items: center; column-gap: clamp(16px, 2.4vw, 40px); }
.index a.has-cover .t { font-size: clamp(26px, 3.5vw, 58px); }
.index .cv { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--deep); }
.index .cv img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 700ms var(--ease); }
.index a:hover .cv img, .index a:focus-visible .cv img { transform: scale(1.06); }
.banner { margin: 0 0 clamp(20px, 3vh, 36px); overflow: hidden; background: var(--deep); }
.banner img { width: 100%; height: clamp(180px, 32vw, 480px); object-fit: cover; object-position: 60% 50%; display: block; }
@media (max-width: 720px) {
  .index a.has-cover { grid-template-columns: 1fr; row-gap: 14px; }
  .index a.has-cover .t { font-size: clamp(26px, 8vw, 40px); }
}

/* ---------- Reproductor de música (en la barra superior, no tapa contenido) ---------- */
.top-right { display: flex; align-items: center; gap: 14px; justify-self: end; }
.player { position: relative; display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 10px 0 0; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.player[hidden] { display: none; }
.pl-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; cursor: pointer; }
.pl-bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.player button:focus-visible, .pl-bar:focus-visible, .pl-vol input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pl-btn { width: 40px; height: 40px; display: grid; place-items: center; color: inherit; flex: none; }
.pl-btn svg { width: 20px; height: 20px; fill: currentColor; }
.pl-play { background: var(--accent); color: var(--accent-ink); margin-right: 4px; }
.pl-sm { width: 30px; height: 40px; opacity: 0.8; }
.pl-sm:hover { opacity: 1; }
.pl-info { display: flex; flex-direction: column; min-width: 80px; max-width: 170px; line-height: 1.1; padding-right: 4px; }
.pl-info small { font-size: 0.62em; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.pl-title { font-weight: 700; font-size: 0.86em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-vol { display: flex; align-items: center; gap: 0; }
.pl-vol input { width: 76px; accent-color: var(--accent); }
.player[data-error="1"] .pl-title { color: var(--terracotta); }

/* la barra superior se adapta: se van ocultando detalles según el ancho */
.top .wrap { grid-template-columns: auto 1fr auto; }
@media (max-width: 1099px) { .brand span { display: none; } .pl-vol input { display: none; } .pl-info { max-width: 110px; } }
@media (max-width: 959px) {
  .top .wrap { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .pl-prev, .pl-vol { display: none; }
}
@media (max-width: 560px) { .pl-info { display: none; } .top-right { gap: 8px; } }


/* ---------- Franja de marcas ---------- */
.brands { background: var(--band); color: var(--band-ink); border-top: 2px solid var(--rule); padding: clamp(18px, 3vh, 30px) 0 clamp(18px, 3vh, 34px); }
.brands-title { margin: 0 0 clamp(10px, 2vh, 20px); font-weight: 600; font-size: 0.8em; letter-spacing: 0.12em; text-transform: uppercase; color: var(--band-mute); }
.marquee { overflow: hidden; background: var(--band); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee .slide { display: flex; width: max-content; background: var(--band); animation: marquee 60s linear infinite; }   /* el fondo va aquí: la animación aísla la fusión de los logos */
.marquee:hover .slide, .marquee:focus-within .slide { animation-play-state: paused; }
.track { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; flex: none; }
.track li { display: flex; align-items: center; justify-content: center; height: 64px; padding: 0 clamp(24px, 3.4vw, 56px); flex: none; }
.blogo { height: clamp(30px, 3.2vw, 46px); width: auto; max-width: 180px; object-fit: contain; display: block; mix-blend-mode: multiply; filter: grayscale(1); opacity: 0.8; transition: opacity 250ms var(--ease), filter 250ms var(--ease); }
.track li:hover .blogo { filter: none; opacity: 1; }
.logo-txt { font-weight: 800; font-variation-settings: "wdth" 108; letter-spacing: -0.02em; text-transform: uppercase; font-size: clamp(15px, 1.5vw, 21px); white-space: nowrap; opacity: 0.8; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee .slide { animation: none; width: auto; justify-content: center; }
  .track { flex-wrap: wrap; justify-content: center; }
  .track[aria-hidden="true"] { display: none; }
}


/* ---------- Titular de la portada: una palabra en ámbar ---------- */
.hero h1 .w.ac > span { color: var(--accent); }
/* la franja de marcas usa los colores de "papel" */
.brands a:focus-visible { outline-color: var(--band-ink); }
::selection { background: var(--accent); color: var(--accent-ink); }


/* ---------- Grupos de piezas: suelta, fila (lado a lado), cuadrícula y carrusel ---------- */
.media--single { grid-template-columns: minmax(0, 1fr); }
.media--row { grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); align-items: start; }
.media--grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); align-items: start; }
.media--single figure, .media--row figure, .media--grid figure { grid-column: auto; }
.media figcaption.cap { margin-top: 12px; font-weight: 700; font-size: 0.95em; line-height: 1.25; }
.media figcaption.cap.s-label { font-size: 0.8em; letter-spacing: 0.1em; text-transform: uppercase; }
.media figure > figcaption.cap:first-child { margin: 0 0 12px; }          /* leyenda encima de la pieza */
@media (max-width: 720px) {
  .media--row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .media--row::-webkit-scrollbar { display: none; }
  .media--row figure { scroll-snap-align: start; }
}

/* carrusel: se ve que hay más (asoma la siguiente), con flechas, contador y puntos */
.carousel { padding: 4px 0 clamp(24px, 5vh, 72px); }
.car-track { display: flex; gap: clamp(12px, 1.6vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline-offset: 6px; }
.car-track::-webkit-scrollbar { display: none; }
.car-slide { flex: 0 0 var(--slide-w, min(44%, 520px)); scroll-snap-align: start; margin: 0; }
.car--wide { --slide-w: min(86%, 1080px); }
.car--tall { --slide-w: min(34%, 420px); }
.car-slide img, .car-slide video { width: 100%; display: block; background: var(--deep); max-height: 85vh; object-fit: contain; }
.car-ui { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.car-btn { width: 48px; height: 48px; flex: none; display: grid; place-items: center; border: 2px solid var(--ink); color: var(--ink); font-size: 22px; line-height: 1; }
.car-btn:hover:not(:disabled), .car-btn:focus-visible:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.car-btn:disabled { opacity: 0.35; cursor: default; }
.car-count { min-width: 4.8em; text-align: center; font-weight: 700; letter-spacing: 0.04em; }
.car-dots { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.car-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0.6; }
.car-dot.on { background: var(--accent); border-color: var(--accent); opacity: 1; }
@media (max-width: 720px) { .car-slide { flex-basis: 82%; } .car--tall .car-slide { flex-basis: 62%; } .car-dots { display: none; } }


/* ---------- Toda pieza cabe completa en pantalla (alto de la ventana menos la barra superior) ---------- */
:root { --alto-pieza: calc(100svh - 64px - 40px); }
.media figure img { width: 100%; height: auto; max-height: var(--alto-pieza); object-fit: contain; background: var(--deep); }
.media figure video { max-height: var(--alto-pieza); }
.car-slide img, .car-slide video { max-height: var(--alto-pieza); }
/* una pieza sola: se centra y toma el tamaño que le permite la pantalla, sin estirarse */
.media--single figure { width: fit-content; max-width: 100%; margin-inline: auto; }
.media--single figure img { width: auto; max-width: 100%; }
