/* Palette chiara: superfici bianche, verde petrolio e contrasti leggibili. */
:root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --surface: #f3f8f6;
    --surface-high: #e8f2ee;
    --text: #142e2b;
    --muted: #526b65;
    --accent: #087d67;
    --line: #d4e4dd;
}

/* Il comando resta raggiungibile a destra anche quando il menu è chiuso. */
.theme-toggle {
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 25px;
}

.header-inner {
    gap: 20px;
}

.site-nav {
    margin-left: auto;
}

/* La richiesta occupa il centro della scena; la demo segue come approfondimento. */
.hero {
    position: relative;
    isolation: isolate;
    grid-template-columns: minmax(0, 1fr);
    gap: 64px;
    padding-block: 48px 72px;
    min-height: 0;
}

.hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 -20px 35%;
    background: radial-gradient(ellipse at 50% 35%, #75d9ba28, transparent 65%);
    pointer-events: none;
}

.hero-copy {
    width: 100%;
    max-width: 920px;
    margin-inline: auto;
    text-align: center;
}

.hero .eyebrow,
.hero .button-row,
.hero-footnote {
    justify-content: center;
}

.hero h1 {
    font-size: clamp(68px, 8vw, 112px);
    letter-spacing: -5px;
    line-height: 1.02;
    margin-bottom: 20px;
}

.hero-lead {
    font-size: clamp(22px, 2.5vw, 29px);
    margin-bottom: 24px;
}

.hero-description {
    max-width: 580px;
    margin-inline: auto;
}

.customer-search {
    /* Le dimensioni e il contrasto rendono il form il fulcro visivo della home. */
    position: relative;
    max-width: 880px;
    margin: 26px auto 28px;
    padding: 36px;
    color: #ffffff;
    text-align: left;
    border: 1px solid #499f89;
    border-radius: 28px;
    background: radial-gradient(ellipse at top right, #288a7055, transparent 65%),
        linear-gradient(120deg, #103e36, #0a2927);
    box-shadow: 0 26px 65px #104e3930, 0 0 0 7px #80cdb425;
    transition: box-shadow .2s, border-color .2s;
}

.customer-search:focus-within {
    border-color: #93e3d0;
    box-shadow: 0 26px 65px #104e3940, 0 0 0 7px #80cdb440;
}

.customer-search label {
    display: block;
    margin-bottom: 20px;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.7px;
}

.customer-search input {
    min-height: 72px;
    padding: 20px;
    border: 2px solid transparent;
    border-radius: 14px;
    background: white;
    color: #142e2b;
    font-size: 18px;
}

.customer-search input:focus {
    outline: 3px solid #93e3d0;
    outline-offset: 3px;
}

.customer-search small {
    margin-top: 18px;
    color: #c3e3d7;
    font-size: 13px;
}

.customer-search input::placeholder {
    color: #60766f;
    opacity: 1;
}

.customer-search .button.button-primary {
    min-height: 72px;
    padding-inline: 30px;
    border-radius: 14px;
    background: #a6efd3;
    color: #103e36;
    font-size: 17px;
    font-weight: 750;
    box-shadow: 0 6px 20px #0002;
}

.customer-search .button.button-primary:hover {
    background: #ceffe9;
}

.customer-search .button:focus-visible {
    outline-color: #ffffff;
}

.hero-footnote {
    margin-top: 22px;
}

.hero-visual {
    width: 100%;
    max-width: 660px;
    margin-inline: auto;
}

.hero-visual::before {
    inset-inline: 0;
}

.prime-demo {
    transform: none;
}

/* Rimuove i colori scuri fissi anche dalle pagine interne e dalle card. */
:root:not([data-theme="dark"]) .site-header {
    background: #ffffffed;
}

:root:not([data-theme="dark"]) .accent {
    background-image: linear-gradient(110deg, #087d67, #18645d, #309482);
}

:root:not([data-theme="dark"]) :is(.prime-demo, .principle-card, .testimonial-card) {
    background: linear-gradient(135deg, #ffffff, #edf7f2);
    border-color: var(--line);
    box-shadow: 0 16px 44px #194a3710;
}

:root:not([data-theme="dark"]) :is(.site-footer, .testimonials) {
    background: #f3f8f6;
}

:root:not([data-theme="dark"]) :is(.site-nav > a, .example-badge, .request-tags span,
    .request-preview > p, .scenario-picker button, .demo-disclaimer, .visual-caption,
    .principle-card p, .testimonial-card blockquote, .review-person div > span,
    .review-example, .reciprocal-caption, .footer-label, .footer-note, .footer-bottom,
    .status-badge) {
    color: var(--muted);
}

:root:not([data-theme="dark"]) .bubble-user {
    background: #d5eee4;
}

:root:not([data-theme="dark"]) .prime-symbol {
    color: white;
}

:root:not([data-theme="dark"]) .bubble-prime {
    background: #edf2ef;
    color: var(--text);
}

/* Mantiene logo, menu e tema sulla stessa riga anche a 320 px. */
@media (max-width: 380px) {
    .header-inner {
        gap: 8px;
    }

    .header-inner .brand {
        font-size: 20px;
    }

    .header-inner .brand img {
        width: 32px;
        height: 32px;
    }

    .menu-toggle {
        gap: 4px;
        padding: 8px;
        font-size: 12px;
    }
}

:root:not([data-theme="dark"]) .scenario-picker button[aria-pressed="true"] {
    background: #087d67;
    color: white;
}

:root:not([data-theme="dark"]) .button-primary {
    background: #087d67;
    color: white;
}

:root:not([data-theme="dark"]) .button-primary:hover {
    background: #096752;
}

@media (max-width: 900px) and (min-width: 701px) {
    .header-inner {
        flex-wrap: wrap;
        padding-block: 14px;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .theme-toggle {
        margin-left: auto;
    }
}

@media (max-width: 700px) {
    .header-inner {
        gap: 12px;
    }

    .menu-toggle {
        margin-left: auto;
    }

    .theme-toggle {
        width: 40px;
        height: 40px;
    }

    .site-nav {
        order: 3;
    }

    .hero {
        padding-block: 32px 44px;
        gap: 42px;
    }

    .hero h1 {
        font-size: clamp(54px, 12vw, 80px);
        letter-spacing: -3px;
    }

    .hero .eyebrow {
        line-height: 1.6;
        font-size: 8px;
        letter-spacing: .8px;
    }

    .customer-search {
        margin-top: 22px;
        padding: 24px;
        border-radius: 22px;
    }

    .customer-search input {
        min-height: 64px;
        padding: 16px;
        font-size: 16px;
    }

    .customer-search .button.button-primary {
        min-height: 60px;
    }

    .customer-search label {
        font-size: 25px;
    }

    .hero-footnote {
        font-size: 10px;
    }
}

/* Su tablet il campo mantiene spazio per la scrittura, senza un bottone affiancato. */
@media (max-width: 700px) {
    .customer-search-row {
        flex-direction: column;
        gap: 12px;
    }
}
