/* ==========================================================================
   www.sgol.app — foglio di stile unico
   Direzione: "pixel modulari" — i moduli come i pixel della S del logo.
   Titoli Bricolage Grotesque, testo Figtree, ambiti in maiuscolo light.
   ========================================================================== */

:root {
    --ink: #0E1F16;
    --ink-2: #17301F;
    --ink-line: #2D4237;
    --green: #0A7A2F;
    --green-dark: #003D15;
    --lime: #C6F432;
    --paper: #F6F7F2;
    --surface: #FFFFFF;
    --line: #DDE3DA;
    --line-soft: #EEF1EC;
    --text: #0E1F16;
    --text-2: #3C4B42;
    --muted: #4A5A50;
    --on-dark: #F6F7F2;
    --on-dark-2: #C9D4CC;
    --on-dark-3: #A9B6AC;

    /* declinazioni: solo nelle rispettive schede */
    --oratorio: #C2335F;
    --oratorio-dark: #A4284C;
    --centroestivo: #1F7A8C;
    --centroestivo-dark: #155B68;
    --sgolia: #6A5FD8;
    --sgolia-dark: #4F45B8;

    /* semaforo */
    --ok: #0A7A2F;
    --warn: #E8A317;
    --warn-text: #7A4F00;
    --ko: #C23B22;
    --ko-text: #A12F1A;

    --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
    --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

    --radius-s: 12px;
    --radius-m: 18px;
    --radius-l: 28px;
    --wrap: 1200px;
    --gutter: 24px;
    --nav-h: 76px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.modal-open { overflow: hidden; }

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

a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--lime); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
p { margin: 0; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 200;
    background: var(--ink); color: var(--on-dark); padding: 10px 16px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--on-dark); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- etichette e ambiti (maiuscolo light) ---------- */
.eyebrow {
    font-weight: 300;
    font-size: 13px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}
.on-dark .eyebrow { color: var(--on-dark-3); }

.ambiti {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    font-weight: 300; font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.ambiti li { display: inline-flex; align-items: center; gap: 14px; white-space: nowrap; }
.ambiti li::before { content: ""; width: 6px; height: 6px; background: var(--green); flex: none; }
.ambiti li { gap: 10px; }
.on-dark .ambiti { color: var(--on-dark-3); }
.on-dark .ambiti li::before { background: var(--lime); }

/* ---------- bottoni ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 24px; border-radius: 999px;
    font: 600 16px/1.2 var(--font-body); text-decoration: none; cursor: pointer;
    border: 1.5px solid transparent; transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); color: #fff; }
.btn--dark { background: var(--ink); color: var(--on-dark); }
.btn--dark:hover { background: var(--green-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--on-dark); }
.btn--lime { background: var(--lime); color: var(--ink); font-weight: 700; }
.btn--lime:hover { background: #fff; color: var(--ink); }
.btn--ghost-light { background: transparent; color: var(--on-dark); border-color: rgba(246, 247, 242, .5); }
.btn--ghost-light:hover { background: var(--on-dark); color: var(--ink); }
.btn--sgolia { background: var(--sgolia); color: #fff; }
.btn--sgolia:hover { background: var(--sgolia-dark); color: #fff; }
.btn--lg { min-height: 56px; padding: 16px 30px; font-size: 17px; }

.badge {
    display: inline-block; font-size: 12px; font-weight: 700; line-height: 1;
    padding: 6px 10px; border-radius: 999px; background: var(--lime); color: var(--ink); letter-spacing: .02em;
}
.badge--soft { background: var(--line-soft); color: var(--muted); }

/* ---------- navigazione ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(246, 247, 242, .88);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease;
}
.site-nav.is-scrolled { border-bottom-color: var(--line); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--nav-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 34px; height: 35px; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em; line-height: 1; }
.brand-name small { font-weight: 500; font-size: inherit; color: var(--green); }
.brand:hover { color: var(--ink); }

.nav-links { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.nav-links a:not(.btn) {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
    color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; border-radius: 8px;
}
.nav-links a:not(.btn):hover { background: var(--line-soft); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--green); font-weight: 600; }
.nav-links .nav-ai img { width: 30px; height: auto; }
.nav-links .btn { min-height: 44px; padding: 10px 18px; font-size: 15px; margin-left: 8px; }

.nav-toggle {
    display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer;
    border-radius: 10px; padding: 12px; flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; width: 24px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .nav-links {
        position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--paper); border-bottom: 1px solid var(--line);
        padding: 8px var(--gutter) 20px;
        display: none;
    }
    .nav-links.is-open { display: flex; }
    .nav-links a:not(.btn) { min-height: 48px; font-size: 17px; }
    .nav-links .btn { margin: 10px 0 0; }
}

/* nav su pagine scure (sport) */
.site-nav--dark { background: rgba(14, 31, 22, .9); }
.site-nav--dark.is-scrolled { border-bottom-color: var(--ink-line); }
.site-nav--dark .brand,
.site-nav--dark .brand:hover { color: var(--on-dark); }
.site-nav--dark .brand img { background: var(--paper); border-radius: 8px; padding: 3px; }
.site-nav--dark .brand-name small { color: var(--lime); }
.site-nav--dark .nav-links a:not(.btn) { color: var(--on-dark); }
.site-nav--dark .nav-links a:not(.btn):hover { background: var(--ink-2); color: var(--on-dark); }
.site-nav--dark .nav-links a[aria-current="page"] { color: var(--lime); }
.site-nav--dark .nav-toggle span { background: var(--on-dark); }
@media (max-width: 900px) {
    .site-nav--dark .nav-links { background: var(--ink); border-bottom-color: var(--ink-line); }
}

/* ---------- sezioni ---------- */
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 44px; max-width: 760px; }
.section-head h2 { font-size: clamp(32px, 4.2vw, 46px); font-weight: 800; }
.section-head p.lead { font-size: 19px; color: var(--text-2); max-width: 60ch; }
.on-dark { background: var(--ink); color: var(--on-dark); }
.on-dark .section-head p.lead { color: var(--on-dark-2); }
.on-dark a:not(.btn) { color: var(--lime); }
.on-dark a:not(.btn):hover { color: #fff; }

/* ---------- HERO home ---------- */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; }
.motto {
    align-self: flex-start; display: inline-block;
    background: var(--ink); color: var(--lime);
    font: 700 15px/1 var(--font-display); letter-spacing: -0.01em;
    padding: 9px 14px; border-radius: 6px;
}
.hero h1 { font-size: clamp(42px, 6.2vw, 72px); font-weight: 800; line-height: .98; letter-spacing: -0.04em; }
.hero h1 .accent { color: var(--green); }
.hero-lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--text-2); max-width: 36ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .ambiti { margin-top: 6px; }

/* mosaico di moduli */
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile {
    aspect-ratio: 1; border-radius: 14px; padding: 12px;
    display: flex; align-items: flex-end;
    font-size: 13px; font-weight: 600; line-height: 1.2;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink);
}
.tile--logo { grid-column: span 2; grid-row: span 2; border-radius: 22px; align-items: center; justify-content: center; }
.tile--logo img { width: 58%; image-rendering: pixelated; }
.tile--ink { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
.tile--green { background: var(--green); border-color: var(--green); color: #fff; }
.tile--deep { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.tile--lime { background: var(--lime); border-color: var(--lime); color: var(--ink); font-weight: 700; }
.tile--dashed { background: transparent; border: 1.5px dashed #A9B6AC; color: var(--muted); }
.tile--ai { grid-column: span 2; aspect-ratio: auto; background: var(--sgolia); border-color: var(--sgolia); color: #fff; gap: 10px; }
.tile--ai img { width: 54px; background: #fff; border-radius: 8px; padding: 3px 4px; }

@media (prefers-reduced-motion: no-preference) {
    .mosaic .tile { animation: tile-in .5s cubic-bezier(.2, .8, .2, 1.2) both; }
    .mosaic .tile:nth-child(2) { animation-delay: .15s; }
    .mosaic .tile:nth-child(3) { animation-delay: .22s; }
    .mosaic .tile:nth-child(4) { animation-delay: .29s; }
    .mosaic .tile:nth-child(5) { animation-delay: .36s; }
    .mosaic .tile:nth-child(6) { animation-delay: .43s; }
    .mosaic .tile:nth-child(7) { animation-delay: .5s; }
    .mosaic .tile:nth-child(8) { animation-delay: .57s; }
    @keyframes tile-in { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
}

@media (max-width: 520px) {
    .ambiti { font-size: 12px; letter-spacing: .16em; gap: 8px 16px; }
    .tile { font-size: 11.5px; padding: 9px; border-radius: 12px; }
    .tile--ai img { width: 40px; }
}
@media (max-width: 900px) {
    .hero { padding: 40px 0 72px; }
    .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
    .mosaic { max-width: 460px; }
}

/* ---------- declinazioni ---------- */
.brands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.brand-card {
    position: relative; display: flex; flex-direction: column; gap: 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
    padding: 30px 28px 28px; overflow: hidden;
}
.brand-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--card-accent, var(--green)); }
.brand-card h3 { font-size: 26px; font-weight: 800; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.brand-card .logo { height: 40px; width: auto; align-self: flex-start; }
.brand-card .logo--ce { height: 64px; border-radius: 10px; }
.brand-card p { color: var(--text-2); }
.brand-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.brand-card li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--line-soft); color: var(--muted); }
.brand-card .more { margin-top: auto; font-weight: 600; color: var(--card-link, var(--green)); }
.brand-card .more:hover { color: var(--ink); }
.brand-card--sport { background: var(--ink); border-color: var(--ink); color: var(--on-dark); --card-accent: var(--lime); --card-link: var(--lime); }
.brand-card--sport p { color: var(--on-dark-2); }
.brand-card--sport li { background: var(--ink-2); color: var(--on-dark-2); }
.brand-card--sport .more:hover { color: #fff; }
.brand-card--oratorio { --card-accent: var(--oratorio); --card-link: var(--oratorio-dark); }
.brand-card--ce { --card-accent: var(--centroestivo); --card-link: var(--centroestivo-dark); }
.brand-card .logo--wide { height: 44px; }
.brand-card .logo--sgal { height: 58px; }
.brand-card--grigliata { --card-accent: #F28B2C; --card-link: #9A3412; }
.brand-card--sgal { --card-accent: #2F9CF0; --card-link: #0B2F8F; }
@media (max-width: 980px) { .brands { grid-template-columns: 1fr; max-width: 640px; } }

/* ---------- realtà modulare ---------- */
.modular .wrap { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.modular .section-head { margin-bottom: 0; }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
.principles b { display: block; color: var(--lime); font-size: 16px; margin-bottom: 4px; }
.principles span { font-size: 14px; line-height: 1.5; color: var(--on-dark-2); }

.chooser { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.chooser-label { font-size: 14px; color: var(--on-dark-3); margin-right: 4px; }
.chip-btn {
    min-height: 44px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
    font: 600 14px/1.2 var(--font-body);
    background: transparent; color: var(--on-dark); border: 1.5px solid var(--ink-line);
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip-btn:hover { border-color: var(--on-dark-3); }
.chip-btn[aria-pressed="true"] { background: var(--lime); color: var(--ink); border-color: var(--lime); }

.modules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mod-base {
    grid-column: 1 / -1; border: 1px solid var(--ink-line); border-radius: 14px; padding: 16px 18px;
    display: flex; flex-direction: column; gap: 10px;
}
.mod-base-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.mod-base-title b { font-family: var(--font-display); font-size: 18px; }
.mod-base-title span { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-3); font-weight: 300; }
.mod-base ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.mod-base li { font-size: 13px; padding: 5px 10px; border-radius: 6px; background: var(--ink-2); color: var(--on-dark-2); }

.mod {
    position: relative; min-height: 92px; border-radius: 12px; padding: 14px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
    background: var(--ink-2); color: var(--on-dark); border: 1px solid var(--ink-2);
    transition: background-color .25s ease, color .25s ease, opacity .25s ease, transform .25s ease, border-color .25s ease;
}
.mod b { font-size: 15px; line-height: 1.25; }
.mod small { font-size: 12.5px; line-height: 1.35; color: var(--on-dark-3); transition: color .25s ease; }
.mod::after {
    content: ""; position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 3px;
    background: var(--ink-line); transition: background-color .25s ease;
}
.modules.has-filter .mod { opacity: .38; background: transparent; border-color: var(--ink-line); }
.modules.has-filter .mod.is-on { opacity: 1; background: var(--lime); border-color: var(--lime); color: var(--ink); }
.modules.has-filter .mod.is-on small { color: #33421A; }
.modules.has-filter .mod.is-on::after { background: var(--ink); }
.mod--ai { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px; background: var(--sgolia); border-color: var(--sgolia); }
.mod--ai img { width: 56px; background: #fff; border-radius: 8px; padding: 3px 4px; }
.mod--ai small { color: #E6E3FF; }
.modules.has-filter .mod--ai { opacity: 1; background: var(--sgolia); border-color: var(--sgolia); color: #fff; }
.modules.has-filter .mod--ai small { color: #E6E3FF; }
.mod--ai::after { display: none; }
.on-dark a.mod--ai, .on-dark a.mod--ai:hover { color: #fff; text-decoration: none; }
a.mod--ai:hover { background: var(--sgolia-dark); }
.modules-note { margin-top: 14px; font-size: 14px; color: var(--on-dark-3); min-height: 1.6em; }

@media (max-width: 980px) {
    .modular .wrap { grid-template-columns: 1fr; }
    .principles { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 520px) {
    .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- passi ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.steps li {
    counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
    padding: 26px; display: flex; flex-direction: column; gap: 10px;
}
.steps li::before {
    content: counter(step); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
    background: var(--ink); color: var(--lime); font: 800 18px/1 var(--font-display);
}
.steps h3 { font-size: 22px; font-weight: 800; }
.steps p { color: var(--text-2); }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- promo "Ed è Sgol!" ---------- */
.promo {
    background: var(--green); color: #fff; border-radius: var(--radius-l);
    padding: clamp(32px, 5vw, 60px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center;
    position: relative; overflow: hidden;
}
.promo .eyebrow { color: #E2F0E4; }
.promo-motto { font: 800 clamp(56px, 8vw, 96px)/.92 var(--font-display); letter-spacing: -0.045em; color: var(--lime); margin-top: 10px; }
.promo-copy { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; position: relative; }
.promo-copy p { font-size: 19px; line-height: 1.55; }
.promo-pixels { position: absolute; right: -10px; bottom: -10px; display: grid; grid-template-columns: repeat(6, 26px); gap: 6px; opacity: .22; pointer-events: none; }
.promo-pixels span { width: 26px; height: 26px; border-radius: 4px; background: #fff; }
.promo-pixels span:nth-child(3n) { background: var(--lime); }
.promo-pixels span:nth-child(4n+1) { visibility: hidden; }
@media (max-width: 860px) { .promo { grid-template-columns: 1fr; } }

/* ---------- SgolIA teaser ---------- */
.ai-teaser {
    display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 48px; align-items: center;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: clamp(28px, 4vw, 52px);
}
.ai-teaser img.logo { width: 100%; max-width: 300px; margin: 0 auto; }
.ai-teaser-copy { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.ai-teaser h2 { font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; }
.ai-teaser h2 span { color: var(--sgolia); }
.ai-teaser p { color: var(--text-2); }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ask-chips span { font-size: 14px; padding: 7px 12px; border-radius: 10px; background: #EFEDFC; color: #3A3196; }
@media (max-width: 860px) { .ai-teaser { grid-template-columns: 1fr; } .ai-teaser img.logo { max-width: 220px; } }

/* ---------- storia ---------- */
.since { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; }
.since .since-year { font: 800 clamp(64px, 10vw, 128px)/.85 var(--font-display); letter-spacing: -0.05em; color: var(--green); }
.since p { font-size: clamp(19px, 2vw, 24px); line-height: 1.45; max-width: 46ch; }
.since p em { font-style: normal; color: var(--muted); }
@media (max-width: 700px) { .since { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- CTA finale ---------- */
.cta-box {
    background: var(--ink); color: var(--on-dark); border-radius: var(--radius-l);
    padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; gap: 18px; align-items: flex-start;
}
.cta-box h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 800; }
.cta-box p { color: var(--on-dark-2); font-size: 18px; max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-alt { font-size: 15px; color: var(--on-dark-3) !important; }
.cta-alt a { color: var(--lime); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 15px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-grid h2 { font: 300 12px/1.4 var(--font-body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--green); text-decoration: underline; }
.footer-brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-brand p { max-width: 34ch; }
.footer-motto { font: 700 15px/1 var(--font-display); color: var(--green); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; font-size: 14px; }
.footer-bottom a { color: var(--muted); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- modale contatto ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal[aria-hidden="false"] { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(14, 31, 22, .6); }
.modal-content {
    position: relative; width: 100%; max-width: 720px; max-height: calc(100vh - 32px); overflow-y: auto;
    background: var(--surface); border-radius: var(--radius-m); padding: clamp(22px, 4vw, 36px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.modal-content h2 { font-size: 30px; font-weight: 800; margin-bottom: 6px; }
.modal-desc { color: var(--text-2); margin-bottom: 20px; }
.modal-close {
    position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 10px;
    background: transparent; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink);
}
.modal-close:hover { background: var(--line-soft); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 14px; font-weight: 600; }
.form-field input,
.form-field select,
.form-field textarea {
    font: 400 16px/1.4 var(--font-body); color: var(--ink);
    padding: 12px 14px; min-height: 48px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.form-field .field-error { border-color: var(--ko); }
.error-msg { font-size: 13px; color: var(--ko-text); min-height: 0; }
.form-actions { margin-top: 20px; }
.form-legal, .form-note { font-size: 13px; color: var(--muted); margin-top: 12px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- comparsa allo scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js:not(.static) .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
    .js .reveal.is-visible { opacity: 1; transform: none; }
}

/* ==========================================================================
   Pagina SPORT
   ========================================================================== */
.sport-page { background: var(--paper); }
.pitch {
    position: relative; overflow: hidden; background: var(--ink); color: var(--on-dark);
    padding: 72px 0 112px;
}
.pitch-lines { position: absolute; inset: 0; pointer-events: none; }
.pitch-lines svg { width: 100%; height: 100%; }
.pitch .wrap { position: relative; display: flex; flex-direction: column; gap: 22px; }
.pitch h1 { font-size: clamp(64px, 13vw, 156px); font-weight: 800; line-height: .88; letter-spacing: -0.05em; color: var(--lime); }
.pitch h1 .sub { display: block; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -0.03em; color: var(--on-dark); margin-top: 18px; }
.pitch-lead { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; color: #E4EBE6; max-width: 46ch; }
.pitch .hero-actions { margin-top: 6px; }

.score {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--ink-line);
    border: 1px solid var(--ink-line); border-radius: var(--radius-m); overflow: hidden; margin-top: 30px; max-width: 900px;
}
.score div { background: var(--ink); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.score b { font: 800 22px/1.1 var(--font-display); color: var(--lime); }
.score span { font-size: 14px; color: var(--on-dark-2); line-height: 1.4; }
@media (max-width: 760px) { .score { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split--rev > :first-child { order: 2; }
.split-copy { display: flex; flex-direction: column; gap: 18px; }
.split-copy h2 { font-size: clamp(34px, 4.4vw, 50px); font-weight: 800; }
.split-copy p { font-size: 18px; color: var(--text-2); }
.split-copy p.eyebrow { font-size: 13px; color: var(--muted); }
.checks { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--text-2); }
.checks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 12px; border-radius: 3px; background: var(--green); }
.on-dark .checks li { color: var(--on-dark-2); }
.on-dark .checks li::before { background: var(--lime); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } .split--rev > :first-child { order: 0; } }

/* rosa con semaforo */
.roster { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px 24px; }
.roster-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.roster-head b { font: 800 20px/1.2 var(--font-display); }
.roster-head span { font-size: 13px; color: var(--muted); }
.roster ul { list-style: none; margin: 0; padding: 0; }
.roster li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.roster li:last-child { border-bottom: 0; }
.roster .who { flex: 1; min-width: 0; }
.roster .who small { display: block; font-size: 12.5px; color: var(--muted); }
.light { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.light--ok { background: var(--ok); }
.light--warn { background: var(--warn); }
.light--ko { background: var(--ko); }
.state { font-size: 13px; font-weight: 600; text-align: right; }
.state--ok { color: var(--ok); }
.state--warn { color: var(--warn-text); }
.state--ko { color: var(--ko-text); }
.roster-foot { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.roster-foot span { font-size: 12.5px; padding: 5px 10px; border-radius: 6px; background: var(--line-soft); color: var(--muted); }
.mock-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* rate */
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.plan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--paper); }
.plan-row b { font-weight: 600; }
.plan-row small { display: block; font-size: 12.5px; color: var(--muted); }
.plan-row .amount { font: 700 18px/1 var(--font-display); }
.pill { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.pill--ok { background: #DFF0E3; color: #0A5A24; }
.pill--due { background: #FFF1D1; color: var(--warn-text); }
.pill--next { background: var(--line-soft); color: var(--muted); }

/* card funzioni */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.feature h3 { font-size: 22px; font-weight: 800; }
.feature p { color: var(--text-2); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--lime); display: grid; place-items: center; }
.feature .ico svg { width: 22px; height: 22px; }
.feature--next { background: transparent; border-style: dashed; border-color: #A9B6AC; }
.feature--next .ico { background: var(--line-soft); color: var(--muted); }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* stagione */
.season { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.season li { position: relative; padding: 40px 18px 0 0; display: flex; flex-direction: column; gap: 6px; }
.season li::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--ink-line); }
.season li::after { content: ""; position: absolute; top: 2px; left: 0; width: 16px; height: 16px; border-radius: 4px; background: var(--lime); }
.season b { font: 800 20px/1.1 var(--font-display); color: var(--on-dark); }
.season span { font-size: 15px; color: var(--on-dark-2); line-height: 1.5; }
.season em { font-style: normal; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-3); font-weight: 300; }
@media (max-width: 900px) {
    .season { grid-template-columns: 1fr; gap: 26px; }
    .season li { padding: 0 0 0 36px; }
    .season li::before { top: 0; bottom: -26px; left: 7px; right: auto; width: 2px; height: auto; }
    .season li:last-child::before { display: none; }
    .season li::after { top: 4px; }
}

.honest { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; }
.honest .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--line-soft); display: grid; place-items: center; color: var(--ink); }
.honest p { color: var(--text-2); }
.honest b { color: var(--ink); }

.ai-mini { background: #F1EFFD; border-radius: var(--radius-m); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.ai-mini-head { display: flex; align-items: center; gap: 10px; font-weight: 600; color: #3A3196; }
.ai-mini-head img { width: 28px; height: 28px; }
.ai-mini q { display: block; background: #fff; border-radius: 12px 12px 12px 4px; padding: 10px 14px; font-size: 15px; color: var(--ink); quotes: "“" "”"; }

/* ==========================================================================
   Pagina SgolIA
   ========================================================================== */
.ai-page { background: #FBFAFF; }
.ai-hero { padding: 56px 0 88px; text-align: center; position: relative; overflow: hidden; }
.ai-hero .wrap { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ai-hero .ai-logo { width: min(420px, 80%); }
.ai-hero h1 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 800; letter-spacing: -0.04em; max-width: 18ch; }
.ai-hero h1 span { color: var(--sgolia); }
.ai-hero p.lead { font-size: clamp(18px, 1.7vw, 21px); color: var(--text-2); max-width: 58ch; }
.ai-hero .hero-actions { justify-content: center; }
.ai-dots span { position: absolute; border-radius: 50%; opacity: .55; pointer-events: none; }

.chat-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 20px; }
.chat { background: var(--surface); border: 1px solid #E4E1F7; border-radius: var(--radius-l); padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.chat h2, .asks h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 16px; font-size: 16px; line-height: 1.5; }
.msg.me { align-self: flex-end; background: var(--sgolia); color: #fff; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: #F3F1FE; color: var(--ink); border-bottom-left-radius: 4px; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.msg.ai img { width: 36px; height: 36px; }
.msg.ai small { display: block; margin-top: 6px; font-size: 13px; color: #5A5480; }
.msg .ctx { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, .22); margin-bottom: 6px; }
.asks { background: var(--surface); border: 1px solid #E4E1F7; border-radius: var(--radius-l); padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.asks .group { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 300; margin-top: 8px; }
.asks span.q { display: block; font-size: 15px; padding: 10px 14px; border-radius: 12px; background: #F3F1FE; color: #3A3196; }
@media (max-width: 900px) { .chat-grid { grid-template-columns: 1fr; } .msg { max-width: 100%; } }

.priv { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 36px; align-items: center; background: var(--surface); border: 1px solid #E4E1F7; border-radius: var(--radius-l); padding: clamp(26px, 4vw, 44px); }
.priv h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; margin-bottom: 14px; }
.priv ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.priv li { position: relative; padding-left: 28px; color: var(--text-2); }
.priv li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 12px; border-radius: 3px; background: var(--sgolia); }
.priv li b { color: var(--ink); }
@media (max-width: 760px) { .priv { grid-template-columns: 1fr; } .priv img { width: 120px; } }

.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.benefit { background: var(--surface); border: 1px solid #E4E1F7; border-radius: var(--radius-m); padding: 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.benefit img { width: 96px; height: 96px; }
.benefit h3 { font-size: 20px; font-weight: 800; }
.benefit p { color: var(--text-2); font-size: 15px; }
@media (max-width: 900px) { .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .benefits { grid-template-columns: 1fr; } }

.where { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.where a { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; text-decoration: none; color: var(--ink); }
.where a:hover { border-color: var(--ink); color: var(--ink); }
.where img { height: 44px; width: auto; align-self: flex-start; }
.where .sport-mark { display: flex; align-items: center; gap: 10px; height: 44px; font: 800 22px/1 var(--font-display); }
.where .sport-mark img { height: 34px; }
.where span { font-size: 15px; color: var(--text-2); }
@media (max-width: 860px) { .where { grid-template-columns: 1fr; } }

/* ==========================================================================
   Pagine legali e 404
   ========================================================================== */
.legal { padding: 56px 0 96px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 800; margin-bottom: 18px; }
.legal h2 { font-size: 22px; font-weight: 800; margin: 34px 0 10px; letter-spacing: -0.02em; }
.legal p, .legal li { color: var(--text-2); }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; }
.legal .updated { margin-top: 36px; font-size: 14px; color: var(--muted); }

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound .wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.notfound h1 { font-size: clamp(56px, 10vw, 120px); font-weight: 800; color: var(--green); letter-spacing: -0.05em; }
.notfound p { font-size: 19px; color: var(--text-2); max-width: 40ch; }
