:root {
    --blue: #082c6f;
    --blue-2: #0d4595;
    --red: #ef2636;
    --green: #27a844;
    --ink: #071f55;
    --muted: #59709d;
    --line: #dce7f5;
    --surface: #ffffff;
    --soft: #f6f9fd;
    --shadow: 0 18px 45px rgba(7, 31, 85, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    position: relative;
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background:
        linear-gradient(115deg, transparent 0 42%, rgba(13, 69, 149, 0.045) 42% 44%, transparent 44% 100%),
        radial-gradient(circle at 16% 6%, rgba(239, 38, 54, 0.08), transparent 22rem),
        radial-gradient(circle at 92% 34%, rgba(13, 69, 149, 0.1), transparent 20rem),
        linear-gradient(180deg, #ffffff 0%, #f4f8fd 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 22%, rgba(239, 38, 54, 0.07), transparent 12rem),
        radial-gradient(circle at 82% 68%, rgba(8, 44, 111, 0.08), transparent 16rem);
    animation: ambientDrift 12s ease-in-out infinite alternate;
    pointer-events: none;
}

button,
input {
    font: inherit;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 32px;
}

.brand-header {
    overflow: hidden;
    display: grid;
    min-height: clamp(150px, 25vw, 280px);
    place-items: center;
}

.brand-header img {
    width: min(100%, 1000px);
    max-height: 290px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 18px 22px rgba(8, 44, 111, 0.08));
}

.hero-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(18px, 3vw, 42px);
    align-items: center;
    min-height: 210px;
    padding: clamp(24px, 4vw, 46px);
    color: #ffffff;
    background:
        radial-gradient(circle at 77% 44%, rgba(239, 38, 54, 0.25), transparent 5rem),
        linear-gradient(135deg, #062762 0%, #0a3d8b 56%, #06235b 100%);
    border-radius: 24px;
    box-shadow: var(--shadow);
    isolation: isolate;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, transparent 0 34%, rgba(255, 255, 255, 0.16) 44%, transparent 54% 100%),
        repeating-linear-gradient(0deg, transparent 0 18px, rgba(255,255,255,0.03) 18px 19px);
    background-size: 220% 100%, auto;
    animation: heroSheen 6s ease-in-out infinite;
    pointer-events: none;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    pointer-events: none;
}

.hero-icon {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: end;
    min-width: 150px;
}

.hero-icon span {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    color: #ffffff;
    border: 6px solid #ffffff;
    border-radius: 50%;
    font-size: 48px;
    font-weight: 900;
    animation: softBounce 4s ease-in-out infinite;
}

.hero-icon span + span {
    width: 76px;
    height: 76px;
    margin-left: -24px;
    color: #ffffff;
    background: var(--red);
    font-size: 42px;
}

.hero-panel > div:not(.radar) {
    position: relative;
    z-index: 1;
}

.eyebrow {
    margin: 0 0 6px;
    color: inherit;
    font-size: clamp(30px, 7vw, 72px);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 0.95;
    text-transform: uppercase;
}

.hero-panel h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(36px, 8vw, 76px);
    line-height: 1;
    text-transform: uppercase;
}

.hero-panel p:last-child {
    margin: 12px 0 0;
    max-width: 700px;
    font-size: clamp(18px, 2.2vw, 25px);
}

.hero-panel strong,
.cta-panel strong,
.site-footer strong {
    color: var(--red);
}

.radar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(239, 38, 54, 0.9) 0 4px, transparent 5px),
        repeating-radial-gradient(circle, rgba(239, 38, 54, 0.36) 0 1px, transparent 1px 16px),
        conic-gradient(from 30deg, rgba(239, 38, 54, 0.5), transparent 34%);
    opacity: 0.78;
    animation: sweep 3s linear infinite;
}

.is-hidden {
    display: none !important;
}

.participant-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
    margin: 22px 0;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(7, 31, 85, 0.08);
}

.participant-panel label {
    display: grid;
    gap: 8px;
    color: var(--blue);
    font-weight: 800;
}

.participant-panel input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--ink);
    background: #fbfdff;
    border: 1px solid #cbd9eb;
    border-radius: 10px;
    outline: none;
}

.participant-panel input:focus {
    border-color: var(--blue-2);
    box-shadow: 0 0 0 4px rgba(13, 69, 149, 0.12);
}

.quiz-form {
    display: grid;
    gap: 20px;
}

.question-card {
    position: relative;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 190px;
    gap: clamp(18px, 3vw, 48px);
    align-items: center;
    margin: 0;
    min-height: 270px;
    padding: clamp(22px, 3vw, 38px);
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(7, 31, 85, 0.08);
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.question-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, var(--red), var(--blue-2));
    opacity: 0;
    transition: opacity 180ms ease;
}

.question-card:hover {
    transform: translateY(-3px);
    border-color: rgba(13, 69, 149, 0.22);
    box-shadow: 0 18px 42px rgba(7, 31, 85, 0.13);
}

.question-card:hover::before,
.question-card.is-correct::before,
.question-card.is-wrong::before {
    opacity: 1;
}

.question-card legend {
    display: contents;
    color: var(--blue);
    font-size: clamp(21px, 2.6vw, 29px);
    font-weight: 900;
    line-height: 1.16;
}

.question-card legend > span:last-child {
    grid-column: 2;
    align-self: end;
    margin-bottom: 12px;
}

.question-art {
    width: 100%;
    max-height: 170px;
    object-fit: contain;
    filter: drop-shadow(0 12px 12px rgba(8, 44, 111, 0.08));
    animation: artFloat 5.2s ease-in-out infinite;
}

.question-art-left {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    margin-top: 34px;
}

.question-art-right {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.options {
    grid-column: 2;
    display: grid;
    gap: 13px;
    align-self: start;
}

.option {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 38px;
    cursor: pointer;
    border-radius: 999px;
    transition: background 160ms ease, transform 160ms ease;
}

.option:hover {
    background: rgba(13, 69, 149, 0.045);
    transform: translateX(3px);
}

.option input {
    position: absolute;
    opacity: 0;
}

.option-letter {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: var(--blue);
    background: #ffffff;
    border: 2px solid var(--blue);
    border-radius: 50%;
    font-size: 21px;
    font-weight: 800;
    transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.option-label {
    color: var(--ink);
    font-size: clamp(18px, 2.1vw, 23px);
    line-height: 1.32;
    transition: color 160ms ease;
}

.option:hover .option-letter,
.option input:focus-visible + .option-letter {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(13, 69, 149, 0.12);
}

.option input:checked + .option-letter {
    color: #ffffff;
    background: var(--blue);
}

.question-card.is-correct {
    border-color: rgba(39, 168, 68, 0.5);
    box-shadow: 0 14px 34px rgba(39, 168, 68, 0.16);
}

.question-card.is-wrong {
    border-color: rgba(239, 38, 54, 0.42);
}

.option.is-correct .option-letter {
    color: #ffffff;
    background: var(--green);
    border-color: var(--green);
}

.option.is-correct .option-label {
    color: #118333;
    font-weight: 900;
}

.option.is-wrong .option-letter {
    color: #ffffff;
    background: var(--red);
    border-color: var(--red);
}

.option.is-wrong .option-label {
    color: #c81726;
}

.option.is-correct .option-letter::before {
    content: "\2713";
}

.option.is-correct .option-letter {
    font-size: 0;
}

.cta-panel {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) auto;
    gap: 28px;
    align-items: center;
    padding: clamp(20px, 3vw, 34px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 253, 0.98)),
        radial-gradient(circle at 86% 48%, rgba(239, 38, 54, 0.1), transparent 14rem);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 12px 30px rgba(7, 31, 85, 0.08);
    overflow: hidden;
    position: relative;
}

.cta-panel::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue), var(--red), var(--blue-2));
}

.cta-panel img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}

.cta-panel p,
.cta-panel h2 {
    margin: 0;
    text-align: center;
}

.cta-panel p {
    font-size: clamp(18px, 2.4vw, 25px);
    line-height: 1.35;
}

.cta-panel h2 {
    margin-top: 10px;
    color: var(--blue);
    font-size: clamp(22px, 3vw, 31px);
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 250px;
    min-height: 64px;
    padding: 0 26px;
    color: #ffffff;
    background: linear-gradient(180deg, #ff2e36, #d91524);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 22px rgba(239, 38, 54, 0.28);
    cursor: pointer;
    font-size: 23px;
    font-weight: 900;
    text-transform: uppercase;
    transition: transform 160ms ease, box-shadow 160ms ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.primary-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0 28%, rgba(255, 255, 255, 0.28) 42%, transparent 56% 100%);
    transform: translateX(-110%);
    animation: buttonSheen 3.8s ease-in-out infinite;
    z-index: -1;
}

.participant-submit,
.cta-submit {
    align-self: end;
    min-width: 230px;
}

.primary-button svg {
    width: 28px;
    height: 28px;
}

.primary-button:hover,
.primary-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(239, 38, 54, 0.34);
    outline: none;
}

.primary-button.is-results {
    background: linear-gradient(180deg, #0f4da4, #082d73);
    box-shadow: 0 12px 22px rgba(8, 44, 111, 0.24);
}

.results-panel {
    margin-top: 22px;
    padding: clamp(22px, 4vw, 42px);
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #082c6f, #0d4595);
    border-radius: 22px;
    box-shadow: var(--shadow);
    animation: resultRise 420ms ease-out both;
}

.results-panel .eyebrow {
    font-size: 22px;
}

.results-panel h2 {
    margin: 6px 0;
    font-size: clamp(34px, 7vw, 70px);
}

.results-panel p {
    margin: 0;
    font-size: clamp(18px, 2.6vw, 25px);
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 24px max(18px, calc((100vw - 1180px) / 2));
    color: #ffffff;
    background: linear-gradient(90deg, #07245c, #0a3b88 58%, #06245c);
}

.site-footer > div {
    display: flex;
    gap: 20px;
    align-items: center;
}

.site-footer p {
    margin: 0;
    font-size: clamp(16px, 2.1vw, 22px);
    line-height: 1.35;
}

.footer-mark {
    width: 72px;
    height: 72px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, #ffffff 0 5px, transparent 6px),
        radial-gradient(circle at 35% 58%, #ffffff 0 5px, transparent 6px),
        radial-gradient(circle at 65% 58%, #ffffff 0 5px, transparent 6px);
}

.site-footer .menarini {
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 3vw, 34px);
}

.contact-strip {
    position: relative;
    overflow: hidden;
    padding: 13px 18px;
    text-align: center;
    background: var(--red);
}

.contact-strip::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 0 35%, rgba(255, 255, 255, 0.18) 46%, transparent 58% 100%);
    animation: stripSheen 5s ease-in-out infinite;
}

.contact-strip a {
    position: relative;
    color: #ffffff;
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 900;
    text-decoration: none;
}

.celebration {
    position: fixed;
    z-index: 20;
    width: 9px;
    height: 18px;
    pointer-events: none;
    animation: confetti 950ms ease-out forwards;
}

.toast {
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    width: min(560px, calc(100% - 32px));
    padding: 16px 18px;
    color: #ffffff;
    text-align: center;
    background: var(--red);
    border-radius: 14px;
    box-shadow: var(--shadow);
    font-weight: 800;
}

@keyframes sweep {
    to {
        transform: rotate(360deg);
    }
}

@keyframes ambientDrift {
    to {
        transform: translate3d(0, -18px, 0) scale(1.04);
    }
}

@keyframes heroSheen {
    0%,
    42% {
        background-position: 130% 0, 0 0;
    }
    74%,
    100% {
        background-position: -80% 0, 0 0;
    }
}

@keyframes softBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes artFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

@keyframes buttonSheen {
    0%,
    50% {
        transform: translateX(-110%);
    }
    78%,
    100% {
        transform: translateX(110%);
    }
}

@keyframes stripSheen {
    0%,
    48% {
        transform: translateX(-120%);
    }
    82%,
    100% {
        transform: translateX(120%);
    }
}

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

@keyframes confetti {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--x), var(--y), 0) rotate(420deg);
    }
}

@media (max-width: 860px) {
    .page-shell {
        width: min(100% - 20px, 680px);
        padding-top: 12px;
    }

    .hero-panel,
    .question-card,
    .cta-panel,
    .participant-panel {
        border-radius: 16px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-icon,
    .radar {
        display: none;
    }

    .participant-panel,
    .cta-panel {
        grid-template-columns: 1fr;
    }

    .cta-panel img {
        justify-self: center;
    }

    .primary-button {
        width: 100%;
        min-width: 0;
    }

    .cta-submit {
        justify-self: stretch;
    }

    .question-card {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 16px;
        min-height: 0;
        padding: 22px;
    }

    .question-card legend > span:last-child {
        grid-column: 1 / -1;
        margin-bottom: 8px;
    }

    .question-art-left {
        grid-column: 1;
        grid-row: 2;
        max-height: 104px;
        margin: 0;
    }

    .options {
        grid-column: 2;
        grid-row: 2;
    }

    .question-art-right {
        display: none;
    }

    .option {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
    }

    .option-letter {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .site-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

@media (max-width: 520px) {
    .brand-header {
        min-height: 112px;
    }

    .hero-panel {
        min-height: 0;
        padding: 22px 18px;
    }

    .question-card {
        grid-template-columns: 1fr;
    }

    .question-art-left {
        display: none;
    }

    .options {
        grid-column: 1;
    }

    .participant-panel {
        padding: 18px;
    }
}
