/* ============================================
   nonri.net — Luxury Terminal / Broken Grid
   ============================================ */

:root {
    --void: #0d0f12;
    --surface: #1c1f26;
    --steel-dim: #6b7280;
    --steel-mid: #b8bfc6;
    --steel-bright: #e2e6ea;
    --heated-blue: #3b82f6;
    --heated-amber: #d97706;
    --blush: #c9a0a0;
}

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

html {
    scroll-behavior: smooth;
    background: var(--void);
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--void);
    color: var(--steel-mid);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---- Scenes ---- */
.scene {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ============================================
   Scene 1: Boot Sequence
   ============================================ */
#scene-boot {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--void);
}

.boot-lines {
    position: absolute;
    top: 10%;
    left: 8%;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--steel-dim);
    opacity: 0.4;
    white-space: pre;
    line-height: 1.8;
}

.hero-domain {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: lowercase;
    color: var(--steel-bright);
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--steel-dim);
    margin-top: 1.2rem;
    opacity: 0;
    animation: fadeIn 1.5s ease 2.5s forwards;
}

.cursor-blink {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.2rem;
    color: var(--heated-amber);
    margin-top: 2rem;
    animation: blink 1s step-end infinite;
}

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

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

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--heated-blue), transparent);
    opacity: 0.15;
    animation: scanMove 4s linear infinite;
    pointer-events: none;
}

@keyframes scanMove {
    0% { top: 0; }
    100% { top: 100%; }
}

/* ---- Glitch Effect ---- */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch::before {
    color: var(--heated-blue);
    left: 2px;
    clip-path: inset(20% 0 60% 0);
    animation: glitch1 3s infinite linear alternate-reverse;
}

.glitch::after {
    color: var(--heated-amber);
    left: -2px;
    clip-path: inset(60% 0 10% 0);
    animation: glitch2 3s infinite linear alternate-reverse;
}

@keyframes glitch1 {
    0% { clip-path: inset(20% 0 60% 0); }
    20% { clip-path: inset(45% 0 30% 0); }
    40% { clip-path: inset(10% 0 70% 0); }
    60% { clip-path: inset(80% 0 5% 0); }
    80% { clip-path: inset(35% 0 50% 0); }
    100% { clip-path: inset(55% 0 20% 0); }
}

@keyframes glitch2 {
    0% { clip-path: inset(60% 0 10% 0); }
    20% { clip-path: inset(15% 0 65% 0); }
    40% { clip-path: inset(75% 0 5% 0); }
    60% { clip-path: inset(30% 0 50% 0); }
    80% { clip-path: inset(5% 0 80% 0); }
    100% { clip-path: inset(50% 0 25% 0); }
}

/* ============================================
   Scene 2: Manifesto
   ============================================ */
#scene-manifesto {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 5vh 5vw;
}

.manifesto-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.manifesto-word {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    text-transform: lowercase;
    color: var(--steel-bright);
    line-height: 0.9;
    position: relative;
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.manifesto-word.visible {
    opacity: 1;
}

.mw-1 {
    transform: translateX(-5%) rotate(-0.5deg);
}
.mw-1.visible {
    transform: translateX(-3%) rotate(-0.5deg);
}

.mw-2 {
    transform: translateX(8%) rotate(0.3deg);
    color: var(--heated-blue);
}
.mw-2.visible {
    transform: translateX(5%) rotate(0.3deg);
}

.mw-3 {
    transform: translateX(-2%) rotate(0.2deg);
    color: var(--heated-amber);
}
.mw-3.visible {
    transform: translateX(-2%) rotate(0.2deg);
}

.manifesto-body {
    max-width: 520px;
    margin-top: 3rem;
    position: relative;
    z-index: 2;
    transform: translateX(8%);
}

.manifesto-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--steel-dim);
    line-height: 1.8;
    letter-spacing: 0.02em;
}

.particle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   Scene 3: Signal / Data
   ============================================ */
#scene-signal {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10vh 5vw;
    position: relative;
}

.signal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.signal-block {
    background: var(--surface);
    border: 1px solid rgba(107, 114, 128, 0.15);
    padding: 1.5rem;
    transform: translate(var(--offset-x, 0), var(--offset-y, 0));
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.signal-block:hover {
    border-color: var(--heated-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.08);
}

.signal-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    font-weight: 300;
    color: var(--steel-dim);
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.signal-value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--steel-bright);
    margin-bottom: 1rem;
}

.signal-bar {
    width: 100%;
    height: 2px;
    background: rgba(107, 114, 128, 0.2);
    position: relative;
    overflow: hidden;
}

.signal-bar-fill {
    height: 100%;
    width: var(--fill);
    background: linear-gradient(90deg, var(--heated-blue), var(--steel-mid));
    transition: width 1.5s ease;
}

.sf-entropy {
    background: linear-gradient(90deg, var(--heated-amber), var(--blush));
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(107, 114, 128, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(107, 114, 128, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* ============================================
   Scene 4: Terminus
   ============================================ */
#scene-terminus {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

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

.terminus-prompt {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--steel-mid);
    margin-bottom: 2rem;
    text-align: left;
    display: inline-block;
}

.prompt-prefix {
    color: var(--heated-blue);
}

.prompt-cmd {
    color: var(--steel-bright);
}

.prompt-cursor {
    color: var(--heated-amber);
    animation: blink 1s step-end infinite;
}

.terminus-output {
    text-align: left;
    margin-bottom: 3rem;
    display: inline-block;
}

.terminus-output p {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--steel-dim);
    line-height: 2;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.terminus-output p.visible {
    opacity: 0.6;
    transform: translateY(0);
}

.terminus-domain {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--steel-dim);
    margin-top: 2rem;
}

.crosshair-svg {
    position: absolute;
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    animation: rotateSlow 30s linear infinite;
}

@keyframes rotateSlow {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .signal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .manifesto-body {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .signal-grid {
        grid-template-columns: 1fr;
    }
}
