/* =========================================================
   DANY TORRES + REGA HOUSE
   Sistema: una tipografía, dos pesos, tres valores de color.
   ========================================================= */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6f6f6f;
  --line: #ececec;
  --tile: #efefef;
  --splash-bg: #a49c32;
  --splash-ink: #f7f1e5;

  --font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;

  --nav-h: 58px;
  --footer-h: 52px;
  --gap: 4px;
  --pad: 20px;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

::selection {
  background: var(--fg);
  color: var(--bg);
}

/* ---------- Idioma ---------- */

html[data-lang="en"] .es,
html:not([data-lang="en"]) .en {
  display: none;
}

/* ---------- Micro tipografía ---------- */

.micro,
.site-header nav a,
.row-note,
.meta dt,
.tile-caption,
.label,
.strip-hint,
.media-toggle,
.case-index {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.3;
}

/* ---------- Marco fijo ---------- */

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  padding: 10px 14px;
  background: var(--fg);
  color: var(--bg);
  transform: translateY(-160%);
  font-size: 11px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: var(--bg);
}

.site-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 var(--pad);
  gap: 12px;
}

.site-header nav a {
  white-space: nowrap;
}

.site-header nav a.active {
  font-weight: 700;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.lang-switch span {
  color: var(--muted);
}

.lang-switch .on {
  color: var(--fg);
  font-weight: 700;
}

.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  height: var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.footer-mark {
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: opacity 0.2s ease;
}

.footer-mark:hover {
  opacity: 0.5;
}

/* Marca en el header: solo visible cuando el nav se colapsa en móvil */
.header-mark {
  display: none;
  position: absolute;
  top: 50%;
  right: var(--pad);
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  position: absolute;
  top: 50%;
  left: var(--pad);
  transform: translateY(-50%);
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

main {
  padding-top: calc(var(--nav-h) + 8px);
  padding-bottom: calc(var(--footer-h) + 40px);
}

[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

/* ---------- Cortina ---------- */

#splash {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--splash-bg);
  color: var(--splash-ink);
  overflow: hidden;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.splash-lock {
  overflow: hidden;
}

.splash-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  font-size: clamp(12px, 1.25vw, 17px);
  text-transform: lowercase;
}

.splash-video {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.splash-video video {
  max-width: min(46vw, 700px);
  max-height: 42vh;
  width: auto;
  height: auto;
}

.splash-enter {
  position: absolute;
  top: 36%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  margin: 0;
  color: var(--splash-ink);
  font-size: clamp(11px, 1.05vw, 15px);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  pointer-events: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.6);
}

.splash-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  overflow: hidden;
  text-align: center;
  color: var(--splash-ink);
}

.name-line {
  display: block;
  width: max-content;
  margin: 0 auto;
  font-size: 120px;
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  transform-origin: bottom center;
  will-change: transform;
}

/* ---------- Filas de trabajo ---------- */

.work-row {
  margin-bottom: 72px;
}

.row-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 0 var(--pad);
  margin: 0 0 14px;
}

.row-head h2,
.row-head .h2 {
  margin: 0;
  font-size: clamp(38px, 7vw, 92px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.row-note {
  color: var(--muted);
}

/* rompe cualquier contenedor: de borde a borde */
.bleed {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
}

.bleed + .bleed {
  margin-top: var(--gap);
}

/* ---------- Tira ---------- */

.strip {
  display: flex;
  gap: var(--gap);
  --visible: 5;
  --start: 0;
  transform: translateX(calc(-1 * var(--start) *
    ((100% - (var(--visible) - 1) * var(--gap)) / var(--visible) + var(--gap))));
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile {
  position: relative;
  flex: 0 0 calc((100% - (var(--visible) - 1) * var(--gap)) / var(--visible));
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--tile);
  border: 0;
  padding: 0;
  cursor: pointer;
  display: block;
}

.strip.ratio-wide .tile {
  aspect-ratio: 16 / 9;
}

.strip.ratio-story .tile {
  aspect-ratio: 9 / 16;
}

.tile:not([data-title]) {
  cursor: default;
}

.tile img,
.tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile:hover img,
.tile:hover video {
  transform: scale(1.04);
}

.tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 10px 12px;
  text-align: left;
  color: #fff;
  background: linear-gradient(to top, rgba(17, 17, 17, 0.55), rgba(17, 17, 17, 0));
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tile:hover .tile-caption,
.tile:focus-visible .tile-caption {
  opacity: 1;
  transform: translateY(0);
}

.strip-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: #fff;
  font-family: Didot, "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 1px 5px rgba(0, 0, 0, 0.65));
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.strip-arrow:hover {
  transform: translateY(-50%) scale(1.15);
}

.strip-arrow.next {
  right: 8px;
}

.strip-arrow.prev {
  left: 8px;
}

.strip-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---------- Film a sangre ---------- */

.film {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  background: #0d0d0d;
  overflow: hidden;
}

.film video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Film vertical: no se recorta a 16/9, se centra sobre el papel del sitio */
.film-portrait {
  background: var(--bg);
}

.film-portrait video {
  aspect-ratio: auto;
  width: auto;
  max-height: 70vh;
  margin: 0 auto;
  object-fit: contain;
}

.film-portrait .media-toggle {
  color: var(--fg);
  filter: none;
}

.media-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 5;
  border: 0;
  background: none;
  padding: 6px 2px;
  cursor: pointer;
  color: #fff;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
}

/* ---------- Lightbox ---------- */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

#lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.62);
}

#lightbox-content {
  position: relative;
  z-index: 1;
  width: min(74vw, 460px);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#lightbox.open #lightbox-content {
  transform: scale(1);
}

#lightbox-media {
  display: block;
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  background: var(--tile);
}

#lightbox-caption {
  background: var(--bg);
  padding: 12px 14px;
}

#lightbox-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#lightbox-sub,
#lightbox-services {
  display: block;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

#lightbox-services {
  text-transform: none;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

#lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
  border: 0;
  background: none;
  padding: 6px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.08em;
}

/* ---------- Declaración (contacto) ---------- */

.statement-wrap {
  padding: calc(var(--nav-h) + 28px) var(--pad) calc(var(--footer-h) + 48px);
}

.statement {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.statement p.big {
  margin: 0;
  font-size: clamp(26px, 3.9vw, 54px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  color: var(--muted);
}

.contact-block a {
  align-self: flex-start;
  font-size: 14px;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  align-items: baseline;
}

.contact-row a {
  font-size: 14px;
  font-weight: 700;
}

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

/* ---------- Caso / collage ---------- */

.case-lead {
  padding: 20px var(--pad) 26px;
  max-width: 62ch;
}

.case-index {
  color: var(--muted);
  margin: 0 0 10px;
}

.case-lead h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5.4vw, 74px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.case-lead p:not(.case-index) {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.collage {
  display: flex;
  align-items: flex-start;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  gap: 0;
}

.collage-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
}

.collage-item {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
}

/* Las imágenes empiezan como un fantasma y se descubren al pasar el cursor.
   Nunca queda una pantalla en blanco: si nadie las toca, se revelan solas. */
.collage-item img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.09;
  filter: grayscale(1);
  transition: opacity 0.6s ease, filter 0.6s ease,
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease;
  position: relative;
  z-index: 1;
}

.collage-item.revealed img {
  opacity: 1;
  filter: none;
}

.collage.all-revealed .collage-item:hover img {
  transform: scale(1.1);
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.26);
  z-index: 5;
}

.strip-hint {
  padding: 16px var(--pad) 0;
  color: var(--muted);
}

.case-block {
  padding: 60px 0 0;
}

.row-head-sm h2 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-transform: none;
}

.archive-note {
  margin: 20px 0 0;
  max-width: 52ch;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.contact-pair {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.byline-link {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.byline-link:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.case-system {
  padding: 60px var(--pad) 0;
}

.case-system h2,
.case-read h2 {
  margin: 0 0 22px;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
}

.format-grid div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.format-grid strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 5px;
}

.format-grid span {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.case-read {
  padding: 60px var(--pad) 0;
  max-width: 62ch;
}

.case-read p {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.doc-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.doc-link {
  font-size: 13px;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 1px;
}

.credits {
  padding: 60px var(--pad) 0;
}

.credits h2 {
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 30px;
  margin: 0;
  max-width: 1100px;
}

.meta dt,
.meta dd {
  margin: 0;
}

.meta dt {
  color: var(--muted);
  margin-bottom: 4px;
}

.meta dd {
  font-size: 13px;
}

/* ---------- Nosotros ---------- */

.about-lead {
  padding: 22px var(--pad) 40px;
  max-width: 1100px;
}

.about-lead .big {
  margin: 0 0 22px;
  font-size: clamp(28px, 4.4vw, 62px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.022em;
}

.about-intro {
  margin: 0;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  padding: 0 var(--pad);
  align-items: start;
}

.duo-person figure {
  margin: 0 0 18px;
  overflow: hidden;
  background: var(--tile);
}

/* A su proporción real: son tomas documentales verticales, no retratos
   de estudio; recortarlas a 4/5 les corta la cara. */
.duo-person img {
  width: 100%;
  height: auto;
}

.duo-person h2 {
  margin: 0 0 4px;
  font-size: clamp(26px, 3.2vw, 44px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.duo-role {
  margin: 0 0 16px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.duo-person p:not(.duo-role) {
  margin: 0 0 14px;
  max-width: 46ch;
  font-size: 14px;
  line-height: 1.68;
}

.about-block {
  padding: 60px var(--pad) 0;
}

.about-block h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.about-copy {
  max-width: 62ch;
}

.about-copy p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.7;
}

.about-block .doc-links {
  margin-top: 22px;
}

@media (max-width: 720px) {
  .duo {
    grid-template-columns: 1fr;
    gap: 44px;
  }
}

/* ---------- Artículo ---------- */

.article {
  padding: 24px var(--pad) 0;
}

.article-head {
  max-width: 66ch;
  margin-bottom: 30px;
}

.article-head h1 {
  margin: 8px 0 12px;
  font-size: clamp(38px, 6.4vw, 88px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.article-deck {
  margin: 0 0 10px;
  font-size: clamp(17px, 2vw, 25px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.article-byline {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.article figure {
  margin: 0 0 var(--gap);
}

.article-hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body {
  max-width: 64ch;
  padding: 36px 0 0;
}

.article-body h2 {
  margin: 36px 0 12px;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.article-body p {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.72;
}

.article-body .lead {
  font-size: clamp(18px, 2.1vw, 24px);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: -0.01em;
}

.article-closing {
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.article-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.article-pair img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 1;
}

.reveal.is-pending {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.reveal.is-pending.is-visible {
  opacity: 1;
}

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .strip {
    --visible: 3;
  }

  .strip.pair {
    --visible: 2;
  }
}

@media (max-width: 720px) {
  :root {
    --pad: 16px;
  }

  .site-header nav {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 6px var(--pad) 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .site-header nav.open {
    display: flex;
  }

  .site-header nav a {
    padding: 12px 0;
    font-size: 12px;
  }

  .lang-switch {
    padding: 12px 0;
    font-size: 12px;
  }

  .nav-toggle {
    display: block;
  }

  .header-mark {
    display: block;
  }

  .splash-top {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px var(--pad);
    font-size: clamp(15px, 4.6vw, 22px);
  }

  .splash-video video {
    max-width: 84vw;
    max-height: 38vh;
  }



  .strip {
    --visible: 2;
  }

  .strip.pair {
    --visible: 1;
  }

  .strip-arrow {
    display: none;
  }

  .collage-item img {
    opacity: 1;
    transition: none;
  }

  .collage.all-revealed .collage-item:hover img {
    transform: none;
    box-shadow: none;
  }

  .article-pair {
    grid-template-columns: 1fr;
  }

  .work-row {
    margin-bottom: 52px;
  }
}

@media (max-width: 480px) {
  .meta,
  .format-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal.is-pending {
    opacity: 1;
  }

  .collage-item img {
    opacity: 1;
  }
}
