/* RRIDDL.com - Surreal Dreamscape Promo */
/* Palette: #a78bfa, #312e81, #fbbf24, #e0e7ff, #1e1b4b, #6366f1, #0f0b2e */

:root {
    --purple-light: #a78bfa;
    --indigo-mid: #312e81;
    --gold: #fbbf24;
    --pale: #e0e7ff;
    --indigo-deep: #1e1b4b;
    --purple: #6366f1;
    --void: #0f0b2e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--indigo-deep);
    color: var(--pale);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   Morse-code dashed connector line
   ============================================ */
.morse-line {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100vh;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 8px,
        rgba(167, 139, 250, 0.12) 8px,
        rgba(167, 139, 250, 0.12) 14px,
        transparent 14px,
        transparent 20px,
        rgba(167, 139, 250, 0.12) 20px,
        rgba(167, 139, 250, 0.12) 22px,
        transparent 22px,
        transparent 28px,
        rgba(167, 139, 250, 0.12) 28px,
        rgba(167, 139, 250, 0.12) 30px,
        transparent 30px,
        transparent 36px,
        rgba(167, 139, 250, 0.12) 36px,
        rgba(167, 139, 250, 0.12) 42px,
        transparent 42px,
        transparent 50px
    );
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   Section base
   ============================================ */
.riddle-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    overflow: hidden;
}

/* ============================================
   Margin cipher fragments (scattered)
   ============================================ */
.margin-cipher {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: var(--purple);
    opacity: 0.12;
    letter-spacing: 0.15em;
    pointer-events: none;
    z-index: 2;
}

.margin-cipher.top-left {
    top: 2rem;
    left: 2.5rem;
}

.margin-cipher.bottom-right {
    bottom: 3rem;
    right: 3rem;
}

.margin-cipher.mid-left {
    top: 45%;
    left: 1.5rem;
    writing-mode: vertical-rl;
}

/* ============================================
   Panel cipher decorations
   ============================================ */
.panel-cipher {
    display: block;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: var(--purple);
    opacity: 0.15;
    margin-top: 1.5rem;
    letter-spacing: 0.1em;
}

/* ============================================
   SECTION 1: QUESTION / HERO
   ============================================ */
#question {
    background: var(--void);
    min-height: 100vh;
}

/* Negative-space question mark */
.question-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
    z-index: 1;
    transition: opacity 1.5s ease;
}

.qmark-svg {
    width: 360px;
    height: 540px;
}

/* CSS-drawn eye icon */
.eye-icon {
    position: absolute;
    top: 2.5rem;
    right: 3rem;
    z-index: 3;
}

.eye-svg {
    width: 50px;
    height: 25px;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Floating geometric planes that partially obscure */
.obscure-plane {
    position: absolute;
    background: var(--indigo-mid);
    box-shadow: 0 8px 30px rgba(15, 11, 46, 0.6);
}

.plane-1 {
    top: -15px;
    right: -60px;
    width: 240px;
    height: 55px;
    opacity: 0.5;
    transform: rotate(-4deg);
    z-index: 4;
}

.plane-2 {
    bottom: -25px;
    left: -50px;
    width: 180px;
    height: 40px;
    opacity: 0.3;
    transform: rotate(3deg);
    z-index: 4;
}

.brand-name {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 10vw, 68px);
    color: var(--pale);
    position: relative;
    z-index: 3;
    letter-spacing: 0.05em;
}

.hero-prompt {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    color: var(--purple-light);
    letter-spacing: 0.08em;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.prompt-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--purple-light);
    margin-left: 2px;
    animation: cursorBlink 1s step-end infinite;
}

/* ============================================
   SECTION 2: ENIGMAS
   ============================================ */
#enigmas {
    background: var(--indigo-deep);
    flex-direction: column;
    min-height: 180vh;
    padding: 8rem 2rem;
}

/* Rotated clue text at edges */
.rotated-clue {
    position: absolute;
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    color: rgba(167, 139, 250, 0.15);
    text-transform: uppercase;
    writing-mode: vertical-rl;
    pointer-events: none;
    z-index: 2;
}

.rotated-clue.left {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.rotated-clue.right {
    right: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
}

/* Enigma stack */
.enigma-stack {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 640px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.enigma-panel {
    background: var(--indigo-mid);
    padding: 2.5rem 3rem;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.5s ease;
}

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

/* Depth variations */
.depth-1 {
    box-shadow: 0 4px 12px rgba(15, 11, 46, 0.5);
}

.depth-2 {
    box-shadow: 0 10px 30px rgba(15, 11, 46, 0.7);
    margin-left: 3rem;
}

.depth-3 {
    box-shadow: 0 20px 50px rgba(15, 11, 46, 0.8);
    margin-left: -1.5rem;
}

.enigma-num {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: var(--gold);
    letter-spacing: 0.2em;
    display: block;
    margin-bottom: 1rem;
}

.enigma-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    color: var(--pale);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.enigma-body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(224, 231, 255, 0.5);
}

/* ============================================
   SECTION 3: PARADOX
   ============================================ */
#paradox {
    background: var(--void);
    flex-direction: column;
    min-height: 80vh;
    position: relative;
}

.paradox-layers {
    position: relative;
    height: 280px;
    width: 100%;
    max-width: 700px;
}

.paradox-text {
    position: absolute;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    white-space: nowrap;
    user-select: none;
    transition: opacity 0.6s ease;
}

.paradox-text.layer-1 {
    font-size: clamp(1.2rem, 3vw, 2.2rem);
    color: var(--pale);
    opacity: 0.2;
    top: 10%;
    left: 5%;
}

.paradox-text.layer-2 {
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    color: var(--pale);
    opacity: 0.15;
    top: 45%;
    right: 0%;
    transform: rotate(180deg);
}

.paradox-text.layer-3 {
    font-size: clamp(1.3rem, 3.5vw, 2.5rem);
    color: var(--gold);
    opacity: 0.2;
    top: 30%;
    left: 25%;
    transform: rotate(-12deg);
}

.paradox-text.layer-4 {
    font-size: clamp(0.8rem, 2vw, 1.3rem);
    color: var(--purple-light);
    opacity: 0.12;
    top: 70%;
    left: 10%;
    transform: rotate(5deg);
}

.paradox-text.layer-5 {
    font-size: clamp(0.7rem, 1.8vw, 1.1rem);
    color: var(--purple);
    opacity: 0.1;
    top: 60%;
    right: 10%;
    transform: rotate(-90deg);
    transform-origin: right center;
}

.cipher-strip {
    display: flex;
    gap: 1.5rem;
    margin-top: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cipher-char {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: var(--purple);
    opacity: 0.2;
    letter-spacing: 0.05em;
    transition: opacity 0.4s ease, color 0.4s ease;
}

.cipher-char.highlight {
    opacity: 0.6;
    color: var(--gold);
}

/* Paradox rotated clues */
.paradox-clue-left {
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
}

.paradox-clue-right {
    right: 18px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
}

/* ============================================
   SECTION 4: ANSWER
   ============================================ */
#answer {
    background: var(--indigo-deep);
    min-height: 60vh;
}

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

.answer-text {
    font-family: 'Fira Code', monospace;
    font-size: 2.2rem;
    color: var(--pale);
    letter-spacing: 0.3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blink-cursor {
    display: inline-block;
    width: 12px;
    height: 2rem;
    background: var(--purple-light);
    margin-left: 4px;
    animation: cursorBlink 1s step-end infinite;
}

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

.answer-sub {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(224, 231, 255, 0.3);
    margin-top: 2.5rem;
    letter-spacing: 0.02em;
}

/* ============================================
   Scroll-driven parallax depth on question mark
   ============================================ */
.question-mark.parallax-active {
    opacity: 0.14;
}

/* Enigma hover depth enhancement */
.enigma-panel.visible:hover {
    box-shadow: 0 24px 60px rgba(15, 11, 46, 0.9);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .depth-2 {
        margin-left: 0;
    }

    .depth-3 {
        margin-left: 0;
    }

    .rotated-clue {
        display: none;
    }

    .eye-icon {
        top: 1.5rem;
        right: 1.5rem;
    }

    .qmark-svg {
        width: 220px;
        height: 330px;
    }

    .margin-cipher {
        display: none;
    }

    .plane-1 {
        width: 160px;
        right: -30px;
    }

    .plane-2 {
        width: 120px;
        left: -30px;
    }

    .enigma-panel {
        padding: 2rem;
    }

    .paradox-layers {
        height: 220px;
    }

    .paradox-text.layer-5 {
        display: none;
    }
}

@media (max-width: 480px) {
    .brand-name {
        font-size: 2.8rem;
    }

    .enigma-title {
        font-size: 1.2rem;
    }

    .answer-text {
        font-size: 1.5rem;
    }
}
