/* ============================================================
   TOKENS
   ============================================================ */
:root {
    /* Palette derivata dai colori del logo Studio Scala (blu, navy, azzurro) */
    --ink: #10264A;
    --slate: #57697E;
    --paper: #EEF3FA;
    --paper-alt: #E1E9F5;
    --white: #FFFFFF;
    --teal: #2472B9;
    --teal-deep: #12406E;
    --ochre: #1B4F82;
    --line: #D7DFEC;
    --sky: #97B6DF;
    --mist: #F4F6F8;

    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Libre Franklin', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

/* Evita che l'header fisso copra il titolo quando si naviga con i link #ancora */
section[id] {
    scroll-margin-top: 84px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
    font-family: var(--sans);
    background-color: var(--white);
    color: var(--ink);
    line-height: 1.6;
    font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 32px; }

:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 3px;
}

/* ============================================================
   TIPOGRAFIA
   ============================================================ */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--ink); }

h1 { font-size: 3.4rem; letter-spacing: -0.01em; }

h2 { font-size: 2.2rem; text-align: center; margin-bottom: 44px; }
h2.left { text-align: left; }

h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; }

p { color: var(--slate); }

.eyebrow {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--teal);
    margin-bottom: 14px;
    display: block;
}
.eyebrow-center { text-align: center; }

/* ============================================================
   PULSANTI
   ============================================================ */
.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 3px 12px 3px 12px;
    font-weight: 600;
    font-size: 0.92rem;
    font-family: var(--sans);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    border: 1.5px solid transparent;
    text-align: center;
}

.btn-primary {
    background-color: var(--teal);
    color: var(--white);
}
.btn-primary:hover { background-color: var(--teal-deep); transform: translateY(-1px); }

.btn-outline {
    background-color: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }

.btn-call {
    background-color: var(--slate);
    color: var(--white);
    border-color: var(--slate);
}
.btn-call:hover { background-color: var(--ink); border-color: var(--ink); transform: translateY(-1px); }

.link-call {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--slate);
}
.link-call:hover { color: var(--teal); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
    padding: 16px 0;
    background-color: var(--mist);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.3s ease;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 34px; width: auto; }
.logo span { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }

.nav { display: flex; gap: 26px; font-size: 0.9rem; font-weight: 500; }
.nav a { position: relative; }
.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0; height: 2px;
    background: var(--teal);
    transition: width 0.25s ease;
}
.nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 18px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 56px 0 90px; background: var(--white); }

.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}

.hero-text h1 { margin-bottom: 18px; }

.blur-word {
    display: inline-block;
    filter: blur(9px);
    opacity: 0;
    animation: focus-in 1.1s ease forwards;
}
.blur-word:nth-child(2) { animation-delay: 0.28s; }

@keyframes focus-in {
    to { filter: blur(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .blur-word { filter: none; opacity: 1; animation: none; }
}

.hero-subtitle { font-size: 1.1rem; color: var(--slate); margin: 0 0 32px; max-width: 46ch; }

.hero-buttons { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; display: flex; flex-direction: column; align-items: center; }

.lens-frame {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: 1px solid var(--line);
    padding: 14px;
    position: relative;
}
.lens-frame::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid var(--paper-alt);
}
.lens-frame img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; }

.chart-tag {
    margin-top: -18px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 3px 12px 3px 12px;
    padding: 14px 22px 10px;
    text-align: center;
}
.chart-mini { width: 130px; height: 96px; color: var(--ink); }
.chart-mini text {
    font-family: var(--serif);
    font-weight: 600;
    fill: currentColor;
    letter-spacing: 0.06em;
}
.row-1 { font-size: 26px; }
.row-2 { font-size: 18px; opacity: 0.82; }
.row-3 { font-size: 13px; opacity: 0.64; }
.row-4 { font-size: 10px; opacity: 0.46; }
.chart-caption {
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate);
}

/* ============================================================
   REVEAL ON SCROLL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   LO STUDIO
   ============================================================ */
.studio { padding: 88px 0; background-color: var(--mist); position: relative; overflow: hidden; }
/* rings decorativi che richiamano la lente dell'hero */
.studio::before, .studio::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--sky);
    pointer-events: none;
}
.studio::before { top: -150px; right: -120px; width: 360px; height: 360px; opacity: 0.35; }
.studio::after  { top: -210px; right: -180px; width: 480px; height: 480px; opacity: 0.22; }

.studio-inner {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.studio-head h2 { margin-bottom: 24px; }

.studio-lead {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.3rem;
    line-height: 1.5;
    color: var(--ink);
    margin: 0;
    padding-left: 18px;
    border-left: 3px solid var(--ochre);
}

.studio-body { border-top: 1px solid var(--line); padding-top: 26px; }
.studio-body p { margin-bottom: 16px; }
.studio-body p:first-child { font-size: 1.12rem; color: var(--ink); }
.studio-body p:last-child { margin-bottom: 0; }

/* percorso: le aree che si integrano */
.studio-path {
    list-style: none;
    display: flex;
    margin-top: 60px;
    padding-top: 38px;
    border-top: 1px solid var(--line);
    position: relative;
    z-index: 1;
}
.studio-path li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    position: relative;
}
.studio-path li::before {
    content: "";
    position: absolute;
    top: 5px;
    left: -50%;
    width: 100%;
    height: 1px;
    background: var(--line);
}
.studio-path li:first-child::before { display: none; }
.node-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px var(--mist), 0 0 0 5px var(--paper-alt);
    position: relative;
    z-index: 1;
}
.node-label {
    font-family: var(--mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate);
    max-width: 12ch;
}

/* ============================================================
   I SERVIZI
   ============================================================ */
.servizi { padding: 88px 0; background-color: var(--paper); }

.servizi-intro { max-width: 620px; margin: -24px auto 44px; text-align: center; font-size: 1rem; }

.servizi-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    margin-bottom: 44px;
}

.servizio-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 3px 14px 3px 14px;
    padding: 30px 26px;
    flex: 1 1 300px;
    max-width: 352px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.servizio-card:hover {
    border-color: var(--sky);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 38, 74, 0.07);
}

.icon { width: 30px; height: 30px; stroke: var(--teal); stroke-width: 1.5; fill: none; margin-bottom: 14px; }
.icon-ghost { fill: var(--paper-alt); stroke: var(--teal); opacity: 0.9; }

.servizio-card p { font-size: 0.94rem; margin-top: 6px; }

.servizi-cta { text-align: center; }

/* ============================================================
   PERCORSO
   ============================================================ */
.percorso { padding: 88px 0; background: var(--white); }

.percorso-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }

.step { position: relative; padding-top: 8px; }

.step-number {
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--ochre);
    display: block;
    margin-bottom: 10px;
}

.step-line { height: 1px; background: var(--line); margin-bottom: 18px; position: relative; overflow: hidden; }
.step-line::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--teal);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}
.step:hover .step-line::after { transform: scaleX(1); }

.step p { font-size: 0.95rem; margin-top: 6px; }

/* ============================================================
   CHI SONO
   ============================================================ */
.chi-sono { padding: 90px 0; background: var(--paper); }

.chi-sono-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }

.lens-frame-sm { width: 100%; max-width: 320px; height: auto; aspect-ratio: 1; margin: 0 auto; }

.titolo { font-size: 1rem; font-weight: 500; color: var(--teal); margin-bottom: 22px; font-family: var(--mono); }

.chi-sono-text p { font-size: 0.98rem; margin-bottom: 14px; }

.approccio-title {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: var(--ochre);
    margin-top: 28px;
    margin-bottom: 14px;
}

.approccio {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.28rem;
    line-height: 1.55;
    color: var(--ink);
    margin: 0 0 22px;
    position: relative;
    padding-left: 8px;
}
.quote-mark { color: var(--ochre); font-style: normal; font-size: 1.6em; line-height: 0; vertical-align: -0.28em; margin-right: 2px; }

.formazione { font-size: 0.93rem; margin-bottom: 10px; }
.collaborazioni { font-size: 0.93rem; font-weight: 600; color: var(--ink); }

/* ============================================================
   RECENSIONI
   ============================================================ */
.recensioni { padding: 88px 0; background: var(--white); }

.recensioni-rating { text-align: center; margin: -8px 0 32px; font-family: var(--mono); font-size: 0.85rem; color: var(--slate); }

.recensioni-rating-stars { color: var(--teal); letter-spacing: 0.05em; margin-right: 8px; }

.recensioni-cta { text-align: center; margin-top: 28px; }

.recensioni-cta a { font-family: var(--mono); font-size: 0.85rem; font-weight: 600; color: var(--teal); text-decoration: none; }

.recensioni-cta a:hover { text-decoration: underline; }

.recensioni-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }

.recensioni-grid blockquote { background: var(--white); padding: 34px 28px; }

.recensioni-grid blockquote p { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--ink); line-height: 1.55; }

.recensioni-grid blockquote cite {
    display: block;
    margin-top: 16px;
    font-style: normal;
    font-weight: 600;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ============================================================
   FAQ
   ============================================================ */
.faq { padding: 88px 0; background: var(--paper); }

.faq-list { max-width: 760px; margin: 0 auto 40px; }

.faq-item {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-family: var(--mono);
    color: var(--teal);
    font-size: 1.2rem;
    margin-left: 16px;
    transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 12px; font-size: 0.95rem; }

.faq-cta { text-align: center; }

/* ============================================================
   CONTATTI
   ============================================================ */
.contatti { padding: 90px 0; background: var(--white); }

.contatti-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }

.contatti-info address { font-style: normal; font-size: 1rem; line-height: 2; color: var(--ink); }
.contatti-info address a { color: var(--teal); font-weight: 500; }
.contatti-info address a:hover { text-decoration: underline; }

.orari { margin: 22px 0 26px; padding: 18px 22px; background: var(--paper); border-left: 3px solid var(--ochre); }
.orari p { margin: 0; color: var(--ink); }
.orari-label { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ochre) !important; margin-bottom: 6px !important; }

.contatti-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.contatti-mappa iframe { border: 1px solid var(--line); width: 100%; min-height: 320px; filter: grayscale(0.3) contrast(1.02); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { padding: 30px 0; background: var(--ink); color: #97ACC9; font-size: 0.85rem; font-family: var(--mono); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-legal p { margin-bottom: 4px; }
.footer-legal p:last-child { margin-bottom: 0; }
.footer a { color: #97ACC9; transition: color 0.2s; }
.footer a:hover { color: var(--white); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-linkbtn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #97ACC9;
    cursor: pointer;
    transition: color 0.2s;
}
.footer-linkbtn:hover { color: var(--white); }

/* ============================================================
   MAPPA — caricamento condizionato al consenso
   ============================================================ */
.map-embed { position: relative; min-height: 320px; background: var(--paper); border: 1px solid var(--line); }
.map-embed iframe { width: 100%; min-height: 320px; display: block; border: 0; filter: grayscale(0.3) contrast(1.02); }
.map-embed:not(.is-loaded) iframe { display: none; }

.map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 28px;
}
.map-embed.is-loaded .map-placeholder { display: none; }
.map-placeholder-icon { width: 34px; height: 34px; stroke: var(--teal); stroke-width: 1.5; fill: none; }
.map-placeholder p { font-size: 0.9rem; max-width: 40ch; margin: 0; }
.map-placeholder .btn { margin-top: 4px; }
.map-placeholder-note { font-size: 0.8rem; }
.map-placeholder-note a { color: var(--teal); font-weight: 500; }
.map-placeholder-note a:hover { text-decoration: underline; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    max-width: 720px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 3px 16px 3px 16px;
    box-shadow: 0 18px 50px rgba(16, 38, 74, 0.18);
    padding: 22px 24px;
}

.cookie-banner-main { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.cookie-banner-text { flex: 1 1 320px; }
.cookie-banner-title { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--ink); margin-bottom: 6px; }
.cookie-banner-text p { font-size: 0.88rem; line-height: 1.55; }
.cookie-banner-text a { color: var(--teal); font-weight: 500; }
.cookie-banner-text a:hover { text-decoration: underline; }

.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-banner-actions .btn { padding: 10px 20px; font-size: 0.85rem; }

.cookie-prefs { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.cookie-pref { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; font-size: 0.86rem; line-height: 1.5; color: var(--slate); }
.cookie-pref input { margin-top: 3px; flex-shrink: 0; accent-color: var(--teal); width: 16px; height: 16px; }
.cookie-pref strong { color: var(--ink); }
.cookie-prefs-actions { display: flex; justify-content: flex-end; }
.cookie-prefs-actions .btn { padding: 10px 20px; font-size: 0.85rem; }

/* ============================================================
   PAGINE LEGALI (privacy / cookie)
   ============================================================ */
.legal-header {
    background: var(--mist);
    border-bottom: 1px solid var(--line);
    padding: 16px 0;
}
.legal-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.legal-header .logo img { height: 32px; width: auto; display: block; }
.legal-header .back-link { font-family: var(--mono); font-size: 0.82rem; color: var(--slate); }
.legal-header .back-link:hover { color: var(--teal); }

.legal { padding: 64px 0 80px; background: var(--white); }
.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body .eyebrow { text-align: left; }
.legal-body h1 { font-size: 2.4rem; margin-bottom: 12px; }
.legal-body .legal-updated { font-family: var(--mono); font-size: 0.8rem; color: var(--slate); margin-bottom: 40px; }
.legal-body h2 {
    text-align: left;
    font-size: 1.35rem;
    margin: 40px 0 14px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.legal-body h2:first-of-type { border-top: none; padding-top: 0; }
.legal-body h3 { font-size: 1.02rem; margin: 20px 0 8px; }
.legal-body p, .legal-body li { font-size: 0.98rem; line-height: 1.7; }
.legal-body p { margin-bottom: 14px; }
.legal-body ul, .legal-body ol { margin: 0 0 16px 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--teal); font-weight: 500; }
.legal-body a:hover { text-decoration: underline; }
.legal-body strong { color: var(--ink); }

.legal-table-wrap { overflow-x: auto; margin-bottom: 20px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 520px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--line); vertical-align: top; }
.legal-table th { background: var(--paper); font-family: var(--mono); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink); }
.legal-table td { color: var(--slate); }

.legal-note {
    margin-top: 40px;
    padding: 18px 20px;
    background: var(--paper);
    border-left: 3px solid var(--ochre);
    font-size: 0.9rem;
}
.legal-note p { margin: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .hero-inner, .chi-sono-inner, .contatti-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .chi-sono-image { order: -1; }
    .hero-text { text-align: left; }
    h2.left, .chi-sono-text .eyebrow, .contatti-info .eyebrow,
    .chi-sono-text p, .chi-sono-text .titolo,
    .chi-sono-text .approccio-title, .chi-sono-text .approccio { text-align: left; }
    .hero-subtitle { margin-left: 0; margin-right: 0; }
    .studio-inner { grid-template-columns: 1fr; gap: 30px; }
    .studio-body { border-top: none; padding-top: 0; }
}

@media (max-width: 768px) {
    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.7rem; margin-bottom: 30px; }
    .container { padding: 0 20px; }
    .header-inner { justify-content: center; text-align: center; }
    .nav { display: none; }
    .hero { padding: 36px 0 60px; }
    .hero-buttons { justify-content: center; }
    .lens-frame { width: 220px; height: 220px; }
    .servizio-card { flex-basis: 100%; max-width: 420px; }
    .studio-path { flex-direction: column; padding-top: 26px; margin-top: 44px; }
    .studio-path li { flex-direction: row; align-items: flex-start; gap: 16px; text-align: left; padding: 11px 0; }
    .studio-path li::before { top: 11px; left: 5px; width: 1px; height: 100%; }
    .studio-path li:first-child::before { display: block; }
    .studio-path li:last-child::before { display: none; }
    .node-label { max-width: none; padding-top: 1px; }
    .percorso-steps { grid-template-columns: 1fr; gap: 30px; }
    .recensioni-grid { grid-template-columns: 1fr !important; }
    .contatti-mappa iframe { min-height: 260px; }
    .footer-inner { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }

    .cookie-banner { left: 10px; right: 10px; bottom: 10px; padding: 18px 18px; border-radius: 3px 12px 3px 12px; }
    .cookie-banner-actions { width: 100%; }
    .cookie-banner-actions .btn { flex: 1 1 auto; }
    .cookie-prefs-actions .btn { width: 100%; }

    .legal-body h1 { font-size: 1.9rem; }
    .legal-header .container { flex-wrap: wrap; }
}
