/* ══════════════════════════════════════
   progettodieci — Design System
   ══════════════════════════════════════ */

:root {
    --black: #080808;
    --cream: #f0ebe0;
    --cream-soft: rgba(240,235,224,0.72);
    --cream-muted: rgba(240,235,224,0.35);
    --cream-ghost: rgba(240,235,224,0.12);
    --gold: #c9a96e;
    --gold-soft: rgba(201,169,110,0.25);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
    background: var(--black); color: var(--cream);
    font-family: 'Montserrat', sans-serif; font-weight: 300;
    line-height: 1.85; overflow-x: hidden;
}

/* Film grain */
body::before {
    content: ''; position: fixed; inset: 0;
    pointer-events: none; z-index: 9999; opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
}

/* Ambient glows */
.ambient { position: fixed; width: 600px; height: 600px; border-radius: 50%; filter: blur(180px); pointer-events: none; z-index: 0; }
.ambient--t { top: -200px; right: -100px; background: var(--gold); opacity: .06; }
.ambient--b { bottom: -200px; left: -200px; background: var(--cream); opacity: .04; }


/* ── Navigation ── */
nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 1001; padding: 0 28px; transition: all .4s ease; background: transparent; }
nav.scrolled { background: rgba(8,8,8,0.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.nav-inner { max-width: 740px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav-logo { font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: .7rem; letter-spacing: .3em; text-transform: lowercase; color: var(--cream-muted); text-decoration: none; transition: color .3s; }
.nav-logo:hover { color: var(--cream); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cream-muted); text-decoration: none; transition: color .3s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--gold); transition: width .3s ease; }
.nav-links a:hover { color: var(--cream); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--cream); }
.nav-links a.active::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px 0; }
.nav-toggle span { width: 22px; height: 1px; background: var(--cream-muted); transition: all .3s; }

/* Progress bar */
.progress-track { position: fixed; top: 60px; left: 0; width: 100%; height: 2px; background: var(--cream-ghost); z-index: 1000; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--cream-muted), var(--gold)); transition: width .1s linear; }

/* Container */
.container { max-width: 740px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }


/* ── Hero (index) ── */
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.logo-image { max-width: 340px; width: 100%; height: auto; opacity: 0; transform: scale(.95); animation: heroReveal 1.6s cubic-bezier(.22,1,.36,1) .2s forwards; }
.hero-hint { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; animation: fadeIn 1s ease 2s forwards; }
.hero-hint span { font-size: .6rem; letter-spacing: .35em; text-transform: uppercase; color: var(--cream-muted); }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--cream-muted), transparent); animation: scrollPulse 2s ease-in-out infinite; }


/* ── Manifesto (index) ── */
.manifesto { padding: 80px 0 60px; }
.manifesto-opening { font-family: 'GFS Didot', serif; font-size: 1.5rem; font-weight: 400; color: var(--cream); line-height: 1.65; margin-bottom: 3rem; }
.manifesto p { margin-bottom: 2.2rem; font-size: 1.02rem; color: var(--cream-soft); }
.manifesto p strong { color: var(--cream); font-weight: 400; }
.quote-block { margin: 4.5rem 0; padding: 3rem 0; position: relative; }
.quote-block::before { content: ''; position: absolute; top: 0; left: 0; width: 1px; height: 100%; background: linear-gradient(to bottom, transparent, var(--gold-soft), var(--gold), var(--gold-soft), transparent); }
.quote-block blockquote { font-family: 'Cormorant Garamond', serif; font-size: 1.65rem; font-style: italic; font-weight: 400; color: var(--cream); line-height: 1.6; padding-left: 32px; }
.divider { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 4rem 0; opacity: .3; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, transparent, var(--cream-muted), transparent); }
.divider-diamond { width: 6px; height: 6px; transform: rotate(45deg); background: var(--gold); opacity: .6; }
.closing { font-family: 'GFS Didot', serif; font-size: 1.25rem; color: var(--cream); line-height: 1.7; margin-top: 2rem; }
.invitation { font-family: 'Cormorant Garamond', serif; font-size: 1.55rem; font-style: italic; color: var(--cream); margin-top: 3.5rem; padding-top: 2.5rem; position: relative; }
.invitation::before { content: ''; position: absolute; top: 0; left: 0; width: 60px; height: 1px; background: var(--gold); opacity: .5; }
.number-accent { font-family: 'GFS Didot', serif; font-size: 8rem; line-height: 1; color: var(--cream-ghost); position: absolute; right: -40px; top: -20px; pointer-events: none; user-select: none; }
.definition-section { position: relative; margin: 3rem 0; }
.definition-section .number-accent { right: -20px; top: -50px; }

/* Author (index) */
.author-section { margin-top: 5rem; padding-top: 3rem; display: flex; align-items: center; gap: 28px; border-top: 1px solid var(--cream-ghost); }
.author-photo-wrap { position: relative; flex-shrink: 0; }
.author-photo-wrap::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--gold-soft); }
.author-photo { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; filter: grayscale(20%) contrast(1.05); }
.author-info { display: flex; flex-direction: column; }
.author-signature { height: 48px; width: auto; margin-bottom: 8px; opacity: .85; }
.author-name { font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: .78rem; letter-spacing: .14em; color: var(--cream-muted); }

/* CTA (index) */
.cta-section { margin-top: 80px; padding: 80px 0; text-align: center; position: relative; }
.cta-section::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 1px; height: 60px; background: linear-gradient(to bottom, transparent, var(--gold-soft)); }
.cta-label { font-family: 'Montserrat', sans-serif; font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--cream-muted); margin-bottom: 32px; }
.cta-button { display: inline-block; font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; color: var(--black); background: linear-gradient(135deg, var(--cream), #d4cfc5); padding: 20px 56px; text-decoration: none; overflow: hidden; transition: all .5s cubic-bezier(.22,1,.36,1); border: none; position: relative; }
.cta-button::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent); transition: left .6s ease; }
.cta-button:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(201,169,110,.15); }
.cta-button:hover::before { left: 100%; }


/* ── Diario page ── */
.page-header { padding-top: 140px; padding-bottom: 60px; text-align: center; }
.section-label { font-family: 'Montserrat', sans-serif; font-size: .65rem; letter-spacing: .35em; text-transform: uppercase; color: var(--gold); opacity: .7; margin-bottom: 12px; }
.section-title { font-family: 'GFS Didot', serif; font-size: 2.4rem; color: var(--cream); font-weight: 400; }
.section-subtitle { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.1rem; color: var(--cream-muted); margin-top: 12px; }
.episodes-list { padding: 0 0 60px; }
.ep-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--cream-ghost); padding: 36px 32px; margin-bottom: 24px; transition: all .5s cubic-bezier(.22,1,.36,1); position: relative; overflow: hidden; }
.ep-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 0; background: var(--gold); transition: height .5s cubic-bezier(.22,1,.36,1); }
.ep-card:hover { border-color: var(--cream-muted); transform: translateY(-3px); box-shadow: 0 16px 48px rgba(0,0,0,.4); }
.ep-card:hover::before { height: 100%; }
.ep-card-number { font-family: 'Montserrat', sans-serif; font-size: .58rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); opacity: .7; margin-bottom: 10px; }
.ep-card-title { font-family: 'GFS Didot', serif; font-size: 1.45rem; color: var(--cream); font-weight: 400; line-height: 1.35; margin-bottom: 12px; }
.ep-card-excerpt { font-size: .88rem; color: var(--cream-muted); line-height: 1.7; margin-bottom: 16px; }
.ep-card-meta { display: flex; align-items: center; justify-content: space-between; }
.ep-card-date { font-family: 'Montserrat', sans-serif; font-size: .62rem; letter-spacing: .15em; color: var(--cream-muted); }
.ep-card-read { font-family: 'Montserrat', sans-serif; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); opacity: .7; transition: opacity .3s; }
.ep-card:hover .ep-card-read { opacity: 1; }
.ep-card-arrow { display: inline-block; transition: transform .3s; margin-left: 4px; }
.ep-card:hover .ep-card-arrow { transform: translateX(4px); }
.coming-soon { text-align: center; padding: 60px 0 40px; border-top: 1px solid var(--cream-ghost); margin-top: 20px; }
.coming-soon p { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.15rem; color: var(--cream-muted); }


/* ── Article page ── */
.article-hero { padding-top: 140px; padding-bottom: 50px; text-align: center; }
.article-back { display: inline-flex; align-items: center; gap: 8px; font-family: 'Montserrat', sans-serif; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); text-decoration: none; transition: color .3s; margin-bottom: 40px; }
.article-back:hover { color: var(--cream); }
.article-back-arrow { transition: transform .3s; }
.article-back:hover .article-back-arrow { transform: translateX(-4px); }
.article-number { font-family: 'Montserrat', sans-serif; font-size: .6rem; letter-spacing: .35em; text-transform: uppercase; color: var(--gold); opacity: .7; margin-bottom: 14px; }
.article-title { font-family: 'GFS Didot', serif; font-size: 2.4rem; color: var(--cream); font-weight: 400; line-height: 1.3; max-width: 600px; margin: 0 auto; }
.article-date { font-family: 'Montserrat', sans-serif; font-size: .65rem; letter-spacing: .15em; color: var(--cream-muted); margin-top: 20px; }
.article-body { padding: 0 0 60px; }
.article-body p { font-size: 1rem; color: var(--cream-soft); margin-bottom: 1.8rem; line-height: 1.9; }
.article-body p:first-child { font-family: 'GFS Didot', serif; font-size: 1.15rem; color: var(--cream); line-height: 1.7; }
.article-body p:first-child::first-letter { font-family: 'GFS Didot', serif; font-size: 3.4rem; float: left; line-height: .82; margin-right: 10px; margin-top: 6px; color: var(--gold); opacity: .7; }
.pull-quote { margin: 3.5rem 0; padding: 2.5rem 0; position: relative; }
.pull-quote::before { content: ''; position: absolute; top: 0; left: 0; width: 1px; height: 100%; background: linear-gradient(to bottom, transparent, var(--gold-soft), var(--gold), var(--gold-soft), transparent); }
.pull-quote p { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-style: italic; color: var(--cream); line-height: 1.6; padding-left: 28px; margin: 0 !important; }
.article-closing { border-top: 1px solid var(--cream-ghost); padding-top: 2.5rem; margin-top: 3.5rem; }
.article-closing p { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.2rem; color: var(--cream); line-height: 1.7; margin-bottom: 1.2rem; }
.article-author { margin-top: 4rem; padding-top: 2.5rem; display: flex; align-items: center; gap: 24px; border-top: 1px solid var(--cream-ghost); }
.article-author-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; filter: grayscale(20%) contrast(1.05); }
.article-author-info { display: flex; flex-direction: column; gap: 2px; }
.article-author-name { font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: .82rem; color: var(--cream); letter-spacing: .05em; }
.article-author-role { font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: .7rem; color: var(--cream-muted); letter-spacing: .1em; }
.article-nav { display: flex; justify-content: center; gap: 32px; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--cream-ghost); }
.article-nav a { font-family: 'Montserrat', sans-serif; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cream-muted); text-decoration: none; transition: color .3s; }
.article-nav a:hover { color: var(--cream); }


/* ── Footer ── */
footer { margin-top: 100px; text-align: center; padding-bottom: 48px; }
.footer-logo { font-family: 'Montserrat', sans-serif; font-weight: 300; font-size: .72rem; letter-spacing: .4em; text-transform: lowercase; color: var(--cream-muted); opacity: .5; text-decoration: none; }
.footer-tagline { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: .85rem; color: var(--cream-muted); opacity: .35; margin-top: 8px; }


/* ── Animations ── */
@keyframes heroReveal { to { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes scrollPulse { 0%, 100% { opacity: .4; transform: scaleY(1); } 50% { opacity: 1; transform: scaleY(1.2); } }


/* ── Responsive ── */
@media (max-width: 640px) {
    html { font-size: 16px; }
    .container { padding: 0 22px; }
    .nav-links { position: fixed; top: 60px; left: 0; width: 100%; background: rgba(8,8,8,.96); backdrop-filter: blur(16px); flex-direction: column; align-items: center; padding: 24px 0; gap: 20px; transform: translateY(-120%); transition: transform .4s ease; z-index: 1000; }
    .nav-links.open { transform: translateY(0); }
    .nav-toggle { display: flex; }
    .manifesto-opening { font-size: 1.3rem; }
    .quote-block blockquote { font-size: 1.35rem; padding-left: 24px; }
    .number-accent { font-size: 5rem; right: -10px; }
    .cta-button { padding: 18px 40px; }
    .hero { min-height: 90vh; }
    .author-section { gap: 20px; }
    .author-photo { width: 68px; height: 68px; }
    .section-title { font-size: 1.9rem; }
    .ep-card { padding: 28px 24px; }
    .ep-card-title { font-size: 1.25rem; }
    .page-header { padding-top: 120px; }
    .article-title { font-size: 1.8rem; }
    .article-body p:first-child::first-letter { font-size: 2.6rem; }
    .pull-quote p { font-size: 1.3rem; }
    .article-hero { padding-top: 120px; }
}
@media (max-width: 400px) { .number-accent { display: none; } }


/* Episode cover image */
.article-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 0; margin-top: 40px; opacity: 0; animation: fadeIn .8s ease .3s forwards; }
.ep-card-cover { width: 100%; height: 200px; object-fit: cover; margin-bottom: 20px; opacity: .85; transition: opacity .5s ease; }
.ep-card:hover .ep-card-cover { opacity: 1; }


/* Coming soon blocks */
.coming-soon-block { text-align: center; padding: 80px 0 60px; }
.coming-soon-icon { margin-bottom: 32px; opacity: .6; }
.coming-soon-title { font-family: 'GFS Didot', serif; font-size: 1.6rem; color: var(--cream); font-weight: 400; margin-bottom: 24px; }
.coming-soon-text { font-size: .95rem; color: var(--cream-muted); max-width: 480px; margin: 0 auto 16px; line-height: 1.8; }






/* Nav compact */
.nav-links { gap: 18px; }
.nav-links a { font-size: .6rem; letter-spacing: .12em; }
@media (max-width: 860px) {
    .nav-links { position: fixed; top: 60px; left: 0; width: 100%; background: rgba(8,8,8,.96); backdrop-filter: blur(16px); flex-direction: column; align-items: center; padding: 24px 0; gap: 20px; transform: translateY(-120%); transition: transform .4s ease; z-index: 1000; }
    .nav-links.open { transform: translateY(0); }
    .nav-toggle { display: flex; }
    .nav-links a { font-size: .68rem; letter-spacing: .18em; }
}





/* La Mappa section */
.mappa { padding: 80px 0 40px; }
.mappa-header { text-align: center; margin-bottom: 3rem; }
.mappa-title { font-family: 'GFS Didot', serif; font-size: 1.8rem; color: var(--cream); font-weight: 400; margin-top: 12px; }
.mappa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mappa-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; padding: 28px 24px; position: relative; overflow: hidden; transition: all .5s cubic-bezier(.22,1,.36,1); border: 1px solid var(--cream-ghost); }
.mappa-card::before { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.mappa-card:hover { transform: translateY(-3px); box-shadow: 0 16px 48px rgba(0,0,0,.4); }
.mappa-card:hover::before { width: 100%; }

/* Distinct accent colors per card */
.mappa-card--diario { border-top: 2px solid rgba(201,169,110,0.3); }
.mappa-card--diario::before { background: var(--gold); }
.mappa-card--diario .mappa-card-icon { color: var(--gold); }
.mappa-card--diario .mappa-card-link { color: var(--gold); }

.mappa-card--condotta { border-top: 2px solid rgba(140,180,160,0.3); }
.mappa-card--condotta::before { background: #8cb4a0; }
.mappa-card--condotta .mappa-card-icon { color: #8cb4a0; }
.mappa-card--condotta .mappa-card-link { color: #8cb4a0; }

.mappa-card--comfort { border-top: 2px solid rgba(190,130,120,0.3); }
.mappa-card--comfort::before { background: #be8278; }
.mappa-card--comfort .mappa-card-icon { color: #be8278; }
.mappa-card--comfort .mappa-card-link { color: #be8278; }

.mappa-card-icon { margin-bottom: 16px; opacity: .7; transition: opacity .3s; }
.mappa-card:hover .mappa-card-icon { opacity: 1; }
.mappa-card-title { font-family: 'GFS Didot', serif; font-size: 1.15rem; color: var(--cream); font-weight: 400; margin-bottom: 4px; line-height: 1.3; }
.mappa-card-label { font-family: 'Montserrat', sans-serif; font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cream-muted); margin-bottom: 12px; }
.mappa-card-desc { font-size: .82rem; color: var(--cream-muted); line-height: 1.75; margin-bottom: 16px; flex-grow: 1; }
.mappa-card-link { font-family: 'Montserrat', sans-serif; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; opacity: .5; transition: opacity .3s; }
.mappa-card:hover .mappa-card-link { opacity: 1; }
.mappa-arrow { display: inline-block; transition: transform .3s; margin-left: 4px; }
.mappa-card:hover .mappa-arrow { transform: translateX(4px); }

@media (max-width: 860px) {
    .mappa-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {

    .mappa-card-title { font-size: 1.1rem; }
    .mappa-title { font-size: 1.5rem; }
}
