/* prototype.rs — Y2K futurism / minimal-navigation / cool-grays */

:root {
    --silver-mist: #E4E8EC;
    --steel: #C8CED6;
    --graphite: #4A5568;
    --leaf-green: #6B9F7B;
    --chrome-blue: #7B8FA8;
    --dark-slate: #2D3748;
    --pure-white: #FFFFFF;

    --max-content: 720px;
    --scroll-progress: 0;

    --font-display: "Bebas Neue", "Inter", sans-serif;
    --font-body: "IBM Plex Sans", "Inter", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html, body {
    background: linear-gradient(180deg, var(--steel) 0%, var(--silver-mist) 60%, var(--silver-mist) 100%);
    color: var(--graphite);
    font-family: var(--font-body);
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    overflow-x: hidden;
}

/* Scroll progress bar (Y2K plastic sheen) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: calc(var(--scroll-progress) * 100%);
    background: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, var(--leaf-green) 30%, #5B8C6A 100%);
    box-shadow: 0 0 6px rgba(107,159,123,0.6);
    z-index: 9999;
    transition: width 80ms linear;
}

/* ---------- Launch Screen ---------- */
.launch-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(160deg, var(--steel) 0%, var(--silver-mist) 100%);
    overflow: hidden;
    padding: 32px 24px;
}

.launch-inner {
    position: relative;
    width: 100%;
    max-width: 1100px;
    text-align: center;
    z-index: 2;
}

.leaf-frond {
    position: absolute;
    right: -20px;
    top: -60px;
    width: clamp(140px, 18vw, 240px);
    opacity: 0;
    transform: rotate(8deg);
    pointer-events: none;
    z-index: 1;
    transition: opacity 1s ease-out;
}

.leaf-frond.is-visible {
    opacity: 0.85;
}

.leaf-frond svg {
    width: 100%;
    height: auto;
    display: block;
}

.wordmark {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(40px, 8vw, 120px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--graphite);
    line-height: 0.9;
    margin: 0 auto;
    user-select: none;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: baseline;
}

.wordmark .char {
    display: inline-block;
    transform: translateY(-30px);
    opacity: 0;
    transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 600ms ease-out;
    transition-delay: var(--char-delay, 0ms);
}

.wordmark.is-revealed .char {
    transform: translateY(0);
    opacity: 1;
}

.wordmark .char.dot {
    color: var(--leaf-green);
    margin: 0 0.02em;
}

.tagline {
    margin-top: clamp(16px, 2vw, 24px);
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--graphite);
    font-size: clamp(14px, 1.3vw, 16px);
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 800ms ease-out 800ms, transform 800ms ease-out 800ms;
}

.wordmark.is-revealed ~ .tagline,
.launch-inner.is-revealed .tagline {
    opacity: 0.85;
    transform: translateY(0);
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: -40px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: var(--graphite);
    opacity: 0;
    transition: opacity 800ms ease-out 1200ms;
}

.launch-inner.is-revealed .scroll-indicator {
    opacity: 0.7;
}

.scroll-indicator .arrow {
    width: 18px;
    height: 24px;
    animation: bob 2.4s ease-in-out infinite;
}

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

/* ---------- Stream ---------- */
.stream {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: clamp(80px, 12vw, 160px) 24px clamp(60px, 8vw, 120px);
    display: flex;
    flex-direction: column;
    gap: clamp(48px, 6vw, 88px);
}

[data-stream] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 700ms ease-out, transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transition-delay: var(--delay, 0ms);
    will-change: opacity, transform;
}

[data-stream].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.text-block {
    max-width: 100%;
}

.block-heading {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(28px, 4.6vw, 56px);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--dark-slate);
    line-height: 1.0;
    margin-bottom: 18px;
}

.text-block p {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--graphite);
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    max-width: 640px;
}

.text-block.accent {
    text-align: center;
    padding: clamp(24px, 4vw, 48px) 0;
    border-top: 1px solid rgba(74,85,104,0.15);
    border-bottom: 1px solid rgba(74,85,104,0.15);
}

.text-block.accent .pull-quote {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(24px, 3.6vw, 44px);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--chrome-blue);
    line-height: 1.05;
}

/* ---------- Illustration strips ---------- */
.illustration-strip {
    width: 100%;
    margin: 0;
    padding: clamp(16px, 2vw, 24px);
    background: linear-gradient(180deg, var(--pure-white) 0%, #F4F6F8 100%);
    border: 1px solid rgba(123,143,168,0.18);
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 1px 0 rgba(45,55,72,0.04),
        0 18px 30px -22px rgba(45,55,72,0.18);
}

.diagram {
    width: 100%;
    height: auto;
    display: block;
}

.diagram .draw {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1500ms ease-out;
}

.illustration-strip.is-visible .diagram .draw {
    stroke-dashoffset: 0;
}

.diagram .fill-leaf {
    fill: rgba(107,159,123,0);
    transition: fill 500ms ease-out 1500ms;
}

.illustration-strip.is-visible .diagram .fill-leaf {
    fill: rgba(107,159,123,0.20);
}

.diagram-labels text {
    opacity: 0;
    transition: opacity 500ms ease-out 1600ms;
}

.illustration-strip.is-visible .diagram-labels text {
    opacity: 0.75;
}

/* ---------- Terminal Footer ---------- */
.terminal-footer {
    background: var(--dark-slate);
    color: #C8CED6;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.04em;
    padding: clamp(32px, 4vw, 56px) clamp(20px, 4vw, 48px);
    margin-top: clamp(60px, 8vw, 120px);
}

.terminal-line {
    max-width: var(--max-content);
    margin: 0 auto;
    line-height: 1.8;
    color: #C8CED6;
}

.terminal-line .prompt-char {
    color: var(--leaf-green);
    margin-right: 10px;
}

.terminal-line .cmd {
    color: #E4E8EC;
}

.terminal-line .output {
    color: #9AA5B5;
    margin-left: 20px;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: var(--leaf-green);
    vertical-align: middle;
    animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
    to { visibility: hidden; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 600px) {
    .leaf-frond {
        right: -40px;
        top: 12px;
        width: 120px;
        opacity: 0;
    }
    .leaf-frond.is-visible {
        opacity: 0.5;
    }
    .stream {
        padding-top: clamp(60px, 14vw, 100px);
    }
    .scroll-indicator {
        bottom: -10px;
    }
    .terminal-line .output {
        margin-left: 0;
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .wordmark .char { transform: none; opacity: 1; }
    [data-stream] { opacity: 1; transform: none; }
    .diagram .draw { stroke-dashoffset: 0; }
}
