:root {
    /* Color Palette - V1 Dark premium */
    --bg-dark: #0a0b10;
    --bg-darker: #050508;
    --primary-blue: #0070f3;
    --primary-blue-glow: rgba(0, 112, 243, 0.4);
    --accent-cyan: #00e5ff;
    --accent-cyan-glow: rgba(0, 229, 255, 0.4);

    --text-main: #f8f9fa;
    --text-muted: #a0aab2;

    --glass-bg: rgba(20, 22, 30, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.03);

    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-cyan) 0%, var(--primary-blue) 100%);
    --gradient-surface: linear-gradient(180deg, rgba(30, 34, 45, 0.7) 0%, rgba(15, 17, 23, 0.8) 100%);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout */
    --max-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-md: 24px;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Background Effects from V1 */
.noise-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 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.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
    opacity: 0.02;
    z-index: -1;
    pointer-events: none;
}

.glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -2;
    opacity: 0.15;
    animation: drift 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
}

.glow-1 {
    top: -10%;
    left: -10%;
    background: var(--primary-blue);
}

.glow-2 {
    bottom: 20%;
    right: -10%;
    background: var(--accent-cyan);
    animation-delay: -10s;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(100px, 100px) scale(1.1);
    }
}

/* Background Video Styles */
.video-bg-container {
    position: relative;
    overflow: hidden;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.6;
    /* Adjust opacity as needed for dark theme */
}

/* Specific opacity adjustments for bright videos */
.hero-video {
    opacity: 0.4;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(10, 11, 16, 0.4) 0%, rgba(10, 11, 16, 0.8) 100%);
    z-index: 1;
}

.video-overlay.dense {
    background: rgba(10, 11, 16, 0.7);
}

.z-index-top {
    position: relative;
    z-index: 2;
}

/* Typography Utilities Override & Normalization */
h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.3;
}

/* Override V2 hardcoded color classes to fit Dark theme */
.bg-light,
.bg-slate,
.bg-navy,
.bg-navy-light,
.bg-blue-light,
.bg-medical-blue,
.bg-white {
    background-color: transparent !important;
}

.text-navy,
.text-medical-blue,
.text-slate,
.text-white {
    color: var(--text-main) !important;
}

.text-muted {
    color: var(--text-muted);
}

.text-light-blue {
    color: var(--accent-cyan);
}

.font-weight-bold {
    font-weight: 700;
}

.mx-bold {
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* Layout Classes */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.dual-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

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

.vertical-center {
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mt-5 {
    margin-top: 3rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mx-auto {
    margin-right: auto;
    margin-left: auto;
}

/* Navigation V1 style mapped to V2 classes */
.clinical-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(10, 11, 16, 0.6);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.clinical-nav.scrolled {
    padding: 0.75rem 0;
    background: rgba(10, 11, 16, 0.85);
}

.clinical-nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.brand-text {
    font-family: var(--font-heading);
    font-family: 'Michroma', sans-serif;
    font-weight: 400;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Language Toggle */
.lang-toggle {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    padding: 0;
    font-family: var(--font-body);
}

.lang-btn.active {
    color: var(--accent-cyan);
}

.lang-divider {
    color: var(--glass-border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #000;
    box-shadow: 0 0 20px var(--primary-blue-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-cyan-glow);
    filter: brightness(1.1);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.w-100 {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.investigational-badge {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 8rem;
    /* Account for fixed nav */
    padding-bottom: 4rem;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
    line-height: 1.6;
}

.main-hero-title {
    font-family: 'Michroma', sans-serif;
    font-size: 5rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.main-hero-subtitle-1 {
    font-size: 2rem;
    color: var(--accent-cyan);
    font-weight: 400;
}

.main-hero-subtitle-2 {
    font-size: 1.25rem;
    font-weight: 300;
}

.overview-title-1 {
    font-family: 'Michroma', sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    text-align: center;
}

.overview-title-2 {
    font-size: 2rem;
    color: var(--accent-cyan);
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-align: center;
}

.overview-title-3 {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--text-muted);
    text-align: center;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.precise-border {
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-md);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    padding: 1rem;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.precise-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, var(--glass-highlight) 0%, transparent 100%);
    pointer-events: none;
}

.arrieta-3d-clean {
    width: 100%;
    height: 500px;
    --poster-color: transparent;
}

/* Typography elements */
.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.subsection-title {
    font-size: 1.5rem;
    color: var(--text-main);
    border-bottom: 2px solid var(--glass-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.section-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 800px;
}

.lead-text {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.clinical-list {
    list-style: none;
}

.clinical-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.clean-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: var(--text-muted);
}

.icon-slate,
.icon-navy {
    color: var(--accent-cyan) !important;
    width: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.icon-green {
    color: #34c759 !important;
    width: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.icon-medical {
    color: var(--primary-blue) !important;
    width: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* V1 Glass Panels mapped to V2 elements */
.tech-card,
.indication-card,
.diagram-box,
.workflow-stepper,
.border-box,
.media-kit-box,
.contact-form-box {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--border-radius-md);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.tech-card::before,
.indication-card::before,
.diagram-box::before,
.workflow-stepper::before,
.border-box::before,
.media-kit-box::before,
.contact-form-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, var(--glass-highlight) 0%, transparent 100%);
    pointer-events: none;
}

.tech-card {
    transition: transform 0.3s ease, background 0.3s ease;
}

.tech-card:hover {
    transform: translateY(-5px);
    background: var(--gradient-surface);
    border-color: rgba(0, 229, 255, 0.3);
}

.tech-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 112, 243, 0.1);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 229, 255, 0.2);
    margin-bottom: 1.5rem;
}

.tech-card h4 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.tech-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.indication-card {
    padding: 0;
}

.card-header {
    background: rgba(0, 0, 0, 0.4) !important;
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--accent-cyan) !important;
}

.card-body {
    padding: 2rem;
}

/* Workflow Stepper in Dark Theme */
.workflow-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 200px;
    z-index: 2;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #000;
    box-shadow: 0 0 15px var(--accent-cyan-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.step-text {
    font-size: 0.95rem;
    color: var(--text-main);
}

.step-line {
    flex-grow: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan-glow), transparent);
    margin: 0 1rem;
    transform: translateY(-30px);
}

/* Clinical Table in Dark Theme */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.clinical-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.clinical-table th,
.clinical-table td {
    padding: 1.5rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.clinical-table th {
    background: rgba(0, 0, 0, 0.4);
    font-family: var(--font-heading);
    color: var(--accent-cyan) !important;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.clinical-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.bg-blue-light {
    background: rgba(0, 112, 243, 0.1) !important;
    /* give the right column a bit of highlight */
}

/* Callouts */
.disclaimer-callout {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-left: 3px solid var(--accent-cyan);
    border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
    margin-top: 1rem;
}

/* Resources Box */
.resource-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s, border-color 0.3s;
}

.resource-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.resource-item.disabled {
    background: rgba(0, 0, 0, 0.4);
    color: var(--text-muted);
}

.resource-item.disabled svg {
    color: var(--text-muted);
}

.resource-item small {
    color: var(--accent-cyan);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
    background: rgba(0, 0, 0, 0.5);
}

.dual-input {
    display: flex;
    gap: 1.5rem;
}

.flex-1 {
    flex: 1;
}

.form-control option {
    background-color: var(--bg-dark);
    color: var(--text-main);
}

/* Footer */
.clinical-footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-darker);
    position: relative;
    overflow: hidden;
}

/* Visual SVG overrides */
.svg-light-theme {
    background-color: transparent !important;
    /* override the manual light bg injected */
    border-color: var(--glass-border) !important;
}

/* Animations */
/* V1 animations */
.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .container {
        padding: 0 1.5rem;
    }

    .dual-col {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    .nav-links {
        display: none;
    }

    .clinical-nav .nav-container {
        padding: 0 1rem;
    }

    /* Hide text on very small screens to leave room for CTA and Lang */
    .brand-text {
        display: none;
    }

    .workflow-stepper {
        flex-direction: column;
        gap: 2rem;
    }

    .step-line {
        height: 40px;
        width: 2px;
        margin: 0;
        transform: none;
        background: linear-gradient(180deg, transparent, var(--accent-cyan-glow), transparent);
    }

    .dual-input {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero {
        padding-top: 6rem;
        text-align: center;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-subtitle {
        margin: 0 auto 2rem;
        font-size: 1.1rem;
    }

    .main-hero-title {
        font-size: 2.5rem;
    }

    .main-hero-subtitle-1 {
        font-size: 1.25rem;
    }

    .main-hero-subtitle-2 {
        font-size: 0.95rem;
    }

    .overview-title-1 {
        font-size: 2rem;
    }

    .overview-title-2 {
        font-size: 1.25rem;
    }

    .overview-title-3 {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .arrieta-3d-clean {
        height: 350px;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .tech-card,
    .indication-card,
    .diagram-box,
    .border-box,
    .media-kit-box,
    .contact-form-box {
        padding: 1.5rem;
    }
}