/* MedPass homepage — scroll reveal + demo quiz */

.hp-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.hp-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.hp-reveal-delay-1 { transition-delay: 0.1s; }
.hp-reveal-delay-2 { transition-delay: 0.2s; }
.hp-reveal-delay-3 { transition-delay: 0.3s; }

.hp-hero-glow {
    background-color: #f8fafc;
    background-image:
        radial-gradient(ellipse 80% 55% at 50% -15%, rgba(20, 184, 166, 0.22), transparent 55%),
        radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: auto, 24px 24px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hp-preview-shell {
    background: linear-gradient(165deg, #070b14 0%, #0a1a22 38%, #0c2e2b 72%, #0a3d38 100%);
}
.hp-preview-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 65% 40% at 50% -5%, rgba(45, 212, 191, 0.12), transparent 58%),
        radial-gradient(ellipse 45% 35% at 85% 85%, rgba(20, 184, 166, 0.08), transparent 55%),
        linear-gradient(180deg, rgba(7, 11, 20, 0.35) 0%, transparent 28%, transparent 70%, rgba(7, 11, 20, 0.25) 100%);
}
.hp-preview-tabs {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.hp-preview-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.06));
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 40px 80px -30px rgba(0, 0, 0, 0.55);
}

.hp-tab[aria-selected="true"] {
    background: #fff;
    color: #0f766e;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14);
}
.hp-tab[aria-selected="false"] {
    background: transparent;
    color: #e2e8f0;
}
.hp-tab[aria-selected="false"]:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.hp-tab svg {
    opacity: 0.9;
}

.hp-opt {
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.hp-opt:hover:not(:disabled) {
    border-color: #14b8a6;
    background: #f0fdfa;
}
.hp-opt.is-correct {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
}
.hp-opt.is-wrong {
    border-color: #f43f5e !important;
    background: #fff1f2 !important;
}
.hp-opt:disabled {
    cursor: default;
}

.hp-panel-enter {
    animation: hpFadeUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes hpFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.demo-chart-mount {
    margin: 1rem 0;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 1rem;
    overflow: hidden;
}
.demo-chart-mount canvas {
    width: 100%;
    height: auto;
    display: block;
    max-height: 220px;
}

.hp-nefrone-svg {
    width: 100%;
    max-width: 360px;
    height: auto;
    margin: 0 auto;
    display: block;
}

.hp-tool-card {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
}
.hp-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.25);
}

#hp-draw-canvas {
    touch-action: none;
    cursor: crosshair;
    background-image:
        linear-gradient(#e2e8f4 1px, transparent 1px),
        linear-gradient(90deg, #e2e8f4 1px, transparent 1px);
    background-size: 24px 24px;
    background-color: #fff;
}

/* Scroll parallax / zoom mockup — lo zoom può uscire dal frame */
.hp-parallax-shell {
    position: relative;
    overflow: visible;
    z-index: 1;
}
.hp-parallax-shell.is-active {
    z-index: 20;
}
.hp-parallax-frame {
    position: relative;
    overflow: visible;
    z-index: 1;
}
.hp-parallax-img {
    display: block;
    width: 100%;
    height: auto;
    transform: translate3d(0, 0, 0) scale(1);
    transform-origin: center center;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    position: relative;
    z-index: 2;
    border-radius: inherit;
    box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.25);
    transition: box-shadow 0.2s ease-out;
}
.hp-parallax-img.is-zooming {
    box-shadow: 0 28px 60px -18px rgba(15, 23, 42, 0.45);
}

@media (prefers-reduced-motion: reduce) {
    .hp-reveal,
    .hp-panel-enter,
    .hp-tool-card {
        transition: none !important;
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .hp-parallax-img {
        transform: none !important;
        will-change: auto;
    }
}
