/* Font ospitati sul sito (licenza SIL OFL, vedi /fonts/OFL-*.txt): nessuna richiesta a Google */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/manrope-latin.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;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/fonts/manrope-latin-ext.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: 'Montserrat';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('/fonts/montserrat-latin.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;
}
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('/fonts/montserrat-latin-ext.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;
}

/* Palette Wawecrest (dal logo) */
:root {
    --oceano-chiaro: #0A6A90;
    --oceano: #065476;
    --oceano-profondo: #033A55;
    --bianco: #FFFFFF;
    --sole: #F6EEDC;
    --sole-hover: #FFF8EA;
    --schiuma: #CFE3EC;
    --font-titoli: 'Montserrat', sans-serif;
    --font-testo: 'Manrope', sans-serif;
    --transizione: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset di base */
*, *::before, *::after { box-sizing: border-box; }
html {
    -webkit-text-size-adjust: 100%;
    /* l'onda decorativa esce a destra: tagliamo solo in orizzontale */
    overflow-x: hidden;
    overflow-x: clip;
}
body, h1, p { margin: 0; }
a { color: inherit; text-decoration: none; }
input, button { font: inherit; color: inherit; margin: 0; }
button { cursor: pointer; border: 0; }
svg { display: block; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
[hidden] { display: none !important; }

/* Visibile solo a tastiera e lettori di schermo */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Anello di focus per chi naviga con la tastiera */
:focus-visible {
    outline: 2px solid var(--sole);
    outline-offset: 3px;
}

body {
    min-height: 100vh;
    min-height: 100dvh; /* segue la barra degli indirizzi su mobile */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    position: relative;
    background-color: var(--oceano-profondo);
    background-image:
        radial-gradient(ellipse 80% 70% at 60% 35%, var(--oceano-chiaro) 0%, var(--oceano) 45%, var(--oceano-profondo) 100%);
    color: var(--bianco);
    font-family: var(--font-testo);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    width: 100%;
    max-width: 72rem;
    margin-inline: auto;
    position: relative;
    z-index: 10;
}

/* Header */
.header { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.625rem; }
.logo-mark { width: 4.5rem; height: auto; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
    font-family: var(--font-titoli);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -0.01em;
}
.logo-tagline {
    margin-top: 0.3rem;
    font-family: var(--font-titoli);
    font-weight: 600;
    font-size: 0.625rem;
    line-height: 1;
    letter-spacing: 0.28em;
    color: var(--schiuma);
}
.lang {
    display: flex;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.lang a {
    min-width: 2.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: color var(--transizione), opacity var(--transizione);
}
.lang a:hover { color: var(--sole); opacity: 1; }
.lang a[aria-current="page"] {
    opacity: 1;
    text-decoration: underline;
    text-decoration-color: var(--sole);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

/* Hero */
.hero { flex-grow: 1; display: flex; align-items: center; padding-block: 3rem; }
.hero-content { max-width: 52rem; }
.badge {
    display: inline-block;
    border: 1px solid rgba(246, 238, 220, 0.6);
    color: var(--sole);
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    margin-bottom: 1.5rem;
}
h1 {
    font-family: var(--font-titoli);
    font-weight: 700;
    /* cresce con lo schermo: 36px su telefono, 64px su desktop */
    font-size: clamp(2.25rem, 1.2rem + 4.5vw, 4rem);
    line-height: 1.1;
    text-wrap: balance;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}
/* una frase per riga, ognuna bilanciata se va a capo */
h1 span { display: block; }
.lead {
    color: var(--schiuma);
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.625;
    max-width: 32rem;
    text-wrap: pretty;
}

/* Modulo */
/* lo spazio sopra lo porta il modulo: se è nascosto non resta vuoto */
.form { width: 100%; max-width: 28rem; margin-top: 2.5rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }
.pills input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}
.pills > div { position: relative; }
.pill {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: 1px solid rgba(207, 227, 236, 0.5);
    border-radius: 9999px;
    color: var(--schiuma);
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    cursor: pointer;
    transition: color var(--transizione), background-color var(--transizione), border-color var(--transizione);
}
.pill:hover { border-color: var(--bianco); color: var(--bianco); }
.pills input:checked + .pill {
    background-color: var(--sole);
    border-color: var(--sole);
    color: var(--oceano-profondo);
}
.pills input:focus-visible + .pill {
    outline: 2px solid var(--sole);
    outline-offset: 3px;
}

.field-row { display: flex; flex-direction: column; gap: 0.75rem; }
.email {
    flex-grow: 1;
    min-height: 44px;
    padding: 0.75rem 1rem;
    background: rgba(3, 58, 85, 0.35);
    border: 1px solid rgba(207, 227, 236, 0.45);
    border-radius: 9999px;
    color: var(--bianco);
    transition: border-color var(--transizione), box-shadow var(--transizione);
}
.email::placeholder { color: rgba(207, 227, 236, 0.85); opacity: 1; }
.email:focus {
    outline: none;
    border-color: var(--sole);
    box-shadow: 0 0 0 1px var(--sole);
}
.btn {
    min-height: 44px;
    padding: 0.75rem 2rem;
    background: var(--sole);
    color: var(--oceano-profondo);
    font-family: var(--font-titoli);
    font-weight: 700;
    border-radius: 9999px;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.35);
    transition: background-color var(--transizione);
}
.btn:hover { background: var(--sole-hover); }
.note {
    color: var(--schiuma);
    font-size: 0.8125rem;
    line-height: 1.25rem;
    margin-top: 0.75rem;
}

/* Onda decorativa */
.wave {
    display: none;
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 48%;
    max-width: 620px;
    opacity: 0.14;
    pointer-events: none;
}
.wave svg {
    width: 100%;
    height: auto;
}

/* Footer */
.footer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(207, 227, 236, 0.15);
    color: var(--schiuma);
    font-size: 0.875rem;
    line-height: 1.25rem;
}
.sports {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.025em;
}
.sports .dot { opacity: 0.3; }
.social {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 600;
    transition: color var(--transizione);
}
.social:hover { color: var(--sole); }

/* Telefoni stretti: logo e lingue più compatti per stare su una riga */
@media (max-width: 479px) {
    .logo { gap: 0.5rem; }
    .logo-mark { width: 3.5rem; }
    .logo-name { font-size: 1.25rem; }
    .logo-tagline { font-size: 0.625rem; letter-spacing: 0.16em; }
    .lang { gap: 0; font-size: 0.8125rem; letter-spacing: 0.06em; }
    .lang a { min-width: 2.25rem; }
}

/* Tablet e oltre */
@media (min-width: 640px) {
    .field-row { flex-direction: row; }
}
@media (min-width: 768px) {
    body { padding: 3rem; }
    .logo-mark { width: 5.5rem; }
    .logo-name { font-size: 1.875rem; }
    .logo-tagline { font-size: 0.6875rem; }
    .hero { padding-block: 6rem; }
    .lead { font-size: 1.25rem; }
    .footer { flex-direction: row; }
}
@media (min-width: 1024px) {
    .wave { display: block; }
}
/* Schermi bassi (telefono in orizzontale): meno aria verticale */
@media (max-height: 560px) {
    .hero { padding-block: 2rem; }
    h1 { font-size: 2.5rem; }
    .form { margin-top: 1.5rem; }
}
