/* ============================================================
   lowball.dev - Séance for Dead Code
   Color Palette:
     Void:            #0B0B0F
     Deep Field:      #14141C
     Tarnished Gold:  #C9A84C
     Pale Honey:      #E8D59E
     Bone:            #D4C9B8
     Warm Grey:       #A8A098
     Dark Taupe:      #6B6358
     Spectral Blush:  #B8937A
     Absinthe Trace:  #7A8B5E
   Fonts:
     Playfair Display, Source Serif 4, DM Mono
   ============================================================ */

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

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

body {
    background-color: #0B0B0F;
    color: #A8A098;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: 18px;
    line-height: 1.72;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    position: relative;
    --scroll-depth: 0;
}

/* Noise Veil Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 10000;
    opacity: 0.5;
}

/* Hidden SVG Filters */
.svg-filters {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Waypoint Navigation --- */
.waypoints {
    position: fixed;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.waypoint {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
}

.waypoint-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #C9A84C;
    opacity: 0.4;
    transition: opacity 600ms ease-out, box-shadow 600ms ease-out, transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 0px rgba(201, 168, 76, 0);
}

.waypoint:hover .waypoint-dot,
.waypoint.active .waypoint-dot {
    opacity: 1;
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.15);
}

.waypoint-label {
    position: absolute;
    right: 24px;
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B6358;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 400ms ease-out, transform 400ms ease-out;
    white-space: nowrap;
    pointer-events: none;
}

.waypoint:hover .waypoint-label {
    opacity: 1;
    transform: translateX(0);
}

/* --- Floating Golden Motes --- */
.motes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: hidden;
}

.mote {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, #C9A84C 0%, rgba(201, 168, 76, 0) 70%);
    box-shadow: 0 0 20px rgba(201, 168, 76, 0.15);
    animation: mote-drift linear infinite;
    will-change: transform, opacity;
}

@keyframes mote-drift {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(var(--mote-drift-x, 30px));
        opacity: 0;
    }
}

/* --- Section: The Threshold --- */
.threshold {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #0B0B0F;
}

.threshold-wordmark {
    position: relative;
    z-index: 10;
    margin-left: 10%;
    cursor: pointer;
    transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wordmark-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(56px, 8vw, 120px);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #C9A84C;
    position: relative;
    z-index: 2;
}

.wordmark-dot {
    color: #E8D59E;
}

.wordmark-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.08) 0%, transparent 70%);
    animation: wordmark-pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes wordmark-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Threshold Watercolor Bloom */
.threshold-bloom {
    position: absolute;
    right: -5%;
    top: 10%;
    width: 65%;
    height: 80%;
    z-index: 1;
    pointer-events: none;
}

.bloom-layer {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    will-change: opacity, transform;
}

.threshold-bloom .bloom-layer-1 {
    width: 500px;
    height: 500px;
    top: 10%;
    left: 15%;
    background: radial-gradient(ellipse at 40% 50%, rgba(201, 168, 76, 0.10) 0%, rgba(201, 168, 76, 0.03) 50%, transparent 70%);
    animation: bloom-breathe-1 20s ease-in-out infinite;
}

.threshold-bloom .bloom-layer-2 {
    width: 450px;
    height: 450px;
    top: 20%;
    left: 25%;
    background: radial-gradient(ellipse at 60% 40%, rgba(184, 147, 122, 0.08) 0%, rgba(184, 147, 122, 0.02) 50%, transparent 70%);
    animation: bloom-breathe-2 18s ease-in-out infinite;
}

.threshold-bloom .bloom-layer-3 {
    width: 550px;
    height: 550px;
    top: 5%;
    left: 10%;
    background: radial-gradient(ellipse at 50% 60%, rgba(232, 213, 158, 0.06) 0%, rgba(232, 213, 158, 0.02) 50%, transparent 70%);
    animation: bloom-breathe-3 22s ease-in-out infinite;
}

.threshold-bloom .bloom-layer-4 {
    width: 350px;
    height: 350px;
    top: 30%;
    left: 30%;
    background: radial-gradient(ellipse at 45% 55%, rgba(201, 168, 76, 0.12) 0%, transparent 60%);
    animation: bloom-breathe-4 25s ease-in-out infinite;
}

.threshold-bloom .bloom-layer-5 {
    width: 400px;
    height: 400px;
    top: 15%;
    left: 20%;
    background: radial-gradient(ellipse at 55% 45%, rgba(122, 139, 94, 0.05) 0%, transparent 60%);
    animation: bloom-breathe-1 15s ease-in-out infinite;
}

@keyframes bloom-breathe-1 {
    0%, 100% { opacity: 0.6; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.05) rotate(2deg); }
}

@keyframes bloom-breathe-2 {
    0%, 100% { opacity: 0.7; transform: scale(1) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.08) rotate(-1.5deg); }
}

@keyframes bloom-breathe-3 {
    0%, 100% { opacity: 0.6; transform: scale(1.02) rotate(1deg); }
    50% { opacity: 0.9; transform: scale(0.98) rotate(-1deg); }
}

@keyframes bloom-breathe-4 {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* Threshold Tagline */
.threshold-tagline {
    position: absolute;
    bottom: 12%;
    left: 10%;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: 19px;
    font-style: italic;
    color: #D4C9B8;
    letter-spacing: 0.005em;
    z-index: 10;
}

/* --- Ink Wash Divider --- */
.ink-wash-divider {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
    z-index: 2;
}

.ink-wash-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(122, 139, 94, 0.08) 30%,
        rgba(122, 139, 94, 0.15) 50%,
        rgba(122, 139, 94, 0.08) 70%,
        transparent 100%
    );
    filter: url(#ink-wash-filter);
}

/* --- Section: The Gallery --- */
.gallery {
    position: relative;
    padding: 100px 0;
    z-index: 2;
}

/* Diagonal Guide Lines */
.gallery-diagonal-guide {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(201, 168, 76, 0.08) 20%, rgba(201, 168, 76, 0.08) 80%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.guide-1 {
    left: 25%;
    transform: rotate(2deg);
}

.guide-2 {
    left: 50%;
    transform: rotate(-1deg);
}

.guide-3 {
    left: 75%;
    transform: rotate(1.5deg);
}

/* Gallery Cards */
.gallery-card {
    position: relative;
    max-width: 680px;
    padding: 60px;
    margin-bottom: 120px;
    background: rgba(20, 20, 28, 0.6);
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.06);
    z-index: 1;
    transition: box-shadow 600ms ease-out;
}

.gallery-card:hover {
    box-shadow: 0 0 60px rgba(201, 168, 76, 0.12);
}

.card-left {
    margin-left: 10%;
}

.card-right {
    margin-left: auto;
    margin-right: 10%;
}

/* Card Watercolor Blooms */
.card-bloom {
    position: absolute;
    width: 400px;
    height: 400px;
    pointer-events: none;
    z-index: 0;
}

.card-bloom-right {
    right: -180px;
    top: -60px;
}

.card-bloom-left {
    left: -180px;
    top: -60px;
}

.card-bloom .bloom-layer-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    background: radial-gradient(ellipse at center, rgba(201, 168, 76, 0.08) 0%, transparent 60%);
    animation: bloom-breathe-1 18s ease-in-out infinite;
}

.card-bloom .bloom-layer-2 {
    width: 250px;
    height: 250px;
    top: 25%;
    left: 25%;
    background: radial-gradient(ellipse at center, rgba(184, 147, 122, 0.06) 0%, transparent 60%);
    animation: bloom-breathe-2 22s ease-in-out infinite;
}

.card-bloom .bloom-layer-3 {
    width: 350px;
    height: 350px;
    top: 5%;
    left: 5%;
    background: radial-gradient(ellipse at center, rgba(232, 213, 158, 0.05) 0%, transparent 60%);
    animation: bloom-breathe-3 15s ease-in-out infinite;
}

.card-bloom .bloom-layer-4 {
    width: 200px;
    height: 200px;
    top: 30%;
    left: 30%;
    background: radial-gradient(ellipse at center, rgba(122, 139, 94, 0.04) 0%, transparent 60%);
    animation: bloom-breathe-4 25s ease-in-out infinite;
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 1;
}

.card-meta {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B6358;
    display: block;
    margin-bottom: 20px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(36px, 4vw, 56px);
    letter-spacing: -0.02em;
    line-height: 1.05;
    color: #C9A84C;
    margin-bottom: 24px;
}

.card-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: 17px;
    line-height: 1.72;
    letter-spacing: 0.005em;
    color: #A8A098;
}

/* --- Section: The Vault --- */
.vault {
    position: relative;
    padding: 140px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    z-index: 2;
}

.vault-manifesto {
    max-width: 700px;
    padding: 0 40px;
    text-align: center;
}

.manifesto-text {
    font-family: 'Playfair Display', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.5;
    letter-spacing: -0.01em;
    color: #D4C9B8;
    border: none;
    padding: 0;
    margin: 0;
}

.manifesto-text p {
    margin-bottom: 32px;
}

.manifesto-text p:last-child {
    margin-bottom: 0;
}

/* Floating Golden Orbs */
.vault-orbs {
    position: relative;
    width: 500px;
    height: 400px;
    margin-top: 100px;
}

.golden-orb {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        rgba(232, 213, 158, 0.4) 0%,
        rgba(201, 168, 76, 0.3) 30%,
        rgba(201, 168, 76, 0.15) 60%,
        rgba(201, 168, 76, 0.05) 80%,
        transparent 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 600ms ease-out;
    box-shadow: 0 0 0px rgba(201, 168, 76, 0);
}

.golden-orb:hover {
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.15);
}

#orb1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: orb-float-1 8s ease-in-out infinite;
}

#orb2 {
    bottom: 40px;
    left: 10%;
    animation: orb-float-2 9s ease-in-out infinite;
}

#orb3 {
    bottom: 40px;
    right: 10%;
    animation: orb-float-3 7s ease-in-out infinite;
}

.orb-word {
    font-family: 'DM Mono', monospace;
    font-weight: 400;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C9A84C;
    opacity: 0.8;
}

@keyframes orb-float-1 {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-15px); }
}

@keyframes orb-float-2 {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-10px) translateX(5px); }
    66% { transform: translateY(5px) translateX(-8px); }
}

@keyframes orb-float-3 {
    0%, 100% { transform: translateY(0) translateX(0); }
    40% { transform: translateY(-12px) translateX(-6px); }
    70% { transform: translateY(4px) translateX(4px); }
}

/* Vault Fade to Black */
.vault-fade {
    position: relative;
    width: 100%;
    height: 200px;
    margin-top: 100px;
    background: linear-gradient(to bottom, transparent, #0B0B0F);
    pointer-events: none;
}

/* --- Reveal Animation --- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Magnetic Element Feedback --- */
.magnetic {
    transition: transform 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .waypoints {
        right: 16px;
    }

    .threshold-wordmark {
        margin-left: 6%;
    }

    .threshold-tagline {
        left: 6%;
        right: 6%;
    }

    .gallery-card {
        max-width: 90%;
        padding: 40px;
        margin-left: 5% !important;
        margin-right: 5% !important;
    }

    .card-bloom {
        display: none;
    }

    .vault-orbs {
        width: 320px;
        height: 320px;
    }

    .golden-orb {
        width: 100px;
        height: 100px;
    }

    .threshold-bloom {
        width: 80%;
        right: -15%;
        opacity: 0.6;
    }
}

@media (max-width: 600px) {
    .wordmark-text {
        font-size: 42px;
    }

    .card-title {
        font-size: 28px;
    }

    .manifesto-text {
        font-size: 20px;
    }

    .vault-orbs {
        width: 260px;
        height: 280px;
    }

    .golden-orb {
        width: 80px;
        height: 80px;
    }

    .orb-word {
        font-size: 10px;
    }
}
