/* ================================================
   Inaugurazione DAnyma Showroom — Bolgare (BG)
   Derivato da headspaweek.myorganics.it, ridisegnato sulla locandina:
   bianco, marrone #623E28 (campionato da "NUOVA APERTURA"), render dello showroom.
   ================================================ */

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

:root {
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7F1EB;
    --bg-card: #FFFFFF;
    --bg-input: #FCFAF8;
    --text-primary: #1E1A17;
    --text-secondary: #5C5049;
    --accent: #623E28;
    --accent-hover: #7D5338;
    --accent-soft: rgba(98, 62, 40, 0.12);
    --border: #E6DCD2;
    --error: #C0392B;
    --success: #3E7B4F;
    --placeholder: #A89A90;
    --font-heading: 'Bodoni Moda', 'Playfair Display', Georgia, serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ================================================
   INVITO (HERO)
   ================================================ */
.hero {
    position: relative;
    background: var(--bg-primary);
    overflow: hidden;
}

/* Il render dello showroom con il logo sopra, che sfuma nel bianco come sulla
   locandina. La velatura in alto serve solo a staccare il logo bianco dal soffitto
   chiaro; in basso il bianco pieno accoglie "Nuova apertura". */
.hero__photo {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 24px 0;
    background: #3a2618 url('../immagini/background_desktop.jpg') center 35% / cover no-repeat;
}

.hero__photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(40, 24, 14, 0.38) 0%,
        rgba(40, 24, 14, 0.12) 40%,
        rgba(255, 255, 255, 0) 58%,
        rgba(255, 255, 255, 0.85) 86%,
        #FFFFFF 100%
    );
    pointer-events: none;
}

.hero__logo-wrap {
    position: relative;
    z-index: 2;
    width: 780px;
    max-width: 86%;
}

.hero__logo {
    width: 100%;
    filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.35));
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
    margin: -14vh auto 0;
    padding: 0 24px 90px;
}

.hero__title-wrap {
    display: inline-block;
    margin-bottom: 26px;
}

.hero__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 4.6rem;
    line-height: 1.05;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--accent);
}

/* Il filetto sotto il titolo, largo quanto la scritta: sulla locandina è così. */
.hero__rule {
    display: block;
    height: 2px;
    margin-top: 10px;
    background: var(--accent);
}

.data__giorno {
    font-size: 2.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #111111;
    line-height: 1.2;
    margin-bottom: 4px;
}

.data__ora {
    font-size: 2.3rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.2;
}

.data__aperitivo {
    font-size: 1.25rem;
    color: #222222;
    margin-bottom: 40px;
}

.hero__testo {
    font-size: 1.15rem;
    color: #222222;
    max-width: 640px;
    margin: 0 auto 18px;
}

.hero__testo strong {
    font-weight: 700;
}

.hero__tagline {
    width: 600px;
    max-width: 92%;
    margin: 44px auto 46px;
}

.hero__cta {
    display: inline-block;
    padding: 16px 40px;
    border: 1px solid var(--accent);
    border-radius: 2px;
    background: var(--accent);
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
}

.hero__cta:hover {
    background: transparent;
    color: var(--accent);
}

/* ================================================
   CONFERMA PARTECIPAZIONE
   ================================================ */
.registration {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.registration__header {
    text-align: center;
    margin-bottom: 32px;
}

.registration__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.4rem;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.15;
    margin-bottom: 12px;
}

.registration__subtitle {
    font-size: 1.02rem;
    color: var(--text-secondary);
}

.registration__card {
    max-width: 580px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 48px 40px;
    box-shadow: 0 6px 28px rgba(98, 62, 40, 0.08);
    position: relative;
    overflow: hidden;
}

/* --- Form Styles --- */
.form__group {
    margin-bottom: 24px;
}

.form__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form__input-wrapper {
    position: relative;
}

.form__icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 0.95rem;
    pointer-events: none;
    transition: var(--transition);
}

.form__input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 400;
    transition: var(--transition);
    outline: none;
}

.form__input::placeholder {
    color: var(--placeholder);
}

.form__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form__input.is-invalid {
    border-color: var(--error);
}

.form__input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.form__input.is-valid {
    border-color: var(--success);
}

.form__error {
    display: block;
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 6px;
    min-height: 20px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.form__error.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Honeypot: fuori dallo schermo, non `display:none` (alcuni bot lo riconoscono). */
.form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Select N° accompagnatori --- */
.form__select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    /* Spazio a destra per la freccia disegnata a parte. */
    padding-right: 44px;
}

.form__select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form__select-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 0.8rem;
    pointer-events: none;
}

/* --- reCAPTCHA --- */
.form__recaptcha {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.form__recaptcha .form__error {
    text-align: center;
}

/* --- Submit Button --- */
.form__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    padding: 14px 24px;
    background: var(--accent);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
}

.form__submit:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.form__submit:active {
    transform: scale(0.98);
}

.form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form__submit-icon {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.form__submit:hover .form__submit-icon {
    transform: translateX(4px);
}

/* --- Success Message --- */
.registration__success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.registration__success.is-visible {
    display: block;
    animation: fadeInUp 0.6s ease forwards;
}

.registration__success-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.registration__success-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.registration__success-text {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

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

/* --- Privacy Checkbox --- */
.form__privacy {
    margin-bottom: 24px;
}

.form__checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    user-select: none;
}

.form__checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form__checkbox-custom {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 1px solid #CDBFB2;
    border-radius: 3px;
    background: var(--bg-input);
    position: relative;
    transition: var(--transition);
    margin-top: 1px;
}

.form__checkbox:checked + .form__checkbox-custom {
    background: var(--accent);
    border-color: var(--accent);
}

.form__checkbox:checked + .form__checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #FFFFFF;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form__checkbox:focus + .form__checkbox-custom {
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form__checkbox.is-invalid + .form__checkbox-custom {
    border-color: var(--error);
}

.form__checkbox-text {
    flex: 1;
}

.form__policy-link {
    color: var(--accent) !important;
    text-decoration: underline !important;
    transition: var(--transition);
}

.form__policy-link:hover {
    color: var(--accent-hover) !important;
}

.form__privacy .form__error {
    padding-left: 32px;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.is-open {
    display: flex;
    animation: modalFadeIn 0.3s ease;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 20, 14, 0.55);
    backdrop-filter: blur(4px);
}

.modal__container {
    position: relative;
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 48px rgba(30, 20, 14, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal__title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--accent);
    margin: 0;
}

.modal__close {
    background: none;
    border: none;
    color: #8A7B70;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal__close:hover {
    color: var(--accent);
    background: var(--accent-soft);
}

.modal__body {
    padding: 28px 32px 32px;
    overflow-y: auto;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
    scrollbar-width: thin;
    scrollbar-color: #D8CABD #FFFFFF;
}

.modal__update {
    font-size: 0.8rem;
    color: #8A7B70;
    margin-bottom: 24px;
    font-style: italic;
}

.modal__body h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 28px 0 12px;
}

.modal__body h3:first-of-type {
    margin-top: 0;
}

.modal__body h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 8px;
}

.modal__body p {
    margin: 0 0 12px;
}

.modal__body ul {
    margin: 0 0 16px;
    padding-left: 20px;
}

.modal__body li {
    margin-bottom: 6px;
}

.modal__body a {
    color: var(--accent);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.modal__body a:hover {
    color: var(--accent-hover);
}

.modal__body strong {
    color: var(--text-primary);
    font-weight: 600;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ================================================
   MAPPA
   ================================================ */
.location {
    padding: 100px 0;
    background: var(--bg-primary);
}

.location__title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 2.4rem;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
    margin-bottom: 16px;
}

.location__address {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 14px;
}

.location__address i {
    margin-right: 8px;
}

.location__indicazioni {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 28px;
    margin-bottom: 40px;
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-secondary);
}

.location__map-wrapper {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--accent);
    box-shadow: 0 6px 28px rgba(98, 62, 40, 0.1);
}

.location__map {
    display: block;
    width: 100%;
    height: 400px;
    border: none;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    padding: 60px 0 40px;
    background: var(--bg-secondary);
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer__logo {
    width: 260px;
    max-width: 70%;
    margin: 0 auto 34px;
}

.footer__social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px 36px;
    padding: 18px 0;
    margin-bottom: 26px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.footer__social-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.footer__social-item i {
    color: var(--accent);
    font-size: 1.05rem;
}

.footer__social-item:hover {
    color: var(--accent);
}

.footer__copy {
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* ================================================
   COOKIE BANNER
   ================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(30, 20, 14, 0.08);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner.is-hiding {
    transform: translateY(100%);
}

.cookie-banner__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
}

.cookie-banner__text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner__link {
    color: var(--accent) !important;
    text-decoration: underline !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cookie-banner__link:hover {
    color: var(--accent-hover) !important;
}

.cookie-banner__accept {
    flex-shrink: 0;
    padding: 8px 24px;
    background: var(--accent);
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cookie-banner__accept:hover {
    background: var(--accent-hover);
}

/* ================================================
   RESPONSIVE
   ================================================ */

/* Tablet */
@media (max-width: 768px) {
    .hero__photo {
        min-height: 70vh;
        padding-top: 10vh;
        background-image: url('../immagini/background_mobile.jpg');
        background-position: center top;
    }

    .hero__content {
        margin-top: -10vh;
        padding-bottom: 70px;
    }

    .hero__title {
        font-size: 3.2rem;
    }

    .data__giorno {
        font-size: 1.6rem;
    }

    .data__ora {
        font-size: 1.75rem;
    }

    .data__aperitivo {
        font-size: 1.05rem;
    }

    .hero__testo {
        font-size: 1.02rem;
    }

    .registration {
        padding: 70px 0;
    }

    .registration__title,
    .location__title {
        font-size: 2rem;
    }

    .registration__card {
        padding: 36px 28px;
    }

    .location {
        padding: 70px 0;
    }

    .location__map {
        height: 300px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .hero__photo {
        min-height: 62vh;
        padding: 9vh 16px 0;
    }

    .hero__content {
        padding: 0 16px 56px;
    }

    .hero__title {
        font-size: 2.25rem;
    }

    .hero__rule {
        margin-top: 6px;
    }

    .data__giorno {
        font-size: 1.25rem;
    }

    .data__ora {
        font-size: 1.35rem;
    }

    .data__aperitivo {
        font-size: 0.92rem;
        margin-bottom: 30px;
    }

    .hero__testo {
        font-size: 0.95rem;
    }

    .hero__tagline {
        margin: 32px auto 36px;
    }

    .hero__cta {
        padding: 14px 26px;
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .registration {
        padding: 50px 0;
    }

    .registration__title,
    .location__title {
        font-size: 1.6rem;
    }

    .registration__card {
        padding: 28px 20px;
    }

    .form__input {
        padding: 12px 14px 12px 44px;
        font-size: 0.9rem;
    }

    .form__submit {
        min-height: 50px;
        font-size: 0.82rem;
    }

    .location {
        padding: 50px 0;
    }

    .location__address {
        font-size: 1.02rem;
    }

    .location__indicazioni {
        flex-direction: column;
        align-items: center;
        font-size: 0.82rem;
    }

    .location__map {
        height: 260px;
    }

    .footer {
        padding: 40px 0 30px;
    }

    .footer__social {
        flex-direction: column;
        gap: 12px;
    }

    .modal__container {
        max-height: 90vh;
    }

    .modal__header {
        padding: 18px 20px;
    }

    .modal__title {
        font-size: 1.2rem;
    }

    .modal__body {
        padding: 20px;
        font-size: 0.85rem;
    }

    .modal {
        padding: 12px;
    }

    .cookie-banner__inner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 12px 20px;
    }

    .cookie-banner__text {
        font-size: 0.75rem;
    }

    .cookie-banner__accept {
        width: 100%;
        padding: 10px 24px;
    }
}

/* Telefoni stretti (360px): a 2.25rem "Nuova apertura" va su due righe e il
   filetto sotto resta largo quanto la riga più lunga. Una riga sola è più fedele. */
@media (max-width: 400px) {
    .hero__title {
        font-size: 1.9rem;
    }
}
