/* ============================================
   holos.dev - Isometric Holographic Design System
   Colors: #0a0a12, #00e5ff, #1a1a2e, #12121e, #c8c8d8, #76ff03, #6b6b7b, #e040fb
   Fonts: Space Grotesk, Inter, JetBrains Mono
   ============================================ */

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

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

body {
    background: #0a0a12;
    color: #c8c8d8;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* --- Fixed Background Layers --- */
.iso-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.iso-grid.visible {
    opacity: 1;
}

.circuit-traces {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease 0.5s;
}

.circuit-traces.visible {
    opacity: 1;
}

.particle-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
}

/* --- Plate System --- */
.plate {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

.plate-inner {
    position: relative;
    max-width: 800px;
    width: 90%;
    padding: 60px 40px;
}

.opening-plate .plate-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Content plates - isometric tilt effect */
.content-plate .plate-inner {
    background: rgba(18, 18, 30, 0.6);
    border: 1px solid rgba(0, 229, 255, 0.08);
    border-radius: 2px;
    backdrop-filter: blur(12px);
    transform: rotateX(2deg) rotateY(-1deg);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow:
        0 0 60px rgba(0, 229, 255, 0.03),
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 0 1px rgba(0, 229, 255, 0.1);
}

.content-plate .plate-inner:hover {
    transform: rotateX(0deg) rotateY(0deg);
    box-shadow:
        0 0 80px rgba(0, 229, 255, 0.06),
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 0 2px rgba(0, 229, 255, 0.15);
}

/* Depth variations - alternate tilt directions */
.depth-2 .plate-inner {
    transform: rotateX(-1deg) rotateY(2deg);
}

.depth-2 .plate-inner:hover {
    transform: rotateX(0deg) rotateY(0deg);
}

.depth-3 .plate-inner {
    transform: rotateX(1.5deg) rotateY(1deg);
}

.depth-3 .plate-inner:hover {
    transform: rotateX(0deg) rotateY(0deg);
}

.depth-4 .plate-inner {
    transform: rotateX(-2deg) rotateY(-1.5deg);
}

.depth-4 .plate-inner:hover {
    transform: rotateX(0deg) rotateY(0deg);
}

.depth-5 .plate-inner {
    transform: rotateX(1deg) rotateY(-2deg);
}

.depth-5 .plate-inner:hover {
    transform: rotateX(0deg) rotateY(0deg);
}

/* Plate edge glow */
.plate-edge-glow {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    pointer-events: none;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.content-plate.in-view .plate-edge-glow {
    opacity: 1;
    box-shadow:
        0 0 1px rgba(0, 229, 255, 0.3),
        0 0 20px rgba(0, 229, 255, 0.05);
}

/* --- Opening Section --- */
.glyph-cluster {
    opacity: 0;
    transform: scale(0.8);
    animation: glyphReveal 1.2s ease 0.6s forwards;
    margin-bottom: 40px;
}

@keyframes glyphReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.holos-glyph .cube-top {
    fill: rgba(0, 229, 255, 0.08);
    stroke: #00e5ff;
    stroke-width: 1.5;
}

.holos-glyph .cube-left {
    fill: rgba(0, 229, 255, 0.04);
    stroke: #00e5ff;
    stroke-width: 1;
    opacity: 0.7;
}

.holos-glyph .cube-right {
    fill: rgba(0, 229, 255, 0.02);
    stroke: #00e5ff;
    stroke-width: 1;
    opacity: 0.5;
}

.holos-glyph .wire {
    stroke: #00e5ff;
    stroke-width: 0.5;
    opacity: 0.2;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(56px, 12vw, 96px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.95;
    color: #00e5ff;
    text-shadow: 0 0 40px rgba(0, 229, 255, 0.3);
    opacity: 0;
    animation: titleReveal 1s ease 1s forwards;
}

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

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: #6b6b7b;
    letter-spacing: 0.08em;
    margin-top: 24px;
    opacity: 0;
    animation: subtitleReveal 1s ease 1.4s forwards;
}

@keyframes subtitleReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: scrollReveal 1s ease 2s forwards;
}

@keyframes scrollReveal {
    to { opacity: 0.6; }
}

.scroll-dot {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { cy: 12; }
    50% { cy: 36; }
}

/* --- Section Titles & Labels --- */
.plate-label {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #00e5ff;
    opacity: 0.6;
    margin-bottom: 20px;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #c8c8d8;
    margin-bottom: 28px;
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.08);
}

.prose-block p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: #c8c8d8;
    opacity: 0.85;
    max-width: 640px;
}

/* --- Isometric Diagrams --- */
.iso-diagram {
    margin-top: 40px;
    padding: 20px 0;
}

.iso-illustration {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.layer-label,
.stage-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    fill: #6b6b7b;
    text-anchor: middle;
    letter-spacing: 0.1em;
}

/* --- Code Plate --- */
.code-plate {
    margin-top: 36px;
    background: rgba(10, 10, 18, 0.8);
    border: 1px solid rgba(0, 229, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(26, 26, 46, 0.5);
    border-bottom: 1px solid rgba(0, 229, 255, 0.06);
}

.code-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6b6b7b;
    opacity: 0.4;
}

.code-dot.cyan { background: #00e5ff; opacity: 0.6; }
.code-dot.green { background: #76ff03; opacity: 0.6; }
.code-dot.magenta { background: #e040fb; opacity: 0.6; }

.code-filename {
    font-size: 11px;
    color: #6b6b7b;
    margin-left: auto;
}

.code-content {
    padding: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: #c8c8d8;
    overflow-x: auto;
}

.code-content .kw { color: #e040fb; }
.code-content .fn { color: #00e5ff; }
.code-content .cm { color: #6b6b7b; font-style: italic; }
.code-content .id { color: #c8c8d8; }
.code-content .tp { color: #76ff03; }
.code-content .str { color: #ffab00; }

/* --- Terminal Plate --- */
.terminal-plate {
    margin-top: 36px;
    background: rgba(10, 10, 18, 0.9);
    border: 1px solid rgba(0, 229, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(26, 26, 46, 0.4);
    border-bottom: 1px solid rgba(0, 229, 255, 0.05);
}

.terminal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b6b7b;
    opacity: 0.3;
}

.terminal-title {
    font-size: 10px;
    color: #6b6b7b;
    margin-left: auto;
    letter-spacing: 0.1em;
}

.terminal-body {
    padding: 20px;
    font-size: 13px;
    line-height: 1.6;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt {
    color: #76ff03;
    font-weight: 500;
}

.cmd {
    color: #00e5ff;
}

.cursor {
    color: #00e5ff;
    animation: cursorBlink 1s step-end infinite;
}

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

.terminal-output {
    margin-top: 12px;
    color: #6b6b7b;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.terminal-output .out-cyan { color: #00e5ff; }
.terminal-output .out-green { color: #76ff03; }
.terminal-output .out-magenta { color: #e040fb; }
.terminal-output .out-dim { color: #6b6b7b; }

/* --- Topology Mesh --- */
.topology-mesh {
    min-height: 300px;
    position: relative;
}

.topology-mesh svg {
    width: 100%;
    height: 300px;
}

.topo-node {
    transition: opacity 0.3s ease;
}

.topo-edge {
    stroke-dasharray: 4 4;
    animation: traceDash 20s linear infinite;
}

@keyframes traceDash {
    to { stroke-dashoffset: -200; }
}

/* --- Closing Section --- */
.closing-plate {
    min-height: 60vh;
}

.closing-plate .plate-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.closing-glyph {
    margin-bottom: 30px;
    opacity: 0.6;
}

.closing-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 400;
    color: #c8c8d8;
    opacity: 0.6;
    letter-spacing: 0.05em;
}

.closing-domain {
    display: block;
    margin-top: 16px;
    font-size: 12px;
    color: #00e5ff;
    opacity: 0.4;
    letter-spacing: 0.2em;
}

/* --- Scroll Reveal Animations --- */
.content-plate .plate-inner {
    opacity: 0;
    transform: translateY(40px) rotateX(2deg) rotateY(-1deg);
    transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.8s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.content-plate.in-view .plate-inner {
    opacity: 1;
    transform: translateY(0) rotateX(2deg) rotateY(-1deg);
}

.content-plate.in-view.depth-2 .plate-inner {
    transform: translateY(0) rotateX(-1deg) rotateY(2deg);
}

.content-plate.in-view.depth-3 .plate-inner {
    transform: translateY(0) rotateX(1.5deg) rotateY(1deg);
}

.content-plate.in-view.depth-4 .plate-inner {
    transform: translateY(0) rotateX(-2deg) rotateY(-1.5deg);
}

.content-plate.in-view.depth-5 .plate-inner {
    transform: translateY(0) rotateX(1deg) rotateY(-2deg);
}

.content-plate.in-view .plate-inner:hover {
    transform: translateY(0) rotateX(0deg) rotateY(0deg);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .plate-inner {
        padding: 40px 24px;
    }

    .hero-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 28px;
    }

    .code-content {
        font-size: 11px;
        padding: 14px;
    }

    .content-plate .plate-inner,
    .content-plate.in-view .plate-inner,
    .content-plate.in-view.depth-2 .plate-inner,
    .content-plate.in-view.depth-3 .plate-inner,
    .content-plate.in-view.depth-4 .plate-inner,
    .content-plate.in-view.depth-5 .plate-inner {
        transform: none;
    }

    .content-plate.in-view .plate-inner:hover {
        transform: none;
    }
}
