@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #070b14;
    --bg-secondary: #0b1120;
    --card: rgba(15, 23, 42, 0.72);
    --card-border: rgba(148, 163, 184, 0.13);

    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-light: #cbd5e1;

    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --cyan: #22d3ee;

    --success: #34d399;
    --danger: #fb7185;

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(139, 92, 246, 0.10),
            transparent 28%
        ),
        radial-gradient(
            circle at 90% 15%,
            rgba(34, 211, 238, 0.08),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #050810 0%,
            #080d18 50%,
            #060a12 100%
        );

    color: var(--text);

    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    overflow-x: hidden;
}


/* =========================
   Background
========================= */

.background-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;

    filter: blur(120px);

    pointer-events: none;
    opacity: 0.12;

    z-index: -1;
}

.glow-one {
    top: 10%;
    left: -180px;
    background: #8b5cf6;
}

.glow-two {
    right: -180px;
    top: 45%;
    background: #06b6d4;
}


/* =========================
   Topbar
========================= */

.topbar {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;

    height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            rgba(139, 92, 246, 0.25),
            rgba(34, 211, 238, 0.12)
        );

    border: 1px solid rgba(167, 139, 250, 0.25);

    color: #c4b5fd;

    box-shadow:
        0 0 30px rgba(139, 92, 246, 0.12);
}

.brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.brand-name span {
    color: var(--primary-light);
}

.brand-subtitle {
    margin-top: 2px;

    color: #64748b;

    font-size: 9px;
    font-weight: 700;

    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 13px;

    border-radius: 999px;

    background: rgba(52, 211, 153, 0.06);
    border: 1px solid rgba(52, 211, 153, 0.13);

    color: #86efac;

    font-size: 11px;
    font-weight: 600;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 10px rgba(52, 211, 153, 0.8);
}


/* =========================
   Main
========================= */

.page {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
}


/* =========================
   Hero
========================= */

.hero {
    min-height: 520px;

    display: grid;
    grid-template-columns: 1.2fr 0.8fr;

    align-items: center;

    gap: 40px;

    padding: 70px 0 60px;
}

.eyebrow,
.section-kicker {
    color: #a78bfa;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;

    border-radius: 999px;

    background: rgba(139, 92, 246, 0.07);
    border: 1px solid rgba(139, 92, 246, 0.15);
}

.eyebrow-icon {
    color: var(--cyan);
}

.hero h1 {
    max-width: 760px;

    margin-top: 22px;

    font-size: clamp(48px, 6vw, 82px);
    line-height: 0.98;

    letter-spacing: -4px;
    font-weight: 800;
}

.hero h1 span {
    display: block;

    background:
        linear-gradient(
            100deg,
            #a78bfa,
            #22d3ee
        );

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.hero-content > p {
    max-width: 600px;

    margin-top: 26px;

    color: var(--muted);

    font-size: 16px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 24px;

    margin-top: 34px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meta-icon {
    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: rgba(139, 92, 246, 0.10);
    border: 1px solid rgba(139, 92, 246, 0.16);

    color: #c4b5fd;

    font-size: 10px;
    font-weight: 800;
}

.meta-item strong {
    display: block;

    font-size: 12px;
    font-weight: 700;
}

.meta-item small {
    display: block;

    margin-top: 2px;

    color: #64748b;

    font-size: 10px;
}

.meta-divider {
    width: 1px;
    height: 30px;

    background: rgba(148, 163, 184, 0.12);
}


/* =========================
   Hero Visual
========================= */

.hero-visual {
    display: grid;
    place-items: center;
}

.orbital-card {
    position: relative;

    width: 390px;
    height: 390px;

    display: grid;
    place-items: center;
}

.orbital-ring {
    position: absolute;

    border-radius: 50%;

    border: 1px solid rgba(139, 92, 246, 0.16);
}

.ring-one {
    width: 310px;
    height: 310px;

    animation: rotate 22s linear infinite;
}

.ring-two {
    width: 220px;
    height: 220px;

    border-color: rgba(34, 211, 238, 0.14);

    animation: rotate-reverse 16s linear infinite;
}

.brain-orb {
    width: 150px;
    height: 150px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(167, 139, 250, 0.45),
            rgba(76, 29, 149, 0.22) 45%,
            rgba(8, 15, 31, 0.95) 75%
        );

    border: 1px solid rgba(167, 139, 250, 0.35);

    box-shadow:
        0 0 80px rgba(139, 92, 246, 0.22),
        inset 0 0 50px rgba(34, 211, 238, 0.05);
}

.orb-core {
    width: 72px;
    height: 72px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            rgba(139, 92, 246, 0.4),
            rgba(34, 211, 238, 0.15)
        );

    border: 1px solid rgba(196, 181, 253, 0.3);

    color: white;

    font-size: 20px;
    font-weight: 800;

    box-shadow:
        0 0 35px rgba(139, 92, 246, 0.3);
}

.floating-card {
    position: absolute;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 12px 15px;

    border-radius: 14px;

    background: rgba(12, 18, 32, 0.78);

    border: 1px solid rgba(148, 163, 184, 0.12);

    backdrop-filter: blur(18px);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.25);
}

.floating-top {
    top: 55px;
    right: 0;
}

.floating-bottom {
    bottom: 65px;
    left: 5px;
}

.floating-card strong {
    display: block;

    font-size: 11px;
}

.floating-card small {
    display: block;

    margin-top: 3px;

    color: #64748b;

    font-size: 9px;
}

.mini-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 12px rgba(52, 211, 153, 0.7);
}

.pulse-line {
    width: 28px;
    height: 16px;

    border-bottom: 1px solid #22d3ee;

    transform: skewX(-30deg);
}


/* =========================
   Application
========================= */

.application {
    padding: 30px 0 70px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 24px;
}

.section-heading h2 {
    margin-top: 7px;

    font-size: 28px;
    letter-spacing: -1px;
}

.section-heading p {
    margin-top: 7px;

    color: #64748b;

    font-size: 13px;
}

.required-badge {
    padding: 8px 11px;

    border-radius: 8px;

    color: #64748b;

    font-size: 10px;
}

.required-badge span {
    color: var(--danger);
}


/* =========================
   Dashboard
========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);

    gap: 20px;
}

.form-card,
.result-card {
    border: 1px solid var(--card-border);

    background:
        linear-gradient(
            145deg,
            rgba(17, 25, 43, 0.78),
            rgba(9, 14, 26, 0.78)
        );

    backdrop-filter: blur(20px);

    border-radius: var(--radius-lg);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.22);
}

.form-card {
    padding: 30px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 13px;

    padding-bottom: 24px;

    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.header-icon,
.subsection-number {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    background: rgba(139, 92, 246, 0.10);

    color: #a78bfa;

    font-size: 10px;
    font-weight: 800;
}

.card-header h3,
.subsection-title h3 {
    font-size: 14px;
}

.card-header p,
.subsection-title p {
    margin-top: 4px;

    color: #64748b;

    font-size: 10px;
}


/* =========================
   Form
========================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 18px;

    padding: 26px 0;
}

.input-group label {
    display: block;

    margin-bottom: 8px;

    color: #cbd5e1;

    font-size: 11px;
    font-weight: 600;
}

.input-group label span {
    color: var(--danger);
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 48px;

    padding: 0 70px 0 14px;

    border-radius: 12px;

    border: 1px solid rgba(148, 163, 184, 0.12);

    outline: none;

    background: rgba(2, 6, 23, 0.45);

    color: #f8fafc;

    font-family: inherit;
    font-size: 13px;

    transition: 0.2s ease;
}

.input-wrapper input::placeholder {
    color: #475569;
}

.input-wrapper input:focus {
    border-color: rgba(139, 92, 246, 0.55);

    box-shadow:
        0 0 0 3px rgba(139, 92, 246, 0.08);
}

.input-unit {
    position: absolute;

    top: 50%;
    right: 13px;

    transform: translateY(-50%);

    color: #475569;

    font-size: 9px;
    font-weight: 700;
}


/* =========================
   Subsection
========================= */

.subsection {
    padding-top: 4px;
}

.subsection-title {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 16px;
}

.subsection-number {
    width: 30px;
    height: 30px;

    border-radius: 8px;
}


/* =========================
   Choice Cards
========================= */

.toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 10px;
}

.choice-card {
    cursor: pointer;
}

.choice-card input {
    position: absolute;
    opacity: 0;
}

.choice-content {
    position: relative;

    min-height: 92px;

    display: flex;
    align-items: flex-start;

    gap: 10px;

    padding: 14px;

    border-radius: 13px;

    border: 1px solid rgba(148, 163, 184, 0.10);

    background: rgba(2, 6, 23, 0.30);

    transition: 0.2s ease;
}

.choice-card:hover .choice-content {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.04);
}

.choice-card input:checked + .choice-content {
    border-color: rgba(139, 92, 246, 0.5);

    background:
        linear-gradient(
            135deg,
            rgba(139, 92, 246, 0.10),
            rgba(34, 211, 238, 0.03)
        );

    box-shadow:
        inset 0 0 30px rgba(139, 92, 246, 0.03);
}

.choice-icon {
    flex-shrink: 0;

    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    border-radius: 8px;

    background: rgba(148, 163, 184, 0.07);

    color: #94a3b8;

    font-size: 8px;
    font-weight: 800;
}

.choice-card input:checked + .choice-content .choice-icon {
    color: #c4b5fd;
    background: rgba(139, 92, 246, 0.14);
}

.choice-content strong {
    display: block;

    padding-right: 12px;

    font-size: 10px;
    line-height: 1.4;
}

.choice-content small {
    display: block;

    margin-top: 5px;

    color: #64748b;

    font-size: 8px;
    line-height: 1.4;
}

.checkbox-indicator {
    position: absolute;

    top: 12px;
    right: 12px;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    border: 1px solid #334155;
}

.choice-card input:checked + .choice-content .checkbox-indicator {
    background: var(--primary);

    border-color: var(--primary);

    box-shadow:
        0 0 10px rgba(139, 92, 246, 0.4);
}


/* =========================
   Predict Button
========================= */

.predict-button {
    width: 100%;
    height: 56px;

    display: flex;
    align-items: center;

    margin-top: 26px;

    padding: 0 17px;

    border: 0;
    border-radius: 14px;

    cursor: pointer;

    background:
        linear-gradient(
            100deg,
            #7c3aed,
            #8b5cf6 55%,
            #06b6d4
        );

    color: white;

    font-family: inherit;

    box-shadow:
        0 12px 30px rgba(124, 58, 237, 0.20);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.predict-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 18px 40px rgba(124, 58, 237, 0.28);
}

.button-icon {
    font-size: 18px;
}

.button-text {
    flex: 1;

    font-size: 12px;
    font-weight: 700;
}

.button-arrow {
    font-size: 20px;
}

.privacy-note {
    margin-top: 12px;

    text-align: center;

    color: #475569;

    font-size: 9px;
}


/* =========================
   Result
========================= */

.result-card {
    min-height: 100%;

    padding: 26px;

    display: flex;
    flex-direction: column;
}

.result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.result-header h3 {
    margin-top: 7px;

    font-size: 19px;
    letter-spacing: -0.5px;
}

.result-status {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 6px 9px;

    border-radius: 999px;

    background: rgba(148, 163, 184, 0.05);

    color: #64748b;

    font-size: 8px;
}

.result-status span {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #64748b;
}

.empty-result {
    flex: 1;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 40px 20px;
}

.empty-orb {
    width: 100px;
    height: 100px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(139, 92, 246, 0.16),
            rgba(139, 92, 246, 0.03) 65%,
            transparent
        );

    border: 1px solid rgba(139, 92, 246, 0.12);
}

.empty-orb div {
    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: rgba(139, 92, 246, 0.10);

    color: #a78bfa;

    font-size: 18px;
}

.empty-result h4 {
    margin-top: 20px;

    font-size: 13px;
}

.empty-result p {
    max-width: 250px;

    margin-top: 9px;

    color: #64748b;

    font-size: 10px;
    line-height: 1.7;
}

.empty-line {
    width: 50px;
    height: 1px;

    margin: 22px 0 12px;

    background: rgba(148, 163, 184, 0.15);
}

.empty-result small {
    color: #475569;

    font-size: 8px;
}


/* =========================
   Result Content
========================= */

.result-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    align-items: center;

    padding-top: 40px;

    text-align: center;
}

.risk-circle {
    position: relative;

    width: 180px;
    height: 180px;
}

.risk-circle svg {
    width: 100%;
    height: 100%;

    transform: rotate(-90deg);
}

.circle-bg,
.circle-progress {
    fill: none;

    stroke-width: 7;
}

.circle-bg {
    stroke: rgba(148, 163, 184, 0.08);
}

.circle-progress {
    stroke: #8b5cf6;

    stroke-linecap: round;

    stroke-dasharray: 314;
    stroke-dashoffset: 314;

    transition: stroke-dashoffset 1s ease;
}

.risk-value {
    position: absolute;

    inset: 0;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;
}

.risk-value strong {
    font-size: 30px;
    letter-spacing: -1px;
}

.risk-value small {
    margin-top: 3px;

    color: #64748b;

    font-size: 9px;
}

.prediction-badge {
    margin-top: 20px;

    padding: 8px 14px;

    border-radius: 999px;

    background: rgba(139, 92, 246, 0.10);

    color: #c4b5fd;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 0.5px;
}

.result-content > p {
    max-width: 270px;

    margin-top: 12px;

    color: #64748b;

    font-size: 10px;
    line-height: 1.6;
}

.result-stats {
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: auto;
    padding-top: 25px;
}

.stat {
    padding: 13px;

    border-radius: 12px;

    background: rgba(2, 6, 23, 0.30);

    border: 1px solid rgba(148, 163, 184, 0.08);
}

.stat span {
    display: block;

    color: #475569;

    font-size: 8px;
}

.stat strong {
    display: block;

    margin-top: 5px;

    font-size: 13px;
}


/* =========================
   Model Card
========================= */

.model-section {
    padding-bottom: 50px;
}

.model-card {
    display: flex;
    align-items: center;
    gap: 20px;

    padding: 24px 26px;

    border-radius: 18px;

    background:
        linear-gradient(
            100deg,
            rgba(139, 92, 246, 0.07),
            rgba(34, 211, 238, 0.025)
        );

    border: 1px solid rgba(139, 92, 246, 0.10);
}

.model-icon {
    flex-shrink: 0;

    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    background: rgba(139, 92, 246, 0.10);

    color: #a78bfa;
}

.model-info {
    flex: 1;
}

.model-info h3 {
    margin-top: 5px;

    font-size: 14px;
}

.model-info p {
    max-width: 580px;

    margin-top: 6px;

    color: #64748b;

    font-size: 9px;
    line-height: 1.6;
}

.model-details {
    display: flex;
    gap: 28px;
}

.model-details span,
.model-details strong {
    display: block;
}

.model-details span {
    color: #475569;

    font-size: 8px;
}

.model-details strong {
    margin-top: 5px;

    font-size: 11px;
}


/* =========================
   Footer
========================= */

footer {
    display: flex;
    justify-content: center;
    gap: 8px;

    padding: 30px 0 45px;

    color: #334155;

    font-size: 9px;
}

footer span:first-child {
    color: #64748b;
}


/* =========================
   Utilities
========================= */

.hidden {
    display: none !important;
}


/* =========================
   Animations
========================= */

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}


/* =========================
   Responsive
========================= */

@media (max-width: 1000px) {

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

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-visual {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .result-card {
        min-height: 500px;
    }

    .model-card {
        flex-wrap: wrap;
    }
}


@media (max-width: 700px) {

    .topbar,
    .page {
        width: min(100% - 28px, 1400px);
    }

    .topbar {
        height: 70px;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .hero h1 {
        font-size: 46px;
        letter-spacing: -2.5px;
    }

    .hero-meta {
        flex-direction: column;
        gap: 14px;
    }

    .meta-divider {
        display: none;
    }

    .form-card,
    .result-card {
        padding: 20px;
    }

    .form-grid,
    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .model-details {
        width: 100%;

        justify-content: space-between;

        gap: 10px;
    }

    .model-card {
        align-items: flex-start;
    }
}

/* ============================================================
   3D EXPERIENCE LAYER
   Pure CSS + small native JS interaction. No animation library.
   ============================================================ */

:root {
    --pointer-x: 0;
    --pointer-y: 0;
    --depth: 1;
    --violet: #8b5cf6;
    --violet-hot: #c4b5fd;
    --cyan-hot: #22d3ee;
    --surface-3d: rgba(8, 13, 27, 0.76);
}

/* Ambient depth follows the pointer without moving the layout. */
.background-glow {
    transform:
        translate3d(calc(var(--pointer-x) * 24px), calc(var(--pointer-y) * 18px), 0);
    transition: transform 1.2s cubic-bezier(.2,.8,.2,1);
}

.background-glow::after {
    content: "";
    position: absolute;
    inset: 25%;
    border-radius: 50%;
    background: inherit;
    filter: blur(55px);
    opacity: .55;
}

/* Glass surfaces get a physical, layered feel. */
.form-card,
.result-card,
.model-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transform: translateZ(0);
    transition:
        transform .45s cubic-bezier(.2,.8,.2,1),
        border-color .35s ease,
        box-shadow .45s ease;
}

.form-card::before,
.result-card::before,
.model-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(
            125deg,
            rgba(255,255,255,.055),
            transparent 22%,
            transparent 72%,
            rgba(34,211,238,.035)
        );
}

.form-card::after,
.result-card::after,
.model-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    left: var(--card-glow-x, 70%);
    top: var(--card-glow-y, -35%);
    border-radius: 50%;
    background: rgba(139,92,246,.11);
    filter: blur(50px);
    pointer-events: none;
    z-index: -1;
    transition: left .7s ease, top .7s ease;
}

[data-depth-card].is-visible {
    animation: card-arrive .8s both cubic-bezier(.16,1,.3,1);
}

[data-depth-card]:hover {
    transform: translateY(-6px) rotateX(1deg) rotateY(-1deg);
    border-color: rgba(167,139,250,.24);
    box-shadow:
        0 38px 100px rgba(0,0,0,.34),
        0 0 45px rgba(139,92,246,.07);
}

/* Hero 3D stage */
.hero-visual {
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

.hero-3d-scene {
    position: relative;
    width: min(500px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
}

.hero-3d-scene::before {
    content: "";
    position: absolute;
    width: 58%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,.2), transparent 68%);
    filter: blur(22px);
    transform: translateZ(-100px);
    animation: ambient-breathe 5s ease-in-out infinite;
}

.scene-grid {
    position: absolute;
    width: 92%;
    height: 38%;
    bottom: 3%;
    border: 1px solid rgba(139,92,246,.11);
    background:
        linear-gradient(rgba(139,92,246,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139,92,246,.08) 1px, transparent 1px);
    background-size: 28px 28px;
    transform:
        perspective(400px)
        rotateX(65deg)
        translateZ(-50px);
    mask-image: linear-gradient(to bottom, transparent, black 45%, transparent);
    opacity: .8;
}

.depth-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(34,211,238,.07);
    transform-style: preserve-3d;
}

.depth-ring-a {
    width: 84%;
    height: 31%;
    transform: rotateX(72deg) translateZ(-75px);
    animation: depth-orbit 18s linear infinite;
}

.depth-ring-b {
    width: 67%;
    height: 24%;
    transform: rotateX(70deg) rotateY(15deg) translateZ(-95px);
    border-color: rgba(139,92,246,.08);
    animation: depth-orbit-reverse 13s linear infinite;
}

.orbital-card {
    --tilt-x: 0deg;
    --tilt-y: 0deg;
    position: relative;
    width: 390px;
    height: 390px;
    display: grid;
    place-items: center;
    transform-style: preserve-3d;
    transform:
        rotateX(var(--tilt-x))
        rotateY(var(--tilt-y))
        translate3d(
            calc(var(--pointer-x) * 8px),
            calc(var(--pointer-y) * 7px),
            30px
        );
    transition: transform .8s cubic-bezier(.2,.8,.2,1);
    will-change: transform;
}

/* Original rings become genuine depth planes. */
.orbital-ring {
    transform-style: preserve-3d;
    box-shadow:
        0 0 30px rgba(139,92,246,.035),
        inset 0 0 30px rgba(34,211,238,.02);
}

.ring-one {
    width: 310px;
    height: 310px;
    transform: rotateX(70deg) rotateZ(12deg);
    animation: ring-spin-a 18s linear infinite;
}

.ring-two {
    width: 220px;
    height: 220px;
    transform: rotateX(72deg) rotateY(20deg);
    animation: ring-spin-b 11s linear infinite;
}

.ring-three {
    position: absolute;
    width: 350px;
    height: 350px;
    border: 1px dashed rgba(34,211,238,.12);
    transform: rotateY(70deg) rotateZ(20deg);
    animation: ring-spin-c 25s linear infinite;
}

/* Signal orbits */
.signal-orbit {
    position: absolute;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    border: 1px dashed rgba(34,211,238,.13);
    transform-style: preserve-3d;
}

.orbit-one {
    transform: rotateX(70deg) rotateZ(-25deg);
    animation: signal-a 7s linear infinite;
}

.orbit-two {
    width: 190px;
    height: 190px;
    border-color: rgba(139,92,246,.14);
    transform: rotateY(68deg) rotateZ(25deg);
    animation: signal-b 9s linear infinite;
}

.signal-orbit span {
    position: absolute;
    width: 7px;
    height: 7px;
    top: -3px;
    left: 50%;
    border-radius: 50%;
    background: var(--cyan-hot);
    box-shadow: 0 0 18px rgba(34,211,238,.9);
}

/* Core becomes a layered AI nucleus. */
.brain-orb {
    position: relative;
    transform: translateZ(55px);
    overflow: hidden;
    animation: nucleus-float 4.5s ease-in-out infinite;
}

.brain-orb::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow:
        inset 0 0 35px rgba(34,211,238,.09),
        0 0 45px rgba(139,92,246,.18);
}

.brain-orb::after {
    content: "";
    position: absolute;
    inset: -25%;
    background:
        conic-gradient(
            from 0deg,
            transparent,
            rgba(34,211,238,.12),
            transparent 30%,
            rgba(167,139,250,.12),
            transparent 60%
        );
    animation: nucleus-scan 8s linear infinite;
}

.orb-noise {
    position: absolute;
    inset: 0;
    opacity: .22;
    background-image:
        radial-gradient(circle at 20% 30%, white 0 1px, transparent 1.5px),
        radial-gradient(circle at 70% 60%, white 0 1px, transparent 1.5px),
        radial-gradient(circle at 40% 80%, white 0 1px, transparent 1.5px);
    background-size: 38px 38px, 51px 51px, 43px 43px;
    animation: particle-shift 8s linear infinite;
}

.orb-core {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    transform: translateZ(35px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 21px;
    background:
        radial-gradient(circle at 30% 25%, rgba(255,255,255,.12), transparent 22%),
        linear-gradient(135deg, rgba(139,92,246,.55), rgba(34,211,238,.16));
    box-shadow:
        0 0 45px rgba(139,92,246,.35),
        inset 0 0 25px rgba(34,211,238,.08);
}

.orb-core small {
    color: rgba(255,255,255,.55);
    font-size: 7px;
    letter-spacing: 2px;
}

/* Data feature nodes connect the medical inputs to the model. */
.data-node {
    position: absolute;
    z-index: 5;
    min-width: 50px;
    padding: 7px 9px;
    border: 1px solid rgba(148,163,184,.13);
    border-radius: 9px;
    background: rgba(4,9,20,.78);
    backdrop-filter: blur(12px);
    color: #cbd5e1;
    font: 800 7px/1 Inter, sans-serif;
    letter-spacing: 1px;
    box-shadow: 0 12px 30px rgba(0,0,0,.22);
    transform: translateZ(85px);
    animation: node-float 4s ease-in-out infinite;
}

.data-node b {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-left: 6px;
    border-radius: 50%;
    background: var(--cyan-hot);
    box-shadow: 0 0 10px rgba(34,211,238,.8);
}

.node-one { top: 68px; left: 18px; animation-delay: -.4s; }
.node-two { right: 12px; top: 125px; animation-delay: -1.2s; }
.node-three { left: 28px; bottom: 72px; animation-delay: -2s; }
.node-four { right: 35px; bottom: 55px; animation-delay: -2.8s; }

/* Thin energy paths around the feature nodes. */
.data-node::after {
    content: "";
    position: absolute;
    width: 70px;
    height: 1px;
    background: linear-gradient(90deg, rgba(34,211,238,0), rgba(34,211,238,.45), rgba(139,92,246,0));
    opacity: .65;
}

.node-one::after { left: 100%; top: 50%; transform: rotate(15deg); }
.node-two::after { right: 100%; top: 70%; transform: rotate(-20deg); }
.node-three::after { left: 100%; top: 30%; transform: rotate(-18deg); }
.node-four::after { right: 100%; top: 30%; transform: rotate(17deg); }

/* Floating cards have actual Z depth. */
.floating-card {
    z-index: 10;
    transform: translateZ(110px);
    animation: floating-panel 5s ease-in-out infinite;
}

.floating-bottom {
    animation-delay: -2.5s;
}

.scan-line {
    position: absolute;
    z-index: 8;
    width: 185px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,.7), transparent);
    box-shadow: 0 0 16px rgba(34,211,238,.4);
    transform: translateZ(80px) rotate(-8deg);
    animation: scan 3.8s ease-in-out infinite;
}

/* Inputs become tactile surfaces. */
.input-wrapper input,
.choice-content {
    transition:
        transform .25s ease,
        border-color .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}

.input-wrapper input:hover {
    transform: translateY(-1px);
    border-color: rgba(167,139,250,.22);
}

.input-wrapper input:focus {
    transform: translateY(-2px);
    box-shadow:
        0 12px 30px rgba(0,0,0,.16),
        0 0 0 3px rgba(139,92,246,.08),
        0 0 30px rgba(139,92,246,.07);
}

.choice-card:hover .choice-content {
    transform: translateY(-3px) translateZ(8px);
}

/* Prediction action gets a scanning energy border. */
.predict-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.predict-button::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 13px;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.2), transparent 42%);
    transform: translateX(-130%);
    animation: button-sweep 3.5s ease-in-out infinite;
    z-index: -1;
}

.predict-button::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,.55), transparent);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: .7;
    animation: border-flow 4s linear infinite;
}

/* Result area feels like a live instrument. */
.empty-orb {
    animation: empty-pulse 3.2s ease-in-out infinite;
}

.result-content {
    animation: result-enter .7s cubic-bezier(.16,1,.3,1);
}

.risk-circle {
    filter: drop-shadow(0 0 22px rgba(139,92,246,.15));
}

.circle-progress {
    filter: drop-shadow(0 0 8px rgba(139,92,246,.55));
}

.stat {
    transition: transform .25s ease, border-color .25s ease, background .25s ease;
}

.stat:hover {
    transform: translateY(-3px);
    border-color: rgba(139,92,246,.18);
    background: rgba(139,92,246,.045);
}

/* Model card receives a slow scanning highlight. */
.model-card {
    overflow: hidden;
}

.model-card::before {
    animation: model-sheen 7s ease-in-out infinite;
}

/* Scroll reveal */
[data-reveal],
[data-depth-card] {
    opacity: 0;
    transform: translateY(24px);
}

[data-depth-card] {
    transform: translateY(30px) rotateX(2deg);
}

[data-reveal].is-visible,
[data-depth-card].is-visible {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

/* Keyframes */
@keyframes ring-spin-a {
    from { transform: rotateX(70deg) rotateZ(0deg); }
    to { transform: rotateX(70deg) rotateZ(360deg); }
}

@keyframes ring-spin-b {
    from { transform: rotateX(72deg) rotateY(20deg) rotateZ(360deg); }
    to { transform: rotateX(72deg) rotateY(20deg) rotateZ(0deg); }
}

@keyframes ring-spin-c {
    from { transform: rotateY(70deg) rotateZ(20deg); }
    to { transform: rotateY(70deg) rotateZ(380deg); }
}

@keyframes signal-a {
    from { transform: rotateX(70deg) rotateZ(0deg); }
    to { transform: rotateX(70deg) rotateZ(360deg); }
}

@keyframes signal-b {
    from { transform: rotateY(68deg) rotateZ(360deg); }
    to { transform: rotateY(68deg) rotateZ(0deg); }
}

@keyframes nucleus-float {
    0%, 100% { transform: translateZ(55px) translateY(0); }
    50% { transform: translateZ(72px) translateY(-9px); }
}

@keyframes nucleus-scan {
    to { transform: rotate(360deg); }
}

@keyframes particle-shift {
    to { transform: translate3d(18px, -12px, 0); }
}

@keyframes node-float {
    0%, 100% { transform: translateZ(85px) translateY(0); }
    50% { transform: translateZ(100px) translateY(-6px); }
}

@keyframes floating-panel {
    0%, 100% { transform: translateZ(110px) translateY(0); }
    50% { transform: translateZ(125px) translateY(-8px); }
}

@keyframes scan {
    0%, 100% { transform: translateZ(80px) translateY(-85px) rotate(-8deg); opacity: 0; }
    25%, 75% { opacity: .8; }
    50% { transform: translateZ(80px) translateY(85px) rotate(-8deg); opacity: .35; }
}

@keyframes depth-orbit {
    from { transform: rotateX(72deg) rotateZ(0deg) translateZ(-75px); }
    to { transform: rotateX(72deg) rotateZ(360deg) translateZ(-75px); }
}

@keyframes depth-orbit-reverse {
    from { transform: rotateX(70deg) rotateY(15deg) rotateZ(360deg) translateZ(-95px); }
    to { transform: rotateX(70deg) rotateY(15deg) rotateZ(0deg) translateZ(-95px); }
}

@keyframes ambient-breathe {
    0%, 100% { transform: translateZ(-100px) scale(.9); opacity: .7; }
    50% { transform: translateZ(-100px) scale(1.08); opacity: 1; }
}

@keyframes button-sweep {
    0%, 55%, 100% { transform: translateX(-130%); }
    75% { transform: translateX(130%); }
}

@keyframes border-flow {
    to { transform: translateX(80%); }
}

@keyframes empty-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 rgba(139,92,246,0); }
    50% { transform: scale(1.045); box-shadow: 0 0 45px rgba(139,92,246,.08); }
}

@keyframes card-arrive {
    from { opacity: 0; transform: translateY(30px) rotateX(5deg) scale(.98); }
    to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}

@keyframes result-enter {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes model-sheen {
    0%, 65%, 100% { transform: translateX(-20%); }
    82% { transform: translateX(20%); }
}

/* Mobile: keep the 3D visual, but reduce its depth and preserve readability. */
@media (max-width: 1000px) {
    .hero-visual {
        display: grid;
        margin-top: -5px;
    }

    .hero-3d-scene {
        width: min(440px, 90vw);
    }

    .orbital-card {
        transform:
            rotateX(var(--tilt-x))
            rotateY(var(--tilt-y))
            translateZ(20px)
            scale(.88);
    }

    .scene-grid {
        opacity: .55;
    }
}

@media (max-width: 700px) {
    .hero-visual {
        display: grid;
        order: 2;
        margin: 8px 0 -8px;
    }

    .hero-3d-scene {
        width: min(340px, 94vw);
    }

    .orbital-card {
        width: 340px;
        height: 340px;
        transform: scale(.72);
    }

    .depth-ring-a,
    .depth-ring-b,
    .scene-grid {
        opacity: .45;
    }

    .floating-card {
        padding: 9px 11px;
    }

    .data-node {
        transform: translateZ(65px) scale(.9);
    }

    .model-card {
        box-shadow: 0 20px 55px rgba(0,0,0,.24);
    }
}

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

    .orbital-card {
        transform: translateZ(20px);
    }
}


/* =========================================================
   CINEMATIC 3D PREGNANCY AI EXPERIENCE
   Native CSS + JS. No external animation dependency.
   ========================================================= */

:root {
    --cin-bg: #05050d;
    --cin-violet: #8b5cf6;
    --cin-cyan: #22d3ee;
    --cin-pink: #f472b6;
    --cin-white: #f8fafc;
    --cin-muted: #94a3b8;
}

body {
    background:
        radial-gradient(circle at 50% 0%, rgba(124, 58, 237, .12), transparent 34%),
        radial-gradient(circle at 10% 50%, rgba(34, 211, 238, .05), transparent 28%),
        #05050d;
    overflow-x: hidden;
}

.hero-3d-scene.cinematic-scene {
    isolation: isolate;
    min-height: 620px;
    perspective: 1200px;
    transform-style: preserve-3d;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, .16);
    border-radius: 32px;
    background:
        radial-gradient(circle at var(--mx, 50%) var(--my, 45%), rgba(139, 92, 246, .17), transparent 26%),
        radial-gradient(circle at 50% 48%, rgba(34, 211, 238, .07), transparent 30%),
        linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.008));
    box-shadow:
        0 50px 120px rgba(0,0,0,.5),
        inset 0 1px rgba(255,255,255,.06),
        inset 0 0 80px rgba(139,92,246,.045);
}

.hero-3d-scene.cinematic-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 49.8%, rgba(139,92,246,.06) 50%, transparent 50.2%),
        linear-gradient(0deg, transparent 49.8%, rgba(34,211,238,.045) 50%, transparent 50.2%);
    background-size: 160px 160px;
    mask-image: radial-gradient(circle, black, transparent 75%);
    pointer-events: none;
    opacity: .55;
}

.scene-vignette {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    background: radial-gradient(circle, transparent 42%, rgba(0,0,0,.48) 100%);
}

.scene-grid {
    position: absolute;
    width: 150%;
    height: 55%;
    left: -25%;
    bottom: -20%;
    z-index: 1;
    opacity: .28;
    transform: perspective(500px) rotateX(66deg);
    transform-origin: center bottom;
    background-image:
        linear-gradient(rgba(139,92,246,.25) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34,211,238,.2) 1px, transparent 1px);
    background-size: 46px 46px;
    animation: grid-drift 14s linear infinite;
}

.scene-stars {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.scene-stars i {
    position: absolute;
    left: var(--sx);
    top: var(--sy);
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 12px rgba(255,255,255,.9);
    animation: star-pulse 2.8s ease-in-out var(--sd) infinite;
}

.cinematic-hud {
    position: absolute;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 9px;
    font: 600 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .18em;
    color: rgba(226,232,240,.55);
    text-transform: uppercase;
}

.hud-top { top: 24px; left: 26px; }
.hud-bottom { bottom: 23px; left: 26px; }

.hud-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cin-cyan);
    box-shadow: 0 0 15px var(--cin-cyan);
    animation: hud-blink 1.6s ease-in-out infinite;
}

.hud-status { color: #67e8f9; }

.hud-separator { opacity: .3; }

.data-stream {
    position: absolute;
    z-index: 8;
    width: 132px;
    padding: 10px 12px;
    border: 1px solid rgba(139,92,246,.2);
    border-radius: 10px;
    background: rgba(8,8,20,.48);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,.22);
    font: 9px/1.4 ui-monospace, monospace;
    transform: translateZ(70px);
    animation: data-float 5s ease-in-out infinite;
}

.data-stream b { display: block; color: #a78bfa; letter-spacing: .16em; }
.data-stream em { display: block; margin-top: 2px; color: #e2e8f0; font-style: normal; font-size: 14px; }
.data-stream i {
    display: inline-block;
    width: 7px;
    height: 2px;
    margin: 7px 3px 0 0;
    background: #22d3ee;
    opacity: .55;
    animation: signal-blink 1s infinite;
}
.data-stream i:nth-of-type(2) { animation-delay: .25s; }
.data-stream i:nth-of-type(3) { animation-delay: .5s; }

.stream-a { left: 7%; top: 26%; }
.stream-b { left: 8%; bottom: 27%; animation-delay: -1.4s; }
.stream-c { right: 7%; top: 25%; animation-delay: -2.2s; }
.stream-d { right: 8%; bottom: 27%; animation-delay: -3.1s; }

.decision-network {
    position: absolute;
    inset: 0;
    z-index: 5;
    transform-style: preserve-3d;
    pointer-events: none;
    animation: network-breathe 8s ease-in-out infinite;
}

.network-node {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a78bfa;
    box-shadow: 0 0 16px #8b5cf6, 0 0 35px rgba(139,92,246,.4);
}

.n1 { left: 27%; top: 33%; }
.n2 { left: 34%; top: 24%; }
.n3 { left: 39%; top: 41%; }
.n4 { right: 31%; top: 28%; }
.n5 { right: 25%; top: 44%; }
.n6 { right: 34%; bottom: 30%; }

.network-line {
    position: absolute;
    height: 1px;
    transform-origin: left center;
    background: linear-gradient(90deg, rgba(139,92,246,0), rgba(139,92,246,.55), rgba(34,211,238,.15));
    box-shadow: 0 0 8px rgba(139,92,246,.35);
}

.l1 { left: 27.5%; top: 33.5%; width: 9%; transform: rotate(-27deg); }
.l2 { left: 34.5%; top: 24.5%; width: 18%; transform: rotate(35deg); }
.l3 { left: 39.5%; top: 41%; width: 16%; transform: rotate(-21deg); }
.l4 { right: 30%; top: 28.5%; width: 9%; transform: rotate(62deg); }
.l5 { right: 25%; top: 44.5%; width: 15%; transform: rotate(139deg); }

.cinematic-core {
    position: absolute;
    z-index: 12;
    left: 50%;
    top: 49%;
    width: 300px;
    height: 300px;
    transform:
        translate(-50%, -50%)
        rotateX(var(--tilt-x, 0deg))
        rotateY(var(--tilt-y, 0deg));
    transform-style: preserve-3d;
    transition: transform .18s ease-out;
    animation: core-hover 7s ease-in-out infinite;
}

.core-shadow {
    position: absolute;
    inset: 18%;
    border-radius: 50%;
    background: rgba(124,58,237,.25);
    filter: blur(45px);
    transform: translateZ(-90px);
    animation: shadow-breathe 4s ease-in-out infinite;
}

.core-ring {
    position: absolute;
    inset: 6%;
    border: 1px solid rgba(139,92,246,.24);
    border-radius: 50%;
    transform-style: preserve-3d;
}

.core-ring-1 { transform: rotateX(70deg) rotateY(15deg); animation: core-ring-a 9s linear infinite; }
.core-ring-2 { inset: 14%; transform: rotateY(68deg) rotateX(20deg); animation: core-ring-b 12s linear infinite reverse; border-color: rgba(34,211,238,.22); }
.core-ring-3 { inset: -3%; transform: rotateX(24deg) rotateZ(45deg); animation: core-ring-c 16s linear infinite; border-style: dashed; opacity: .65; }

.core-orbit {
    position: absolute;
    inset: 2%;
    border-radius: 50%;
    border: 1px solid transparent;
    transform-style: preserve-3d;
}

.core-orbit span {
    position: absolute;
    width: 9px;
    height: 9px;
    top: 50%;
    left: -4px;
    margin-top: -4px;
    border-radius: 50%;
    background: #22d3ee;
    box-shadow: 0 0 16px #22d3ee, 0 0 35px rgba(34,211,238,.55);
}

.orbit-1 { transform: rotateX(73deg) rotateZ(8deg); animation: orbit-one 5s linear infinite; }
.orbit-2 { inset: 20%; transform: rotateY(72deg) rotateZ(-20deg); animation: orbit-two 7s linear infinite reverse; }
.orbit-3 { inset: 10%; transform: rotateX(45deg) rotateY(35deg); animation: orbit-three 11s linear infinite; }
.orbit-2 span { background: #f472b6; box-shadow: 0 0 16px #f472b6; }
.orbit-3 span { background: #a78bfa; box-shadow: 0 0 16px #a78bfa; }

.core-glass {
    position: absolute;
    inset: 22%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%;
    overflow: hidden;
    background:
        radial-gradient(circle at 35% 28%, rgba(255,255,255,.13), transparent 18%),
        radial-gradient(circle, rgba(124,58,237,.32), rgba(7,7,18,.92) 68%);
    box-shadow:
        inset 0 0 35px rgba(139,92,246,.18),
        0 0 45px rgba(124,58,237,.18),
        0 20px 50px rgba(0,0,0,.45);
    backdrop-filter: blur(12px);
    transform: translateZ(80px);
}

.core-glass strong {
    margin-top: 4px;
    font: 800 34px/1 Inter, system-ui, sans-serif;
    letter-spacing: .08em;
    background: linear-gradient(135deg, #fff, #c4b5fd 45%, #67e8f9);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 0 0 35px rgba(139,92,246,.2);
}

.core-glass small {
    margin-top: 7px;
    color: rgba(226,232,240,.55);
    font: 600 7px/1 ui-monospace, monospace;
    letter-spacing: .22em;
}

.core-scan {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #22d3ee, transparent);
    box-shadow: 0 0 10px #22d3ee;
    animation: core-scan 2.4s ease-in-out infinite;
}

.core-pulse {
    position: absolute;
    inset: 34%;
    border: 1px solid rgba(34,211,238,.3);
    border-radius: 50%;
    animation: pulse-ring 2.2s ease-out infinite;
}

.core-symbol {
    display: flex;
    align-items: center;
    gap: 5px;
    transform: translateZ(20px);
}

.core-symbol-line {
    width: 24px;
    height: 1px;
    background: #22d3ee;
    box-shadow: 0 0 8px #22d3ee;
}

.core-symbol-node {
    width: 7px;
    height: 7px;
    border: 1px solid #67e8f9;
    border-radius: 50%;
    box-shadow: 0 0 12px #22d3ee;
}

.risk-hologram {
    position: absolute;
    z-index: 16;
    right: 14%;
    top: 50%;
    min-width: 142px;
    padding: 15px 17px;
    border: 1px solid rgba(34,211,238,.18);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(10,14,28,.72), rgba(9,8,22,.42));
    box-shadow: 0 20px 50px rgba(0,0,0,.3), inset 0 1px rgba(255,255,255,.06);
    backdrop-filter: blur(14px);
    transform: translateY(-50%) translateZ(120px);
    animation: hologram-float 5s ease-in-out infinite;
}

.risk-label,
.risk-hologram small,
.floating-metric small {
    display: block;
    color: rgba(148,163,184,.7);
    font: 600 7px/1.3 ui-monospace, monospace;
    letter-spacing: .18em;
}

.risk-hologram strong {
    display: block;
    margin: 7px 0 1px;
    color: #f8fafc;
    font: 700 27px/1 Inter, system-ui, sans-serif;
}

.risk-hologram strong span { color: #67e8f9; font-size: 13px; }
.risk-hologram small { color: #67e8f9; }

.risk-meter {
    height: 2px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(255,255,255,.08);
}
.risk-meter i {
    display: block;
    width: 23.7%;
    height: 100%;
    background: linear-gradient(90deg, #22d3ee, #8b5cf6);
    box-shadow: 0 0 10px #22d3ee;
    animation: meter-pulse 2s ease-in-out infinite;
}

.floating-metric {
    position: absolute;
    z-index: 15;
    padding: 12px 15px;
    min-width: 128px;
    border-left: 2px solid rgba(139,92,246,.7);
    background: linear-gradient(90deg, rgba(139,92,246,.08), transparent);
    transform: translateZ(90px);
    animation: metric-float 6s ease-in-out infinite;
}

.floating-metric strong {
    display: block;
    margin: 4px 0 1px;
    color: #e2e8f0;
    font: 700 14px/1.2 ui-monospace, monospace;
}
.floating-metric span { color: rgba(148,163,184,.55); font-size: 8px; }
.metric-left { left: 16%; top: 58%; }
.metric-right { right: 17%; bottom: 20%; animation-delay: -2.7s; border-left-color: rgba(34,211,238,.7); }

.scan-beam {
    position: absolute;
    z-index: 25;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(34,211,238,.7), transparent);
    box-shadow: 0 0 18px rgba(34,211,238,.5);
    animation: full-scan 6s ease-in-out infinite;
}

.energy-particles {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.energy-particles span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #67e8f9;
    box-shadow: 0 0 10px #22d3ee;
    animation: particle-flow 3.4s linear infinite;
}
.energy-particles span:nth-child(2) { animation-delay: -.4s; --angle: 28deg; }
.energy-particles span:nth-child(3) { animation-delay: -.9s; --angle: 73deg; }
.energy-particles span:nth-child(4) { animation-delay: -1.4s; --angle: 137deg; }
.energy-particles span:nth-child(5) { animation-delay: -1.8s; --angle: 192deg; }
.energy-particles span:nth-child(6) { animation-delay: -2.2s; --angle: 231deg; }
.energy-particles span:nth-child(7) { animation-delay: -2.7s; --angle: 276deg; }
.energy-particles span:nth-child(8) { animation-delay: -3s; --angle: 319deg; }
.energy-particles span:nth-child(9) { animation-delay: -1s; --angle: 42deg; }
.energy-particles span:nth-child(10) { animation-delay: -2.5s; --angle: 156deg; }

[data-cinematic-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .8s ease var(--reveal-delay, 0ms), transform .8s cubic-bezier(.2,.75,.2,1) var(--reveal-delay, 0ms);
}
[data-cinematic-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Form becomes more tactile and dimensional. */
.dashboard-grid > * {
    transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
.dashboard-grid > *:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 55px rgba(0,0,0,.28);
}

.choice-card,
.form-group input,
.form-group select,
.form-group textarea {
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}

.choice-card:hover {
    transform: translateY(-3px) translateZ(10px);
    box-shadow: 0 12px 28px rgba(139,92,246,.14);
}

.predict-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.predict-btn::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -2;
    background: conic-gradient(from 0deg, transparent, #22d3ee, transparent 25%, #8b5cf6, transparent 65%);
    animation: button-energy 3s linear infinite;
}
.predict-btn::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background: inherit;
}
.predict-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 45px rgba(124,58,237,.35);
}

.result-card {
    position: relative;
    overflow: hidden;
}
.result-card::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -100px;
    top: -100px;
    border-radius: 50%;
    background: rgba(34,211,238,.08);
    filter: blur(15px);
    animation: result-glow 5s ease-in-out infinite;
}

/* Cinematic keyframes */
@keyframes grid-drift {
    to { background-position: 0 46px, 46px 0; }
}
@keyframes star-pulse {
    0%,100% { opacity: .15; transform: scale(.7); }
    50% { opacity: .9; transform: scale(1.5); }
}
@keyframes hud-blink {
    0%,100% { opacity: .4; }
    50% { opacity: 1; }
}
@keyframes data-float {
    0%,100% { transform: translateZ(70px) translateY(0); }
    50% { transform: translateZ(100px) translateY(-9px); }
}
@keyframes signal-blink {
    0%,100% { opacity: .2; transform: scaleX(.6); }
    50% { opacity: 1; transform: scaleX(1.3); }
}
@keyframes network-breathe {
    0%,100% { transform: translateZ(0) scale(.98); opacity: .65; }
    50% { transform: translateZ(25px) scale(1.02); opacity: 1; }
}
@keyframes core-hover {
    0%,100% { transform: translate(-50%,-50%) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(0); }
    50% { transform: translate(-50%,-50%) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(-10px); }
}
@keyframes shadow-breathe {
    50% { transform: translateZ(-90px) scale(1.2); opacity: .65; }
}
@keyframes core-ring-a {
    to { transform: rotateX(70deg) rotateY(15deg) rotateZ(360deg); }
}
@keyframes core-ring-b {
    to { transform: rotateY(68deg) rotateX(20deg) rotateZ(-360deg); }
}
@keyframes core-ring-c {
    to { transform: rotateX(24deg) rotateZ(405deg); }
}
@keyframes orbit-one { to { transform: rotateX(73deg) rotateZ(368deg); } }
@keyframes orbit-two { to { transform: rotateY(72deg) rotateZ(-380deg); } }
@keyframes orbit-three { to { transform: rotateX(45deg) rotateY(35deg) rotateZ(360deg); } }
@keyframes core-scan {
    0%,100% { top: 16%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 82%; }
}
@keyframes pulse-ring {
    0% { transform: scale(.65); opacity: .8; }
    100% { transform: scale(1.65); opacity: 0; }
}
@keyframes hologram-float {
    0%,100% { transform: translateY(-50%) translateZ(120px); }
    50% { transform: translateY(calc(-50% - 9px)) translateZ(150px); }
}
@keyframes meter-pulse {
    50% { filter: brightness(1.5); }
}
@keyframes metric-float {
    0%,100% { transform: translateZ(90px) translateY(0); }
    50% { transform: translateZ(115px) translateY(-8px); }
}
@keyframes full-scan {
    0% { top: -2%; opacity: 0; }
    12% { opacity: .7; }
    50% { opacity: .8; }
    88% { opacity: .7; }
    100% { top: 102%; opacity: 0; }
}
@keyframes particle-flow {
    0% { transform: rotate(var(--angle,0deg)) translateX(35px) scale(.3); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: rotate(var(--angle,0deg)) translateX(250px) scale(1); opacity: 0; }
}
@keyframes button-energy { to { transform: rotate(360deg); } }
@keyframes result-glow {
    50% { transform: scale(1.25); opacity: 1.5; }
}

/* Mobile: preserve the cinematic idea without overwhelming the viewport. */
@media (max-width: 1000px) {
    .hero-3d-scene.cinematic-scene { min-height: 560px; }
    .cinematic-core { width: 250px; height: 250px; }
    .risk-hologram { right: 5%; }
    .stream-a, .stream-b { left: 3%; }
    .stream-c, .stream-d { right: 3%; }
    .metric-left { left: 9%; }
    .metric-right { right: 9%; }
}

@media (max-width: 700px) {
    .hero-3d-scene.cinematic-scene {
        min-height: 520px;
        border-radius: 24px;
    }

    .cinematic-core { width: 210px; height: 210px; }
    .core-glass strong { font-size: 27px; }

    .data-stream {
        width: 82px;
        padding: 7px 8px;
        transform: scale(.82);
    }
    .stream-a { left: -2%; top: 22%; }
    .stream-b { left: -2%; bottom: 23%; }
    .stream-c { right: -2%; top: 22%; }
    .stream-d { right: -2%; bottom: 23%; }

    .risk-hologram {
        top: auto;
        right: 50%;
        bottom: 14px;
        min-width: 126px;
        padding: 10px 12px;
        transform: translateX(50%) translateZ(100px);
    }

    .risk-hologram strong { font-size: 21px; }
    .metric-left, .metric-right { display: none; }
    .network-node, .network-line { opacity: .5; }
    .hud-bottom { display: none; }
    .cinematic-hud { font-size: 7px; }
    .hud-top { top: 17px; left: 17px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-3d-scene.cinematic-scene *,
    .hero-3d-scene.cinematic-scene::before {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   STEP-BY-STEP WIZARD
   One field at a time · slide left/right · circular navigation
   Each field has its own visual + entrance animation.
   ========================================================= */

.wizard {
    --wz-amber: #fbbf24;
    --wz-sky: #38bdf8;
    padding-top: 22px;
}

/* ---------- Progress ---------- */
.wz-progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 9px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

#wz-count { font-variant-numeric: tabular-nums; }

.wz-bar {
    height: 3px;
    border-radius: 3px;
    background: rgba(148, 163, 184, .12);
    overflow: hidden;
}

.wz-bar i {
    display: block;
    height: 100%;
    width: 10%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--cyan));
    transition: width .55s cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Stage: all steps stacked in one grid cell ---------- */
.wz-stage {
    display: grid;
    min-height: 390px;
    margin: 6px -8px 0;
    padding: 8px;
    overflow: hidden;
    touch-action: pan-y;          /* vertical page scroll stays native; horizontal swipe = our gesture */
    overscroll-behavior: contain;
}

.wz-step {
    grid-area: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    padding: 8px 4px;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.wz-step.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* current card leaves to the LEFT, the next one arrives from the RIGHT */
.wz-step.is-leaving {
    visibility: visible;
    animation: wz-out-next .46s cubic-bezier(.55, 0, .8, .3) both;
}
.wz-step.is-entering {
    animation: wz-in-next .62s cubic-bezier(.16, 1, .3, 1) both;
}
/* going back mirrors the motion */
.wz-stage[data-dir="prev"] .wz-step.is-leaving { animation-name: wz-out-prev; }
.wz-stage[data-dir="prev"] .wz-step.is-entering { animation-name: wz-in-prev; }

@keyframes wz-out-next {
    to { opacity: 0; transform: translateX(-80px) scale(.95); filter: blur(5px); }
}
@keyframes wz-out-prev {
    to { opacity: 0; transform: translateX(80px) scale(.95); filter: blur(5px); }
}
@keyframes wz-in-next {
    from { opacity: 0; transform: translateX(80px) scale(.97); filter: blur(4px); }
}
@keyframes wz-in-prev {
    from { opacity: 0; transform: translateX(-80px) scale(.97); filter: blur(4px); }
}

/* ---------- Label · field · hint ---------- */
.wz-label {
    margin-bottom: 12px;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
}
.wz-label span { color: var(--danger); }

.wz-field {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 380px;
}

.wz-field.shake { animation: wz-shake .42s cubic-bezier(.36, .07, .19, .97); }

@keyframes wz-shake {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-7px); }
    40%, 60% { transform: translateX(7px); }
}

.wz-input-wrap { position: relative; flex: 1; min-width: 0; }

.wz-input-wrap input {
    width: 100%;
    height: 68px;
    padding: 0 10px 14px;

    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 16px;
    outline: none;

    background: rgba(2, 6, 23, .5);
    color: #f8fafc;

    font-family: inherit;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.5px;
    text-align: center;
    font-variant-numeric: tabular-nums;

    -moz-appearance: textfield;
    appearance: textfield;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.wz-input-wrap input::-webkit-outer-spin-button,
.wz-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.wz-input-wrap input::placeholder { color: #334155; }

.wz-input-wrap input:focus {
    transform: none;
    border-color: rgba(139, 92, 246, .7);
    background: rgba(2, 6, 23, .7);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, .12), 0 0 36px rgba(139, 92, 246, .12);
}

.wz-input-wrap input.is-invalid {
    border-color: rgba(251, 113, 133, .7);
    box-shadow: 0 0 0 4px rgba(251, 113, 133, .10);
}

.wz-unit {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    pointer-events: none;
}

.wz-step-btn {
    flex: none;
    width: 50px;
    height: 50px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 15px;
    background: rgba(255, 255, 255, .03);
    color: #cbd5e1;
    font: inherit;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.wz-step-btn:hover { background: rgba(139, 92, 246, .12); border-color: rgba(167, 139, 250, .35); }
.wz-step-btn:active { transform: scale(.92); }

.wz-hint {
    min-height: 32px;
    max-width: 34ch;
    margin-top: 14px;
    color: #64748b;
    font-size: 11.5px;
    line-height: 1.5;
    transition: color .2s ease;
}
.wz-hint.is-error { color: var(--danger); }

/* ---------- Shared visual frame ---------- */
.wz-visual {
    width: 150px;
    height: 118px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
}
.wz-visual svg { width: 100%; height: 100%; overflow: visible; }

/* =========================================================
   1 · AGE — a ring that fills up with the years
   ========================================================= */
.v-age svg { width: 118px; }
.age-track  { fill: none; stroke: rgba(148, 163, 184, .14); stroke-width: 6; }
.age-arc {
    fill: none;
    stroke: var(--primary-light);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transform: rotate(-90deg);
    transform-origin: 60px 60px;
    transition: stroke-dashoffset .6s cubic-bezier(.16, 1, .3, 1);
    filter: drop-shadow(0 0 6px rgba(167, 139, 250, .55));
}
.age-orbit {
    fill: none;
    stroke: rgba(34, 211, 238, .35);
    stroke-width: 1;
    stroke-dasharray: .6 1.6;
    transform-box: fill-box;
    transform-origin: center;
}
.age-dot { fill: var(--cyan); filter: drop-shadow(0 0 5px var(--cyan)); }
.age-dot-wrap { transform-origin: 60px 60px; }

.is-active .age-orbit,
.is-leaving .age-orbit { animation: wz-spin 18s linear infinite reverse; }
.is-active .age-dot-wrap,
.is-leaving .age-dot-wrap { animation: wz-spin 5s linear infinite; }

/* entrance: the ring draws itself while the whole dial unwinds */
.is-entering .v-age svg { animation: age-in .9s cubic-bezier(.16, 1, .3, 1) backwards; }
.is-entering .age-arc   { animation: age-draw 1.1s cubic-bezier(.3, .7, .2, 1) backwards; }

@keyframes age-in   { from { transform: rotate(-120deg) scale(.5); opacity: 0; } }
@keyframes age-draw { from { stroke-dashoffset: 100; } }
@keyframes wz-spin  { to { transform: rotate(360deg); } }

/* =========================================================
   2 · HEART RATE — the heart beats at the typed bpm
   ========================================================= */
.wz-step[data-step="heart-rate"] { --beat: .85s; }

.v-heart svg { width: 170px; }
.heart {
    fill: var(--danger);
    filter: drop-shadow(0 0 12px rgba(251, 113, 133, .55));
}
.heart-wrap { transform-origin: 80px 72px; }
.ecg {
    fill: none;
    stroke: var(--cyan);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 38 62;
    opacity: .85;
    filter: drop-shadow(0 0 4px rgba(34, 211, 238, .6));
}

.is-active .heart-wrap,
.is-leaving .heart-wrap { animation: wz-beat var(--beat) ease-in-out infinite; }
.is-active .ecg,
.is-leaving .ecg { animation: wz-ecg calc(var(--beat) * 2) linear infinite; }

/* entrance: pops in with overshoot */
.is-entering .v-heart svg { animation: wz-pop .75s cubic-bezier(.3, 1.7, .5, 1) backwards; }

@keyframes wz-beat {
    0%, 100% { transform: scale(1); }
    14%      { transform: scale(1.2); }
    28%      { transform: scale(1.02); }
    42%      { transform: scale(1.12); }
    60%      { transform: scale(1); }
}
@keyframes wz-ecg { from { stroke-dashoffset: 38; } to { stroke-dashoffset: -62; } }
@keyframes wz-pop { from { transform: scale(0); opacity: 0; } }

/* =========================================================
   3 · SYSTOLIC — dial with a needle that sweeps to the value
   ========================================================= */
.v-sys svg { width: 170px; --gc: var(--primary-light); }
.dial-track { fill: none; stroke: rgba(148, 163, 184, .14); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 100; }
.dial-fill {
    fill: none;
    stroke: var(--gc);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset .7s cubic-bezier(.16, 1, .3, 1), stroke .4s ease;
    filter: drop-shadow(0 0 6px var(--gc));
}
.needle {
    transform-origin: 80px 88px;
    transform: rotate(-90deg);
    transition: transform .8s cubic-bezier(.3, 1.45, .5, 1);
}
.needle line   { stroke: #f8fafc; stroke-width: 3; stroke-linecap: round; }
.needle circle { fill: #f8fafc; }

/* entrance: needle sweeps the whole dial then settles */
.is-entering .needle     { animation: needle-sweep 1.1s cubic-bezier(.4, 0, .2, 1) backwards; }
.is-entering .dial-track { animation: wz-fade-up .6s ease backwards; }

@keyframes needle-sweep {
    0%   { transform: rotate(-90deg); }
    55%  { transform: rotate(90deg); }
}
@keyframes wz-fade-up { from { opacity: 0; transform: translateY(10px); } }

/* =========================================================
   4 · DIASTOLIC — a pressure tube that drops in and fills
   ========================================================= */
.v-dia svg { width: 118px; --gc: var(--cyan); }
.tube      { fill: rgba(2, 6, 23, .5); stroke: rgba(148, 163, 184, .25); stroke-width: 2; }
.tube-fill {
    fill: var(--gc);
    opacity: .9;
    transform: translateY(104px);
    transition: transform .7s cubic-bezier(.16, 1, .3, 1), fill .4s ease;
}
.ticks path { stroke: rgba(148, 163, 184, .35); stroke-width: 2; stroke-linecap: round; }

/* entrance: falls from above and bounces */
.is-entering .v-dia svg { animation: wz-drop-in .85s cubic-bezier(.3, 1.5, .5, 1) backwards; }
.is-entering .tube-fill { animation: tube-rise 1s .25s cubic-bezier(.3, .8, .3, 1) backwards; }

@keyframes wz-drop-in  { from { transform: translateY(-70px); opacity: 0; } }
@keyframes tube-rise   { from { transform: translateY(104px); } }

/* =========================================================
   5 · BLOOD SUGAR — a drop filling with waves
   ========================================================= */
.v-bs svg { width: 118px; }
.drop-outline { fill: rgba(2, 6, 23, .4); stroke: var(--primary-light); stroke-width: 2.5; }
/* the outline is drawn first, liquid is clipped to the same shape */
.liquid { transform: translateY(104px); transition: transform .8s cubic-bezier(.16, 1, .3, 1); }
.wave   { transform-box: fill-box; }
.wave-a { fill: rgba(34, 211, 238, .65); }
.wave-b { fill: rgba(139, 92, 246, .55); }
.drop-outline { fill: none; }

.is-active .wave-a, .is-leaving .wave-a { animation: wave-run 2.6s linear infinite; }
.is-active .wave-b, .is-leaving .wave-b { animation: wave-run 3.8s linear infinite reverse; }

/* entrance: squashes in like a falling drop */
.is-entering .v-bs svg { animation: wz-drip .9s cubic-bezier(.3, 1.6, .5, 1) backwards; transform-origin: 50% 100%; }

@keyframes wave-run { from { transform: translateX(0); } to { transform: translateX(120px); } }
@keyframes wz-drip {
    0%   { transform: translateY(-80px) scale(.6, 1.4); opacity: 0; }
    60%  { transform: translateY(0) scale(1.12, .88); opacity: 1; }
}

/* =========================================================
   6 · BMI — colour scale with a pin that lands on the value
   ========================================================= */
.v-bmi { width: min(100%, 320px); height: 118px; position: relative; }
.bmi-scale {
    position: absolute;
    left: 0; right: 0; bottom: 26px;
    height: 12px;
    display: flex;
    gap: 3px;
}
.bmi-scale .seg { height: 12px; border-radius: 8px; transform-origin: left center; }
.seg.s1 { flex: 14; background: var(--wz-sky); }
.seg.s2 { flex: 26; background: var(--success); }
.seg.s3 { flex: 20; background: var(--wz-amber); }
.seg.s4 { flex: 40; background: var(--danger); }

.bmi-pin {
    --pc: var(--muted-light);
    position: absolute;
    left: var(--x, 50%);
    bottom: 100%;
    margin-bottom: 4px;
    transform: translateX(-50%);
    transition: left .6s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
    opacity: 0;
}
.bmi-pin span {
    display: block;
    padding: 6px 11px;
    border-radius: 10px;
    background: var(--pc);
    color: #07101f;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.bmi-pin::after {
    content: "";
    position: absolute;
    left: 50%; top: 100%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: var(--pc);
}

/* entrance: bar wipes in segment by segment, pin drops last */
.is-entering .seg   { animation: wz-grow-x .5s cubic-bezier(.2, .8, .2, 1) backwards; }
.is-entering .seg.s2 { animation-delay: .08s; }
.is-entering .seg.s3 { animation-delay: .16s; }
.is-entering .seg.s4 { animation-delay: .24s; }
.is-entering .bmi-pin { animation: pin-drop .7s .35s cubic-bezier(.3, 1.7, .5, 1) backwards; }

@keyframes wz-grow-x { from { transform: scaleX(0); opacity: 0; } }
@keyframes pin-drop {
    from { transform: translate(-50%, -46px); opacity: 0; }
}

/* =========================================================
   7–9 · MEDICAL HISTORY — big tappable cards
   ========================================================= */
.wz-choice {
    --ca: var(--primary-light);
    --cb: rgba(139, 92, 246, .08);
    display: block;
    width: 100%;
    max-width: 380px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.wz-choice.c-warn { --ca: var(--wz-amber, #fbbf24); --cb: rgba(251, 191, 36, .07); }
.wz-choice.c-dm   { --ca: var(--cyan);              --cb: rgba(34, 211, 238, .07); }
.wz-choice.c-mh   { --ca: #c4b5fd;                  --cb: rgba(139, 92, 246, .10); }

.wz-choice input {
    position: absolute;
    opacity: 0;
    width: 1px; height: 1px;
    pointer-events: none;
}

.wz-choice-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 18px 22px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 22px;
    background: rgba(2, 6, 23, .4);
    transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.wz-choice:hover .wz-choice-body { border-color: rgba(148, 163, 184, .3); }
.wz-choice input:focus-visible + .wz-choice-body { outline: 2px solid var(--primary-light); outline-offset: 3px; }
.wz-choice input:checked + .wz-choice-body {
    border-color: var(--ca);
    background: var(--cb);
    box-shadow: 0 0 40px var(--cb);
}

.wz-choice-body strong { font-size: 16px; }
.wz-choice-body small  { margin: 5px 0 18px; color: var(--muted); font-size: 12px; }

/* No / Yes switch */
.wz-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}
.wz-switch i {
    position: relative;
    width: 52px; height: 30px;
    border-radius: 30px;
    background: rgba(148, 163, 184, .2);
    transition: background .3s ease;
}
.wz-switch i::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
    transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.wz-choice input:not(:checked) + .wz-choice-body .wz-switch b:first-child { color: #e2e8f0; }
.wz-choice input:checked + .wz-choice-body .wz-switch b:last-child { color: var(--ca); }
.wz-choice input:checked + .wz-choice-body .wz-switch i { background: var(--ca); }
.wz-choice input:checked + .wz-choice-body .wz-switch i::after { transform: translateX(22px); }

.wz-choice .wz-visual { width: 130px; height: 104px; margin-bottom: 4px; }

/* 7 · Warning triangle — draws itself, shakes when answered Yes */
.tri      { fill: rgba(251, 191, 36, .1); stroke: var(--wz-amber, #fbbf24); stroke-width: 4; stroke-linejoin: round; stroke-dasharray: 320; }
.tri-mark { fill: none; stroke: var(--wz-amber, #fbbf24); stroke-width: 6; stroke-linecap: round; }
.is-entering .tri      { animation: wz-dash 1s cubic-bezier(.4, 0, .2, 1) backwards; }
.is-entering .tri-mark { animation: wz-fade-up .5s .6s ease backwards; }
.c-warn input:checked + .wz-choice-body svg { animation: wz-wiggle 1.6s ease-in-out infinite; transform-origin: 50% 85%; }

@keyframes wz-dash   { from { stroke-dashoffset: 320; } }
@keyframes wz-wiggle {
    0%, 100% { transform: rotate(0); }
    10% { transform: rotate(-9deg); } 20% { transform: rotate(8deg); }
    30% { transform: rotate(-6deg); } 40% { transform: rotate(4deg); }
    50% { transform: rotate(0); }
}

/* 8 · Diabetes drop — falls in, sends out ripples when answered Yes */
.dm-drop { fill: rgba(34, 211, 238, .14); stroke: var(--cyan); stroke-width: 3.5; stroke-linejoin: round; }
.dm-ring { fill: none; stroke: var(--cyan); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.is-entering .c-dm .wz-visual svg { animation: wz-drip .9s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.c-dm input:checked + .wz-choice-body .dm-ring.r1 { animation: wz-ripple 1.8s ease-out infinite; }
.c-dm input:checked + .wz-choice-body .dm-ring.r2 { animation: wz-ripple 1.8s .9s ease-out infinite; }
.c-dm input:checked + .wz-choice-body .dm-drop { fill: rgba(34, 211, 238, .4); }

@keyframes wz-ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(2.1); opacity: 0; } }

/* 9 · Mental health — calm breathing core with soft waves */
.mh-core { fill: rgba(167, 139, 250, .25); stroke: var(--primary-light); stroke-width: 3; transform-box: fill-box; transform-origin: center; transition: fill .4s ease; }
.mh-wave { fill: none; stroke: var(--primary-light); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.is-active .mh-core { animation: wz-breathe 4.5s ease-in-out infinite; }
.is-active .mh-wave.w1 { animation: wz-ripple 4.5s ease-out infinite; }
.is-active .mh-wave.w2 { animation: wz-ripple 4.5s 1.5s ease-out infinite; }
.is-active .mh-wave.w3 { animation: wz-ripple 4.5s 3s ease-out infinite; }
.is-entering .c-mh .wz-visual svg { animation: wz-bloom .9s cubic-bezier(.16, 1, .3, 1) backwards; }
.c-mh input:checked + .wz-choice-body .mh-core { fill: rgba(244, 114, 182, .4); stroke: #f472b6; }
.c-mh input:checked + .wz-choice-body .mh-wave { stroke: #f472b6; }

@keyframes wz-breathe { 0%, 100% { transform: scale(.88); } 50% { transform: scale(1.15); } }
@keyframes wz-bloom   { from { transform: scale(.2) rotate(-90deg); opacity: 0; } }

/* =========================================================
   10 · REVIEW
   ========================================================= */
.wz-review-title { margin-bottom: 14px; font-size: 15px; }

.wz-review {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-width: 440px;
}

.wz-chip {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 12px;
    background: rgba(2, 6, 23, .4);
    color: var(--muted);
    font: inherit;
    font-size: 11.5px;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .15s ease;
}
.wz-chip:hover { border-color: rgba(167, 139, 250, .4); background: rgba(139, 92, 246, .08); }
.wz-chip:active { transform: scale(.97); }
.wz-chip b { color: #f8fafc; font-size: 12.5px; white-space: nowrap; }
.wz-chip.is-missing { border-color: rgba(251, 113, 133, .45); }
.wz-chip.is-missing b { color: var(--danger); }

.wz-step[data-step="review"] .predict-button { max-width: 440px; margin-top: 18px; }
.is-entering .wz-chip { animation: wz-fade-up .45s cubic-bezier(.16, 1, .3, 1) backwards; animation-delay: calc(var(--i, 0) * 40ms); }

/* =========================================================
   Navigation
   ========================================================= */
.wz-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.wz-btn {
    height: 46px;
    min-width: 96px;
    padding: 0 18px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 13px;
    background: rgba(255, 255, 255, .03);
    color: #e2e8f0;
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
    transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.wz-btn:hover { background: rgba(255, 255, 255, .07); }
.wz-btn:active { transform: scale(.96); }
.wz-btn:focus-visible,
.wz-step-btn:focus-visible,
.wz-chip:focus-visible,
.wz-dot:focus-visible { outline: 2px solid var(--primary-light); outline-offset: 2px; }

.wz-next {
    border: 0;
    background: linear-gradient(100deg, #7c3aed, #8b5cf6 60%, #6d6af0);
    color: #fff;
    box-shadow: 0 10px 26px rgba(124, 58, 237, .25);
}
.wz-next:hover { background: linear-gradient(100deg, #7c3aed, #8b5cf6 60%, #6d6af0); box-shadow: 0 14px 32px rgba(124, 58, 237, .35); }

.wz-dots { display: flex; align-items: center; justify-content: center; }
.wz-dot {
    position: relative;
    width: 16px; height: 28px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    touch-action: manipulation;
}
.wz-dot::before {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    width: 7px; height: 7px;
    border-radius: 7px;
    background: rgba(148, 163, 184, .25);
    transform: translate(-50%, -50%);
    transition: width .35s cubic-bezier(.16, 1, .3, 1), background .3s ease;
}
.wz-dot.is-done::before { background: rgba(52, 211, 153, .75); }
.wz-dot.is-active { width: 28px; }
.wz-dot.is-active::before { width: 22px; background: var(--primary-light); }

.wz-tip {
    margin-top: 12px;
    color: #475569;
    font-size: 10.5px;
    text-align: center;
}
.tip-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
    .tip-desktop { display: none; }
    .tip-touch { display: inline; }
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 700px) {
    .wz-stage { min-height: 400px; margin: 6px -10px 0; padding: 8px 10px; }

    .wz-visual { width: 130px; height: 100px; }
    .v-heart svg, .v-sys svg { width: 150px; }
    .v-age svg, .v-dia svg, .v-bs svg { width: 100px; }
    .wz-choice .wz-visual { width: 112px; height: 90px; }

    .wz-field { gap: 8px; }
    .wz-step-btn { width: 46px; height: 46px; }
    .wz-input-wrap input { height: 64px; font-size: 28px; }   /* ≥16px → no iOS zoom on focus */

    .wz-btn { min-width: 0; padding: 0 12px; }
    .wz-nav { gap: 6px; }
    .wz-dot { width: 11px; }
    .wz-dot.is-active { width: 22px; }
    .wz-dot.is-active::before { width: 16px; }
    .wz-review { gap: 6px; }
    .wz-chip { padding: 9px 10px; font-size: 11px; }
}

@media (max-width: 380px) {
    .wz-dot { width: 10px; }
    .wz-dot::before { width: 6px; height: 6px; }
}
