/* ============================================================
   Flowbot - Guglielmo Pirino
   Dark, aria, tipografia grande, un solo accento.
   ============================================================ */

:root {
    /* superfici */
    --bg:        #0B0D0F;
    --bg-2:      #111518;
    --bg-3:      #171C20;
    --line:      rgba(255, 255, 255, .09);
    --line-soft: rgba(255, 255, 255, .055);

    /* testo */
    --ink:   #F3F5F6;
    --ink-2: #C5CCD1;
    --muted: #8D979E;

    /* accento */
    --accent:     #D8AF4A;
    --accent-dim: rgba(216, 175, 74, .14);
    --accent-ink: #0B0D0F;
    --wa:         #25D366;

    /* ritmo verticale */
    --section: clamp(84px, 11vw, 168px);
    --gap:     clamp(24px, 3vw, 40px);

    /* misure */
    --wrap:  1140px;
    --prose: 660px;

    --radius: 14px;
    --ease:   cubic-bezier(.22, .61, .36, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- impianto tipografico ---------- */

h1, h2, h3 {
    margin: 0;
    font-weight: 600;
    letter-spacing: -.028em;
    line-height: 1.04;
    text-wrap: balance;
}

h1 { font-size: clamp(42px, 8.4vw, 98px); letter-spacing: -.038em; }
h2 { font-size: clamp(30px, 4.6vw, 54px); }
h3 { font-size: clamp(19px, 2vw, 23px); letter-spacing: -.018em; line-height: 1.25; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lead {
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.55;
    color: var(--ink-2);
    letter-spacing: -.012em;
}

.muted { color: var(--muted); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--accent);
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--accent);
    opacity: .55;
}

.accent { color: var(--accent); }

/* ---------- layout ---------- */

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: clamp(20px, 5vw, 40px);
}

section { padding-block: var(--section); }

.hairline { border-top: 1px solid var(--line-soft); }

.prose { max-width: var(--prose); }

.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 76px); }
.section-head p { margin-top: 20px; }

/* ---------- navigazione ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 13, 15, .78);
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line-soft); }

.nav-inner {
    max-width: var(--wrap);
    margin-inline: auto;
    padding: 15px clamp(20px, 5vw, 40px);
    display: flex;
    align-items: center;
    gap: 28px;
}

.logo {
    font-size: 19px;
    font-weight: 650;
    letter-spacing: -.03em;
    text-decoration: none;
    margin-right: auto;
}
.logo span { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-size: 14.5px;
    color: var(--ink-2);
    text-decoration: none;
    transition: color .18s var(--ease);
}
.nav-links a:hover { color: var(--ink); }

.nav-toggle { display: none; }

/* ---------- bottoni ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 26px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 15.5px;
    font-weight: 550;
    font-family: inherit;
    letter-spacing: -.01em;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .18s var(--ease), background-color .18s var(--ease),
                border-color .18s var(--ease), opacity .18s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }

.btn-wa {
    background: var(--wa);
    color: #06281A;
    font-weight: 600;
}
.btn-wa:hover { background: #2FE673; }

.btn-ghost {
    border-color: var(--line);
    color: var(--ink);
    background: transparent;
}
.btn-ghost:hover { border-color: rgba(255,255,255,.26); background: rgba(255,255,255,.035); }

.btn-lg { padding: 18px 34px; font-size: 16.5px; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.nav-wa {
    padding: 9px 17px;
    border-radius: 999px;
    background: rgba(37, 211, 102, .12);
    border: 1px solid rgba(37, 211, 102, .3);
    color: var(--wa) !important;
    font-weight: 550;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.nav-wa:hover { background: rgba(37, 211, 102, .2); }

/* ---------- hero ---------- */

.hero {
    position: relative;
    padding-block: clamp(76px, 12vw, 150px) clamp(72px, 10vw, 130px);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -340px;
    left: 50%;
    width: 1100px;
    height: 760px;
    transform: translateX(-56%);
    background: radial-gradient(ellipse at center, rgba(216,175,74,.15), transparent 66%);
    pointer-events: none;
}

.hero-inner { position: relative; max-width: 940px; }

.hero h1 { margin-bottom: 30px; }
.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero .lead { max-width: 580px; margin-bottom: 40px; }

.hero-meta {
    margin-top: 44px;
    padding-top: 26px;
    border-top: 1px solid var(--line-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 10px 30px;
    font-size: 14.5px;
    color: var(--muted);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 9px; }
.hero-meta span::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

/* ---------- calcolatore ---------- */

.calc { background: var(--bg-2); }

.calc-card {
    display: grid;
    grid-template-columns: 1fr .82fr;
    gap: clamp(32px, 5vw, 64px);
    align-items: start;
}

.calc-fields { display: grid; gap: 30px; }

.field label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 15.5px;
    font-weight: 500;
}
.field-val {
    font-size: 17px;
    font-weight: 650;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 26px;
    background: transparent;
    cursor: grab;
    display: block;
}
input[type="range"]:active { cursor: grabbing; }

input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 99px;
    background: linear-gradient(to right,
        var(--accent) 0 var(--pct, 50%), rgba(255,255,255,.12) var(--pct, 50%) 100%);
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px; height: 22px;
    margin-top: -9px;
    border-radius: 50%;
    background: var(--ink);
    border: 5px solid var(--accent);
    box-shadow: 0 2px 10px rgba(0,0,0,.45);
}
input[type="range"]::-moz-range-track {
    height: 4px; border-radius: 99px; background: rgba(255,255,255,.12);
}
input[type="range"]::-moz-range-progress {
    height: 4px; border-radius: 99px; background: var(--accent);
}
input[type="range"]::-moz-range-thumb {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--ink);
    border: 5px solid var(--accent);
}

.field-hint { margin-top: 10px; font-size: 13.5px; color: var(--muted); }

.calc-out {
    background: var(--bg-3);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(26px, 3.4vw, 38px);
}

.calc-out-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 12px;
}

.calc-big {
    font-size: clamp(42px, 6.4vw, 66px);
    font-weight: 650;
    letter-spacing: -.045em;
    line-height: 1;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    margin-bottom: 8px;
}

.calc-sub { font-size: 15px; color: var(--ink-2); }

.calc-rows {
    margin: 26px 0;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
    display: grid;
    gap: 13px;
}
.calc-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14.5px;
    color: var(--muted);
}
.calc-row b {
    color: var(--ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.calc-honest {
    margin: 0 0 26px;
    padding: 16px 18px;
    border-left: 2px solid var(--accent);
    background: rgba(255, 255, 255, .025);
    border-radius: 0 8px 8px 0;
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--ink-2);
}
.calc-honest b { color: var(--ink); font-weight: 600; }

.calc-note {
    margin-top: 18px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------- elenco "ti suona familiare" ---------- */

.familiar-list {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line-soft);
    max-width: 880px;
}

.familiar-item {
    display: flex;
    gap: clamp(16px, 3vw, 32px);
    align-items: baseline;
    padding: 28px 4px;
    border-bottom: 1px solid var(--line-soft);
}
.familiar-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    flex: none;
    width: 28px;
    padding-top: 5px;
}
.familiar-item p { margin: 0; font-size: clamp(17px, 2vw, 20px); line-height: 1.5; color: var(--ink-2); }
.familiar-item b { color: var(--ink); font-weight: 600; }

.familiar-close {
    margin-top: 42px;
    font-size: clamp(19px, 2.4vw, 25px);
    line-height: 1.45;
    letter-spacing: -.018em;
    max-width: 720px;
}

/* ---------- spiegazione AI ---------- */

.explain { background: var(--bg-2); }

.explain-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 2.6vw, 32px);
    margin-bottom: clamp(40px, 5vw, 60px);
}

.explain-step {
    padding: clamp(24px, 3vw, 32px);
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}
.explain-icon {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: var(--accent-dim);
    color: var(--accent);
    margin-bottom: 20px;
}
.explain-step h3 { margin-bottom: 11px; }
.explain-step p { font-size: 15.5px; color: var(--muted); line-height: 1.6; }

.honest {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 52px);
    padding: clamp(28px, 3.6vw, 42px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
}
.honest h3 { margin-bottom: 16px; font-size: 18px; }
.honest ul { margin: 0; padding-left: 20px; }
.honest li { margin-bottom: 10px; font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }
.honest li:last-child { margin-bottom: 0; }
.honest-no li::marker { color: var(--muted); }
.honest-yes li::marker { color: var(--accent); }

/* ---------- servizi ---------- */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1px, .2vw, 2px);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--line-soft);
}

.service {
    padding: clamp(28px, 3.4vw, 40px);
    background: var(--bg);
    transition: background-color .25s var(--ease);
}
.service:hover { background: var(--bg-2); }
.service-n {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: .08em;
    display: block;
    margin-bottom: 22px;
}
.service h3 { margin-bottom: 13px; }
.service p { font-size: 15.5px; color: var(--muted); line-height: 1.62; }

/* ---------- casi ---------- */

.cases { background: var(--bg-2); }

.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(18px, 2.4vw, 28px);
}

.case {
    display: flex;
    flex-direction: column;
    padding: clamp(26px, 3.2vw, 34px);
    background: var(--bg);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
}
.case-tag {
    align-self: flex-start;
    margin-bottom: 20px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
}
.case h3 { margin-bottom: 12px; }
.case p { font-size: 15px; color: var(--muted); line-height: 1.6; }
.case-result {
    margin-top: auto;
    padding-top: 22px;
    border-top: 1px solid var(--line-soft);
    display: flex;
    align-items: baseline;
    gap: 11px;
}
.case-num {
    font-size: 32px;
    font-weight: 650;
    letter-spacing: -.035em;
    color: var(--accent);
    line-height: 1;
}
.case-label { font-size: 13.5px; color: var(--muted); line-height: 1.35; }

/* ---------- processo ---------- */

.steps {
    display: grid;
    gap: 0;
    max-width: 860px;
    counter-reset: step;
}
.step {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: clamp(18px, 3vw, 34px);
    padding: clamp(28px, 3.4vw, 40px) 0;
    border-top: 1px solid var(--line-soft);
}
.step:last-child { border-bottom: 1px solid var(--line-soft); }
.step-n {
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
}
.step h3 { margin-bottom: 11px; }
.step p { color: var(--muted); font-size: 16px; }

/* ---------- faq ---------- */

.faq-list { max-width: 820px; border-top: 1px solid var(--line-soft); }

details {
    border-bottom: 1px solid var(--line-soft);
}
summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 2px;
    cursor: pointer;
    font-size: clamp(16.5px, 1.9vw, 19px);
    font-weight: 550;
    letter-spacing: -.014em;
    list-style: none;
    transition: color .18s var(--ease);
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent); }
summary::after {
    content: "";
    flex: none;
    width: 11px; height: 11px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .25s var(--ease);
}
details[open] summary { color: var(--accent); }
details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq-a {
    padding: 0 2px 26px;
    max-width: 680px;
    color: var(--muted);
    font-size: 16px;
}

/* ---------- chiusura ---------- */

.closing {
    position: relative;
    text-align: center;
    overflow: hidden;
    background: var(--bg-2);
}
.closing::before {
    content: "";
    position: absolute;
    bottom: -400px; left: 50%;
    width: 1000px; height: 700px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(216,175,74,.16), transparent 68%);
    pointer-events: none;
}
.closing .wrap { position: relative; }
.closing h2 { max-width: 760px; margin-inline: auto; }
.closing .lead { max-width: 520px; margin: 24px auto 38px; }
.closing .btn-row { justify-content: center; }
.closing-alt { margin-top: 28px; font-size: 14.5px; color: var(--muted); }
.closing-alt a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }
.closing-alt a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---------- about ---------- */

.about-hero {
    display: grid;
    grid-template-columns: 1fr .72fr;
    gap: clamp(32px, 6vw, 80px);
    align-items: center;
}
.about-portrait {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--bg-2);
}
.about-portrait img { width: 100%; }

.about-body { max-width: var(--prose); }
.about-body h2 { margin: clamp(44px, 5vw, 64px) 0 20px; }
.about-body p { color: var(--ink-2); font-size: 17px; }
.about-body ul { padding-left: 20px; color: var(--ink-2); }
.about-body li { margin-bottom: 11px; }
.about-body li::marker { color: var(--accent); }

blockquote {
    margin: clamp(36px, 4.5vw, 54px) 0;
    padding-left: clamp(20px, 3vw, 32px);
    border-left: 2px solid var(--accent);
    font-size: clamp(20px, 2.6vw, 27px);
    line-height: 1.42;
    letter-spacing: -.022em;
    color: var(--ink);
}

/* ---------- pulsante whatsapp flottante ---------- */

.wa-float {
    position: fixed;
    right: clamp(18px, 3vw, 30px);
    bottom: clamp(18px, 3vw, 30px);
    z-index: 60;
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--wa);
    color: #06281A;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .45);
    transition: transform .22s var(--ease);
}
.wa-float:hover { transform: scale(1.07); }

/* ---------- footer ---------- */

footer {
    padding-block: 54px;
    border-top: 1px solid var(--line-soft);
    font-size: 14.5px;
    color: var(--muted);
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 18px 36px;
    align-items: center;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
footer a { text-decoration: none; transition: color .18s var(--ease); }
footer a:hover { color: var(--accent); }

/* ---------- comparsa allo scroll ---------- */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   responsive
   ============================================================ */

@media (max-width: 920px) {
    .calc-card,
    .explain-steps,
    .services-grid,
    .cases-grid,
    .honest,
    .about-hero { grid-template-columns: 1fr; }

    .about-hero { gap: 36px; }
    .about-portrait { max-width: 320px; }
    .services-grid { gap: 1px; }
}

@media (max-width: 760px) {
    body { font-size: 16.5px; }

    .nav-toggle {
        display: grid;
        place-items: center;
        gap: 5px;
        width: 42px; height: 42px;
        margin-left: auto;
        padding: 0;
        background: none;
        border: 1px solid var(--line);
        border-radius: 10px;
        cursor: pointer;
    }
    .nav-toggle span {
        display: block;
        width: 17px; height: 1.5px;
        background: var(--ink);
        border-radius: 2px;
        transition: transform .25s var(--ease), opacity .2s var(--ease);
    }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    .logo { margin-right: 0; }

    .nav-links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px clamp(20px, 5vw, 40px) 26px;
        background: rgba(11, 13, 15, .97);
        backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--line);
        display: none;
    }
    .nav-links.is-open { display: flex; }
    .nav-links a { padding: 15px 0; font-size: 17px; border-bottom: 1px solid var(--line-soft); }
    .nav-wa { margin-top: 18px; justify-content: center; border-bottom: none !important; }

    .btn, .btn-lg { width: 100%; }
    .btn-row { flex-direction: column; align-items: stretch; }

    .step { grid-template-columns: 40px 1fr; }
    .step-n { width: 38px; height: 38px; font-size: 14px; }

    .wa-float { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
    .reveal { opacity: 1; transform: none; }
}
