/* prototype.st — Scandinavian Industrial Futurism */

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

:root {
    --charcoal: #0d0d0d;
    --ash: #1c1c1e;
    --concrete: #2e2d2b;
    --birch: #f0ece4;
    --parchment: #d9d2c5;
    --burnt-orange: #c4620a;
    --ember: #e87b1a;
    --rust: #7a3a05;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--birch);
    color: var(--charcoal);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Boot Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--charcoal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

#boot-screen.dismissed {
    transform: translateY(-100vh);
}

#boot-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(5rem, 16vw, 14rem);
    color: var(--birch);
    letter-spacing: 0.04em;
    line-height: 0.92;
    z-index: 2;
}

#boot-title span {
    display: inline-block;
    opacity: 0;
    animation: charFadeIn 0.3s forwards;
}

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

#build-logs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: rgba(240, 236, 228, 0.1);
    overflow: hidden;
    padding: 2rem;
    line-height: 1.8;
    white-space: pre-wrap;
    z-index: 1;
}

/* Main Content */
#main-content {
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

#main-content.visible {
    opacity: 1;
}

/* Section Base */
.section {
    position: relative;
    min-height: 100vh;
    padding: 4rem 2rem;
    overflow: hidden;
}

.section-dark {
    background: var(--ash);
    color: var(--birch);
}

/* Grid Overlay */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 0.5rem;
    pointer-events: none;
    z-index: 0;
}

.grid-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        rgba(196, 130, 60, 0.06) 0px,
        rgba(196, 130, 60, 0.06) 1px,
        transparent 1px,
        transparent calc(100% / 16)
    );
}

/* Fold Line */
.fold-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--parchment),
        rgba(196, 98, 10, 0.3),
        var(--parchment),
        transparent
    );
    z-index: 1;
    transition: transform 0.3s ease;
}

/* Section Titles */
.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 14vw, 12rem);
    letter-spacing: 0.04em;
    line-height: 0.92;
    text-transform: uppercase;
}

/* Manifesto Section */
#manifesto {
    display: flex;
    align-items: stretch;
    padding: 0;
    min-height: 100vh;
}

.manifesto-left {
    width: 55%;
    padding: 6rem 3rem 4rem 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.manifesto-left .section-title {
    font-size: clamp(3rem, 10vw, 8rem);
    margin-bottom: 2rem;
    color: var(--charcoal);
}

.manifesto-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 580px;
    color: var(--concrete);
}

.pull-quote {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--burnt-orange);
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin: 2rem 0;
    border-left: 2px solid var(--burnt-orange);
    padding-left: 1.5rem;
}

.margin-note {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--parchment);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1rem 0;
}

.section-dark .margin-note {
    color: var(--concrete);
}

.manifesto-right {
    width: 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--birch);
}

.wireframe-geo {
    width: 80%;
    max-width: 400px;
    height: auto;
}

.rotating-form {
    animation: rotateY 30s linear infinite;
    transform-origin: center center;
}

@keyframes rotateY {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.right-note {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    text-align: right;
    color: var(--parchment);
}

/* Process Section */
#process {
    padding-top: 8rem;
}

.diagonal-cut {
    position: absolute;
    top: -4rem;
    left: 0;
    width: 100%;
    height: 8rem;
    background: var(--birch);
    transform: skewY(-3deg);
    transform-origin: top left;
}

.process-title {
    color: var(--birch);
    margin-bottom: 4rem;
    font-size: clamp(3rem, 8vw, 7rem);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.process-card {
    border: 1px solid rgba(196, 98, 10, 0.2);
    padding: 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.15s ease;
}

.process-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.process-card.glitch-active {
    transform: translateX(6px);
    border-color: var(--ember);
}

.card-number {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--burnt-orange);
    display: block;
    margin-bottom: 1rem;
}

.process-card h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    color: var(--birch);
}

.process-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--parchment);
}

/* Material Study Section */
#material {
    padding: 4rem 0;
}

#material .section-title {
    padding: 0 2rem;
    margin-bottom: 2rem;
    font-size: clamp(3rem, 8vw, 7rem);
}

.material-scroll {
    overflow-x: auto;
    scrollbar-width: none;
}

.material-scroll::-webkit-scrollbar {
    display: none;
}

.material-composition {
    width: 200vw;
    height: 70vh;
    position: relative;
    display: flex;
    align-items: center;
}

.halftone-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, var(--charcoal) 1px, transparent 1px);
    background-size: 4px 4px;
    opacity: 0.08;
}

.geometric-block {
    position: absolute;
}

.block-1 {
    width: 20vw;
    height: 40vh;
    background: var(--charcoal);
    top: 10%;
    left: 15%;
}

.block-2 {
    width: 15vw;
    height: 25vh;
    background: var(--burnt-orange);
    top: 40%;
    left: 55%;
    opacity: 0.8;
}

.wireframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.material-text {
    position: absolute;
    top: 20%;
    left: 40%;
    max-width: 400px;
    z-index: 2;
}

.material-text-2 {
    left: 70%;
    top: 50%;
}

.material-caption {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--burnt-orange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.material-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--concrete);
}

/* Iteration Log */
#log {
    padding: 6rem 2rem;
    min-height: auto;
}

.log-title {
    color: var(--birch);
    margin-bottom: 3rem;
    font-size: clamp(3rem, 8vw, 7rem);
}

.log-entries {
    max-width: 900px;
    margin: 0 auto;
}

.log-entry {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(196, 98, 10, 0.1);
    opacity: 0;
    transform: translateX(-2px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.log-entry.visible {
    opacity: 1;
    transform: translateX(0);
}

.log-entry.glitch-text {
    text-shadow: 2px 0 var(--ember), -2px 0 rgba(13, 13, 30, 0.8);
}

.log-time {
    color: var(--burnt-orange);
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
}

.log-msg {
    color: var(--parchment);
}

.cursor-blink {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    color: var(--burnt-orange);
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    animation: blink 1s step-end infinite;
}

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

/* Colophon */
#colophon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.colophon-title {
    margin-bottom: 3rem;
}

.colophon-proto {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(6rem, 18vw, 16rem);
    color: var(--burnt-orange);
    letter-spacing: 0.04em;
    line-height: 0.92;
}

.colophon-st {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(6rem, 18vw, 16rem);
    color: var(--charcoal);
    letter-spacing: 0.04em;
    line-height: 0.92;
}

.colophon-specs {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--concrete);
    line-height: 2.2;
}

#colophon-counter {
    margin-top: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: var(--burnt-orange);
}

/* Persistent Counter */
#iteration-counter {
    position: fixed;
    bottom: 1.5rem;
    right: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: rgba(196, 98, 10, 0.5);
    z-index: 999;
    letter-spacing: 0.03em;
}

/* Scan Lines */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(196, 98, 10, 0.04) 2px,
        rgba(196, 98, 10, 0.04) 3px
    );
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
    z-index: 100;
}

.scanlines.active {
    opacity: 1;
}

/* Link hover effect */
a {
    color: var(--burnt-orange);
    text-decoration: none;
    background-image: linear-gradient(var(--burnt-orange), var(--burnt-orange));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s ease;
}

a:hover {
    background-size: 100% 2px;
}

/* Responsive */
@media (max-width: 768px) {
    #manifesto {
        flex-direction: column;
    }
    .manifesto-left,
    .manifesto-right {
        width: 100%;
    }
    .manifesto-left {
        padding: 4rem 2rem;
    }
    .manifesto-right {
        min-height: 50vh;
    }
    .process-grid {
        grid-template-columns: 1fr;
    }
}
