/* C · TRAVOLGENTE — A Private World
   Verde notte #151916 · Pergamena #F2EBDE · Ottone #C1AE86 — Italiana + Inter.
   Immagini al vivo, titoli che abitano la fotografia, capitoli come scene. */

:root {
  --bg: #151916;
  --ink: #f2ebde;
  --muted: #bcbcad;
  --rule: #4c5047;
  --accent: #c1ae86;
  --panel: #1d231f;
  --panel-ink: #f2ebde;
  --font-display: "Italiana", "Didot", serif;
  --display-leading: 1.13;
  color-scheme: dark;
}

/* Testata sopra la fotografia, poi su fondo verde notte */


/* Hero al vivo con velo per la leggibilità */
.hero { max-width: none; height: 100svh; min-height: 680px; max-height: 1080px; display: grid; place-items: center; text-align: center; overflow: hidden; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { transform-origin: center; }
.hero__veil { display: block; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 25, 19, .62) 0%, rgba(20, 25, 19, .38) 45%, rgba(20, 25, 19, .86) 100%); }
.hero__copy { position: relative; z-index: 1; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; }
.hero__eyebrow { color: var(--ink); font-size: 11px; }
.hero__title { font-size: clamp(56px, 8vw, 115px); margin: 40px 0 64px; }
.hero__cta { font-size: 11px; }
.hero__caption, .hero__count { display: block; position: absolute; bottom: 64px; z-index: 1; color: var(--ink); }
.hero__caption { left: var(--gutter); }
.hero__count { right: var(--gutter); }

.letter { padding-top: var(--section); }
.chapter__title { font-size: clamp(48px, 5.7vw, 82px); }
.style__title { font-size: clamp(56px, 8vw, 115px); }
.contents__t { font-size: clamp(30px, 3.2vw, 46px); }
.dropcap::first-letter { color: var(--accent); }
.button { color: var(--bg); background: var(--ink); }
.button:hover { background: var(--accent); }
.progress span { background: var(--accent); }

/* Immagini al vivo verso il bordo della pagina */
.split .split__media { margin-left: calc(var(--gutter) * -1); }
.split--reverse .split__media { margin-left: 0; margin-right: calc(var(--gutter) * -1); }
.split__media img { aspect-ratio: 680 / 820; }
.scene__media { margin-left: calc(var(--gutter) * -1); aspect-ratio: 1; }
.chapter--style .marquee span { font-style: normal; }

/* Il rituale come scena: fotografia piena, testo sul velo */
.ritual { position: relative; grid-template-columns: 1fr; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
.ritual__media img { aspect-ratio: 21 / 9; }
.ritual__media figcaption { display: none; }
.ritual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(21, 25, 22, .9) 0%, rgba(21, 25, 22, .62) 45%, rgba(21, 25, 22, .1) 80%); pointer-events: none; }
.ritual__text { position: absolute; z-index: 1; left: var(--gutter); right: 50%; bottom: 64px; }
.split .split__media figcaption, .split .split__cap { padding-left: var(--gutter); }
.split--reverse .split__media figcaption, .split--reverse .split__cap { padding-left: 0; }
.ritual__text p:last-child { color: var(--ink); }

.feature { background: var(--panel); }
.agenda__media img { filter: saturate(.9); }

@media (max-width: 760px) {
  .hero__caption, .hero__count { bottom: 84px; }
  .hero__title { margin: 28px 0 44px; }
  .split .split__media, .split--reverse .split__media, .scene__media { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  /* sul mobile il testo segue la fotografia, non la copre */
  .ritual { gap: 32px; }
  .ritual::after { display: none; }
  .ritual__media img { aspect-ratio: 4 / 3; }
  .ritual__text { position: static; padding: 0 var(--gutter); }
}

/* Pagine interne — la testata fissa copre l'inizio delle pagine senza fotografia al vivo */
[data-page="edition"] main, [data-page="rubric"] main { padding-top: 120px; }
.hero--article .crumbs--hero { justify-content: center; color: var(--ink); }
.hero--article .crumbs--hero a { color: var(--ink); }
.hero--article .hero__title { font-size: clamp(48px, 6vw, 92px); margin: 24px 0 28px; max-width: 16ch; }
.hero--article .hero__veil { background: radial-gradient(ellipse 70% 60% at 50% 45%, rgba(20, 25, 19, .72), rgba(20, 25, 19, .45) 70%), linear-gradient(180deg, rgba(20, 25, 19, .5), rgba(20, 25, 19, .2) 40%, rgba(20, 25, 19, .85)); }
.hero--article .hero__copy { text-shadow: 0 1px 18px rgba(0, 0, 0, .45); }
.hero--article .hero__kicker { color: var(--accent); }
.hero--article .hero__lede { font-family: var(--font-text); font-size: 19px; line-height: 1.5; max-width: 600px; margin: 22px auto 40px; color: var(--ink); }
.prose > p { color: #dcd6c9; }
.pullquote p { color: var(--accent); }
.chapters__n { color: var(--accent); }
@media (max-width: 760px) {
  [data-page="edition"] main, [data-page="rubric"] main { padding-top: 104px; }
  .hero--article .hero__lede { font-size: 17px; }
}

/* ——— Moduli C · Tank ——— */
/* grana: texture statica su un livello fisso, nessuna animazione */
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.badge { position: absolute; z-index: 2; left: var(--gutter); bottom: 120px; width: 120px; height: 120px; display: grid; place-items: center; color: var(--ink); }
.badge svg { position: absolute; inset: 0; animation: spin 22s linear infinite; }
.badge text { font: 500 9.5px var(--font-text); letter-spacing: .32em; text-transform: uppercase; fill: currentColor; }
.badge span { font-size: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }

.ghost { position: relative; text-align: center; max-width: 1100px; padding-bottom: 40px; overflow: clip; overflow-clip-margin: 0; }
.ghost__word { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%); white-space: nowrap; font-family: var(--font-display); font-size: clamp(120px, 17vw, 260px); line-height: 1; color: rgba(242, 235, 222, .045); pointer-events: none; }
.ghost__text { position: relative; font-size: clamp(32px, 3.6vw, 54px); line-height: 1.22; margin: 28px auto 36px; max-width: 22ch; }
.ghost__text em { font-style: normal; color: var(--accent); }

.ilist { position: relative; }
.ilist__list { border-top: 1px solid var(--rule); }
.ilist__list a { display: grid; grid-template-columns: 64px 1fr auto; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--rule); transition: padding .4s var(--ease), color .3s; }
.ilist__list .display { font-size: clamp(26px, 3vw, 44px); transition: color .3s; }
.ilist__list:hover a .display { color: rgba(242, 235, 222, .35); }
.ilist__list a:hover .display { color: var(--ink); }
.ilist__float { position: fixed; z-index: 5; left: 0; top: 0; width: 300px; aspect-ratio: 4 / 5; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .35s var(--ease); will-change: transform; }
.ilist__float.is-on { opacity: 1; }

.hscroll { position: relative; padding-top: var(--section); }
.hscroll__head { width: 100%; display: flex; justify-content: space-between; align-items: end; padding-top: 0; padding-bottom: 40px; }
.hscroll__count { font-variant-numeric: tabular-nums; color: var(--ink); }
.hscroll__track { display: flex; gap: 28px; padding: 0 var(--gutter) 8px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.hscroll__track::-webkit-scrollbar { display: none; }
.hcard { flex: none; width: min(26vw, 46svh, 400px); scroll-snap-align: start; }
.hcard:nth-child(even) { margin-top: 64px; }
.hcard figure { aspect-ratio: 4 / 5; overflow: hidden; margin-bottom: 18px; }
.hcard img { transition: transform .9s var(--ease); }
.hcard:hover img { transform: scale(1.05); }
.hcard h3 { font-size: clamp(22px, 2vw, 30px); line-height: 1.12; margin-top: 10px; }
.hscroll__bar { height: 1px; margin: 40px var(--gutter) 0; background: var(--rule); }
.hscroll__bar span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
/* con site.js attivo la sezione si aggancia e lo scorrimento verticale muove il binario */
.hscroll.is-pinned .hscroll__pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hscroll.is-pinned { padding-top: 0; }
.hscroll.is-pinned .hscroll__track { overflow: visible; scroll-snap-type: none; will-change: transform; }
.scenes { margin-top: var(--section); }
.scenes__item { position: sticky; top: 0; display: block; height: 100svh; max-height: 1000px; overflow: hidden; }
.scenes__item figure { position: absolute; inset: 0; }
.scenes__item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 25, 19, .25), rgba(20, 25, 19, .78)); }
.scenes__copy { position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter); bottom: 72px; }
.scenes__copy h3, .scenes__copy h2, .scenes__copy h1 { font-size: clamp(48px, 7vw, 110px); line-height: 1.02; margin: 18px 0 28px; max-width: 14ch; }
.scenes__copy .micro, .scenes__copy .link-line { color: var(--ink); }
.scenes__item--solo { position: relative; margin-top: 40px; height: 82svh; }

@media (max-width: 760px) {
  .badge { display: none; }
  .ilist__float { display: none; }
  .ilist__list a { grid-template-columns: 36px 1fr; }
  .ilist__list a > :last-child { display: none; }
  .scenes__copy { bottom: 56px; }
  .hcard { width: 72vw; }
  .hcard:nth-child(even) { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .badge svg { animation: none; } }

/* ——— Edizione C · atti con numero fantasma ——— */
.act { position: relative; padding-bottom: 32px; scroll-margin-top: 120px; }
.act__num { position: absolute; right: var(--gutter); top: calc(var(--section) - 40px); font-size: clamp(160px, 20vw, 300px); line-height: .8; color: rgba(242, 235, 222, .05); pointer-events: none; }
.act__head { position: relative; margin-bottom: 36px; }
.act__head h2 { font-size: clamp(40px, 5vw, 76px); margin-top: 14px; }

/* ——— Articolo C · parola fantasma e capitoli in numeri romani ——— */
.hero__ghost { position: absolute; z-index: 1; left: 50%; bottom: -0.18em; transform: translateX(-50%); white-space: nowrap; font-family: var(--font-display); font-size: clamp(120px, 18vw, 280px); line-height: 1; color: rgba(242, 235, 222, .08); pointer-events: none; }
.hero--article { overflow: hidden; }
.story .prose { counter-reset: atto; }
.story .prose__h { counter-increment: atto; display: grid; grid-template-columns: 72px 1fr; align-items: baseline; }
.story .prose__h::before { content: counter(atto, upper-roman); font-family: var(--font-display); font-size: 1.15em; color: var(--accent); }
.story .prose__fig--wide, .story .prose__pair { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.story .prose__pair { gap: 4px; }
.story .prose__pair img { aspect-ratio: 1; }
.story .prose__fig--wide img { aspect-ratio: 21 / 9; }
.story .prose__fig--wide figcaption, .story .prose__pair figcaption { padding: 0 var(--gutter); }

@media (max-width: 760px) {
  .act__num { top: 40px; font-size: 140px; }
  .story .prose__h { grid-template-columns: 44px 1fr; }
  .story .prose__fig--wide img { aspect-ratio: 4 / 3; }
}
.related__ilist { margin-top: 32px; }

/* ——— Testata C · minima, fluttuante, si ritira scorrendo (Tank) ——— */
.masthead--c { position: fixed; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding-block: 26px; background: transparent; }
.masthead--c.is-compact { background: linear-gradient(180deg, rgba(21, 25, 22, .94), rgba(21, 25, 22, .72) 70%, rgba(21, 25, 22, 0)); padding-block: 18px 30px; }
.masthead--c.is-hidden { transform: translateY(-110%); }
.masthead--c .masthead__logo { align-items: flex-start; }
.masthead--c .logo { width: 118px; }
.masthead--c .mh-actions { display: flex; align-items: center; gap: 32px; }
.masthead--c .mh-link { color: var(--ink); }
.masthead--c .mh-menu { display: inline-flex; align-items: center; gap: 14px; }
.masthead--c .mh-burger { width: 30px; height: 9px; transition: width .3s var(--ease); }
.masthead--c .mh-menu:hover .mh-burger { width: 40px; }
.mh-side { display: block; position: fixed; z-index: 40; left: 22px; top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; color: var(--muted); pointer-events: none; }
[data-page="edition"] main, [data-page="rubric"] main { padding-top: 96px; }

/* Menu C · nero, parola fantasma, elenco interattivo */
.overlay--c { background: #0f1210; }
.menu-c { position: relative; max-width: var(--max); margin: 0 auto; padding-top: 12vh; }
.menu-c__ghost { position: absolute; right: 0; top: 4vh; font-family: var(--font-display); font-size: clamp(140px, 20vw, 300px); line-height: 1; color: rgba(242, 235, 222, .05); pointer-events: none; }
.menu-c__grid { position: relative; display: grid; grid-template-columns: 3fr 9fr; gap: 64px; }
.menu-c__rubrics { display: flex; flex-direction: column; gap: 10px; }
.menu-c__rubrics .micro { margin-bottom: 12px; }
.menu-c__rubrics a { color: var(--ink); font-size: 17px; transition: color .3s, padding .3s; }
.menu-c__rubrics a:hover { color: var(--accent); padding-left: 8px; }
.menu-c__stories > .micro { margin-bottom: 16px; }
.menu-c__stories .ilist__list .display { font-size: clamp(22px, 2.4vw, 34px); }
.menu-c__stories .ilist__list a { padding: 14px 0; }

@media (max-width: 760px) {
  .masthead--c { padding-block: 18px; }
  .masthead--c .mh-actions { gap: 20px; }
  .mh-side { display: none; }
  [data-page="edition"] main, [data-page="rubric"] main { padding-top: 76px; }
  .menu-c__grid { grid-template-columns: 1fr; gap: 40px; }
  .menu-c { padding-top: 64px; }
}
