/* ========================================
   DATA X SYSTEM - Brutalist Professional Theme v4.0
   Squared, Bold, Techy, Award-Winning UI/UX
======================================== */

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

:root {
    /* Brand Colors - From Logo */
    --green: #22c55e;
    --green-dark: #16a34a;
    --green-light: #86efac;
    --green-glow: rgba(34, 197, 94, 0.4);
    --green-bg: rgba(34, 197, 94, 0.12);

    /* Neutrals - High Contrast */
    --black: #000000;
    --dark: #0f172a;
    --grey: #475569;
    --light-grey: #cbd5e1;
    --border: #000000;
    --bg-grey: #f1f5f9;
    --bg-light: #ffffff;
    --white: #ffffff;

    /* Typography - Bold & Techy */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing (Mobile-first) */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Brutalist Effects - SQUARED & BOLD */
    --radius: 0px;
    /* SQUARED */
    --radius-sm: 0px;
    --radius-lg: 0px;
    --border-width: 3px;
    /* BOLD BORDERS */
    --border-width-lg: 4px;
    --shadow: 8px 8px 0px 0px rgba(0, 0, 0, 0.15);
    /* HARD SHADOW */
    --shadow-lg: 12px 12px 0px 0px rgba(0, 0, 0, 0.2);
    --shadow-xl: 16px 16px 0px 0px rgba(0, 0, 0, 0.25);
    --shadow-green: 8px 8px 0px 0px rgba(34, 197, 94, 0.3);
    --shadow-offset: 8px;
    /* Shadow offset for brutalist effect */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.1s ease;
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE STYLES (Mobile-First)
======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--grey);
    background: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html {
    scroll-behavior: smooth;
}

/* Selection */
::selection {
    background: var(--green);
    color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    /* BOLDER */
    color: var(--black);
    line-height: 1.1;
    /* TIGHTER */
    margin-bottom: var(--space-sm);
    letter-spacing: -0.03em;
    /* TIGHTER TRACKING */
    text-transform: uppercase;
    /* BRUTALIST UPPERCASE */
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
}

h4 {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
}

p {
    margin-bottom: var(--space-sm);
}

strong {
    color: var(--black);
    font-weight: 600;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--green-dark);
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

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

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

/* ========================================
   HEADER - BRUTALIST CONTAINED
======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    border-bottom: var(--border-width) solid var(--black);
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Header container with max-width */
.site-header>.container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 768px) {
    .site-header>.container {
        height: 64px;
        padding: 0 var(--space-lg);
    }
}

/* ===== LOGO ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    color: var(--black);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.logo img {
    height: 28px;
    width: auto;
}

@media (min-width: 768px) {
    .logo {
        font-size: 1rem;
    }

    .logo img {
        height: 32px;
    }
}

.logo span {
    display: none;
}

@media (min-width: 992px) {
    .logo span {
        display: inline;
    }
}

.logo:hover {
    color: var(--green);
}

/* ===== MAIN NAVIGATION ===== */
.main-nav {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 0.5rem;
}

.main-nav ul {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .main-nav ul {
        display: flex;
    }
}

.main-nav li {
    height: 100%;
    display: flex;
    align-items: center;
}

/* ===== NAV LINKS ===== */
.main-nav a {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 0.875rem;
    text-decoration: none;
    color: var(--black);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 2px solid transparent;
    border-radius: 0;
    transition: all 0.15s ease;
}

.main-nav a:hover {
    color: var(--green);
    border-color: var(--green);
    background: var(--green-bg);
}

.main-nav li.active a {
    color: var(--white);
    background: var(--green);
    border-color: var(--green);
}

@media (min-width: 992px) {
    .main-nav a {
        height: 40px;
        padding: 0 1.125rem;
        font-size: 0.8125rem;
    }
}

/* ===== HEADER CTA BUTTON ===== */
.site-header .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 36px;
    padding: 0 1rem;
    font-family: var(--font-heading);
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
    background: var(--black);
    border: 2px solid var(--black);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-header .btn:hover {
    color: var(--black);
    background: var(--green);
    border-color: var(--green);
    transform: none;
    box-shadow: none;
}

.site-header .btn i {
    font-size: 0.75rem;
}

.site-header .btn span {
    display: none;
}

.site-header .btn.btn-secondary span {
    display: inline;
}

@media (min-width: 480px) {
    .site-header .btn span {
        display: inline;
    }

    .site-header .btn {
        padding: 0 1.25rem;
    }
}

@media (min-width: 768px) {
    .site-header .btn {
        font-size: 0.75rem;
    }
}

@media (min-width: 992px) {
    .site-header .btn {
        height: 40px;
        padding: 0 1.5rem;
    }
}

/* ===== HEADER SECONDARY BUTTON ===== */
.site-header .btn.btn-secondary {
    background: #ffffff !important;
    color: var(--green) !important;
    border: var(--border-width) solid var(--black) !important;
    box-shadow: var(--shadow) !important;
    transform: none !important;
}

.site-header .btn.btn-secondary:hover,
.site-header .btn.btn-secondary:focus {
    background: var(--green) !important;
    color: #ffffff !important;
    border-color: var(--black) !important;
    box-shadow: var(--shadow) !important;
    transform: none !important;
}

.site-header .btn.btn-secondary:active {
    background: var(--green-dark) !important;
    color: #ffffff !important;
    border-color: var(--black) !important;
    box-shadow: var(--shadow) !important;
    transform: none !important;
}

/* ========================================
   BUTTONS - BRUTALIST STYLE
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1rem 2rem;
    border-radius: var(--radius);
    /* SQUARED */
    font-weight: 700;
    /* BOLDER */
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    border: var(--border-width) solid var(--black);
    /* BOLD BORDER */
    font-size: 0.95rem;
    position: relative;
    overflow: visible;
    /* Show shadow */
    text-transform: uppercase;
    /* BRUTALIST */
    letter-spacing: 0.05em;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: var(--green);
    color: #ffffff;
    border-color: var(--black);
    box-shadow: var(--shadow-green);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--green-dark);
    color: #ffffff;
    border-color: var(--green-dark);
    box-shadow: var(--shadow-green);
}

.btn-primary:active {
    background: var(--green-dark);
    color: #ffffff;
    box-shadow: var(--shadow-green);
}

.btn-outline {
    background: var(--white);
    color: #000000;
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
}

.btn-outline:hover,
.btn-outline:focus {
    background: var(--green);
    color: #ffffff;
    border-color: var(--green);
    box-shadow: var(--shadow-lg);
}

.btn-outline:active {
    background: var(--green-dark);
    color: #ffffff;
    border-color: var(--green-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--green);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: var(--green);
    color: #ffffff;
    border-color: var(--black);
    box-shadow: var(--shadow-lg);
}

.btn-secondary:active {
    background: var(--green-dark);
    color: #ffffff;
    border-color: var(--black);
    box-shadow: var(--shadow-lg);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ========================================
   MAIN CONTENT
======================================== */

main {
    margin-top: 80px;
}

/* ========================================
   HERO SECTION
======================================== */

.hero-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 50%, var(--bg-grey) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section .pure-g {
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: transparent;
    color: var(--green);
    padding: 0.5rem 1.25rem;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 700;
    font-family: monospace;
    margin-bottom: var(--space-md);
    box-shadow: none;
    border: var(--border-width) solid var(--green);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    margin-bottom: var(--space-md);
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    font-family: monospace;
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.hero-points {
    margin: var(--space-lg) 0;
}

.hero-points p {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
    color: var(--dark);
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-lg);
}

/* Hero Visual */
.hero-visual-container {
    padding: var(--space-md);
}

.hero-card-visual {
    padding: 0;
    margin: 0 auto;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    position: relative;
    max-width: 500px;
    width: 100%;
}

#d3-hero-viz {
    width: 100%;
    aspect-ratio: 1/1;
    background: #0f172a;
    border: 2px solid #1e293b;
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: block;
}

.pipeline-label {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

/* ========================================
   SECTION HEADERS
======================================== */

.section-header {
    margin-bottom: var(--space-xl);
}

.section-icon {
    margin: 0 auto var(--space-md);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-bg);
    border-radius: var(--radius);
    /* SQUARED */
    border: var(--border-width) solid var(--green);
    box-shadow: var(--shadow);
}

.section-icon svg {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

.section-badge {
    display: inline-block;
    background: var(--green-bg);
    color: var(--green-dark);
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    /* SQUARED */
    font-size: 0.875rem;
    font-weight: 700;
    /* BOLDER */
    margin-bottom: var(--space-md);
    border: var(--border-width) solid var(--green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 4px 4px 0px 0px rgba(34, 197, 94, 0.2);
}

.section-title {
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--grey);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

.section-icon-small {
    font-size: 1.5rem;
    color: var(--green);
    margin-right: var(--space-sm);
    vertical-align: middle;
}

/* ========================================
   CARDS - BRUTALIST SQUARED
======================================== */

.card {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius);
    /* SQUARED */
    box-shadow: var(--shadow);
    /* HARD SHADOW */
    transition: var(--transition-fast);
    border: var(--border-width) solid var(--black);
    /* BOLD BORDER */
}

.card:hover {
    /* transform: translate(-4px, -4px); */
    /* Move shadow */
    /* box-shadow: var(--shadow-lg); */
    border-color: var(--green);
    /* border-width: var(--border-width-lg); */
}

/* ========================================
   CAPABILITIES SECTION
======================================== */

.capabilities-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark) 100%);
    color: var(--white);
    overflow-x: hidden;
    position: relative;
}

.capabilities-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2322c55e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.capabilities-section .pure-g {
    margin: 0 calc(var(--space-md) * -0.5);
}

.capabilities-section .pure-u-1,
.capabilities-section .pure-u-md-1-2 {
    padding: 0 var(--space-md);
    box-sizing: border-box;
    margin-bottom: var(--space-md);
}

.capabilities-section .pure-u-md-1-2 {
    margin-bottom: 0;
}

.capabilities-section h2,
.capabilities-section h3 {
    color: var(--white);
}

.capabilities-section .section-badge {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green-light);
    border-color: rgba(34, 197, 94, 0.3);
}

.capability-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: var(--border-width-lg) solid rgba(255, 255, 255, 0.2);
    padding: var(--space-lg);
    border-radius: var(--radius);
    height: 100%;
    transition: var(--transition-fast);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-lg);
}

.capability-card:hover {
    border-color: var(--green);
    /* transform: translate(-4px, -4px); */
    /* box-shadow: 12px 12px 0px 0px rgba(34, 197, 94, 0.3); */
    /* border-width: var(--border-width-lg); */
}

.capability-card h3 {
    color: var(--green);
    margin-bottom: var(--space-md);
}

.capability-card ul {
    list-style: none;
    padding: 0;
}

.capability-card li {
    padding: var(--space-xs) 0;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.capability-card li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
}

/* ========================================
   BUILDER SECTION
======================================== */

.builder-section {
    padding: var(--space-xl) 0;
    background: var(--bg-light);
}

.builder-grid {
    margin: 0 calc(var(--space-md) * -0.5);
    margin-bottom: var(--space-lg);
}

.builder-grid>div[class*="pure-u"] {
    padding: 0 var(--space-md);
    box-sizing: border-box;
}

.builder-summary {
    margin-bottom: var(--space-md);
}

.builder-visual {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 400px;
}

/* Highlight List */
.highlight-list {
    margin-top: var(--space-md);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-sm);
}

.highlight-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--white);
    border: var(--border-width-lg) solid var(--green);
    border-radius: var(--radius);
    /* SQUARED */
    transition: var(--transition-fast);
    align-items: center;
    box-shadow: var(--shadow-green);
}



.highlight-icon-wrapper {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Smaller icon variant for compact layouts */
.highlight-icon-wrapper--sm {
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
}

.highlight-icon-svg {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
}

/* Smaller icon SVG variant */
.highlight-icon-svg--sm {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
}

.highlight-content {
    flex: 1;
    min-width: 0;
}

.highlight-content h3 {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 2px 0;
    line-height: 1.3;
    text-transform: uppercase;
}

.highlight-content p {
    font-size: 0.8rem;
    color: var(--grey);
    margin: 0;
    line-height: 1.4;
}

/* Builder Process Visual */
.builder-process-visual {
    text-align: center;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-lg);
    padding: var(--space-lg) 0;
    width: 100%;
}

.process-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
}

#d3-pipeline-viz {
    width: 100%;
    max-width: 800px;
    height: 180px;
    margin: 0 auto;
    background: transparent;
    position: relative;
    min-height: 180px;
    display: block;
}

.pipeline-viz-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.pipeline-visual-svg {
    width: 100%;
    max-width: 800px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

/* Builder Steps */
/* Builder Steps Container */
.builder-steps-container {
    margin-top: var(--space-lg);
    margin-bottom: 0;
    overflow: visible;
    /* Allow tabs to extend beyond container */
    position: relative;
}

/* Builder Steps Navigation - Browser-Style Tabs - UNIFIED OUTLINE */
.builder-steps-nav {
    display: flex;
    gap: 0;
    /* NO GAP - Unified */
    overflow-x: auto;
    padding: var(--space-sm) var(--space-md) 0 var(--space-md);
    /* More side padding */
    margin: 0;
    /* NO MARGIN */
    margin-bottom: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border: none;
    /* NO CONTAINER BORDER */
    background: transparent;
    /* Transparent background */
    border-radius: 0;
    position: relative;
    z-index: 1;
    box-shadow: none;
}

.builder-steps-nav::-webkit-scrollbar {
    display: none;
}

.builder-step-tab {
    flex: 1;
    flex-shrink: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-md) var(--space-lg);
    min-width: 0;
    height: 4.5rem;
    background: var(--white);
    border: var(--border-width-lg) solid var(--black);
    border-bottom: var(--border-width-lg) solid var(--black);
    /* Bottom border for inactive tabs */
    border-radius: var(--radius) var(--radius) 0 0;
    /* Rounded top corners */
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    color: var(--grey);
    position: relative;
    box-shadow: none;
    margin: 0;
    margin-right: calc(var(--border-width-lg) * -1);
    /* Overlap borders */
    z-index: 1;
    transform: translateZ(0);
    /* Force hardware acceleration to prevent cutoff */
    will-change: transform;
    /* Optimize for transforms */
}

.builder-step-tab:last-child {
    margin-right: 0;
    /* Last tab doesn't overlap */
}

/* Inactive tabs - complete border */
.builder-step-tab:not(.active) {
    border-bottom: var(--border-width-lg) solid var(--black);
}

/* Active tab - HAS bottom border for consistency */
.builder-step-tab.active {
    border-bottom: var(--border-width-lg) solid var(--black) !important;
    /* Black bottom border - consistent width */
}

/* Remove any pseudo-elements */
.builder-step-tab::before,
.builder-step-tab::after {
    display: none;
    content: none;
}

/* Focus state */
.builder-step-tab:focus {
    outline: none;
    box-shadow: none;
}

.builder-step-tab:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: -2px;
}

.builder-step-tab:hover {
    background: var(--green-bg);
    color: var(--black);
    z-index: 2;
}

.builder-step-tab.active {
    background: var(--green);
    color: var(--white) !important;
    font-weight: 800;
    z-index: 10;
    /* Active tab on top */
    border-color: var(--green);
    /* Green border for sides and top */
    border-width: var(--border-width-lg);
    /* Consistent border width (4px) */
    border-bottom: var(--border-width-lg) solid var(--black) !important;
    /* Black bottom border - same width as other borders */
}

.builder-step-tab.active .builder-step-tab-label {
    color: var(--white) !important;
}

.builder-step-tab.active .builder-step-tab-icon {
    color: var(--white) !important;
}

.builder-step-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: inherit;
    opacity: 1;
    /* Always visible */
    transition: var(--transition-fast);
}

.builder-step-tab-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.builder-step-tab.active .builder-step-tab-icon {
    opacity: 1;
    color: var(--white);
}

.builder-step-tab:hover .builder-step-tab-icon {
    opacity: 1;
}

.builder-step-tab:not(.active) .builder-step-tab-icon {
    color: var(--grey);
    opacity: 0.7;
}

.builder-step-tab-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    /* CENTER ALIGNMENT */
    line-height: 1.3;
    white-space: nowrap;
    overflow: visible;
    /* Show text */
    text-overflow: clip;
    /* Don't ellipsis */
    flex: 1;
    min-width: 0;
    color: inherit;
    display: block;
    /* Ensure visibility */
    opacity: 1;
    /* Ensure visible */
}

/* Builder Steps Content - CONNECTED TO TABS */
.builder-steps-content {
    width: 100%;
    margin: 0;
    /* NO MARGIN - Seamless connection */
    margin-top: 0;
    padding: 0;
}

.builder-step-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.builder-step-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: tabReveal 0.3s ease-out;
}

/* Connect card to active tab - BLACK OUTLINE WITH GREEN INNER BORDER + BRUTALIST 45° STACKING */
.builder-step-content.active .builder-step {
    border: 6px solid var(--black) !important;
    /* Black BOLDER outline outside (6px) */
    border-top: 6px solid var(--black) !important;
    /* Black top border - complete outline */
    border-radius: 0 0 var(--radius) var(--radius);
    margin: 0;
    margin-top: calc(var(--border-width-lg) * -1);
    /* Overlap with tab border seamlessly */
    position: relative;
    z-index: 9;
    /* Below active tab but above others */
    background: var(--white);
    box-shadow:
        inset 0 0 0 8px var(--green),
        4px 4px 0px 0px #e2e8f0,
        8px 8px 0px 0px #cbd5e1,
        12px 12px 0px 0px #94a3b8,
        16px 16px 0px 0px rgba(0, 0, 0, 0.1) !important;
    /* Final shadow layer */
}

@keyframes tabReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.builder-steps {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.builder-step {
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: var(--space-lg);
    border-radius: var(--radius);
    /* SQUARED */
    border: var(--border-width) solid var(--black);
    background: var(--white);
    transition: var(--transition-fast);
    box-shadow:
        inset 0 0 0 4px var(--white),
        inset 0 0 0 8px var(--green),
        4px 4px 0px 0px #e2e8f0,
        8px 8px 0px 0px #cbd5e1,
        12px 12px 0px 0px rgba(0, 0, 0, 0.15);
}

.builder-step:hover {
    /* transform: translate(-4px, -4px); */
    /* box-shadow: var(--shadow-lg); */
    border-color: var(--green);
    /* border-width: var(--border-width-lg); */
}

.step-count {
    width: 60px;
    height: 60px;
    background: var(--green);
    /* SOLID COLOR */
    color: var(--white);
    border-radius: var(--radius);
    /* SQUARED */
    border: var(--border-width) solid var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto var(--space-md);
    box-shadow: var(--shadow-green);
}

/* ========================================
   OCR SECTION
======================================== */

.ocr-section {
    padding: var(--space-xl) 0;
}

/* BRUTALIST OCR VISUALIZATION HERO */
/* NOTE: Builder animation styles moved to builder-animation.css (BEM structure) */
.ocr-viz-hero {
    margin: var(--space-xl) 0;
    position: relative;
    padding: 0;
}

.ocr-viz-title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 900;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    display: block;
}

.ocr-viz-container {
    width: 100%;
    min-height: 400px;
    max-height: 450px;
    background: var(--white);
    border: var(--border-width-lg) solid var(--black);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    margin-bottom: var(--space-lg);
}

.ocr-process-labels {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.process-label {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    align-items: flex-start;
}

.label-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--black);
    color: var(--white);
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
}

.label-badge.label-chaos {
    background: var(--grey);
    color: var(--white);
}

.label-badge.label-order {
    background: var(--green);
    color: var(--white);
}

.label-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ocr-stats {
    padding: var(--space-lg);
    background: var(--white);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
}

.ocr-stats h3 {
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-sm) 0;
    border-bottom: 2px solid var(--light-grey);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--green);
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ocr-grid {
    margin: 0 calc(var(--space-md) * -0.5);
    margin-bottom: var(--space-lg);
}

.ocr-grid>div[class*="pure-u"] {
    padding: 0 var(--space-md);
    box-sizing: border-box;
}

.pillar {
    margin-bottom: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--green);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
}

.pillar-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xs);
}

.ocr-timeline {
    margin-top: var(--space-lg);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.timeline-card {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius);
    /* SQUARED */
    box-shadow: var(--shadow);
    border: var(--border-width) solid var(--black);
    transition: var(--transition-fast);
}

.timeline-card:hover {
    /* transform: translate(-4px, -4px); */
    /* box-shadow: var(--shadow-lg); */
    border-color: var(--green);
    /* border-width: var(--border-width-lg); */
}

.timeline-index {
    width: 50px;
    height: 50px;
    background: var(--green);
    /* SOLID COLOR */
    color: var(--white);
    border-radius: var(--radius);
    /* SQUARED */
    border: var(--border-width) solid var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-green);
}

/* QR Verification */
.qr-verification-modern {
    margin-top: var(--space-xl);
    background: linear-gradient(135deg, #f0fdf4 0%, var(--white) 100%);
    padding: var(--space-xl);
    border-radius: var(--radius);
    border: 2px solid #d1fae5;
}

.qr-viz-container {
    width: 100%;
    height: 400px;
    background: #ffffff;
    border-radius: var(--radius);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow-lg);
    margin: var(--space-lg) 0;
    padding: var(--space-md);
    box-sizing: border-box;
}

.qr-verification-svg-wrapper {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    margin: var(--space-xl) 0;
    border: var(--border-width) solid var(--border);
}

.qr-verification-svg {
    width: 100%;
    height: auto;
    min-height: 320px;
    margin: 0 auto;
    display: block;
}

.security-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.feature-badge {
    text-align: center;
    padding: var(--space-lg);
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    border: var(--border-width) solid var(--border);
}

.feature-badge:hover {
    /* transform: translateY(-5px); */
    /* box-shadow: var(--shadow-lg); */
    border-color: var(--green);
}

.feature-badge span {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
}

/* ========================================
   COMPARISON SECTION
======================================== */

.comparison-section {
    padding: var(--space-xl) 0;
    background: var(--bg-light);
}

.comparison-grid {
    margin-top: var(--space-lg);
    margin-left: calc(var(--space-md) * -0.5);
    margin-right: calc(var(--space-md) * -0.5);
}

.comparison-grid>div[class*="pure-u"] {
    padding: 0 var(--space-md);
    box-sizing: border-box;
}

.comparison-card {
    background: var(--white);
    border-radius: var(--radius);
    /* SQUARED */
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: var(--space-md);
    border: var(--border-width) solid var(--black);
    /* BOLD BORDER */
}

.comparison-card .card-header {
    padding: var(--space-lg);
    text-align: center;
}

.comparison-card.traditional .card-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-bottom: 3px solid #ef4444;
}

.comparison-card.traditional h3 {
    color: #dc2626;
}

.comparison-card.datax .card-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-bottom: 3px solid var(--green);
}

.comparison-card.datax h3 {
    color: var(--green-dark);
}

.comparison-card .card-body {
    padding: var(--space-lg);
}

.comparison-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.comparison-card li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.comparison-card li:last-child {
    border-bottom: none;
}

.comparison-card.traditional li::before {
    content: '✕';
    color: #ef4444;
    font-weight: 700;
    flex-shrink: 0;
}

.comparison-card.datax li::before {
    content: '✓';
    color: var(--green);
    font-weight: 700;
    flex-shrink: 0;
}

#d3-comparison-viz {
    width: 100%;
    height: 240px;
    /* COMPACT HEIGHT */
    position: relative;
    overflow: hidden;
    background: var(--bg-grey);
    border-radius: var(--radius);
    border: 1px solid var(--light-grey);
}

/* Comparison Chart Card - Professional Dashboard Style */
.comparison-chart-card {
    background: var(--white);
    border: var(--border-width) solid var(--black);
    border-radius: var(--radius);
    overflow: hidden;
    /* Contains the header border */
    position: relative;
    min-height: auto;
    /* Remove large min-height */
    height: auto;
    flex-grow: 1;
    /* Stretch to fill */
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.comparison-chart-card:hover {
    /* box-shadow: var(--shadow-lg); */
    /* transform: translate(-4px, -4px); */
    /* border-width: var(--border-width-lg); */
    border-color: var(--green);
}

.comparison-chart-card .chart-header {
    background: var(--bg-grey);
    padding: var(--space-md) var(--space-lg);
    border-bottom: var(--border-width) solid var(--black);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.chart-header .header-titles h3 {
    color: var(--black);
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    /* Tighter for dashboard look */
    letter-spacing: -0.5px;
    font-weight: 800;
    text-transform: uppercase;
}

.chart-header .header-titles p {
    color: var(--grey);
    margin: 2px 0 0;
    font-size: 0.75rem;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.comparison-chart-card .chart-body {
    padding: var(--space-lg);
    background: var(--white);
    position: relative;
    flex-grow: 1;
    /* Fills remaining space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#d3-comparison-viz {
    width: 100%;
    min-height: 320px;
    height: 100%;
    position: relative;
    /* Removed borders/backgrounds to look clean inside the card */
}

/* Replay Button - Professional Tool Style */
.btn-replay {
    background: var(--white);
    color: var(--black);
    border: 2px solid var(--black);
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.1);
}

.btn-replay:hover {
    background: var(--black);
    color: var(--white);
    /* transform: translateY(-1px); */
    /* box-shadow: 4px 4px 0px 0px rgba(34, 197, 94, 0.4); */
    border-color: var(--black);
}

.btn-replay i {
    color: var(--green);
    /* Accent color icon */
}

.btn-replay:hover i {
    color: var(--green);
}

/* ========================================
   PROCESS SECTION
======================================== */

.process-section {
    padding: var(--space-xl) 0;
}

.process-flow-modern {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: var(--border-width) solid var(--border);
    position: relative;
    overflow: hidden;
}

/* ========================================
   SPECS SECTION
======================================== */

.specs-section {
    padding: var(--space-xl) 0;
}

.specs-dashboard-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    /* Prioritize right panel */
    gap: 30px;
}

.specs-card {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: var(--border-width) solid var(--border);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.metric-large {
    text-align: center;
    flex: 1;
}

.metric-large .value {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--black);
    line-height: 1;
    display: block;
}

.metric-large .unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--green);
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.metric-large .label {
    font-size: 0.9rem;
    color: var(--grey);
}

.metric-divider {
    width: 1px;
    height: 60px;
    background: var(--border);
}

.metric-chart-area h4 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.chart-item {
    margin-bottom: 20px;
}

.chart-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.chart-track {
    height: 8px;
    background: var(--bg-grey);
    border-radius: var(--radius);
    /* SQUARED */
    overflow: hidden;
}

.chart-bar-animated {
    height: 100%;
    background: var(--green);
    /* SOLID COLOR */
    border-radius: var(--radius);
    /* SQUARED */
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.output-results-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.output-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: #f0fdf4;
    border-radius: var(--radius);
    border: 2px solid #dcfce7;
    transition: var(--transition);
}

.output-item:hover {
    /* transform: translateY(-3px); */
    /* box-shadow: var(--shadow); */
    border-color: var(--green);
    background: var(--white);
}

.output-item span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

/* ========================================
   ONELAYER SECTION - BRUTALIST REDESIGN
   Mobile-first, dark theme, high contrast
======================================== */

.onelayer-section {
    padding: var(--space-xl) 0;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

/* Subtle grid pattern overlay */
.onelayer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2322c55e' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.onelayer-section .section-header {
    position: relative;
    z-index: 1;
}

.onelayer-section .section-title,
.onelayer-section .section-subtitle {
    color: var(--white);
}

.onelayer-section .section-badge {
    background: rgba(34, 197, 94, 0.2);
    color: var(--green-light);
    border-color: rgba(34, 197, 94, 0.3);
}

/* Brutalist section icon */
.onelayer-section .section-icon {
    margin-bottom: var(--space-md);
}

.onelayer-section .section-icon svg {
    width: 64px;
    height: 64px;
}

.onelayer-content {
    margin-top: var(--space-lg);
    position: relative;
    z-index: 1;
}

/* Text content - brutalist card */
.onelayer-text {
    background: rgba(255, 255, 255, 0.03);
    border: var(--border-width) solid rgba(255, 255, 255, 0.1);
    padding: var(--space-lg);
    border-radius: var(--radius);
    margin-bottom: var(--space-lg);
}

.onelayer-text p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: var(--space-md);
}

.onelayer-text strong {
    color: var(--green);
    font-weight: 700;
}

/* Logo box - brutalist dark variant */
.onelayer-logo-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border-radius: var(--radius);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
}



.onelayer-logo {
    height: auto;
    width: 50px;
    flex-shrink: 0;
}

.onelayer-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--black);
    font-size: 1.25rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Benefits container */
.onelayer-benefits {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Benefit cards - BRUTALIST */
.benefit-item {
    display: flex;
    gap: var(--space-md);
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    align-items: flex-start;
}

.benefit-item:hover {
    /* transform: translate(-4px, -4px); */
    /* box-shadow: var(--shadow-lg); */
    border-color: var(--green);
}

/* Icon block - solid brutalist */
.benefit-icon {
    width: 56px;
    height: 56px;
    min-width: 56px;
    background: var(--green);
    color: var(--white);
    border: var(--border-width) solid var(--black);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.2);
}

/* Benefit text */
.benefit-text h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.benefit-text p {
    font-size: 0.9375rem;
    color: var(--dark);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.benefit-detail {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    background: var(--green);
    padding: 4px 10px;
    border: 2px solid var(--black);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Mobile-first responsive */
@media (min-width: 768px) {
    .onelayer-logo-box {
        padding: var(--space-lg);
    }

    .onelayer-logo {
        width: 60px;
    }

    .onelayer-brand {
        font-size: 1.5rem;
    }

    .benefit-icon {
        width: 64px;
        height: 64px;
        min-width: 64px;
        font-size: 1.75rem;
    }

    .benefit-text h3 {
        font-size: 1.125rem;
    }
}

@media (min-width: 1024px) {
    .onelayer-content {
        display: flex;
        flex-direction: row-reverse;
        gap: var(--space-xl);
    }

    .onelayer-content>.pure-u-1.pure-u-lg-1-2 {
        flex: 1;
    }

    .onelayer-text {
        margin-bottom: 0;
    }
}

/* ========================================
   CTA SECTION
======================================== */

.cta-section {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, var(--black) 0%, var(--dark) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(34, 197, 94, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.cta-section h2 {
    color: var(--white);
    font-size: clamp(2rem, 4vw, 3rem);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto var(--space-lg);
}

.cta-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   FOOTER
======================================== */

.site-footer {
    background: linear-gradient(180deg, var(--dark) 0%, var(--black) 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-2xl) 0 var(--space-lg);
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--green) 50%, transparent 100%);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.footer-brand img {
    height: auto;
    width: 100%;
    max-width: 60px;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--green);
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--green);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.8);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 8px rgba(34, 197, 94, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(34, 197, 94, 0.8));
    }
}

@keyframes flow-dash {
    to {
        stroke-dashoffset: -24;
    }
}

/* ========================================
   TABLET (min-width: 768px)
======================================== */

@media (min-width: 768px) {
    :root {
        --space-xl: 5rem;
    }

    .main-nav ul {
        display: flex;
    }

    .hero-actions {
        flex-wrap: nowrap;
    }

    .highlight-list {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Builder steps - tablet grid */
    .builder-steps-container {
        transform: scale(1);
        /* Reset scale */
        margin: var(--space-lg) 0 0 0;
    }

    .builder-steps-content {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        margin: var(--space-md) 0 0 0;
        /* Only top margin */
    }

    .builder-step-content {
        display: block !important;
        animation: none;
        opacity: 1 !important;
        transform: none !important;
        margin: 0;
    }

    .builder-step-content .builder-step {
        border-top: var(--border-width) solid var(--border);
        border-radius: var(--radius);
        margin: 0;
    }

    .builder-steps-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin: 0;
        /* NO MARGIN */
        padding: var(--space-xs);
    }

    .builder-step-tab {
        min-width: 0;
        height: 4rem;
        flex: 1;
    }

    .security-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

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

/* ========================================
   DESKTOP (min-width: 1024px)
======================================== */

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-lg);
    }

    /* Builder steps - desktop full grid */
    .builder-steps-container {
        transform: scale(1);
        /* Reset scale */
        margin: var(--space-lg) 0 0 0;
    }

    /* Hide tabs on desktop */
    .builder-steps-nav {
        display: none !important;
    }

    .builder-steps-content {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-lg);
        margin: var(--space-md) 0 0 0;
        align-items: stretch;
        /* GRID FIX: Stretch all children */
    }

    .builder-step-content {
        display: block !important;
        animation: none;
        opacity: 1 !important;
        transform: none !important;
        margin: 0;
        height: 100% !important;
        /* GRID FIX: Force full height */
    }

    /* Ensure card fills height */
    .builder-step-content .builder-step {
        border-top: var(--border-width) solid var(--border);
        border-radius: var(--radius);
        margin: 0;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .builder-step-content .builder-step p {
        flex-grow: 1;
        /* Push bottom content if needed */
    }

    .builder-step-tab {
        min-width: 0;
        height: 4.5rem;
        flex: 1;
        max-width: 20rem;
    }

    .builder-step-tab-icon {
        width: 24px;
        height: 24px;
    }

    .security-features {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   MOBILE OPTIMIZATIONS (max-width: 767px)
======================================== */

@media (max-width: 767px) {
    /* ========================================
       MOBILE OPTIMIZATIONS - PROFESSIONAL & COMPACT
    ======================================== */

    /* Reduce section padding for mobile */
    .hero-section,
    .capabilities-section,
    .builder-section,
    .ocr-section,
    .comparison-section,
    .process-section,
    .onelayer-section,
    .specs-section {
        padding: var(--space-md) 0;
    }

    .cta-section {
        padding: var(--space-lg) 0;
    }

    /* Compact cards with proper spacing */
    .card {
        padding: var(--space-md);
        margin-bottom: var(--space-lg) !important;
    }

    /* Ensure cards don't touch each other */
    .card+.card {
        margin-top: var(--space-lg);
    }

    /* Pure grid items need spacing */
    .pure-g>[class*="pure-u"] {
        margin-bottom: var(--space-lg) !important;
    }

    .pure-g>[class*="pure-u"]:last-child {
        margin-bottom: 0 !important;
    }

    /* Section headers - more compact */
    .section-header {
        margin-bottom: var(--space-md);
        padding: 0 var(--space-sm);
    }

    .section-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .section-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }

    /* Hero section mobile */
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: var(--space-sm);
    }

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

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
        margin-bottom: var(--space-sm);
        background: transparent;
        border: 1px solid var(--green);
        border-radius: 0;
        font-family: monospace;
        letter-spacing: 2px;
        box-shadow: none;
    }

    .hero-actions {
        flex-direction: column;
        gap: var(--space-sm);
        margin-top: var(--space-md);
    }

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

    /* D3 visualizations - ensure they fit and are touch-friendly */
    /* GPU Compositing & Performance Optimization */
    #d3-hero-viz,
    #d3-builder-viz,
    #d3-ocr-viz,
    #d3-pipeline-viz,
    #d3-comparison-viz,
    #d3-specs-viz,
    #d3-qr-viz,
    .ocr-viz-container,
    .builder-visual,
    .builder-animation-card {
        will-change: transform;
        contain: layout style paint;
        transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        perspective: 1000px;
        -webkit-perspective: 1000px;
    }

    #d3-hero-viz {
        height: 420px !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100%;
        touch-action: pan-y;
    }

    .hero-visual-container,
    .hero-card-visual {
        margin: 0 !important;
        padding: 0 !important;
    }

    #d3-comparison-viz {
        height: 240px !important;
        max-width: 100%;
    }

    .comparison-chart-card {
        padding: var(--space-md) !important;
        min-height: auto !important;
        border-radius: var(--radius) !important;
        /* SQUARED */
    }

    .comparison-chart-card h3 {
        font-size: 1.1rem !important;
    }

    .comparison-chart-card p {
        font-size: 0.85rem !important;
    }

    /* Builder Animation styles moved to builder-animation.css (BEM structure) */

    /* High-refresh-rate mobile optimization (iPhone 17 Pro 120Hz) */
    @media (prefers-reduced-motion: no-preference) {

        #d3-hero-viz,
        #d3-builder-viz,
        #d3-ocr-viz,
        #d3-pipeline-viz,
        #d3-comparison-viz,
        #d3-specs-viz {
            /* Optimize for 120Hz displays */
            transform: translateZ(0) scale(1);
        }
    }

    /* Respect user motion preferences */
    @media (prefers-reduced-motion: reduce) {

        #d3-hero-viz,
        #d3-builder-viz,
        #d3-ocr-viz,
        #d3-pipeline-viz,
        #d3-comparison-viz,
        #d3-specs-viz svg * {
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.01ms !important;
        }
    }

    .builder-visual svg,
    #d3-builder-viz svg {
        height: 100% !important;
        max-height: none !important;
        min-height: 480px !important;
    }

    .ocr-diagram,
    .process-d3-container,
    .specs-d3-container {
        max-height: 300px;
        padding: var(--space-md);
    }

    .ocr-diagram svg {
        max-height: 280px;
    }

    /* OCR Visualization Hero - Mobile */
    .ocr-viz-hero {
        margin: var(--space-md) 0;
    }

    /* Builder animation styles in builder-animation.css */

    .ocr-viz-title {
        font-size: 1.1rem;
        margin: 0;
        padding: 0 var(--space-sm);
        line-height: 1.2;
        display: block;
    }

    .ocr-viz-container {
        min-height: 350px !important;
        max-height: 380px !important;
        border-width: var(--border-width) !important;
        margin-bottom: var(--space-md) !important;
        overflow: visible !important;
        opacity: 1 !important;
        visibility: visible !important;
        /* Prevent cutoff */
    }

    .ocr-process-labels {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .process-label {
        width: 100%;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Capabilities grid - ensure proper spacing on mobile */
    .capabilities-section .pure-u-1 {
        margin-bottom: var(--space-lg) !important;
        padding: 0 var(--space-md) !important;
    }

    .capabilities-section .pure-u-1:last-child {
        margin-bottom: 0 !important;
    }

    .capability-card {
        margin-bottom: 0 !important;
        padding: var(--space-md);
    }

    /* Builder Steps - Hidden on desktop for now as requested */
    .builder-step-tab-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    /* Builder Highlight Grid */
    .highlight-grid {
        margin-top: var(--space-lg);
        margin-left: calc(var(--space-md) * -0.5);
        margin-right: calc(var(--space-md) * -0.5);
    }

    .highlight-grid>[class*="pure-u"] {
        padding: 0 var(--space-md);
        margin-bottom: var(--space-lg);
    }

    .highlight-card {
        background: var(--white);
        border: var(--border-width) solid var(--green);
        /* Green border as requested */
        padding: var(--space-md);
        /* ==========================================================================
       DATA X HIGHLIGHTS - UNIQUE NAMESPACE (BEM-ish) to avoid conflicts
       ========================================================================== */

        .data-x-highlight-card {
            background: var(--white);
            border: var(--border-width) solid var(--green);
            padding: var(--space-md);
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            box-shadow: 4px 4px 0px 0px rgba(34, 197, 94, 0.2);
            transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        /* Professional Brutalist Animation: Sharp Lift */


        .data-x-highlight-header {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            margin-bottom: var(--space-sm);
            width: 100%;
            min-height: 48px;
        }

        .data-x-highlight-icon {
            color: var(--green);
            width: 42px;
            height: 42px;
            flex-shrink: 0;
            margin-bottom: 0;
            transition: transform 0.15s steps(2);
            /* Stepped 'glitch' feel */
        }

        /* Subtle Brutalist Icon Animation on Card Hover */
        .data-x-highlight-card:hover .data-x-highlight-icon {
            transform: scale(1.1) translate(1px, 1px);
            color: var(--green-dark);
        }

        .data-x-icon-svg {
            width: 100%;
            height: 100%;
            display: block;
            /* Fix vertical alignment issues */
        }

        .data-x-highlight-header h3 {
            font-size: 1rem;
            font-weight: 800;
            margin: 0;
            text-transform: uppercase;
            color: var(--black);
            line-height: 1.2;
        }

        .data-x-highlight-content p {
            font-size: 0.8rem;
            line-height: 1.5;
            margin: 0;
            color: var(--grey);
        }
    }

    /* Builder Animation Container - Single Clean Border */
    .builder-animation {
        border: var(--border-width) solid var(--black);
        background: var(--white);
        border-radius: 0;
        overflow: hidden;
        box-shadow: var(--shadow);
        display: flex;
        flex-direction: column;
        margin-top: 0 !important;
    }

    .builder-viz-header {
        background: var(--white);
        padding: var(--space-xs) var(--space-sm);
        border-bottom: var(--border-width) solid var(--black);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .builder-animation__title {
        font-size: 0.85rem;
        font-family: var(--font-heading);
        letter-spacing: 0.05em;
        text-transform: uppercase;
        margin: 0;
        color: var(--black);
        font-weight: 800;
    }

    .viz-status-indicators {
        display: flex;
        gap: 6px;
    }

    .viz-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: none;
        background: transparent;
    }

    .viz-dot:nth-child(1) {
        background: #ef4444;
    }

    .viz-dot:nth-child(2) {
        background: #fbbf24;
    }

    .viz-dot:nth-child(3) {
        background: #22c55e;
    }

    .builder-animation__canvas {
        flex-grow: 1;
        position: relative;
        background: #f0fdf4;
        border: none !important;
        box-shadow: none !important;
        height: auto !important;
        padding-bottom: 0 !important;
        min-height: 350px;
    }

    /* Builder section */
    .builder-summary {
        margin-bottom: var(--space-sm) !important;
        border: none;
        box-shadow: none;
        padding-left: 0;
        background: transparent;
    }

    .builder-summary p,
    .builder-summary li {
        font-size: 1rem;
        max-width: 65ch;
        /* Readable line length */
    }

    .builder-text-col {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Prevent tabs from being cut off - HACK FIX */
    .builder-steps-container .builder-steps-nav {
        overflow-x: auto;
        /* Keep scrollable */
        overflow-y: visible;
        /* Allow vertical overflow */
        padding-left: var(--space-md);
        /* Extra left padding */
        padding-right: var(--space-md);
        /* Extra right padding */
        margin-left: calc(var(--space-md) * -1);
        /* Negative margin to compensate */
        margin-right: calc(var(--space-md) * -1);
        width: calc(100% + var(--space-md) * 2);
        /* Wider to accommodate */
        position: relative;
        z-index: 1;
    }

    /* Ensure first and last tabs have space */
    .builder-steps-container .builder-step-tab:first-child {
        margin-left: var(--space-xs);
    }

    .builder-steps-container .builder-step-tab:last-child {
        margin-right: var(--space-xs);
    }

    .builder-steps-content {
        display: block;
        margin: 0;
        /* NO MARGIN */
    }

    .builder-step-content {
        display: none;
        margin: 0;
    }

    .builder-step-content.active {
        display: block;
        margin: 0;
    }

    .builder-steps-nav {
        padding: var(--space-xs) var(--space-sm) 0 var(--space-sm);
        /* More padding on sides */
        margin: 0;
    }

    .builder-step-tab {
        height: 3.5rem;
        padding: var(--space-sm) var(--space-xs);
        gap: 0.4rem;
        flex: 1;
        min-width: 0;
        border-width: var(--border-width-lg);
        margin-right: calc(var(--border-width-lg) * -1);
        transform: translateZ(0);
        /* Prevent cutoff */
        will-change: auto;
    }

    /* First and last tabs need extra space */
    .builder-step-tab:first-child {
        margin-left: 0;
        padding-left: var(--space-sm);
    }

    .builder-step-tab:last-child {
        margin-right: 0;
        padding-right: var(--space-sm);
    }

    .builder-step-tab:last-child {
        margin-right: 0;
    }

    .builder-step-tab.active {
        border-bottom: var(--border-width-lg) solid var(--black) !important;
        /* Black bottom border - consistent width */
    }

    .builder-step-content.active .builder-step {
        margin-top: calc(var(--border-width-lg) * -1) !important;
        /* Overlap seamlessly */
        border-width: 6px !important;
        /* Bolder black border */
        border-color: var(--black) !important;
        /* Black bold outline outside */
        border-top: 6px solid var(--black) !important;
        /* Black top border - complete outline */
        box-shadow:
            inset 0 0 0 8px var(--green),
            3px 3px 0px 0px #e2e8f0,
            6px 6px 0px 0px #cbd5e1,
            9px 9px 0px 0px #94a3b8,
            12px 12px 0px 0px rgba(0, 0, 0, 0.1) !important;
        /* Final shadow layer */
    }

    .builder-step-tab-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .builder-step-tab-label {
        font-size: 0.65rem;
        letter-spacing: 0.02em;
        line-height: 1.2;
        white-space: normal;
        /* Allow wrapping if needed */
        overflow: visible;
        text-overflow: clip;
        display: block;
        opacity: 1;
        color: inherit !important;
    }

    /* Ensure active tab text is visible */
    .builder-step-tab.active .builder-step-tab-label {
        color: var(--white) !important;
        opacity: 1;
        font-weight: 800;
    }

    /* Ensure inactive tab text is visible */
    .builder-step-tab:not(.active) .builder-step-tab-label {
        color: var(--grey) !important;
        opacity: 1;
    }

    .builder-step {
        padding: var(--space-lg);
        margin: 0;
        /* NO MARGIN */
        margin-bottom: 0;
        min-height: 280px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-top: var(--border-width-lg) solid var(--green);
        /* Connect to active tab */
    }

    .builder-step-content.active .builder-step {
        border-top: 6px solid var(--black) !important;
        /* Black top border - complete outline */
        border-width: 6px !important;
        border-color: var(--black) !important;
        margin-top: calc(var(--border-width-lg) * -1) !important;
        /* Overlap seamlessly */
        box-shadow:
            inset 0 0 0 8px var(--green),
            3px 3px 0px 0px #e2e8f0,
            6px 6px 0px 0px #cbd5e1,
            9px 9px 0px 0px #94a3b8,
            12px 12px 0px 0px rgba(0, 0, 0, 0.1) !important;
        /* Final shadow */
    }

    .builder-step .step-count {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
        margin-bottom: var(--space-md);
    }

    .builder-step h3 {
        font-size: 1.35rem;
        margin-bottom: var(--space-md);
    }

    .builder-step p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* Specs dashboard */
    .specs-dashboard-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .metric-row {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: var(--space-xs);
        margin-bottom: var(--space-md);
        justify-content: space-around;
    }

    .metric-divider {
        display: none;
    }
    
    .metric-large {
        flex: 1;
        min-width: 0;
    }
    
    .metric-large .value {
        font-size: 1.75rem;
    }
    
    .metric-large .unit {
        font-size: 0.75rem;
    }
    
    .metric-large .label {
        font-size: 0.7rem;
    }

    .metric-large .value {
        font-size: 2.5rem;
    }

    /* Output results grid */
    .output-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    /* QR verification - simplified mobile */
    .qr-verification-modern {
        padding: var(--space-md);
        margin-top: var(--space-lg);
    }

    .qr-viz-container {
        height: 420px;
        padding: 4px;
        margin: var(--space-md) 0;
        overflow: hidden;
    }

    #d3-qr-viz svg {
        width: 100% !important;
        height: 100% !important;
    }

    .qr-verification-svg-wrapper {
        padding: var(--space-md);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .qr-verification-svg {
        min-width: 750px;
    }

    /* Comparison grid */
    .comparison-grid>div {
        margin-bottom: var(--space-lg) !important;
    }

    .comparison-grid>div:last-child {
        margin-bottom: 0 !important;
    }

    .comparison-card {
        margin-bottom: var(--space-lg) !important;
    }

    .comparison-card:last-child {
        margin-bottom: 0 !important;
    }

    /* Highlight list - single column on mobile */
    .highlight-list {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .highlight-item {
        padding: var(--space-sm);
        margin-bottom: var(--space-md);
    }

    .highlight-item:last-child {
        margin-bottom: 0;
    }

    /* Security features grid */
    .security-features {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    /* Process cards - stack vertically */
    .process-flow {
        flex-direction: column;
    }

    .process-arrow {
        transform: rotate(90deg);
        margin: var(--space-sm) 0;
    }

    /* Footer - stack items */
    .footer-content {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }

    .footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }

    /* Navigation - hide complex nav on mobile */
    .main-nav ul {
        display: none;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo img {
        height: 32px;
    }

    /* Buttons - full width on mobile */
    .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .btn-sm {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    /* Container - reduce padding */
    .container {
        padding: 0 var(--space-sm);
    }

    /* Pure grid - ensure proper spacing */
    .pure-g {
        margin-left: 0;
        margin-right: 0;
        gap: 0;
    }

    /* Pure grid items - add spacing between cards */
    [class*="pure-u"] {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: var(--space-lg) !important;
    }

    [class*="pure-u"]:last-child {
        margin-bottom: 0 !important;
    }

    /* Builder grid specific spacing - compact on mobile */
    .builder-grid>[class*="pure-u"] {
        margin-bottom: var(--space-sm) !important;
    }

    .builder-grid>[class*="pure-u"]:last-child {
        margin-bottom: 0 !important;
    }
}

/* ========================================
   EXTRA SMALL MOBILE (max-width: 480px)
======================================== */

@media (max-width: 480px) {

    /* Even more compact for small phones */
    .hero-title {
        font-size: 1.75rem;
    }

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

    h3 {
        font-size: 1.1rem;
    }

    .hero-section,
    .capabilities-section,
    .builder-section,
    .ocr-section,
    .comparison-section,
    .process-section,
    .onelayer-section,
    .specs-section {
        padding: var(--space-md) 0;
    }

    #d3-hero-viz {
        height: 280px !important;
    }

    /* Builder Animation styles in builder-animation.css (BEM structure) */

    .security-features,
    .output-results-grid {
        grid-template-columns: 1fr;
    }

    .metric-large .value {
        font-size: 2rem;
    }

    .comparison-chart-card h3 {
        font-size: 1.1rem !important;
    }

    /* ===== MOBILE COMPACT SPACING FIXES ===== */
    
    /* Highlight Grid - Extra compact spacing */
    .highlight-grid {
        margin-top: var(--space-xs) !important;
        gap: 0 !important;
    }
    
    .highlight-grid > [class*="pure-u"] {
        padding: 0 var(--space-xs) !important;
        margin-bottom: var(--space-xs) !important;
    }
    
    .highlight-card,
    .data-x-highlight-card {
        padding: var(--space-sm) !important;
        margin-bottom: 0 !important;
    }
    
    /* Builder Process Visual - Compact spacing */
    .builder-process-visual {
        margin-top: var(--space-md) !important;
        margin-bottom: var(--space-sm) !important;
        padding: var(--space-sm) 0 !important;
    }
    
    .process-title {
        margin-bottom: var(--space-xs) !important;
        font-size: 1rem !important;
    }
    
    #d3-pipeline-viz {
        height: 140px !important;
        min-height: 140px !important;
    }
    
    /* OCR Timeline - Compact spacing */
    .ocr-timeline {
        margin-top: var(--space-sm) !important;
        gap: var(--space-sm) !important;
        grid-template-columns: 1fr !important;
    }
    
    .timeline-card {
        padding: var(--space-sm) !important;
        margin-bottom: 0 !important;
    }
    
    .timeline-index {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
        margin-bottom: var(--space-xs) !important;
    }
    
    /* Comparison viz - Fix horizontal fit */
    #d3-comparison-viz {
        height: 200px !important;
        min-height: 200px !important;
    }
    
    .comparison-chart-card .chart-body {
        padding: var(--space-sm) !important;
    }
    
    .comparison-chart-card .chart-header {
        padding: var(--space-sm) var(--space-md) !important;
    }
    
    /* General mobile compact adjustments */
    .module-content {
        padding: var(--space-sm) !important;
    }
    
    .pillars-grid {
        gap: var(--space-sm) !important;
    }
    
    .pillar-card {
        padding: var(--space-sm) !important;
    }
    
    /* Metric row - keep as row on mobile, make items fit */
    .metric-row {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: var(--space-xs) !important;
        justify-content: space-around !important;
        align-items: center !important;
    }
    
    .metric-large {
        text-align: center !important;
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .metric-large .value {
        font-size: 1.5rem !important;
    }
    
    .metric-large .unit {
        font-size: 0.7rem !important;
    }
    
    .metric-large .label {
        font-size: 0.65rem !important;
    }
    
    .metric-divider {
        display: none !important;
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {

    .site-header,
    .site-footer,
    #download-pdf-nav,
    #replay-btn {
        display: none !important;
    }

    main {
        margin-top: 0;
    }

    .module {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ========================================
   UTILITY CLASSES
======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   MOBILE: DISABLE ALL FADE/SCROLL ANIMATIONS
   Content loads instantly - no opacity/transform delays
======================================== */

@media (max-width: 767px) {

    /* Modules - instant visibility, no fade */
    .module {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    .module.visible {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Fade-in utility - disabled on mobile */
    .fade-in {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* ===== TABLET/MOBILE COMPACT SPACING ===== */
    .highlight-grid {
        margin-top: var(--space-xs) !important;
        gap: 0 !important;
    }
    
    .highlight-grid > [class*="pure-u"] {
        margin-bottom: var(--space-xs) !important;
    }

    /* All sections - instant visibility */
    section.module,
    .hero-section,
    .capabilities-section,
    .builder-section,
    .ocr-section,
    .comparison-section,
    .process-section,
    .onelayer-section,
    .specs-section,
    .cta-section {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    /* Cards and containers - instant */
    .card,
    .capability-card,
    .builder-summary,
    .highlight-item,
    .builder-step,
    .comparison-card {
        opacity: 1 !important;
        transform: none !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    }

    /* Lists - instant visibility */
    .hero-points li,
    .capability-points li,
    .highlight-item,
    .builder-step,
    .timeline-card {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

/* ========================================
   ENGAGEMENT & INTERACTION POLISH
======================================== */

/* Smooth touch interactions for mobile */
@media (hover: none) and (pointer: coarse) {

    .btn,
    .card,
    .capability-card,
    .builder-step,
    .comparison-card,
    .benefit-item {
        -webkit-tap-highlight-color: rgba(34, 197, 94, 0.1);
    }

    /* Prevent double-tap zoom on buttons */
    .btn {
        touch-action: manipulation;
    }
}

/* Enhanced focus states for accessibility */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 2px;
}

/* Improve touch targets on mobile */
@media (max-width: 767px) {

    .btn,
    a,
    button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Optimize animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Dark mode support (system preference) */
@media (prefers-color-scheme: dark) {
    /* Keep white theme even in dark mode - brand decision */
    /* Future: Add dark mode toggle if needed */
}

/* High contrast mode support */
@media (prefers-contrast: high) {

    .card,
    .capability-card,
    .comparison-card {
        border-width: 2px;
    }

    .btn {
        border-width: 3px;
    }
}

/* ========================================
   BRUTALIST MICRO ELEMENTS & BADGES
======================================== */

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--white);
    border: var(--border-width) solid var(--black);
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.15);
}

.status-badge.active {
    background: var(--green);
    color: var(--white);
    border-color: var(--black);
}

.status-badge.pending {
    background: #fbbf24;
    color: var(--black);
}

.status-badge.error {
    background: #ef4444;
    color: var(--white);
}

/* Micro Badge */
.micro-badge {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--green);
    color: var(--white);
    border: 2px solid var(--black);
    border-radius: var(--radius);
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.2);
}

/* Icon Badge */
.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--white);
    border: var(--border-width) solid var(--black);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
}

.icon-badge:hover {
    /* transform: translate(-2px, -2px); */
    /* box-shadow: var(--shadow-lg); */
    background: var(--green);
    color: var(--white);
}

/* ========================================
   TAB-BASED MOBILE SYSTEM
   Icons as tabs that reveal content
======================================== */

/* Tab Container */
.tab-container {
    width: 100%;
}

/* Tab Navigation - Icon Row */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tab-nav::-webkit-scrollbar {
    display: none;
}

/* Tab Button - Icon Style */
.tab-btn {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: var(--space-sm);
    min-width: 4rem;
    background: var(--white);
    border: var(--border-width) solid var(--black);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--black);
}

.tab-btn:hover {
    /* transform: translate(-2px, -2px); */
    /* box-shadow: var(--shadow-lg); */
    background: var(--green-bg);
}

.tab-btn.active {
    background: var(--green);
    color: var(--white);
    border-color: var(--black);
    box-shadow: var(--shadow-green);
    font-weight: 700;
}

.tab-btn-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.tab-btn-label {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: tabReveal 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes tabReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: Show all tabs content at once */
@media (min-width: 1024px) {
    .tab-nav {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .tab-content {
        display: block !important;
        animation: none;
    }

    .tab-content-wrapper {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: var(--space-md);
    }
}

/* ========================================
   COMPACT ONE-ROW ICON VIEW
======================================== */

.icon-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: center;
    justify-content: flex-start;
}

.icon-row-compact {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: var(--space-sm) 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.icon-row-compact::-webkit-scrollbar {
    height: 4px;
}

.icon-row-compact::-webkit-scrollbar-track {
    background: var(--bg-grey);
}

.icon-row-compact::-webkit-scrollbar-thumb {
    background: var(--green);
    border-radius: 2px;
}

/* Icon Item */
.icon-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--space-md);
    min-width: 5rem;
    background: var(--white);
    border: var(--border-width) solid var(--black);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    text-decoration: none;
    color: var(--black);
}

.icon-item:hover {
    /* transform: translate(-3px, -3px); */
    /* box-shadow: var(--shadow-lg); */
    border-color: var(--green);
    /* border-width: var(--border-width-lg); */
}

.icon-item-icon {
    font-size: 2rem;
    color: var(--green);
}

.icon-item-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.05em;
}

/* Grid Fallback for Small Elements */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-md);
}

@media (max-width: 767px) {
    .icon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
}


/* ========================================
   BRUTALIST FEATURE CARDS
======================================== */

.feature-card {
    background: var(--white);
    padding: var(--space-lg);
    border: var(--border-width) solid var(--black);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition-fast);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    /* transform: translate(-4px, -4px); */
    /* box-shadow: var(--shadow-lg); */
    border-color: var(--green);
    /* border-width: var(--border-width-lg); */
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-bg);
    border: var(--border-width) solid var(--green);
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
    font-size: 2rem;
    color: var(--green);
    box-shadow: 4px 4px 0px 0px rgba(34, 197, 94, 0.2);
}

.feature-title {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-sm);
}

.feature-desc {
    color: var(--grey);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ========================================
   PAGE CONTENT - Default Pages
======================================== */

.page-content {
    padding: var(--space-xl) 0;
    background: var(--white);
}

.page-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--black);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    border-bottom: var(--border-width) solid var(--green);
    padding-bottom: var(--space-sm);
}

.page-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--black);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.page-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

.page-content p {
    line-height: 1.8;
    margin-bottom: var(--space-md);
    color: var(--dark);
}

.page-content hr {
    border: none;
    border-top: var(--border-width) solid var(--border);
    margin: var(--space-lg) 0;
}

.page-content ul,
.page-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.page-content li {
    margin-bottom: var(--space-xs);
    line-height: 1.7;
}

.page-content blockquote {
    background: var(--bg-grey);
    border-left: var(--border-width-lg) solid var(--green);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0;
    font-style: italic;
}

.page-content blockquote cite {
    display: block;
    margin-top: var(--space-sm);
    font-style: normal;
    font-weight: 700;
    color: var(--green);
}

.page-content code {
    background: var(--bg-grey);
    padding: 2px 6px;
    border: 2px solid var(--border);
    font-family: monospace;
    font-size: 0.9em;
}

.page-content pre {
    background: var(--dark);
    color: var(--green);
    padding: var(--space-md);
    overflow-x: auto;
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
    margin: var(--space-md) 0;
}

.page-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--green-light);
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
}

.page-content th {
    background: var(--black);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.page-content td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 2px solid var(--border);
}

.page-content tr:nth-child(even) {
    background: var(--bg-grey);
}

.page-content kbd {
    background: var(--dark);
    color: var(--white);
    padding: 2px 8px;
    border: 2px solid var(--black);
    font-family: monospace;
    font-size: 0.85em;
    box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.3);
}

.page-content mark {
    background: var(--green);
    color: var(--white);
    padding: 2px 6px;
}

/* ========================================
   NOTICES - Markdown Notices Plugin
======================================== */

.notices {
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-md) 0;
    border: var(--border-width) solid var(--black);
    border-left-width: var(--border-width-lg);
    box-shadow: var(--shadow);
}

.notices p {
    margin: 0;
}

/* Yellow - Warning */
.notices.yellow {
    background: #fef9c3;
    border-left-color: #eab308;
}

/* Red - Error */
.notices.red {
    background: #fee2e2;
    border-left-color: #ef4444;
}

/* Blue - Info */
.notices.blue {
    background: #e0f2fe;
    border-left-color: #0ea5e9;
}

/* Green - Success */
.notices.green {
    background: #dcfce7;
    border-left-color: var(--green);
}

/* ========================================
   THEME REFERENCE - Showcase Styles
======================================== */

.theme-reference h2 {
    border-left: var(--border-width-lg) solid var(--green);
    padding-left: var(--space-md);
    background: var(--bg-grey);
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

/* Color Palette Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

@media (min-width: 768px) {
    .color-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.color-swatch {
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-sm);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow);
}

.color-swatch .color-name {
    font-weight: 800;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.color-swatch .color-value {
    font-family: monospace;
    font-size: 0.75rem;
}

.color-green {
    background: var(--green);
    color: var(--white);
}

.color-green-dark {
    background: var(--green-dark);
    color: var(--white);
}

.color-black {
    background: var(--black);
    color: var(--white);
}

.color-dark {
    background: var(--dark);
    color: var(--white);
}

/* Button Showcase */
.button-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin: var(--space-md) 0;
    padding: var(--space-lg);
    background: var(--bg-grey);
    border: var(--border-width) solid var(--border);
}

/* Card Showcase */
.card-showcase {
    margin: var(--space-md) 0;
}

.card-showcase .card {
    max-width: 400px;
}

/* Icon Showcase */
.icon-showcase {
    display: flex;
    gap: var(--space-md);
    margin: var(--space-md) 0;
    padding: var(--space-lg);
    background: var(--bg-grey);
    border: var(--border-width) solid var(--border);
}

/* Badge showcase inline */
.page-content .hero-badge,
.page-content .section-badge,
.page-content .micro-badge {
    margin-right: var(--space-sm);
}

/* ========================================
   MODAL - BRUTALIST STYLE
======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding: var(--space-md);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border: var(--border-width) solid var(--black);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--grey);
    transition: all 0.15s ease;
}

.modal-close:hover {
    color: var(--black);
    border-color: var(--black);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-bg);
    border: var(--border-width) solid var(--green);
    font-size: 1.75rem;
    color: var(--green);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--black);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-text {
    font-size: 0.9375rem;
    color: var(--grey);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
}