/* =========================================================
   tomás faranna — estilos
   Réplica de la web de Webflow, limpiada a mano.
   Colores principales:  fondo #f8f7f4  ·  texto/bordes #333
   ========================================================= */

/* ---------- Tipografías (los mismos archivos que subiste a Webflow) ---------- */
@font-face {
  font-family: "Nohemi";
  src: url("assets/fonts/69e8bb18e3bd26c67684f000_Nohemi-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Freight Text Pro";
  src: url("assets/fonts/69e8bbf866853e4e16eb7f83_FreightText-Pro-Book.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --bg: #f8f7f4;
  --ink: #333;
  --radius: 8px;
  --gap: 8px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100%;
  color: var(--ink); background: var(--bg);
  font-family: "Freight Text Pro", Tahoma, sans-serif;
  font-size: 14px; font-weight: 400; line-height: 20px;
  overflow: hidden; /* el scroll lo hace <main> (secciones con "snap") */
}
a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; vertical-align: middle; display: inline-block; border: 0; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
h1, h3 { font-family: Nohemi, Georgia, sans-serif; font-weight: 700; margin: 0; }
h3 { font-size: 22px; line-height: 30px; }

/* ---------- Cabecera ---------- */
.header {
  position: fixed; inset: 0 0 auto; z-index: 10;
  width: 100%; padding: 0 30px; background: var(--bg);
}
.header-content {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 20px 0; border-bottom: 2px solid var(--ink);
}
.logo { width: 300px; display: block; }
.h1 { font-size: 26px; line-height: 30px; }
.section-label { display: none; gap: 8px; align-items: center; }
.navtext { font-size: 16px; font-weight: 400; }
.navtext.mobile { font-size: 18px; }

.nav { display: none; gap: 8px; justify-content: center; align-items: center; }
.nav-item {
  display: flex; gap: 6px; justify-content: center; align-items: center;
  height: 40px; padding: 8px 12px; border: 1px solid var(--ink); border-radius: 20px;
}
.active-dots {
  display: block; width: 5px; height: 5px; border-radius: 20px;
  background: var(--ink); opacity: 0; transition: opacity .2s ease;
}
.nav-item:hover .active-dots,
.nav-item.is-current .active-dots { opacity: 1; }

.socials-container { display: none; gap: 8px; justify-content: flex-end; align-items: center; width: 300px; height: 40px; }
.socials {
  display: flex; justify-content: center; align-items: center;
  width: 40px; height: 40px; border: 1px solid var(--ink); border-radius: 20px;
}

.menu-btn {
  display: flex; justify-content: center; align-items: center;
  width: 40px; height: 40px; border: 1px solid var(--ink); border-radius: 20px; background: none;
}

/* Menú desplegable (tablet / móvil) */
.mobile-nav-expanded {
  position: absolute; inset: 0 0 auto auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 20px;
  width: 35%; height: 100vh; padding: 20px 30px;
  background: var(--bg); border-left: 1px solid var(--ink);
  transform: translateX(100%); transition: transform .4s ease;
  visibility: hidden;
}
.mobile-nav-expanded.is-open { transform: translateX(0); visibility: visible; }
.mobile-nav-expanded .header-content { justify-content: space-between; align-items: flex-end; padding: 11px 0 30px; border-bottom: 2px solid var(--ink); }
.mobile-nav-page { display: flex; gap: 12px; justify-content: flex-end; align-items: center; }
.mobile-nav { font-family: "Freight Text Pro", Tahoma, sans-serif; font-weight: 400; }
.active-dots.mobile-nav { opacity: 1; width: 6px; height: 6px; display: none; }
.mobile-nav-page.is-current .active-dots.mobile-nav { display: block; }
.socials-container.mobile-nav { display: flex; width: 100%; height: auto; padding-top: 20px; border-top: 2px solid var(--ink); }

/* ---------- Contenedor con scroll por secciones ---------- */
.main {
  position: relative; width: 100%; height: 100vh; height: 100dvh;
  overflow-y: auto; overflow-x: hidden;
  scroll-snap-type: y mandatory;
}
.section-block {
  width: 100%; height: 100vh; height: 100dvh; min-height: 100vh;
  padding: 70px 30px 20px;
  scroll-snap-align: start;
}
.content { width: 100%; height: 100%; margin-top: 20px; padding: 20px 0 80px; }

/* ---------- Rejilla base (16 x 16) ---------- */
.grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(16, 1fr);
  width: 100%; height: 100%; position: relative;
}
.grid.photo { grid-template-rows: repeat(21, 1fr); }

/* Bloques con imagen de fondo */
.tile {
  width: 100%; height: 100%; overflow: hidden; position: relative;
  border: 1px solid var(--ink); border-radius: var(--radius);
  background-position: 50% 50%; background-size: cover;
}
.tile.no-border { border: none; }

/* Vídeo de fondo en bucle (sin sonido) */
.bgvideo { position: relative; width: 100%; height: 100%; overflow: hidden; }
.bgvideo video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; background-size: cover; background-position: 50% 50%;
}

/* Reproductor de Vimeo con botón play/pausa propio */
.vimeo { position: absolute; inset: 0; background: #000; overflow: hidden; }
.vimeo iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.vimeo.vertical iframe { top: 50%; left: 50%; width: 177.78%; transform: translate(-50%, -50%); }
.vimeo-btn {
  position: absolute; left: 16px; bottom: 16px; z-index: 10;
  width: 40px; height: 40px; border-radius: 999px; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.vimeo-btn .icon-pause { display: none; }
.vimeo-btn.is-playing .icon-play { display: none; }
.vimeo-btn.is-playing .icon-pause { display: block; }

/* Bloques de texto */
.projectblock {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px;
  padding: 0 8%; border: 1px solid var(--ink); border-radius: var(--radius); overflow: hidden;
}
.heading3-block {
  display: flex; justify-content: center; align-items: center;
  width: 100%; height: 100%; padding: 0 20px;
  border: 1px solid var(--ink); border-radius: var(--radius);
}
.body-large { color: var(--ink); width: 100%; font-size: 22px; line-height: 24px; display: block; }
.heading-2 { font-size: 22px; font-weight: 500; line-height: 29px; }

/* ================= SECCIÓN 1 · HOME ================= */
.grid.home > * { grid-area: span 4 / span 4; }

/* ================= SECCIÓN 2 · DIRECTOR ================= */
#dir-ddci-reel   { grid-area: span 8 / span 8; }
#dir-metal-1     { grid-area: span 5 / span 5; background-image: url("assets/img/69e372a6da0254a61d2aaecf_Still-2026-04-11-121609_1.3.2.jpg"); }
#dir-metal-2     { grid-area: span 6 / span 3; background-image: url("assets/img/69e8cf0297ded4cdfadd1470_Still-2026-04-22-153305_1.24.1.jpg"); }
#dir-ddci-text   { grid-area: span 3 / span 5; }
#dir-metal-reel  { grid-area: span 10 / span 3; }
#dir-ddci-1      { grid-area: span 4 / span 4; background-image: url("assets/img/69e372c3ba9457d1d1d419df_17.jpg"); }
#dir-ddci-2      { grid-area: span 4 / span 4; background-image: url("assets/img/69e372c31b974fa98e8eb69b_4.jpg"); }
#dir-metal-text  { grid-area: span 3 / span 5; }
#dir-ddci-5      { grid-area: span 5 / span 5; background-image: url("assets/img/69e372c3f90390185c61332c_11.jpg"); }
#dir-ddci-3      { grid-area: span 4 / span 4; background-image: url("assets/img/69e372c31906d98ef9597cad_9.jpg"); }
#dir-ddci-4      { grid-area: span 4 / span 4; background-image: url("assets/img/69e372c4a48f2ccfdd024817_6.jpg"); }

/* ================= SECCIÓN 3 · ASSISTANT DIRECTOR ================= */
.ad-card { display: block; }
#ad-1 { grid-area: 1 / 1 / 9 / 8; }
#ad-2 { grid-area: 1 / 8 / 5 / 12; }
#ad-3 { grid-area: 1 / 12 / 6 / 17; }
#ad-4 { grid-area: 5 / 8 / 9 / 12; }
#ad-5 { grid-area: 6 / 12 / 11 / 17; }
#ad-6 { grid-area: 9 / 8 / 13 / 12; }
#ad-8 { grid-area: 11 / 12 / 17 / 17; }
.project-hover-preview {
  grid-area: 16 / 1 / 17 / 12;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  width: 100%; height: 100%; padding: 20px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.project-hover-preview.is-visible { opacity: 1; }

/* ================= SECCIÓN 4 · CINEMATOGRAPHER ================= */
#ph-1  { grid-area: span 8 / span 3; background-image: url("assets/img/69e3b810b77e334c368f5e44_9.jpg"); }
#ph-2  { grid-area: span 3 / span 3; background-image: url("assets/img/69e3b80fd69cc3b26a9e8e93_8.jpg"); }
#ph-3  { grid-area: span 5 / span 3; background-image: url("assets/img/69e3b810d4976e3c8a124c2d_20.jpeg"); }
#ph-feature-reel { grid-area: span 8 / span 7; }
#ph-5  { grid-area: span 7 / span 3; background-image: url("assets/img/69e3b6cdfaa121527e32196c_Still-2026-04-13-121335_1.8.1.jpg"); }
#ph-title-feature { grid-area: span 3 / span 3; place-self: center end; }
#ph-6  { grid-area: span 5 / span 3; background-image: url("assets/img/69e3b81036595639ceafd13a_16.jpg"); }
#ph-7  { grid-area: span 5 / span 4; background-image: url("assets/img/69e3bb8fd69cc3b26a9ec3ed_2.jpeg"); }
#ph-8  { grid-area: span 4 / span 3; background-image: url("assets/img/69e3bb8fc69419b8bdeb3a4e_16.jpg"); }
#ph-9  { grid-area: span 5 / span 3; background-image: url("assets/img/69e3bb8f9e9086206baa6034_18.jpg"); }
#ph-10 { grid-area: span 3 / span 3; background-image: url("assets/img/69e3b81036595639ceafd151_2.jpg"); }
#ph-11 { grid-area: span 6 / span 3; background-image: url("assets/img/69e3bb902d4d24ec5ac87ae6_15.jpg"); }
#ph-commercials-reel { grid-area: span 8 / span 7; }
#ph-title-commercials { grid-area: span 3 / span 3; place-self: center start; }
#ph-13 { grid-area: span 8 / span 3; background-image: url("assets/img/69e3bb8ffe8b0c928804b4b5_12.jpeg"); }
#ph-14 { grid-area: span 5 / span 3; background-image: url("assets/img/69e3bb90d8827e1cb340301f_7.jpg"); }
#ph-15 { grid-area: span 3 / span 3; background-image: url("assets/img/69e3bb9001295d7076dca4a5_9.jpg"); }

/* ================= SECCIÓN 5 · BIO ================= */
.grid.bio { display: flex; justify-content: space-between; align-items: stretch; gap: var(--gap); padding: 12% 16%; }
.bio-images {
  display: grid; gap: var(--gap); width: 100%; height: 100%;
  grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(8, auto);
}
#bio-large { grid-area: span 6 / span 6; background-image: url("assets/img/69e8df7596b983f9b3e2cb5b_000014-22.JPG"); }
.bio-images-3up { grid-area: span 2 / span 6; display: flex; gap: var(--gap); width: 100%; height: 100%; }
#bio-small-1 { background-image: url("assets/img/69e8dfb55e909c6dddd18fc8_DSCF3366.jpeg"); }
#bio-small-2 { background-image: url("assets/img/69e8df75a3411c9bd314b994_43340516-edfa-4480-8e2d-d905e862c728.JPG"); }
#bio-small-3 { background-image: url("assets/img/69e8e0da737ae32bfa653ea6_TUKI.jpg"); }
.bio-copy {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 20px;
  width: 100%; height: 100%; padding: 30px;
  border: 1px solid var(--ink); border-radius: var(--radius);
  overflow-y: auto; /* arreglo: antes el texto se salía de la caja en pantallas medianas */
}
.bio-title { display: flex; flex-direction: column; gap: 4px; }
.body-large.bio { font-size: 21px; }
.socials-container.bio { display: flex; justify-content: flex-start; width: auto; }

/* ---------- Botón flotante (siguiente sección / volver arriba) ---------- */
.footer { position: fixed; inset: auto 0 20px; z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.floating-scroll-button {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 40px; height: 40px; padding: 0; overflow: hidden;
  background: var(--ink); border-radius: 999px;
  transition: width .3s ease;
}
.floating-scroll-button-text {
  color: var(--bg); max-width: 0; opacity: 0; white-space: nowrap; overflow: hidden;
  transition: max-width .3s ease, opacity .2s ease;
}
.floating-scroll-button-icon { transition: transform .3s ease; }
.floating-scroll-button.is-last-section { width: 152px; }
.floating-scroll-button.is-last-section .floating-scroll-button-text { max-width: 152px; opacity: 1; }
.floating-scroll-button.is-last-section .floating-scroll-button-icon { transform: rotate(180deg); }

/* =========================================================
   PANTALLAS GRANDES (≥1280px): menú completo arriba
   ========================================================= */
@media (min-width: 1280px) {
  .socials-container { display: flex; }
  .navtext { font-size: 18px; }
  .nav { display: flex; }
  .menu-btn, .section-label, .mobile-nav-expanded { display: none; }
  .content { padding-top: 0; }
  .grid.bio { justify-content: center; max-width: 2500px; padding: 2% 22%; }
  .body-large.bio { font-size: 22px; line-height: 26px; }
}
@media (max-width: 1279px) {
  .section-label { display: flex; }
}

/* =========================================================
   TABLET (≤991px): la rejilla se hace más alta y se desplaza
   ========================================================= */
@media (max-width: 991px) {
  .grid { grid-template-rows: 1fr 1fr 1fr; grid-auto-rows: auto; justify-items: center; }
  .grid.home { grid-template-rows: repeat(32, auto); }
  .grid.director, .grid.ad-grid, .grid.photo { grid-template-rows: repeat(32, 1fr); }
  .grid.home > * { grid-area: span 4 / span 8; }

  #dir-ddci-reel  { grid-area: 1 / 1 / 10 / 17; }
  #dir-ddci-text  { grid-area: 10 / 1 / 14 / 11; }
  #dir-ddci-1     { grid-area: 10 / 11 / 14 / 17; }
  #dir-ddci-2     { grid-area: 14 / 1 / 18 / 9; }
  #dir-metal-reel { grid-area: 14 / 9 / 27 / 17; }
  #dir-ddci-5     { grid-area: 18 / 1 / 23 / 9; }
  #dir-metal-1    { grid-area: 23 / 1 / 27 / 9; }
  #dir-ddci-3, #dir-ddci-4 { display: none; }
  #dir-metal-2    { grid-area: 27 / 1 / 31 / 7; }
  #dir-metal-text { grid-area: 27 / 7 / 31 / 17; }
  .projectblock { width: 100%; height: 100%; padding: 0 6%; }

  #ad-1 { grid-area: span 8 / span 11; }
  #ad-2 { grid-area: span 8 / span 5; }
  #ad-3 { grid-area: span 8 / span 9; }
  #ad-4 { grid-area: span 8 / span 7; }
  #ad-5 { grid-area: span 8 / span 6; }
  #ad-6 { grid-area: span 8 / span 10; }
  #ad-8 { grid-area: span 8 / span 16; }
  .project-hover-preview { display: none; }

  #ph-1  { grid-area: span 3 / span 5; }
  #ph-2  { grid-area: span 3 / span 6; }
  #ph-3  { grid-area: span 3 / span 5; }
  #ph-feature-reel { grid-area: span 8 / span 16; }
  #ph-5  { grid-area: span 3 / span 6; }
  #ph-title-feature { grid-area: auto / span 10; }
  #ph-6, #ph-7, #ph-8 { display: none; }
  #ph-9  { grid-area: span 4 / span 6; }
  #ph-10 { grid-area: span 4 / span 4; }
  #ph-11 { grid-area: span 4 / span 6; }
  #ph-commercials-reel { grid-area: span 8 / span 16; }
  #ph-title-commercials { grid-area: auto / span 10; }
  #ph-13 { grid-area: span 3 / span 6; }
  #ph-14, #ph-15 { grid-area: span 3 / span 8; }

  .grid.bio { flex-direction: column; padding: 0; }
  .bio-images { grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(16, auto); padding: 0 20%; }
  #bio-large { grid-area: span 11 / span 12; }
  .bio-images-3up { grid-area: span 5 / span 12; }
  .bio-copy { gap: 10px; height: 50%; }
  .body-large.bio { font-size: 18px; line-height: 21px; }
  .heading-2 { font-size: 20px; line-height: 24px; }
  .mobile-nav-expanded { width: 50%; }
}

/* =========================================================
   MÓVIL GRANDE (≤767px)
   ========================================================= */
@media (max-width: 767px) {
  .heading-2, .body-large { font-size: 18px; line-height: 22px; }
  .body-large.bio { font-size: 16px; }
  .projectblock { gap: 2px; }
  .h3-director { font-size: 18px; line-height: 26px; }
  .h3-cinematographer { font-size: 18px; }
  .bio-images { padding: 0 10%; }
  .mobile-nav-expanded {
    width: 100%; height: auto; border-left: none; border-bottom: 1px solid var(--ink);
    transform: translateY(-100%);
  }
  .mobile-nav-expanded.is-open { transform: translateY(0); }
}

/* =========================================================
   MÓVIL (≤479px)
   ========================================================= */
@media (max-width: 479px) {
  .h1 { font-size: 24px; }
  .logo { width: auto; }
  .grid { gap: 4px; grid-template-rows: repeat(14, 1fr); }
  .grid.bio { gap: 4px; }
  #bio-large { grid-area: span 16 / span 12; justify-self: center; background-image: url("assets/img/69e8dfb55e909c6dddd18fc8_DSCF3366.jpeg"); }
  .bio-images { gap: 4px; height: 40%; padding: 0; }
  .bio-images-3up { display: none; }
  .heading-2 { font-size: 14px; line-height: 22px; }
  .body-large { font-size: 13px; line-height: 18px; }
  .body-large.bio { font-size: 13px; line-height: 17px; }
  .bio-copy { gap: 8px; height: 60%; padding: 12px; }
  .bio-title { gap: 0; }
  .projectblock { gap: 0; padding: 0 8px; }
  .h3-director { font-size: 13px; line-height: 18px; text-align: left; }
  .h3-cinematographer { font-size: 14px; }
}
