/* SLEEK INTERFACE THEME */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-color: #F8FAFC;
    --text-color: #0F172A;
    --card-bg: #FFFFFF;
    --primary-color: #0F172A;
    --secondary-text: #64748B;
    --border-color: #E2E8F0;
    --success-bg: #F0FDF4;
    --success-color: #16A34A;
    --error-bg: #FEF2F2;
    --error-color: #DC2626;
    --focus-ring: rgba(15, 23, 42, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    background-image: url('assets/bg.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    margin: 0;
    width: 100%;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Fix background su iOS Safari: fixed causa glitch di rendering */
@supports (-webkit-touch-callout: none) {
    body {
        background-attachment: scroll;
    }
}

/* HEADER */
header {
    width: 100%;
    padding: 32px;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
}

header div {
    display: flex;
    gap: 24px;
}

header a {
    color: var(--secondary-text);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
    padding: 10px 5px; /* Aumenta l'area di tocco */
    display: inline-block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
    touch-action: manipulation;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

header a:hover {
    color: var(--text-color);
}

/* CONTAINER & CARD */
.container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
}

.card {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 40px;
    border-radius: 24px;
    box-shadow: none;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: none;
}

/* Scanner e Ticket card: troppo contenuto per fluttuare, vetro leggero */
#scannerSection, #publicTicketCard {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1.5px solid rgba(99, 102, 241, 0.45);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1E293B;
}

.card p.subtitle {
    color: var(--secondary-text);
    font-size: 0.875rem;
    margin-bottom: 32px;
}

/* INPUTS */
input {
    width: 100%;
    padding: 16px 20px;
    margin: 8px 0;
    background-color: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.2s;
    outline: none;
}

input:focus {
    border-color: #94A3B8;
    box-shadow: 0 0 0 4px var(--focus-ring);
    background-color: #FFF;
}

input#verifyInput {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    text-align: center;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* BUTTONS */
button {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    pointer-events: auto;
}

button:hover {
    background-color: #1E293B;
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
    opacity: 0.95;
}

button.secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

button.secondary:hover {
    background-color: #F8FAFC;
    border-color: #94A3B8;
}

/* RESULTS */
.result {
    margin-top: 32px;
    padding: 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 1.25rem;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.45);
    border: 1px dashed rgba(226, 232, 240, 0.8);
    white-space: pre-line;
    color: #94A3B8;
}

/* SCANNER HISTORY */
.history-list {
    margin-top: 24px;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}
.history-item {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    color: var(--secondary-text);
    align-items: center;
}

.result.valid {
    background-color: var(--success-bg);
    border: 1px solid #DCFCE7;
    color: var(--success-color);
}

.result.invalid {
    background-color: var(--error-bg);
    border: 1px solid #FEE2E2;
    color: var(--error-color);
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    z-index: 2000;
    overflow: hidden;
}

.modal {
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 24px;
    width: min(90vw, 480px);
    max-width: calc(100vw - 32px);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.6);
    margin: auto;
}

/* SOCIAL AUTH BUTTONS */
.social-auth {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: white !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
}
.btn-social img {
    width: 20px;
    height: 20px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 20px;
    cursor: pointer;
    color: #94A3B8;
    transition: color 0.2s;
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

.close-modal:hover {
    color: var(--text-color);
}

.tab-buttons {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--secondary-text);
    padding: 0 0 12px 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    width: auto;
    margin-top: 0;
    border-radius: 0;
    transition: all 0.2s;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    pointer-events: auto;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* REGISTRATION RESULT */
.registration-success h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.registration-success p {
    color: var(--secondary-text);
    font-size: 0.875rem;
    line-height: 1.5;
}

.code-display {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: #F1F5F9;
    color: var(--text-color);
    padding: 24px;
    border-radius: 16px;
    display: block;
    margin: 24px 0;
    letter-spacing: 0.1em;
    border: 1px solid var(--border-color);
}

.qr-code {
    margin: 32px auto 0;
    padding: 16px;
    background: rgba(255, 255, 255, 0.70);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: fit-content;
}

/* FOOTER INFO */
footer {
    padding: 32px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 10px;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

/* WARNING BOX */
.temporary-account-warning {
    font-size: 0.8rem;
    color: #9A3412;
    background-color: #FFF7ED;
    border: 1px solid #FED7AA;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: left;
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    z-index: 3000;
    width: min(90vw, 500px);
    max-width: calc(100vw - 24px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: center;
}
.cookie-banner p { margin: 0; font-size: 0.85rem; color: var(--secondary-text); line-height: 1.5; }
.cookie-banner a { color: var(--primary-color); font-weight: 600; text-decoration: underline; }
.cookie-banner button { margin-top: 0; width: auto; align-self: center; padding: 10px 32px; }

@media (max-width: 480px) {
    header { padding: 20px; justify-content: center; }
    header div { gap: 16px; justify-content: center; flex-wrap: wrap; }
    .container { padding: 12px; }
    .card { padding: 24px 16px; border-radius: 20px; }

    /* Mobile sheet modal: easy to revert by removing this entire block */
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
        background: rgba(15, 23, 42, 0.58);
    }
    .modal {
        width: 100%;
        max-width: 100%;
        padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
        border-radius: 24px 24px 0 0;
        margin: 0;
        max-height: min(84vh, 760px);
        border-bottom: none;
        border-left: none;
        border-right: none;
        box-shadow: 0 -18px 38px -12px rgba(15, 23, 42, 0.22);
        animation: sheet-up 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
        overscroll-behavior: contain;
    }

    /* Slide up animation for sheet-style modal */
    @keyframes sheet-up {
        from {
            transform: translateY(26px);
            opacity: 0.8;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .card h2 { font-size: 1.25rem; margin-top: 10px; }
    .code-display { font-size: 1.15rem; padding: 12px; margin: 16px 0; }
    .tab-buttons { gap: 16px; padding-bottom: 8px; margin-bottom: 20px; }

    /* Input & button compactness in modal */
    input, button { padding: 14px; font-size: 16px; }
    .modal input { padding: 12px 14px; margin: 6px 0; font-size: 0.95rem; }
    .modal button { padding: 12px; font-size: 0.95rem; margin-top: 12px; }
    .modal h3 { font-size: 1.15rem; margin-top: 0; margin-bottom: 12px; text-align: left; }
    .temporary-account-warning { font-size: 0.725rem; padding: 10px 12px; margin-bottom: 14px; line-height: 1.4; }

    footer { padding: 20px; flex-direction: column; gap: 8px; text-align: center; }

    /* Mobile UX Fixes */
    .close-modal { top: 8px; right: 12px; font-size: 28px; padding: 8px; line-height: 1; }
    .qr-code { margin-top: 16px; padding: 12px; }
    .qr-code img { width: 140px; height: 140px; }
    hr { margin: 20px 0; }
    .modal hr { margin: 16px 0; }

    /* Compact Cookie Banner on Mobile */
    .alternative-action-box {
        margin-top: 24px;
        padding: 16px;
        background-color: #f1f5f9;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        text-align: center;
    }
    .alternative-action-box p {
        margin: 0 0 8px 0;
        font-size: 0.875rem;
        font-weight: 500;
        color: var(--secondary-text);
    }
    .alternative-action-box a {
        color: var(--primary-color);
        font-weight: 600;
        text-decoration: underline;
        cursor: pointer;
    }

    .cookie-banner {
        bottom: 12px;
        width: 92%;
        padding: 16px;
        border-radius: 16px;
        gap: 12px;
    }
    .cookie-banner p { font-size: 0.775rem; line-height: 1.4; }
    .cookie-banner button { padding: 8px 24px; font-size: 0.875rem; }
}

/* LANDING PAGE */
:root {
    --brand-blue: #1235C8;
    --brand-blue-2: #4F6BFF;
    --brand-cyan: #23C7D8;
    --soft-blue: #EEF4FF;
    --glass-border: rgba(55, 91, 210, 0.14);
    --shadow-soft: 0 24px 70px rgba(20, 48, 120, 0.12);
}

body {
    background:
        radial-gradient(circle at 8% 8%, rgba(77, 111, 255, 0.18), transparent 26rem),
        radial-gradient(circle at 88% 22%, rgba(35, 199, 216, 0.16), transparent 24rem),
        linear-gradient(180deg, #F8FBFF 0%, #FFFFFF 42%, #F3F7FF 100%);
    background-attachment: scroll;
}

header {
    position: sticky;
    top: 0;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(18px, 5vw, 64px);
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(219, 229, 255, 0.8);
    box-shadow: 0 10px 30px rgba(18, 53, 200, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    text-decoration: none;
}

.brand img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.brand strong {
    display: block;
    font-size: 2rem;
    line-height: 0.9;
    letter-spacing: 0;
}

.brand small {
    display: block;
    color: #1B2B63;
    font-size: 0.92rem;
    letter-spacing: 0;
}

.main-nav,
.main-nav > div,
header div {
    align-items: center;
}

header a {
    color: #081437;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 10px;
}

header a:hover {
    color: var(--brand-blue);
    background: rgba(18, 53, 200, 0.06);
}

#navLogin,
#navLogout {
    border: 1px solid rgba(18, 53, 200, 0.55);
    color: var(--brand-blue);
}

.language-switcher {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border: 1px solid rgba(18, 53, 200, 0.22);
    border-radius: 8px;
    background: rgba(238, 244, 255, 0.8);
}

header .language-switcher a {
    min-width: 34px;
    padding: 6px 8px;
    text-align: center;
    border-radius: 5px;
    font-size: 0.75rem;
}

header .language-switcher a.active {
    color: #FFFFFF;
    background: var(--brand-blue);
}

#scannerSection,
#publicTicketCard {
    margin: 48px auto;
}

.guest-export-panel {
    margin: 0 0 18px;
    padding: 16px;
    text-align: left;
    background: rgba(238, 244, 255, 0.78);
    border: 1px solid rgba(18, 53, 200, 0.16);
    border-radius: 12px;
}

.guest-export-panel h3 {
    margin: 0 0 6px;
    color: #081437;
    font-size: 1rem;
}

.guest-export-panel p {
    margin: 0;
    color: #50617F;
    font-size: 0.84rem;
    line-height: 1.45;
}

.guest-export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.guest-export-actions button {
    margin-top: 0;
    padding: 11px 12px;
    font-size: 0.9rem;
}

.guest-export-status {
    margin-top: 12px;
    padding: 10px 12px;
    min-height: auto;
    font-size: 0.8rem;
}

/* LOADING OVERLAY (dati operatore in caricamento) */
#scannerSection {
    position: relative;
}

#scannerSection .loading-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 24px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: 24px;
}

#scannerSection.loading .loading-overlay {
    display: flex;
}

#scannerSection.loading > *:not(.loading-overlay) {
    opacity: 0.35;
    pointer-events: none;
}

.spinner {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(15, 23, 42, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

.container {
    display: block;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px 24px;
}

.landing-page.card {
    max-width: none;
    padding: 0;
    text-align: left;
}

.hero-section {
    min-height: calc(100vh - 96px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
    padding: clamp(52px, 8vw, 96px) 0 36px;
    position: relative;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 12% auto 12% -8%;
    width: 56%;
    border-radius: 42px;
    background-image: radial-gradient(rgba(18, 53, 200, 0.16) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.75;
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-copy h1 {
    margin: 0 0 10px;
    color: #071332;
    font-size: clamp(3.2rem, 8vw, 5.8rem);
    line-height: 0.9;
    font-weight: 800;
}

.hero-copy h1 span {
    color: var(--brand-blue);
}

.hero-copy h2,
.features-section h2,
.timeline-section h2,
.demo-section h2,
.final-cta h2,
.verify-strip h2 {
    margin: 0;
    color: #081437;
    font-size: clamp(1.8rem, 4vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 580px;
    margin: 18px 0 0;
    color: #31405F;
    font-size: 1.08rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
    color: #FFFFFF;
    background: linear-gradient(135deg, #0B2AAE, #1849EA);
    box-shadow: 0 16px 28px rgba(18, 53, 200, 0.25);
}

.btn-secondary {
    color: #0B2AAE;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(18, 53, 200, 0.38);
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
}

.benefits-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 640px;
    margin-top: 38px;
}

.benefits-bar div {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 10px;
    align-items: center;
}

.benefits-bar strong,
.benefits-bar small {
    grid-column: 2;
}

.benefits-bar small {
    color: #50617F;
    font-size: 0.78rem;
}

.mini-icon,
.feature-icon,
.step-icon {
    display: inline-grid;
    place-items: center;
    color: var(--brand-blue);
    background: linear-gradient(135deg, #EAF0FF, #F8FBFF);
}

.mini-icon {
    grid-row: span 2;
    width: 26px;
    height: 26px;
    border-radius: 8px;
}

.mini-icon::before,
.feature-icon::before,
.step-icon::before {
    font-weight: 900;
    line-height: 1;
}

.lightning::before { content: "Z"; }
.shield::before,
.secure::before { content: "U"; }
.bin::before { content: "X"; }
.people::before { content: "OO"; font-size: 0.9rem; }
.mobile::before { content: "[]"; }
.calendar::before { content: "[]"; }
.invite::before { content: "@"; }
.qr::before { content: "QR"; font-size: 0.78rem; }
.check::before { content: "V"; }

.hero-mockup {
    position: relative;
    min-height: 560px;
}

.hero-mockup::before {
    content: "";
    position: absolute;
    inset: 14% -4% 4% 6%;
    border-radius: 36px;
    background: linear-gradient(135deg, rgba(72, 97, 255, 0.18), rgba(35, 199, 216, 0.12));
    transform: rotate(-6deg);
}

.phone {
    position: absolute;
    width: 235px;
    height: 475px;
    padding: 14px;
    border-radius: 34px;
    background: #050812;
    box-shadow: 0 24px 46px rgba(1, 12, 35, 0.28);
}

.phone-speaker {
    position: absolute;
    top: 11px;
    left: 50%;
    width: 76px;
    height: 20px;
    transform: translateX(-50%);
    border-radius: 0 0 16px 16px;
    background: #050812;
    z-index: 2;
}

.phone-screen {
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-sizing: border-box;
}

.phone-ticket {
    left: 10%;
    top: 62px;
    z-index: 2;
    transform: rotate(7deg);
}

.ticket-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    padding: 36px 18px 18px;
    background: #FFFFFF;
    color: #071332;
    text-align: center;
}

.ticket-screen b {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ticket-screen p {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.5;
}

.phone-scanner {
    right: 4%;
    top: 24px;
    transform: rotate(4deg);
}

.scanner-screen {
    padding: 36px 18px 18px;
    background: linear-gradient(180deg, #0B1020, #08122E);
    color: #FFFFFF;
    text-align: center;
}

.scanner-screen p {
    color: #B9C5E8;
    font-size: 0.8rem;
}

.scanner-screen em {
    color: #26E88B;
    font-size: 0.74rem;
    font-style: normal;
}

.scan-frame {
    position: relative;
    height: 230px;
    margin: 30px 0 24px;
    border: 2px solid rgba(38, 232, 139, 0.8);
    border-radius: 20px;
    background:
        linear-gradient(rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
        radial-gradient(circle at 50% 40%, rgba(255,255,255,0.22), transparent 36%),
        #101827;
}

.scan-frame span {
    position: absolute;
    inset: 52px 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, #EFF6FF 0 42%, #98A7C5 42% 100%);
}

.mock-qr {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    width: 148px;
    aspect-ratio: 1;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid #DDE5F5;
}

.mock-qr span {
    background: #080D18;
}

.mock-qr span:nth-child(2n),
.mock-qr span:nth-child(5n),
.mock-qr span:nth-child(11),
.mock-qr span:nth-child(17),
.mock-qr span:nth-child(29) {
    background: transparent;
}

.mock-qr.small {
    width: 88px;
    gap: 3px;
    padding: 6px;
}

.features-section,
.timeline-section,
.demo-section {
    padding: 34px 0;
    text-align: center;
}

.features-section h2,
.timeline-section h2,
.demo-section h2 {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    margin-bottom: 28px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.feature-card,
.demo-card,
.verify-strip,
.final-cta {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.feature-card {
    padding: 34px 28px;
    text-align: center;
}

.feature-icon,
.step-icon {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    margin-bottom: 18px;
    font-size: 1.2rem;
}

.feature-card h3,
.timeline h3,
.demo-card h3 {
    margin: 0 0 10px;
    color: #081437;
    font-size: 1.12rem;
}

.feature-card p,
.timeline p,
.demo-card p,
.final-cta p {
    margin: 0;
    color: #31405F;
    line-height: 1.65;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.timeline article {
    position: relative;
    text-align: center;
}

.timeline article:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 38px;
    left: calc(50% + 52px);
    width: calc(100% - 76px);
    border-top: 3px dotted rgba(18, 53, 200, 0.32);
}

.timeline b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    margin: -20px auto 16px;
    color: #FFFFFF;
    background: var(--brand-blue);
    border-radius: 50%;
    font-size: 0.75rem;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.demo-card {
    display: grid;
    grid-template-columns: 45% 1fr;
    align-items: center;
    min-height: 240px;
    overflow: hidden;
    text-align: left;
}

.demo-card > div:last-child {
    padding: 28px;
}

.demo-visual {
    align-self: stretch;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #AEBEFF, #F6F9FF);
    overflow: hidden;
}

.mini-phone {
    display: grid;
    place-items: center;
    width: 118px;
    height: 214px;
    border: 10px solid #07101F;
    border-radius: 26px;
    transform: rotate(-9deg) translateY(16px);
}

.mini-phone.dark {
    background: #0A1020;
}

.mini-phone.light {
    background: #FFFFFF;
}

.mini-phone.dark span {
    width: 72px;
    height: 92px;
    border: 2px solid #27E58B;
    border-radius: 14px;
}

.demo-card ul {
    list-style: none;
    margin: 18px 0 0;
    padding: 0;
    color: #16233F;
}

.demo-card li {
    margin-top: 9px;
}

.demo-card li::before {
    content: "V";
    color: #0AA86F;
    font-weight: 900;
    margin-right: 9px;
}

.verify-strip {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 20px;
    align-items: center;
    margin: 26px 0 32px;
    padding: 24px;
}

.verify-strip h2 {
    font-size: 1.45rem;
}

.verify-strip .subtitle {
    margin: 8px 0 0;
}

.verify-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

.verify-controls input,
.verify-controls button {
    margin: 0;
}

.verify-controls button {
    width: auto;
    min-width: 130px;
    background: linear-gradient(135deg, #0B2AAE, #1849EA);
}

.verify-strip .result {
    grid-column: 1 / -1;
    margin-top: 0;
}

.final-cta {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    margin: 32px 0 24px;
    padding: 28px 36px;
    background: linear-gradient(135deg, rgba(220, 228, 255, 0.96), rgba(243, 247, 255, 0.9));
}

.final-cta .feature-icon {
    margin: 0;
}

.final-cta h2 {
    font-size: clamp(1.45rem, 3vw, 2rem);
    margin-bottom: 6px;
}

footer {
    display: block;
    padding: 44px clamp(24px, 6vw, 96px) 28px;
    color: #FFFFFF;
    background:
        radial-gradient(circle at 12% 10%, rgba(62, 101, 255, 0.24), transparent 24rem),
        linear-gradient(135deg, #07142F, #0A1938 52%, #071022);
    text-transform: none;
    letter-spacing: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.45fr repeat(4, minmax(120px, 1fr));
    gap: 34px;
    max-width: 1180px;
    margin: 0 auto;
}

footer .brand {
    color: #FFFFFF;
}

footer .brand img {
    width: 50px;
    height: 50px;
}

footer .brand small,
.footer-brand p,
footer a,
.footer-copy {
    color: rgba(255, 255, 255, 0.72);
}

.footer-brand p {
    max-width: 220px;
    margin: 14px 0 0;
    line-height: 1.6;
}

footer h3 {
    margin: 8px 0 16px;
    color: #FFFFFF;
    font-size: 1rem;
}

footer a {
    display: block;
    margin-top: 11px;
    text-decoration: none;
    font-size: 0.92rem;
}

footer a:hover {
    color: #FFFFFF;
}

.social-links {
    display: flex;
    gap: 14px;
}

.social-links a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-top: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    font-weight: 800;
}

.footer-copy {
    max-width: 1180px;
    margin: 36px auto 0;
    text-align: center;
    font-size: 0.88rem;
}

@media (max-width: 980px) {
    header {
        align-items: flex-start;
        gap: 18px;
    }

    .main-nav > div {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px 14px;
    }

    .hero-section {
        grid-template-columns: 1fr;
        min-height: auto;
        padding-top: 46px;
    }

    .hero-mockup {
        min-height: 500px;
    }

    .phone-ticket {
        left: calc(50% - 230px);
    }

    .phone-scanner {
        right: calc(50% - 230px);
    }

    .feature-grid,
    .timeline,
    .demo-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .timeline article:not(:last-child)::after {
        display: none;
    }

    .verify-strip,
    .final-cta {
        grid-template-columns: 1fr;
    }

    .final-cta .btn-primary {
        width: fit-content;
    }
}

@media (max-width: 640px) {
    header {
        position: relative;
        padding: 16px;
    }

    .brand img {
        width: 44px;
        height: 44px;
    }

    .brand strong {
        font-size: 1.55rem;
    }

    header,
    .main-nav > div {
        justify-content: center;
    }

    .main-nav {
        width: 100%;
    }

    header a {
        padding: 9px 10px;
        font-size: 0.86rem;
    }

    .container {
        padding: 0 16px 16px;
    }

    .hero-section {
        padding-top: 34px;
    }

    .hero-actions,
    .benefits-bar {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        display: grid;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        box-sizing: border-box;
    }

    .hero-mockup {
        min-height: 420px;
        transform: scale(0.82);
        transform-origin: top center;
        margin-bottom: -70px;
    }

    .phone-ticket {
        left: calc(50% - 185px);
    }

    .phone-scanner {
        right: calc(50% - 190px);
    }

    .feature-grid,
    .timeline,
    .demo-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .demo-card {
        grid-template-columns: 1fr;
    }

    .demo-visual {
        min-height: 210px;
    }

    .verify-controls {
        grid-template-columns: 1fr;
    }

    .verify-controls button,
    .final-cta .btn-primary {
        width: 100%;
    }

    .final-cta {
        padding: 24px;
    }

    footer {
        padding: 36px 24px 24px;
    }

    .footer-copy {
        text-align: left;
    }
}
