:root {
    --bg-color: #000000;
    --accent: #00b9b9;
    /* Slightly blue-shifted, desaturated cyan */
    --text-primary: #ffffff;
    --text-muted: #666666;
    --border-color: #111111;

    --font-heading: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

::selection {
    background: var(--accent);
    color: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-heading);
    height: 100vh;
    overflow: hidden;
    /* body stays locked, .scroll-container handles scrolling */
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle visual noise overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 9999;
}

/* Subtle charcoal gradient bands representing controlled structure */
.background-bands {
    position: fixed;
    /* Changed to fixed so it stays behind the scrollable content */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: repeating-linear-gradient(transparent,
            transparent 4px,
            rgba(5, 5, 5, 0.4) 4px,
            rgba(5, 5, 5, 0.4) 8px),
        linear-gradient(180deg,
            rgba(10, 10, 10, 0.5) 0%,
            rgba(0, 0, 0, 0.9) 20%,
            rgba(0, 0, 0, 1) 50%,
            rgba(10, 10, 10, 0.3) 100%);
    pointer-events: none;
}

/* Scroll Snapping Container */
.scroll-container {
    position: relative;
    z-index: 10;
    /* Above hero-canvas (z:1) and background-bands (z:0) */
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    /* Hide scrollbar for a cleaner look */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

/* Base container */
.container {
    position: fixed;
    /* Keep header fixed while container scrolls */
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 4rem;
    pointer-events: none;
}

/* Snap sections */
.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 6rem 4rem;
}

.header,
.terminal-overlay,
.footer {
    pointer-events: auto;
    /* Re-enable pointer events for interactive elements */
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.logo {
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: 0.15em;
    user-select: none;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    user-select: none;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
}

/* Audio Toggle */
.audio-toggle {
    position: fixed;
    top: 3rem;
    right: 4rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.70rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    z-index: 50;
    transition: color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.audio-toggle:hover {
    color: var(--text-primary);
}

/* Visualizer Icon */
.audio-icon {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.audio-bar {
    width: 3px;
    height: 2px;
    background-color: var(--text-muted);
    transition: background-color 0.3s ease, height 0.3s ease;
}

.audio-toggle:hover .audio-bar {
    background-color: var(--text-primary);
}

.audio-icon.playing .audio-bar {
    background-color: var(--accent);
}

.audio-icon.playing .audio-bar:nth-child(1) {
    animation: bar-dance 1.2s ease-in-out infinite alternate;
}

.audio-icon.playing .audio-bar:nth-child(2) {
    animation: bar-dance 1s ease-in-out 0.4s infinite alternate;
}

.audio-icon.playing .audio-bar:nth-child(3) {
    animation: bar-dance 0.8s ease-in-out 0.7s infinite alternate;
}

@keyframes bar-dance {
    0% {
        height: 2px;
    }

    100% {
        height: 12px;
    }
}

/* Hero Section */
.hero {
    align-items: flex-start;
    padding-left: 10vw;
    z-index: 20;
    pointer-events: none;
}

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

.hero-title {
    font-size: clamp(4rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #b0b0b0 50%, #707070 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    background: linear-gradient(90deg, var(--accent) 0%, #00e5e5 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    line-height: 1.5;
}

/* Three.js Canvas */
#hero-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    /* Above background, below container */
    pointer-events: none;
}

/* Threshold Text Overlays */
.threshold-container {
    position: fixed;
    top: 50%;
    right: 15vw;
    /* Position beside the cube */
    transform: translateY(-50%);
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 4rem;
    pointer-events: none;
}

.threshold-text {
    font-family: var(--font-mono);
    color: #e8e8e8;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;

    /* Initial State */
    opacity: 0;
    transform: scale(0.95);

    /* Clean transition in/out */
    transition: opacity 0.3s cubic-bezier(0.2, 0, 0, 1), transform 0.3s cubic-bezier(0.2, 0, 0, 1);

    display: inline-block;
    position: relative;
}

/* Optional 1px Cyan Underline */
.threshold-text::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.threshold-text.active {
    opacity: 0.8;
    transform: scale(1.02);
}

.threshold-text.active::after {
    opacity: 0.5;
}

.threshold-text.done {
    opacity: 0;
    transform: scale(1.02);
    /* Maintain scale during fade out */
}

/* Terminal Overlay */
.terminal-overlay {
    position: relative;
    /* Flow in normal document flow inside .hero */
    margin-top: 2rem;
    align-self: flex-end;
    margin-right: 2rem;
    background: rgba(2, 2, 2, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    width: 440px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: border-color 0.3s ease;
    z-index: 40;
    pointer-events: auto;
}

.terminal-overlay:hover {
    border-color: #222222;
}

.terminal-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
}

.terminal-time {
    color: #444444;
}

.terminal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.log-line {
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
}

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

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Footer / CTA */
.footer {
    position: fixed;
    bottom: 3rem;
    left: 4rem;
    padding-top: 2rem;
    z-index: 40;
}

.action-btn {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.action-btn::after {
    content: '→';
    margin-left: 0.75rem;
    color: var(--accent);
    transition: transform 0.2s ease;
}

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

.action-btn:hover::after {
    transform: translateX(6px);
}

/* Features Section */
.features-section {
    z-index: 20;
    pointer-events: auto;
    align-items: center;
}

.section-heading {
    text-align: center;
    margin-bottom: 5rem;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, #ffffff 0%, #888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-cards-wrapper {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    width: 100%;
}

.feature-card {
    background: rgba(5, 5, 5, 0.5);
    /* Glassmorphism base */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Edge highlight */
    width: 320px;
    height: 400px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    position: relative;

    /* Scroll reveal setup */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.2, 0, 0, 1), transform 0.8s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.4s ease;

    /* Subtle glow shadow */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 185, 185, 0.02);
}

.feature-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(0, 185, 185, 0.05);
    border: 1px solid rgba(0, 185, 185, 0.3);
}

.feature-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.feature-card h3 {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    line-height: 1.5;
}

.card-icon {
    position: absolute;
    top: 3rem;
    left: 2.5rem;
    width: 80px;
    height: 80px;
}

/* SPEED - Segmented cyan ring */
.speed-ring {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: var(--accent);
    border-bottom-color: rgba(0, 185, 185, 0.15);
    border-left-color: rgba(0, 185, 185, 0.15);
    /* Initial state before reveal rotation */
    transform: rotate(-90deg);
}

.feature-card.revealed .speed-ring {
    animation: speedReveal 1s cubic-bezier(0.25, 1, 0.5, 1) forwards, speedPulse 3s ease-in-out 1s infinite;
}

@keyframes speedReveal {
    0% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(270deg);
    }

    /* One smooth 360 rotation */
}

@keyframes speedPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* ACCURACY - Matte black shield */
.accuracy-shield {
    width: 46px;
    height: 54px;
    background: #020202;
    /* Matte black */
    border: 1px solid var(--accent);
    box-shadow: 0 0 12px rgba(0, 185, 185, 0.25);
    /* Thin cyan edge glow */
    clip-path: polygon(50% 0%, 100% 0, 100% 70%, 50% 100%, 0 70%, 0 0);
    position: relative;
    overflow: hidden;
}

.shield-sweep {
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(45deg, transparent 40%, rgba(0, 185, 185, 0.8) 50%, transparent 60%);
    transform: translateX(-100%) translateY(-100%);
}

#card-accuracy:hover .shield-sweep {
    animation: singleSweep 0.5s cubic-bezier(0.2, 0, 0, 1) forwards;
}

@keyframes singleSweep {
    0% {
        transform: translateX(-100%) translateY(-100%);
    }

    100% {
        transform: translateX(50%) translateY(50%);
    }
}

/* ANALYSIS - Minimal floating grid plane */
.analysis-grid {
    width: 50px;
    height: 50px;
    border: 1px solid rgba(0, 185, 185, 0.3);
    background-image:
        linear-gradient(rgba(0, 185, 185, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 185, 185, 0.2) 1px, transparent 1px);
    background-size: 12.5px 12.5px;
    transform: perspective(400px) rotateX(50deg) rotateZ(45deg);
    transition: transform 0.5s cubic-bezier(0.2, 0, 0, 1), border-color 0.5s ease;
}

#card-analysis:hover .analysis-grid {
    transform: perspective(400px) rotateX(40deg) rotateZ(35deg) translateZ(8px);
    border-color: rgba(0, 185, 185, 0.6);
}

/* Interactive Typography */
.reveal-text {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 1.5rem;
}

.cyan-text {
    color: var(--accent);
}

.sub-text {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 80%;
}

/* ── Edge Sections ── */
.edge-section {
    z-index: 20;
    pointer-events: auto;
    background: radial-gradient(ellipse at 30% 50%, rgba(0, 185, 185, 0.03) 0%, transparent 70%);
}

.edge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
    padding: 0 4rem;
}

.edge-grid.reverse {
    direction: rtl;
}

.edge-grid.reverse>* {
    direction: ltr;
}

.edge-visual {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edge-visual.wide {
    height: 450px;
}

.edge-visual canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.edge-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.edge-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #999 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.edge-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 500px;
}

.edge-stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Info Sections */
.info-section {
    z-index: 20;
    pointer-events: auto;

    /* Subtle masking gradient */
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.95) 100%);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 4rem;
}

.info-grid.reverse {
    direction: rtl;
    /* Simple way to swap sides visually */
}

.info-grid.reverse>* {
    direction: ltr;
    /* Reset text direction */
}

.info-text-block {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: var(--accent);
}

.info-text-block p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

/* Reveal Animations specifically for these sections */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.2, 0, 0, 1), transform 1s cubic-bezier(0.2, 0, 0, 1);
}

.fade-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Data Stream Visual */
.data-stream {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #888;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 185, 185, 0.2);
    border-radius: 12px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.cyan-glow-box {
    box-shadow: 0 0 40px rgba(0, 185, 185, 0.1), inset 0 0 20px rgba(0, 185, 185, 0.05);
}

.stream-line {
    display: flex;
    justify-content: space-between;
}

.stream-line.accent {
    color: var(--accent);
    filter: drop-shadow(0 0 5px rgba(0, 185, 185, 0.3));
}

/* Architecture Graphic */
.architecture-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.node {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 1rem 2rem;
    border: 1px solid var(--border-color);
    background: #020202;
    color: var(--text-muted);
}

.node.active {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: inset 0 0 10px rgba(0, 185, 185, 0.1);
}

.connector.vertical {
    width: 1px;
    height: 30px;
    background: var(--text-muted);
    opacity: 0.3;
}

.cyan-border {
    border-color: var(--accent) !important;
    box-shadow: 0 0 15px rgba(0, 185, 185, 0.4) !important;
}

/* Tech List */
.tech-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.tech-list li {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tech-item-name {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #fff;
    letter-spacing: 0.05em;
}

.tech-item-name::before {
    content: '→';
    color: var(--accent);
    margin-right: 0.5rem;
}

.tech-item-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 1.5rem;
}

/* Waitlist Section */
.waitlist-section {
    z-index: 20;
    pointer-events: auto;
    align-items: center;
    background: linear-gradient(0deg, #000000 0%, transparent 100%);
}

.waitlist-sub {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.waitlist-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;

    /* Fade up from shadow entrance */
    opacity: 0;
    transform: translateY(30px);
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 1));
    transition: opacity 1s cubic-bezier(0.2, 0, 0, 1), transform 1s cubic-bezier(0.2, 0, 0, 1), filter 1s cubic-bezier(0.2, 0, 0, 1);
}

.waitlist-content.revealed {
    opacity: 1;
    transform: translateY(0);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5));
}

.waitlist-title {
    font-size: 1.5rem;
    letter-spacing: 0.25em;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    text-transform: uppercase;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 400px;
}

.waitlist-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-muted);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 1rem;
    padding: 0.75rem 0;
    text-align: center;
    outline: none;
    transition: border-color 0.3s ease;
}

.waitlist-input:focus {
    border-bottom-color: var(--accent);
}

.waitlist-input::placeholder {
    color: #444;
    letter-spacing: 0.05em;
}

.waitlist-btn {
    background: #020202;
    /* Matte black base */
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: 1px solid var(--accent);
    /* Thin cyan border */
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 185, 185, 0.1);
    transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s cubic-bezier(0.2, 0, 0, 1);
    margin-top: 1rem;
}

.waitlist-btn:hover {
    transform: translateY(-2px);
    /* Lifts 2px, no bounce */
    box-shadow: 0 4px 12px rgba(0, 185, 185, 0.25);
    /* Glow intensifies slightly */
}