/* gabs.quest - Gilded Alpine Observatory */
:root {
    --navy: #0a1628;
    --frost: #c8d0de;
    --platinum: #e2e6ed;
    --brass: #b89a6a;
    --steel: #4a6d8c;
    --abyss: #060d1a;
    --silver: #8a9bb5;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--navy);
    color: var(--platinum);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    line-height: 1.72;
    overflow-x: hidden;
}

/* ============================
   DIAMOND NAVIGATION
   ============================ */
#diamond-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1000;
}

.diamond {
    display: block;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    border: 1px solid var(--silver);
    background: transparent;
    transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
    text-decoration: none;
    cursor: pointer;
}

.diamond:hover {
    transform: rotate(45deg) scale(1.15);
}

.diamond.active {
    background-color: var(--brass);
    border-color: var(--brass);
    box-shadow: 0 0 8px rgba(184, 154, 106, 0.3);
}

/* ============================
   CHAPTERS - SHARED
   ============================ */
.chapter {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 8vh 6vw;
}

.chapter-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 72rem;
}

/* ============================
   BOKEH FIELDS
   ============================ */
.bokeh-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.bokeh-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

/* ============================
   CHAPTER 1: THE SUMMIT
   ============================ */
.chapter-summit {
    background-color: var(--navy);
    flex-direction: column;
}

.summit-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.main-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(4rem, 10vw, 8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--platinum);
    text-align: center;
    line-height: 1;
    position: relative;
    z-index: 2;
}

.subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;
    color: var(--silver);
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
}

/* ============================
   CHAPTER 2: THE RIDGE
   ============================ */
.chapter-ridge {
    background-color: var(--navy);
}

.ridge-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.ridge-text {
    flex: 0 0 38%;
    padding-right: 4rem;
    position: relative;
    z-index: 3;
}

.ridge-text .bokeh-field {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    z-index: 0;
}

.ridge-text p {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    line-height: 1.72;
    max-width: 38ch;
    color: var(--platinum);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.ridge-text p:last-of-type {
    margin-bottom: 0;
}

.ridge-mountains {
    flex: 1;
    position: relative;
    height: 60vh;
    overflow: hidden;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 100%;
}

.mountain-back {
    clip-path: polygon(
        0% 85%, 5% 78%, 10% 72%, 15% 65%, 18% 58%,
        22% 52%, 25% 48%, 28% 45%, 32% 50%, 35% 55%,
        38% 48%, 42% 42%, 45% 38%, 48% 35%, 50% 30%,
        52% 33%, 55% 38%, 58% 42%, 62% 45%, 65% 50%,
        68% 55%, 70% 60%, 72% 55%, 75% 48%, 78% 42%,
        80% 38%, 82% 35%, 85% 40%, 88% 48%, 90% 55%,
        92% 60%, 95% 68%, 100% 75%, 100% 100%, 0% 100%
    );
    background-color: var(--abyss);
    animation: breatheUp 12s ease-in-out infinite alternate;
}

.mountain-mid {
    clip-path: polygon(
        0% 90%, 4% 85%, 8% 80%, 12% 75%, 16% 68%,
        20% 62%, 24% 58%, 28% 55%, 30% 52%, 33% 48%,
        36% 52%, 40% 58%, 44% 62%, 48% 55%, 50% 50%,
        52% 46%, 55% 50%, 58% 55%, 62% 60%, 66% 65%,
        68% 60%, 72% 55%, 76% 52%, 78% 48%, 80% 45%,
        83% 50%, 86% 55%, 88% 60%, 92% 68%, 95% 75%,
        100% 82%, 100% 100%, 0% 100%
    );
    background-color: var(--navy);
    animation: breatheDown 14s ease-in-out infinite alternate;
}

.mountain-front {
    clip-path: polygon(
        0% 92%, 6% 88%, 12% 82%, 16% 78%, 20% 72%,
        24% 68%, 28% 65%, 32% 60%, 35% 58%, 38% 62%,
        42% 68%, 46% 72%, 50% 65%, 54% 60%, 56% 56%,
        58% 58%, 62% 62%, 66% 68%, 70% 72%, 74% 68%,
        78% 62%, 80% 58%, 82% 55%, 85% 58%, 88% 65%,
        92% 72%, 96% 80%, 100% 88%, 100% 100%, 0% 100%
    );
    background-color: var(--steel);
    animation: breatheUp 10s ease-in-out infinite alternate;
}

@keyframes breatheUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-3px); }
}

@keyframes breatheDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(3px); }
}

/* ============================
   CHAPTER 3: THE OBSERVATORY
   ============================ */
.chapter-observatory {
    background-color: var(--navy);
}

.observatory-outer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--abyss);
    opacity: 0.5;
    z-index: 1;
}

.telescope-viewport {
    width: 50vmin;
    height: 50vmin;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    box-shadow:
        0 0 80px rgba(10, 22, 40, 0.9),
        0 0 160px rgba(6, 13, 26, 0.6),
        inset 0 0 40px rgba(6, 13, 26, 0.7);
    border: 1px solid rgba(138, 155, 181, 0.12);
}

.telescope-viewport .bokeh-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, var(--navy) 0%, var(--abyss) 100%);
    z-index: 1;
}

.orbital-labels {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 3;
}

.orbital-label {
    position: absolute;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--silver);
    white-space: nowrap;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    transform: translate(-50%, -50%);
}

.orbital-label:hover {
    opacity: 1;
    color: var(--platinum);
}

/* ============================
   CHAPTER 4: THE RECORD
   ============================ */
.chapter-record {
    background-color: var(--navy);
}

.record-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 60rem;
    margin: 0 auto;
}

.record-card {
    padding-top: 1.5rem;
}

.card-rule {
    width: 60%;
    height: 1px;
    background-color: var(--brass);
    opacity: 0.4;
    margin-bottom: 1.5rem;
}

.card-label {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--silver);
    margin-bottom: 0.75rem;
}

.card-number {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--brass);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.card-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 300;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.72;
    color: var(--platinum);
    max-width: 38ch;
}

/* ============================
   CHAPTER 5: THE DESCENT
   ============================ */
.chapter-descent {
    background-color: var(--frost);
}

.chapter-descent .chapter-content {
    text-align: center;
}

.descent-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--navy);
    text-align: center;
    line-height: 1;
}

.contact-line {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--steel);
    text-align: center;
    margin-top: 2rem;
    cursor: text;
    user-select: all;
}

/* Descent bokeh uses navy particles on light background */
.chapter-descent .bokeh-particle {
    background: radial-gradient(circle, rgba(10, 22, 40, 0.12) 0%, rgba(10, 22, 40, 0) 70%) !important;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .chapter {
        padding: 6vh 4vw;
    }

    .ridge-layout {
        flex-direction: column;
    }

    .ridge-text {
        flex: none;
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .ridge-mountains {
        width: 100%;
        height: 40vh;
    }

    .record-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    #diamond-nav {
        right: 1rem;
        gap: 1.2rem;
    }

    .orbital-label {
        font-size: 0.6rem;
    }

    .telescope-viewport {
        width: 65vmin;
        height: 65vmin;
    }
}