/* ================================================
   prototype.rs -- Y2K Futurism / Cool Grays
   ================================================ */

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(16px, 1.5vw, 18px);
    line-height: 1.7;
    color: var(--graphite);
    background-color: var(--silver-mist);
    overflow-x: hidden;
}

/* --- Scroll Progress Bar --- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--leaf-green);
    width: calc(var(--scroll-progress) * 100%);
    z-index: 9999;
    transition: width 0.1s linear;
}

/* --- Launch Screen --- */
#launch-screen {
    width: 100%;
    height: 100vh;
    background: linear-gradient(180deg, var(--steel) 0%, var(--silver-mist) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

/* --- Wordmark --- */
#wordmark {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(40px, 8vw, 120px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--dark-slate);
    line-height: 1;
    margin-bottom: 40px;
}

#wordmark .letter {
    display: inline-block;
    opacity: 0;
    transform: translateY(-30px);
    animation: letterDrop 0.5s ease-out forwards;
}

#wordmark .letter.dot {
    color: var(--leaf-green);
}

/* Stagger animation delays for each letter */
#wordmark .letter:nth-child(1)  { animation-delay: 0.1s; }
#wordmark .letter:nth-child(2)  { animation-delay: 0.16s; }
#wordmark .letter:nth-child(3)  { animation-delay: 0.22s; }
#wordmark .letter:nth-child(4)  { animation-delay: 0.28s; }
#wordmark .letter:nth-child(5)  { animation-delay: 0.34s; }
#wordmark .letter:nth-child(6)  { animation-delay: 0.40s; }
#wordmark .letter:nth-child(7)  { animation-delay: 0.46s; }
#wordmark .letter:nth-child(8)  { animation-delay: 0.52s; }
#wordmark .letter:nth-child(9)  { animation-delay: 0.58s; }
#wordmark .letter:nth-child(10) { animation-delay: 0.64s; }
#wordmark .letter:nth-child(11) { animation-delay: 0.70s; }
#wordmark .letter:nth-child(12) { animation-delay: 0.76s; }

@keyframes letterDrop {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Leaf Frond SVG --- */
#leaf-frond {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: clamp(80px, 12vw, 180px);
    opacity: 0;
    animation: frondFadeIn 1s ease-out 0.9s forwards;
    z-index: 1;
}

#leaf-frond svg {
    width: 100%;
    height: auto;
}

@keyframes frondFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* --- Scroll Hint Arrow --- */
#scroll-hint {
    opacity: 0;
    animation: scrollHintFade 1s ease-out 1.5s forwards;
}

#scroll-hint svg {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollHintFade {
    0% { opacity: 0; }
    100% { opacity: 0.6; }
}

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

/* --- Concept Stream --- */
#concept-stream {
    max-width: 720px;
    margin: 0 auto;
    padding: 80px 24px 40px;
}

/* --- Stream Blocks --- */
.stream-block {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    margin-bottom: 48px;
}

.stream-block.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Text Blocks --- */
.text-block {
    /* No borders, no cards, just text */
}

.stream-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(28px, 5vw, 48px);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--dark-slate);
    margin-bottom: 16px;
    line-height: 1.1;
}

.body-text {
    color: var(--graphite);
    margin-bottom: 12px;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* --- Illustration Strips --- */
.illustration-strip {
    margin: 56px 0;
    overflow: visible;
}

.line-illustration {
    width: 100%;
    height: auto;
    display: block;
}

/* SVG stroke draw animation */
.illustration-strip svg path,
.illustration-strip svg line,
.illustration-strip svg rect,
.illustration-strip svg circle,
.illustration-strip svg polygon,
.illustration-strip svg ellipse {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 1.5s ease-out, fill-opacity 0.5s ease-out 1.5s;
}

.illustration-strip.visible svg path,
.illustration-strip.visible svg line,
.illustration-strip.visible svg rect,
.illustration-strip.visible svg circle,
.illustration-strip.visible svg polygon,
.illustration-strip.visible svg ellipse {
    stroke-dashoffset: 0;
}

/* Text elements inside SVG should not be animated with dash */
.illustration-strip svg text {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-out 1.2s;
}

.illustration-strip.visible svg text {
    opacity: 1;
}

/* --- Leaf Accent --- */
.leaf-accent {
    margin: 40px 0;
}

/* --- Y2K Plastic Sheen (subtle) --- */
.stream-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 12px;
    background: linear-gradient(90deg, var(--leaf-green), var(--chrome-blue));
    border-radius: 2px;
    opacity: 0.7;
}

/* --- Terminal Footer --- */
#terminal-footer {
    background-color: var(--dark-slate);
    padding: 40px 24px;
    margin-top: 40px;
}

.terminal-content {
    max-width: 720px;
    margin: 0 auto;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--steel);
    line-height: 2;
}

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

.terminal-line {
    margin-bottom: 4px;
}

.terminal-muted {
    color: var(--chrome-blue);
    margin-top: 20px;
    opacity: 0.6;
}

/* --- Y2K Plastic Texture on Progress Bar --- */
#scroll-progress {
    background: linear-gradient(
        180deg,
        rgba(107, 159, 123, 0.9) 0%,
        var(--leaf-green) 40%,
        rgba(107, 159, 123, 0.7) 100%
    );
    box-shadow: 0 0 4px rgba(107, 159, 123, 0.3);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #leaf-frond {
        right: 4%;
        width: 60px;
    }

    #concept-stream {
        padding: 60px 20px 30px;
    }

    .stream-block {
        margin-bottom: 36px;
    }

    .illustration-strip {
        margin: 40px -20px;
        padding: 0 20px;
    }

    .terminal-content {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #wordmark {
        font-size: clamp(32px, 12vw, 60px);
    }

    #leaf-frond {
        position: static;
        transform: none;
        width: 60px;
        margin: 20px auto;
        display: block;
    }

    .launch-content {
        padding: 0 16px;
    }
}

/* --- Selection color --- */
::selection {
    background: rgba(107, 159, 123, 0.3);
    color: var(--dark-slate);
}
