/* prototype.rs -- Oxidized Copper / Rust Culture */
:root {
    --copper: #C87533;
    --oxidized: #8B6914;
    --verdigris: #6B8E6B;
    --verdigris-dark: #3D5C3D;
    --graphite: #1A1A1E;
    --etched: #2A2A30;
    --parchment: #D4C4A8;
    --patina-glow: #A0704A;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Overpass Mono', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.75;
    color: var(--parchment);
    background: radial-gradient(ellipse at center, #1A1A1E 0%, #111114 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Side navigation */
.side-nav {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 100;
    padding: 12px 0;
}
.nav-square {
    width: 12px;
    height: 12px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}
.nav-square:hover { transform: scale(1.3); }
.nav-sq-1 { background: var(--copper); }
.nav-sq-2 { background: var(--oxidized); }
.nav-sq-3 { background: var(--verdigris); }
.nav-sq-4 { background: var(--verdigris-dark); }
.nav-square.active { box-shadow: 0 0 8px var(--patina-glow); }

/* Manifest / main */
.manifest { max-width: 960px; margin: 0 auto; padding: 0 80px; }

/* Hero terminal */
.hero-terminal { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; }
.toml-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: 'Overpass Mono', monospace;
    font-size: 16px;
    color: var(--parchment);
    opacity: 1;
    transition: opacity 0.4s;
}
.toml-block.hidden { opacity: 0; pointer-events: none; }
.toml-line { display: block; opacity: 0; }
.toml-line.typed { opacity: 1; }
.toml-value { color: var(--copper); }

.hero-resolved {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-resolved.active { opacity: 1; }
.hero-title { font-family: 'Anybody', sans-serif; font-weight: 700; font-size: 48px; color: var(--copper); letter-spacing: 0.04em; line-height: 1.1; }
.hero-version { font-family: 'Zilla Slab', serif; font-weight: 500; font-size: 14px; color: var(--verdigris); margin-top: 8px; }
.hero-desc { font-family: 'Overpass Mono', monospace; font-size: 16px; color: var(--parchment); margin-top: 12px; }

/* Trace lines between sections */
.trace-line {
    display: flex;
    justify-content: center;
    height: 80px;
}
.trace-line svg { width: 4px; height: 80px; }
.trace-draw {
    stroke-dasharray: 80;
    stroke-dashoffset: 80;
    transition: stroke-dashoffset 0.8s ease-out;
}
.trace-line.drawn .trace-draw { stroke-dashoffset: 0; }

/* Crate sections */
.crate-section {
    position: relative;
    background: var(--etched);
    border: 2px dashed var(--oxidized);
    padding: 40px;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s, border-color 0.3s, background 0.3s;
    filter: url(#noise);
}
.crate-section.visible { opacity: 1; transform: translateY(0); }
.crate-section:hover { border-color: var(--copper); background: #2E2E34; }

/* Bracket watermarks */
.bracket-watermark {
    position: absolute;
    top: -20px;
    left: 20px;
    font-family: 'Overpass Mono', monospace;
    font-size: 120px;
    color: var(--copper);
    opacity: 0.06;
    line-height: 1;
    pointer-events: none;
}
.bracket-right { left: auto; right: 20px; }

/* Rivets */
.rivet {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--oxidized);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.crate-section.visible .rivet { transform: scale(1); }
.rivet-tl { top: 12px; left: 12px; }
.rivet-tr { top: 12px; right: 12px; }
.rivet-bl { bottom: 12px; left: 12px; }
.rivet-br { bottom: 12px; right: 12px; }
.crate-section.visible .rivet-tl { transition-delay: 0s; }
.crate-section.visible .rivet-tr { transition-delay: 0.05s; }
.crate-section.visible .rivet-bl { transition-delay: 0.1s; }
.crate-section.visible .rivet-br { transition-delay: 0.15s; }

.crate-section:hover .rivet {
    animation: rivet-pulse 0.3s ease-out;
}
@keyframes rivet-pulse {
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Crate header */
.crate-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.crate-meta { display: flex; flex-direction: column; gap: 4px; }
.crate-name { font-family: 'Overpass Mono', monospace; font-size: 14px; color: var(--copper); }
.crate-version { font-family: 'Zilla Slab', serif; font-weight: 500; font-size: 14px; color: var(--verdigris); }

/* Progress bar */
.progress-track { width: 120px; height: 4px; background: var(--verdigris); border-radius: 2px; overflow: hidden; }
.progress-bar { width: 0; height: 100%; background: var(--copper); transition: width 0.8s ease-in-out; }
.crate-section.visible .progress-bar { width: 100%; }

/* Crate content */
.crate-title { font-family: 'Anybody', sans-serif; font-weight: 700; font-size: 32px; color: var(--copper); letter-spacing: 0.04em; margin-bottom: 16px; }
.crate-text { color: var(--parchment); margin-bottom: 16px; }
.crate-text:last-child { margin-bottom: 0; }

/* Build footer */
.build-footer {
    background: #111114;
    padding: 40px;
    margin-top: 64px;
    text-align: center;
}
.terminal-output { text-align: left; display: inline-block; }
.terminal-line {
    display: block;
    font-family: 'Overpass Mono', monospace;
    font-size: 14px;
    color: var(--verdigris);
    opacity: 0;
    margin-bottom: 8px;
}
.terminal-line.shown { opacity: 1; }
.terminal-finish { color: var(--copper); font-weight: 400; }

.footer-ferris {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}
.footer-ferris svg { width: 48px; height: 32px; opacity: 0.6; }

/* Dashed separator */
.trace-line + .crate-section { margin-top: 0; }

@media (max-width: 1024px) {
    .side-nav { display: none; }
    .manifest { padding: 0 24px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 32px; }
    .crate-title { font-size: 24px; }
    .crate-section { padding: 24px; }
    .bracket-watermark { font-size: 80px; }
}
