/* ============================================================
   Elena Pombo — tema FSE · estils de components
   Reprodueix el sistema de disseny de Claude Design:
   fosc-càlid, cinematogràfic, accent coral, estil immersiu.
   ============================================================ */

:root {
  --ep-rail-w: 60px;
  /* Alçada real de la capçalera: el mateix padding vertical de
     .ep-header__inner (x2) més l'alçada del logotip i el menú. */
  --ep-header-h: calc(clamp(22px, 2.4vw, 34px) * 2 + 44px);
  --ep-coral: var(--wp--preset--color--coral, #FF835E);
  --ep-coral-hover: var(--wp--preset--color--coral-hover, #FF9C7D);
  --ep-ember: var(--wp--preset--color--ember, #FF924A);
  --ep-navy: var(--wp--preset--color--navy, #0F2849);
  --ep-navy-deep: var(--wp--preset--color--navy-deep, #0A1B33);
  --ep-duotone: radial-gradient(125% 95% at 0% 0%, rgba(15,40,73,0.5) 0%, rgba(15,40,73,0) 46%), radial-gradient(120% 95% at 100% 100%, rgba(40,22,12,0.55) 0%, rgba(40,22,12,0) 52%), #09090C;
  --ep-ink: var(--wp--preset--color--ink, #160C06);
  --ep-ink-900: var(--wp--preset--color--ink-900, #1E120A);
  --ep-surface: var(--wp--preset--color--surface, #24150B);
  --ep-line: rgba(251, 241, 234, 0.12);
  --ep-line-strong: rgba(251, 241, 234, 0.22);
  --ep-sand: var(--wp--preset--color--sand, #FBF1EA);
  --ep-sand-200: var(--wp--preset--color--sand-200, #E6D2C4);
  --ep-sand-400: var(--wp--preset--color--sand-400, #C2A998);
  --ep-sand-500: var(--wp--preset--color--sand-500, #9C8475);
  --ep-sand-600: var(--wp--preset--color--sand-600, #7A6355);
  --ep-field-bg: rgba(251, 241, 234, 0.05);
  --ep-scrim-bottom: linear-gradient(to top, rgba(8,4,2,0.92) 0%, rgba(8,4,2,0.55) 35%, rgba(8,4,2,0) 75%);
  --ep-glow-coral: 0 0 0 1px rgba(255,131,94,0.4), 0 10px 40px rgba(255,131,94,0.22);
  --ep-glow-soft: 0 8px 40px rgba(255,131,94,0.18);
  --ep-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ep-dur: 280ms;
  --ep-dur-fast: 150ms;
  --ep-font-display: var(--wp--preset--font-family--display, 'Jost', sans-serif);
  --ep-font-subtitle: var(--wp--preset--font-family--subtitle, 'Space Grotesk', sans-serif);
  --ep-font-body: var(--wp--preset--font-family--body, 'Hanken Grotesk', sans-serif);
  --ep-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; background: #09090C; }

/* Fons signatura del moodboard: duotò blau marí (esquerra) ↔ càlid (dreta), fix */
html body {
  background: var(--ep-duotone) fixed !important;
  background-color: #09090C !important;
  color: var(--ep-sand);
  font-family: var(--ep-font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Contingut a tot l'ample (sense barra lateral) */
.wp-site-blocks {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: transparent;
}
/* Espai per a la capçalera fixa a les pàgines de text */
.wp-site-blocks > main { padding-top: var(--ep-header-h); }
/* Pàgines amb mèdia a sang (portada/projecte): el vídeo arriba a dalt de tot,
   sota la capçalera transparent, per integrar-ho sense franja */
.wp-site-blocks > main:has(> .ep-hero),
.wp-site-blocks > main:has(> .ep-cine) { padding-top: 0; margin-top: 0; }
.wp-site-blocks > main > .ep-hero:first-child,
.wp-site-blocks > main > .ep-cine:first-child { margin-top: 0; }
@media (max-width: 720px) { :root { --ep-header-h: calc(14px * 2 + 44px); } }
.wp-site-blocks > main { flex: 1 0 auto; }
/* El grid va enganxat al primer element (hero/títol), sense block-gap */
.wp-site-blocks > main > .ep-mosaic-wrap { margin-top: 0; }
.ep-hero + .ep-mosaic-wrap { margin-top: 0; }

::selection { background: var(--ep-coral); color: var(--ep-ink); }

/* ---- Tipografia base ---- */
.ep-eyebrow {
  font-family: var(--ep-font-subtitle);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ep-sand-500);
}
.ep-page-title {
  font-family: var(--ep-font-display);
  font-weight: 300;
  font-size: clamp(2rem, 3.6vw, 3rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.04;
  margin: 10px 0 0;
}

/* ============================================================
   CAPÇALERA editorial
   ============================================================ */
.ep-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  transition: background var(--ep-dur) var(--ep-ease), backdrop-filter var(--ep-dur), border-color var(--ep-dur);
  border-bottom: 1px solid transparent;
}
/* Vel de degradat per a llegibilitat sobre el vídeo; la capçalera segueix transparent */
.ep-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6,6,10,0.6) 0%, rgba(6,6,10,0.18) 55%, rgba(6,6,10,0) 100%);
  transition: opacity var(--ep-dur) var(--ep-ease);
}
.ep-header__inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
  padding: clamp(22px, 2.4vw, 34px) clamp(22px, 4vw, 64px);
  transition: padding var(--ep-dur) var(--ep-ease);
}
body.ep-scrolled .ep-header { background: rgba(9,9,12,0.86); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2); border-bottom-color: var(--ep-line); }
body.ep-scrolled .ep-header::before { opacity: 0; }
body.ep-scrolled .ep-header__inner { padding-top: 13px; padding-bottom: 13px; }

/* Logotip refinat */
.ep-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.ep-brand__koi { display: block; width: 22px; color: var(--ep-coral); flex: none; transition: transform 0.6s var(--ep-ease); }
.ep-brand:hover .ep-brand__koi { transform: translateY(-2px) rotate(-6deg); }
.ep-brand__word {
  font-family: var(--ep-font-display); font-weight: 400;
  font-size: 17px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ep-sand); white-space: nowrap; padding-left: 0.22em; line-height: 1;
}

.ep-header__actions { display: flex; align-items: center; gap: clamp(26px, 3vw, 52px); }
.ep-topnav { display: flex; gap: clamp(22px, 2.4vw, 44px); }
.ep-topnav__link {
  position: relative; font-family: var(--ep-font-subtitle); font-weight: 400; font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ep-sand-400);
  text-decoration: none; transition: color var(--ep-dur);
}
.ep-topnav__link span { position: relative; display: inline-block; }
.ep-topnav__link span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--ep-coral); transform: scaleX(0); transform-origin: left; transition: transform 0.45s var(--ep-ease);
}
.ep-topnav__link:hover { color: var(--ep-sand); }
.ep-topnav__link:hover span::after, .ep-topnav__link.is-active span::after { transform: scaleX(1); }
.ep-topnav__link.is-active { color: var(--ep-sand); }

.ep-header__langs { display: flex; gap: 11px; }
.ep-rail__lang {
  font-family: var(--ep-font-subtitle); font-weight: 400; font-size: 11px; letter-spacing: 0.06em;
  color: var(--ep-sand-600); text-decoration: none; transition: color var(--ep-dur-fast);
}
.ep-rail__lang:hover { color: var(--ep-sand-400); }
.ep-rail__lang.is-active { color: var(--ep-sand); }

/* Hamburguesa (dues línies) — només mòbil */
.ep-burger {
  display: none; width: 30px; height: 16px; position: relative; background: none; border: 0; cursor: pointer; padding: 0;
}
.ep-burger span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ep-sand); transition: transform var(--ep-dur), top var(--ep-dur); }
.ep-burger span:first-child { top: 3px; } .ep-burger span:last-child { top: 11px; }

/* ============================================================
   FRAME — placeholder cinematogràfic / contenidor d'imatge
   ============================================================ */
.ep-frame {
  position: relative; overflow: hidden; width: 100%;
  background: linear-gradient(150deg, #2E1C11, #160C06 80%);
}
/* Capa d'imatge independent: GSAP hi fa paral·laxi, Ken Burns i Flip. */
.ep-frame__img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  /* Queda el background per si algun marc encara passa només una URL. */
  background-size: cover; background-position: center; background-repeat: no-repeat;
  will-change: transform; backface-visibility: hidden;
}
html:not(.ep-gsap) .ep-tile .ep-frame__img,
html:not(.ep-gsap) .ep-shot .ep-frame__img { transition: transform 1.1s var(--ep-ease); }
html:not(.ep-gsap) .ep-tile:hover .ep-frame__img,
html:not(.ep-gsap) .ep-shot:hover .ep-frame__img { transform: scale(1.05); }
.ep-frame__vignette { position: absolute; inset: 0; box-shadow: inset 0 0 160px 30px rgba(0,0,0,0.55); pointer-events: none; z-index: 1; }
.ep-frame__grain { position: absolute; inset: 0; background-image: var(--ep-grain); background-size: 150px; opacity: 0.07; mix-blend-mode: screen; pointer-events: none; }
.ep-frame__label { display: none; }
.ep-frame__scrim-strong { position: absolute; inset: 0; background: var(--ep-scrim-bottom); pointer-events: none; }

/* Projecte sense portada: placeholder de marca (mai un quadre negre). */
.ep-frame--empty .ep-frame__vignette { box-shadow: inset 0 0 90px 6px rgba(0,0,0,0.22); }
.ep-frame--empty .ep-frame__grain { opacity: 0.05; }
.ep-frame__koi { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; pointer-events: none; opacity: 0.4; }
.ep-frame__koi svg { width: 30%; max-width: 160px; height: auto; color: var(--ep-sand); }

/* ============================================================
   PORTRAIT — quadre de foto de la pàgina Info (1 o N fotos)
   ============================================================ */
.ep-portrait { position: relative; overflow: hidden; width: 100%; aspect-ratio: 3 / 4; border-radius: 2px; background: #1c0e06; }
.ep-portrait__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s var(--ep-ease); }
.ep-portrait__slide.is-active { opacity: 1; }
.ep-portrait__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-portrait__dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 4; display: flex; justify-content: center; gap: 8px; }
.ep-portrait__dot {
  width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,0.35); transition: background var(--ep-dur), transform var(--ep-dur);
}
.ep-portrait__dot.is-active { background: var(--ep-coral-hover); transform: scale(1.35); }
.ep-portrait--empty { aspect-ratio: auto; background: none; }
@media (prefers-reduced-motion: reduce) {
  .ep-portrait__slide { transition: none; }
}

/* ============================================================
   MOSAIC + TILES
   ============================================================ */
.ep-mosaic-wrap { width: 100%; position: relative; }
.ep-mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-content: start; }
.ep-mosaic__cell { min-width: 0; will-change: transform; }
.ep-tile { position: relative; display: block; width: 100%; overflow: hidden; cursor: pointer; text-decoration: none; }
html:not(.ep-gsap) .ep-tile .ep-frame { transition: transform 1.2s var(--ep-ease); }
html:not(.ep-gsap) .ep-tile:hover .ep-frame { transform: scale(1.04); }
.ep-tile__scrim { position: absolute; inset: 0; background: var(--ep-scrim-bottom); opacity: 0; transition: opacity var(--ep-dur) var(--ep-ease); z-index: 2; }
html:not(.ep-gsap) .ep-tile:hover .ep-tile__scrim { opacity: 1; }
.ep-tile__cap {
  position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 3; text-align: left;
  transform: translateY(8px); opacity: 0;
  transition: opacity var(--ep-dur) var(--ep-ease), transform var(--ep-dur) var(--ep-ease);
}
html:not(.ep-gsap) .ep-tile:hover .ep-tile__cap { opacity: 1; transform: translateY(0); }
/* Amb GSAP, les transicions les gestiona ell (evita doble animació). */
html.ep-gsap .ep-tile__cap,
html.ep-gsap .ep-tile__scrim,
html.ep-gsap .ep-tile__cat { transition: none; }
/* Els botons que GSAP mou amb l'efecte magnètic no poden tenir, a més, una
   transició CSS de transform: el navegador i GSAP s'animarien alhora i el
   moviment es torna lent i pastós. Els colors sí que els fa el CSS. */
html.ep-gsap .ep-btn { transition-property: background, color, border-color, box-shadow; }
html.ep-gsap .ep-playbtn--ghost { transition-property: background; }
html.ep-gsap .ep-playbtn--coral,
html.ep-gsap .ep-links__arrow { transition: none; }
html.ep-gsap .ep-lightbox__close,
html.ep-gsap .ep-overlay__close { transition-property: color; }
.ep-tile__title {
  font-family: var(--ep-font-display); font-weight: 300; font-size: clamp(20px, 2vw, 30px);
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ep-sand); line-height: 1.04;
}
.ep-tile__credit { font-family: var(--ep-font-subtitle); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; color: var(--ep-sand-200); margin-top: 8px; }
.ep-tile__cat {
  position: absolute; top: 16px; left: 18px; z-index: 3;
  font-family: var(--ep-font-subtitle); font-weight: 500; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ep-coral-hover); opacity: 0; transition: opacity var(--ep-dur);
}
html:not(.ep-gsap) .ep-tile:hover .ep-tile__cat { opacity: 1; }

/* ============================================================
   HERO REEL
   ============================================================ */
.ep-hero { display: block; width: 100%; text-decoration: none; }
.ep-hero__playwrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 3; }
.ep-playbtn { display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.ep-playbtn--ghost {
  width: 84px; height: 84px; background: rgba(22,12,6,0.45);
  border: 1px solid rgba(251,241,234,0.5); color: var(--ep-sand); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  transition: transform var(--ep-dur) var(--ep-ease), background var(--ep-dur);
}
.ep-hero:hover .ep-playbtn--ghost { background: rgba(255,131,94,0.25); }
html:not(.ep-gsap) .ep-hero:hover .ep-playbtn--ghost { transform: scale(1.06); }
.ep-hero__copy { position: absolute; left: clamp(24px,4vw,56px); bottom: clamp(26px,4vw,52px); right: 56px; z-index: 3; text-align: left; }
.ep-hero__title {
  font-family: var(--ep-font-display); font-weight: 300; font-size: clamp(2.4rem, 5vw, 4.6rem);
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ep-sand); line-height: 0.98; margin-top: 12px;
}
.ep-hero__meta { font-family: var(--ep-font-subtitle); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ep-sand-200); margin-top: 16px; }

/* ============================================================
   FILTRES (Filmografía)
   ============================================================ */
.ep-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: clamp(24px,4vw,52px) clamp(20px,3vw,40px) clamp(20px,2.5vw,32px);
}
.ep-filters-bar { display: flex; justify-content: flex-end; padding: 0 clamp(20px,3vw,40px) clamp(16px,2vw,28px); }
.ep-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-filter {
  background: transparent; color: var(--ep-sand-400);
  border: 1px solid var(--ep-line-strong); border-radius: 999px; cursor: pointer; padding: 8px 18px;
  font-family: var(--ep-font-subtitle); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  transition: background-color var(--ep-dur-fast), color var(--ep-dur-fast), border-color var(--ep-dur-fast);
}
.ep-filter:hover { border-color: var(--ep-coral); color: var(--ep-coral); }
.ep-filter.is-active { background: var(--ep-coral); color: var(--ep-ink); border-color: var(--ep-coral); }
.ep-mosaic__cell.is-hidden { display: none; }

/* ============================================================
   PROJECT DETAIL (reproductor estil Vimeo)
   ============================================================ */
.ep-detail { padding: clamp(8px,2vw,24px) clamp(16px,3vw,48px) clamp(40px,5vw,80px); }
.ep-back {
  background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  color: var(--ep-sand-500); font-family: var(--ep-font-subtitle); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; margin-bottom: 18px; text-decoration: none;
}
.ep-back:hover { color: var(--ep-coral); }
.ep-back__ico { transform: rotate(180deg); display: inline-flex; }
.ep-detail__player { max-width: 1180px; margin: 0 auto; }
.ep-player { position: relative; }
.ep-frame--player { border-radius: 2px; }
.ep-player__embed iframe { width: 100%; aspect-ratio: 16/9; border: 0; display: block; }
.ep-player__chip { position: absolute; top: 16px; left: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 4; }
.ep-player__chiprow { display: flex; align-items: center; gap: 10px; }
.ep-player__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ep-ink-900); border: 1px solid var(--ep-line-strong); display: flex; align-items: center; justify-content: center; flex: none; }
.ep-player__avatar img { width: 20px; opacity: 0.9; }
.ep-player__name { background: rgba(8,4,2,0.78); color: var(--ep-sand); border-radius: 2px; padding: 7px 12px; font-family: var(--ep-font-body); font-weight: 600; font-size: 15px; }
.ep-player__sub { align-self: flex-start; margin-left: 44px; background: rgba(8,4,2,0.78); color: var(--ep-sand-200); border-radius: 2px; padding: 4px 10px; font-family: var(--ep-font-body); font-weight: 500; font-size: 11px; }
.ep-player__actions { position: absolute; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 10px; color: var(--ep-sand); z-index: 4; }
.ep-player__actions svg { opacity: 0.92; }
.ep-player__playwrap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 4; }
.ep-playbtn--coral { width: 76px; height: 76px; background: var(--ep-coral); color: var(--ep-ink); box-shadow: var(--ep-glow-coral); transition: transform var(--ep-dur); }
.ep-player:hover .ep-playbtn--coral { transform: scale(1.05); }
.ep-player__bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px; background: linear-gradient(to top, rgba(8,4,2,0.85), rgba(8,4,2,0)); display: flex; align-items: center; gap: 12px; color: var(--ep-sand); z-index: 4; }
.ep-player__time { font-family: var(--ep-font-subtitle); font-size: 10px; letter-spacing: 0.06em; background: rgba(8,4,2,0.6); padding: 2px 6px; border-radius: 3px; }
.ep-player__track { flex: 1; height: 3px; border-radius: 3px; background: rgba(251,241,234,0.25); position: relative; }
.ep-player__fill { position: absolute; left: 0; top: 0; bottom: 0; width: 22%; background: var(--ep-coral); border-radius: 3px; }
.ep-player__knob { position: absolute; left: 22%; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--ep-coral); transform: translate(-50%,-50%); }
.ep-player__vimeo { font-family: var(--ep-font-body); font-weight: 700; font-style: italic; font-size: 13px; color: var(--ep-sand-200); margin-left: auto; }

.ep-detail__head { margin-top: 22px; max-width: 1180px; margin-left: auto; margin-right: auto; }
.ep-detail__title { font-family: var(--ep-font-body); font-weight: 600; font-size: clamp(1.4rem,2.4vw,2rem); color: var(--ep-sand); margin: 0; text-transform: none; letter-spacing: 0; }
.ep-detail__credit { font-family: var(--ep-font-body); font-size: 15px; color: var(--ep-sand-400); margin-top: 8px; }

.ep-detail__grid { max-width: 1180px; margin: clamp(36px,5vw,64px) auto 0; display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(28px,4vw,64px); align-items: start; }
.ep-detail__stills .ep-eyebrow { margin-bottom: 16px; }
.ep-stills__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ep-still { border-radius: 2px; }
.ep-detail__credits .ep-eyebrow { margin-bottom: 16px; }
.ep-detail__imdb { margin-top: 26px; }
.ep-detail__desc { max-width: 60ch; margin-top: 18px; font-family: var(--ep-font-body); font-size: 16px; line-height: 1.7; color: var(--ep-sand-400); }
.ep-detail__desc p { margin: 0 0 1em; }
.ep-detail__full { max-width: 1180px; margin: clamp(28px,4vw,56px) auto 0; }
.ep-detail__creditsonly { max-width: 1180px; margin: clamp(28px,4vw,52px) auto 0; }
.ep-detail__creditsonly .ep-detail__credits { max-width: 420px; }
.ep-detail__grid--gallery { grid-template-columns: 1fr; }
.ep-detail__gallery .ep-eyebrow { margin-bottom: 16px; }
.ep-gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 720px) { .ep-gallery__grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   CREDITS
   ============================================================ */
.ep-credits { margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 28px; row-gap: 2px; }
.ep-credits dt { font-family: var(--ep-font-subtitle); font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ep-sand-500); padding: 9px 0; white-space: nowrap; }
.ep-credits dd { margin: 0; font-family: var(--ep-font-body); font-size: 15px; letter-spacing: 0.01em; color: var(--ep-sand); padding: 9px 0; text-align: right; }
.ep-credits dd.is-mine { color: var(--ep-coral-hover); font-weight: 600; }

/* ============================================================
   BOTONS (component del tema)
   ============================================================ */
.ep-btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--ep-font-subtitle); font-weight: 500; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: 0.16em; line-height: 1; text-decoration: none;
  border: 1px solid transparent; border-radius: 999px; padding: 13px 26px; cursor: pointer;
  transition: background var(--ep-dur-fast) var(--ep-ease), color var(--ep-dur-fast), border-color var(--ep-dur-fast), box-shadow var(--ep-dur-fast), transform var(--ep-dur-fast);
}
.ep-btn svg { transition: transform var(--ep-dur-fast) var(--ep-ease); }
.ep-btn:hover svg { transform: translateX(3px); }
.ep-btn--primary { background: var(--ep-coral); color: var(--ep-ink); }
.ep-btn--primary:hover { background: var(--ep-coral-hover); box-shadow: var(--ep-glow-soft); }
.ep-btn--secondary { background: transparent; color: var(--ep-sand); border-color: var(--ep-line-strong); }
.ep-btn--secondary:hover { border-color: var(--ep-coral); color: var(--ep-coral); }
.ep-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: clamp(48px,9vw,96px) 24px; }

/* ============================================================
   INFO — Sobre mí + Contacto
   ============================================================ */
.ep-info { padding: clamp(28px,5vw,72px) clamp(20px,4vw,64px); max-width: 1180px; margin: 0 auto; }
.ep-about { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px,5vw,72px); align-items: center; margin-bottom: clamp(48px,7vw,110px); }
.ep-about__lead { font-family: var(--ep-font-body); font-size: 18px; line-height: 1.65; color: var(--ep-sand); max-width: 46ch; margin-top: 20px; }
.ep-about__text { font-family: var(--ep-font-body); font-size: 15px; line-height: 1.6; color: var(--ep-sand-400); max-width: 52ch; margin-top: 16px; }
.ep-about h1 { margin: 14px 0 0; }

.ep-contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px,5vw,72px); align-items: start; }
.ep-form { display: flex; flex-direction: column; gap: 24px; }
.ep-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ep-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ep-field { display: block; }
.ep-field__label { display: block; font-family: var(--ep-font-subtitle); font-weight: 500; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ep-sand-500); margin-bottom: 9px; transition: color var(--ep-dur-fast); }
.ep-field__label span { color: var(--ep-coral); }
.ep-field input, .ep-field textarea {
  width: 100%; box-sizing: border-box; background: var(--ep-field-bg);
  border: 1px solid var(--ep-line); border-bottom: 1px solid var(--ep-line-strong); border-radius: 2px;
  color: var(--ep-sand); font-family: var(--ep-font-body); font-size: 15px; line-height: 1.5;
  padding: 13px 14px; outline: none; transition: border-color var(--ep-dur-fast), box-shadow var(--ep-dur-fast);
}
.ep-field textarea { resize: vertical; }
.ep-field input:focus, .ep-field textarea:focus { border-bottom-color: var(--ep-coral); box-shadow: 0 6px 24px rgba(255,131,94,0.10); }
.ep-field input::placeholder, .ep-field textarea::placeholder { color: var(--ep-sand-500); opacity: 0.7; }
.ep-form__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ep-form__mail { font-family: var(--ep-font-subtitle); font-size: 12px; letter-spacing: 0.1em; color: var(--ep-sand-400); text-decoration: none; }
.ep-form__mail:hover { color: var(--ep-coral); }
.ep-check { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; line-height: 1.5; color: var(--ep-sand-400); cursor: pointer; }
.ep-check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--ep-coral); cursor: pointer; }
.ep-check a, .ep-form__legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; transition: color var(--ep-dur-fast); }
.ep-check a:hover, .ep-form__legal a:hover { color: var(--ep-coral); }
.ep-check__req { color: var(--ep-coral); }
.ep-form__legal { margin: -8px 0 0; font-size: 11px; line-height: 1.6; color: var(--ep-sand-500); }
.ep-form__ok { color: var(--ep-coral-hover); font-family: var(--ep-font-subtitle); font-size: 13px; letter-spacing: 0.06em; }

.ep-links__list { display: flex; flex-direction: column; gap: 4px; }
.ep-links__item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; text-decoration: none; color: var(--ep-sand); transition: color var(--ep-dur-fast), padding-left var(--ep-dur) var(--ep-ease); }
.ep-links__item:hover { color: var(--ep-coral); padding-left: 10px; }
.ep-links__label { display: block; font-family: var(--ep-font-display); font-weight: 400; font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase; }
.ep-links__sub { display: block; font-family: var(--ep-font-subtitle); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ep-sand-500); margin-top: 5px; }
.ep-links__arrow { color: var(--ep-coral-hover); transition: transform var(--ep-dur-fast); }
.ep-links__item:hover .ep-links__arrow { transform: translateX(4px); }

/* ============================================================
   PROJECTE IMMERSIU (cine a pantalla completa + lightbox)
   ============================================================ */
.ep-cine { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: flex; }
.ep-cine__bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; background: #000; }
.ep-cine__bg iframe { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(1.35); transform-origin: center; width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh; border: 0; pointer-events: none; }
.ep-cine__bg .ep-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.ep-cine__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(7,4,2,0.9) 0%, rgba(7,4,2,0.15) 42%, rgba(7,4,2,0.55) 100%); }
.ep-cine__inner { position: relative; z-index: 2; width: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: calc(var(--ep-header-h) + 20px) clamp(22px,4vw,64px) clamp(44px,5vw,80px); }
.ep-cine__back { align-self: flex-start; margin-bottom: auto; }
.ep-cine__copy { max-width: 1100px; }
.ep-cine__eyebrow { display: block; margin-bottom: 18px; color: var(--ep-coral-hover); }
.ep-cine__title { font-family: var(--ep-font-display); font-weight: 400; font-size: clamp(2.6rem, 8vw, 7rem); line-height: 0.94; letter-spacing: 0.01em; color: var(--ep-sand); margin: 0; text-transform: none; }
.ep-cine__credit { font-family: var(--ep-font-body); font-size: clamp(14px,1.4vw,18px); color: var(--ep-sand-200); margin-top: 20px; }
.ep-cine__play { display: inline-flex; align-items: center; gap: 16px; margin-top: clamp(28px,3vw,40px); background: none; border: 0; cursor: pointer; color: var(--ep-sand); font-family: var(--ep-font-subtitle); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; }
.ep-cine__playicon { position: relative; width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(251,241,234,0.4); display: flex; align-items: center; justify-content: center; color: var(--ep-sand); transition: background var(--ep-dur), color var(--ep-dur), box-shadow var(--ep-dur); }
.ep-cine__play:hover .ep-cine__playicon { background: var(--ep-coral); color: var(--ep-ink); border-color: var(--ep-coral); box-shadow: var(--ep-glow-coral); }
html:not(.ep-gsap) .ep-cine__play:hover .ep-cine__playicon { transform: scale(1.08); }
.ep-cine__cue { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: 1px; height: 52px; background: rgba(251,241,234,0.18); overflow: hidden; z-index: 2; }
.ep-cine__cue span { position: absolute; left: 0; width: 100%; height: 40%; background: var(--ep-coral); animation: ep-cue 1.9s var(--ep-ease) infinite; }
@keyframes ep-cue { 0% { top: -40%; } 100% { top: 100%; } }

.ep-detail--video { padding: clamp(56px,8vw,130px) clamp(22px,4vw,64px); }
.ep-detail__grid--video { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px,5vw,80px); align-items: start; }
.ep-detail--video .ep-detail__desc { margin-top: 0; }
.ep-detail--gallery { padding: clamp(40px,5vw,80px) clamp(22px,4vw,64px) clamp(48px,6vw,96px); }
.ep-detail__intro { max-width: 62ch; margin: 0 auto clamp(40px,5vw,72px); text-align: center; }
.ep-shot { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; }

.ep-lightbox { position: fixed; inset: 0; z-index: 9600; background: rgba(5,4,8,0.96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: clamp(16px,4vw,72px); opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ep-ease), visibility 0.4s, background 0.4s var(--ep-ease), backdrop-filter 0.4s; }
.ep-lightbox.is-open { opacity: 1; visibility: visible; }
/* Tancant: el fons marxa però la imatge encara ha de poder tornar volant. */
.ep-lightbox.is-closing { background: rgba(5,4,8,0); -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px); }
.ep-lightbox.is-closing .ep-lightbox__close { opacity: 0; transition: opacity 0.25s; }
.ep-lightbox__close { position: absolute; top: 20px; right: clamp(20px,3vw,40px); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; color: var(--ep-sand-400); z-index: 2; transition: color var(--ep-dur-fast), transform var(--ep-dur-fast); }
.ep-lightbox__close:hover { color: var(--ep-coral); }
html:not(.ep-gsap) .ep-lightbox__close:hover { transform: rotate(90deg); }
.ep-lightbox__frame { position: relative; width: min(1320px, 100%); aspect-ratio: 16 / 9; }
.ep-lightbox__frame iframe { width: 100%; height: 100%; border: 0; border-radius: 2px; }
/* Amb Flip, la miniatura mateixa (16:9) vola fins aquí: mateixa proporció, zero distorsió. */
.ep-lightbox--img .ep-lightbox__frame { max-height: 86vh; }
.ep-lightbox--img .ep-lightbox__frame .ep-frame__img { border-radius: 2px; }
.ep-lightbox--img .ep-lightbox__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 2px; }
@media (max-width: 860px) { .ep-detail__grid--video { grid-template-columns: 1fr; } }

/* ============================================================
   FOOTER editorial
   ============================================================ */
.ep-footer { padding: clamp(72px,10vw,160px) clamp(22px,4vw,64px) clamp(34px,4vw,52px); margin-top: auto; }
.ep-footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: clamp(32px,5vw,80px); flex-wrap: wrap; padding-bottom: clamp(56px,8vw,120px); }
.ep-footer__cta { display: flex; flex-direction: column; gap: clamp(14px,1.6vw,22px); }
.ep-footer__eyebrow { font-family: var(--ep-font-subtitle); font-weight: 400; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ep-sand-500); }
.ep-footer__big {
  font-family: var(--ep-font-display); font-weight: 400; font-size: clamp(2.1rem, 6.5vw, 5.4rem);
  letter-spacing: 0; color: var(--ep-sand); text-decoration: none; line-height: 0.98; transition: color var(--ep-dur);
}
.ep-footer__big:hover { color: var(--ep-coral); }
.ep-footer__social { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.ep-footer__link { font-family: var(--ep-font-subtitle); font-weight: 400; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ep-sand-400); text-decoration: none; transition: color var(--ep-dur-fast); }
.ep-footer__link span { position: relative; }
.ep-footer__link span::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ep-ease); }
.ep-footer__link:hover { color: var(--ep-sand); }
.ep-footer__link:hover span::after { transform: scaleX(1); transform-origin: left; }
.ep-footer__bottom { display: flex; justify-content: space-between; gap: 12px 36px; flex-wrap: wrap; padding-top: clamp(40px,5vw,72px); }
.ep-footer__fine { font-family: var(--ep-font-subtitle); font-weight: 400; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ep-sand-600); text-decoration: none; }
.ep-footer__legal { display: flex; gap: 12px 24px; flex-wrap: wrap; }
.ep-footer__credit { transition: color var(--ep-dur-fast); }
.ep-footer__credit:hover { color: var(--ep-coral); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .ep-detail__grid { grid-template-columns: 1fr; }
  .ep-about { grid-template-columns: 1fr; }
  .ep-contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  /* A mòbil, la nav i els idiomes passen a l'overlay (hamburguesa) */
  .ep-header__actions .ep-topnav,
  .ep-header__langs { display: none; }
  .ep-burger { display: block; }
  .ep-footer__social { align-items: flex-start; }
  /* Hero més alt perquè el text no xoqui amb la capçalera */
  .ep-frame--hero { min-height: 82vh; aspect-ratio: auto; }
  .ep-hero__copy { right: clamp(20px,5vw,40px); bottom: clamp(28px,7vw,56px); }
  .ep-hero__title { font-size: clamp(2rem, 7.5vw, 3.4rem); margin-top: 10px; }
}
@media (max-width: 720px) {
  .ep-mosaic { grid-template-columns: 1fr; }
  /* L'adreça de correu del peu no cap a la pantalla amb la mida gran */
  .ep-footer__big { font-size: clamp(1.4rem, 7.4vw, 2.8rem); }
  .ep-stills__grid { grid-template-columns: 1fr 1fr; }
  .ep-header__inner { padding: 14px 18px; }
  .ep-form__row { grid-template-columns: 1fr; }
  .ep-cine__title { font-size: clamp(2rem, 9vw, 3.2rem); }
  .ep-cine__inner { padding-bottom: clamp(32px,6vw,56px); }
}

/* ============================================================
   KOI SVG — logo vectorial animat
   ============================================================ */
.ep-koi { display: block; fill: currentColor; }
.ep-koi--brand { width: 100%; height: auto; color: inherit; }
.ep-koi--rail { width: 26px; height: auto; color: var(--ep-sand); transition: color var(--ep-dur), transform var(--ep-dur) var(--ep-ease); }
.ep-rail__koi { overflow: hidden; }
.ep-rail__koi:hover .ep-koi--rail { color: var(--ep-coral); transform: translateY(-2px) rotate(-3deg); }
.ep-koi--avatar { width: 20px; color: var(--ep-sand); }
.ep-koi--footer { width: 46px; color: var(--ep-coral); }

@keyframes ep-float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-8px) rotate(-2.5deg); } }
@keyframes ep-float-soft { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.ep-koi--ghost { animation: ep-float 8s var(--ep-ease) infinite; }
.ep-koi--footer { animation: ep-float-soft 6s var(--ep-ease) infinite; }

/* «Aquarel·la → foc»: resplendor ember al koi */
.ep-koi--footer { filter: drop-shadow(0 0 16px rgba(255,131,94,0.45)); }
@keyframes ep-ember {
  0%,100% { filter: drop-shadow(0 0 26px rgba(255,131,94,0.42)) drop-shadow(0 0 10px rgba(255,146,74,0.4)); }
  50%     { filter: drop-shadow(0 0 42px rgba(255,131,94,0.62)) drop-shadow(0 0 18px rgba(255,146,74,0.55)); }
}

/* Dibuix de traç (loader) */
@keyframes ep-draw {
  0%   { stroke-dashoffset: 1; fill: rgba(255,131,94,0); }
  60%  { stroke-dashoffset: 0; fill: rgba(255,131,94,0); }
  100% { stroke-dashoffset: 0; fill: currentColor; }
}

/* ============================================================
   LOADER cinematogràfic — el koi es dibuixa (DrawSVG) i el teló s'aixeca
   ============================================================ */
.ep-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(120% 120% at 50% 38%, #1E2A4A 0%, #160C06 48%, #0a0502 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.9s var(--ep-ease), visibility 0.9s;
  will-change: transform;
}
.ep-loader__inner { text-align: center; }
.ep-loader__koi { width: clamp(86px, 13vw, 130px); margin: 0 auto 26px; filter: drop-shadow(0 0 36px rgba(255,131,94,0.4)); }
/* Sense GSAP/DrawSVG el koi apareix igualment. */
html:not(.ep-gsap) .ep-loader__koi { animation: ep-koi-in 1.1s var(--ep-ease) both, ep-float 7s var(--ep-ease) 1.1s infinite; }
@keyframes ep-koi-in { from { opacity: 0; transform: translateY(18px) scale(0.84); } to { opacity: 1; transform: none; } }

/* Traç del koi: gruix constant en píxels sigui quin sigui l'escalat del viewBox.
   Només quan DrawSVG és disponible (JS afegeix `is-drawing`). */
.ep-loader.is-drawing .ep-koi path {
  stroke: var(--ep-coral); stroke-width: 1.4px; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke; paint-order: stroke fill;
}
.ep-loader .ep-koi .ep-koi__base { fill: var(--ep-sand); }

.ep-loader__word {
  font-family: var(--ep-font-display); font-weight: 300; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--ep-sand); font-size: clamp(13px, 2vw, 19px);
}
html:not(.ep-gsap) .ep-loader__word { opacity: 0; animation: ep-fade-in 1s var(--ep-ease) 1.7s forwards; }
@keyframes ep-fade-in { to { opacity: 1; } }

.ep-loader__foot {
  position: absolute; left: clamp(22px,4vw,64px); right: clamp(22px,4vw,64px); bottom: clamp(26px,4vw,48px);
  display: flex; align-items: center; gap: 20px;
}
.ep-loader__bar { flex: 1; height: 1px; background: rgba(251,241,234,0.14); overflow: hidden; }
.ep-loader__bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--ep-coral), var(--ep-ember)); transform: scaleX(0); transform-origin: 0 50%; }
.ep-loader__pct {
  font-family: var(--ep-font-subtitle); font-size: 11px; letter-spacing: 0.24em; color: var(--ep-sand-500);
  font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right;
}
html.ep-loaded .ep-loader { opacity: 0; visibility: hidden; pointer-events: none; }
html:not(.ep-loaded) body { overflow: hidden; }

/* ============================================================
   TRANSICIÓ entre pàgines: cortina de lames + koi
   ============================================================ */
.ep-transition { position: fixed; inset: 0; z-index: 9000; pointer-events: none; }
.ep-transition__slats { position: absolute; inset: 0; display: flex; }
.ep-transition__slats i {
  flex: 1 1 0; height: 100%; background: #09090C;
  transform: scaleY(0); transform-origin: 50% 0%; will-change: transform;
}
.ep-transition__slats i:not(:last-child) { margin-right: -1px; } /* sense costures */
.ep-transition__koi {
  position: absolute; left: 50%; top: 50%; width: clamp(64px, 8vw, 104px);
  transform: translate(-50%,-50%); color: var(--ep-coral); opacity: 0;
  filter: drop-shadow(0 0 30px rgba(255,131,94,0.45));
}

/* Estat «entrant» abans del paint: la cortina ja cobreix; JS l'obre. */
html.ep-entering .ep-transition__slats i { transform: scaleY(1); transform-origin: 50% 100%; }
html.ep-entering .ep-transition__koi { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ep-transition { display: none; } }

/* ============================================================
   SCROLLSMOOTHER
   ============================================================ */
html.ep-smooth { scroll-behavior: auto; }
#smooth-wrapper { overflow: hidden; }

/* ============================================================
   CURSOR propi
   ============================================================ */
.ep-cursor { position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none; mix-blend-mode: difference; }
.ep-cursor__dot, .ep-cursor__ring, .ep-cursor__label { position: fixed; top: 0; left: 0; pointer-events: none; }
.ep-cursor__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ep-sand); }
.ep-cursor__ring { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--ep-sand-400); }
.ep-cursor__label {
  font-family: var(--ep-font-subtitle); font-size: 10px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ep-ink); white-space: nowrap; opacity: 0;
}
html.ep-cursor-on, html.ep-cursor-on * { cursor: none !important; }
html.ep-cursor-on input, html.ep-cursor-on textarea { cursor: text !important; }
@media (hover: none), (pointer: coarse) { .ep-cursor { display: none; } }

/* ============================================================
   BARRA DE PROGRÉS de lectura
   ============================================================ */
.ep-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 70; pointer-events: none; }
.ep-progress i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--ep-coral), var(--ep-ember)); }

/* ============================================================
   ANELL de dibuix als botons de reproducció (DrawSVG)
   ============================================================ */
.ep-ring { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); pointer-events: none; overflow: visible; }
.ep-ring circle { fill: none; stroke: var(--ep-coral); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.ep-playbtn { position: relative; }

/* ============================================================
   MARQUESINA infinita (tempo modulat per la velocitat d'scroll)
   ============================================================ */
.ep-marquee { overflow: hidden; width: 100%; margin-bottom: clamp(48px,7vw,110px); border-top: 1px solid var(--ep-line); border-bottom: 1px solid var(--ep-line); padding: clamp(14px,1.6vw,22px) 0; }
.ep-marquee__track { display: flex; width: max-content; will-change: transform; }
.ep-marquee__set { display: flex; align-items: center; flex: none; }
.ep-marquee__word {
  font-family: var(--ep-font-display); font-weight: 300; font-size: clamp(1.5rem, 3.4vw, 2.9rem);
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ep-sand-500); white-space: nowrap;
  padding: 0 clamp(16px,2vw,34px);
}
.ep-marquee__set:nth-child(even) .ep-marquee__word { color: var(--ep-sand-400); }
.ep-marquee__sep { color: var(--ep-coral); font-size: clamp(0.7rem, 1.1vw, 1rem); font-style: normal; }

.ep-transition__koi .ep-koi path { fill: var(--ep-coral); }

/* Koi fantasma del menú: només traç, es dibuixa amb DrawSVG en obrir. */
html.ep-gsap .ep-navov__koi { opacity: 0.24; }
html.ep-gsap .ep-navov__koi path {
  fill: none; stroke: var(--ep-coral); stroke-width: 1.1px;
  stroke-linejoin: round; vector-effect: non-scaling-stroke;
}

/* Gra de pel·lícula viu (només als plans grans). */
@keyframes ep-grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-6%, -4%); }
  40%  { transform: translate(4%, -7%); }
  60%  { transform: translate(-3%, 5%); }
  80%  { transform: translate(6%, 3%); }
  100% { transform: translate(0, 0); }
}
.ep-frame--hero .ep-frame__grain,
.ep-cine .ep-frame__grain { inset: -8%; animation: ep-grain-shift 0.9s steps(1) infinite; }

/* Amb GSAP, els enllaços del menú els anima ell (per caràcters). */
html.ep-gsap .ep-navov__link { opacity: 1; transform: none; animation: none !important; }

/* ============================================================
   SPLITTEXT — línies i caràcters amb màscara
   ============================================================ */
.ep-ln, .ep-ch { will-change: transform; }
.ep-footer__big { display: inline-block; }
.ep-hero__title, .ep-cine__title { perspective: 800px; }

/* ============================================================
   HERO — vídeo en bucle de fons + capes
   ============================================================ */
.ep-frame--hero { background: #0a0502; }
.ep-hero__video { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.ep-hero__video iframe {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1.35);
  width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh;
  border: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s var(--ep-ease) 0.4s;
}
.ep-hero.is-revealed .ep-hero__video iframe, .ep-hero .ep-hero__video iframe.is-ready { opacity: 0.55; }
.ep-hero .ep-frame__scrim-strong { z-index: 1; }
.ep-hero__playwrap, .ep-hero__copy { z-index: 2; }

/* ============================================================
   OVERLAYS — navegació i cerca
   ============================================================ */
.ep-overlay {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(120deg, rgba(13,36,66,0.975), rgba(10,5,2,0.975) 65%); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity var(--ep-dur) var(--ep-ease), visibility var(--ep-dur);
}
.ep-overlay.is-open { opacity: 1; visibility: visible; }
.ep-overlay__close {
  position: absolute; top: 22px; right: clamp(20px,3vw,40px); width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center; background: none; border: 0; cursor: pointer;
  color: var(--ep-sand-400); transition: color var(--ep-dur-fast), transform var(--ep-dur-fast);
}
.ep-overlay__close:hover { color: var(--ep-coral); transform: rotate(90deg); }
.ep-navov__koi { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(46vh, 380px); color: var(--ep-coral); opacity: 0.06; pointer-events: none; }
.ep-navov__nav { display: flex; flex-direction: column; align-items: center; gap: clamp(6px,1.5vh,16px); z-index: 1; }
.ep-navov__link {
  font-family: var(--ep-font-display); font-weight: 300; font-size: clamp(2.2rem, 7vw, 5rem);
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--ep-sand); text-decoration: none; line-height: 1;
  opacity: 0; transform: translateY(16px); transition: color var(--ep-dur-fast);
}
.ep-overlay.is-open .ep-navov__link { animation: ep-rise 0.5s var(--ep-ease) forwards; animation-delay: calc(0.06s * var(--i) + 0.1s); }
@keyframes ep-rise { to { opacity: 1; transform: translateY(0); } }
.ep-navov__link:hover, .ep-navov__link.is-active { color: var(--ep-coral); }
.ep-navov__langs { position: absolute; bottom: 40px; left: 0; right: 0; display: flex; justify-content: center; gap: 22px; }
.ep-navov__langs .ep-rail__lang { font-size: 12px; }
.ep-searchov__form { width: min(680px, 86vw); text-align: center; }
.ep-searchov__form .ep-eyebrow { display: block; margin-bottom: 18px; }
.ep-searchov__form input {
  width: 100%; background: none; border: 0; border-bottom: 1px solid var(--ep-line-strong); outline: none;
  color: var(--ep-sand); font-family: var(--ep-font-display); font-weight: 300; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: clamp(1.6rem, 5vw, 3rem); text-align: center; padding: 12px 0;
}
.ep-searchov__form input:focus { border-bottom-color: var(--ep-coral); }
.ep-searchov__form input::placeholder { color: var(--ep-sand-600); }
body.ep-overlay-open { overflow: hidden; }

/* ============================================================
   FOOTER (bloc dinàmic)
   ============================================================ */
.ep-footer__left { display: flex; align-items: center; gap: 18px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
/* Les animacions d'entrada les aplica GSAP (anim.js) sobre contingut ja visible. */

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .ep-koi--ghost, .ep-koi--footer { animation: none; }
  .ep-loader { display: none; }
  .ep-loader__word { opacity: 1; animation: none; }
  .ep-hero__video { display: none; }
  .ep-cursor, .ep-progress { display: none; }
  html.ep-cursor-on, html.ep-cursor-on * { cursor: auto !important; }
  .ep-frame--hero .ep-frame__grain, .ep-cine .ep-frame__grain { animation: none; }
  /* Sense moviment, el rètol de cada casella és sempre visible. */
  .ep-tile__cap { opacity: 1; transform: none; }
  .ep-tile__scrim { opacity: 1; }
  .ep-marquee { display: none; }
}

/* Editor: neutralitza l'offset del rail dins el llenç */
.editor-styles-wrapper { background: var(--ep-ink); color: var(--ep-sand); }
.editor-styles-wrapper .ep-loader { display: none; }

/* Títols de pàgina com a h1: sense els marges ni la tipografia per defecte de l'element. */
h1.ep-hero__title { margin-bottom: 0; }
.ep-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
