/* saram.quest - Vaporwave Emotional Register */

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

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

body {
    background-color: #1A1625;
    color: #FFF5E6;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.72;
    overflow-x: hidden;
    position: relative;
}

/* === Scan Lines Overlay === */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(26, 22, 37, 0.04) 2px,
        rgba(26, 22, 37, 0.04) 3px
    );
}

@media (max-width: 768px) {
    .scanlines {
        display: none;
    }
}

/* === Data Rain Canvas === */
#data-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

/* === Floating Sidebar Glyphs === */
.sidebar-glyphs {
    position: fixed;
    left: 24px;
    top: 0;
    height: 100%;
    width: 24px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 10vh 0;
    opacity: 0.2;
    transition: opacity 0.6s ease-out;
}

.glyph {
    animation: glyphDrift 8s ease-in-out infinite;
}

.glyph-1 { animation-delay: 0s; }
.glyph-2 { animation-delay: -1.6s; }
.glyph-3 { animation-delay: -3.2s; }
.glyph-4 { animation-delay: -4.8s; }
.glyph-5 { animation-delay: -6.4s; }

@keyframes glyphDrift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(12px); }
}

@media (max-width: 768px) {
    .sidebar-glyphs {
        display: none;
    }
}

/* === Panels === */
.panel {
    min-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.panel-content {
    max-width: 720px;
    width: 100%;
    padding: 8vh 24px;
    position: relative;
    z-index: 2;
    margin-left: -40px;
}

@media (max-width: 768px) {
    .panel-content {
        margin-left: 0;
        padding: 8vh 20px;
    }
}

/* === Panel 1: Hero === */
.panel-1 {
    background-color: #1A1625;
}

.hero-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: clamp(8rem, 20vw, 16rem);
    color: #FFF5E6;
    text-align: center;
    line-height: 1;
    letter-spacing: -0.03em;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 2s ease-out 0.3s forwards;
}

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

.hero-subtitle {
    text-align: center;
    margin-top: 2rem;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.9rem;
    color: #A8E6CF;
    letter-spacing: 0.04em;
    min-height: 1.5em;
}

.typewriter {
    display: inline;
}

.cursor {
    display: inline-block;
    animation: cursorBlink 1s step-end infinite;
    color: #A8E6CF;
}

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

/* === Panel 2: Concept === */
.panel-2 {
    background-color: #2D2240;
}

.body-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.72;
    color: #FFF5E6;
    max-width: 62ch;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

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

.body-text em {
    color: #F2C4CE;
    font-style: italic;
    font-weight: 600;
}

/* === Circuit Trace === */
.circuit-trace {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.circuit-trace-left {
    left: calc(50% - 400px);
}

@media (max-width: 768px) {
    .circuit-trace-left {
        left: 8px;
    }
}

/* === Panel 3: Constellation === */
.panel-3 {
    background-color: #1A1625;
    min-height: 100vh;
}

.constellation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 2rem 1.5rem;
    max-width: 720px;
    width: 100%;
    padding: 4vh 0;
}

.constellation-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.constellation-item.visible {
    opacity: 1;
    transform: scale(1);
}

.constellation-item svg {
    animation: iconPulse 4s ease-in-out infinite;
}

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

.constellation-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    letter-spacing: 0.01em;
    color: #FFF5E6;
}

.text-lg {
    font-size: clamp(1.4rem, 3vw, 2rem);
}

.text-md {
    font-size: clamp(1.1rem, 2.2vw, 1.5rem);
    color: #C9B8E8;
}

.text-sm {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #F2C4CE;
}

/* Stagger constellation items with varying delays */
.ci-1 { transition-delay: 0s; }
.ci-2 { transition-delay: 0.08s; }
.ci-3 { transition-delay: 0.16s; }
.ci-4 { transition-delay: 0.24s; }
.ci-5 { transition-delay: 0.32s; }
.ci-6 { transition-delay: 0.4s; }
.ci-7 { transition-delay: 0.48s; }
.ci-8 { transition-delay: 0.56s; }
.ci-9 { transition-delay: 0.64s; }
.ci-10 { transition-delay: 0.72s; }
.ci-11 { transition-delay: 0.8s; }
.ci-12 { transition-delay: 0.88s; }
.ci-13 { transition-delay: 0.96s; }
.ci-14 { transition-delay: 1.04s; }
.ci-15 { transition-delay: 1.12s; }
.ci-16 { transition-delay: 1.2s; }
.ci-17 { transition-delay: 1.28s; }
.ci-18 { transition-delay: 1.36s; }

/* === Panel 4: Closing === */
.panel-4 {
    background: linear-gradient(to bottom, #2D2240 0%, #000000 100%);
    min-height: 90vh;
}

.closing-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #FFF5E6;
    letter-spacing: -0.03em;
    text-align: center;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1.5s ease-out, transform 1.5s ease-out;
}

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

.pulse-cursor {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #F4A460;
    margin: 2rem auto 0;
    animation: pulseCursor 2s ease-in-out infinite;
    opacity: 0;
    transition: opacity 1s ease-out 0.5s;
}

.pulse-cursor.visible {
    opacity: 1;
}

@keyframes pulseCursor {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(244, 164, 96, 0.6);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 20px 8px rgba(244, 164, 96, 0.2);
    }
}

/* === Accent Strips === */
.accent-strip {
    width: 100%;
    max-width: 720px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    margin-left: -40px;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .accent-strip {
        margin-left: 0;
        padding: 0 20px;
    }
}

.accent-text {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: #A8E6CF;
    opacity: 0.6;
}

/* === Noise Dividers === */
.noise-divider {
    width: 100%;
    height: 2px;
    background-image: repeating-linear-gradient(
        to right,
        #C9B8E8 0px,
        #C9B8E8 2px,
        transparent 2px,
        transparent 5px,
        #F2C4CE 5px,
        #F2C4CE 7px,
        transparent 7px,
        transparent 11px,
        #A8E6CF 11px,
        #A8E6CF 13px,
        transparent 13px,
        transparent 18px,
        #FFF5E6 18px,
        #FFF5E6 19px,
        transparent 19px,
        transparent 24px,
        #F4A460 24px,
        #F4A460 25px,
        transparent 25px,
        transparent 30px
    );
    opacity: 0.4;
    position: relative;
    z-index: 2;
}

/* === Glow Halos === */
.glow-halo {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(40px);
}

.halo-hero-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #F2C4CE 0%, transparent 70%);
    opacity: 0.3;
    top: 20%;
    left: 15%;
}

.halo-hero-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #C9B8E8 0%, transparent 70%);
    opacity: 0.2;
    bottom: 10%;
    right: 10%;
}

.halo-concept-1 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #F2C4CE 0%, transparent 70%);
    opacity: 0.3;
    top: 30%;
    right: 5%;
}

.halo-concept-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, #C9B8E8 0%, transparent 70%);
    opacity: 0.25;
    bottom: 25%;
    left: 10%;
}

/* === Selection Color === */
::selection {
    background-color: #C9B8E8;
    color: #1A1625;
}
