/* 
   INFINITY CLINICS 2026: THE SCANNER ENGINE (V12 - RADIAL HARMONY)
   Atmosphere: Concentric Tech Layers (Aligned with the Core)
*/

:root {
    --void-950: #030308;
    --void-900: #080812;
    --void-800: #101020;
    --neon-primary: #a855f7; /* Vivid Purple */
    --neon-primary-glow: rgba(168, 85, 247, 0.4);
    --neon-secondary: #ec4899; /* Pink/Magenta Accent */
    --neon-secondary-glow: rgba(236, 72, 153, 0.4);
    --neon-accent: #6366f1; /* Indigo for contrast */
    --text-100: #ffffff;
    --text-200: #cbd5e1;
    --text-300: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-surface: rgba(255, 255, 255, 0.02);
    --glass-blur: blur(30px);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-display: 'Unbounded', system-ui;
    --font-sans: 'Plus Jakarta Sans', system-ui;
    --font-mono: 'Space Mono', monospace;
    --panel-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(168, 85, 247, 0.05);
}

/* --- ENTRANCE LOADING --- */
.clinics-page.is-loading {
    overflow: hidden;
}

.clinics-page.is-loading main {
    opacity: 0;
}

/* --- ATMOSPHERIC LAYERING --- */
.system-atmosphere {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 40%, #151030 0%, var(--void-950) 100%);
    overflow: hidden;
    pointer-events: none;
}

.system-atmosphere::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.06;
    mix-blend-mode: overlay;
    z-index: 2;
}

.scanline-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(168, 85, 247, 0.02) 50%);
    background-size: 100% 4px;
    z-index: 100;
    pointer-events: none;
    opacity: 0.4;
}

.system-atmosphere::after {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    width: 200vw;
    height: 200vw;
    transform: translate(-50%, -50%);
    background-image:
        radial-gradient(rgba(168, 85, 247, 0.06) 1px, transparent 1px),
        radial-gradient(rgba(236, 72, 153, 0.04) 1px, transparent 1px);
    background-size: 80px 80px, 30px 30px;
    background-position: center center;
    mask-image: radial-gradient(circle at center, black 10%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 10%, transparent 80%);
    animation: radial-drift 120s linear infinite;
}

@keyframes radial-drift {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.system-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    z-index: -1;
    animation: orb-float 20s infinite alternate ease-in-out;
}

.orb-primary {
    width: 40vw; height: 40vw;
    background: var(--neon-primary);
    top: -10%; left: -10%;
}

.orb-purple {
    width: 35vw; height: 35vw;
    background: var(--neon-secondary);
    bottom: -5%; right: -5%;
    animation-delay: -5s;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

/* --- CORE ELEMENTS --- */
.mouse-glow {
    position: fixed;
    top: 0; left: 0;
    width: clamp(500px, 50vw, 900px);
    aspect-ratio: 1/1;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.ultra-menu-wrapper {
    position: fixed;
    top: 30px;
    right: clamp(1.5rem, 5vw, 4rem);
    z-index: 2000;
    display: flex;
    align-items: center;
}

.ultra-toggle {
    background: rgba(13, 13, 26, 0.9);
    border: 1px solid var(--glass-border);
    width: 54px; height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s var(--ease-spring);
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    margin-left: 15px;
}

.u-icon {
    position: relative;
    width: 22px; height: 12px;
}

.u-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: #fff;
    transition: all 0.4s var(--ease-spring);
}

.l-1 { top: 0; }
.l-2 { bottom: 0; width: 70%; right: 0; left: auto; }

.ultra-menu-wrapper.is-open .l-1 { transform: translateY(5px) rotate(45deg); }
.ultra-menu-wrapper.is-open .l-2 { transform: translateY(-5.5px) rotate(-45deg); width: 100%; }

.ultra-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 13, 26, 0.7);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    padding: 8px 16px;
    border-radius: 100px;
    transform: translateX(40px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s var(--ease-out-expo);
}

.ultra-menu-wrapper.is-open .ultra-nav {
    transform: translateX(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.ultra-link {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-200);
    text-transform: uppercase;
    padding: 10px 20px;
    border-radius: 100px;
    transition: 0.3s;
}

.ultra-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.ultra-link.cta {
    background: var(--neon-primary);
    color: var(--void-950);
    font-weight: 800;
    margin-left: 8px;
}

/* --- HERO CORE --- */
.clinic-hero-v2 {
    padding: clamp(120px, 20vh, 180px) 0 80px;
    text-align: center;
    perspective: 3000px;
    contain: layout paint;
}

.hero-visual-center {
    display: flex;
    justify-content: center;
    transform-style: preserve-3d;
    contain: layout paint;
}

.holo-core {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 460px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.1) 0%, transparent 75%);
    transition: transform 0.8s var(--ease-out-expo);
    transform-style: preserve-3d;
    box-shadow: 0 0 80px rgba(168, 85, 247, 0.12);
    contain: layout paint;
    isolation: isolate;
}

.holo-core.is-motion-paused .holo-ring.outer,
.holo-core.is-motion-paused .holo-ring.mid,
.holo-core.is-motion-paused .holo-base-logo,
.holo-core.is-motion-paused .holo-scanline {
    animation-play-state: paused;
}

.holo-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate3d(-50%, -50%, 0);
    pointer-events: none;
    backface-visibility: hidden;
}

.holo-ring.outer {
    width: 100%; height: 100%;
    border: 1px solid rgba(168, 85, 247, 0.2);
    background: conic-gradient(from 0deg, transparent 60%, rgba(168, 85, 247, 0.3) 90%, var(--neon-primary) 100%);
    mask-image: radial-gradient(circle, transparent 69%, black 70%);
    -webkit-mask-image: radial-gradient(circle, transparent 69%, black 70%);
    animation: spin-slow 18s linear infinite;
    will-change: transform;
}

.holo-ring.mid {
    width: 82%; height: 82%;
    border: 1px solid rgba(236, 72, 153, 0.2);
    box-shadow: inset 0 0 30px rgba(236, 72, 153, 0.1);
    animation: spin-slow-reverse 28s linear infinite;
    will-change: transform;
}

.holo-scanline {
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 335deg, rgba(236, 72, 153, 0.6) 350deg, #fff 360deg);
    top: 0; left: 0;
    mask-image: radial-gradient(circle, transparent 35%, black 75%);
    -webkit-mask-image: radial-gradient(circle, transparent 35%, black 75%);
    z-index: 10;
    filter: drop-shadow(0 0 15px var(--neon-secondary)) brightness(1.3);
    pointer-events: none;
    /* Fix for rotational pixelation */
    outline: 1px solid transparent;
    transform: rotate(0deg);
    transform-origin: center center;
    animation: holo-scan-spin 8s linear infinite;
    will-change: transform;
    backface-visibility: hidden;
}

.holo-base-logo {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) translateZ(-40px);
    width: 185px;
    z-index: 0;
    animation: holo-breathe 8s infinite alternate ease-in-out;
    will-change: transform, opacity;
}

.holo-base-logo img {
    width: 100%; height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 40px var(--neon-primary-glow)) hue-rotate(90deg);
}

.quantum-nodes,
.neural-links {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
    contain: layout paint;
}

.holo-core.is-motion-paused .q-node,
.holo-core.is-motion-paused .holo-scanline {
    will-change: auto;
}

@keyframes holo-breathe {
    0% { transform: translate(-50%, -50%) translateZ(-40px) scale(0.96); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) translateZ(-20px) scale(1.03); opacity: 1; }
}

@keyframes holo-scan-spin {
    100% { transform: rotate(360deg); }
}

.q-node {
    position: absolute;
    left: var(--x); top: var(--y);
    transform: translate3d(-50%, -50%, 0) scale(calc(0.68 + 0.78 * var(--reveal-op, 0)));
    opacity: calc(var(--reveal-op, 0) * 0.78);
    font-size: 1.42rem;
    color: #fff;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.q-node.is-glowing {
    text-shadow: 0 0 14px rgba(168, 85, 247, 0.75);
}

.synapse-link {
    position: absolute;
    top: 50%; left: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), rgba(255, 255, 255, 0.4));
    transform-origin: left center;
    opacity: 0;
    width: var(--distance);
    transform: rotate(var(--angle));
    box-shadow: 0 0 3px rgba(168, 85, 247, 0.2);
    z-index: 5;
    will-change: transform, opacity;
}

.synapse-link.pulse { animation: synapse-flash 0.4s forwards; }

@keyframes synapse-flash {
    0% { opacity: 0; transform: rotate(var(--angle)) scaleX(0); }
    30% { opacity: 0.5; transform: rotate(var(--angle)) scaleX(1); }
    100% { opacity: 0; transform: rotate(var(--angle)) scaleX(1.02); }
}

/* --- BENTO HUD TERMINAL V5 (SYMMETRIC EDITION) --- */
.terminal-section-v3 {
    padding: 40px 0 60px; /* Further reduced bottom padding */
    position: relative;
    z-index: 2;
}

.bento-hud-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1440px;
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .bento-hud-layout {
        grid-template-columns: 320px 1fr;
        align-items: stretch;
        gap: 30px;
    }
}

.hud-sidebar {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    backdrop-filter: var(--glass-blur);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    box-shadow: var(--panel-shadow);
}

.pulse-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--neon-primary);
    box-shadow: 0 0 12px var(--neon-primary);
    animation: pulse-blink 2s infinite;
}

.symptom-grid-v3 {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex-grow: 1;
}

.symptom-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    padding: 22px 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.5s var(--ease-spring);
    color: var(--text-300);
    overflow: hidden;
    text-align: left;
}

.symptom-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--glass-border);
    transform: translateX(10px);
}

.symptom-card.is-active {
    background: rgba(168, 85, 247, 0.12);
    border-color: var(--neon-primary);
    color: #fff;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(168, 85, 247, 0.15);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
    transition: color 0.3s;
}

.card-tagline {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-300);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    transition: color 0.3s;
}

.symptom-card.is-active .card-tagline {
    color: var(--neon-primary);
    opacity: 1;
}

/* Main HUD Display - RE-WEIGHTED */
.bento-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: minmax(280px, auto) 1fr;
    gap: 24px;
    height: 100%;
    min-height: 650px;
    contain: layout paint;
}

.bento-cell {
    background: var(--glass-surface);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    backdrop-filter: var(--glass-blur);
    position: relative;
    overflow: hidden;
    transition: all 0.6s var(--ease-out-expo);
    box-shadow: var(--panel-shadow);
    display: flex;
    flex-direction: column;
}

.bento-cell::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 50px; height: 50px;
    border-top: 2px solid var(--neon-primary);
    border-left: 2px solid var(--neon-primary);
    border-radius: 32px 0 0 0;
    opacity: 0.2;
}

.cell-header { grid-column: span 2; padding: 50px; justify-content: center; }
.cell-symptoms { grid-column: span 1; padding: 45px; }
.cell-protocol { grid-column: span 1; padding: 45px; }

.status-badge {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--neon-primary);
    padding: 8px 20px;
    border-radius: 100px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    margin-bottom: 20px;
}

.readout-title-v3 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: -0.05em;
    line-height: 1;
}

.readout-slogan-v3 {
    font-size: 1.2rem;
    max-width: 80%;
    color: var(--text-200);
}

.root-cause-box {
    margin-top: 40px;
    padding: 25px 30px;
    background: rgba(168, 85, 247, 0.04);
    border-left: 5px solid var(--neon-primary);
    border-radius: 0 24px 24px 0;
}

.root-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
}

.cell-label-v3 {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 25px;
    color: var(--text-300);
    text-transform: uppercase;
}

.symptom-list-v3 { 
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px; 
}

.symptom-list-v3 li { 
    position: relative;
    padding-left: 28px;
    font-size: 1.1rem; 
    line-height: 1.4; 
    color: var(--text-100);
    font-family: var(--font-sans);
    font-weight: 500;
}

.symptom-list-v3 li::before {
    content: '\eb71';
    font-family: 'remixicon';
    position: absolute;
    left: 0; top: 2px;
    color: var(--neon-secondary);
    font-size: 1.2rem;
}

.protocol-desc {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

/* --- CTA SECTION V5 (THE EMPIRE MONOLITH) --- */
.cta-section-v2 {
    padding: 60px 0 100px; /* Compressed padding */
    position: relative;
    perspective: 2000px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 640px;
}

.vision-card {
    background: 
        radial-gradient(circle at 20% 30%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 80px;
    padding: 80px 60px; /* Reduced internal padding */
    text-align: center;
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(168, 85, 247, 0.05);
}

.vision-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(168, 85, 247, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(168, 85, 247, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    opacity: 0.3;
    pointer-events: none;
}

.h2-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8.5rem);
    color: #fff;
    line-height: 0.85;
    font-weight: 900;
    margin-bottom: 2rem;
    letter-spacing: -0.06em;
    text-transform: uppercase;
}

.h2-title .outline {
    display: block;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.2);
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.3));
    margin-top: 10px;
}

.vision-card p {
    font-family: var(--font-sans);
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    color: var(--text-200);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.4;
    font-weight: 500;
    opacity: 0.9;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    color: var(--void-950);
    padding: 20px 48px;
    border-radius: 100px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.5s var(--ease-spring);
}

.nav-cta:hover {
    transform: scale(1.02) translateY(-3px);
    background: var(--neon-primary);
    color: #fff;
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.3), 0 0 15px var(--neon-primary-glow);
}

@media (max-width: 992px) {
    .bento-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .cell-header, .cell-symptoms, .cell-protocol { grid-column: span 1; padding: 40px 30px; }
}

@media (max-width: 768px) {
    :root {
        --glass-blur: blur(18px);
        --panel-shadow: 0 16px 38px -10px rgba(0, 0, 0, 0.46), 0 0 14px rgba(168, 85, 247, 0.04);
    }

    .cta-section-v2 { padding: 60px 0 80px; }
    .vision-card { padding: 60px 30px; border-radius: 50px; }
    .h2-title { font-size: 3.5rem; }
    .nav-cta { width: 100%; justify-content: center; padding: 20px 40px; }

    .holo-core {
        box-shadow: 0 0 56px rgba(168, 85, 247, 0.1);
    }

    .holo-ring.mid {
        box-shadow: inset 0 0 22px rgba(236, 72, 153, 0.08);
    }

    .holo-scanline {
        filter: drop-shadow(0 0 10px var(--neon-secondary)) brightness(1.22);
    }

    .holo-base-logo img {
        filter: drop-shadow(0 0 26px var(--neon-primary-glow)) hue-rotate(90deg);
    }

    .synapse-link {
        box-shadow: 0 0 2px rgba(168, 85, 247, 0.16);
    }

    .vision-card {
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        box-shadow: 0 34px 72px -20px rgba(0, 0, 0, 0.42), 0 0 52px rgba(168, 85, 247, 0.04);
    }

    .h2-title .outline {
        filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.24));
    }
}

/* --- UTILS & MOTION --- */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1.2s var(--ease-out-expo), transform 1.2s var(--ease-out-expo);
    will-change: transform, opacity;
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes spin-slow { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes spin-slow-reverse { 100% { transform: translate(-50%, -50%) rotate(-360deg); } }

.mt-auto { margin-top: auto; }

/* Site Footer - Tightened */
.site-footer { 
    padding: 60px 0 40px; 
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.f-logo-img {
    width: 180px;
    margin-bottom: 25px; /* Reduced margin */
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 0.2));
    transition: 0.5s;
}

.f-nav { 
    display: flex; 
    justify-content: center; 
    gap: 40px; 
    margin-bottom: 30px; /* Reduced margin */
}

.f-nav a { 
    font-family: var(--font-mono); 
    font-size: 0.75rem; 
    color: var(--text-300); 
    text-transform: uppercase; 
    letter-spacing: 0.1em;
    transition: 0.3s;
}

.f-nav a:hover { color: var(--neon-primary); }

.f-legal { 
    font-family: var(--font-mono); 
    font-size: 0.65rem; 
    opacity: 0.4; 
    letter-spacing: 0.2em;
}
