:root {
  --bg: #0a151c;
  --bg-soft: #101e27;
  --gold: #b88f61;       /* antes #917151: más luz para que no se vea apagado */
  --gold-soft: #cbb9a6;
  --text: #ffffff;
  --muted: #9aa4aa;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", sans-serif;
  --header-h: 94px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
/* Texto para buscadores sin JavaScript: con JavaScript se monta la versión interactiva */
.js .static-fallback { display: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 0 32px;
}
.site-header .social { position: absolute; left: 32px; display: flex; gap: 14px; }
/* Mismo tamaño que la web de referencia: iconos sin círculo en una caja de 44 px */
.social a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-family: var(--sans); font-size: 14px; letter-spacing: .02em;
  transition: color .2s;
}
.social a:hover { color: var(--gold); }
.social svg { width: 34px; height: 34px; fill: currentColor; }
.social a[title="IMDb"] svg { width: 38px; height: 38px; } /* el logo lleva texto: algo más grande para que se lea */
.nav { display: flex; gap: 56px; text-transform: uppercase; font-size: 19px; }
.nav > li { position: relative; list-style: none; }
.nav { margin: 0; padding: 0; }
.nav a, .nav span { display: block; padding: 12px 0; cursor: pointer; transition: color .2s; white-space: nowrap; }
.nav a:hover, .nav span:hover, .nav .current > a { color: var(--gold); }
/* Opción activa: recuadro dorado como el de los reels; el margen negativo compensa el relleno para que el menú no se mueva */
.nav .current > a { border: 2px solid var(--gold); padding: 10px 14px; margin: 0 -16px; }
.nav .sub {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 190px; margin: 0; padding: 10px 22px;
  background: var(--bg); border-top: 1px solid var(--gold);
  text-align: center; font-size: 13px;
  opacity: 0; visibility: hidden; transition: opacity .2s;
}
.nav li:hover .sub, .nav li:focus-within .sub { opacity: 1; visibility: visible; }
.nav .sub li { list-style: none; }
.nav-toggle { display: none; }
.lang { position: absolute; right: 32px; display: flex; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; overflow: hidden; }
.lang button { padding: 6px 14px; font-family: var(--sans); font-size: 15px; letter-spacing: .12em; color: rgba(255, 255, 255, .75); transition: background .2s, color .2s; }
.lang button:hover { color: #fff; }
.lang button.on { background: var(--gold); color: var(--bg); cursor: default; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: calc(100vh - var(--header-h)); min-height: 520px;
  background: var(--bg-soft) center / cover no-repeat;
  display: flex; align-items: flex-end; justify-content: center;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(10, 21, 28, .75)); }
.hero-text { position: relative; z-index: 1; padding: 0 24px 9vh; text-align: center; }
.hero h1 {
  margin: 0; font-weight: 400; line-height: 1.1;
  font-size: clamp(44px, 7.2vw, 102px); letter-spacing: .04em;
}
.hero h1 span { display: inline-block; margin: 0 .05em; } /* + el espacio real entre palabras; margen simétrico para que quede centrado */
.hero .rule { width: min(560px, 60vw); height: 1px; background: rgba(255, 255, 255, .7); margin: 22px auto 18px; }
.hero p {
  margin: 0; font-family: var(--sans); font-weight: 300;
  font-size: clamp(15px, 1.5vw, 21px); letter-spacing: .2em; color: #e9dfd4;
}

/* ---------- Sections ---------- */
.section { padding: 70px 0 90px; }
.section-head { text-align: center; margin-bottom: 56px; padding: 0 24px; }
.section-head h2 {
  margin: 0; font-weight: 400; color: var(--gold);
  font-size: clamp(32px, 3.7vw, 52px); letter-spacing: .06em; text-transform: uppercase; line-height: 1.3;
}
.section-head p {
  margin: 22px 0 0; font-family: var(--sans); font-weight: 300;
  font-size: 20px; letter-spacing: .06em; color: var(--gold);
}

/* ---------- Project grid / slider ---------- */
.slider { position: relative; overflow: hidden; }
.slider-track { display: flex; transition: transform .6s ease; }
.grid { flex: 0 0 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid.static { padding: 0 14px; }
.tile { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-soft); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.tile .cap {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22px; background: linear-gradient(transparent 40%, rgba(10, 21, 28, .88));
  opacity: 0; transition: opacity .3s;
}
.tile:hover img { transform: scale(1.05); }
.tile:hover .cap, .tile:focus-visible .cap { opacity: 1; }
.tile .cap b { font-weight: 400; font-size: 23px; line-height: 1.3; }
.tile .cap i { font-style: normal; font-family: var(--sans); font-weight: 300; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); margin-top: 6px; }
.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 46px; height: 70px; font-size: 40px; line-height: 1; color: #fff;
  text-shadow: 0 0 12px rgba(0, 0, 0, .8); opacity: .8;
}
.slider-arrow:hover { opacity: 1; color: var(--gold-soft); }
.slider-arrow.prev { left: 24px; }
.slider-arrow.next { right: 24px; }
.dots { display: flex; justify-content: center; gap: 12px; margin-top: 28px; }
.dots button { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .35); }
.dots button.on { background: var(--gold); }

/* ---------- Video ---------- */
.video {
  position: relative; display: block; width: 100%;
  background: #2d2d2d center / cover no-repeat; overflow: hidden;
}
.video.band { height: min(42vw, 640px); }
.reel-frame { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 10px; border: 2px solid var(--gold); }
.reel-frame iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
.video.ratio { aspect-ratio: 16 / 9; }
.video::after { content: ""; position: absolute; inset: 0; background: rgba(10, 21, 28, .25); transition: background .3s; }
.video:hover::after { background: rgba(10, 21, 28, .1); }
.video .play {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 10px 26px; border: 1px solid #fff; font-size: 21px; white-space: nowrap;
  background: rgba(10, 21, 28, .35);
}
.video .label {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 14px 18px;
  font-family: var(--sans); font-weight: 300; font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(transparent, rgba(10, 21, 28, .85)); text-align: left;
}
.video.playing::after, .video.playing .play, .video.playing .label { display: none; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 14px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: min(40%, 497px) 1fr; gap: 60px; max-width: 1380px; margin: 0 auto; padding: 0 24px; align-items: start; }
.about .photos { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg-soft); }
.about .photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: 0; transition: opacity 1.2s ease; }
.about .photos img.on { opacity: 1; }
.about .hobbies { margin-top: 26px; }
.about .hobbies h4 { margin: 0 0 14px; font-weight: 400; font-size: 24px; color: var(--gold); }
.about .hobbies ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.about .hobbies li { padding: 5px 16px; border: 1px solid rgba(184, 143, 97, .6); border-radius: 999px; font-family: var(--sans); font-weight: 300; font-size: 16px; letter-spacing: .08em; }
.about h3 { margin: 0 0 18px; font-weight: 400; font-size: 36px; color: var(--gold); }
.about p { margin: 0 0 16px; font-size: 18px; max-width: 780px; }
.about p a { color: var(--gold); border-bottom: 1px solid rgba(184, 143, 97, .6); }
.about p a:hover { color: var(--gold-soft); }
.about .contact { margin-top: 26px; }
.about .contact a { border-bottom: 1px solid var(--gold); }
.about .contact a:hover { color: var(--gold-soft); }
.about .resume { margin-top: 22px; }
.about .resume-label { display: block; margin-bottom: 12px; font-family: var(--sans); font-weight: 400; font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); }
.about .resume-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.about .contact a.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border: 1px solid var(--gold); border-radius: 2px;
  background: var(--gold); color: var(--bg);
  font-family: var(--sans); font-weight: 400; font-size: 17px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.about .contact a.btn:hover { background: transparent; color: var(--gold); }
.about .contact a.btn svg { width: 19px; height: 19px; fill: currentColor; }
.about .links { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 26px; font-family: var(--sans); font-weight: 300; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; }
.about .links a:hover { color: var(--gold); }

/* ---------- Project page ---------- */
.project { max-width: 1280px; margin: 0 auto; padding: 60px 24px 100px; }
.project .back { font-family: var(--sans); font-weight: 300; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-soft); }
.project .back:hover { color: #fff; }
.project h1 { margin: 34px 0 8px; font-weight: 400; color: var(--gold); font-size: clamp(30px, 3.4vw, 48px); line-height: 1.25; }
.project .meta { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 22px 0 30px; padding: 18px 0; border-top: 1px solid rgba(184, 143, 97, .4); border-bottom: 1px solid rgba(184, 143, 97, .4); font-family: var(--sans); font-weight: 300; font-size: 17px; }
.project .meta dt { letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-size: 14px; }
.project .meta dd { margin: 0; }
.project .desc { max-width: 860px; font-size: 18px; white-space: pre-line; margin-bottom: 44px; }
.project .desc a { color: var(--gold); border-bottom: 1px solid rgba(184, 143, 97, .6); word-break: break-word; }
.project .desc a:hover { color: var(--gold-soft); }
.project .media { display: grid; gap: 22px; }
.project .media img, .project .media video { width: 100%; height: auto; }
/* Carrusel de fotos dentro de un proyecto */
.project .media .slides { display: grid; gap: 10px; }
.project .media .slides-stage { position: relative; display: grid; background: #000; border: 2px solid var(--gold); }
.project .media .slides-stage img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .4s ease; pointer-events: none; }
.project .media .slides-stage img.on { opacity: 1; pointer-events: auto; }
.project .media .slides-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold); color: var(--bg); opacity: .85; transition: opacity .2s;
}
.project .media .slides-arrow:hover { opacity: 1; }
.project .media .slides-arrow svg { width: 24px; height: 24px; fill: currentColor; }
.project .media .slides-arrow.prev { left: 14px; }
.project .media .slides-arrow.next { right: 14px; }
.project .media .slides .count { text-align: right; font-family: var(--sans); font-size: 15px; letter-spacing: .1em; color: var(--muted); }
/* Secuencia animada dentro de un proyecto: las imágenes se superponen y se funden */
.project .media .seq { position: relative; display: grid; }
.project .media .seq img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .7s ease; pointer-events: none; }
.project .media .seq img.on { opacity: 1; pointer-events: auto; }
/* Galería (escultura): fotos de móvil en columnas, más pequeñas; clic para verlas a tamaño completo */
.project .media.gallery { display: block; columns: 3 300px; column-gap: 16px; }
.project .media.gallery a { display: block; margin-bottom: 16px; break-inside: avoid; }
.project .media.gallery img { transition: opacity .2s; }
.project .media.gallery a:hover img { opacity: .85; }
.project .ext { display: inline-block; margin-top: 40px; border-bottom: 1px solid var(--gold); font-size: 18px; }

/* Escultura: resultado final fijo + animación del proceso */
.process-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 1100px; }
.process-pair figure { margin: 0; }
.process-pair .frame { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--bg-soft); border: 2px solid var(--gold); }
.process-pair .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.process-pair .anim img { opacity: 0; transition: opacity .7s ease; }
.process-pair .anim img.on { opacity: 1; }
.process-pair figcaption { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--sans); font-weight: 400; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.process-pair .count { color: var(--muted); letter-spacing: .08em; }
/* Fotos extra debajo, a todo el ancho y sin recortar */
.process-pair .extra.wide { grid-column: 1 / -1; }
.process-pair .extra .frame { aspect-ratio: auto; }
.process-pair .extra .frame img, .process-pair .extra .frame video { position: static; display: block; width: 100%; height: auto; }
/* Vídeos: el marco se ajusta al vídeo y los verticales no pasan del alto de la ventana */
.process-pair .extra.movie { display: flex; justify-content: center; }
.process-pair .extra.movie .frame { max-width: 100%; } /* el ancho lo fija main.js según la proporción del vídeo */

/* Visor de fotos */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(5, 10, 14, .94); }
.lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
.lightbox .lb-count { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-family: var(--sans); font-size: 14px; letter-spacing: .12em; color: var(--muted); }
.lightbox button { position: absolute; color: #fff; opacity: .8; transition: opacity .2s, color .2s; }
.lightbox button:hover { opacity: 1; color: var(--gold-soft); }
.lightbox .lb-close { top: 14px; right: 22px; font-size: 44px; line-height: 1; }
.lightbox .lb-nav { top: 50%; transform: translateY(-50%); width: 60px; height: 90px; font-size: 56px; }
.lightbox .lb-nav.prev { left: 10px; }
.lightbox .lb-nav.next { right: 10px; }

/* Barra superior de la ficha: volver + anterior / siguiente */
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.project-top .top-nav { display: flex; gap: 10px; }
.project-top .btn, .project-nav .btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; border: 1px solid var(--gold); border-radius: 2px;
  background: var(--gold); color: var(--bg);
  font-family: var(--sans); font-weight: 400; font-size: 16px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.project-top .btn.small { padding: 9px 16px; font-size: 14px; gap: 8px; }
.project-top .btn svg, .project-nav .btn svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.project-top .btn:hover, .project-nav a:hover .btn { background: transparent; color: var(--gold); }

/* Proyecto anterior / siguiente */
.project-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 70px; padding-top: 28px; border-top: 1px solid rgba(184, 143, 97, .4); }
.project-nav a { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 46%; }
.project-nav a.next { align-items: flex-end; text-align: right; margin-left: auto; }
.project-nav b { font-weight: 400; font-size: 19px; line-height: 1.3; color: var(--text); }
.project-nav a:hover b { color: var(--gold-soft); }

/* ---------- Footer ---------- */
.site-footer { padding: 60px 24px 70px; text-align: center; font-family: var(--sans); font-weight: 300; font-size: 14px; letter-spacing: .14em; color: var(--muted); }
.site-footer .social { justify-content: center; display: flex; gap: 10px; margin-bottom: 22px; color: #fff; }

/* ---------- Responsive ---------- */
/* Menú de 6 opciones: se reduce el espacio y, por debajo de 1100 px, pasa al botón MENU */
@media (max-width: 1440px) {
  .nav { gap: 42px; } /* evita que el menú pise los iconos de redes */
}
@media (max-width: 1360px) {
  .site-header .social { display: none; } /* los iconos de redes siguen en el pie */
  .nav { gap: 38px; }
}
@media (max-width: 1100px) {
  .site-header { justify-content: flex-end; }
  .nav-toggle { display: block; font-family: var(--sans); font-size: 16px; letter-spacing: .16em; }
  .lang { position: static; margin-right: 20px; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); padding: 8px 16px 20px; text-align: center; display: none;
  }
  .nav.open { display: flex; }
  .nav .current > a { display: inline-block; margin: 4px auto; } /* en el desplegable, el recuadro se ajusta al texto */
  .nav .sub { position: static; transform: none; opacity: 1; visibility: visible; border: 0; padding: 0; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .site-header { justify-content: flex-end; padding: 0 16px; }
  .nav-toggle { display: block; font-family: var(--sans); font-size: 16px; letter-spacing: .16em; }
  .lang { position: static; margin-right: 20px; }
  .lang button { padding: 5px 11px; font-size: 13px; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); padding: 8px 16px 20px; text-align: center; display: none;
  }
  .nav.open { display: flex; }
  .nav .sub { position: static; transform: none; opacity: 1; visibility: visible; border: 0; padding: 0; }
  .hero { align-items: flex-end; background-position: 47% center; }
  .hero::after { background: linear-gradient(transparent 35%, rgba(10, 21, 28, .85)); }
  .hero-text { padding: 0 16px 44px; }  /* centrado y abajo, como en escritorio */
  .section { padding: 50px 0 60px; }
  .section-head { margin-bottom: 34px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .grid.static, .reel-grid { padding: 0 8px; }
  .reel-grid { grid-template-columns: 1fr; }
  .tile .cap { opacity: 1; padding: 12px; }
  .tile .cap b { font-size: 16px; }
  .tile .cap i { font-size: 12px; }
  .section-head p { font-size: 17px; }
  .about p, .project .desc { font-size: 17px; }
  .slider-arrow.prev { left: 4px; }
  .slider-arrow.next { right: 4px; }
  .video.band { height: auto; aspect-ratio: 16 / 9; }
  .reel-frame { width: calc(100% - 24px); padding: 5px; }
  .about { grid-template-columns: 1fr; gap: 30px; padding: 0 16px; }
  .project { padding: 36px 16px 70px; }
  .process-pair { grid-template-columns: 1fr; gap: 24px; }
  .project .media .slides-arrow { width: 38px; height: 38px; }
  .project .media .slides-arrow.prev { left: 8px; }
  .project .media .slides-arrow.next { right: 8px; }
  .project-nav b { font-size: 15px; }
  .project-nav .btn { padding: 11px 16px; font-size: 14px; gap: 8px; }
  .project-top .btn { padding: 10px 14px; font-size: 13px; }
  .project-top .btn.small .lbl { display: none; }
  .lightbox .lb-nav { width: 44px; font-size: 44px; }
}
