/* turingtest.quest -- Y2K-futurism, split-screen, calm-serene */

:root {
    --bg-deep: #1A0A2A;
    --bg-surface: #2A1A3A;
    --candy-pink: #FF6EB4;
    --candy-cyan: #6EFFE0;
    --candy-yellow: #FFE06E;
    --candy-lavender: #B46EFF;
    --text-human: #F8E0F0;
    --text-machine: #E0F0F8;
    --text-system: #8A6AAA;
    --blob-surface: #3A2A4A;
    --chrome-1: #FFFFFF;
    --chrome-2: #E0E0F0;
    --chrome-3: #C0C0E0;
}

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

html, body {
    background: var(--bg-deep);
    color: var(--text-human);
    font-family: "Crimson Pro", Georgia, serif;
    font-size: 17px;
    line-height: 1.72;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    position: relative;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(180,110,255,0.10) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 90%, rgba(110,255,224,0.08) 0%, transparent 55%),
        var(--bg-deep);
    min-height: 100vh;
}

/* --------- Cycles Counter --------- */
.cycles-counter {
    position: fixed;
    top: 20px;
    right: 24px;
    font-family: "Space Mono", "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-system);
    opacity: 0.4;
    z-index: 100;
    mix-blend-mode: screen;
    pointer-events: none;
}

/* --------- Chrome Text Effect --------- */
.chrome-text {
    background: linear-gradient(
        100deg,
        #FFFFFF 0%,
        #E0E0F0 20%,
        #C0C0E0 40%,
        #E0E0F0 60%,
        #FFFFFF 80%,
        #C0C0E0 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: chromeSlide 20s linear infinite;
}

@keyframes chromeSlide {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* --------- Boot Screen --------- */
.boot-screen {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
}

.boot-blob-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
    filter: blur(20px);
    opacity: 0.85;
}

.boot-blob {
    width: min(80vmin, 800px);
    height: min(80vmin, 800px);
    mix-blend-mode: screen;
    animation: bootBlobMorph 12s ease-in-out infinite, bootBlobDrift 18s ease-in-out infinite;
    transform-origin: center;
}

@keyframes bootBlobMorph {
    0%, 100% { border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%; transform: scale(1) rotate(0deg); }
    33%      { border-radius: 40% 60% 65% 35% / 60% 40% 55% 45%; transform: scale(1.05) rotate(40deg); }
    66%      { border-radius: 55% 45% 35% 65% / 40% 60% 45% 55%; transform: scale(0.95) rotate(-30deg); }
}

@keyframes bootBlobDrift {
    0%, 100% { translate: -2% -2%; }
    50%      { translate: 3% 4%; }
}

.boot-content {
    position: relative;
    z-index: 2;
    max-width: 1100px;
}

.boot-meta {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-system);
    margin-bottom: 2rem;
}

.boot-title {
    font-family: "Outfit", "Inter", sans-serif;
    font-size: clamp(2.5rem, 7vw, 6rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-variation-settings: 'wght' 400;
    will-change: font-variation-settings, font-size;
    animation: titleBreath 8s ease-in-out infinite, chromeSlide 20s linear infinite;
    display: inline-block;
}

@keyframes titleBreath {
    0%, 100% { font-variation-settings: 'wght' 200; letter-spacing: 0.02em; }
    50%      { font-variation-settings: 'wght' 700; letter-spacing: -0.03em; }
}

.boot-subtitle {
    margin-top: 2.5rem;
    font-family: "Crimson Pro", serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(1.05rem, 1.6vw, 1.4rem);
    color: var(--text-machine);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.88;
}

.boot-scroll-cue {
    position: absolute;
    bottom: -12vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-system);
    animation: cueFloat 4s ease-in-out infinite;
}

.scroll-arrow {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--candy-lavender));
}

@keyframes cueFloat {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.7; }
    50%      { transform: translate(-50%, 8px); opacity: 1; }
}

/* --------- Split (Dialogue) Structure --------- */
.dialogue-shell {
    display: block;
    position: relative;
    margin-top: 12vh;
}

.split {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 0;
    min-height: 100vh;
    position: relative;
    border-top: 1px solid rgba(180,110,255,0.14);
}

.split::before {
    content: "";
    position: absolute;
    left: calc(55% - 0.5px);
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(180,110,255,0.25) 20%,
        rgba(110,255,224,0.2) 60%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.split-left {
    padding: 12vh 4rem 14vh 6vw;
    display: flex;
    align-items: center;
}

.split-right {
    position: relative;
}

.dialogue {
    display: flex;
    flex-direction: column;
    gap: 2.6rem;
    max-width: 560px;
}

.exchange {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1.1s ease, transform 1.1s ease;
}

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

.speaker {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-system);
}

.speaker-human { color: var(--candy-pink); opacity: 0.75; }
.speaker-machine { color: var(--candy-cyan); opacity: 0.75; }

.line {
    font-family: "Crimson Pro", serif;
    font-size: 17px;
    line-height: 1.72;
    font-weight: 400;
}

.line-human {
    color: var(--text-human);
}

.line-machine {
    color: var(--text-machine);
    font-style: italic;
    font-weight: 300;
}

/* --------- Sticky Art (Right Half) --------- */
.sticky-art {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, var(--bg-surface) 0%, var(--bg-deep) 90%);
    filter: sepia(0.1) contrast(1.05);
}

.paper-texture {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(248,224,240,0.05) 1px, transparent 1px),
        radial-gradient(rgba(110,255,224,0.04) 1px, transparent 1px);
    background-size: 3px 3px, 7px 7px;
    background-position: 0 0, 1px 1px;
    opacity: 0.6;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 420px;
    height: 420px;
    mix-blend-mode: screen;
    opacity: 0.38;
    filter: blur(4px);
    will-change: transform, border-radius;
}

/* Composition I */
.sticky-art-1 .blob-a { top: 8%;  left: 4%;  animation: blobMorphA 12s ease-in-out infinite, driftA 22s ease-in-out infinite; }
.sticky-art-1 .blob-b { top: 30%; left: 32%; animation: blobMorphB 16s ease-in-out infinite, driftB 26s ease-in-out infinite; opacity: 0.32; }
.sticky-art-1 .blob-c { bottom: 8%; right: 8%; animation: blobMorphC 10s ease-in-out infinite, driftC 18s ease-in-out infinite; opacity: 0.28; width: 340px; height: 340px; }

/* Composition II */
.sticky-art-2 .blob-a { top: 12%; right: 6%;  animation: blobMorphB 14s ease-in-out infinite, driftB 24s ease-in-out infinite; }
.sticky-art-2 .blob-b { bottom: 14%; left: 10%; animation: blobMorphA 18s ease-in-out infinite, driftA 28s ease-in-out infinite; opacity: 0.32; }
.sticky-art-2 .blob-c { top: 40%; left: 38%;  animation: blobMorphC 12s ease-in-out infinite, driftC 20s ease-in-out infinite; opacity: 0.26; width: 360px; height: 360px; }

/* Composition III */
.sticky-art-3 .blob-a { top: 6%;  left: 14%; animation: blobMorphC 16s ease-in-out infinite, driftC 24s ease-in-out infinite; }
.sticky-art-3 .blob-b { top: 38%; right: 4%;  animation: blobMorphA 20s ease-in-out infinite, driftA 30s ease-in-out infinite; opacity: 0.34; }
.sticky-art-3 .blob-c { bottom: 10%; left: 22%; animation: blobMorphB 13s ease-in-out infinite, driftB 22s ease-in-out infinite; opacity: 0.3; width: 380px; height: 380px; }

@keyframes blobMorphA {
    0%, 100% { border-radius: 40% 60% 70% 30% / 60% 30% 40% 70%; transform: scale(1) rotate(0deg); }
    50%      { border-radius: 70% 30% 50% 50% / 30% 70% 60% 40%; transform: scale(1.08) rotate(25deg); }
}

@keyframes blobMorphB {
    0%, 100% { border-radius: 55% 45% 35% 65% / 40% 60% 40% 60%; transform: scale(1) rotate(0deg); }
    50%      { border-radius: 35% 65% 60% 40% / 65% 40% 55% 45%; transform: scale(0.94) rotate(-30deg); }
}

@keyframes blobMorphC {
    0%, 100% { border-radius: 60% 40% 45% 55% / 55% 45% 60% 40%; transform: scale(1) rotate(0deg); }
    50%      { border-radius: 40% 60% 65% 35% / 45% 55% 35% 65%; transform: scale(1.1) rotate(18deg); }
}

@keyframes driftA {
    0%, 100% { translate: 0 0; }
    50%      { translate: 3% 4%; }
}

@keyframes driftB {
    0%, 100% { translate: 0 0; }
    50%      { translate: -4% 3%; }
}

@keyframes driftC {
    0%, 100% { translate: 0 0; }
    50%      { translate: 3% -5%; }
}

.sticky-caption {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-system);
    opacity: 0.55;
    z-index: 3;
}

/* --------- Convergence --------- */
.convergence {
    position: relative;
    min-height: 100vh;
    padding: 18vh 6vw 20vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top: 1px solid rgba(248,224,240,0.08);
}

.convergence::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(180,110,255,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 80%, rgba(110,255,224,0.08) 0%, transparent 60%);
    pointer-events: none;
}

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

.convergence-art {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.conv-blob {
    width: min(60vmin, 520px);
    height: min(60vmin, 520px);
    mix-blend-mode: screen;
    filter: blur(8px);
    opacity: 0.7;
    animation: bootBlobMorph 14s ease-in-out infinite;
}

.conv-lead {
    font-family: "Space Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-system);
    margin-bottom: 1.6rem;
}

.conv-title {
    font-family: "Outfit", "Inter", sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 400;
    font-variation-settings: 'wght' 350;
    line-height: 1.12;
    letter-spacing: -0.01em;
    animation: chromeSlide 20s linear infinite, convBreath 10s ease-in-out infinite;
    margin-bottom: 2.5rem;
    display: inline-block;
}

@keyframes convBreath {
    0%, 100% { font-variation-settings: 'wght' 250; }
    50%      { font-variation-settings: 'wght' 600; }
}

.conv-body {
    font-family: "Crimson Pro", serif;
    font-size: 1.15rem;
    font-weight: 300;
    line-height: 1.78;
    color: var(--text-human);
    font-style: italic;
    max-width: 560px;
    margin: 0 auto 3rem;
    opacity: 0.92;
}

.conv-signoff {
    font-family: "Space Mono", monospace;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-system);
    opacity: 0.6;
}

/* --------- Convergence Merge Effect --------- */
.dialogue-shell.converging .split::before {
    opacity: calc(1 - var(--merge, 0));
    transition: opacity 0.6s linear;
}

/* --------- Mobile --------- */
@media (max-width: 768px) {
    .split {
        grid-template-columns: 1fr;
    }
    .split::before {
        display: none;
    }
    .split-left {
        padding: 10vh 1.5rem;
    }
    .split-right {
        min-height: 70vh;
    }
    .sticky-art {
        position: relative;
        height: 70vh;
    }
    .boot-title {
        letter-spacing: -0.01em;
    }
    .boot-scroll-cue {
        bottom: -8vh;
    }
    .cycles-counter {
        top: 12px;
        right: 12px;
    }
    .dialogue {
        gap: 1.8rem;
    }
}

/* --------- Selection --------- */
::selection {
    background: var(--candy-lavender);
    color: var(--bg-deep);
}
