/* ==========================================================================
   prototypic.dev — Cinematic Retro-Futuristic Void
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.9;
    color: #383040;
    background-color: #F6F4F0;
    overflow-x: hidden;
}

/* --- Depth Layers (Filmic Focus) --- */
.depth-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.depth-layer--far {
    background:
        radial-gradient(ellipse 600px 400px at 85% 20%, rgba(80, 136, 136, 0.04) 0%, transparent 100%),
        radial-gradient(ellipse 400px 600px at 10% 70%, rgba(56, 48, 64, 0.03) 0%, transparent 100%);
    filter: blur(2px);
}

.depth-layer--mid {
    background:
        radial-gradient(ellipse 300px 300px at 75% 50%, rgba(176, 168, 184, 0.05) 0%, transparent 100%);
    filter: blur(1px);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    z-index: 1;
}

.hero__content {
    width: 45%;
    margin-left: 10%;
    margin-right: clamp(100px, 18vw, 240px);
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1.2s ease-out 0.3s forwards;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__version-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    color: #686078;
    letter-spacing: 0.15em;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: labelFadeIn 0.8s ease-out 0.8s forwards;
}

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

.hero__title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: #181420;
    letter-spacing: 0.08em;
    line-height: 1.15;
    margin-bottom: 0;
}

.hero__underline {
    width: 0;
    height: 1px;
    background-color: #B0A8B8;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    animation: underlineDraw 0.6s ease-out 1.4s forwards;
}

@keyframes underlineDraw {
    to { width: 100%; }
}

.hero__tagline {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: clamp(0.8rem, 0.95vw, 0.9rem);
    color: #686078;
    letter-spacing: 0.04em;
    opacity: 0;
    animation: taglineFadeIn 0.8s ease-out 1.8s forwards;
}

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

/* --- Sections (General) --- */
.section {
    position: relative;
    z-index: 1;
    margin-bottom: 16vh;
}

.section__content {
    width: 45%;
    margin-left: 10%;
    margin-right: clamp(100px, 18vw, 240px);
}

.section__heading {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    color: #181420;
    letter-spacing: 0.08em;
    margin-bottom: 2.5rem;
    position: relative;
    display: inline-block;
    background-image: linear-gradient(#B0A8B8, #B0A8B8);
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 1px;
    padding-bottom: 0.5rem;
    transition: background-size 0.6s ease-out;
}

.section__heading.underline-visible {
    background-size: 100% 1px;
}

.section__text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    line-height: 1.9;
    color: #383040;
    max-width: 580px;
}

/* --- Photographs (Vintage Cinematic) --- */
.photograph__frame {
    margin-top: 3rem;
    position: relative;
}

.photograph__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #FAF8F6;
    border: 1px solid rgba(176, 168, 184, 0.3);
    overflow: hidden;
    filter: sepia(0.3) contrast(1.05);
    transition: filter 0.4s ease;
}

.photograph__image svg {
    width: 100%;
    height: 100%;
}

.photograph__image:hover {
    filter: sepia(0.15) contrast(1.08);
}

.photograph__caption {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.68rem;
    color: #686078;
    letter-spacing: 0.12em;
    margin-top: 0.8rem;
    text-transform: uppercase;
}

/* --- Process Timeline --- */
.process__timeline {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.process__step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.process__step.step-visible {
    opacity: 1;
    transform: translateY(0);
}

.process__step-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    color: #508888;
    letter-spacing: 0.15em;
    min-width: 2.5rem;
    padding-top: 0.15rem;
}

.process__step-content {
    flex: 1;
}

.process__step-title {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    color: #181420;
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}

.process__step-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.8rem, 0.9vw, 0.88rem);
    line-height: 1.9;
    color: #383040;
}

/* --- Archive Grid --- */
.archive__grid {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.archive__item {
    transition: transform 0.4s ease, filter 0.4s ease;
}

.archive__item[data-depth="foreground"] {
    z-index: 2;
    position: relative;
}

.archive__item[data-depth="midground"] {
    z-index: 1;
    position: relative;
    filter: blur(0.5px);
    opacity: 0.85;
}

.archive__item[data-depth="midground"]:hover {
    filter: blur(0);
    opacity: 1;
}

/* --- Philosophy Columns --- */
.philosophy__columns {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.philosophy__subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(0.85rem, 1vw, 0.95rem);
    color: #181420;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* --- Version Log --- */
.versions__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.versions__entry {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 1.2rem 0;
    border-bottom: 1px solid rgba(176, 168, 184, 0.2);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.versions__entry:last-child {
    border-bottom: none;
}

.versions__number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.82rem;
    color: #508888;
    letter-spacing: 0.08em;
    min-width: 4.5rem;
}

.versions__date {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.72rem;
    color: #686078;
    letter-spacing: 0.08em;
    min-width: 6.5rem;
}

.versions__note {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.78rem, 0.9vw, 0.85rem);
    color: #383040;
    line-height: 1.7;
}

/* --- Colophon --- */
.colophon__details {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 4rem;
}

.colophon__row {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(176, 168, 184, 0.15);
}

.colophon__row:last-child {
    border-bottom: none;
}

.colophon__label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.68rem;
    color: #686078;
    letter-spacing: 0.2em;
    min-width: 7rem;
    text-transform: uppercase;
}

.colophon__value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.78rem, 0.9vw, 0.85rem);
    color: #383040;
}

.colophon__footer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 4rem;
    padding-bottom: 8vh;
}

.colophon__domain {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.78rem;
    color: #181420;
    letter-spacing: 0.12em;
}

.colophon__timestamp {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 300;
    font-size: 0.68rem;
    color: #B0A8B8;
    letter-spacing: 0.2em;
}

/* --- Scroll-Based Section Reveals --- */
.section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero__content,
    .section__content {
        width: 65%;
        margin-left: 8%;
        margin-right: clamp(40px, 8vw, 120px);
    }
}

@media (max-width: 768px) {
    .hero__content,
    .section__content {
        width: 82%;
        margin-left: 6%;
        margin-right: 6%;
    }

    .section {
        margin-bottom: 10vh;
    }

    .versions__entry {
        flex-direction: column;
        gap: 0.3rem;
    }

    .colophon__row {
        flex-direction: column;
        gap: 0.2rem;
    }

    .colophon__footer {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --- Selection --- */
::selection {
    background-color: rgba(80, 136, 136, 0.2);
    color: #181420;
}
