/* Lunatika Factory — format-hub.css (Fase 2B, hub dei format).

   PRIMO porting CSS via alias layer: le regole .fmt-* sono PORTATE da format.css
   del demo (incollate) — i loro var(--accent/--bg-card/--r-lg/--t-base/--fg…)
   risolvono dal nostro palette via tokens-demo-alias.css (dark/light automatici),
   senza ri-tradurre i valori a mano. I literali del demo (eyebrow/em PS-pink, veil
   gradients) restano verbatim: l'hero è una superficie scura in entrambi i temi.
   Pezzi senza equivalente nel demo (griglia/card edizione, empty) scritti qui.
   Aggiustamenti WP segnati con "[WP]". */

/* ===== HERO (portato — superficie scura in entrambi i temi) ===== */
.fmt-hero { position: relative; margin-top: 0; min-height: 78vh; display: flex; overflow: hidden; background: var(--lf-nero); } /* [WP] margin-top:0: header sticky, non fixed */
.fmt-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.fmt-hero-veil { position: absolute; inset: 0; z-index: 1; }
.fmt--ps .fmt-hero-img { filter: brightness(.5) saturate(1) contrast(1.04); }
.fmt--ps .fmt-hero-veil { background: linear-gradient(180deg, rgba(12,11,14,.32) 0%, rgba(12,11,14,.55) 60%, rgba(12,11,14,.85) 100%), radial-gradient(75% 60% at 20% 80%, rgba(139,34,82,.38), transparent 62%); }
.fmt--slam .fmt-hero { min-height: 70vh; background: var(--lf-notte); }
.fmt--slam .fmt-hero-veil { background: radial-gradient(70% 70% at 78% 22%, rgba(196,149,106,.1), transparent 60%); }
.fmt-hero-inner { position: relative; z-index: 2; max-width: 1240px; width: 100%; margin: 0 auto; padding: clamp(64px, 10vw, 120px) clamp(20px, 6vw, 80px) clamp(48px, 8vw, 90px); display: flex; flex-direction: column; justify-content: flex-end; } /* [WP] padding-top ridotto: niente header fixed da scavalcare */
.fmt-hero-eyebrow { display: inline-flex; align-items: center; gap: 14px; font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; margin-bottom: 28px; }
.fmt-hero-eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.fmt--ps .fmt-hero-eyebrow { color: #d88aa9; }
.fmt--slam .fmt-hero-eyebrow { color: var(--lf-rame); }
.fmt-hero-h { font-family: var(--font-display); font-weight: 600; font-size: clamp(48px, 8vw, 110px); line-height: 1; letter-spacing: -.022em; color: #f5efe6; margin: 0; max-width: 1000px; text-wrap: balance; }
.fmt-hero-h em { font-style: italic; font-weight: 400; }
.fmt--ps .fmt-hero-h em { color: #d88aa9; }
.fmt--slam .fmt-hero-h em { color: #d4aa80; }
.fmt-hero-sub { margin-top: clamp(22px, 3vw, 36px); max-width: 620px; font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.5; color: rgba(245,239,230,.8); text-wrap: pretty; }
.fmt-hero-ctas { margin-top: clamp(28px, 4vw, 44px); display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== CTA (portato) ===== */
.fmt-cta { display: inline-flex; align-items: center; gap: 10px; padding: 14px 30px; border-radius: var(--r-pill); font-family: var(--font-body); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; border: 1.5px solid transparent; white-space: nowrap; cursor: pointer; transition: all var(--t-base) var(--ease); }
.fmt-cta-fill { background: var(--lf-borgogna); border-color: var(--lf-borgogna); color: var(--lf-on-accent); }
.fmt-cta-fill:hover { background: var(--lf-borgogna-light); border-color: var(--lf-borgogna-light); transform: translateY(-2px); box-shadow: var(--sh-glow-borgogna); }
.fmt-cta-ghost { background: transparent; color: #d4aa80; border-color: rgba(196,149,106,.4); }
.fmt-cta-ghost:hover { border-color: var(--lf-rame); color: #f5efe6; background: rgba(196,149,106,.07); transform: translateY(-2px); }

/* ===== SEZIONI (portato) ===== */
.fmt-sec { padding: clamp(64px, 9vw, 110px) clamp(20px, 6vw, 100px); max-width: 1240px; margin: 0 auto; }
.fmt-sec-head { margin-bottom: clamp(32px, 4vw, 56px); }
.fmt-sec-label { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-body); font-size: 10.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-2); margin: 0 0 14px; }
.fmt-sec-label::before { content: ""; width: 28px; height: 1px; background: var(--accent-2); }
.fmt-sec-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 4.6vw, 54px); line-height: 1.05; letter-spacing: -.02em; color: var(--fg); margin: 0; text-wrap: balance; }
.fmt-sec-title em { font-style: italic; font-weight: 400; color: var(--accent-2-hover); }
[data-theme="light"] .fmt-sec-label { color: var(--lf-borgogna-soft); }

/* ===== MANIFESTO (portato) ===== */
.fmt-manifesto { max-width: 720px; }
.fmt-manifesto p { font-family: var(--font-body); font-size: 17px; font-weight: 300; line-height: 1.78; color: rgba(var(--fg-rgb), .86); margin: 0 0 22px; }
.fmt-manifesto p:first-of-type::first-letter { font-family: var(--font-display); font-size: 72px; font-weight: 500; float: left; line-height: .86; padding: 7px 13px 0 0; color: var(--accent-2-hover); }

/* ===== EDIZIONI — [WP] nessun equivalente nel demo (usava FmtPhases) ===== */
.fmt-edgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: clamp(14px, 2vw, 24px); }
.fmt-edcard { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--bg-card); border: 1px solid var(--lf-card-border); border-radius: var(--r-lg); color: var(--fg); transition: all var(--t-base) var(--ease); }
.fmt-edcard:hover { border-color: var(--lf-card-border-strong); transform: translateY(-2px); box-shadow: var(--sh-2); color: var(--fg); }
.fmt-edcard__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fmt-edcard__roman { font-family: var(--font-display); font-style: italic; font-size: clamp(40px, 6vw, 64px); line-height: .9; color: var(--accent); }
[data-theme="light"] .fmt-edcard__roman { color: var(--lf-borgogna-soft); }
.fmt-edcard__status { align-self: flex-start; }
.fmt-edcard__title { font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.15; }
.fmt-edcard__sub { color: var(--fg-muted); font-size: 14px; line-height: 1.5; }
.fmt-edcard__cta { margin-top: 4px; font-family: var(--font-body); font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); opacity: 0; transition: opacity var(--t-base) var(--ease); }
.fmt-edcard:hover .fmt-edcard__cta, .fmt-edcard:focus-within .fmt-edcard__cta { opacity: 1; }
.fmt-empty { text-align: center; padding: clamp(44px, 7vw, 72px) 24px; border: 1px dashed var(--lf-card-border-strong); border-radius: var(--r-xl); }
.fmt-empty-glyph { display: block; font-size: 36px; color: var(--accent-2); margin-bottom: 14px; }
.fmt-empty p { font-family: var(--font-display); font-style: italic; font-size: 17.5px; color: var(--fg-muted); margin: 0; }

/* ===== CANDIDATURA chiusa / countdown (portato) ===== */
.fmt-closed { text-align: center; padding: clamp(40px, 5vw, 64px) clamp(24px, 4vw, 52px); display: flex; flex-direction: column; align-items: center; gap: 22px; background: var(--bg-card); border: 1px solid var(--lf-card-border); border-radius: var(--r-xl); }
.fmt-closed .fmt-sec-label { margin: 0; }
.fmt-closed .fmt-sec-title { max-width: 16ch; }
.fmt-closed-date { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-2); }
[data-theme="light"] .fmt-closed-date { color: var(--lf-borgogna-soft); }
.fmt-closed-body { font-family: var(--font-display); font-style: italic; font-size: 16.5px; line-height: 1.55; color: var(--fg-muted); margin: 0; max-width: 520px; text-wrap: pretty; }
/* Countdown (portato): valori resi lato server, animati dal JS (progressive enh.). */
.fmt-countdown { display: flex; gap: clamp(20px, 4vw, 44px); }
.fmt-count-cell { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 84px; }
.fmt-count-cell .n { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(48px, 6vw, 76px); line-height: .95; letter-spacing: -.02em; color: var(--fg); }
.fmt-count-cell .l { font-family: var(--font-body); font-size: 10px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-2); }
[data-theme="light"] .fmt-count-cell .l { color: var(--lf-borgogna-soft); }
@media (max-width: 480px) { .fmt-countdown { gap: 18px; } .fmt-count-cell { min-width: 0; flex: 1; } }
.fmt-form-wrap { max-width: 860px; }

/* ===== CTA FINALE (portato) ===== */
.fmt-final { padding: clamp(64px, 9vw, 110px) clamp(20px, 6vw, 100px) clamp(80px, 10vw, 130px); max-width: 1240px; margin: 0 auto; }
.fmt-final-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.fmt-final-copy .fmt-sec-title { margin-bottom: 18px; }
.fmt-final-sub { font-family: var(--font-display); font-style: italic; font-size: 17px; line-height: 1.55; color: var(--fg-muted); margin: 0 0 26px; max-width: 480px; }
.fmt-final-socials { display: flex; gap: 10px; flex-wrap: wrap; }
.fmt-soc-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--lf-card-border); font-family: var(--font-body); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-muted); white-space: nowrap; transition: all var(--t-base) var(--ease); }
.fmt-soc-pill:hover { border-color: var(--accent-2); color: var(--accent-2-hover); transform: translateY(-2px); }
.fmt-final-news .lf-iscriviti { display: inline-flex; }

/* ===== RESPONSIVE (portato + [WP] edgrid) ===== */
@media (max-width: 1024px) {
	.fmt-final-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
	.fmt-hero { min-height: 64vh; }
	.fmt-hero-inner { padding: 64px 18px 44px; }
	.fmt-hero-h { font-size: clamp(38px, 11vw, 60px); }
	.fmt-hero-sub { font-size: 16px; }
	.fmt-sec { padding: 52px 18px; }
	.fmt-manifesto p { font-size: 15.5px; }
	.fmt-manifesto p:first-of-type::first-letter { font-size: 54px; padding: 4px 11px 0 0; }
	.fmt-final { padding: 52px 18px 72px; }
}
@media (prefers-reduced-motion: reduce) {
	.fmt-cta, .fmt-edcard, .fmt-soc-pill, .fmt-edcard__cta { transition: none; }
	.fmt-cta:hover, .fmt-edcard:hover, .fmt-soc-pill:hover { transform: none; }
}

/* [DS-muted 16/07] eyebrow AA in LIGHT: il rame (--lf-rame #8f6240 in light)
   sul crema scende sotto AA (~4.35:1, pink Permette Signorina 2.13) su testo
   minuscolo maiuscolo. Convenzione del tema (già su HoF card/modal, chi-siamo,
   taccuino feature): in LIGHT l'occhiello passa a --lf-borgogna-soft (#6e1c41 =
   7.3–10:1 sui fondi chiari). Dark invariato (rame ~7.3:1). Hero FOTO (fondo
   scuro) esclusi via :not(). */
[data-theme="light"] .fmt--ps .fmt-hero-eyebrow,
[data-theme="light"] .fmt--slam .fmt-hero-eyebrow { color: var(--lf-borgogna-soft); }
