/* ==========================================================================
   HAND.AI - DESIGN SYSTEM & LAYOUT
   ========================================================================== */

:root {
    --bg-color: #fffdf9;     /* warm alabaster background */
    --card-bg: rgba(255, 253, 249, 0.65);      /* translucent base */
    --card-bg-hover: rgba(255, 253, 249, 0.8);
    --text-color: #1c1917;   /* charcoal headings */
    --text-dim: #475569;     /* slate body text */
    --border-color: rgba(212, 175, 55, 0.28); /* delicate gold border */
    --primary: #d97706;      /* amber yellow primary */
    --accent: #f59e0b;       /* amber yellow accent */
    --glass-bg: rgba(255, 253, 249, 0.65);
    --glass-bg-hover: rgba(255, 253, 249, 0.8);
    --glass-border: rgba(212, 175, 55, 0.28);
    --glass-border-hover: rgba(217, 119, 6, 0.5);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', monospace;
    --nav-height: 75px;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    --shadow-glow: 0 10px 30px -10px rgba(245, 158, 11, 0.15), 0 0 15px rgba(245, 158, 11, 0.05);
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
    background-color: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   CINEMATIC BACKGROUND EFFECTS
   ========================================================================== */

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background-color: #FFFDF9; /* Warm alabaster */
}

.grid-3d-floor {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(0deg, transparent 24%, rgba(217, 119, 6, 0.1) 25%, rgba(217, 119, 6, 0.1) 26%, transparent 27%, transparent 74%, rgba(217, 119, 6, 0.1) 75%, rgba(217, 119, 6, 0.1) 76%, transparent 77%), 
        linear-gradient(90deg, transparent 24%, rgba(217, 119, 6, 0.1) 25%, rgba(217, 119, 6, 0.1) 26%, transparent 27%, transparent 74%, rgba(217, 119, 6, 0.1) 75%, rgba(217, 119, 6, 0.1) 76%, transparent 77%);
    background-size: 50px 50px;
    background-position: center bottom;
    transform: perspective(300px) rotateX(75deg);
    transform-origin: center bottom;
    animation: gridMove 25s linear infinite;
    opacity: 0.65;
    z-index: 1;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0) 90%);
    mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.25) 50%, rgba(0, 0, 0, 0) 90%);
}
@keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 1000px; }
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4rem;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-brand {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.brand-accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.2px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
}

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

/* active link scroll spy highlight */
.nav-links a.active {
    color: var(--text-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

/* Hamburger menu button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ==========================================================================
   GLOBAL SECTION AND LAYOUT
   ========================================================================== */

.main-content {
    margin-top: var(--nav-height);
    width: 100%;
    position: relative;
    z-index: 5;
}

.section {
    padding: 6.5rem 4rem;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.sec-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem auto;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--primary);
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.8rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

.sec-desc {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.grad-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Cards with 3D Tilt */
.tilt-card, .how-card, .tech-card, .hood-card, .pipe-step, .how-step-card {
    background: rgba(255, 253, 249, 0.65); /* Alabaster translucent base */
    border: 1px solid rgba(212, 175, 55, 0.28); /* Delicate gold border */
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: transform 0.1s ease, border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    transform-style: preserve-3d;
    will-change: transform;
    color: var(--text-dim);
}

.tilt-card:hover, .how-card:hover, .tech-card:hover, .hood-card:hover, .pipe-step:hover, .how-step-card:hover {
    background: rgba(255, 253, 249, 0.8);
    border-color: rgba(217, 119, 6, 0.5); /* Warm amber border */
    box-shadow: 
        0 12px 36px -12px rgba(217, 119, 6, 0.08), /* Soft warm ambient shadow */
        inset 0 1px 1px 0 rgba(255, 255, 255, 0.95); /* Inner sheen highlight */
}

.tilt-card {
    position: relative;
}
.tilt-card::before,
.tilt-card::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid rgba(212, 175, 55, 0.55); /* Gold outline brackets */
    opacity: 0.45;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}
.tilt-card::before {
    top: -4px;
    left: -4px;
    border-right: none;
    border-bottom: none;
}
.tilt-card::after {
    bottom: -4px;
    right: -4px;
    border-left: none;
    border-top: none;
}
.tilt-card:hover::before,
.tilt-card:hover::after {
    opacity: 1;
    border-color: var(--primary); /* Rich amber gold highlight */
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   1. HERO SECTION (HOME)
   ========================================================================== */

.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: calc(80vh - var(--nav-height));
    margin-bottom: 2rem;
}

.hero-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 0.85rem;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.pill-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 2.2rem;
    max-width: 520px;
}

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

/* Premium Buttons */
button {
    font-family: var(--font-sans);
    cursor: pointer;
}

.btn-primary {
    display: inline-block;
    padding: 0.75em 1.5em;
    background: transparent;
    outline: none;
    border: 0;
    color: #d4af37; /* Metallic gold */
    letter-spacing: 0.1em;
    font-family: var(--font-mono);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.cube {
    position: relative;
    transition: all 0.5s;
}

.cube .bg-top {
    position: absolute;
    height: 8px;
    background: #d4af37;
    bottom: 100%;
    left: 4px;
    right: -4px;
    transform: skew(-45deg, 0);
    transition: all 0.4s;
}

.cube .bg {
    position: absolute;
    left: 0; bottom: 0; top: 0; right: 0;
    background: #d4af37;
    transition: all 0.4s;
}

.cube .bg-right {
    position: absolute;
    background: #d4af37;
    top: -4px;
    bottom: 4px;
    width: 8px;
    left: 100%;
    transform: skew(0, -45deg);
    transition: all 0.4s;
}

.cube .bg-inner {
    background: #1c1917; /* Charcoal core */
    position: absolute;
    left: 2px; right: 2px; top: 2px; bottom: 2px;
}

.cube .text {
    position: relative;
    transition: all 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cube:hover .bg-inner {
    background: #d4af37;
}

.cube:hover .text {
    color: #1c1917;
}

.cube:hover .bg-right,
.cube:hover .bg,
.cube:hover .bg-top {
    background: #28282d;
}

.cube:active {
    transform: scale(0.95);
}

.btn-outline {
    cursor: pointer;
    position: relative;
    padding: 12px 28px;
    font-size: 16px;
    color: rgb(193, 163, 98); /* Champagne gold */
    border: 2px solid rgb(193, 163, 98);
    border-radius: 34px;
    background-color: transparent;
    font-family: var(--font-sans);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.btn-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 50px;
    height: 50px;
    border-radius: inherit;
    transform: scale(0);
    z-index: -1;
    background-color: rgb(193, 163, 98);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.btn-outline:hover::before {
    transform: scale(3.5);
}

.btn-outline:hover {
    color: #1c1917;
    box-shadow: 0 0px 20px rgba(193, 163, 98, 0.4);
}

.btn-outline:active {
    transform: scale(0.97);
}

/* Hero Right: AI Orb Visualization */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
}

.ai-orb {
    position: relative;
    width: 320px;
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.orb-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    background: var(--primary);
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.35;
    z-index: 0;
    animation: orbPulse 6s ease-in-out infinite alternate;
}

.orb-core {
    position: relative;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(245, 158, 11, 0.15);
    box-shadow: inset 0 0 25px rgba(245, 158, 11, 0.1);
    z-index: 10;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

#heroCanvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Orbiting Rings */
.orb-ring {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
}

.orb-ring.r1 {
    width: 340px;
    height: 340px;
    border-color: rgba(245, 158, 11, 0.25);
    transform: rotateX(65deg) rotateY(15deg);
    animation: rotateRing1 18s linear infinite;
}

.orb-ring.r2 {
    width: 380px;
    height: 380px;
    border-color: rgba(217, 119, 6, 0.25);
    transform: rotateX(-50deg) rotateY(30deg);
    animation: rotateRing2 22s linear infinite;
}

.orb-ring.r3 {
    width: 420px;
    height: 420px;
    border-color: rgba(245, 158, 11, 0.15);
    transform: rotateX(25deg) rotateY(-40deg);
    animation: rotateRing3 30s linear infinite;
}

@keyframes orbPulse {
    0% { transform: scale(1); opacity: 0.3; filter: blur(40px); }
    100% { transform: scale(1.15); opacity: 0.55; filter: blur(60px); }
}

@keyframes rotateRing1 {
    to { transform: rotateX(65deg) rotateY(15deg) rotateZ(360deg); }
}
@keyframes rotateRing2 {
    to { transform: rotateX(-50deg) rotateY(30deg) rotateZ(-360deg); }
}
@keyframes rotateRing3 {
    to { transform: rotateX(25deg) rotateY(-40deg) rotateZ(360deg); }
}

/* Floating Data Badges */
.orb-badge {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 12;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.08);
    animation: floatBadge 4s ease-in-out infinite alternate;
}

.ob-icon {
    font-size: 0.95rem;
}

.orb-badge.b1 {
    top: 15%;
    left: -10%;
    border-left: 2px solid var(--primary);
    animation-delay: 0s;
}

.orb-badge.b2 {
    bottom: 20%;
    left: -15%;
    border-left: 2px solid var(--accent);
    animation-delay: -1.2s;
}

.orb-badge.b3 {
    top: 50%;
    right: -15%;
    border-left: 2px solid #d97706;
    animation-delay: -2.5s;
}

@keyframes floatBadge {
    0% { transform: translateY(0); }
    100% { transform: translateY(-8px); }
}

/* Stats Grid and Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
}

.stats-card {
    padding: 1.25rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transform-style: preserve-3d;
}

.stats-card .sc-number-row,
.stats-card .stats-label {
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateZ(0);
}

.stats-card:hover .sc-number-row {
    transform: translateZ(25px);
}

.stats-card:hover .stats-label {
    transform: translateZ(15px);
    color: var(--text-color);
}

.sc-number-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
}

.ss-val {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    line-height: 1.1;
}

.ss-val-prefix {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
}

.ss-unit {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.stats-label {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-top: 0.4rem;
    font-weight: 700;
}

/* ==========================================================================
   2. HOW IT WORKS SECTION
   ========================================================================== */

.how-timeline {
    position: relative;
    width: 100%;
    margin-top: 2rem;
    padding: 3rem 0;
    margin-bottom: 4rem;
}

.how-track {
    position: absolute;
    top: 51px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-radius: 4px;
    z-index: 1;
}

.how-items {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    position: relative;
    z-index: 2;
    scroll-snap-type: x mandatory;
}

.how-items::-webkit-scrollbar {
    height: 6px;
}
.how-items::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
}
.how-items::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.how-item {
    min-width: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-snap-align: start;
}

.how-node {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.2rem;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 0 0 6px var(--bg-color);
}

.how-node span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
}

.how-node::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0;
    z-index: -1;
    transform: scale(0.6);
    transition: var(--transition);
}

.how-step-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.2rem 1.8rem;
    width: 100%;
    flex-grow: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.how-step-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.how-step-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

.pipe-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

/* Hover Timeline Node glow */
.how-item:hover .how-node {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4), 0 0 0 6px var(--bg-color);
    transform: scale(1.1);
}

.how-item:hover .how-node span {
    color: var(--text-color);
}

.how-item:hover .how-node::before {
    opacity: 1;
    transform: scale(1);
}

.how-item:hover .how-step-card {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.15), 0 0 15px rgba(245, 158, 11, 0.05);
}

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

.how-card {
    padding: 2.5rem;
}

.how-card-icon {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.how-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.how-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Horizontal Step Pipeline */
.how-pipeline-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 3rem 0;
    width: 100%;
    position: relative;
}

.how-step {
    flex: 1;
    padding: 2rem 1.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
}

.how-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.how-step-num {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary);
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.how-step h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.how-step p {
    color: var(--text-dim);
    font-size: 0.88rem;
    line-height: 1.5;
}

.how-connector {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    position: relative;
    flex-shrink: 0;
    z-index: 1;
}

.how-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}

/* ==========================================================================
   3. SCANNER SECTION
   ========================================================================== */

#section-scanner {
    height: calc(100vh - var(--nav-height));
    min-height: calc(100vh - var(--nav-height));
    max-height: calc(100vh - var(--nav-height));
    overflow: hidden;
    padding: 1.5rem 4rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

#section-scanner .scanner-wrap {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 2rem;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

#section-scanner .scanner-top {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
}

#status-text {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.20);
}

.scanner-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
    flex: 1 1 min-content;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    align-items: stretch;
}

.scanner-left-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    min-height: 0;
}

.cam-box {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1 / 1;
    box-shadow: 0 10px 35px rgba(245, 158, 11, 0.08);
}

/* Scanner Camera HUD overlay grid & center target crosshair */
.cam-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(rgba(245, 158, 11, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(245, 158, 11, 0.06) 1px, transparent 1px);
    background-size: 30px 30px;
    background-position: center;
    z-index: 5;
    pointer-events: none;
}

.cam-box::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 50%;
    z-index: 5;
    pointer-events: none;
}

/* Sci-fi HUD and corners */
.corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary);
    z-index: 10;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.corner.tl { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.corner.tr { top: 16px; right: 16px; border-left: none; border-bottom: none; }
.corner.bl { bottom: 16px; left: 16px; border-right: none; border-top: none; }
.corner.br { bottom: 16px; right: 16px; border-left: none; border-top: none; }

.hud {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.85);
    border-left: 2px solid var(--primary);
    padding: 10px 14px;
    z-index: 15;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hud-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 4px;
}

#hud-data {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-color);
    line-height: 1.4;
    white-space: pre-line;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    z-index: 12;
    pointer-events: none;
    display: none;
    animation: scanAnimation 3s infinite linear;
}

@keyframes scanAnimation {
    0% { top: 0; }
    50% { top: 100%; }
    100% { top: 0; }
}

.cam-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 20;
}

.cam-ph-emoji {
    font-size: 3rem;
    animation: bouncePlaceholder 2s ease-in-out infinite alternate;
}

.cam-placeholder p {
    color: var(--text-dim);
    font-size: 0.95rem;
}

@keyframes bouncePlaceholder {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

#webcam-video {
    display: none;
}

#webcam-container {
    width: 100%;
    height: 100%;
    display: flex;
}

#output-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scaleX(-1); /* mirror */
}

/* Controls Panel */
.scanner-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: 14px;
    width: 100%;
    margin-top: 0;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.scanner-controls button {
    margin: 0;
    padding: 10px 20px;
    font-size: 0.9rem;
}

.scanner-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-dim);
    border-radius: 50%;
    transition: background-color 0.3s;
}

.status-dot.active {
    background-color: #d97706;
    box-shadow: 0 0 8px #d97706;
    animation: pulseDot 1.5s infinite;
}

/* Right Panel Cards layout */
.scanner-right-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.scanner-right-side .side-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.scanner-right-side .side-card h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(245, 158, 11, 0.12);
    padding-bottom: 0.4rem;
    flex: 0 0 auto;
}

/* Card height rules */
.scanner-right-side > .side-card:nth-child(1) {
    height: calc(35% - 0.67rem);
    flex: 0 0 calc(35% - 0.67rem);
}

.scanner-right-side > .side-card:nth-child(2) {
    height: calc(23% - 0.67rem);
    flex: 0 0 calc(23% - 0.67rem);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.2), 0 0 20px rgba(245, 158, 11, 0.1);
    background: var(--card-bg-hover);
}

.scanner-right-side > .side-card:nth-child(3) {
    height: calc(42% - 0.67rem);
    flex: 0 0 calc(42% - 0.67rem);
}

/* Landmarking canvas inside Digital Hand Print */
.digital-hand-print canvas,
.scanner-sidebar > .side-card:nth-child(1) canvas,
#lmChart {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.gesture-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex: 1 1 auto;
    min-height: 0;
}

.gesture-emoji-scanner {
    font-size: 4.5rem;
    line-height: 1;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    animation: floatEmoji 3s ease-in-out infinite alternate;
}

.gesture-label {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text-color);
}

@keyframes floatEmoji {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

/* History table with compact layout and scrollable tbody cells */
.history-table {
    width: 100%;
    border-collapse: collapse;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.history-table thead {
    flex: 0 0 auto;
    width: 100%;
}

.history-table tbody {
    flex: 1 1 auto;
    display: block;
    overflow-y: hidden;
    min-height: 0;
    width: 100%;
    padding-right: 4px;
}

.history-table tr {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.history-table th,
.history-table td {
    padding: 2px 6px;
    font-size: 0.7rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.history-table th {
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table td {
    color: var(--text-color);
    font-family: var(--font-mono);
}

/* Status Badges styling */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
}
.history-table .status-badge {
    padding: 2px 6px;
    font-size: 0.65rem;
}
.status-badge.active {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-badge.active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #d97706;
    border-radius: 50%;
    animation: pulseDot 1.5s infinite;
}
.status-badge.inactive {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Compatibility dynamic lists */
.g-log {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.g-log-item {
    color: var(--text-dim);
    padding: 4px 0;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.02);
}

.loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--primary);
}

.loader-track {
    position: relative;
    width: 120px;
    height: 36px;
    border-radius: 18px;
    background-color: #1c1917; /* Charcoal track */
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: inset 0 4px 6px rgba(0,0,0,0.4);
    overflow: hidden;
    display: inline-block;
}

.loader-ball {
    position: relative;
    width: 28px;
    height: 28px;
    margin-top: 3px;
    margin-left: 3px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    animation: slideBall 4s ease infinite;
    overflow: hidden;
}

@keyframes slideBall {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(84px); } /* 120px track - 28px ball - 8px margins = 84px */
}

.ball-stripes {
    position: absolute;
    width: 200px;
    height: 200px;
    top: -86px;
    left: -170px;
    animation: rollBall 4s ease infinite;
}

@keyframes rollBall {
    0%, 100% { left: -170px; }
    50% { left: 0; }
}

.ball-stripes span {
    position: absolute;
    width: 12px;
    height: 200px;
    background-color: #D4AF37; /* Gold stripe */
    box-shadow: inset 0 0 5px #BFA054;
    transform: rotate(20deg);
}

.ball-stripes span:nth-child(1) { left: 0; }
.ball-stripes span:nth-child(2) { left: 24px; background-color: #FFFDF9; box-shadow: inset 0 0 5px #E1E1E1; }
.ball-stripes span:nth-child(3) { left: 48px; }
.ball-stripes span:nth-child(4) { left: 72px; background-color: #FFFDF9; box-shadow: inset 0 0 5px #E1E1E1; }

.loading-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   4. GESTURE LIBRARY (EMOJI FLOAT-UP EFFECT)
   ========================================================================== */

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

.gest-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.gest-emoji-wrap {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.2rem;
    position: relative;
}

.gest-emoji {
    font-size: 2.2rem;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gest-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.gest-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    flex-grow: 1;
}

.gest-conf {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

.conf-track {
    flex-grow: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.conf-bar {
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    width: var(--w);
}

/* Hover Effect: Card float up translateY(-15px) & scale slightly, slide emoji up with elastic bounce */
.gest-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.15), 0 0 15px rgba(245, 158, 11, 0.05);
}

.gest-card:hover .gest-emoji {
    transform: translateY(-18px) scale(1.2);
}

/* body state active matching library highlights */
body.state-palm .gest-card[data-gesture="palm"],
body.state-victory .gest-card[data-gesture="victory"],
body.state-thumbs-up .gest-card[data-gesture="thumbs-up"],
body.state-fist .gest-card[data-gesture="fist"],
body.state-pointing .gest-card[data-gesture="pointing"],
body.state-rock .gest-card[data-gesture="rock"] {
    border-color: rgba(245, 158, 11, 0.45);
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.15), 0 0 15px rgba(245, 158, 11, 0.05);
}

/* ==========================================================================
   5. USE CASES SECTION (HORIZONTAL & GRID LAYOUTS)
   ========================================================================== */

.timeline {
    position: relative;
    width: 100%;
    margin-top: 2rem;
    padding: 3rem 0;
}

.tl-track {
    position: absolute;
    top: 51px; /* aligns directly with nodes */
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-radius: 4px;
    z-index: 1;
}

.tl-items {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    position: relative;
    z-index: 2;
    scroll-snap-type: x mandatory;
}

/* Style timeline scroll bar nicely */
.tl-items::-webkit-scrollbar {
    height: 6px;
}
.tl-items::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
}
.tl-items::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.tl-item {
    min-width: 320px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    scroll-snap-align: start;
}

.tl-node {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.2rem;
    transition: var(--transition);
    position: relative;
    box-shadow: 0 0 0 6px var(--bg-color);
}

.tl-node span {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
}

.tl-node::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0;
    z-index: -1;
    transform: scale(0.6);
    transition: var(--transition);
}

.tl-card {
    padding: 2.2rem;
    width: 100%;
    flex-grow: 1;
}

.tl-icon {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
}

.tl-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.tl-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Hover Timeline Node glow */
.tl-item:hover .tl-node {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4), 0 0 0 6px var(--bg-color);
    transform: scale(1.1);
}

.tl-item:hover .tl-node span {
    color: var(--text-color);
}

.tl-item:hover .tl-node::before {
    opacity: 1;
    transform: scale(1);
}

/* Clean 3x3 Grid layout override */
.usecases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
    overflow: visible;
}

.usecase-card {
    padding: 2.2rem 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    min-height: auto;
}

.usecase-icon {
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
}

.usecase-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-color);
}

.usecase-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   6. METRICS & ANALYTICS
   ========================================================================== */

.ring-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3.5rem;
}

.ring-card {
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.ring-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 0.5rem;
}

.ring-cvs {
    margin-bottom: 0;
    width: 90px;
    height: 90px;
}

.ring-val {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-color);
    line-height: 1;
}

.ring-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    color: var(--text-color);
}

.ring-card p {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.3;
}

.charts-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.chart-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.chart-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.8rem;
}

.chart-box canvas {
    width: 100% !important;
    height: auto !important;
}

/* Performance Grid for Metrics */
.performance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
    width: 100%;
}

.perf-card {
    padding: 1.25rem;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    min-height: auto;
}

.perf-icon {
    font-size: 1.6rem;
    margin-bottom: 0;
    flex-shrink: 0;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.perf-card:hover .perf-icon {
    transform: scale(1.1);
    border-color: var(--primary);
}

.perf-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.perf-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--text-color);
}

.perf-card p {
    color: var(--text-dim);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ==========================================================================
   7. UNDER THE HOOD SECTION
   ========================================================================== */

.hood-vertical-timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    opacity: 0.3;
}

.hood-timeline-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    width: 100%;
    margin-bottom: 2.5rem;
}

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

.hood-timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-badge-wrap {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.timeline-badge-num {
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--primary);
    line-height: 1;
    font-weight: 700;
}

.timeline-badge-emoji {
    font-size: 1.1rem;
    line-height: 1.2;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hood-timeline-content {
    width: calc(50% - 35px);
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.hood-timeline-item:nth-child(odd) .hood-timeline-content {
    margin-right: auto;
    text-align: right;
    align-items: flex-end;
}

.hood-timeline-item:nth-child(even) .hood-timeline-content {
    margin-left: auto;
    text-align: left;
    align-items: flex-start;
}

.hood-timeline-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.hood-timeline-content p {
    color: var(--text-dim);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
}

.hood-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.5px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
    text-transform: uppercase;
    width: fit-content;
}

/* Hover effects */
.hood-timeline-content:hover {
    background: var(--card-bg-hover);
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.15);
}

.hood-timeline-item:hover .timeline-badge-wrap {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.hood-timeline-item:hover .timeline-badge-emoji {
    transform: scale(1.3) rotate(10deg);
}

/* ==========================================================================
   8. TECH STACK SECTION
   ========================================================================== */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

.tech-card {
    padding: 1.8rem 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tech-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.tech-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.tech-card p {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
}

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

.footer {
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0;
    text-align: center;
    margin-top: 4rem;
    background: rgba(21, 28, 54, 0.95);
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */

@media (max-width: 1024px) {
    .navbar {
        padding: 0 2rem;
    }
    
    .section {
        padding: 5rem 2rem;
    }
    
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-left {
        align-items: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .how-cards {
        grid-template-columns: 1fr;
    }
    
    .scanner-grid {
        grid-template-columns: 1fr;
    }
    
    .gest-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ring-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .hood-timeline-item {
        flex-direction: row !important;
        justify-content: flex-start;
        padding-left: 50px;
        box-sizing: border-box;
    }
    
    .timeline-badge-wrap {
        left: 20px;
        transform: translateX(-50%);
    }
    
    .hood-timeline-content {
        width: 100% !important;
        text-align: left !important;
        align-items: flex-start !important;
    }
    
    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
    
    .how-pipeline-new {
        flex-direction: column;
        gap: 2.2rem;
    }
    
    .how-connector {
        width: 2px;
        height: 40px;
        background: linear-gradient(180deg, var(--primary), var(--accent));
        margin: -0.5rem 0;
    }
    
    .how-connector::after {
        right: auto;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%) rotate(135deg);
    }
    
    .how-step {
        width: 100%;
        min-height: auto;
    }
    
    .performance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(21, 28, 54, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transform: translateY(-120%);
        transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        border-bottom: 1px solid var(--glass-border);
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 1rem;
    }
    
    .gest-grid {
        grid-template-columns: 1fr;
    }
    
    .usecases-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-vertical-card {
        padding: 1.5rem;
    }
    
    .ring-row {
        grid-template-columns: 1fr;
    }
    
    /* hood-pipeline vertical flow inherited from 1024px query */
    
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .performance-grid {
        grid-template-columns: 1fr;
    }
    
    .table-wrap {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
}

/* Hamburger animations */
.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);
}

/* ==========================================================================
   RESPONSIVE OVERRIDES FOR NEW LAYOUTS
   ========================================================================== */

@media (max-width: 1024px) {
    #section-scanner {
        height: auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
        padding: 4rem 2rem;
    }
    
    #section-scanner .scanner-wrap {
        height: auto;
        overflow: visible;
        padding: 2rem;
    }
    
    .scanner-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    
    .scanner-left-side {
        height: auto;
    }
    
    .cam-box {
        flex: none;
        height: auto;
        aspect-ratio: 4 / 3;
    }
    
    .scanner-right-side {
        height: auto;
        overflow: visible;
        gap: 1.5rem;
    }
    
    .scanner-right-side .side-card {
        height: auto !important;
        flex: none !important;
    }
}

/* ==========================================================================
   PREMIUM CUSTOM STYLES & ANIMATIONS
   ========================================================================== */

/* Floating Hero Hand Diagram */
.hero-hand-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

.hero-hand-img {
    width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 0 35px rgba(245, 158, 11, 0.25)) drop-shadow(0 0 65px rgba(217, 119, 6, 0.15));
    animation: floatHand 6s ease-in-out infinite;
    will-change: transform, filter;
    -webkit-mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 80%);
    mask-image: radial-gradient(circle, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 80%);
}

.hero-hand-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.22) 0%, rgba(155, 81, 224, 0.16) 45%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 2;
    pointer-events: none;
    animation: orbPulse 6s ease-in-out infinite alternate;
}

.hero-hand-container .orb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    pointer-events: none;
}

.hero-hand-container .orb-ring.r1 {
    width: 380px;
    height: 380px;
    margin-top: -190px;
    margin-left: -190px;
    z-index: 4;
}

.hero-hand-container .orb-ring.r2 {
    width: 420px;
    height: 420px;
    margin-top: -210px;
    margin-left: -210px;
    z-index: 3;
}

.hero-hand-container .orb-ring.r3 {
    width: 460px;
    height: 460px;
    margin-top: -230px;
    margin-left: -230px;
    z-index: 2;
}

@keyframes floatHand {
    0% {
        transform: translateY(0px) rotate(0deg);
        filter: drop-shadow(0 0 35px rgba(0, 242, 254, 0.25)) drop-shadow(0 0 65px rgba(155, 81, 224, 0.15));
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
        filter: drop-shadow(0 0 45px rgba(0, 242, 254, 0.4)) drop-shadow(0 0 85px rgba(155, 81, 224, 0.25));
    }
    100% {
        transform: translateY(0px) rotate(0deg);
        filter: drop-shadow(0 0 35px rgba(0, 242, 254, 0.25)) drop-shadow(0 0 65px rgba(155, 81, 224, 0.15));
    }
}

/* Scroll-Triggered Text Reveal */

/* Home (reveal-home) */
.reveal-home {
    clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
    transition: clip-path 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-home.revealed {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* How It Works (reveal-how) */
.reveal-how {
    opacity: 0;
    filter: blur(15px);
    transform: translateY(15px);
    transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}
.reveal-how.revealed {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Scanner (reveal-scanner) */
.reveal-scanner {
    opacity: 0;
    transform: perspective(800px) rotateY(-12deg) translateZ(-50px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scanner.revealed {
    opacity: 1;
    transform: perspective(800px) rotateY(0) translateZ(0);
}

/* Gestures (reveal-gestures) */
.reveal-gestures {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275), transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.reveal-gestures.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Use Cases (reveal-usecases) */
.reveal-usecases {
    opacity: 0;
    transform: translateY(30px) rotate(-1.5deg);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-usecases.revealed {
    opacity: 1;
    transform: translateY(0) rotate(0);
}

/* Metrics (reveal-metrics) */
.reveal-metrics {
    opacity: 0;
    transform: perspective(800px) rotateX(-25deg);
    transform-origin: top center;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal-metrics.revealed {
    opacity: 1;
    transform: perspective(800px) rotateX(0);
}

/* Under the Hood (reveal-hood) */
.reveal-hood {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-hood.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Tech Stack (reveal-tech) */
.reveal-tech {
    opacity: 0;
    transform: scale(0.9) rotate(2deg);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-tech.revealed {
    opacity: 1;
    transform: scale(1) rotate(0);
}

/* Stagger delay utilities */
[data-delay="100"] { transition-delay: 100ms; }
[data-delay="200"] { transition-delay: 200ms; }
[data-delay="300"] { transition-delay: 300ms; }
[data-delay="400"] { transition-delay: 400ms; }
[data-delay="500"] { transition-delay: 500ms; }
[data-delay="600"] { transition-delay: 600ms; }

/* Premium Vertical Timeline */
.premium-vertical-timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0 auto;
    padding-left: 50px;
    box-sizing: border-box;
}

.premium-vertical-timeline .timeline-line {
    display: none;
}

.premium-vertical-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(to bottom, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.2) 100%);
    z-index: 1;
}

.timeline-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

.timeline-item {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-start;
}

.timeline-node {
    position: absolute;
    left: -30px;
    top: 25px;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 2px solid rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--bg-color);
}

.timeline-card {
    flex: 1 1 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-sizing: border-box;
}

.timeline-card-content {
    flex: 1 1 auto;
}

.timeline-card-icon {
    font-size: 2.2rem;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(245, 158, 11, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(245, 158, 11, 0.04);
}

.timeline-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    letter-spacing: -0.3px;
    transition: color 0.3s ease;
    margin-top: 0;
}

.timeline-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dim);
    margin: 0;
}

.timeline-card-tag {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    background: rgba(245, 158, 11, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.05);
    border-radius: 4px;
    color: var(--text-dim);
    margin-top: 0.75rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-node {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--accent);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.4), 0 0 0 4px var(--bg-color);
}

.timeline-item:hover .timeline-card {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.15), 0 0 15px rgba(245, 158, 11, 0.05);
    transform: translateY(-4px) scale(1.015);
    background: var(--card-bg-hover);
}

.timeline-item:hover .timeline-card h3 {
    color: var(--primary);
}

.timeline-item:hover .timeline-card-tag {
    border-color: rgba(217, 119, 6, 0.3);
    color: var(--primary);
    background: rgba(217, 119, 6, 0.05);
}

/* Independent Floating Metrics Cards */
.stats-card-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.stats-card-wrapper.float-1 { animation: floatStatsCard 6s ease-in-out infinite; }
.stats-card-wrapper.float-2 { animation: floatStatsCard 6s ease-in-out infinite 1.5s; }
.stats-card-wrapper.float-3 { animation: floatStatsCard 6s ease-in-out infinite 3s; }
.stats-card-wrapper.float-4 { animation: floatStatsCard 6s ease-in-out infinite 4.5s; }

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

/* Float-up card and button hover styles */
.btn-primary:not(.cube):hover, .btn-outline:hover {
    transform: translateY(-3px) scale(1.02);
}

.tilt-card:hover {
    transform: translateY(-5px) scale(1.015);
}

/* Responsive adjustments for new elements */
@media (max-width: 1024px) {
    .usecase-card {
        flex: 0 0 290px;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .usecase-side-num {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-right: 0;
        padding-bottom: 0.5rem;
        width: 100%;
    }
    
    .hood-card {
        flex: 0 0 270px;
    }
}

/* Premium Wipe-Reveal Typography */
.wipe-reveal {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.wipe-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.wipe-reveal.revealed span {
    opacity: 1;
    transform: translateX(0);
}

.wipe-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient); /* Metallic gold/amber gradient line */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.wipe-reveal.revealed::after {
    animation: line-slide 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes line-slide {
    0% { transform: scaleX(0); transform-origin: left; }
    50% { transform: scaleX(1); transform-origin: left; }
    51% { transform: scaleX(1); transform-origin: right; }
    100% { transform: scaleX(0); transform-origin: right; }
}


