/*------------------------------------*\
  Sito pubblico droveitalia.it
  Template: templates/public/site/ (layout in templates/base.html.twig)
  Convenzione: BEM (block__element--modifier)
\*------------------------------------*/

/** FONT *********************************************************************************/
/* Hanken Grotesk servito da noi (licenza OFL: ../fonts/hanken-grotesk-OFL.txt), font variabile 300-700 */
@font-face {
    font-family: 'Hanken Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/hanken-grotesk-latin-ext-_mbASbQ.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Hanken Grotesk';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/hanken-grotesk-latin-3Rrkxtk.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --ink: #181926;
    --ink-soft: rgba(24, 25, 38, 0.62);
    --ink-faint: rgba(24, 25, 38, 0.36);
    --card-blue: linear-gradient(135deg, #dce8fb 0%, #eef4fc 100%);
    --line: rgba(24, 25, 38, 0.14);
    --sky: #e0f0fd;
    --error: #b4442f;
    --font-family: 'Hanken Grotesk', sans-serif;
}

/*------------------------------------*\
  ------------- #RESET -------------
\*------------------------------------*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--ink);
    background-image: url("../images/site/background-6UUagA3.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Footer in fondo anche con poco contenuto */
.body--driver-info {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
}

/** NAV *********************************************************************************/
.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(20px, 5vw, 64px);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(24, 25, 38, 0.06);
}

.site-nav__logo {
    height: 20px;
    width: auto;
    display: block;
}

.site-nav__menu {
    list-style: none;
    display: flex;
    gap: clamp(18px, 3vw, 40px);
}

.site-nav__link {
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--ink-soft);
    transition: color 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link--current {
    color: var(--ink);
}

/** FOOTER *********************************************************************************/
.site-footer {
    padding: 40px clamp(20px, 6vw, 64px) 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.site-footer__brand {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* Dati aziendali e contatti: una riga per gruppo, a capo solo tra un gruppo e l'altro */
.site-footer__company {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-style: normal;
    font-size: 11.5px;
    line-height: 1.6;
    color: rgba(24, 25, 38, 0.5);
}

.site-footer__line {
    display: block;
}

.site-footer__link {
    text-decoration: none;
    white-space: nowrap;
}

.site-footer__link:hover {
    text-decoration: underline;
}

.site-footer__sep {
    margin: 0 6px;
    opacity: 0.6;
}

/* Link legali: riga a sé, sottolineati e con un'area di tocco adeguata */
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px 18px;
}

.site-footer__legal-link {
    padding: 6px 2px;
    background: none;
    border: 0;
    font: inherit;
    font-size: 12px;
    color: var(--ink-soft);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(24, 25, 38, 0.25);
    cursor: pointer;
}

.site-footer__legal-link:hover {
    color: var(--ink);
    text-decoration-color: currentColor;
}

/** KICKER (etichetta sopra i titoli) *********************************************************/
.kicker {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 14px;
}

/** HERO (home) *********************************************************************************/
.hero {
    min-height: 86svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8vh 6vw 6vh;
}

.hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 640px;
}

.hero__eyebrow {
    font-size: clamp(11px, 1.3vw, 13px);
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: clamp(22px, 4vw, 32px);
    opacity: 0;
    animation: rise 1s cubic-bezier(.16, .84, .44, 1) 0.15s forwards;
}

.hero__tagline {
    font-weight: 500;
    font-size: clamp(21px, 3vw, 30px);
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--ink);
    max-width: 460px;
    opacity: 0;
    animation: rise 1.1s cubic-bezier(.16, .84, .44, 1) 0.35s forwards;
}

.hero__brand {
    font-style: normal;
    font-weight: 600;
}

/** PHONE CAROUSEL (home) *********************************************************************************/
.phone-carousel {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.phone-carousel__frame {
    position: relative;
    width: min(56vw, 220px);
    aspect-ratio: 9 / 19.5;
    margin-top: clamp(34px, 5vw, 46px);
    background: var(--ink);
    border-radius: 34px;
    padding: 9px;
    box-shadow: 0 40px 70px -24px rgba(24, 25, 38, 0.35);
    opacity: 0;
    animation: rise 1.1s cubic-bezier(.16, .84, .44, 1) 0.6s forwards;
}

.phone-carousel__notch {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 32%;
    height: 16px;
    background: var(--ink);
    border-radius: 10px;
    z-index: 5;
}

.phone-carousel__screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 26px;
    overflow: hidden;
    background: #fff;
}

.phone-carousel__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.phone-carousel__image--active {
    opacity: 1;
}

.phone-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
    opacity: 0;
    animation: rise 1s cubic-bezier(.16, .84, .44, 1) 0.85s forwards;
}

.phone-carousel__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(24, 25, 38, 0.18);
    transition: background 0.3s ease;
}

.phone-carousel__dot--active {
    background: var(--ink);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/** SECTION (blocchi testo + immagine della home) *********************************************************/
.section {
    padding: clamp(60px, 10vw, 120px) clamp(20px, 6vw, 64px);
    max-width: 1180px;
    margin: 0 auto;
    scroll-margin-top: 90px;
}

.section__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.section__grid--reverse .section__text {
    order: 2;
}

.section__grid--reverse .section__media {
    order: 1;
}

.section__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 18px;
}

.section__description {
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 460px;
}

.section__image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 30px 60px -20px rgba(24, 25, 38, 0.28);
}

/** STATUS PILL *********************************************************************************/
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(24, 25, 38, 0.06);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-soft);
}

.status-pill__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d99a4e;
    flex-shrink: 0;
}

/** CHIPS *********************************************************************************/
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.chips__item {
    padding: 14px 18px;
    border-radius: 16px;
    background: var(--card-blue);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    max-width: 220px;
    line-height: 1.45;
}

.chips__title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 2px;
}

/** DIVENTA DRIVER *********************************************************************************/
.driver-info {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 32px) clamp(48px, 8vw, 80px);
}

.driver-info__intro {
    text-align: center;
    margin-bottom: clamp(28px, 5vw, 40px);
}

.driver-info__title {
    font-size: clamp(30px, 5vw, 42px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -0.015em;
    margin-bottom: 16px;
}

.driver-info__lead {
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 440px;
    margin: 0 auto;
}

/** FORM CARD (modulo "Diventa driver") *********************************************************/
.form-card {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(24, 25, 38, 0.08);
    border-radius: 28px;
    padding: clamp(22px, 4vw, 36px);
    box-shadow: 0 30px 60px -30px rgba(24, 25, 38, 0.22);
}

.form-card__field {
    margin-bottom: 20px;
    border: none;
}

.form-card__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 8px;
    padding-left: 6px;
}

.form-card__input {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 15px 22px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.form-card__input::placeholder {
    color: rgba(24, 25, 38, 0.32);
}

.form-card__input:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 4px rgba(224, 240, 253, 0.9);
}

.form-card__input--invalid {
    border-color: var(--error);
}

.form-card__choices {
    display: flex;
    gap: 12px;
}

.form-card__choice {
    flex: 1;
    position: relative;
}

.form-card__choice-input {
    position: absolute;
    opacity: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    margin: 0;
}

.form-card__choice-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-soft);
    transition: all .2s ease;
}

.form-card__choice-input:checked + .form-card__choice-label {
    background: var(--sky);
    border-color: var(--ink);
    color: var(--ink);
}

.form-card__choice-input:focus-visible + .form-card__choice-label {
    box-shadow: 0 0 0 4px rgba(224, 240, 253, 0.9);
    border-color: var(--ink);
}

.form-card__consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 6px 0 24px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}

.form-card__checkbox {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--ink);
}

.form-card__submit {
    width: 100%;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--sky);
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    padding: 17px 24px;
    cursor: pointer;
    transition: transform .15s ease, opacity .2s ease;
}

.form-card__submit:hover {
    transform: translateY(-1px);
}

.form-card__submit:disabled {
    opacity: .55;
    cursor: default;
    transform: none;
}

.form-card__message {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    color: var(--error);
    min-height: 1.5em;
}

/* Honeypot anti-spam: nascosto agli utenti */
.form-card__honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-card__success {
    display: none;
    text-align: center;
    padding: 20px 0 8px;
}

.form-card__success-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.form-card__success-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink-soft);
}

.form-card--sent .form-card__form {
    display: none;
}

.form-card--sent .form-card__success {
    display: block;
}

/** COOKIE CONSENT *********************************************************************************/
.cookie-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1000;
    max-width: 560px;
    margin: 0 auto;
    padding: 22px 22px 20px;
    background: #fff;
    color: var(--ink);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(24, 25, 38, .18);
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.55;
}

.cookie-consent[hidden] {
    display: none;
}

.cookie-consent__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 28px 8px 0;
}

.cookie-consent__text {
    margin: 0 0 16px;
    color: rgba(24, 25, 38, .72);
}

.cookie-consent__link {
    text-decoration: underline;
}

.cookie-consent__actions {
    display: flex;
    gap: 10px;
}

.cookie-consent__button {
    flex: 1;
    padding: 11px 16px;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--ink);
}

.cookie-consent__button:hover,
.cookie-consent__button:focus-visible {
    background: var(--ink);
    color: #fff;
}

.cookie-consent__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: var(--ink);
}

/** PAGINE LEGALI (privacy e cookie policy) *********************************************************/
.body--legal {
    background: #fff;
    color: #000;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-text-size-adjust: 100%;
}

/* Testo lungo redatto come documento: gli elementi interni sono stilati per tag */
.legal-content {
    max-width: 44rem;
    margin: 0 auto;
    padding: 3rem 1.25rem 4rem;
}

.legal-content h1,
.legal-content h2,
.legal-content h3,
.legal-content th {
    font-family: Helvetica, Arial, sans-serif;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
    line-height: 1.25;
    color: #000;
}

.legal-content h1 {
    font-size: 1.75rem;
    margin: 0 0 .5rem;
}

.legal-content h2 {
    font-size: 1.2rem;
    margin: 2.5rem 0 .75rem;
}

.legal-content h3 {
    font-size: 1rem;
    margin: 1.75rem 0 .5rem;
}

.legal-content p,
.legal-content ul,
.legal-content ol {
    margin: 0 0 1rem;
}

.legal-content ul,
.legal-content ol {
    padding-left: 2.5rem;
}

.legal-content li {
    margin-bottom: .35rem;
}

.legal-content a {
    color: #000;
    text-decoration: underline;
}

.legal-content a:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.legal-content .table-wrap {
    overflow-x: auto;
    margin: 0 0 1.25rem;
}

.legal-content table {
    border-collapse: collapse;
    width: 100%;
    font-size: .95rem;
    min-width: 32rem;
}

.legal-content th,
.legal-content td {
    border-bottom: 1px solid #ccc;
    padding: .55rem .7rem .55rem 0;
    text-align: left;
    vertical-align: top;
}

.legal-content th {
    font-size: .9rem;
    border-bottom: 1px solid #000;
}

.legal-content blockquote {
    margin: 1rem 0;
    padding: 0 0 0 1rem;
    border-left: 2px solid #000;
    color: #444;
}

.legal-content blockquote p {
    margin: 0;
}

/** RESPONSIVE *********************************************************************************/
@media (max-width: 820px) {
    .site-nav__menu {
        gap: 16px;
    }

    .site-nav__link {
        font-size: 13px;
    }

    .section__grid,
    .section__grid--reverse {
        grid-template-columns: 1fr;
    }

    .section__grid--reverse .section__text {
        order: 1;
    }

    .section__grid--reverse .section__media {
        order: 2;
    }

    .section__description {
        max-width: none;
    }
}

/* Smartphone: logo e voci non stanno su una riga (la pagina scorreva in orizzontale), vanno su due righe centrate */
@media (max-width: 560px) {
    .site-nav {
        flex-direction: column;
        gap: 12px;
        padding: 14px 16px 12px;
    }

    .site-nav__menu {
        gap: 18px;
    }

    .site-footer__company {
        font-size: 12px;
    }

    .site-footer__legal-link {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__eyebrow,
    .hero__tagline,
    .phone-carousel__frame,
    .phone-carousel__dots {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

@media print {
    .legal-content {
        padding: 0;
        max-width: none;
    }

    .legal-content h2 {
        break-after: avoid;
    }

    .legal-content table,
    .legal-content tr {
        break-inside: avoid;
    }
}
