/* ==========================================================================
   HORNOI V2 — LANDING MASTERCLASS
   Riusa .cd, .vs e .faq-split da blocks.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.ml-hero {
    padding-top: clamp(114px, 11vw, 156px);
    overflow: hidden;
}
.ml-hero__glow { top: -28%; right: -12%; width: 58vw; }

.ml-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    align-items: start;
    gap: clamp(38px, 5vw, 72px);
}
@media (max-width: 940px) {
    .ml-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 42px; }
}

.ml-hero .d1 { max-width: 18ch; }

.ml-hero__note {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: .84rem;
    color: var(--fg-muted);
}
.ml-hero__note svg { width: 16px; height: 16px; color: var(--orange); flex: none; }

/* --------------------------------------------------------------------------
   SCHEDA EVENTO
   -------------------------------------------------------------------------- */
.ml-card {
    display: grid;
    gap: clamp(18px, 2vw, 24px);
    padding: clamp(22px, 2.6vw, 32px);
    background: var(--surface);
    border: 1px solid rgba(255, 90, 31, .28);
    border-radius: var(--r-xl);
    box-shadow: 0 0 0 5px rgba(255, 90, 31, .05), var(--shadow-lg);
    position: sticky;
    top: 100px;
}
@media (max-width: 940px) { .ml-card { position: static; } }

.ml-card__date {
    display: grid;
    justify-items: center;
    padding-bottom: clamp(16px, 2vw, 22px);
    border-bottom: 1px solid var(--line);
    line-height: 1;
}
.ml-card__d {
    font-family: var(--f-display);
    font-size: clamp(3.6rem, 7vw, 4.8rem);
    font-weight: 700;
    letter-spacing: -.05em;
    color: var(--orange);
}
.ml-card__m {
    margin-top: 8px;
    font-family: var(--f-display);
    font-size: 1.14rem;
    font-weight: 600;
    letter-spacing: -.02em;
}
.ml-card__y {
    margin-top: 7px;
    font-family: var(--f-mono);
    font-size: .72rem;
    color: var(--fg-faint);
}

.ml-card__meta { display: grid; gap: 11px; }
.ml-card__meta li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .87rem;
    color: var(--fg-soft);
}
.ml-card__meta svg { width: 16px; height: 16px; color: var(--orange); flex: none; }

/* il countdown vive su fondo chiaro: ribalto i colori ereditati */
.ml-card .cd {
    background: var(--bg-alt);
    border-color: var(--line);
}
.ml-card .cd-t { color: var(--fg-faint); }
.ml-card .cd-g span { background: var(--surface-2); }
.ml-card .cd-g b { color: var(--fg); }
.ml-card .cd-g small { color: var(--fg-faint); }

.ml-card__host {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: clamp(16px, 2vw, 22px);
    border-top: 1px solid var(--line);
}
.ml-card__host .sig__ph {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--line);
}
.ml-card__host .sig__ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 16%;
    filter: grayscale(1) contrast(1.06);
}
.ml-card__host .sig__t { display: grid; gap: 3px; min-width: 0; }
.ml-card__host .sig__n {
    font-family: var(--f-display);
    font-size: .92rem;
    font-weight: 650;
    letter-spacing: -.02em;
    line-height: 1;
}
.ml-card__host .sig__r { font-size: .74rem; line-height: 1.3; color: var(--fg-muted); }

/* --------------------------------------------------------------------------
   AGENDA: i minuti al posto dei numeri di livello
   -------------------------------------------------------------------------- */
.ml-min {
    font-family: var(--f-mono) !important;
    font-size: .74rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    color: var(--orange) !important;
    white-space: nowrap;
    padding-top: 4px;
}
.lyr__item:has(.ml-min) { grid-template-columns: 78px minmax(0, 1fr); }
@media (max-width: 600px) {
    .lyr__item:has(.ml-min) { grid-template-columns: 64px minmax(0, 1fr); }
    .ml-min { font-size: .68rem !important; }
}

/* --------------------------------------------------------------------------
   ISCRIZIONE
   -------------------------------------------------------------------------- */
.ml-signup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}
@media (max-width: 940px) {
    .ml-signup { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}

.ml-signup__b .lead { max-width: 52ch; }

.ml-signup__f { display: grid; gap: 14px; }

.ml-fact {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}
.ml-fact > svg {
    width: 40px;
    height: 40px;
    padding: 10px;
    border-radius: var(--r-sm);
    background: rgba(255, 90, 31, .1);
    border: 1px solid rgba(255, 90, 31, .22);
    color: var(--orange);
}
.ml-fact strong {
    display: block;
    font-family: var(--f-display);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -.02em;
    margin-bottom: 3px;
}
.ml-fact span { font-size: .85rem; color: var(--fg-muted); }

/* --------------------------------------------------------------------------
   IL MODULO
   -------------------------------------------------------------------------- */
.ml-form {
    padding: clamp(26px, 3.4vw, 42px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow);
}

.mcf-field { margin-bottom: 18px; }

.mcf-field label {
    display: block;
    margin-bottom: 9px;
    font-size: .86rem;
    font-weight: 550;
    color: var(--fg);
}

.mcf-field input,
.mcf-field select {
    width: 100%;
    padding: 13px 16px;
    font-size: .95rem;
    font-family: var(--f-body);
    color: var(--fg);
    background: var(--bg-alt);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
    appearance: none;
    -webkit-appearance: none;
}

.mcf-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
    cursor: pointer;
}

.mcf-field input:focus,
.mcf-field select:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 90, 31, .13);
}

.mcf-field.has-error input,
.mcf-field.has-error select {
    border-color: #E5484D;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, .12);
}

/* campo esca: fuori dallo schermo, mai raggiungibile da tastiera */
.mcf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.mcf-privacy {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin: 4px 0;
    cursor: pointer;
}
.mcf-privacy input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--orange);
    cursor: pointer;
}
.mcf-privacy span {
    font-size: .87rem;
    line-height: 1.5;
    color: var(--fg-muted);
}
.mcf-privacy a {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 2px;
}

#hcMcPrivacyError { display: block; margin-bottom: 10px; }

.ml-form button[type="submit"] {
    position: relative;
    width: 100%;
    margin-top: 16px;
}
.mcf-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: opacity var(--t-fast);
}
.mcf-spin {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    opacity: 0;
}
.is-loading .mcf-label { opacity: 0; }
.is-loading .mcf-spin { opacity: 1; animation: ml-spin .7s linear infinite; }
@keyframes ml-spin { to { transform: rotate(360deg); } }

.ml-form button:disabled { cursor: not-allowed; }

.mcf-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: .8rem;
    color: var(--fg-faint);
}
.mcf-foot svg { width: 14px; height: 14px; flex: none; }

/* esito */
.mcf-feedback {
    margin-bottom: 20px;
    padding: 16px 18px;
    font-size: .92rem;
    line-height: 1.5;
    border-radius: var(--r);
    border: 1px solid var(--line);
    background: var(--surface-2);
}
.mcf-feedback.is-ok {
    border-color: rgba(63, 207, 107, .4);
    background: rgba(63, 207, 107, .09);
    color: var(--fg);
}
.mcf-feedback.is-err {
    border-color: rgba(229, 72, 77, .4);
    background: rgba(229, 72, 77, .07);
    color: var(--fg);
}

/* modulo completato */
#hcMcForm.is-done { opacity: .55; pointer-events: none; }
