/* /assets/css/style.css */
/* ─────────────────────────────────────────────────────────────
   Foglio di stile unico – francescocianchi.it
   ───────────────────────────────────────────────────────────── */

:root {
  --navy: #152440;
  --navy-mid: #1e3358;
  --accent: #2563b0;
  --accent-soft: #dce8f8;
  --white: #ffffff;
  --off: #f7f8fa;
  --border: #dde3ec;
  --text: #152440;
  --muted: #5a6a82;
  --line: #c8d4e4;
  --font-d: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-b: 'DM Sans', system-ui, sans-serif;
  --wrap: 1000px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-b); background: var(--white); color: var(--text); line-height: 1.65; font-size: 1rem; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }

.skip-link { position: absolute; left: -999px; top: 0; background: #fff; color: var(--navy); padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; }

/* ── HEADER ─────────────────────────────────────────────── */
.site-header {
  background: var(--navy); padding: 0 5%; display: flex; align-items: center;
  justify-content: space-between; height: 68px; position: sticky; top: 0; z-index: 50;
}
.logo-area { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-img { display: block; height: 42px; width: auto; transition: opacity .2s; }
.logo-area:hover .logo-img { opacity: .85; }
.logo-mark {
  width: 36px; height: 36px; border: 1.5px solid rgba(255,255,255,.3); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-size: .8rem; font-weight: 700; letter-spacing: .04em; color: #fff;
}
.logo-text { font-family: var(--font-d); font-size: 1.2rem; color: #fff; letter-spacing: .04em; display: block; }
.logo-sub { font-size: .63rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); display: block; margin-top: 1px; }

.main-nav { display: flex; gap: 2rem; align-items: center; }
.main-nav a {
  color: rgba(255,255,255,.65); text-decoration: none; font-size: .78rem;
  letter-spacing: .08em; text-transform: uppercase; transition: color .2s;
}
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a.active:not(.nav-btn) { box-shadow: inset 0 -1px 0 rgba(255,255,255,.6); }
.nav-btn { border: 1px solid rgba(255,255,255,.3); padding: .38rem 1.1rem; border-radius: 4px; color: rgba(255,255,255,.85) !important; }
.nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,.08); color: #fff !important; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 36px; height: 36px; flex-direction: column; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; height: 1.5px; background: #fff; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── HERO (home) e PAGE HERO (sottopagine) ───────────────── */
.hero, .page-hero { background: var(--navy); text-align: center; position: relative; overflow: hidden; }
.hero { padding: 72px 5% 100px; }
.page-hero { padding: 56px 5% 88px; }
.hero::after, .page-hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 52px;
  background: var(--white); clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-eyebrow { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255,255,255,.45); display: block; margin-bottom: 1.6rem; }
.hero h1, .page-hero h1 {
  font-family: var(--font-d); font-weight: 700; color: #fff; line-height: 1.18;
  text-wrap: balance; margin-bottom: 1.1rem; letter-spacing: -.02em;
}
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.page-hero h1 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
.hero h1 em, .page-hero h1 em { font-style: normal; font-weight: 300; color: rgba(255,255,255,.65); }
.hero p, .page-hero p { color: rgba(255,255,255,.6); font-size: .95rem; font-weight: 300; max-width: 560px; margin: 0 auto 2.2rem; }
.page-hero p { margin-bottom: 0; }
.hero-badges { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.75);
  padding: .35rem .85rem; border-radius: 999px; font-size: .76rem; letter-spacing: .03em;
}

.breadcrumb { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 1.4rem; }
.breadcrumb a { color: rgba(255,255,255,.6); text-decoration: none; }
.breadcrumb a:hover { color: #fff; }

/* ── DIVISORI E SEZIONI ─────────────────────────────────── */
.sec-div { display: flex; align-items: center; gap: 1rem; padding: 0 5%; margin: 3rem 0 2.4rem; }
.sec-div hr { flex: 1; border: none; border-top: 1px solid var(--border); }
.sec-div span { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.section { padding: 0 5% 56px; }
.section-alt { background: var(--off); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 56px 5%; }

.section-head { max-width: 640px; margin: 0 auto 2.4rem; text-align: center; }
.section-head h2 { font-family: var(--font-d); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .6rem; }
.section-head p { color: var(--muted); font-weight: 300; font-size: .95rem; }

/* ── GRIGLIA SERVIZI ────────────────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; max-width: var(--wrap); margin: 0 auto;
}
.service-item { background: var(--white); padding: 2.4rem 1.8rem; transition: background .2s; display: flex; flex-direction: column; }
.service-item:hover { background: var(--off); }
.service-num { font-size: .72rem; color: var(--accent); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; display: block; }
.service-item h3 { font-family: var(--font-d); font-size: 1.2rem; font-weight: 600; color: var(--navy); margin-bottom: .7rem; line-height: 1.25; letter-spacing: -.01em; }
.service-item p { color: var(--muted); font-size: .87rem; font-weight: 300; line-height: 1.7; margin-bottom: 1.2rem; }
.service-list { list-style: none; display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.4rem; }
.service-list li { font-size: .8rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.service-list li::before { content: ''; width: 16px; height: 1px; background: var(--line); flex-shrink: 0; }

.link-more {
  margin-top: auto; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; gap: .4rem;
}
.link-more:hover { color: var(--navy); }

/* ── CARD GENERICHE ─────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; max-width: var(--wrap); margin: 0 auto; }
.card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1.8rem 1.6rem; }
.card h3 { font-family: var(--font-d); font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .87rem; font-weight: 300; line-height: 1.7; }
.card .tag { display: inline-block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .7rem; font-weight: 500; }

/* ── STEP / METODO ──────────────────────────────────────── */
.steps { list-style: none; counter-reset: step; max-width: 760px; margin: 0 auto; display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.steps li { counter-increment: step; background: var(--white); padding: 1.4rem 1.6rem 1.4rem 4.4rem; position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 1.6rem; top: 1.4rem;
  font-family: var(--font-d); font-weight: 700; color: var(--accent); font-size: .9rem;
}
.steps h3 { font-family: var(--font-d); font-size: 1rem; font-weight: 600; margin-bottom: .25rem; }
.steps p { color: var(--muted); font-size: .87rem; font-weight: 300; }

/* ── PORTFOLIO ──────────────────────────────────────────── */
.portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; max-width: var(--wrap); margin: 0 auto; }
.portfolio figure { aspect-ratio: 4 / 5; background: var(--off); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; position: relative; }
.portfolio img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.portfolio figure:hover img { transform: scale(1.03); }
.portfolio figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .7rem .9rem; font-size: .74rem; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: linear-gradient(transparent, rgba(21,36,64,.75));
}

/* ── FAQ ────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; font-family: var(--font-d);
  font-weight: 600; font-size: .98rem; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: .2rem; top: 1rem; font-weight: 300; font-size: 1.3rem; color: var(--accent); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--muted); font-size: .9rem; font-weight: 300; padding: 0 0 1.2rem; }

/* ── CTA BAND ───────────────────────────────────────────── */
.cta-band { background: var(--navy); color: #fff; padding: 52px 5%; text-align: center; }
.cta-band h2 { font-family: var(--font-d); font-size: 1.6rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: .6rem; }
.cta-band p { color: rgba(255,255,255,.6); font-weight: 300; margin-bottom: 1.6rem; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem; background: var(--navy); color: #fff; border: none;
  padding: .82rem 2rem; border-radius: 4px; font-family: var(--font-b); font-size: .85rem; font-weight: 500;
  letter-spacing: .05em; cursor: pointer; text-decoration: none; transition: background .2s;
}
.btn:hover { background: var(--navy-mid); }
.btn-light { background: #fff; color: var(--navy); }
.btn-outline { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light:hover { background: var(--accent-soft); }

/* ── CHI SONO ───────────────────────────────────────────── */
.about-inner { max-width: 800px; margin: 0 auto; display: grid; grid-template-columns: 160px 1fr; gap: 3.5rem; align-items: start; }
.about-profile { text-align: center; }
.avatar-ring {
  width: 96px; height: 96px; border-radius: 50%; border: 2px solid var(--navy); display: flex; align-items: center;
  justify-content: center; margin: 0 auto 1rem; background: var(--navy); font-family: var(--font-d);
  font-size: 1.6rem; font-weight: 700; color: #fff; letter-spacing: .02em; overflow: hidden;
}
.avatar-ring img { width: 100%; height: 100%; object-fit: cover; }
.about-profile h4 { font-family: var(--font-d); font-size: 1.15rem; font-weight: 600; color: var(--navy); letter-spacing: -.01em; }
.about-profile span { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.about-body blockquote {
  font-family: var(--font-d); font-size: 1.2rem; font-weight: 500; font-style: italic; color: var(--navy);
  border-left: 2px solid var(--navy); padding-left: 1.2rem; margin-bottom: 1.2rem; line-height: 1.55;
}
.about-body p { color: var(--muted); font-size: .9rem; font-weight: 300; line-height: 1.75; margin-bottom: 1rem; }

/* ── RACCONTO (Bambini in Sicurezza) ────────────────────── */
.story { max-width: 720px; margin: 0 auto; }
.story p { color: var(--muted); font-size: .98rem; font-weight: 300; line-height: 1.85; margin-bottom: 1.2rem; }
.story .story-lead { font-family: var(--font-d); color: var(--navy); font-size: 1.2rem; font-weight: 500; line-height: 1.6; }
.story blockquote {
  font-family: var(--font-d); font-size: 1.35rem; font-weight: 600; color: var(--navy); line-height: 1.45;
  letter-spacing: -.01em; border-left: 3px solid var(--accent); padding: .2rem 0 .2rem 1.4rem; margin: 2rem 0;
}
.story .btn { margin-top: .6rem; }
.story-logo { display: block; width: 180px; height: auto; margin: 0 auto 2.2rem; }
.story-cta { text-align: center; margin-top: 2rem; }

/* ── LIBRO ──────────────────────────────────────────────── */
.book { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 300px 1fr; gap: 3.5rem; align-items: start; }
.book-cover { display: block; border-radius: 4px; overflow: hidden; box-shadow: 0 18px 40px -12px rgba(21,36,64,.35), 0 2px 6px rgba(21,36,64,.12); transition: transform .3s; }
.book-cover:hover { transform: translateY(-4px); }
.book-cover img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; background: var(--navy); }
.book-body .tag { display: inline-block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; font-weight: 500; }
.book-body h2 { font-family: var(--font-d); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: 1rem; }
.book-body p { color: var(--muted); font-size: .92rem; font-weight: 300; line-height: 1.75; margin-bottom: 1rem; }
.book-body .book-claim { font-family: var(--font-d); color: var(--navy); font-size: 1.08rem; font-weight: 500; line-height: 1.55; }
.book-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }
.book-topics { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem 1.4rem; margin: 0 0 1.4rem; }
.book-topics li { font-size: .86rem; color: var(--text); display: flex; gap: .55rem; align-items: baseline; }
.book-topics li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; transform: translateY(-2px); }

/* ── TESTO LUNGO (privacy, cookie) ──────────────────────── */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-family: var(--font-d); font-size: 1.2rem; font-weight: 600; margin: 2rem 0 .6rem; }
.prose p, .prose li { color: var(--muted); font-size: .92rem; line-height: 1.75; }
.prose p { margin-bottom: .9rem; }
.prose ul { padding-left: 1.2rem; margin-bottom: .9rem; }

/* ── ALERT E FORM ───────────────────────────────────────── */
.alert { padding: .9rem 1.2rem; border-radius: 6px; margin-bottom: 1.2rem; font-size: .88rem; line-height: 1.5; }
.alert-ok { background: #dcfce7; border: 1px solid #86efac; color: #166534; }
.alert-err { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }

.contact-wrap { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 3rem; }
.contact-info h3 { font-family: var(--font-d); font-size: 1.05rem; font-weight: 600; margin-bottom: .8rem; }
.contact-info p, .contact-info li { color: var(--muted); font-size: .88rem; font-weight: 300; }
.contact-info ul { list-style: none; display: grid; gap: .5rem; margin-top: 1rem; }
.contact-info a { color: var(--navy); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.form-group label .req { color: var(--accent); }
.form-group input, .form-group select, .form-group textarea {
  background: var(--white); border: 1px solid var(--border); border-radius: 4px; color: var(--text);
  font-family: var(--font-b); font-size: .88rem; padding: .68rem .9rem; outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,176,.1); }
.form-group textarea { resize: vertical; min-height: 140px; }
.form-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; color: var(--muted); }
.form-check input { margin-top: .25rem; accent-color: var(--navy); }
.hp-field { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.btn-send { margin-top: 1rem; }

/* ── FOOTER ─────────────────────────────────────────────── */
.site-footer { background: var(--navy); padding: 44px 5% 28px; color: rgba(255,255,255,.55); }
.footer-top { max-width: var(--wrap); margin: 0 auto 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-brand { font-family: var(--font-d); font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.8); margin-bottom: .5rem; }
.footer-text { font-size: .82rem; font-weight: 300; max-width: 320px; }
.footer-col h4 { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-bottom: .8rem; font-weight: 500; }
.footer-col ul { list-style: none; display: grid; gap: .4rem; }
.footer-col a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .84rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--wrap); margin: 0 auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.2rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.footer-copy { font-size: .73rem; color: rgba(255,255,255,.35); letter-spacing: .04em; }
.footer-links { display: flex; gap: 1.4rem; list-style: none; }
.footer-links a { color: rgba(255,255,255,.4); text-decoration: none; font-size: .73rem; letter-spacing: .06em; text-transform: uppercase; }
.footer-links a:hover { color: rgba(255,255,255,.8); }

/* ── 404 ────────────────────────────────────────────────── */
.notfound { text-align: center; padding: 40px 5% 80px; }
.notfound p { color: var(--muted); margin-bottom: 1.6rem; }

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 5% 1.2rem;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
  .main-nav a.active:not(.nav-btn) { box-shadow: none; color: #fff; }
  .nav-btn { margin-top: .8rem; text-align: center; border-bottom: 1px solid rgba(255,255,255,.3) !important; }
}

@media (max-width: 768px) {
  html { font-size: 110%; }            /* testi un po' piu' grandi su smartphone (~17.6px) */
  .logo-img { height: 34px; }
  .services-grid { grid-template-columns: 1fr; }
  .portfolio { grid-template-columns: 1fr 1fr; }
  .about-inner, .contact-wrap { grid-template-columns: 1fr; gap: 2rem; }
  .book { grid-template-columns: 1fr; gap: 2rem; }
  .book-cover { max-width: 220px; margin: 0 auto; }
  .book-topics { grid-template-columns: 1fr; }
  .story blockquote { font-size: 1.15rem; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .steps li { padding-left: 3.6rem; }
  .steps li::before { left: 1.2rem; }
}
