/* prototypic.dev - Isometric Blueprint Documentation */

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

:root {
    --bp-dark: #1B2838;
    --bp-medium: #223344;
    --bp-light: #2A3F55;
    --grid-line: rgba(255, 255, 255, 0.08);
    --text-primary: #E8ECF1;
    --text-secondary: #8899AA;
    --core-blue: #4A9EFF;
    --util-green: #4ADE80;
    --beta-amber: #FBBF24;
    --deprecated-red: #F87171;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bp-dark);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    /* Isometric grid background */
    background-image:
        linear-gradient(30deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(150deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Version badge */
.version-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(27, 40, 56, 0.9);
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

/* =====================
   SECTION 1: BLUEPRINT HEADER
   ===================== */
.section-header {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.iso-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    background-image:
        linear-gradient(30deg, rgba(74, 158, 255, 0.06) 1px, transparent 1px),
        linear-gradient(150deg, rgba(74, 158, 255, 0.06) 1px, transparent 1px);
    background-size: 60px 60px;
}

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

.header-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--text-primary);
    margin-bottom: 16px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
}

.iso-char {
    display: inline-block;
    transition: transform 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    transform: skewY(0deg) translateY(20px);
}

.iso-char.visible {
    opacity: 1;
    transform: skewY(-4deg) translateY(0);
}

.iso-char.dot {
    color: var(--core-blue);
}

.header-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Isometric cube */
.iso-cube-hero {
    width: 60px;
    height: 70px;
    position: relative;
    margin: 0 auto;
    transform-style: preserve-3d;
}

.cube-face {
    position: absolute;
}

.cube-top {
    width: 40px;
    height: 24px;
    background: #6AB4FF;
    transform: skewX(-30deg);
    left: 10px;
    top: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cube-left {
    width: 30px;
    height: 40px;
    background: #3A7ECC;
    top: 18px;
    left: 0;
    transform: skewY(30deg);
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

.cube-right {
    width: 30px;
    height: 40px;
    background: var(--core-blue);
    top: 18px;
    left: 30px;
    transform: skewY(-30deg);
    opacity: 0;
    transition: opacity 0.3s ease 0.4s;
}

.iso-cube-hero.visible .cube-face {
    opacity: 1;
}

/* =====================
   SECTION 2: COMPONENT GRID
   ===================== */
.section-components {
    padding: 80px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 40px;
    text-align: center;
}

.component-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.comp-card {
    background: var(--bp-medium);
    border-radius: 8px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow 0.3s ease;
}

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

.comp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }

/* Category borders */
.cat-core { border-top: 3px solid var(--core-blue); }
.cat-util { border-top: 3px solid var(--util-green); }
.cat-beta { border-top: 3px solid var(--beta-amber); }
.cat-deprecated { border-top: 3px solid var(--deprecated-red); }

/* Category tags */
.cat-tag {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.tag-core { background: rgba(74, 158, 255, 0.15); color: var(--core-blue); }
.tag-util { background: rgba(74, 222, 128, 0.15); color: var(--util-green); }
.tag-beta { background: rgba(251, 191, 36, 0.15); color: var(--beta-amber); }
.tag-deprecated { background: rgba(248, 113, 113, 0.15); color: var(--deprecated-red); }

/* Iso icons in cards */
.iso-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 12px;
    position: relative;
    transform: rotate(45deg);
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.comp-card:hover .iso-icon {
    transform: rotate(135deg);
}

.iso-blue { background: var(--core-blue); }
.iso-green { background: var(--util-green); }
.iso-amber { background: var(--beta-amber); }
.iso-red { background: var(--deprecated-red); }

.comp-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--text-primary);
    margin-bottom: 8px;
}

.comp-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.comp-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    color: var(--core-blue);
    background: rgba(74, 158, 255, 0.08);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

/* =====================
   SECTION 3: ASSEMBLY DIAGRAM
   ===================== */
.section-assembly {
    padding: 80px 40px;
    text-align: center;
}

.assembly-desc {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-size: 15px;
}

.assembly-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.asm-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.asm-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

.asm-cube {
    width: 60px;
    height: 70px;
    position: relative;
}

/* Assembly cube colors */
.asm-top-blue { background: #6AB4FF; }
.asm-left-blue { background: #3A7ECC; }
.asm-right-blue { background: var(--core-blue); }

.asm-top-green { background: #6AE89A; }
.asm-left-green { background: #3AAE60; }
.asm-right-green { background: var(--util-green); }

.asm-top-amber { background: #FCCF5A; }
.asm-left-amber { background: #C89A1A; }
.asm-right-amber { background: var(--beta-amber); }

.asm-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* Connection arrows */
.asm-arrow {
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.asm-arrow.revealed {
    opacity: 1;
}

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

.asm-arrow.revealed .arrow-shaft,
.asm-arrow.revealed .arrow-head {
    animation: arrowPulse 1.5s ease-in-out infinite;
}

.arrow-shaft {
    width: 32px;
    height: 2px;
    background: var(--text-secondary);
}

.arrow-head {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--text-secondary);
}

/* =====================
   SECTION 4: FOOTER
   ===================== */
.section-footer {
    padding: 80px 40px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.footer-content.visible {
    opacity: 1;
}

.footer-iso-mark {
    width: 40px;
    height: 48px;
    position: relative;
    margin-bottom: 8px;
}

.footer-iso-mark .cube-top {
    width: 28px;
    height: 16px;
    left: 6px;
    opacity: 1;
}

.footer-iso-mark .cube-left {
    width: 20px;
    height: 28px;
    top: 12px;
    left: 0;
    opacity: 1;
}

.footer-iso-mark .cube-right {
    width: 20px;
    height: 28px;
    top: 12px;
    left: 20px;
    opacity: 1;
}

.footer-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.footer-version {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-copy {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
    .component-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .span-4 { grid-column: span 6; }
    .span-6 { grid-column: span 6; }
}

@media (max-width: 600px) {
    .component-grid {
        grid-template-columns: 1fr;
    }

    .span-4,
    .span-6 { grid-column: span 1; }

    .assembly-container {
        flex-direction: column;
    }

    .asm-arrow {
        transform: rotate(90deg);
    }
}
