/* ==========================================================================
   DDAZZL.com — Styles
   Surreal aurora-lit chamber experience
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    background-color: #1a1a2e;
    color: #f0ece2;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Palette Variables ---------- */
:root {
    --deep-twilight: #1a1a2e;
    --soft-indigo: #2d2b55;
    --aurora-rose: #f2b5d4;
    --mint-veil: #b8e0d2;
    --lavender-haze: #d5c4f7;
    --peach-glow: #f7d1ba;
    --pale-cream: #f0ece2;
    --muted-lilac: #a8a0c8;
    --aurora-green: #a8edea;
    --aurora-violet: #d4a5f5;
}

/* ---------- Aurora Background System ---------- */
#aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    opacity: 0.15;
}

.aurora-layer-1 {
    background: radial-gradient(ellipse at 30% 40%, #a8edea 0%, transparent 60%);
    animation: auroraShift1 20s ease-in-out infinite alternate;
}

.aurora-layer-2 {
    background: radial-gradient(ellipse at 70% 60%, #f2b5d4 0%, transparent 55%);
    animation: auroraShift2 35s ease-in-out infinite alternate;
}

.aurora-layer-3 {
    background: radial-gradient(ellipse at 50% 30%, #d4a5f5 0%, transparent 50%);
    animation: auroraShift3 50s ease-in-out infinite alternate;
}

@keyframes auroraShift1 {
    0%   { transform: translate(0%, 0%) rotate(0deg); }
    33%  { transform: translate(10%, -5%) rotate(3deg); }
    66%  { transform: translate(-5%, 10%) rotate(-2deg); }
    100% { transform: translate(5%, 5%) rotate(1deg); }
}

@keyframes auroraShift2 {
    0%   { transform: translate(0%, 0%) rotate(0deg); }
    25%  { transform: translate(-8%, 6%) rotate(-2deg); }
    50%  { transform: translate(6%, -8%) rotate(3deg); }
    75%  { transform: translate(-3%, -3%) rotate(-1deg); }
    100% { transform: translate(4%, 7%) rotate(2deg); }
}

@keyframes auroraShift3 {
    0%   { transform: translate(0%, 0%) rotate(0deg); }
    20%  { transform: translate(7%, 3%) rotate(1deg); }
    40%  { transform: translate(-4%, -6%) rotate(-3deg); }
    60%  { transform: translate(-7%, 4%) rotate(2deg); }
    80%  { transform: translate(3%, -3%) rotate(-1deg); }
    100% { transform: translate(-2%, 5%) rotate(0deg); }
}

/* ---------- Noise Overlay ---------- */
#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ---------- Vertical Orientation Line ---------- */
#orientation-line {
    position: fixed;
    left: 32px;
    top: 0;
    width: 1px;
    height: 100vh;
    z-index: 10;
    background: linear-gradient(180deg, #a8edea, #f2b5d4, #d4a5f5, #a8edea);
    background-size: 1px 300%;
    animation: lineShimmer 8s linear infinite;
    opacity: 0.5;
}

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

/* ---------- Floating Companion Circle ---------- */
#companion-circle {
    position: fixed;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--aurora-green);
    opacity: 0.3;
    z-index: 10;
    pointer-events: none;
    animation: companionDrift 120s linear infinite;
}

@keyframes companionDrift {
    0%   { top: 10%;  left: 85%; }
    15%  { top: 30%;  left: 70%; }
    30%  { top: 55%;  left: 90%; }
    45%  { top: 75%;  left: 60%; }
    60%  { top: 40%;  left: 80%; }
    75%  { top: 20%;  left: 75%; }
    90%  { top: 60%;  left: 88%; }
    100% { top: 10%;  left: 85%; }
}

/* ---------- Navigation Trigger ---------- */
#nav-trigger {
    position: fixed;
    top: 28px;
    right: 32px;
    width: 48px;
    height: 40px;
    z-index: 100;
    cursor: pointer;
}

.nav-circle {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--pale-cream);
    opacity: 0.4;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav-circle-1 {
    top: 0;
    left: 0;
    background: rgba(168, 237, 234, 0.08);
}

.nav-circle-2 {
    top: 6px;
    left: 14px;
    background: rgba(242, 181, 212, 0.08);
}

.nav-circle-3 {
    top: 14px;
    left: 6px;
    background: rgba(213, 196, 247, 0.08);
}

#nav-trigger:hover .nav-circle {
    opacity: 0.8;
}

#nav-trigger:hover .nav-circle-1 { transform: translate(-2px, -2px); }
#nav-trigger:hover .nav-circle-2 { transform: translate(2px, -1px); }
#nav-trigger:hover .nav-circle-3 { transform: translate(-1px, 2px); }

/* ---------- Navigation Overlay ---------- */
#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 90;
    background: rgba(26, 26, 46, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

#nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.nav-overlay-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.nav-link {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--pale-cream);
    text-decoration: none;
    letter-spacing: -0.03em;
    opacity: 0.6;
    transition: opacity 0.4s ease, text-shadow 0.4s ease;
}

.nav-link:hover {
    opacity: 1;
    text-shadow:
        1px 1px 0 var(--aurora-rose),
        -1px -1px 0 var(--aurora-green),
        2px 0 0 var(--lavender-haze);
}

/* ---------- Chambers (Global) ---------- */
.chamber {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.chamber::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.85);
    z-index: -1;
}

.chamber-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    padding: 4rem 15%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Slide-Reveal Animation */
.chamber-reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.chamber-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Diamond Section Markers */
.chamber-diamond {
    position: absolute;
    bottom: 24px;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--aurora-rose);
    transform: translateX(-50%) rotate(45deg);
}

/* Dashed horizontal rules */
.chamber + .chamber::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        var(--muted-lilac) 0px,
        var(--muted-lilac) 8px,
        transparent 8px,
        transparent 24px
    );
    opacity: 0.3;
}

/* ---------- Chamber 1: Threshold ---------- */
.chamber-threshold .chamber-content {
    align-items: center;
    text-align: center;
}

.site-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--pale-cream);
    position: relative;
    animation: chromaticShift 15s ease-in-out infinite;
}

@keyframes chromaticShift {
    0% {
        text-shadow:
            1px 1px 0 var(--aurora-rose),
            -1px -1px 0 var(--mint-veil),
            2px 0 0 var(--lavender-haze);
    }
    33% {
        text-shadow:
            -1px 2px 0 var(--aurora-rose),
            2px -1px 0 var(--mint-veil),
            0 -2px 0 var(--lavender-haze);
    }
    66% {
        text-shadow:
            2px -1px 0 var(--aurora-rose),
            -2px 1px 0 var(--mint-veil),
            -1px 2px 0 var(--lavender-haze);
    }
    100% {
        text-shadow:
            1px 1px 0 var(--aurora-rose),
            -1px -1px 0 var(--mint-veil),
            2px 0 0 var(--lavender-haze);
    }
}

.threshold-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-lilac);
    margin-top: 1.5rem;
}

.geo-threshold {
    width: clamp(200px, 30vw, 400px);
    height: auto;
    margin-top: 3rem;
    opacity: 0.5;
}

/* ---------- Chamber 2: Manifesto ---------- */
.chamber-manifesto .chamber-content {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 4rem;
    padding-left: 12%;
    padding-right: 8%;
}

.chamber-manifesto .reveal-heading {
    width: 100%;
}

.chamber-heading {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--pale-cream);
}

.manifesto-text {
    max-width: 520px;
    flex: 1 1 320px;
}

.manifesto-text p {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    font-weight: 400;
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--pale-cream);
}

.geo-manifesto {
    width: clamp(180px, 20vw, 300px);
    height: auto;
    flex: 0 0 auto;
}

.chamber-manifesto .reveal-body {
    flex: 1 1 320px;
}

.chamber-manifesto .reveal-geo {
    flex: 0 1 auto;
    display: flex;
    justify-content: flex-end;
}

/* ---------- Chamber 3: Gallery ---------- */
.chamber-gallery .chamber-content {
    align-items: center;
    text-align: center;
}

.gallery-caption {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted-lilac);
    margin-top: 1rem;
}

.gallery-panels {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 400px;
    margin-top: 3rem;
}

.gallery-panel {
    position: absolute;
    width: 280px;
    height: 280px;
    background: rgba(45, 43, 85, 0.5);
    border: 1px solid rgba(168, 160, 200, 0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.6s ease;
}

.gallery-panel svg {
    width: 80%;
    height: 80%;
}

.gallery-panel-1 {
    transform: translate(-120px, -20px) rotate(-2deg);
    z-index: 1;
}

.gallery-panel-2 {
    transform: translate(0px, 0px) rotate(0.5deg);
    z-index: 2;
}

.gallery-panel-3 {
    transform: translate(120px, 20px) rotate(2deg);
    z-index: 3;
}

/* Panel reveal states */
.gallery-panel-1.panel-visible {
    opacity: 1;
}

.gallery-panel-2.panel-visible {
    opacity: 1;
}

.gallery-panel-3.panel-visible {
    opacity: 1;
}

/* ---------- Chamber 4: Signal ---------- */
.chamber-signal .chamber-content {
    align-items: center;
    text-align: center;
}

.chamber-signal::before {
    background: rgba(26, 26, 46, 0.75);
}

.signal-text {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    font-weight: 400;
    color: var(--muted-lilac);
    margin-top: 1rem;
    line-height: 1.75;
}

.signal-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.signal-input {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    background: transparent;
    border: 1px solid rgba(168, 160, 200, 0.3);
    border-radius: 4px;
    padding: 0.85rem 1.5rem;
    color: var(--pale-cream);
    width: 300px;
    max-width: 80vw;
    outline: none;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.signal-input::placeholder {
    color: var(--muted-lilac);
    opacity: 0.5;
}

.signal-input:focus {
    border-color: var(--peach-glow);
    box-shadow: 0 0 20px rgba(247, 209, 186, 0.15);
}

.signal-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: transparent;
    border: 1px solid var(--aurora-rose);
    border-radius: 4px;
    padding: 0.85rem 2rem;
    color: var(--aurora-rose);
    cursor: pointer;
    transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}

.signal-btn:hover {
    background: rgba(242, 181, 212, 0.1);
    box-shadow: 0 0 16px rgba(242, 181, 212, 0.15);
}

.geo-signal {
    width: clamp(200px, 40vw, 400px);
    height: auto;
    margin-top: 3rem;
    opacity: 0.4;
}

/* ---------- SVG Geometry - Path Draw Animation ---------- */
.geo-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-out;
}

.geo-draw.drawn {
    stroke-dashoffset: 0;
}

/* Aurora shimmer on geo shapes */
.geo-composition {
    filter: drop-shadow(0 0 1px rgba(168, 237, 234, 0.15));
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .chamber-content {
        padding: 3rem 8%;
    }

    .chamber-manifesto .chamber-content {
        flex-direction: column;
        padding-left: 8%;
        padding-right: 8%;
    }

    .gallery-panels {
        flex-direction: column;
        height: auto;
        gap: 2rem;
        position: relative;
    }

    .gallery-panel {
        position: relative;
        width: 220px;
        height: 220px;
        transform: none;
    }

    .gallery-panel-1,
    .gallery-panel-2,
    .gallery-panel-3 {
        transform: none;
    }

    #orientation-line {
        left: 16px;
    }

    #nav-trigger {
        right: 16px;
    }

    .signal-input {
        width: 100%;
    }

    .signal-form {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .signal-btn {
        width: 100%;
    }
}

/* ---------- Progressive Color Revelation ---------- */
/* Chamber 1: Near-monochrome */
.chamber-threshold {
    /* Only Deep Twilight and Pale Cream */
}

/* Chamber 2: Introduces Aurora Rose */
.chamber-manifesto .chamber-heading {
    text-shadow: 1px 1px 0 rgba(242, 181, 212, 0.3);
}

/* Chamber 3: All aurora colors */
.chamber-gallery .chamber-heading {
    text-shadow:
        1px 1px 0 rgba(242, 181, 212, 0.3),
        -1px -1px 0 rgba(168, 237, 234, 0.2),
        2px 0 0 rgba(213, 196, 247, 0.2);
}

/* Chamber 4: Most luminous */
.chamber-signal .chamber-heading {
    text-shadow:
        1px 1px 0 rgba(242, 181, 212, 0.5),
        -1px -1px 0 rgba(168, 237, 234, 0.4),
        2px 0 0 rgba(213, 196, 247, 0.4);
}

/* Aurora intensifies between chambers */
.chamber.aurora-intense ~ #aurora-bg .aurora-layer {
    opacity: 0.4;
    transition: opacity 1.2s ease;
}
