/* undo.quest — styles */

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

:root {
    --bg-deep: #0d0d12;
    --bg-elevated: #1a1a24;
    --surface: #2a2a38;
    --text-primary: #d4d4dc;
    --text-secondary: #7a7a8e;
    --accent-cyan: #00e5cc;
    --accent-green: #39ff8b;
    --accent-magenta: #ff3a6e;
    --accent-purple: #7b5ea7;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Generative wave canvas — fixed fullscreen backdrop */
#waveCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Scroll container */
.scroll-container {
    position: relative;
    z-index: 1;
}

/* Scene — each 100vh */
.scene {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
    position: relative;
}

/* Content nodes — constellation-style floating islands */
.content-node {
    max-width: 38ch;
    padding: 2rem 2.5rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.content-node.dissolving {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.node-offset {
    margin-top: 3rem;
    margin-left: 8rem;
}

/* Animated border effect */
.border-animated {
    border: 1px solid transparent;
    background: linear-gradient(var(--bg-deep), var(--bg-deep)) padding-box,
                linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-magenta)) border-box;
    background-size: 100% 100%, 300% 300%;
    animation: borderShift 8s ease-in-out infinite;
}

@keyframes borderShift {
    0% { background-position: 0 0, 0% 0%; }
    50% { background-position: 0 0, 100% 100%; }
    100% { background-position: 0 0, 0% 0%; }
}

/* Dashed animated border variant */
.border-animated::before {
    content: '';
    position: absolute;
    inset: -1px;
    border: 1px dashed var(--accent-cyan);
    opacity: 0.15;
    animation: dashRotate 20s linear infinite;
}

@keyframes dashRotate {
    to { stroke-dashoffset: -1000; }
}

/* Labels — IBM Plex Mono accent */
.label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    color: var(--accent-cyan);
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.7;
}

/* Typography */
h1, h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.domain-title {
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text-primary);
}

.domain-title .dot {
    color: var(--accent-cyan);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    max-width: 38ch;
}

.tagline {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 2s ease 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 0.6; }
}

.closing-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-align: center;
}

.cursor-blink {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--accent-cyan);
    font-size: 1.4rem;
    margin-top: 1rem;
    text-align: center;
    animation: blink 1s step-end infinite;
}

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

/* Neon glow on hover for content nodes */
.border-animated:hover {
    box-shadow: 0 0 30px rgba(57, 255, 139, 0.08), 0 0 60px rgba(123, 94, 167, 0.05);
}

/* Scene 1 special — near total darkness initially */
.scene-1 .content-node {
    opacity: 0;
    animation: emergeSlow 3s ease 0.5s forwards;
}

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