/* ============================================
   a6c.dev - Controlled Voltage
   Muji-meets-neon design language
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --accent-cyan: #00f0ff;
    --accent-magenta: #ff00aa;
    --accent-lime: #a0ff00;
    --muted-structure: #1a1a2e;
    --muted-border: #2a2a3e;
    --glow-overlay: rgba(0, 240, 255, 0.05);
    --glow-shadow: rgba(0, 240, 255, 0.15);
    --glow-shadow-soft: rgba(0, 240, 255, 0.1);
    --glow-shadow-faint: rgba(0, 240, 255, 0.3);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #0a0a0f;
    color: #e0e0e0;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Perspective Wrapper --- */
#perspective-wrapper {
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

/* --- Navigation Dots --- */
#nav-dots {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

#nav-dots.visible {
    opacity: 1;
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    border: 1px solid #2a2a3e;
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: width 200ms ease-out, height 200ms ease-out, margin 200ms ease-out, background-color 200ms ease-out, border-color 200ms ease-out, box-shadow 200ms ease-out, transform 150ms ease-out;
    padding: 0;
    outline: none;
}

.nav-dot:hover {
    width: 10px;
    height: 10px;
    margin: -2px;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
    border-color: #00f0ff;
}

.nav-dot:active {
    transform: translateY(-1px);
    box-shadow: 0 0 4px rgba(0, 240, 255, 0.15);
}

.nav-dot.active {
    background-color: #00f0ff;
    border-color: #00f0ff;
}

.nav-tooltip {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff00aa;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease-out;
}

.nav-dot:hover .nav-tooltip {
    opacity: 1;
}

/* --- Parallax Sections --- */
.parallax-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* --- Gradient Meshes --- */
.gradient-mesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-out;
    will-change: transform, opacity;
    transform: translateZ(-50px) scale(1.05);
}

.gradient-mesh.visible {
    opacity: 0.6;
}

/* Section 1: Hero - Three-point mesh with slow nebula drift */
.mesh-hero {
    background:
        radial-gradient(ellipse 40% 40% at 20% 25%, #00f0ff, transparent),
        radial-gradient(ellipse 35% 35% at 80% 75%, #ff00aa, transparent),
        radial-gradient(ellipse 60% 60% at 50% 50%, #0a0a0f, transparent);
    animation: meshRotateHero 120s linear infinite;
}

@keyframes meshRotateHero {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(3deg); }
}

/* Section 2: Craft - Two-point breathing mesh */
.mesh-craft {
    background:
        radial-gradient(ellipse 30% 30% at 30% 50%, #a0ff00, transparent),
        radial-gradient(ellipse 30% 30% at 70% 50%, #00f0ff, transparent);
    animation: meshBreatheCraft 8s ease-in-out infinite;
}

@keyframes meshBreatheCraft {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

.mesh-craft.visible {
    animation: meshBreatheCraft 8s ease-in-out infinite;
}

/* Section 3: Code - Aurora curtain from top */
.mesh-code {
    background:
        radial-gradient(ellipse 50% 45% at 50% 10%, #ff00aa, transparent),
        radial-gradient(ellipse 30% 25% at 35% 20%, rgba(0, 240, 255, 0.3), transparent);
    transform: translateZ(-80px) scale(1.08);
}

/* Section 4: Systems - Diagonal slash */
.mesh-systems {
    background:
        radial-gradient(ellipse 60% 30% at 20% 80%, #00f0ff, transparent),
        radial-gradient(ellipse 40% 25% at 80% 20%, #ff00aa, transparent),
        radial-gradient(ellipse 25% 25% at 50% 50%, #a0ff00, transparent);
}

/* Section 5: Nature - Corner bloom */
.mesh-nature {
    background:
        radial-gradient(ellipse 45% 45% at 10% 10%, #a0ff00, transparent),
        radial-gradient(ellipse 35% 35% at 90% 90%, #00f0ff, transparent),
        radial-gradient(ellipse 25% 25% at 50% 50%, rgba(255, 0, 170, 0.4), transparent);
}

/* Section 6: Connect - Central orb */
.mesh-connect {
    background:
        radial-gradient(ellipse 35% 35% at 50% 50%, #00f0ff, transparent),
        radial-gradient(ellipse 25% 25% at 45% 55%, #ff00aa, transparent),
        radial-gradient(ellipse 20% 20% at 55% 45%, #a0ff00, transparent);
}

/* --- Active Section Glow Overlay --- */
.parallax-section.active-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 240, 255, 0.05);
    pointer-events: none;
    z-index: 1;
}

/* --- Section Content --- */
.section-content {
    position: relative;
    z-index: 10;
    width: 33.333%;
    padding: 48px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-left {
    margin-left: 0;
    margin-right: auto;
}

.content-right {
    margin-left: auto;
    margin-right: 0;
}

/* --- Typography --- */
.section-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ff00aa;
    margin-bottom: 16px;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 48px;
    letter-spacing: -0.02em;
    color: #e0e0e0;
    line-height: 1.1;
    margin-bottom: 24px;
}

.section-heading .char {
    display: inline-block;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.section-heading .char.visible {
    opacity: 1;
}

.section-body {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.75;
    color: #a0a0b0;
    max-width: 420px;
}

.inline-code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    color: #00f0ff;
    cursor: pointer;
    transition: color 150ms ease-out, transform 150ms ease-out;
    display: inline-block;
}

.inline-code:hover {
    color: #a0ff00;
    transform: translateY(-3px);
}

.inline-code:active {
    transform: translateY(-1px);
}

.contact-line {
    margin-top: 24px;
}

/* --- Code Snippet (Section 3) --- */
.code-snippet {
    margin-top: 24px;
    padding: 24px;
    background: #111118;
    border: 1px solid #1a1a2e;
    border-radius: 2px;
    overflow-x: auto;
    transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.code-snippet:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.15);
}

.code-snippet:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 240, 255, 0.1);
}

.code-snippet pre {
    margin: 0;
}

.code-snippet code {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.75;
    color: #a0a0b0;
}

.token-keyword { color: #a0a0b0; transition: color 300ms ease-out; }
.token-name { color: #a0a0b0; transition: color 300ms ease-out; }
.token-key { color: #a0a0b0; transition: color 300ms ease-out; }
.token-string { color: #a0a0b0; transition: color 300ms ease-out; }

.code-snippet:hover .token-keyword { color: #ff00aa; }
.code-snippet:hover .token-name { color: #00f0ff; }
.code-snippet:hover .token-key { color: #a0ff00; }
.code-snippet:hover .token-string { color: #00f0ff; }

/* --- Scroll Chevron --- */
.scroll-chevron {
    margin-top: 40px;
    animation: chevronBob 2s ease-in-out infinite;
}

@keyframes chevronBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* --- Breathing Zones --- */
.breathing-zone {
    position: relative;
    height: 30vh;
    background: #0a0a0f;
    display: flex;
    align-items: center;
    justify-content: center;
}

.breathing-rule {
    width: 100%;
    height: 1px;
    background: #1a1a2e;
}

.breathing-zone .ginkgo-marker {
    position: absolute;
    left: 38.2%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.breathing-zone .bamboo-motif {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
}

.breathing-zone-final {
    flex-direction: column;
    gap: 24px;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2a2a3e;
    margin-top: 16px;
}

/* --- Nature Motifs --- */
.nature-motif {
    pointer-events: none;
}

.branch-motif {
    position: absolute;
    top: 20%;
    right: 15%;
    opacity: 0.15;
}

.ripple-motif {
    position: absolute;
    bottom: 15%;
    right: 20%;
    opacity: 0.12;
}

/* --- Ginkgo Unfurl (Section 5) --- */
.ginkgo-unfurl {
    margin-top: 32px;
    cursor: pointer;
    display: inline-block;
    clip-path: inset(0 50% 0 50%);
    transition: clip-path 600ms ease-out, transform 150ms ease-out, box-shadow 150ms ease-out;
}

.ginkgo-unfurl:hover {
    clip-path: inset(0 0 0 0);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.15);
}

.ginkgo-unfurl:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 240, 255, 0.1);
}

/* --- Hover-Lift Pattern (Shared) --- */
.hover-lift {
    transition: transform 150ms ease-out, box-shadow 150ms ease-out;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.15);
}

.hover-lift:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 240, 255, 0.1);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .section-heading {
        font-size: 32px;
    }

    .section-content {
        width: 85%;
        padding: 24px;
    }

    .content-left,
    .content-right {
        margin-left: 0;
        margin-right: auto;
    }

    #nav-dots {
        right: 16px;
        gap: 18px;
    }

    .branch-motif,
    .ripple-motif {
        display: none;
    }

    .code-snippet code {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .section-heading {
        font-size: 28px;
    }

    .section-content {
        width: 92%;
        padding: 20px;
    }

    .section-body {
        font-size: 14px;
    }
}
