:root {
    /* Color Palette */
    --bg:          #F6F4F0; /* Warm paper white */
    --bg2:         #EFECE7; /* Warm soft grey */
    --card:        #FFFFFF; /* Crisp card background */
    --text:        #131513; /* Bold dark slate */
    --text-2:      #4D5950; /* Mid-tone slate green-grey */
    --text-3:      #8E9C95; /* Muted green-grey */
    --green:       #00573A; /* Deep Forest Green (Primary Brand) */
    --green-mid:   #00895A; /* Accent Green */
    --green-vivid: #00C462; /* Status/Active Green */
    --green-dim:   rgba(0, 87, 58, 0.05);
    --border:      rgba(0, 0, 0, 0.08);
    --border-2:    rgba(0, 0, 0, 0.11);
    
    /* Box Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 12px 32px rgba(0, 87, 58, 0.08), 0 2px 8px rgba(0, 87, 58, 0.04);
    --shadow-header: 0 2px 10px rgba(0, 0, 0, 0.02);

    /* Fonts */
    --f:      'Outfit', sans-serif;
    --f-logo: 'Syne', sans-serif;
    --f-mono: 'JetBrains Mono', monospace;

    /* Spacing & Layout */
    --section-padding: clamp(4rem, 8vw, 7.5rem);
    --container-max: 1200px;
    --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.15s ease-out;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--f);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Subtle paper texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.018;
}

.wrapper {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

/* ===================== TYPOGRAPHY ===================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.8rem, 6.5vw, 5rem);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.4rem, 2.8vw, 1.8rem);
}

p {
    color: var(--text-2);
}

p.lead {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.6;
    color: var(--text-2);
}

.em {
    color: var(--green);
    font-style: normal;
}

/* ===================== LAYOUT & UTILITIES ===================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    padding: 0 clamp(1.25rem, 5vw, 5rem);
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 2.5vw, 2rem);
}

/* Eyebrow & Badges */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    color: var(--green-mid);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 1.5rem;
}

.eyebrow::before {
    content: '';
    width: 18px;
    height: 1px;
    background: currentColor;
    flex-shrink: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.9rem;
    border-radius: 100px;
    background: var(--green-dim);
    border: 1px solid rgba(0, 87, 58, 0.13);
    font-family: var(--f-mono);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
}

.pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green-vivid);
    animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    font-family: var(--f);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--green);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #003a26;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 87, 58, 0.18);
}

.btn-primary:hover .arr {
    transform: translateX(4px);
}

.btn-secondary {
    background: var(--bg2);
    color: var(--text);
    border: 1px solid var(--border-2);
}

.btn-secondary:hover {
    background: var(--card);
    border-color: var(--green);
    transform: translateY(-2px);
}

.btn .arr {
    display: inline-block;
    transition: transform var(--transition);
}

/* ===================== HEADER ===================== */
header {
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: height var(--transition), background var(--transition), box-shadow var(--transition);
}

header.scrolled {
    height: 60px;
    background: var(--card);
    box-shadow: var(--shadow-header);
}

header .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--f-logo);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logo em {
    color: var(--green);
    font-style: normal;
}

nav {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.8vw, 1.5rem);
}

nav a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-2);
    position: relative;
    padding: 0.4rem 0;
}

nav a:hover, nav a.active {
    color: var(--green);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--green);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition);
}

nav a:hover::after, nav a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 1.8vw, 1.5rem);
}

/* Hamburger menu button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    padding: 13px 10px;
    position: relative;
    z-index: 102;
    box-sizing: border-box;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    position: absolute;
    left: 10px;
    transition: all var(--transition);
}

.hamburger span:nth-child(1) { top: 13px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 29px; }

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile drawer navigation */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--card);
    z-index: 101;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    padding: 6rem 2rem 4rem 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform var(--transition);
}

.mobile-nav.open {
    transform: translateX(0);
}

.mobile-nav a {
    font-size: 1.5rem;
    font-weight: 500;
    font-family: var(--f);
    color: var(--text);
    padding: 0.8rem 2rem;
    display: inline-block;
    transition: color var(--transition);
}

.mobile-nav a.active {
    color: var(--green);
}

/* ===================== FOOTER ===================== */
footer {
    border-top: 1px solid var(--border);
    background: var(--card);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.footer-info .logo {
    margin-bottom: 1.25rem;
}

.footer-info p {
    font-size: 0.92rem;
    max-width: 280px;
    color: var(--text-2);
    margin-bottom: 1.5rem;
}

.footer-col h4 {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-3);
    margin-bottom: 1.25rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col ul a {
    font-size: 0.9rem;
    color: var(--text-2);
}

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

.footer-contact p {
    font-size: 0.9rem;
    color: var(--text-2);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.footer-contact p i {
    color: var(--green-mid);
    margin-top: 0.2rem;
    width: 14px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p, .footer-bottom a {
    font-size: 0.8rem;
    color: var(--text-3);
}

.footer-bottom .f-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom .f-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

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

/* ===================== HERO (PAGE HEADER) ===================== */
.hero-page {
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: clamp(4rem, 8vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6rem);
    position: relative;
    overflow: hidden;
}

.hero-page .hero-bg-num {
    position: absolute;
    right: -2%;
    bottom: -15%;
    font-family: var(--f-logo);
    font-weight: 800;
    font-size: clamp(120px, 25vw, 300px);
    line-height: 1;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(0, 87, 58, 0.045);
    pointer-events: none;
    user-select: none;
}

.hero-page-content {
    max-width: 800px;
}

.hero-page h1 {
    margin-bottom: 1.25rem;
}

/* ===================== CARDS & SECTIONS ===================== */
.card {
    background: var(--card);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    padding: 2.25rem;
    box-shadow: var(--shadow-card);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 87, 58, 0.18);
}

/* Divider band */
.band {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

/* Statistics row */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.stat {
    padding: 2rem clamp(1.25rem, 3vw, 2.5rem);
    border-right: 1px solid var(--border);
    position: relative;
    transition: background var(--transition);
}

.stat:last-child {
    border-right: none;
}

.stat::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.stat:hover {
    background: var(--green-dim);
}

.stat:hover::after {
    transform: scaleX(1);
}

.stat-val {
    font-family: var(--f);
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: var(--text);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.stat-val em {
    color: var(--green);
    font-style: normal;
}

.stat-key {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    font-weight: 500;
}

/* Info Lists */
.clist {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.citem {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.citem-icon {
    color: var(--green-mid);
    width: 16px;
    flex-shrink: 0;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.citem-txt {
    font-size: 0.95rem;
    color: var(--text-2);
    line-height: 1.5;
}

.citem-txt strong {
    color: var(--text);
}

/* ===================== FORMS ===================== */
.fcard {
    background: var(--card);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-card);
}

.fcard-h {
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
}

.fcard-sub {
    font-size: 0.85rem;
    color: var(--text-3);
    margin-bottom: 2rem;
}

.fgroup {
    margin-bottom: 1.25rem;
}

.fgroup label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-3);
    margin-bottom: 0.5rem;
}

.fgroup input, .fgroup select, .fgroup textarea {
    width: 100%;
    font-family: var(--f);
    font-size: 0.92rem;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    padding: 0 1.1rem;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.fgroup input {
    height: 48px;
}

.fgroup textarea {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    resize: vertical;
    min-height: 120px;
}

.fgroup input::placeholder, .fgroup textarea::placeholder {
    color: var(--text-3);
}

.fgroup input:focus, .fgroup select:focus, .fgroup textarea:focus {
    border-color: var(--green);
    background: var(--card);
    box-shadow: 0 0 0 3px rgba(0, 87, 58, 0.08);
}

.sel-wrap {
    position: relative;
}

.sel-wrap select {
    height: 48px;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.sel-wrap::after {
    content: '';
    pointer-events: none;
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-55%);
    border: 5px solid transparent;
    border-top: 6px solid var(--text-3);
    border-bottom: none;
}

.fnote {
    font-size: 0.75rem;
    color: var(--text-3);
    text-align: center;
    margin-top: 1.25rem;
    line-height: 1.6;
}

.fsuccess {
    display: none;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    background: var(--green-dim);
    border: 1px solid rgba(0, 87, 58, 0.18);
    text-align: center;
    font-size: 0.88rem;
    color: var(--green);
    font-weight: 500;
}

/* ===================== PRODUCTS PAGE SPECIFIC ===================== */
.product-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    font-family: var(--f);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-3);
    padding: 0.75rem 1.5rem;
    min-height: 44px;
    cursor: pointer;
    border-radius: 30px;
    transition: all var(--transition);
}

.tab-btn:hover {
    color: var(--text);
}

.tab-btn.active {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(0, 87, 58, 0.12);
}

.product-content {
    display: none;
}

.product-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    text-align: left;
}

.spec-table th, .spec-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.spec-table th {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-3);
    letter-spacing: 0.1em;
    background: var(--bg2);
}

.spec-table td {
    font-size: 0.95rem;
}

.spec-table tr:hover td {
    background: rgba(0, 87, 58, 0.02);
}

.spec-table td.spec-val {
    font-family: var(--f-mono);
    font-weight: 500;
    color: var(--text);
}

/* ===================== TECHNOLOGY / PROCESS ===================== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 31px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-2);
}

.timeline-step {
    position: relative;
    padding-left: 80px;
    margin-bottom: 4rem;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.t-num {
    position: absolute;
    left: 0;
    top: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-logo);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--green);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 87, 58, 0.06);
}

.timeline-step h3 {
    margin-bottom: 0.75rem;
}

.timeline-step p {
    font-size: 0.98rem;
    max-width: 650px;
}

.tech-comparison {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-2);
}

.tech-comparison th, .tech-comparison td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.tech-comparison th {
    background: var(--bg2);
    font-weight: 600;
}

.tech-comparison th:first-child {
    font-family: var(--f-mono);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
}

.tech-comparison td {
    font-size: 0.95rem;
}

.tech-comparison td:first-child {
    font-weight: 600;
}

.tech-comparison tr:last-child td {
    border-bottom: none;
}

.tech-bad {
    color: #a92020;
    font-weight: 500;
}

.tech-good {
    color: var(--green-mid);
    font-weight: 500;
}

/* ===================== SCROLL REVEAL ANIMATIONS ===================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay classes */
.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }

/* ===================== RESPONSIVE STYLES ===================== */

/* Large Screens / Medium Desktops */
@media (max-width: 1200px) {
    .header-actions .pill {
        display: none;
    }
}

/* Tablets Landscape / Small Laptops */
@media (max-width: 1024px) {
    nav {
        display: none;
    }
    .hamburger {
        display: block;
    }
}

/* Tablet & Smaller */
@media (max-width: 992px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 3.5rem;
    }

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

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .header-actions .btn {
        display: none; /* Hide primary CTA in header on mobile to fit bar */
    }

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

    .stat:nth-child(2) {
        border-right: none;
    }

    .stat:nth-child(1), .stat:nth-child(2) {
        border-bottom: 1px solid var(--border);
    }

    .timeline::before {
        left: 21px;
    }

    .timeline-step {
        padding-left: 60px;
    }

    .t-num {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .product-tabs {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
    }
}

/* Mobile & Small Screen */
@media (max-width: 580px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .stat {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1.5rem 1.25rem;
    }

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

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

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-bottom .f-links {
        justify-content: center;
    }
}

/* ===================== PROCESS FLOW PIPELINE GRAPHICS ===================== */
.factory-canvas-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.factory-canvas {
    position: relative;
    max-width: 460px;
    width: 100%;
    aspect-ratio: 460 / 480;
    background: var(--card);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    /* technical blueprint grid */
    background-image: 
        linear-gradient(rgba(0, 87, 58, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 87, 58, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    user-select: none;
    transition: transform var(--transition);
}

.factory-pipes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.factory-node {
    position: absolute;
    z-index: 3;
    background: var(--card);
    border: 1px solid var(--border-2);
    box-shadow: var(--shadow-card);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.factory-node:hover {
    border-color: var(--green-mid);
    box-shadow: var(--shadow-hover);
}

.factory-label {
    position: absolute;
    font-family: var(--f-mono);
    font-size: 8px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* 1. Feedstock Inlet */
.node-inlet {
    left: 20px;
    top: 25px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg2);
}

.node-inlet i {
    font-size: 1.5rem;
    color: var(--text-3);
}

.factory-tire {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 6px double var(--text);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    animation: tireMove 6s infinite linear;
}

.factory-tire::after {
    content: '';
    width: 8px;
    height: 2px;
    background: var(--text);
    position: absolute;
}

@keyframes tireMove {
    0% { left: 35px; top: 40px; opacity: 0; transform: scale(0.8); }
    8% { left: 35px; top: 40px; opacity: 1; transform: scale(1); }
    23% { left: 140px; top: 40px; opacity: 1; transform: scale(1) rotate(180deg); }
    26% { left: 160px; top: 40px; opacity: 0; transform: scale(0.5) rotate(220deg); }
    100% { left: 160px; top: 40px; opacity: 0; }
}

/* 2. Shredder */
.node-shredder {
    left: 140px;
    top: 25px;
    width: 80px;
    height: 60px;
}

.shredder-gears {
    display: flex;
    gap: 2px;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.shredder-gears i {
    font-size: 1.5rem;
    color: var(--text-2);
}

.gear-1 {
    animation: rotateCW 4s linear infinite;
}

.gear-2 {
    animation: rotateCCW 4s linear infinite;
    margin-left: -5px;
}

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

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

/* Conveyor Chips */
.chip {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--text);
    border-radius: 2px;
    opacity: 0;
    z-index: 2;
}

.chip-1 { animation: chipMove 6s infinite linear; animation-delay: 1.6s; }
.chip-2 { animation: chipMove 6s infinite linear; animation-delay: 3.0s; }
.chip-3 { animation: chipMove 6s infinite linear; animation-delay: 4.4s; }

@keyframes chipMove {
    0% { left: 180px; top: 52px; opacity: 0; }
    5% { left: 180px; top: 52px; opacity: 1; }
    30% { left: 347px; top: 52px; opacity: 1; }
    48% { left: 347px; top: 135px; opacity: 1; }
    50% { left: 347px; top: 140px; opacity: 0; }
    100% { left: 347px; top: 140px; opacity: 0; }
}

/* 3. Reactor Retort */
.node-reactor {
    right: 50px;
    top: 130px;
    width: 110px;
    height: 80px;
}

.reactor-kiln {
    width: 90px;
    height: 44px;
    border-radius: 6px;
    border: 2px solid var(--green);
    background: repeating-linear-gradient(
        45deg,
        var(--green-dim),
        var(--green-dim) 8px,
        rgba(0, 87, 58, 0.12) 8px,
        rgba(0, 87, 58, 0.12) 16px
    );
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
    animation: kilnRoll 20s linear infinite;
}

@keyframes kilnRoll {
    from { background-position: 0 0; }
    to { background-position: 40px 0; }
}

.reactor-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.25) 0%, transparent 80%);
    animation: heatGlow 2s ease-in-out infinite alternate;
}

@keyframes heatGlow {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

.reactor-flames {
    display: flex;
    gap: 6px;
}

.reactor-flames span {
    width: 6px;
    height: 8px;
    background: #ff5722;
    border-radius: 50% 50% 0 0;
    animation: flamePulse 0.4s ease-in-out infinite alternate;
}

.reactor-flames span:nth-child(2) {
    animation-delay: 0.15s;
    height: 12px;
    background: #ff9800;
}

.reactor-flames span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes flamePulse {
    0% { transform: scaleY(0.8); }
    100% { transform: scaleY(1.2); }
}

/* Vapor Particles */
.vapor {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(0, 137, 90, 0.12);
    border: 1px solid rgba(0, 137, 90, 0.25);
    border-radius: 50%;
    opacity: 0;
    z-index: 2;
}

.vapor-1 { animation: vaporMove 6s infinite linear; animation-delay: 2.8s; }
.vapor-2 { animation: vaporMove 6s infinite linear; animation-delay: 4.2s; }
.vapor-3 { animation: vaporMove 6s infinite linear; animation-delay: 5.6s; }

@keyframes vaporMove {
    0% { left: 347px; top: 130px; opacity: 0; transform: scale(0.5); }
    5% { left: 347px; top: 130px; opacity: 0.8; transform: scale(1); }
    8% { left: 347px; top: 107px; opacity: 0.8; }
    40% { left: 97px; top: 107px; opacity: 0.8; }
    55% { left: 97px; top: 225px; opacity: 0.8; }
    60% { left: 97px; top: 235px; opacity: 0; transform: scale(0.8); }
    100% { left: 97px; top: 235px; opacity: 0; }
}

/* 4. Condenser Column */
.node-condenser {
    left: 70px;
    top: 220px;
    width: 60px;
    height: 100px;
    background: #eef7f4;
    border-color: var(--green-mid);
}

.condenser-coil {
    width: 24px;
    height: 72px;
    border: 2px solid rgba(0, 180, 255, 0.3);
    border-radius: 6px;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 5px,
        rgba(0, 180, 255, 0.15) 5px,
        rgba(0, 180, 255, 0.15) 10px
    );
    position: relative;
    animation: coilCool 1.5s ease-in-out infinite alternate;
}

@keyframes coilCool {
    0% { border-color: rgba(0, 180, 255, 0.2); box-shadow: none; }
    100% { border-color: rgba(0, 180, 255, 0.5); box-shadow: 0 0 8px rgba(0, 180, 255, 0.25); }
}

/* Oil Drops */
.oil-drop {
    position: absolute;
    width: 5px;
    height: 7px;
    background: #d4af37;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    opacity: 0;
    z-index: 2;
}

.drop-1 { animation: dropMove 3s infinite ease-in; animation-delay: 0.8s; }
.drop-2 { animation: dropMove 3s infinite ease-in; animation-delay: 1.8s; }
.drop-3 { animation: dropMove 3s infinite ease-in; animation-delay: 2.8s; }

@keyframes dropMove {
    0% { left: 97px; top: 317px; opacity: 0; transform: scale(0.6); }
    10% { left: 97px; top: 325px; opacity: 1; transform: scale(1); }
    55% { left: 97px; top: 392px; opacity: 1; }
    70% { left: 180px; top: 392px; opacity: 1; }
    73% { left: 190px; top: 392px; opacity: 0; }
    100% { left: 190px; top: 392px; opacity: 0; }
}

/* 5. Oil Tank */
.node-oiltank {
    left: 155px;
    bottom: 25px;
    width: 70px;
    height: 90px;
}

.tank-glass {
    width: 50px;
    height: 62px;
    border: 2px solid var(--border-2);
    border-radius: 4px;
    background: #fafafa;
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
}

.tank-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, var(--green) 0%, #d4af37 100%);
    opacity: 0.85;
    animation: liquidFill 4s ease-in-out infinite alternate;
}

@keyframes liquidFill {
    0% { height: 35%; }
    100% { height: 75%; }
}

.tank-liquid::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
}

/* 6. Solids pile */
.node-solids {
    right: 50px;
    bottom: 25px;
    width: 110px;
    height: 90px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 12px;
    align-items: flex-end;
    justify-content: center;
}

.pile-carbon {
    width: 32px;
    height: 22px;
    background: #1e1e1e;
    border-radius: 50% 50% 0 0;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.1);
    position: relative;
}

.pile-carbon::after {
    content: 'Carbon';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--f-mono);
    font-size: 7px;
    color: var(--text-3);
    text-transform: uppercase;
}

.pile-steel {
    width: 32px;
    height: 25px;
    border: 1.5px solid #a2a2a2;
    border-bottom: none;
    border-radius: 50% 50% 0 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        #777 2px,
        #777 4px
    );
    position: relative;
}

.pile-steel::after {
    content: 'Steel';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--f-mono);
    font-size: 7px;
    color: var(--text-3);
    text-transform: uppercase;
}

/* Labels on Blueprint */
.lbl-inlet { left: 24px; top: 90px; }
.lbl-shred { left: 155px; top: 90px; }
.lbl-reactor { right: 70px; top: 216px; }
.lbl-condenser { left: 63px; top: 325px; }
.lbl-oiltank { left: 165px; bottom: 120px; }
.lbl-solids { right: 88px; bottom: 120px; }

/* Factory canvas is now fluid via max-width + aspect-ratio; no scale hacks needed */

/* ===================== CARD YIELD VISUAL ANIMATIONS ===================== */
.card-visual-container {
    position: relative;
    width: 100%;
    height: 110px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.015);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.card:hover .card-visual-container {
    border-color: rgba(0, 87, 58, 0.12);
    box-shadow: var(--shadow-hover);
}

.visual-svg {
    width: 100%;
    height: 100%;
    max-width: 140px;
    max-height: 100px;
}

.visual-label {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-family: var(--f-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--green-mid);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

/* 1. Oil Filling Animation */
.oil-fill-level {
    transform-origin: bottom;
    animation: cardOilFill 6s ease-in-out infinite;
}

.oil-drip-flow {
    animation: cardOilDrip 1.5s infinite linear;
}

@keyframes cardOilFill {
    0% { height: 0px; y: 59px; }
    60% { height: 22.5px; y: 36.5px; } /* fills up to 45% */
    85% { height: 22.5px; y: 36.5px; }
    100% { height: 0px; y: 59px; }
}

@keyframes cardOilDrip {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    60% { transform: translateY(30px); opacity: 1; }
    65%, 100% { transform: translateY(30px); opacity: 0; }
}

/* 2. Carbon Accumulation Animation */
.carbon-drop-stream {
    animation: cardCarbonStream 6s linear infinite;
}

.carbon-pile-grow {
    transform-origin: 50px 58px;
    animation: cardCarbonGrow 6s ease-in-out infinite;
}

@keyframes cardCarbonStream {
    0%, 60% { stroke-dashoffset: 20; opacity: 1; }
    61%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes cardCarbonGrow {
    0% { transform: scaleY(0); }
    60% { transform: scaleY(1); } /* grows up to 30% height */
    85% { transform: scaleY(1); }
    100% { transform: scaleY(0); }
}

/* 3. Steel Separation Animation */
.steel-tyre-chip {
    animation: cardSteelChip 6s linear infinite;
}

.steel-wire-pull {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: cardSteelWire 6s ease-in-out infinite;
}

@keyframes cardSteelChip {
    0% { cx: 15; opacity: 1; }
    30% { cx: 45; }
    35% { cx: 45; opacity: 0; }
    70%, 100% { cx: 15; opacity: 0; }
}

@keyframes cardSteelWire {
    0%, 25% { stroke-dashoffset: 60; opacity: 0; }
    30% { opacity: 1; }
    60% { stroke-dashoffset: 0; opacity: 1; }
    85% { opacity: 1; }
    100% { stroke-dashoffset: -60; opacity: 0; }
}

/* ===================== BACK TO TOP BUTTON ===================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--green);
    color: var(--bg);
    border: 1px solid rgba(0, 137, 90, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 87, 58, 0.2);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                background-color 0.3s, 
                opacity 0.4s, 
                visibility 0.4s;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--green-mid);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 137, 90, 0.35);
}

.back-to-top:active {
    transform: translateY(-2px) scale(0.98);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--green-vivid);
    outline-offset: 3px;
}

/* ===================== BREADCRUMB NAVIGATION ===================== */
.breadcrumbs {
    font-size: 0.82rem;
    font-family: var(--f-mono, monospace);
    color: var(--text-3);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: var(--text-2);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--green-mid);
}

.breadcrumbs i {
    font-size: 0.75rem;
    color: var(--text-3);
    opacity: 0.6;
}

.breadcrumbs span {
    color: var(--text-3);
}


