/* ==========================================================================
   AISKREAM · Portfolio (estilo inspirado en la plantilla de Lovable)
   ========================================================================== */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --muted: #a6a6a6;
  --card: #0d0d0d;
  --hover-bg: #141414;
  --line: #262626;
  --accent: #bfff00;
  --accent-fg: #000000;
  --gutter: clamp(20px, 4vw, 56px);
  --gap: 24px; /* separación única entre elementos (columnas, vídeo y texto) */
  --header-h: 72px;
  --media-h: clamp(240px, 44vh, 520px); /* altura común del vídeo y del carrusel */
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --fg: #0d0d0d;
  --muted: #666666;
  --card: #ffffff;
  --hover-bg: #f0f0f0;
  --line: #e0e0e0;
  --accent: #bfff00;
  --accent-fg: #000000;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .4s ease, color .4s ease;
}

img, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

.display { font-family: "Syne", system-ui, sans-serif; letter-spacing: -0.02em; }

/* ---------- Cabecera (aparece al mover el ratón arriba) ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--gutter);
  background: var(--bg);
  transition: transform .45s cubic-bezier(.2,.7,.2,1), background-color .4s ease;
}
.site-header.is-hidden { transform: translateY(-100%); }

.logo {
  font-family: "Syne", sans-serif; font-weight: 600; font-size: 17px; letter-spacing: .01em;
  text-decoration: none; justify-self: start;
}

.nav { display: flex; gap: clamp(20px, 3vw, 48px); justify-self: center; }
.nav a {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  color: var(--muted); transition: color .2s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }

.theme-toggle {
  justify-self: end; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; display: grid; place-items: center;
  transition: border-color .2s ease;
}
.theme-toggle:hover { border-color: var(--fg); }
.theme-toggle svg { width: 18px; height: 18px; }
/* Icono según el modo: sol en modo noche (oscuro) y luna en modo día (claro) */
.tools { justify-self: end; display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  height: 40px; min-width: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--fg);
  font-size: 12px; font-weight: 500; letter-spacing: .16em; transition: border-color .2s ease;
}
.lang-toggle:hover { border-color: var(--fg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }

/* ---------- Portada ---------- */
.home { position: relative; min-height: 100vh; min-height: 100svh; padding-top: var(--header-h); overflow: visible; }
.home-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap);
  padding: 24px var(--gutter) 0; height: calc(100svh - var(--header-h) - 24px - 150px); min-height: 440px;
}
.home-col { position: relative; overflow: visible; border-radius: 0; will-change: transform; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.home-col {
  display: block; position: relative;
  transition: scale .6s cubic-bezier(.2,.7,.2,1), box-shadow .6s ease;
}
/* Nombre del vídeo: pequeño, centrado y con la misma tipografía del menú */
.home-label {
  position: absolute; top: 18px; left: 0; right: 0; z-index: 2; padding: 0 16px;
  text-align: center; pointer-events: none;
  font-size: 15px; letter-spacing: .2em; text-transform: uppercase; line-height: 1.35;
  color: #fff; text-shadow: 0 1px 10px rgba(0, 0, 0, .7);
}
/* Al pasar el ratón, el proyecto se acerca a la pantalla y los demás se atenúan */
@media (hover: hover) and (pointer: fine) {
  /* Resplandor lima suave que sale por debajo del vídeo (la cabecera queda por encima y no se tapa) */
  .home-col:hover { scale: .97; z-index: 2; }
  .home-grid:hover .home-col:not(:hover) img,
  .home-grid:hover .home-col:not(:hover) video { filter: brightness(.35); }
  .home-col img, .home-col video { transition: filter .6s ease; }
}
.home-col img, .home-col video { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.home-nav {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 3;
  display: flex; align-items: center; gap: 14px; color: #fff; font-size: 13px; letter-spacing: .12em;
}
.hn-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5);
  background: rgba(0,0,0,.45); color: #fff; font-size: 26px; line-height: 1;
  display: grid; place-items: center; transition: background .2s ease, border-color .2s ease;
}
.hn-btn:hover { background: var(--accent); border-color: var(--accent); color: #000; }
.hn-count { min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.home-title {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  margin: 0; text-align: center; pointer-events: none;
  font-family: "Syne", sans-serif; font-weight: 800; color: #fff;
  font-size: clamp(44px, 9.6vw, 160px); line-height: .95; letter-spacing: -0.035em;
  white-space: nowrap;
}
.home-intro {
  position: absolute; left: var(--gutter); bottom: 24px; max-width: min(360px, 30vw);
  margin: 0; text-align: left; color: #e9e9ee; font-size: 15px; line-height: 1.6;
}
.home-intro strong { color: #fff; font-weight: 600; }
/* El título siempre por encima de los vídeos: al pasar el ratón, la columna no lo tapa */
.home-title { z-index: 4; }
/* En modo claro, el título grande se muestra en amarillo lima */
:root[data-theme="light"] .home-title { color: var(--accent); }
.home-intro { z-index: 4; }

/* ---------- Títulos de sección ---------- */
.page { padding: calc(var(--header-h) + 40px) var(--gutter) 0; min-height: 100vh; }
.page-title {
  margin: 0 0 40px; font-family: "Syne", sans-serif; font-weight: 700;
  font-size: clamp(64px, 13vw, 200px); line-height: .95; letter-spacing: -0.04em;
}
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }

/* ---------- Filtros por categoría ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--gap); }
.chip {
  padding: 7px 14px; border-radius: 0; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  transition: all .2s ease;
}
.chip:hover { color: var(--fg); border-color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip .n { opacity: .55; margin-left: 6px; }

/* ---------- Lista de proyectos ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 16px; padding: 26px 0;
  border-bottom: 1px solid var(--line); text-decoration: none;
  transition: color .25s ease;
}
/* El resaltado al pasar el ratón sobresale un poco, sin mover el contenido */
.row::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -16px; right: -16px; z-index: -1;
  background: transparent; transition: background-color .25s ease;
}
.row-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; transition: color .25s ease; }
.row-title {
  margin: 0; font-weight: 500; text-transform: uppercase; letter-spacing: .02em;
  font-size: clamp(22px, 3.4vw, 48px); line-height: 1.1;
}
.row-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
/* Títulos y etiquetas siempre por encima de la vista previa, para que nunca queden tapados */
.row-title, .row-tags { position: relative; z-index: 30; }
.tag {
  padding: 4px 9px; border: 1px solid currentColor; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap; opacity: .85;
}
.row:hover::before, .row:focus-visible::before { background: var(--accent); }
.row:hover, .row:focus-visible { color: var(--accent-fg); }
.row:hover .row-num { color: var(--accent-fg); }

/* Vista previa flotante */
.preview {
  position: fixed; left: 0; top: 0; z-index: 20; pointer-events: none;
  width: clamp(150px, 14vw, 200px); aspect-ratio: 4 / 5; overflow: hidden; background: var(--card);
  opacity: 0; transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(.92);
  transition: opacity .25s ease, transform .2s ease-out;
}
.preview.is-on { opacity: 1; transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1); }
.preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Ficha de proyecto ---------- */
.detail-hero {
  position: relative; isolation: isolate; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px; background: #000; color: #fff;
}
.detail-hero > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  filter: brightness(.55);
}
.detail-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,0) 55%);
}
.detail-title {
  margin: auto 0; text-align: center; font-family: "Syne", sans-serif; font-weight: 800;
  font-size: clamp(48px, 9vw, 140px); line-height: .98; letter-spacing: -0.035em;
}
.detail-sub {
  margin: 14px 0 0; text-align: center; font-family: "Inter", sans-serif; font-weight: 400;
  font-size: clamp(16px, 2vw, 24px); letter-spacing: .02em; color: #e6e6ec;
}
.row-sub {
  display: block; margin-top: 6px; font-family: "Inter", sans-serif; font-weight: 400;
  font-size: 14px; letter-spacing: .02em; text-transform: none; opacity: .75;
}
.detail-meta { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.detail-meta .num { font-size: 13px; letter-spacing: .16em; color: #d9d9e0; }
.detail-meta .tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.detail-body { padding: 56px var(--gutter) 0; }
.back {
  display: inline-block; margin-bottom: 28px; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; text-decoration: none; color: var(--muted);
}
.back:hover { color: var(--fg); }

/* Vídeo y carrusel: misma altura y mismo borde superior e inferior */
.media-row {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--gap); align-items: start;
}
.media-row.no-video { grid-template-columns: minmax(0, 1fr); }
.media-row.no-frames { grid-template-columns: minmax(0, 1fr); }
.p-left { min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.p-final { position: relative; margin: 0; width: 100%; height: var(--media-h); overflow: visible; background: #000; }
.p-final video { width: 100%; height: 100%; object-fit: contain; background: #000; }

.p-carousel { position: relative; min-width: 0; height: var(--media-h); }
.car-view { position: absolute; inset: 0; overflow: hidden; background: #000; }
.car-stage { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; }
.car-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: none; }
.car-stage img.is-on { display: block; animation: frameIn .5s ease both; }
@keyframes frameIn { from { opacity: 0; } to { opacity: 1; } }
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.55); color: #fff; font-size: 30px; line-height: 1;
  display: grid; place-items: center; transition: background .2s;
}
.car-btn:hover { background: rgba(0,0,0,.85); }
.car-btn.prev { left: 12px; }
.car-btn.next { right: 12px; }
.car-count {
  position: absolute; left: 50%; bottom: 12px; z-index: 2; margin: 0; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.6); color: #e6e6ec;
  font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none;
}

.p-text { min-width: 0; }
.p-text h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.p-text p { margin: 0 0 22px; font-size: clamp(15px, 1.25vw, 17px); max-width: 680px; }
.p-text .tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }

.detail-empty { margin: var(--gap) 0 40px; }

/* Efecto sutil al pasar el ratón: vídeo y carrusel se elevan un poco */
.p-final, .car-view { transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s ease; }
.car-view:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -26px rgba(0,0,0,.95); }
/* Vídeo final: resplandor lima suave por debajo al pasar el ratón */
/* Al pasar el ratón: la viñeta se hunde y debajo aparece una mancha de spray de color lima sólido */
.home-col::before, .p-final::before {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -44px; height: 90px; z-index: -1; pointer-events: none;
  background: url("assets/paint-stain.svg") center / 100% 100% no-repeat;
  opacity: 0; clip-path: inset(0 0 100% 0);
  transition: clip-path .7s cubic-bezier(.2,.7,.2,1), opacity .3s ease;
}
.home-col::after, .p-final::after { content: none; }
.home-col:hover::before, .p-final:hover::before { opacity: 1; clip-path: inset(0 0 0 0); }
.p-final video, .home-col img, .home-col video { transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .6s ease, box-shadow .6s ease; }
.p-final:hover video, .home-col:hover img, .home-col:hover video {
  transform: scale(.96); box-shadow: inset 0 0 70px rgba(0, 0, 0, .75);
}

/* Cursor: gota de agua (solo con ratón). Refracta el fondo con un filtro SVG y tiene brillo especular */
.cursor-blob {
  position: fixed; left: 0; top: 0; width: 34px; height: 34px; z-index: 40; pointer-events: none;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .28), rgba(191, 255, 0, .14) 55%, rgba(191, 255, 0, .08));
  box-shadow: inset 0 0 8px rgba(191, 255, 0, .55), inset -4px -6px 12px rgba(0, 0, 0, .16), 0 2px 10px rgba(0, 0, 0, .18);
  border: 1px solid rgba(191, 255, 0, .45);
  opacity: 0; transition: opacity .3s ease, width .35s cubic-bezier(.2,.7,.2,1), height .35s cubic-bezier(.2,.7,.2,1);
  will-change: transform, border-radius;
  backdrop-filter: blur(1px) saturate(1.35);          /* alternativa si el navegador no admite el filtro SVG */
  -webkit-backdrop-filter: blur(1px) saturate(1.35);
  backdrop-filter: url(#drop) saturate(1.35);          /* refracción tipo agua */
}
.cursor-blob::after {
  content: ""; position: absolute; left: 17%; top: 12%; width: 34%; height: 24%; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0) 70%);
  transform: rotate(-28deg); opacity: .9;
}
.cursor-blob.is-on { opacity: 1; }
.cursor-blob.is-hover { width: 64px; height: 64px; }

/* ---------- Sobre y Contacto ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 56px; align-items: start; }
.about-photo { margin: 0; }
.about-bio { margin-top: 28px; }
.about-bio p { font-size: clamp(15px, 1.2vw, 17px); line-height: 1.7; margin: 0 0 16px; color: var(--fg); }
.about-photo img { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .9); }
.prose { max-width: 760px; }
.prose p { font-size: clamp(17px, 1.6vw, 22px); line-height: 1.6; margin: 0 0 22px; color: var(--fg); }
.prose .muted { color: var(--muted); }
.link-list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--line); }
.link-list li { border-bottom: 1px solid var(--line); }
.link-list a {
  display: flex; justify-content: space-between; align-items: center; padding: 22px 16px;
  text-decoration: none; text-transform: uppercase; letter-spacing: .04em; font-size: clamp(18px, 2.4vw, 30px);
  font-family: "Syne", sans-serif; font-weight: 600; transition: background-color .25s, color .25s;
}
.link-list a:hover { background: var(--accent); color: var(--accent-fg); }
.link-list span { font-size: 14px; font-family: "Inter", sans-serif; font-weight: 400; color: inherit; opacity: .7; }

/* ---------- Pie ---------- */
.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 96px; padding: 28px var(--gutter); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--fg); }


/* ---------- Fotos ---------- */
.photo-group { margin-bottom: 72px; }
.group-title {
  margin: 0 0 var(--gap); padding-bottom: 16px; border-bottom: 1px solid var(--line);
  font-size: 12px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}
/* Rejilla con celdas 16:9 iguales: las fotos (también 16:9) ocupan toda la celda y los bordes quedan alineados */
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo { display: block; width: 100%; aspect-ratio: 16 / 9; margin: 0; padding: 0; border: 0; overflow: hidden; background: var(--card); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .4s ease; }
.photo:hover img { opacity: .85; }
@media (max-width: 899px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.page-title.is-collection { font-size: clamp(40px, 6vw, 96px); margin-bottom: 32px; }

/* Carrusel de fotos de una colección: proporción 16:9 y la foto completa */
.photo-carousel { height: auto; aspect-ratio: 16 / 9; }
/* Carrusel 3D: la foto central al frente y las laterales giran hacia el fondo */
.photo-carousel .car-view { perspective: 1400px; overflow: visible; background: transparent; }
.photo-carousel .car-stage { overflow: visible; background: transparent; transform-style: preserve-3d; cursor: grab; touch-action: pan-y; user-select: none; }
.photo-carousel.is-dragging .car-stage { cursor: grabbing; }
.photo-carousel .car-stage img {
  display: block; inset: auto; left: 50%; top: 50%; width: auto; height: auto;
  max-width: 70%; max-height: 92%; object-fit: contain; cursor: pointer; animation: none;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
  transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .9s ease;
  backface-visibility: hidden;
}
.photo-carousel .car-stage img.is-on { cursor: zoom-in; }
/* Marco de pintura: el borde aparece y la pintura chorrea hacia abajo, acelerando como por gravedad */
.paint-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 40; pointer-events: none; opacity: 0; transition: opacity .3s ease; }
.paint-frame.is-on { opacity: 1; }
/* Mancha de pintura igual que en los vídeos de la home: se revela de arriba abajo bajo la foto activa */
.photo-line { position: absolute; left: 4%; right: 4%; top: calc(100% - 14px); height: 80px; pointer-events: none;
  background: url("assets/paint-stain.svg") center / 100% 100% no-repeat; clip-path: inset(0 0 100% 0); opacity: 0; }
.paint-frame.is-on .photo-line { animation: stain-in .7s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes stain-in { to { clip-path: inset(0 0 0 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .paint-frame.is-on .photo-line { animation: none; clip-path: none; opacity: 1; } }
.photo-carousel .car-btn { z-index: 30; }

/* ---------- Órbita de proyectos ---------- */
.orbit { position: relative; height: clamp(400px, 60vh, 580px); margin: 0 0 8px; overflow: hidden; }
.orbit-stage { position: absolute; inset: 0; perspective: 1600px; transform-style: preserve-3d; }
.orbit-count { position: absolute; left: 0; top: 0; z-index: 300; pointer-events: none; color: var(--accent); font-family: Syne, sans-serif; font-weight: 700; font-size: clamp(22px, 2.4vw, 32px); line-height: 1; }
.orbit-count span { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; margin-left: 6px; }
.orbit-plane { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(-14deg); }
.orbit-card {
  position: absolute; left: 50%; top: 50%; width: clamp(165px, 17vw, 240px); aspect-ratio: 16 / 9;
  padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--card);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8);
  transition: transform .8s cubic-bezier(.2,.7,.2,1), opacity .8s ease;
}
.orbit-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.orbit-card.is-active { box-shadow: 0 0 0 2px var(--accent), 0 20px 40px -20px rgba(0, 0, 0, .8); }
.orbit-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 200;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font-size: 24px; line-height: 1; display: grid; place-items: center;
}
.orbit-btn:hover { border-color: var(--fg); }
.orbit-btn.prev { left: 0; }
.orbit-btn.next { right: 0; }
.orbit-info { text-align: center; max-width: 720px; margin: 8px auto 40px; }
.orbit-title { margin: 0 0 12px; font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.orbit-desc { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.orbit-link {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: var(--fg); border-bottom: 1px solid var(--line); padding-bottom: 4px;
}

/* ---------- Visor ---------- */
dialog { margin: 0; padding: 0; border: 0; color: #fff; background: transparent; }
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; background: #000; }
.viewer[open] { display: flex; align-items: center; justify-content: center; }
.viewer::backdrop { background: #000; }
.stage { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 64px 60px; }
.stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.icon-btn {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.12); color: #fff; font-size: 26px; line-height: 1;
  display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(255,255,255,.25); }
.nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.1); color: #fff; font-size: 34px; line-height: 1;
  display: grid; place-items: center;
}
.nav-btn:hover { background: rgba(255,255,255,.22); }
.nav-btn.prev { left: 14px; }
.nav-btn.next { right: 14px; }
.viewer-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 16px 20px; color: #cfcfd8; font-size: 14px;
  background: linear-gradient(0deg, rgba(0,0,0,.7), transparent);
}

/* ---------- Móvil ---------- */
@media (max-width: 899px) {
  :root { --header-h: 120px; }
  .site-header { grid-template-columns: 1fr auto; grid-template-rows: auto auto; row-gap: 12px; height: auto; padding: 16px var(--gutter); }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-self: start; gap: 22px; }
  .tools { grid-row: 1; grid-column: 2; }

  .home { overflow-x: clip; }
  .home-grid { display: block; position: relative; height: calc(86vw * 9 / 16 + 96px); min-height: 0; padding: 0; perspective: 1000px; transform-style: preserve-3d; touch-action: pan-y; user-select: none; }
  .home-col { position: absolute; left: 50%; top: 50%; width: 86vw; height: auto; aspect-ratio: 16 / 9; backface-visibility: hidden; transition: none; }
  .home-col::before { opacity: 1; clip-path: none; }  /* la franja de color siempre visible en móvil */
  .home-col img, .home-col video { transition: none; filter: brightness(.7) blur(var(--blur, 0px)); }
  .home-col::before { opacity: 1; clip-path: none; }  /* la franja de color siempre visible en móvil */
  .home { min-height: 0; padding-bottom: 40px; }
  .home-nav { position: relative; left: auto; right: auto; bottom: auto; transform: none; justify-content: center; padding: 16px var(--gutter) 0; color: var(--fg); }
  .hn-btn { border-color: var(--line); background: transparent; color: var(--fg); }
  .home-title { position: relative; top: auto; transform: none; padding: var(--gap) var(--gutter) 0; font-size: clamp(44px, 14vw, 90px); }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-photo { max-width: 300px; margin: 0 auto; }
  .home-intro { position: relative; left: auto; bottom: auto; padding: 40px var(--gutter) 0; max-width: none; text-align: left; clear: both; }

  .row { row-gap: 12px; }
  .row-tags { grid-column: 1 / -1; justify-content: flex-start; }
  .preview { display: none; }

  .detail-hero { height: auto; min-height: 80svh; }
  .detail-title { font-size: clamp(30px, 10vw, 64px); }
  .media-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .p-final { height: auto; aspect-ratio: 16 / 9; }
  .p-carousel { height: auto; aspect-ratio: 16 / 9; }
  .car-btn { width: 40px; height: 40px; font-size: 26px; }
  .media-row.no-video .p-carousel { aspect-ratio: 4 / 3; }

  .stage { padding: 52px 6px 64px; }
  .nav-btn { width: 42px; height: 42px; font-size: 28px; }
  .nav-btn.prev { left: 6px; }
  .nav-btn.next { right: 6px; }
}

/* ---------- Ajustes móviles (responsive) ---------- */
@media (max-width: 899px) {
  .nav { flex-wrap: wrap; justify-content: flex-start; gap: 8px 18px; }
  .nav a { letter-spacing: .12em; font-size: 11px; }
  .home-title { font-size: clamp(28px, 10.2vw, 80px); }
  .page-title { font-size: clamp(40px, 12vw, 120px); }
  .photo-carousel { overflow: hidden; }
  .photo-carousel .car-stage img { max-width: 84%; max-height: 96%; }
  .page-title { overflow-wrap: anywhere; }
  .page-title.is-collection { font-size: clamp(34px, 10vw, 60px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .cursor-blob { display: none; }
}
