/* Racconti Invisibili — homepage "galleria di notte"
   Fraunces è self-hosted (fonts/fraunces-*.woff2): nessuna richiesta a CDN terzi. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("/fonts/fraunces-roman.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
}

:root {
  --ink: #0E0C0A;
  --coal: #16120E;
  --panna: #EFE7D8;
  --smoke: #A2947F;
  --oro: #C9A356;
  --oro-dim: rgba(201, 163, 86, .45);
  --line: rgba(239, 231, 216, .13);
  --serif-display: "Fraunces", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --serif-text: "Fraunces", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --img-hero: url("/images/home/hero-1920.jpg");
  --img-bubble: url("/images/home/bubble-1600.jpg");
  --img-abeba: url("/images/home/card-abeba.jpg");
  --img-alina: url("/images/home/card-alina.jpg");
  --img-amina: url("/images/home/card-amina.jpg");
  --img-lara: url("/images/home/card-lara.jpg");
  --img-vera: url("/images/home/card-vera.jpg");
  --img-sara: url("/images/home/card-sara.jpg");
}
@media (max-width: 720px) {
  :root { --img-hero: url("/images/home/hero-960.jpg"); }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--panna);
  font-family: var(--serif-text);
  font-size: 1.0625rem;
  font-weight: 340;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; }

/* ---------- utility type roles ---------- */
.label {
  font-family: var(--sans);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--oro);
}

.wrap { max-width: 1140px; margin-inline: auto; padding-inline: clamp(1.25rem, 5vw, 3rem); }

/* ---------- reveal on scroll ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.rv.in { opacity: 1; transform: none; }
.rv2 { transition-delay: .15s; }
.rv3 { transition-delay: .3s; }

/* ---------- nav ---------- */
nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem);
  transition: background .4s ease, border-color .4s ease, padding .4s ease;
  border-bottom: 1px solid transparent;
}
nav.solid {
  background: rgba(14, 12, 10, .88);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  padding-block: .8rem;
}
.brand {
  font-family: var(--serif-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: .02em;
  text-decoration: none;
}
.brand em { color: var(--oro); font-style: italic; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-family: var(--sans); font-size: .8125rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--panna); opacity: .8;
  transition: opacity .2s;
}
.nav-links a:hover { opacity: 1; }
.nav-cta {
  border: 1px solid var(--oro-dim);
  padding: .55rem 1.1rem;
  color: var(--oro) !important; opacity: 1 !important;
  transition: background .25s, color .25s;
}
.nav-cta:hover { background: var(--oro); color: var(--ink) !important; }
@media (max-width: 760px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .brand { white-space: nowrap; }
  .nav-cta { padding: .5rem .8rem; font-size: .6875rem; letter-spacing: .08em; white-space: nowrap; }
}

/* ---------- hero ---------- */
header {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.hero-art {
  position: absolute; inset: -6%;
  background: var(--img-hero) center 22% / cover no-repeat;
  animation: kenburns 26s ease-out forwards;
}
@keyframes kenburns {
  from { transform: scale(1.09); }
  to   { transform: scale(1); }
}
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14,12,10,.55) 0%, rgba(14,12,10,.1) 30%, rgba(14,12,10,.12) 55%, rgba(14,12,10,.93) 88%, var(--ink) 100%);
}
.hero-inner {
  position: relative;
  padding: 0 clamp(1.25rem, 5vw, 4rem) clamp(3rem, 7vh, 5.5rem);
  max-width: 1400px; width: 100%; margin-inline: auto;
}
.hero-eyebrow {
  color: var(--panna); opacity: 0;
  animation: fadeup 1.2s ease .4s forwards;
}
.hero-eyebrow b { color: var(--oro); font-weight: 600; }
h1 {
  margin: .7rem 0 1rem;
  font-family: var(--serif-display);
  font-weight: 380;
  font-size: clamp(3.4rem, 10.5vw, 8.5rem);
  line-height: .96;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.h1-line { display: block; opacity: 0; animation: fadeup 1.2s ease .7s forwards; }
.ghost {
  display: block;
  font-style: italic;
  padding-right: .08em; /* keep italic overshoot inside the box */
  color: transparent;
  -webkit-text-stroke: 1px rgba(239, 231, 216, .55);
  background: linear-gradient(105deg, var(--panna) 46%, rgba(239,231,216,0) 54%);
  background-size: 230% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  opacity: 0;
  animation: fadeup 1.2s ease 1.1s forwards, fill-in 2.6s ease 1.9s forwards;
}
@keyframes fill-in { to { background-position: 0 0; } }
@keyframes fadeup {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
.hero-sub {
  max-width: 34em; margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(239, 231, 216, .88);
  opacity: 0; animation: fadeup 1.2s ease 1.5s forwards;
}
.hero-hint {
  position: absolute; right: clamp(1.25rem, 4vw, 3rem); bottom: 2.6rem;
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--sans); font-size: .6875rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--smoke);
  writing-mode: vertical-rl;
  opacity: 0; animation: fadeup 1.2s ease 2.2s forwards;
}
.hero-hint::after {
  content: ""; width: 1px; height: 54px;
  background: linear-gradient(180deg, var(--oro), transparent);
}
@media (max-width: 900px) { .hero-hint { display: none; } }

/* ---------- section scaffolding ---------- */
section { padding-block: clamp(5rem, 12vh, 9rem); }
.sec-head { display: flex; align-items: baseline; gap: 1.6rem; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }
.sec-head::after { content: ""; flex: 1; height: 1px; background: var(--line); transform: translateY(-4px); }
h2 {
  margin: .5rem 0 0;
  font-family: var(--serif-display);
  font-weight: 380;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}

/* ---------- manifesto ---------- */
.manifesto p {
  max-width: 24em; margin: 0 auto;
  font-family: var(--serif-display);
  font-weight: 350;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.45; text-align: center; text-wrap: balance;
}
.manifesto em { font-style: italic; color: var(--oro); }
.manifesto .post {
  max-width: 38em; margin: 2.2rem auto 0;
  font-family: var(--serif-text); font-size: 1.0625rem;
  color: var(--smoke); text-align: center;
}

/* ---------- process / obiettivi columns ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { border-top: 1px solid var(--line); padding-top: 1.6rem; }
.step .n {
  font-family: var(--serif-display); font-style: italic;
  font-size: 1rem; color: var(--oro); letter-spacing: .08em;
}
.step h3 {
  margin: .6rem 0 .7rem;
  font-family: var(--serif-display); font-weight: 400;
  font-size: 1.55rem; line-height: 1.2;
}
.step p { margin: 0; color: var(--smoke); font-size: 1rem; }

/* ---------- interlude (bolla) ---------- */
.interlude {
  position: relative; min-height: 92svh;
  display: flex; align-items: flex-end;
  background: var(--img-bubble) center / cover no-repeat;
  padding: 0;
}
.interlude-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(14,12,10,.25) 26%, rgba(14,12,10,.3) 58%, rgba(14,12,10,.96) 100%);
}
.interlude-inner {
  position: relative; width: 100%;
  max-width: 1140px; margin-inline: auto;
  padding: 40vh clamp(1.25rem, 5vw, 3rem) clamp(3.5rem, 8vh, 6rem);
}
.interlude blockquote {
  margin: 0; max-width: 17em;
  font-family: var(--serif-display); font-style: italic; font-weight: 350;
  font-size: clamp(1.9rem, 4.4vw, 3.4rem); line-height: 1.22;
  text-wrap: balance;
}
.interlude blockquote strong { font-style: normal; font-weight: 400; color: var(--oro); }
.interlude .att {
  margin-top: 1.4rem; font-family: var(--sans);
  font-size: .8125rem; letter-spacing: .06em; color: var(--smoke);
}

/* ---------- data wall ---------- */
.dati { background: var(--coal); border-block: 1px solid var(--line); }
.stat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--line); border-top: 1px solid var(--line);
}
@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .stat-grid { grid-template-columns: 1fr; } }
.stat {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex; flex-direction: column; gap: .9rem;
}
.stat .num {
  font-family: var(--serif-display); font-weight: 340;
  font-size: clamp(3rem, 5.5vw, 4.4rem);
  line-height: 1; color: var(--oro);
  font-variant-numeric: tabular-nums;
}
.stat .num small { font-size: .45em; color: var(--panna); }
.stat p { margin: 0; font-size: .9375rem; line-height: 1.55; flex: 1; }
.stat p em { color: var(--panna); font-style: italic; }
.stat .src, .stat .src a {
  font-family: var(--sans); font-size: .6875rem;
  color: var(--smoke); letter-spacing: .03em; line-height: 1.5;
}
.stat .src a { text-decoration: underline; text-decoration-color: rgba(162, 148, 127, .4); text-underline-offset: 2px; }
.stat .src a:hover { color: var(--panna); }
.dati .coda {
  max-width: 44em; margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  text-align: center; font-family: var(--serif-display); font-weight: 350;
  font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.55;
  color: var(--panna);
}
.dati .coda em { color: var(--oro); }

/* ---------- gallery wall (salon hang) ---------- */
.sec-sub {
  margin: .9rem 0 0; max-width: 38em;
  font-size: 1rem; color: var(--smoke);
}
.parete {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2.4rem, 6vh, 4rem) clamp(1.4rem, 3vw, 2.4rem);
  align-items: start;
}
.quadro {
  grid-column: span 5;
  text-decoration: none;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.quadro .tela { aspect-ratio: 1 / 1; }
.quadro:nth-child(4n+1), .quadro:nth-child(4n) { grid-column: span 7; }
.quadro:nth-child(4n+1) .tela, .quadro:nth-child(4n) .tela { aspect-ratio: 4 / 3; }
/* la parete "a salon": le cornici strette pendono un po' più in basso */
.quadro:nth-child(4n+2), .quadro:nth-child(4n+3) { margin-top: clamp(1.5rem, 4vh, 3rem); }
.cornice {
  border: 1px solid var(--oro-dim);
  padding: clamp(.7rem, 1.4vw, 1.1rem);       /* il passe-partout */
  background: rgba(239, 231, 216, .02);
  transition: border-color .35s ease, box-shadow .35s ease;
}
.cornice .tela {
  display: block;
  background-size: cover; background-position: center;
  filter: saturate(.88) brightness(.92);
  transition: filter .5s ease;
}
.quadro:hover .cornice, .quadro:focus-visible .cornice {
  border-color: var(--oro);
  box-shadow: 0 0 60px rgba(201, 163, 86, .13), 0 20px 50px rgba(0,0,0,.5);
}
.quadro:hover .tela { filter: saturate(1.05) brightness(1.04); }
.didascalia { padding-inline: .2rem; }
.didascalia .n {
  font-family: var(--sans); font-size: .625rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--smoke);
}
.didascalia h3 {
  margin: .45rem 0 .4rem;
  font-family: var(--serif-display); font-weight: 400; font-style: italic;
  font-size: 1.45rem; line-height: 1.2; color: var(--panna);
}
.didascalia p {
  margin: 0 0 .8rem; font-size: .9375rem; color: var(--smoke);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.leggi {
  font-family: var(--sans); font-size: .75rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--oro);
}
/* la targa finale: attraversa tutta la parete, qualunque sia il numero di storie */
.parete .quadro-tutte { grid-column: 1 / -1; margin-top: 0; }
.quadro-tutte .cornice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 2rem;
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1.4rem, 4vw, 2.8rem);
}
.tutte-txt {
  font-family: var(--serif-display); font-style: italic;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem); color: var(--panna);
  line-height: 1.35;
}
.parete-note {
  margin: 2.4rem 0 0;
  font-family: var(--sans); font-size: .75rem; letter-spacing: .04em; color: var(--smoke);
}
@media (max-width: 880px) {
  .parete { grid-template-columns: 1fr; }
  .quadro, .quadro:nth-child(4n+1), .quadro:nth-child(4n),
  .quadro:nth-child(4n+2), .quadro:nth-child(4n+3) { grid-column: auto; margin-top: 0; }
  .quadro .tela, .quadro:nth-child(4n+1) .tela, .quadro:nth-child(4n) .tela { aspect-ratio: 4 / 3; }
}

/* ---------- big quote ---------- */
.voce { text-align: center; }
.voce blockquote {
  margin: 0 auto; max-width: 18em;
  font-family: var(--serif-display); font-style: italic; font-weight: 350;
  font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.3; text-wrap: balance;
}
.voce blockquote::before { content: "«"; color: var(--oro); }
.voce blockquote::after { content: "»"; color: var(--oro); }
.voce .att { margin-top: 1.6rem; font-family: var(--sans); font-size: .8125rem; letter-spacing: .08em; color: var(--smoke); }
.voce .att a { color: var(--oro); text-decoration: none; border-bottom: 1px solid var(--oro-dim); }

/* ---------- RSI video ---------- */
.tv .tv-box { max-width: 880px; margin-inline: auto; }
.tv .cornice { display: block; }
.tv .schermo {
  position: relative; aspect-ratio: 16 / 9; background: #000;
}
.tv .schermo iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; border: 0;
}
.tv .tv-caption {
  margin: 1.2rem 0 0; text-align: center;
  font-family: var(--sans); font-size: .8125rem; letter-spacing: .05em;
  color: var(--smoke);
}

/* ---------- CTA ---------- */
.segnala { padding-block: clamp(5rem, 14vh, 10rem); }
.porta {
  max-width: 720px; margin-inline: auto; text-align: center;
  border: 1px solid var(--oro-dim);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  position: relative;
  background:
    radial-gradient(ellipse 70% 90% at 50% 110%, rgba(201, 163, 86, .13), transparent 70%),
    var(--coal);
}
.porta h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 1rem; }
.porta p { max-width: 30em; margin: 0 auto 2.2rem; color: var(--smoke); }
.btn-oro {
  display: inline-block; text-decoration: none;
  font-family: var(--sans); font-size: .8125rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); background: var(--oro);
  padding: 1.05rem 2.6rem;
  transition: background .25s, transform .25s;
}
.btn-oro:hover { background: #DDBA6E; transform: translateY(-2px); }
.porta .alt {
  margin: 1.4rem 0 0; font-family: var(--sans); font-size: .8125rem; color: var(--smoke);
}
.porta .alt a { color: var(--oro); text-decoration: none; border-bottom: 1px solid var(--oro-dim); }
.porta .anon { margin: 1.6rem 0 0; font-family: var(--sans); font-size: .75rem; color: var(--smoke); }

/* ---------- a cura di ---------- */
.curadi .chi {
  display: grid; grid-template-columns: 200px 1fr;
  gap: clamp(1.8rem, 4vw, 3.5rem); align-items: center;
}
@media (max-width: 720px) { .curadi .chi { grid-template-columns: 1fr; justify-items: start; } }
.curadi .chi-logo {
  background: var(--panna); border: 1px solid var(--oro-dim);
  padding: 1.2rem; width: 200px;
}
.curadi .chi-logo img { display: block; width: 100%; height: auto; }
.curadi .chi p { margin: 0 0 1rem; color: var(--smoke); max-width: 44em; }
.curadi .chi p strong { color: var(--panna); font-weight: 400; }
.curadi .chi p a { color: var(--oro); text-decoration: none; border-bottom: 1px solid var(--oro-dim); }

/* ---------- partner band ---------- */
.partner {
  background: var(--panna); color: var(--ink);
  padding-block: clamp(2.5rem, 6vh, 4rem);
}
.partner .label { color: #7A6335; }
.partner-logos {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(1.8rem, 4vw, 3.2rem);
  margin-top: 2rem;
}
.partner-logos img {
  height: clamp(38px, 5vw, 52px); width: auto;
  mix-blend-mode: multiply;   /* fonde gli sfondi bianchi dei JPEG nella banda */
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 3rem 0 3.5rem; }
.foot {
  display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start;
}
.foot .brand { font-size: 1.3rem; }
.foot p { max-width: 34em; margin: .8rem 0 0; font-size: .9375rem; color: var(--smoke); }
.foot-links { display: flex; flex-direction: column; gap: .7rem; }
.foot-links a {
  font-family: var(--sans); font-size: .8125rem; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--smoke);
  transition: color .2s;
}
.foot-links a:hover { color: var(--panna); }
.foot-note {
  margin-top: 2.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
  font-family: var(--sans); font-size: .75rem; color: var(--smoke); letter-spacing: .03em;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art { animation: none; transform: none; }
  .h1-line, .hero-eyebrow, .hero-sub, .hero-hint { animation: fadeup .01s forwards; }
  .ghost {
    animation: fadeup .01s forwards;
    background-position: 0 0; -webkit-text-stroke: 0;
    color: var(--panna); background: none;
  }
  .rv { transition: none; opacity: 1; transform: none; }
}
