/* ============================================================
   FIEBRE — estudio creativo
   blanco absoluto · #ff1700 con moderación · la imagen manda
   logo: imagen de marca (Horizon de Canva) — no se recompone en CSS
   ============================================================ */

:root {
  --red: #ff1700;
  --ink: #111111;
  --bg: #ffffff;
  --grey: #9b9b9b;
  --font-text: "Helvetica Neue", Helvetica, "Pragmatica", Arial, sans-serif;
  --pad: clamp(16px, 2.5vw, 40px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

::selection { background: var(--red); color: #fff; }

a { color: inherit; text-decoration: none; transition: color 0.4s var(--ease), opacity 0.4s var(--ease); }
a:hover { color: var(--red); }

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

/* título display: Helvetica ultra bold, como en las plantillas de marca */
.dt {
  font-family: var(--font-text);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

/* ---------- navegación ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(var(--pad) * 0.6) var(--pad);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav__logo img {
  width: auto;
  display: block;
  transition: opacity 0.4s var(--ease), filter 0.4s var(--ease);
}

.nav__logo .star { height: 30px; }
.nav__logo .word { height: 14px; }
.nav__logo:hover img { opacity: 0.65; }

/* nav clara mientras el video destacado ocupa la pantalla:
   se cambian las imágenes por sus versiones blancas vía JS */
.nav--light .nav__links a { color: #fff; }
.nav--light .nav__links a:hover, .nav--light .nav__links a.is-active { color: var(--red); }

/* placa del logo tras el video destacado */
.logoplate {
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14vh var(--pad) 6vh;
}

.logoplate__inner { width: min(72vw, 1040px); }

.nav__links {
  display: flex;
  gap: clamp(18px, 3vw, 44px);
  list-style: none;
}

.nav__links a {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav__links a.is-active { color: var(--red); }
.nav__links a:hover { color: var(--red); }

/* ---------- destacado full-screen ---------- */

.featured {
  display: block;
  position: relative;
  height: 100vh; height: 100svh;
  overflow: hidden;
}

.featured video,
.featured img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured__caption {
  position: absolute;
  left: var(--pad);
  bottom: var(--pad);
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 14px;
  z-index: 3;
}

.featured__caption .t {
  font-size: clamp(18px, 2.6vw, 34px);
}

.featured__caption .m {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ---------- feed de proyectos (home) ---------- */

.feed {
  padding: 24vh 0 14vh;
}

.feed__intro {
  padding: 0 var(--pad) 20vh;
  text-align: center;
  font-weight: 700;
  color: var(--red);
  font-size: clamp(22px, 3.6vw, 52px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-indent: 0.32em; /* compensa el tracking para centrar de verdad */
}

.piece {
  display: block;
  margin: 0 auto 24vh;
  width: min(82vw, 1280px);
}

.piece:nth-child(even) {
  width: min(62vw, 900px);
}

.piece:nth-child(3n) { transform: translateX(4vw); }
.piece:nth-child(3n + 1) { transform: translateX(-2vw); }

.piece .media { width: 100%; }

.piece__info {
  display: flex;
  justify-content: center;
  padding-top: 14px;
}

.piece__title {
  font-size: clamp(13px, 1.3vw, 19px);
  transition: color 0.4s var(--ease);
}

.piece:hover .piece__title { color: var(--red); }

/* poema al final de los videos */
.verses {
  margin: 30vh auto 10vh;
  padding: 0 var(--pad);
  max-width: 30em;
  text-align: center;
  font-size: clamp(18px, 2.4vw, 34px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--red);
}

.verses p + p { margin-top: 0.5em; }

/* ---------- contenedor media + efecto pixelado ---------- */

.media {
  position: relative;
  overflow: hidden;
  background: #f4f4f4;
}

.media::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.media--portrait::before { padding-top: 133.33%; }

/* proporción natural (series/publicaciones) —
   .media.media--auto para ganarle a la regla .media > img de abajo */
.media.media--auto::before { display: none; }
.media.media--auto > img {
  position: static;
  width: 100%;
  height: auto;
  object-fit: unset;
}

.media > img,
.media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media > canvas.pix {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: 1;
}
.media > canvas.pix.is-done {
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

/* ---------- páginas genéricas ---------- */

.page {
  min-height: 100vh;
  padding: 22vh var(--pad) 16vh;
}

.page__title {
  font-size: clamp(34px, 6.5vw, 100px);
  color: var(--red);
  margin-bottom: 10vh;
}

/* ---------- archivo: grid de miniaturas ---------- */

.agrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 44vw), 1fr));
  gap: 7vh 24px;
}

.agrid__item { display: block; }

.agrid__title {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: baseline;
  padding-top: 12px;
  text-align: center;
  font-size: 12px;
  transition: color 0.35s var(--ease);
}

.agrid__type {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--grey);
  text-transform: uppercase;
}

.agrid__item:hover .agrid__title { color: var(--red); }

/* ---------- página de proyecto ---------- */

.project__head {
  padding: 24vh var(--pad) 8vh;
  text-align: center;
}

.project__title {
  font-size: clamp(32px, 7.5vw, 120px);
  color: var(--red);
}

.project__meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding-top: 3.5vh;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
}

.project__player {
  width: min(92vw, 1500px);
  margin: 0 auto;
}

/* barra de reproducción */
.scrub {
  position: relative;
  height: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.scrub::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #e4e4e4;
  transition: height 0.25s var(--ease);
}

.scrub__fill {
  position: absolute;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--red);
  transition: height 0.25s var(--ease);
  z-index: 1;
}

.scrub:hover::before, .scrub:hover .scrub__fill { height: 5px; }

.project__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ctrl-btn {
  background: none;
  border: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.3s var(--ease);
  padding: 8px 0;
}
.ctrl-btn:hover, .ctrl-btn.is-on { color: var(--red); }

.time { color: var(--grey); font-variant-numeric: tabular-nums; }

/* serie de imágenes */
.project__pages {
  width: min(88vw, 1200px);
  margin: 0 auto;
}

.project__pages .media { margin-bottom: 5vh; }

/* cuento como libro abierto: pliegos de dos páginas */
.project__pages--book { width: min(94vw, 1560px); }

.spread {
  display: flex;
  margin-bottom: 5vh;
}

.spread .media {
  width: 50%;
  margin-bottom: 0;
}

.project__nav {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16vh var(--pad) 0;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(13px, 1.7vw, 24px);
}

/* ---------- about ---------- */

.about__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--pad);
  align-items: center;
}

.about__text {
  font-size: clamp(15px, 1.45vw, 21px);
  line-height: 1.65;
  max-width: 32em;
}

.about__text p + p { margin-top: 1.4em; }

.about__star { width: min(34vw, 460px); margin: 0 auto; }

/* perfiles */
.profiles {
  margin-top: 18vh;
}

.profiles__label {
  padding: 20px 0 10px;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey);
}

.profile { border: 0; }

.profile__head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 26px 0;
  background: none;
  border: 0;
  font-family: var(--font-text);
  cursor: pointer;
  text-align: left;
}

.profile__name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(20px, 3vw, 44px);
  color: var(--red);
  transition: opacity 0.35s var(--ease);
}

.profile__head:hover .profile__name { opacity: 0.7; }

.profile__plus {
  font-size: 20px;
  color: var(--grey);
  transition: transform 0.5s var(--ease), color 0.35s var(--ease);
}

.profile.is-open .profile__plus { transform: rotate(45deg); color: var(--red); }

.profile__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s var(--ease);
}

.profile__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--pad);
  padding: 0 0 40px;
}

.profile__bio {
  font-size: 14px;
  line-height: 1.7;
  max-width: 34em;
  color: var(--ink);
}

.profile__bio .placeholder { color: var(--grey); font-style: italic; }

.profile__projects { list-style: none; }

.profile__projects .lbl {
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey);
  padding-bottom: 10px;
}

.profile__projects a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  padding: 4px 0;
  font-size: 13px;
}

.profile__projects .date {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  white-space: nowrap;
}

/* ---------- contact ---------- */

.contact__mail {
  display: inline-block;
  font-weight: 700;
  font-size: clamp(18px, 3.4vw, 54px);
  letter-spacing: -0.02em;
  margin-bottom: 12vh;
  word-break: break-all;
}

.contact__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--pad);
  align-items: center;
}

.contact__star {
  width: min(26vw, 380px);
  margin: 0 auto;
  transform: rotate(8deg);
  transition: transform 0.8s var(--ease);
}

.contact__star:hover { transform: rotate(-4deg) scale(1.04); }

.contact__star img { width: 100%; }

.form { max-width: 720px; }

.form__row { margin-bottom: 34px; }

.form label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 6px;
}

.form input,
.form textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #dcdcdc;
  background: none;
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--ink);
  padding: 8px 0 10px;
  border-radius: 0;
  transition: border-color 0.35s var(--ease);
}

.form textarea { resize: vertical; min-height: 110px; }

.form input:focus,
.form textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
}

.form__send {
  margin-top: 10px;
  background: none;
  border: 0;
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: color 0.3s var(--ease);
  padding: 10px 0;
}
.form__send:hover { color: var(--red); }

/* ---------- marquee TODOS TIENEN FIEBRE ---------- */

.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  border-top: 1px solid #eee;
  user-select: none;
}

.marquee__track {
  display: inline-block;
  animation: marquee 40s linear infinite;
}

.marquee span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red);
  padding-right: 3em;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- footer ---------- */

.footer {
  padding-top: 10vh;
}

.footer__links {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 var(--pad) 6vh;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer__links .group { display: flex; gap: clamp(16px, 3vw, 40px); }

/* la estrella es lo fundamental */
.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6vh var(--pad) 7vh;
}

.footer__star {
  width: min(38vw, 440px);
  display: block;
}

.footer__star img {
  width: 100%;
  display: block;
  transition: transform 0.8s var(--ease);
}

.footer__star:hover img { transform: rotate(-5deg); }

.footer__logo {
  display: block;
  width: min(26vw, 320px);
  margin-top: 4vh;
}

.footer__logo img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.4s var(--ease);
}

.footer__logo:hover img { opacity: 0.8; }

/* ---------- reveal genérico al hacer scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .piece, .piece:nth-child(even) { width: calc(100vw - 2 * var(--pad)); }
  .piece:nth-child(3n), .piece:nth-child(3n + 1) { transform: none; }
  .about__grid, .profile__inner { grid-template-columns: 1fr; gap: 8vh; }
  .about__star { width: 60vw; }
  .agrid { grid-template-columns: 1fr 1fr; gap: 5vh 12px; }
  .nav__links { gap: 14px; }
  .nav__links a { font-size: 10px; letter-spacing: 0.1em; }
  .nav__logo { gap: 8px; }
  .nav__logo .star { height: 22px; }
  .nav__logo .word { height: 11px; }
  .contact__grid { grid-template-columns: 1fr; gap: 8vh; }
  .contact__star { width: 52vw; }
  .footer__star { width: 56vw; }
  .footer__logo { width: 42vw; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track { animation: none; }
}
