/* =========================================================================
   TRACE AI V2 - SUNLIT GLASS DESIGN SYSTEM
   ========================================================================= */

:root {
    /* Colors - Lighter Visual Treatment */
    --bg-base: #F8FAFC;
    /* Soft off-white */
    --bg-surface: #FFFFFF;
    /* Clean white */
    --bg-panel: rgba(255, 255, 255, 0.7);
    /* Sunlit glass */
    --bg-card: #FFFFFF;
    --border-subtle: rgba(15, 23, 42, 0.08);
    /* Faint tech strokes */
    --border-focus: rgba(14, 165, 233, 0.3);
    /* Cyan focus */

    --text-main: #0F172A;
    /* Deep navy */
    --text-muted: #64748B;
    /* Slate gray */

    --accent-cyan: #0EA5E9;
    --accent-cyan-glow: rgba(14, 165, 233, 0.15);
    --accent-teal: #0D9488;
    --accent-amber: #D97706;
    --accent-amber-glow: rgba(217, 119, 6, 0.15);
    --accent-red: #E11D48;
    --success-green: #10B981;

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing & Layout */
    --nav-height: 80px;
    --section-pad: 120px 5%;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;

    /* Motion */
    --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-med: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    --transition-snappy: 0.15s ease-out;
}

/* =========================================================================
   GLOBAL RESET & BASE
   ========================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    background-color: var(--bg-base);
    background-image:
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.font-display {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

.highlight-teal {
    color: var(--accent-teal);
}

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

/* Ambient Glow - Sunlit instead of Midnight */
.glow-bg {
    position: absolute;
    top: -20vh;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 80vh;
    background: radial-gradient(ellipse at center, rgba(13, 148, 136, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Typography Utilities */
.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    text-align: center;
    margin-bottom: 3.5rem;
    font-weight: 500;
    color: var(--text-main);
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-reveal {
    opacity: 0;
    animation: revealUp 0.8s forwards;
    animation-delay: 1.5s;
}

@keyframes revealUp {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-snappy);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--text-main);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.btn-primary:hover {
    background: #1E293B;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    border-color: var(--border-focus);
    background: #F8FAFC;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.secondary-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-med);
}

.secondary-link:hover {
    color: var(--accent-teal);
}

/* =========================================================================
   NAVBAR
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    transition: all var(--transition-med);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

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

.logo-mark {
    width: 24px;
    height: 24px;
    background: var(--text-main);
    border-radius: 4px;
    position: relative;
}

.logo-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transform: translateY(-50%);
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}

.nav-links {
    display: none;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-med);
}

.nav-links a:hover {
    color: var(--text-main);
}

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

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 500;
}

.lang-link {
    color: var(--text-muted);
    transition: color var(--transition-med);
}

.lang-link:hover {
    color: var(--text-main);
}

.lang-link.active {
    color: var(--text-main);
    font-weight: 700;
}

.lang-div {
    color: var(--border-subtle);
}

@media (min-width: 900px) {
    .nav-links {
        display: flex;
    }
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
    min-height: 90vh;
    padding: calc(var(--nav-height) + 4rem) 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-headline {
    font-size: clamp(3rem, 5.5vw, 4.8rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.hero-subhead {
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.micro-proof {
    font-size: 0.9rem;
    color: var(--text-muted);
    border-left: 2px solid var(--accent-teal);
    padding-left: 1rem;
    max-width: 450px;
    font-weight: 500;
}

/* Trace Console / UI Mock - Light theme */
.trace-console {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.1);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-3deg) rotateX(2deg);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.trace-console:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15);
}

.console-header {
    background: #F1F5F9;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red {
    background: #FF5F56;
}

.dot.yellow {
    background: #FFBD2E;
}

.dot.green {
    background: #27C93F;
}

.console-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

.console-body {
    padding: 2rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.user-query {
    color: var(--text-main);
    margin-bottom: 1.5rem;
    font-weight: 500;
    font-family: var(--font-body);
    font-size: 1rem;
}

.icon-query {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--text-main);
    color: #fff;
    text-align: center;
    border-radius: 50%;
    font-size: 14px;
    line-height: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--text-main);
    animation: typing 2.5s steps(40, end), blink-caret .75s step-end infinite;
    display: inline-block;
    vertical-align: bottom;
    max-width: 100%;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--text-main)
    }
}

.lineage-path {
    margin-left: 11px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: revealUp 1s forwards;
    animation-delay: 2.6s;
}

.path-step {
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.path-step .file-name {
    font-weight: 600;
    color: var(--text-main);
}

.path-step .range {
    background: #F1F5F9;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.7rem;
    border: 1px solid #E2E8F0;
}

.path-step.calc {
    color: var(--accent-teal);
    font-weight: 500;
    margin-top: 0.5rem;
}

.trace-line-vert rect,
.trace-line-vert line {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawLine 1s forwards;
    animation-delay: calc(2.8s + var(--delay, 0s));
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

.output-card {
    margin-top: 2rem;
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    font-family: var(--font-body);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.variance-summary {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.scenario-table {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.scenario-table .row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #F1F5F9;
}

.scenario-table .header {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 2px solid #E2E8F0;
}

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

.scenario-table .red {
    color: var(--accent-red);
    font-weight: 500;
}

.scenario-table .green {
    color: var(--success-green);
    font-weight: 500;
}

.confidence-band-mock {
    height: 24px;
    position: relative;
    margin-bottom: 1.5rem;
}

.band-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(13, 148, 136, 0.1), rgba(225, 29, 72, 0.1));
    border-radius: 4px;
}

.band-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    transform: translateY(-50%);
    border-right: 2px dashed var(--accent-red);
}

.sources-chip-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    padding: 4px 8px;
    background: var(--bg-surface);
    border: 1px solid #E2E8F0;
    border-radius: 4px;
    color: var(--text-muted);
    cursor: default;
}

/* =========================================================================
   HERO DEMO CAROUSEL & MICRO UI
   ========================================================================= */
.demo-carousel {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.demo-slides {
    display: grid;
    width: 100%;
}

.demo-slides .slide {
    grid-area: 1 / 1;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease-in-out, visibility 2s ease-in-out, transform var(--transition-slow), box-shadow var(--transition-slow);
    z-index: 1;
}

.demo-slides .slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Restart animations when slide becomes active */
.demo-slides .slide:not(.active) .typing-effect,
.demo-slides .slide:not(.active) .delay-reveal,
.demo-slides .slide:not(.active) .trace-line-vert rect,
.demo-slides .slide:not(.active) .trace-line-vert line,
.demo-slides .slide:not(.active) .lineage-path {
    animation: none;
    opacity: 0;
}

.demo-controls {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
    z-index: 10;
}

.demo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-subtle);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition-med);
}

.demo-dot:hover {
    background: var(--text-muted);
}

.demo-dot.active {
    background: var(--accent-teal);
    transform: scale(1.3);
}

/* Window 2: Driver Bars */
.driver-bars {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.driver-bars .d-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.driver-bars .lbl {
    width: 90px;
    color: var(--text-muted);
}

.driver-bars .val {
    width: 30px;
    text-align: right;
    font-weight: 500;
}

.d-bar-container {
    flex: 1;
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.d-bar {
    height: 100%;
    border-radius: 4px;
}

.d-bar.red {
    background: var(--accent-red);
}

.d-bar.amber {
    background: var(--accent-amber);
}

/* Window 3: Distribution */
.distribution-mock {
    width: 100%;
    height: 60px;
    margin: 1rem 0;
}

.distribution-mock svg {
    width: 100%;
    height: 100%;
}

/* Window 4: Watchlist */
.watchlist-mock-hero {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.watchlist-mock-hero .wl-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border: 1px solid #E2E8F0;
    border-radius: 4px;
}

.watchlist-mock-hero .wl-status.green {
    color: var(--success-green);
}

.watchlist-mock-hero .wl-status.red {
    color: var(--accent-red);
    font-weight: 600;
}

.alert-pulse {
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* =========================================================================
   FEATURES (WHAT YOU GET)
   ========================================================================= */
.features {
    padding: var(--section-pad);
    max-width: 1400px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.features-grid.expanded {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
    transition: all var(--transition-med);
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: #CBD5E1;
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

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

.artifact {
    height: 120px;
    background: #F8FAFC;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

.artifact.align-start {
    align-items: flex-start;
    justify-content: flex-start;
}

/* Micro UI Artifacts */
.chip-row {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.variance-mini {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bar-chart.light {
    height: 16px;
    background: #E2E8F0;
    border-radius: 2px;
    position: relative;
}

.bar-chart.light .bar {
    position: absolute;
    height: 100%;
    left: 0;
    top: 0;
}

.bar-chart.light .budget {
    background: var(--text-muted);
    z-index: 1;
}

.bar-chart.light .actual {
    height: 8px;
    top: 4px;
    background: var(--text-main);
    z-index: 2;
    border-right: 2px solid var(--accent-red);
    transition: width 1s ease;
}

.flag.alert {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent-red);
    font-weight: 500;
}

.workspace-mock,
.watch-list,
.sensitivity-bars {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-main);
}

.driver,
.kpi,
.bar-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    margin-bottom: 0.4rem;
    border-radius: 4px;
    align-items: center;
}

.driver .val {
    color: var(--accent-teal);
    font-weight: 600;
}

.kpi .red {
    color: var(--accent-red);
}

.kpi .green {
    color: var(--success-green);
}

.sensitivity-bars .s-bar {
    height: 6px;
    background: var(--text-muted);
    border-radius: 2px;
}

.sensitivity-bars .s-bar.teal {
    background: var(--accent-teal);
}

.monte-carlo-mock svg {
    width: 100%;
    height: 60px;
}

.trace-chips.light-mode {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.trace-chips .focused {
    background: #F0FDF4;
    border-color: var(--success-green);
    color: var(--success-green);
    font-weight: 600;
}

.audit-log.light code {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.audit-log.light code:last-child {
    color: var(--success-green);
    font-weight: 500;
}

/* =========================================================================
   PLATFORM SECTION (Horizontal Flow)
   ========================================================================= */
.platform-section {
    padding: 6rem 2rem;
    background: #FFFFFF;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.flow-stage {
    flex: 1;
    text-align: center;
    min-width: 200px;
}

.stage-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    width: 64px;
    height: 64px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.flow-stage h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
}

.flow-stage p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.flow-connector {
    flex: 0.5;
    position: relative;
    min-width: 50px;
    display: none;
}

.flow-connector .line {
    height: 2px;
    background: var(--border-subtle);
    width: 100%;
    position: relative;
}

.flow-connector .line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid var(--border-subtle);
}

@media (min-width: 900px) {
    .flow-diagram {
        flex-wrap: nowrap;
    }

    .flow-connector {
        display: block;
    }
}

/* =========================================================================
   USE CASES
   ========================================================================= */
.use-cases-section {
    padding: var(--section-pad);
    max-width: 1400px;
    margin: 0 auto;
}

.uc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .uc-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.uc-card {
    background: var(--bg-surface);
    padding: 3rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.uc-card.featured {
    grid-column: 1 / -1;
    background: #0F172A;
    color: #FFFFFF;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.3);
}

/* =========================================================================
   FEATURED WORKFLOW (Tabbed Component)
   ========================================================================= */
.workflow-panel {
    display: flex;
    flex-direction: column;
}

.workflow-header {
    margin-bottom: 2rem;
}

.workflow-header h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-bottom: 1rem;
    color: #fff;
}

.workflow-header p {
    color: #94A3B8;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    max-width: 800px;
    line-height: 1.6;
}

.workflow-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.w-tab {
    background: transparent;
    border: none;
    color: #94A3B8;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: var(--font-mono);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all var(--transition-med);
    border-radius: 4px;
}

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

.w-tab.active {
    color: var(--accent-cyan);
    background: rgba(14, 165, 233, 0.1);
}

.workflow-content-area {
    position: relative;
    display: grid;
    min-height: 180px;
}

.w-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

.w-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.w-slide-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.w-text {
    flex: 1;
    min-width: 300px;
}

.w-text h4 {
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

.w-text p {
    color: #94A3B8;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.w-visual {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

/* Feature Panel Dark Overrides */
.workflow-panel .chip {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #CBD5E1 !important;
}

.workflow-panel .driver,
.workflow-panel .kpi,
.workflow-panel .bar-row {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.workflow-panel .scenario-table .row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.workflow-panel .scenario-table .header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.uc-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 500;
}

.uc-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.uc-card.featured h3 {
    font-size: 2rem;
}

.uc-card p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.uc-card.featured p {
    color: #94A3B8;
    font-size: 1.1rem;
    max-width: 800px;
}

/* =========================================================================
   SECURITY & COMPLIANCE
   ========================================================================= */
.security-checklist-section {
    padding: 6rem 2rem;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
}

.sec-container {
    max-width: 1200px;
    margin: 0 auto;
}

.sec-header {
    margin-bottom: 4rem;
}

.sec-header h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-main);
}

.sec-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.check-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.check-icon {
    display: block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #E0F2FE;
    color: var(--accent-cyan);
    border-radius: 50%;
    font-weight: bold;
    flex-shrink: 0;
}

.check-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.check-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.traceability-block {
    background: #FFFFFF;
    padding: 1.5rem;
    border: 1px solid #CBD5E1;
    border-radius: var(--radius-sm);
    grid-column: 1 / -1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.traceability-block .check-icon {
    background: #F0FDF4;
    color: var(--success-green);
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 1.2rem;
}

/* =========================================================================
   SIGNATURE INTERACTION (Sticky Scroll)
   ========================================================================= */
.sticky-interaction-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.interaction-header {
    text-align: center;
    margin-bottom: 4rem;
}

.interaction-header h2 {
    font-size: clamp(2.2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.sticky-scroll-tracker {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    position: relative;
}

/* On desktop, we can simulate a sticky stack. For simplicity in plain CSS, a clean vertical list with alternating layouts is robust and elegant */
.scroll-step {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    padding: 3rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: opacity 0.5s;
}

@media (min-width: 900px) {
    .scroll-step {
        flex-direction: row;
        justify-content: space-between;
    }

    .scroll-step:nth-child(even) {
        flex-direction: row-reverse;
    }

    .step-text,
    .step-visual {
        flex: 1;
    }
}

.step-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.step-text p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.step-visual {
    width: 100%;
    height: 200px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Visual placeholders */
.chat-bubble {
    background: #0F172A;
    color: #FFF;
    padding: 1rem 1.5rem;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    font-family: var(--font-body);
}

.chip-cascade {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chip-cascade .chip {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    background: #FFF;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.model-tree {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--accent-teal);
}

.sim-spread {
    width: 80%;
    height: 100px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(13, 148, 136, 0.1));
    border-top: 2px dashed var(--accent-teal);
    border-bottom: 2px dashed var(--accent-amber);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sim-spread::after {
    content: 'Variance Spectrum';
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.export-box {
    border: 2px solid var(--text-main);
    padding: 1rem 2rem;
    font-family: var(--font-mono);
    font-weight: 600;
    background: #FFF;
}

/* =========================================================================
   PRICING
   ========================================================================= */
.pricing {
    padding: var(--section-pad);
    max-width: 1400px;
    margin: 0 auto;
}

.pricing-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.success-bullets {
    margin-top: 1.5rem;
    text-align: left;
    background: #F8FAFC;
    padding: 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent-teal);
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.price-tier {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.price-tier.highlight-tier {
    border: 2px solid var(--text-main);
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1);
    transform: translateY(-10px);
}

.tier-tag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: #FFF;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.price-tier h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.tier-scope {
    color: var(--accent-teal);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E2E8F0;
}

.tier-features {
    list-style: none;
    margin-bottom: 3rem;
    flex: 1;
}

.tier-features li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.tier-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--text-main);
    font-weight: bold;
}

.tier-cta {
    width: 100%;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background: #0F172A;
    color: #FFFFFF;
    padding: 4rem 2rem 2rem;
    font-family: var(--font-body);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4rem;
}

.footer-brand .logo-mark {
    background: transparent;
    border: 2px solid #FFF;
}

.footer-brand p {
    color: #94A3B8;
    margin-top: 1rem;
    max-width: 300px;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #CBD5E1;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #FFF;
}

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    text-align: center;
    color: #64748B;
    font-size: 0.85rem;
}

/* =========================================================================
   LEGAL PAGES
   ========================================================================= */
.legal-page .glow-bg {
    top: -8vh;
    width: min(1100px, 85vw);
    height: 60vh;
}

.legal-main {
    padding: calc(var(--nav-height) + 4rem) 5% 6rem;
}

.legal-shell {
    max-width: 960px;
    margin: 0 auto;
}

.legal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--accent-teal);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.legal-shell h1 {
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-weight: 400;
    margin: 1.25rem 0 1rem;
}

.legal-summary {
    max-width: 760px;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.legal-card {
    padding: clamp(1.5rem, 3vw, 3rem);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(14px);
}

.legal-section + .legal-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.legal-section h2 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    margin-bottom: 0.9rem;
    color: var(--text-muted);
}

.legal-list {
    margin: 0.75rem 0 0 1.25rem;
    color: var(--text-muted);
}

.legal-list li {
    margin-bottom: 0.55rem;
}

.legal-note {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-left: 3px solid var(--accent-teal);
    background: rgba(13, 148, 136, 0.08);
    border-radius: var(--radius-sm);
    color: var(--text-main);
}

.nav-links a[aria-current="page"] {
    color: var(--text-main);
}

.legal-footer .footer-content {
    padding-bottom: 2.5rem;
}

@media (max-width: 720px) {
    .legal-main {
        padding: calc(var(--nav-height) + 2rem) 1rem 4rem;
    }

    .legal-meta {
        flex-direction: column;
        gap: 0.35rem;
    }

    .legal-card {
        padding: 1.5rem 1.2rem;
        border-radius: 20px;
    }
}
