/*
  editorial-portfolio.css
  ─────────────────────────────────────────────────────────────────
  Estensione editoriale del sistema visivo di gaiasciascia.com.
  Non introduce nuovi colori o font — reusa le variabili del sito.
  Layout ispirato ai magazine contemporanei: Le Monde, Magnum,
  British Journal of Photography, NYT Lens.
  ─────────────────────────────────────────────────────────────────
*/

/* ── Accento editoriale per queste pagine ────────────────────── */
:root {
  --ep-ink:       #161616;      /* = --text */
  --ep-bg:        #f5f3ee;      /* = --bg */
  --ep-surface:   #ffffff;
  --ep-muted:     #888888;
  --ep-line:      rgba(22,22,22,.08);
  --ep-line-md:   rgba(22,22,22,.12);
  --ep-ph:        #e8e4dc;      /* placeholder foto */
  --ep-ph-dark:   #d4cec4;
  --ep-radius:    6px;          /* editoriale = meno arrotondato */
  --ep-max:       1440px;
  --ep-shadow:    0 12px 40px rgba(0,0,0,.05);
}

/* ── Reset base ──────────────────────────────────────────────── */
.ep-page * { box-sizing: border-box; }
.ep-page img { max-width: 100%; height: auto; display: block; }

/* ── Corpo pagina ────────────────────────────────────────────── */
.ep-page {
  margin: 0;
  background: var(--ep-bg);
  color: var(--ep-ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.55;
  cursor: none;          /* sostituito dal dot cursor */
  -webkit-font-smoothing: antialiased;
}
@media (pointer: coarse) {
  .ep-page { cursor: auto; }
}

/* ── Wrapper ─────────────────────────────────────────────────── */
.ep-shell {
  width: min(calc(100% - 48px), var(--ep-max));
  margin: 0 auto;
}
.ep-shell--narrow {
  width: min(calc(100% - 48px), 960px);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER EDITORIALE
═══════════════════════════════════════════════════════════════ */
.ep-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 18px 0;
  isolation: isolate;
}
.ep-header::before {
  content: "";
  position: absolute;
  inset: 0 auto -1px 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: rgba(245,243,238,.90);
  border-bottom: 1px solid var(--ep-line);
  backdrop-filter: blur(14px);
  z-index: -1;
}
.ep-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Logo (riusa .brand dal sito) */
.ep-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ep-ink);
}
.ep-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,.44);
  box-shadow: inset 0 0 0 1px rgba(22,22,22,.06);
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.ep-brand-mark img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}
.ep-brand-name {
  font-size: .88rem;
  color: var(--ep-muted);
  letter-spacing: .01em;
}

/* Azioni header */
.ep-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--ep-line-md);
  font-family: inherit;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--ep-ink);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.ep-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(22,22,22,.22);
  background: rgba(255,255,255,.92);
}
.ep-btn--primary {
  background: var(--ep-ink);
  color: #fff;
  border-color: var(--ep-ink);
}
.ep-btn--primary:hover {
  background: #2e2e2e;
  border-color: #2e2e2e;
}

/* ═══════════════════════════════════════════════════════════════
   CURSOR (riusa il sistema del sito)
═══════════════════════════════════════════════════════════════ */
.ep-cursor,
.ep-cursor-ring {
  position: fixed;
  left: 0; top: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity .18s ease, width .22s ease, height .22s ease, background-color .22s ease;
  will-change: transform;
}
.ep-cursor {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--ep-ink);
}
.ep-cursor-ring {
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(22,22,22,.38);
}
.ep-cursor.is-visible,
.ep-cursor-ring.is-visible { opacity: 1; }
.ep-cursor.is-hover { width: 14px; height: 14px; }
.ep-cursor-ring.is-hover { width: 52px; height: 52px; background: rgba(22,22,22,.05); }

/* Cursore sport — arancione brand */
.ep-page--sport .ep-cursor { background: #ffa630; }
.ep-page--sport .ep-cursor-ring { border-color: rgba(255,166,48,.45); }
.ep-page--sport .ep-cursor-ring.is-hover { background: rgba(255,166,48,.08); }

/* Cursore travel — teal brand */
.ep-page--travel .ep-cursor { background: #34b3a9; }
.ep-page--travel .ep-cursor-ring { border-color: rgba(52,179,169,.45); }
.ep-page--travel .ep-cursor-ring.is-hover { background: rgba(52,179,169,.08); }

@media (pointer: coarse) {
  .ep-cursor, .ep-cursor-ring { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   TIPOGRAFIA EDITORIALE
═══════════════════════════════════════════════════════════════ */

/* Kicker / categoria */
.ep-kicker {
  margin: 0 0 14px;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ep-muted);
}

/* Titolo principale pagina */
.ep-page-title {
  margin: 0 0 .5rem;
  font-size: clamp(3.8rem, 9vw, 9rem);
  line-height: .92;
  letter-spacing: -.055em;
  font-weight: 800;
}

/* Titolo sezione */
.ep-section-title {
  margin: 0 0 .4rem;
  font-size: clamp(2rem, 4.5vw, 5rem);
  line-height: .94;
  letter-spacing: -.05em;
  font-weight: 800;
}

/* Titolo secondario (Playfair) */
.ep-serif-title {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}

/* Lead editoriale */
.ep-lead {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.65;
  color: #2e2e2e;
  max-width: 52ch;
}

/* Didascalia */
.ep-caption {
  margin: 10px 0 0;
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--ep-muted);
  line-height: 1.5;
}

/* Numero editoriale */
.ep-number {
  font-size: .72rem;
  letter-spacing: .18em;
  color: var(--ep-muted);
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   REVEAL SCROLL (coerente con il sito)
═══════════════════════════════════════════════════════════════ */
.ep-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.ep-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.ep-reveal-d1 { transition-delay: 60ms; }
.ep-reveal-d2 { transition-delay: 130ms; }
.ep-reveal-d3 { transition-delay: 200ms; }
.ep-reveal-d4 { transition-delay: 280ms; }

@media (prefers-reduced-motion: reduce) {
  .ep-reveal, .ep-reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   PLACEHOLDER FOTO
   Ogni placeholder ha un commento HTML che indica dove inserire
   la fotografia definitiva.
═══════════════════════════════════════════════════════════════ */
.ep-photo {
  position: relative;
  overflow: hidden;
  background: var(--ep-ph);
}
.ep-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s cubic-bezier(.16,1,.3,1);
}
.ep-photo:hover img { transform: scale(1.025); }

/* Gradient placeholder quando non c'è ancora img */
.ep-ph-a { background: linear-gradient(145deg, #d8d5cd, #b8b3aa); }
.ep-ph-b { background: linear-gradient(145deg, #c8c4bc, #9c9690); }
.ep-ph-c { background: linear-gradient(165deg, #cdd2d5, #8f9396); }
.ep-ph-d { background: linear-gradient(140deg, #d5cec6, #a09890); }
.ep-ph-e { background: linear-gradient(150deg, #bec8cc, #7c8a8e); }
.ep-ph-f { background: linear-gradient(155deg, #d0cbc3, #9a958d); }
.ep-ph-g { background: linear-gradient(160deg, #c5cace, #878e92); }
.ep-ph-h { background: linear-gradient(135deg, #d8d2ca, #a8a29a); }

/* Etichetta placeholder (nascosta in produzione) */
.ep-ph-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(22,22,22,.32);
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT BLOCKS — il cuore editoriale
═══════════════════════════════════════════════════════════════ */

/* ── Spaziature verticali ──────────────────────────────────── */
.ep-block          { padding-top: 80px; padding-bottom: 80px; }
.ep-block--tight   { padding-top: 48px; padding-bottom: 48px; }
.ep-block--wide    { padding-top: 120px; padding-bottom: 120px; }
.ep-block--breath  { padding-top: 140px; padding-bottom: 140px; }
.ep-block--flush   { padding-top: 0; padding-bottom: 0; }

/* Separatore riga */
.ep-divider {
  border: 0;
  border-top: 1px solid var(--ep-line);
  margin: 0;
}

/* ── Full-width ─────────────────────────────────────────────── */
/* Immagine che occupa tutta la larghezza schermo */
.ep-full-bleed {
  position: relative;
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}
.ep-full-bleed .ep-photo { width: 100%; }
.ep-full-bleed--tall .ep-photo   { min-height: 90vh; }
.ep-full-bleed--medium .ep-photo { min-height: 70vh; }
.ep-full-bleed--compact .ep-photo { min-height: 55vh; }

/* Caption sotto full bleed */
.ep-full-bleed-caption {
  padding: 14px 24px 0;
  max-width: 680px;
}

/* ── Near full-screen ───────────────────────────────────────── */
.ep-near-full {
  position: relative;
}
.ep-near-full .ep-photo {
  width: 100%;
  min-height: 88vh;
  border-radius: 0;
}

/* ── Immagine singola centrata (non full bleed) ─────────────── */
.ep-single {
  position: relative;
}
.ep-single .ep-photo {
  width: 100%;
  border-radius: 2px;
}
.ep-single--portrait .ep-photo {
  max-width: 560px;
  margin: 0 auto;
  min-height: 680px;
}
.ep-single--landscape .ep-photo {
  min-height: 520px;
}

/* ── Dittico ────────────────────────────────────────────────── */
.ep-diptych {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.ep-diptych .ep-photo {
  width: 100%;
  min-height: 500px;
  border-radius: 2px;
}
/* Dittico asimmetrico */
.ep-diptych--asymm {
  grid-template-columns: 1.35fr .65fr;
}
.ep-diptych--asymm-r {
  grid-template-columns: .65fr 1.35fr;
}
/* Dittico sfalsato */
.ep-diptych--offset .ep-photo:first-child { margin-top: 60px; }
.ep-diptych--offset .ep-photo:last-child  { margin-bottom: 60px; }

/* ── Trittico ───────────────────────────────────────────────── */
.ep-triptych {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ep-triptych .ep-photo {
  min-height: 400px;
  border-radius: 2px;
}
/* Trittico con centrale più alta */
.ep-triptych--elevated .ep-photo:nth-child(2) {
  min-height: 520px;
  margin-top: -40px;
}

/* ── Immagine isolata (piccola, offset) ─────────────────────── */
.ep-isolated {
  display: flex;
  justify-content: flex-end;
}
.ep-isolated--left  { justify-content: flex-start; }
.ep-isolated--center { justify-content: center; }

.ep-isolated .ep-photo {
  width: min(460px, 100%);
  min-height: 580px;
  border-radius: 2px;
}

/* ── Text-over-image (solo titolo su sfondo foto) ───────────── */
.ep-text-over {
  position: relative;
}
.ep-text-over .ep-photo {
  min-height: 70vh;
}
.ep-text-over__copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 48px;
  background: linear-gradient(to top, rgba(10,10,10,.55) 0%, transparent 55%);
  color: #fff;
}
.ep-text-over__copy .ep-kicker { color: rgba(255,255,255,.72); }
.ep-text-over__copy .ep-section-title { color: #fff; }

/* ── Layout testo + immagine affiancati ─────────────────────── */
.ep-text-image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.ep-text-image--reversed { direction: rtl; }
.ep-text-image--reversed > * { direction: ltr; }
.ep-text-image .ep-photo { min-height: 560px; }

/* ── Citazione editoriale ───────────────────────────────────── */
.ep-pullquote {
  padding: 60px 0;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.ep-pullquote p {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--ep-ink);
}
.ep-pullquote cite {
  display: block;
  margin-top: 20px;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ep-muted);
  font-style: normal;
}

/* ── Striscia orizzontale di 2 foto + testo ─────────────────── */
.ep-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  align-items: start;
}
.ep-strip--text-center {
  grid-template-columns: 1fr 420px 1fr;
  align-items: center;
  gap: 48px;
}
.ep-strip .ep-photo { min-height: 360px; }
.ep-strip__text { padding: 24px 0; }

/* ── Blocco capitolo ─────────────────────────────────────────── */
.ep-chapter {
  padding: 48px 0 32px;
  border-top: 1px solid var(--ep-line-md);
}
.ep-chapter-number {
  font-size: .7rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ep-muted);
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   HERO EDITORIALE
═══════════════════════════════════════════════════════════════ */
.ep-hero {
  padding: 60px 0 80px;
  border-bottom: 1px solid var(--ep-line);
}
.ep-hero-inner {
  display: grid;
  gap: 32px;
}

/* Intro a due colonne per le pagine editoriali portfolio */
.ep-hero-inner--page {
  grid-template-columns: 1.3fr 1fr;
  align-items: center; /* centrato in altezza — titolo vs descrizione */
  gap: 72px;
}

@media (max-width: 860px) {
  .ep-hero-inner--page {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
.ep-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.ep-hero-date {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ep-muted);
}
.ep-hero-subtitle {
  margin: 18px 0 0;
  max-width: 60ch;
  font-size: clamp(.95rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: #3a3a3a;
}

/* ═══════════════════════════════════════════════════════════════
   SEZIONE SELECTED CLIENTS / EDITORIAL FOOTER
═══════════════════════════════════════════════════════════════ */
.ep-clients {
  padding: 80px 0;
  border-top: 1px solid var(--ep-line);
}
.ep-clients-head {
  margin-bottom: 40px;
}
.ep-clients-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
}
.ep-clients-list li {
  font-size: .88rem;
  color: var(--ep-muted);
  letter-spacing: .04em;
}

/* ── CTA finale ─────────────────────────────────────────────── */
.ep-cta-section {
  padding: 100px 0 120px;
  text-align: center;
  border-top: 1px solid var(--ep-line);
}
.ep-cta-section .ep-serif-title {
  margin-bottom: 18px;
}
.ep-cta-section .ep-lead {
  margin: 0 auto 36px;
  text-align: center;
  max-width: 44ch;
}
.ep-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 8px 14px;
  border: 1px solid var(--ep-line-md);
  border-radius: 999px;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ep-muted);
  background: rgba(255,255,255,.6);
}
.ep-cta-badge::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ep-ink);
}

/* ═══════════════════════════════════════════════════════════════
   NUMERO DI PAGINA / PROGRESSO
═══════════════════════════════════════════════════════════════ */
.ep-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--ep-ink);
  z-index: 50;
  transition: width .12s linear;
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER PAGINA
═══════════════════════════════════════════════════════════════ */
.ep-footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--ep-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ep-footer-copy {
  margin: 0;
  font-size: .8rem;
  color: var(--ep-muted);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .ep-text-image            { grid-template-columns: 1fr; gap: 32px; }
  .ep-text-image .ep-photo  { min-height: 420px; }
  .ep-text-image--reversed  { direction: ltr; }
  .ep-strip--text-center    { grid-template-columns: 1fr 1fr; }
  .ep-strip--text-center .ep-strip__text { grid-column: 1 / -1; order: -1; }
}

@media (max-width: 860px) {
  .ep-shell           { width: min(calc(100% - 32px), var(--ep-max)); }
  .ep-shell--narrow   { width: min(calc(100% - 32px), 960px); }
  .ep-block           { padding-top: 60px; padding-bottom: 60px; }
  .ep-block--wide     { padding-top: 80px; padding-bottom: 80px; }
  .ep-block--breath   { padding-top: 90px; padding-bottom: 90px; }
  .ep-hero            { padding: 40px 0 60px; }
  .ep-diptych         { grid-template-columns: 1fr; gap: 12px; }
  .ep-diptych--asymm,
  .ep-diptych--asymm-r { grid-template-columns: 1fr; }
  .ep-diptych--offset .ep-photo:first-child { margin-top: 0; }
  .ep-diptych--offset .ep-photo:last-child  { margin-bottom: 0; }
  .ep-triptych        { grid-template-columns: 1fr 1fr; gap: 12px; }
  .ep-triptych--elevated .ep-photo:nth-child(2) { min-height: auto; margin-top: 0; }
  .ep-strip           { grid-template-columns: 1fr; gap: 12px; }
  .ep-strip .ep-photo { min-height: 280px; }
  .ep-isolated .ep-photo { width: 100%; }
  .ep-full-bleed--tall .ep-photo   { min-height: 70vh; }
  .ep-full-bleed--medium .ep-photo { min-height: 55vh; }
  .ep-full-bleed--compact .ep-photo { min-height: 44vh; }
  .ep-near-full .ep-photo { min-height: 65vh; }
  .ep-pullquote       { padding: 40px 0; }
  .ep-cta-section     { padding: 72px 0 88px; }
}

@media (max-width: 640px) {
  .ep-shell         { width: min(calc(100% - 24px), var(--ep-max)); }
  .ep-shell--narrow { width: min(calc(100% - 24px), 960px); }
  .ep-block         { padding-top: 48px; padding-bottom: 48px; }
  .ep-block--wide,
  .ep-block--breath { padding-top: 64px; padding-bottom: 64px; }
  .ep-hero          { padding: 28px 0 44px; }
  .ep-triptych      { grid-template-columns: 1fr; }
  .ep-diptych .ep-photo,
  .ep-triptych .ep-photo { min-height: 280px; }
  .ep-single--portrait .ep-photo  { min-height: 420px; }
  .ep-single--landscape .ep-photo { min-height: 260px; }
  .ep-text-over__copy { padding: 28px; }
  .ep-full-bleed--tall .ep-photo   { min-height: 60vh; }
  .ep-near-full .ep-photo          { min-height: 55vh; }
  .ep-header-inner { gap: 10px; }
  .ep-btn { min-height: 38px; padding: 0 14px; font-size: .8rem; }
  .ep-brand-name { display: none; }
  .ep-footer { flex-direction: column; text-align: center; gap: 12px; }
  .ep-clients { padding: 60px 0; }
  .ep-cta-section { padding: 56px 0 70px; }
}

/* ── Sezione intro con linea a sinistra ─────────────────────── */
.ep-intro-line {
  border-left: 2px solid var(--ep-ink);
  padding-left: 24px;
  margin: 0;
}

/* ── Tag tema ─────────────────────────────────────────────────── */
.ep-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ep-tags li {
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ep-muted);
  padding: 6px 12px;
  border: 1px solid var(--ep-line-md);
  border-radius: 999px;
}

/* ═══════════════════════════════════════════════════════════════
   REPORTAGE EDITORIALE — pattern magazine
   Usato in editorial-sport.html e editorial-travel.html
═══════════════════════════════════════════════════════════════ */

/* Sezione reportage */
.ep-reportage {
  padding-top: 80px;
}

/* Header: label sport/luogo + micro-intro editoriale */
.ep-report-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ep-line-md);
  margin-bottom: 52px;
}
.ep-report-label {
  font-size: .6rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ep-ink);
  flex-shrink: 0;
}
.ep-report-line {
  margin: 0;
  font-size: .78rem;
  letter-spacing: .015em;
  color: var(--ep-muted);
  text-align: right;
}

/* Cursor zoom su immagini lightbox */
.ep-photo[data-zoomable] { cursor: zoom-in; }

/* Titolo CTA sans-serif (sostituto di ep-serif-title) */
.ep-cta-title {
  font-size: clamp(1.9rem, 3.8vw, 3.8rem);
  font-weight: 800;
  line-height: .92;
  letter-spacing: -.055em;
  margin: 0 0 18px;
}

/* ── CTA variante bicolonna con contatti diretti ────────────── */
.ep-cta-section--contacts {
  text-align: left;
}
.ep-cta-section--contacts .ep-shell {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 300px);
  gap: 80px;
  align-items: start;
}
.ep-cta-section--contacts .ep-cta-title {
  font-size: clamp(1.4rem, 2.4vw, 2.4rem);
}
.ep-cta-section--contacts .ep-lead {
  text-align: left;
  margin: 0;
  max-width: none;
}
.ep-contact-list {
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}
.ep-contact-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--ep-line);
  text-decoration: none;
  color: var(--ep-ink);
  transition: opacity .18s;
}
.ep-contact-row:first-child { border-top: 1px solid var(--ep-line); }
.ep-contact-row:hover { opacity: .4; }
.ep-contact-label {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ep-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.ep-contact-value {
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: -.01em;
  text-align: right;
}
@media (max-width: 860px) {
  .ep-cta-section--contacts .ep-shell {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .ep-contact-value { text-align: left; }
}

/* Gap verticale tra blocchi immagine all'interno di un reportage */
.ep-rg-gap { margin-top: 16px; }
.ep-rg-gap-lg { margin-top: 52px; }

@media (max-width: 860px) {
  .ep-reportage     { padding-top: 60px; }
  .ep-report-header { margin-bottom: 36px; flex-wrap: wrap; }
  .ep-report-line   { text-align: left; }
  .ep-rg-gap-lg     { margin-top: 32px; }
}
@media (max-width: 640px) {
  .ep-reportage     { padding-top: 44px; }
  .ep-report-header { flex-direction: column; gap: 6px; }
}

/* ═══════════════════════════════════════════════════════════════
   PROJECT CAROUSEL
   Un progetto visibile alla volta.
   Frecce fisse ai lati — swipe su mobile — tastiera ← →.
═══════════════════════════════════════════════════════════════ */

/* ── Frecce laterali fisse ─────────────────────────────────── */
.ep-arr {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(22,22,22,.14);
  background: rgba(245,243,238,.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 1.5rem;
  color: var(--ep-ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  font-family: inherit;
  line-height: 1;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
.ep-arr:hover {
  background: var(--ep-ink);
  color: #fff;
  border-color: var(--ep-ink);
  transform: translateY(-50%) scale(1.05);
}
.ep-arr--prev { left: 20px; }
.ep-arr--next { right: 20px; }

/* Nascondi frecce quando il lightbox è aperto */
body.lb-open .ep-arr { opacity: 0; pointer-events: none; }

/* ── Track ──────────────────────────────────────────────────── */
.ep-projects {
  padding-bottom: 64px;
  overflow: hidden;
}

.ep-projects-track {
  display: flex;
  transition: transform .55s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}

/* ── Slide ──────────────────────────────────────────────────── */
.ep-project {
  flex: 0 0 100%;
  min-width: 0;
  padding: 48px 0 0;
}

/* ── Header slide: numero + titolo + tagline su una riga ────── */
.ep-project-header {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ep-line-md);
}

.ep-project-num {
  font-size: .6rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ep-muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.ep-project-name {
  margin: 0;
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.048em;
  line-height: 1;
  flex-shrink: 0;
}

.ep-project-tagline {
  margin: 0;
  font-size: .78rem;
  color: var(--ep-muted);
  letter-spacing: .01em;
  line-height: 1.5;
  margin-left: auto; /* spinge a destra */
  text-align: right;
  max-width: 28ch;
}

/* ── Spread grid (base) ─────────────────────────────────────── */
.ep-spread-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: start;
  max-width: 700px;
  margin: 0 auto;
}

.ep-spread-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Foto */
.ep-spread-col .ep-photo {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 2px;
}

.ep-spread-col .ep-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.16,1,.3,1);
}

.ep-spread-col .ep-photo:hover img { transform: scale(1.03); }

/* ── Varianti per numero di foto ────────────────────────────── */

/* 2 foto: una per colonna, portrait più alta */
.ep-spread--2 .ep-spread-col .ep-photo  { aspect-ratio: 3/4; }
.ep-spread--2 .ep-spread-col:last-child { padding-top: 100px; }

/* 3 foto: 2 sinistra + 1 destra alta */
.ep-spread--3 .ep-spread-col:last-child { padding-top: 64px; }
.ep-spread--3 .ep-spread-col:last-child .ep-photo { aspect-ratio: 2/5; }

/* 4 foto: 2+2 sfalsato */
.ep-spread--4 .ep-spread-col:last-child { padding-top: 90px; }

/* 5 foto: triptych — 2 | singola alta | 2 */
.ep-spread--5 {
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 740px;
  align-items: stretch;
}
.ep-spread--5 .ep-spread-col:first-child { padding-top: 48px; }
.ep-spread--5 .ep-spread-col:last-child  { padding-top: 80px; }
.ep-spread--5 .ep-spread-col:nth-child(2) .ep-photo {
  aspect-ratio: unset;
  flex: 1;
  min-height: 0;
}

/* 6 foto: 2+2+2 su tre colonne sfalsate */
.ep-spread--6 {
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 740px;
}
.ep-spread--6 .ep-spread-col:nth-child(2) { padding-top: 56px; }
.ep-spread--6 .ep-spread-col:last-child   { padding-top: 0; }

/* 7 foto: 2+3+2 su tre colonne sfalsate */
.ep-spread--7 {
  grid-template-columns: 1fr 1fr 1fr;
  max-width: 740px;
}
.ep-spread--7 .ep-spread-col:nth-child(2) { padding-top: 32px; }
.ep-spread--7 .ep-spread-col:last-child   { padding-top: 72px; }

/* 8 foto: flat grid 4 col × 2 righe */
.ep-spread--8 {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 1140px;
}
.ep-spread--8 .ep-spread-col {
  display: contents;
}
.ep-spread--8 .ep-photo {
  aspect-ratio: 3/2;
  border-radius: 2px;
}

/* 12 foto: flat grid 4 col × 3 righe */
.ep-spread--12 {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 1140px;
}
.ep-spread--12 .ep-spread-col {
  display: contents;
}
.ep-spread--12 .ep-photo {
  aspect-ratio: 3/2;
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   EDITORIAL LAYOUT SYSTEM v2 — 6 moduli narrativi
   feature · duo · anchor · spread-6 · flat-8 · flat-12
   ═══════════════════════════════════════════════════════════════ */

/* ── Base comune ─────────────────────────────────────────────── */
.ep-lay {
  margin: 0 auto;
  max-width: 1140px;
}
.ep-lay .ep-photo {
  overflow: hidden;
  border-radius: 2px;
  background: var(--ep-ph);
  position: relative;
}
.ep-lay .ep-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .65s cubic-bezier(.16,1,.3,1);
}
.ep-lay .ep-photo:hover img { transform: scale(1.03); }

/* ── Strip orizzontale di foto ───────────────────────────────── */
.ep-lay-strip {
  display: grid;
  gap: 12px;
}
.ep-lay-strip[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
.ep-lay-strip[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
.ep-lay-strip[data-cols="5"] { grid-template-columns: repeat(5, 1fr); }
/* Aspect portrait: più editoriale e più alta del quadrato */
.ep-lay-strip .ep-photo      { aspect-ratio: 4/5; }

/* ── Coppia simmetrica ───────────────────────────────────────── */
.ep-lay-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.ep-lay-pair .ep-photo { aspect-ratio: 3/2; }

/* ── Griglia supporto 3 colonne ──────────────────────────────── */
.ep-lay-support {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-content: start;
}
.ep-lay-support .ep-photo { aspect-ratio: 4/5; }

/* ── Griglia supporto 2 colonne (variante per 4 foto) ───────── */
.ep-lay-support--2col { grid-template-columns: repeat(2, 1fr) !important; }
.ep-lay-support--2col .ep-photo { aspect-ratio: 6/5 !important; }

/* ── MODULO FEATURE ──────────────────────────────────────────── */
/* 1 foto cinematografica (16:7) + strisce portait sotto        */
.ep-lay--feature { display: grid; gap: 12px; }
.ep-lay--feature .ep-photo--lead {
  aspect-ratio: 16/7;
  border-radius: 2px;
}

/* ── MODULO DUO ──────────────────────────────────────────────── */
/* Coppia landscape + strip sotto                               */
.ep-lay--duo { display: grid; gap: 12px; }

/* ── MODULO ANCHOR ───────────────────────────────────────────── */
/* 1 portrait dominante (sx, 2fr) + griglia supporto (dx, 3fr) */
.ep-lay--anchor {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 12px;
  align-items: start;
}
.ep-lay--anchor .ep-photo--lead {
  aspect-ratio: 4/5;
  border-radius: 2px;
}

/* ── Responsive layout — 860px ───────────────────────────────── */
@media (max-width: 860px) {
  .ep-lay--feature .ep-photo--lead   { aspect-ratio: 3/2; }
  /* strip-5: rimane a 5 col su tablet (evita orfani da 3+2) */
  .ep-lay-strip[data-cols="5"]       { grid-template-columns: repeat(5, 1fr); }
  .ep-lay-strip[data-cols="4"]       { grid-template-columns: repeat(2, 1fr); }
  .ep-lay--anchor                    { grid-template-columns: 1fr; }
  .ep-lay--anchor .ep-photo--lead    { aspect-ratio: 3/2; }
  .ep-lay-support                    { grid-template-columns: repeat(3, 1fr); }
}

/* ── Responsive layout — 640px ───────────────────────────────── */
@media (max-width: 640px) {
  /* strip-3: resta a 3 colonne — 3 immagini = nessun buco */
  .ep-lay-strip[data-cols="3"] { grid-template-columns: repeat(3, 1fr); }
  /* strip-4: 2×2 su mobile — nessun buco */
  .ep-lay-strip[data-cols="4"] { grid-template-columns: repeat(2, 1fr); }
  /* strip-5: 2+2+1 su mobile — l'ultima immagine si allarga su tutta la riga */
  .ep-lay-strip[data-cols="5"] { grid-template-columns: repeat(2, 1fr); }
  .ep-lay-strip[data-cols="5"] .ep-photo:nth-child(5) {
    grid-column: 1 / -1;
    aspect-ratio: 5/2;
  }
  .ep-lay--anchor .ep-photo--lead { aspect-ratio: 3/2; }
  .ep-lay-support              { grid-template-columns: repeat(3, 1fr); }
  .ep-lay .ep-photo--lead      { aspect-ratio: 3/2 !important; }
}

/* ── Contatore ──────────────────────────────────────────────── */
.ep-counter-bar {
  margin-top: 32px;
  text-align: center;
}

#ep-counter {
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ep-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .ep-arr               { width: 44px; height: 44px; font-size: 1.3rem; }
  .ep-arr--prev         { left: 10px; }
  .ep-arr--next         { right: 10px; }
  .ep-project-tagline   { display: none; }
  .ep-spread-grid       { max-width: 100%; }
  /* Collassa 3 colonne in 2 su tablet */
  .ep-spread--5,
  .ep-spread--6,
  .ep-spread--7         { grid-template-columns: 1fr 1fr; }
  .ep-spread--5 .ep-spread-col:last-child,
  .ep-spread--6 .ep-spread-col:last-child,
  .ep-spread--7 .ep-spread-col:last-child { display: none; }
  /* Ripristina stagger per 3-col collassati in 2 */
  .ep-spread--5 .ep-spread-col:first-child,
  .ep-spread--6 .ep-spread-col:nth-child(2),
  .ep-spread--7 .ep-spread-col:nth-child(2) { padding-top: 0; }
  .ep-spread--5 .ep-spread-col:nth-child(2),
  .ep-spread--6 .ep-spread-col:nth-child(2),
  .ep-spread--7 .ep-spread-col:nth-child(2) { padding-top: 28px; }
  /* La foto centrale del triptych ripristina aspect-ratio */
  .ep-spread--5 .ep-spread-col:nth-child(2) .ep-photo { aspect-ratio: 4/5; flex: unset; }
  /* 4 colonne → 2 colonne su tablet */
  .ep-spread--8,
  .ep-spread--12        { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ep-arr               { width: 38px; height: 38px; font-size: 1.1rem; }
  .ep-arr--prev         { left: 6px; }
  .ep-arr--next         { right: 6px; }
  .ep-project           { padding: 36px 0 0; }
  .ep-project-header    { flex-wrap: wrap; gap: 8px; }
  .ep-project-name      { font-size: clamp(1.4rem, 5vw, 2rem); }
  .ep-spread-grid       { grid-template-columns: 1fr 1fr; gap: 16px; }
  .ep-spread-col        { gap: 16px; }
  /* Azzera tutti i stagger su mobile */
  .ep-spread--2 .ep-spread-col:last-child,
  .ep-spread--3 .ep-spread-col:last-child,
  .ep-spread--4 .ep-spread-col:last-child { padding-top: 0; }
  /* 8/12 su mobile: 2 colonne, aspect-ratio quadrato */
  .ep-spread--8 .ep-photo,
  .ep-spread--12 .ep-photo { aspect-ratio: 1/1; }
  .ep-spread-col .ep-photo  { aspect-ratio: 1/1; }
  .ep-spread--3 .ep-spread-col:last-child .ep-photo { aspect-ratio: 1/1; }
  /* ep-spread--6 su mobile: mostra tutte e 6 le foto (2 colonne flat) */
  .ep-spread--6 .ep-spread-col             { display: contents !important; padding-top: 0 !important; }
  .ep-spread--6 .ep-spread-col:last-child  { display: contents !important; }
  /* Gap ridotto su mobile — più editoriale, meno collage */
  .ep-lay--feature,
  .ep-lay--duo                             { gap: 6px; }
  .ep-lay-strip,
  .ep-lay-pair,
  .ep-lay-support                          { gap: 6px; }
  .ep-spread-grid                          { gap: 6px; }
  .ep-spread-col                           { gap: 6px; }
}

/* ── Foto orfana nel layout support → span full width ─────────── */
.ep-lay-support .ep-photo:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  aspect-ratio: 16/9;
}

/* ── Anchor nav — sommario reportage ───────────────────────── */
.ep-anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--ep-line-md);
  list-style: none;
  padding-left: 0;
}
.ep-anchor-nav li {
  display: flex;
  align-items: center;
}
.ep-anchor-nav li:not(:last-child)::after {
  content: '·';
  margin: 0 10px;
  color: var(--ep-line-md);
  font-size: .9rem;
  pointer-events: none;
}
.ep-anchor-nav a {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ep-muted);
  text-decoration: none;
  transition: color .18s ease;
  white-space: nowrap;
}
.ep-anchor-nav a:hover { color: var(--ep-ink); }

@media (max-width: 640px) {
  .ep-anchor-nav  { gap: 6px 0; margin-top: 22px; padding-top: 16px; }
  .ep-anchor-nav a { font-size: .68rem; letter-spacing: .10em; }
  .ep-anchor-nav li:not(:last-child)::after { margin: 0 8px; }
}
