:root {
    --chrome-base: #B8C0CA;
    --chrome-highlight: #E8ECF0;
    --chrome-shadow: #6B7685;
    --chrome-dark: #3A424D;
    --chrome-wire-light: #B0B8C1;
    --chrome-wire-mid: #D4D8DD;
    --chrome-wire-bright: #F0F2F5;
    --glass-tint: #F4F6F8;
    --candle-glow: #FFB74D;
    --candle-deep: #E6952E;
    --candle-soft: #FFF3E0;
    --bg-night: #1A1E24;
    --bg-alt: #242A32;
    --text-primary: #E0E4E8;
    --text-secondary: #8A929C;
    --font-display: 'Nunito Sans', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;
    --cursor-x: 50%;
    --cursor-y: 50%;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-night);
    color: var(--text-primary);
    line-height: 1.72;
    overflow-x: hidden;
}

/* ========== ISOMETRIC GRID BACKGROUND ========== */
.isometric-grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(
            30deg,
            transparent,
            transparent 47px,
            rgba(58, 66, 77, 0.2) 47px,
            rgba(58, 66, 77, 0.2) 48px
        ),
        repeating-linear-gradient(
            150deg,
            transparent,
            transparent 47px,
            rgba(58, 66, 77, 0.2) 47px,
            rgba(58, 66, 77, 0.2) 48px
        );
}

/* ========== CURSOR CANDLE LIGHT ========== */
.cursor-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(
        circle 200px at var(--cursor-x) var(--cursor-y),
        rgba(255, 183, 77, 0.07),
        transparent
    );
    transition: background 0.1s ease;
}

/* ========== CHROME WORKSHOP ========== */
.chrome-workshop {
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, var(--bg-night), var(--bg-alt));
    overflow: hidden;
}

.hero-candles-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.hero-candle-float {
    position: absolute;
    animation: floatUp linear infinite;
    opacity: 0;
}

.hcf-1 { left: 10%; animation-duration: 18s; animation-delay: 0s; }
.hcf-2 { left: 25%; animation-duration: 22s; animation-delay: 3s; }
.hcf-3 { left: 40%; animation-duration: 20s; animation-delay: 6s; }
.hcf-4 { left: 55%; animation-duration: 24s; animation-delay: 1s; }
.hcf-5 { left: 70%; animation-duration: 19s; animation-delay: 8s; }
.hcf-6 { left: 85%; animation-duration: 21s; animation-delay: 4s; }
.hcf-7 { left: 15%; animation-duration: 23s; animation-delay: 10s; }
.hcf-8 { left: 60%; animation-duration: 17s; animation-delay: 7s; }

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120px) rotate(15deg);
        opacity: 0;
    }
}

.hero-glass {
    text-align: center;
    padding: 5rem 6rem;
    background: rgba(244, 246, 248, 0.06);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, rgba(232, 236, 240, 0.3), rgba(184, 192, 202, 0.15), rgba(107, 118, 133, 0.2)) 1;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    z-index: 2;
}

.hero-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(232, 236, 240, 0.2), transparent 50%, rgba(107, 118, 133, 0.1));
    pointer-events: none;
    border-radius: 16px;
}

.hero-glow {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 260px;
    height: 100px;
    background: radial-gradient(ellipse, rgba(255, 183, 77, 0.12), transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 9vw, 7rem);
    font-weight: 800;
    color: var(--chrome-highlight);
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(15px) translateZ(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-title.revealed {
    opacity: 1;
    transform: translateY(0) translateZ(20px);
}

.hero-dot {
    color: var(--candle-glow);
}

.hero-sub {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 300;
    color: var(--text-secondary);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.hero-sub.revealed {
    opacity: 0.7;
    transform: translateY(0);
}

.hero-chevron {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 1s ease 0.6s;
    animation: pulseChevron 2s ease-in-out infinite;
    z-index: 2;
}

.hero-chevron.revealed {
    opacity: 0.6;
}

@keyframes pulseChevron {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ========== TIMELINE ========== */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

.timeline-wire-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.timeline-wire-line {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
    transition: stroke-dashoffset 0.05s linear;
}

/* Wire gradient colors: #B0B8C1 -> #F0F2F5 -> #D4D8DD (applied via SVG inline) */

/* ========== ICON CLUSTERS ========== */
.icon-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 2rem 0;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.icon-cluster.revealed {
    opacity: 1;
    transform: scale(1);
}

.iso-icon {
    animation: isoRotate 12s ease-in-out infinite;
}

.iso-icon:nth-child(2) {
    animation-delay: -4s;
}

@keyframes isoRotate {
    0%, 100% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(8deg) rotateX(-3deg); }
    50% { transform: rotateY(0deg) rotateX(0deg); }
    75% { transform: rotateY(-8deg) rotateX(3deg); }
}

/* ========== TIMELINE NODES ========== */
.timeline-node {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.timeline-node.revealed {
    opacity: 1;
    transform: translateX(0) !important;
}

.node-left {
    flex-direction: row;
    padding-right: calc(50% + 2.5rem);
    transform: translateX(-30px);
}

.node-right {
    flex-direction: row-reverse;
    padding-left: calc(50% + 2.5rem);
    transform: translateX(30px);
}

/* ========== JUNCTION ========== */
.node-junction {
    position: absolute;
    left: 50%;
    top: 2.5rem;
    transform: translateX(-50%);
    z-index: 5;
}

.junction-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--chrome-shadow);
    border: 2px solid var(--chrome-dark);
    box-shadow: 0 0 0 rgba(255, 183, 77, 0);
    transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.junction-dot.lit {
    background: var(--candle-glow);
    border-color: var(--candle-deep);
    box-shadow: 0 0 16px rgba(255, 183, 77, 0.6);
    animation: junctionFlicker 2s ease-in-out infinite;
}

@keyframes junctionFlicker {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 183, 77, 0.3); }
    50% { box-shadow: 0 0 20px rgba(255, 183, 77, 0.7); }
}

.junction-label {
    position: absolute;
    top: 50%;
    left: calc(100% + 12px);
    transform: translateY(-50%);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.node-junction:hover .junction-label {
    opacity: 0.7;
}

/* ========== NODE ARMS ========== */
.node-arm {
    position: absolute;
    top: calc(2.5rem + 7px);
    height: 2px;
    background: linear-gradient(90deg, var(--chrome-dark), var(--chrome-base));
    z-index: 2;
}

.arm-left {
    right: 50%;
    left: calc(50% - 2.5rem);
    width: 2.5rem;
    background: linear-gradient(90deg, var(--chrome-base), var(--chrome-dark));
    right: auto;
}

.arm-right {
    left: 50%;
    width: 2.5rem;
    background: linear-gradient(90deg, var(--chrome-dark), var(--chrome-base));
}

/* ========== GLASS PANELS ========== */
.glass-panel {
    width: 100%;
    position: relative;
    background: rgba(244, 246, 248, 0.06);
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
    border: 1px solid rgba(232, 236, 240, 0.15);
    border-radius: 16px;
    box-shadow: inset 0 0 40px rgba(255, 183, 77, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.4s ease, transform 0.3s ease;
    transform-style: preserve-3d;
    overflow: hidden;
}

.glass-panel:hover {
    border-color: rgba(255, 183, 77, 0.25);
    box-shadow: inset 0 0 60px rgba(255, 183, 77, 0.15), 0 8px 40px rgba(0, 0, 0, 0.2);
}

.panel-bezel {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(232, 236, 240, 0.2), transparent 50%, rgba(107, 118, 133, 0.1));
    pointer-events: none;
    z-index: 0;
    transition: background 0.3s ease;
}

.panel-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem;
    transform: translateZ(20px);
}

.tilt-left {
    transform: perspective(1000px) rotateY(4deg);
}

.tilt-right {
    transform: perspective(1000px) rotateY(-4deg);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-num {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    color: var(--candle-glow);
    opacity: 0.7;
}

.candle-icon {
    opacity: 0.5;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.candle-bright {
    opacity: 1;
}

.glass-panel:hover .candle-icon {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(255, 183, 77, 0.4));
}

.panel-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--chrome-highlight);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.1;
}

.panel-text {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.72;
}

/* ========== TERMINUS ========== */
.timeline-terminus {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
    position: relative;
    z-index: 1;
}

.terminus-medallion {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chrome-base), var(--chrome-shadow));
    border: 2px solid var(--chrome-highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(255, 183, 77, 0.1), inset 0 0 12px rgba(255, 183, 77, 0.05);
}

.terminus-candle {
    animation: candleFlicker 3s ease-in-out infinite;
}

@keyframes candleFlicker {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    30% { opacity: 0.85; transform: scale(1.03); }
    60% { opacity: 0.5; transform: scale(0.97); }
}

/* ========== FOOTER ========== */
.site-footer {
    padding: 4rem 2rem 3rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.footer-glass {
    padding: 1.5rem 3rem;
    background: rgba(244, 246, 248, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(232, 236, 240, 0.06);
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-domain {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--chrome-base);
    opacity: 0.5;
}

.footer-copy {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--text-secondary);
    opacity: 0.3;
}

/* ========== NAV TRIGGER ========== */
.nav-trigger {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(244, 246, 248, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(232, 236, 240, 0.15);
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-trigger:hover {
    background: rgba(244, 246, 248, 0.1);
    box-shadow: 0 0 12px rgba(255, 183, 77, 0.15);
}

.nav-trigger-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--chrome-base);
    transition: background 0.3s ease;
}

.nav-trigger:hover .nav-trigger-dot {
    background: var(--candle-glow);
}

/* ========== NAV OVERLAY ========== */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 30, 36, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

.nav-overlay-glass {
    padding: 3rem 4rem;
    background: rgba(244, 246, 248, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(232, 236, 240, 0.12);
    border-radius: 16px;
    min-width: 280px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.nav-overlay.active .nav-overlay-glass {
    transform: translateY(0);
}

.nav-overlay-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--candle-glow);
    margin-bottom: 2rem;
    opacity: 0.7;
}

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

.nav-item {
    margin-bottom: 0.75rem;
}

.nav-link {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--chrome-highlight);
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s ease, color 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.nav-link:hover {
    opacity: 1;
    color: var(--candle-glow);
}

/* ========== REVEAL ========== */
[data-reveal] {
    will-change: opacity, transform;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .timeline {
        padding: 4rem 1rem;
    }

    .timeline-wire-svg {
        left: 24px;
        width: 2px;
    }

    .timeline-wire-svg line {
        x1: 24px;
        x2: 24px;
    }

    .node-junction {
        left: 24px;
    }

    .node-left,
    .node-right {
        padding-left: 56px;
        padding-right: 0;
        flex-direction: row;
        transform: translateX(0);
    }

    .node-left.revealed,
    .node-right.revealed {
        transform: translateX(0) !important;
    }

    .node-arm {
        display: none;
    }

    .tilt-left,
    .tilt-right {
        transform: none;
    }

    .hero-glass {
        padding: 3rem 2rem;
        margin: 0 1rem;
    }

    .panel-content {
        padding: 1.75rem;
    }

    .junction-label {
        left: calc(100% + 8px);
    }

    .icon-cluster {
        padding: 1rem 0;
    }

    .nav-overlay-glass {
        padding: 2rem 3rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-glass {
        padding: 2.5rem 1.5rem;
    }

    .glass-panel {
        border-radius: 12px;
    }

    .panel-content {
        padding: 1.25rem;
    }

    .timeline-node {
        margin-bottom: 1rem;
    }

    .panel-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
}
