/* lunchbox.dev — Goblincore Developer Toolkit */

:root {
    --dark-earth: #0f1409;
    --bark-brown: #6b5e4a;
    --copper-gold: #d4a437;
    --deep-moss: #5a6e3a;
    --parchment: #d4c5a0;
    --tarnished-copper: #b87333;
    --lichen-green: #a8b867;
    --glow-green: #7fff7f;
    --shadow-green: #2d3a1f;
    --boot-bg: #1a1f14;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.72;
    color: var(--parchment);
    background: var(--dark-earth);
    overflow-x: hidden;
}

/* HUD Overlay */
.hud-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

.hud-corner {
    position: absolute;
    padding: 1rem 1.5rem;
    pointer-events: auto;
}

.hud-top-left { top: 0; left: 0; }
.hud-top-right { top: 0; right: 0; text-align: right; }
.hud-bottom-left { bottom: 0; left: 0; }
.hud-bottom-right { bottom: 0; right: 0; text-align: right; }

.hud-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--lichen-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    opacity: 0.8;
}

.hud-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--glow-green);
    display: block;
    margin-top: 0.25rem;
}

.hud-border {
    position: absolute;
    background: var(--deep-moss);
    opacity: 0.3;
}

.hud-border-top, .hud-border-bottom {
    height: 1px;
    left: 5%;
    right: 5%;
}

.hud-border-top { top: 3rem; }
.hud-border-bottom { bottom: 3rem; }

.hud-border-left, .hud-border-right {
    width: 1px;
    top: 5%;
    bottom: 5%;
}

.hud-border-left { left: 3rem; }
.hud-border-right { right: 3rem; }

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    position: relative;
}

.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--parchment);
    margin-bottom: 3rem;
    text-align: center;
}

/* Boot Section */
.section-boot {
    background: var(--boot-bg);
}

.boot-terminal {
    text-align: center;
    max-width: 600px;
}

.boot-lines {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--lichen-green);
    text-align: left;
    margin-bottom: 2rem;
    min-height: 120px;
    opacity: 0.9;
}

.boot-line {
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.site-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--glow-green);
    text-shadow: 0 0 40px rgba(127, 255, 127, 0.3), 0 0 80px rgba(127, 255, 127, 0.1);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.site-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.site-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    color: var(--bark-brown);
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 1s ease 0.5s;
}

.site-subtitle.visible {
    opacity: 1;
}

/* Toolkit Grid */
.section-toolkit {
    background: linear-gradient(180deg, var(--boot-bg) 0%, var(--dark-earth) 30%);
}

.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    width: 100%;
}

.tool-card {
    background: rgba(45, 58, 31, 0.4);
    border: 1px solid var(--deep-moss);
    border-radius: 8px;
    padding: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: var(--lichen-green);
    box-shadow: 0 8px 32px rgba(127, 255, 127, 0.08);
}

.tool-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--copper-gold);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 0.9rem;
    color: var(--parchment);
    opacity: 0.7;
}

/* Isometric Icons */
.iso-icon {
    width: 60px;
    height: 60px;
    position: relative;
    transform: rotateX(55deg) rotateY(0deg) rotateZ(-45deg);
    transform-style: preserve-3d;
}

.iso-face {
    position: absolute;
    width: 30px;
    height: 30px;
}

.iso-top {
    background: var(--lichen-green);
    transform: translateZ(15px);
    top: 5px;
    left: 15px;
    clip-path: polygon(50% 0%, 100% 25%, 50% 50%, 0% 25%);
    width: 40px;
    height: 40px;
}

.iso-left {
    background: var(--bark-brown);
    top: 20px;
    left: 5px;
    clip-path: polygon(0% 0%, 50% 25%, 50% 75%, 0% 50%);
    width: 40px;
    height: 40px;
}

.iso-right {
    background: var(--shadow-green);
    top: 20px;
    left: 25px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 50%);
    width: 40px;
    height: 40px;
}

/* Specimen Section */
.section-specimen {
    background: var(--dark-earth);
}

.specimen-container {
    display: flex;
    gap: 2rem;
    max-width: 900px;
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
}

.bark-surface {
    flex: 1;
    min-width: 300px;
    background: linear-gradient(135deg, #2a2418 0%, #1d1a12 100%);
    border: 1px solid var(--bark-brown);
    border-radius: 4px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.bark-surface::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        rgba(107, 94, 74, 0.05) 3px,
        rgba(107, 94, 74, 0.05) 4px
    );
    pointer-events: none;
}

.code-specimen {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--parchment);
    overflow-x: auto;
}

.code-specimen code {
    display: block;
}

.specimen-annotations {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.annotation {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--copper-gold);
    padding: 0.5rem;
    border-left: 2px solid var(--tarnished-copper);
    opacity: 0.8;
}

/* Depths Section */
.section-depths {
    background: linear-gradient(180deg, var(--dark-earth) 0%, #0a0d06 100%);
}

.depth-layers {
    max-width: 700px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.depth-layer {
    display: flex;
    align-items: stretch;
    padding: 2rem 0;
    position: relative;
}

.root-connector {
    width: 40px;
    min-height: 100%;
    position: relative;
    margin-right: 1.5rem;
}

.root-connector::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--deep-moss), var(--tarnished-copper));
}

.root-connector::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--copper-gold);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px rgba(212, 164, 55, 0.4);
}

.depth-content {
    flex: 1;
    padding: 1.5rem;
    background: rgba(45, 58, 31, 0.2);
    border: 1px solid rgba(90, 110, 58, 0.3);
    border-radius: 6px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.depth-content:hover {
    border-color: var(--lichen-green);
    background: rgba(45, 58, 31, 0.4);
}

.depth-content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--copper-gold);
    margin-bottom: 0.5rem;
}

.depth-content p {
    color: var(--parchment);
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Footer */
.section-footer {
    min-height: 40vh;
    background: #0a0d06;
}

.moss-bed {
    text-align: center;
}

.footer-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--bark-brown);
    margin-bottom: 2rem;
}

.mushroom-cluster {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: flex-end;
}

.mushroom {
    width: 20px;
    background: var(--tarnished-copper);
    border-radius: 50% 50% 4px 4px;
    position: relative;
}

.mushroom::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--bark-brown);
    border-radius: 2px;
}

.m1 { height: 16px; }
.m2 { height: 24px; }
.m3 { height: 12px; }

/* Scroll-triggered visibility */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hud-border-left, .hud-border-right {
        display: none;
    }

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

    .specimen-annotations {
        flex: 1;
    }

    .toolkit-grid {
        grid-template-columns: 1fr;
    }
}
