/* ============================================================
   lower.quest -- ocean deep calming, cinematic descent
   Palette:
     Surface  #4db8a8   Mid     #1a4a6a
     Deep     #0a1628   Abyss   #050810
     Bio      #00f5d4   Bio Alt #7df9ff
     Text     #c8d8e8   Dim     #2a3a4a
   ============================================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: linear-gradient(
        180deg,
        #4db8a8 0%,
        #1a4a6a 20%,
        #0a1628 55%,
        #050810 100%
    );
    background-attachment: fixed;
    color: #c8d8e8;
    font-family: "Crimson Text", Georgia, "Times New Roman", serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    overflow-x: hidden;
    position: relative;
}

/* Subtle vignette to deepen the immersion */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(5, 8, 16, 0.45) 100%
    );
    z-index: 1;
}

/* ============================================================
   Typography
   ============================================================ */
.domain-name,
.panel-title,
.footer-mark,
h1, h2 {
    font-family: "Tenor Sans", "Trajan Pro", "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.depth-marker,
.zone-tag,
.kicker,
.readout-label,
.readout-value,
.readout-unit,
.pressure-label,
.pressure-value,
.cue-text,
.fact-key,
.fact-val,
.lumen-glow,
.bio-text,
.footer-meta {
    font-family: "Inconsolata", "Courier New", monospace;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* ============================================================
   Depth ruler -- fixed left-edge sticky line + ticks
   ============================================================ */
.depth-ruler {
    position: fixed;
    top: 0;
    left: 0;
    width: 56px;
    height: 100vh;
    pointer-events: none;
    z-index: 5;
}

.ruler-line {
    position: absolute;
    top: 0;
    left: 28px;
    width: 1px;
    height: 100%;
    background: rgba(200, 216, 232, 0.15);
}

.ruler-ticks {
    position: absolute;
    top: 0;
    left: 22px;
    width: 14px;
    height: 100%;
}

.ruler-ticks .tick {
    position: absolute;
    left: 0;
    width: 8px;
    height: 1px;
    background: rgba(200, 216, 232, 0.18);
}

.ruler-ticks .tick.major {
    width: 14px;
    background: rgba(0, 245, 212, 0.35);
}

.depth-readout {
    position: absolute;
    bottom: 1.5rem;
    left: 4px;
    width: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    color: rgba(0, 245, 212, 0.75);
    text-shadow: 0 0 8px rgba(0, 245, 212, 0.5);
    font-size: 0.62rem;
}

.readout-label {
    font-size: 0.55rem;
    color: rgba(200, 216, 232, 0.4);
    letter-spacing: 0.18em;
}

.readout-value {
    font-size: 0.95rem;
    color: #00f5d4;
    letter-spacing: 0.1em;
}

.readout-unit {
    font-size: 0.55rem;
    color: rgba(0, 245, 212, 0.6);
}

/* ============================================================
   Pressure meter -- top right
   ============================================================ */
.pressure-meter {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    font-family: "Inconsolata", monospace;
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(200, 216, 232, 0.55);
    pointer-events: none;
}

.pressure-bar {
    width: 120px;
    height: 2px;
    background: rgba(200, 216, 232, 0.15);
    border-radius: 1px;
    overflow: hidden;
}

.pressure-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        rgba(125, 249, 255, 0.7),
        #00f5d4
    );
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
    transition: width 0.18s ease-out;
}

.pressure-value {
    color: rgba(0, 245, 212, 0.8);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.35);
}

/* ============================================================
   Bubbles -- rising particle layer
   ============================================================ */
.bubbles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 6px rgba(125, 249, 255, 0.18);
    animation-name: rise;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    will-change: transform, opacity;
}

@keyframes rise {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.22;
    }
    50% {
        transform: translateY(-55vh) translateX(8px);
        opacity: 0.18;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translateY(-110vh) translateX(-6px);
        opacity: 0;
    }
}

/* ============================================================
   Layout / sections
   ============================================================ */
.descent {
    position: relative;
    z-index: 3;
    padding-left: 56px; /* clearance for ruler */
}

.section {
    position: relative;
    min-height: 100vh;
    padding: 6rem 1.5rem 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section + .section {
    border-top: 1px solid rgba(0, 245, 212, 0.05);
}

.depth-marker {
    position: absolute;
    top: 2rem;
    left: 1.25rem;
    font-size: 0.7rem;
    color: rgba(0, 245, 212, 0.45);
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.25);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    letter-spacing: 0.2em;
}

/* ============================================================
   Hero / Surface
   ============================================================ */
.section-surface {
    background: linear-gradient(
        180deg,
        rgba(125, 249, 255, 0.06) 0%,
        rgba(77, 184, 168, 0.0) 60%,
        rgba(10, 22, 40, 0.0) 100%
    );
}

.hero {
    text-align: center;
    max-width: 760px;
    padding: 0 1rem;
}

.kicker {
    font-size: 0.72rem;
    color: rgba(0, 245, 212, 0.65);
    margin-bottom: 1.75rem;
    text-shadow: 0 0 8px rgba(0, 245, 212, 0.35);
}

.domain-name {
    font-size: clamp(2.5rem, 9vw, 6rem);
    line-height: 1;
    color: #ffffff;
    text-shadow:
        0 0 18px rgba(125, 249, 255, 0.45),
        0 0 36px rgba(0, 245, 212, 0.15);
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
}

.domain-name .dot {
    color: #00f5d4;
    text-shadow: 0 0 14px rgba(0, 245, 212, 0.85);
}

.hero-tagline {
    font-family: "Crimson Text", serif;
    font-style: italic;
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    color: rgba(200, 216, 232, 0.85);
    max-width: 30ch;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.scroll-cue {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    color: rgba(0, 245, 212, 0.55);
    font-size: 0.65rem;
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.3);
}

.cue-arrow {
    font-size: 1.3rem;
    color: #00f5d4;
    animation: cueFloat 2.4s ease-in-out infinite;
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.7);
}

@keyframes cueFloat {
    0%, 100% { transform: translateY(0); opacity: 0.7; }
    50%      { transform: translateY(8px); opacity: 1; }
}

/* ============================================================
   Panels
   ============================================================ */
.panel {
    background: rgba(10, 22, 40, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 245, 212, 0.1);
    border-radius: 8px;
    padding: 2.5rem 2.25rem;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 245, 212, 0.04);
    transition: box-shadow 0.6s ease, border-color 0.6s ease;
}

.panel-glow {
    border: 1px solid rgba(0, 245, 212, 0.18);
    box-shadow:
        0 0 20px rgba(0, 245, 212, 0.1),
        inset 0 0 30px rgba(0, 245, 212, 0.03);
}

.panel-deep {
    background: rgba(5, 8, 16, 0.7);
    border: 1px solid rgba(0, 245, 212, 0.28);
    box-shadow:
        0 0 32px rgba(0, 245, 212, 0.18),
        0 0 60px rgba(125, 249, 255, 0.08),
        inset 0 0 48px rgba(0, 245, 212, 0.05);
}

.panel-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 245, 212, 0.12);
    padding-bottom: 1.25rem;
}

.zone-tag {
    display: block;
    font-size: 0.65rem;
    color: rgba(0, 245, 212, 0.6);
    margin-bottom: 0.7rem;
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.3);
}

.panel-title {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    color: #c8d8e8;
    line-height: 1.2;
    text-shadow: 0 0 8px rgba(125, 249, 255, 0.25);
}

.panel p {
    margin-bottom: 1.1rem;
    color: rgba(200, 216, 232, 0.92);
}

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

.panel-glow .panel-title {
    text-shadow: 0 0 12px rgba(0, 245, 212, 0.5);
}

.panel-deep .panel-title {
    color: #ffffff;
    text-shadow: 0 0 14px rgba(0, 245, 212, 0.75);
}

/* ============================================================
   Depth facts (key/val rows)
   ============================================================ */
.depth-facts {
    list-style: none;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 245, 212, 0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.depth-facts li {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.7rem;
}

.fact-key {
    color: rgba(200, 216, 232, 0.45);
    font-size: 0.6rem;
}

.fact-val {
    color: rgba(0, 245, 212, 0.85);
    font-size: 0.85rem;
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.3);
}

/* ============================================================
   Pull quote
   ============================================================ */
.pull-quote {
    margin: 1.75rem 0 0;
    padding: 1.25rem 0 0;
    border-top: 1px solid rgba(0, 245, 212, 0.1);
    font-style: italic;
    font-size: 1.08rem;
    line-height: 1.65;
    color: rgba(200, 216, 232, 0.85);
    position: relative;
}

.quote-mark {
    color: #00f5d4;
    font-size: 1.8rem;
    line-height: 0;
    vertical-align: -0.4em;
    margin-right: 0.15em;
    text-shadow: 0 0 10px rgba(0, 245, 212, 0.5);
}

.quote-mark.closing {
    margin-left: 0.15em;
    margin-right: 0;
}

/* ============================================================
   Lumen row -- bioluminescent creatures
   ============================================================ */
.lumen-row {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 245, 212, 0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.lumen-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.85rem 0.75rem;
    border: 1px solid rgba(0, 245, 212, 0.12);
    border-radius: 6px;
    background: rgba(0, 245, 212, 0.03);
}

.lumen-name {
    font-family: "Tenor Sans", serif;
    font-size: 0.95rem;
    color: #c8d8e8;
}

.lumen-glow {
    font-size: 0.6rem;
    color: rgba(0, 245, 212, 0.7);
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.4);
}

/* ============================================================
   Treasure line in deepest panel
   ============================================================ */
.treasure-line {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 245, 212, 0.18);
    text-align: center;
    font-style: italic;
    color: #c8d8e8;
    font-size: 1.1rem;
}

.bio-flare {
    display: inline-block;
    color: #00f5d4;
    font-size: 1.6rem;
    line-height: 1;
    vertical-align: middle;
    text-shadow:
        0 0 10px rgba(0, 245, 212, 0.9),
        0 0 24px rgba(0, 245, 212, 0.5);
    animation: bioPulse 3s ease-in-out infinite;
}

@keyframes bioPulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.18); }
}

/* ============================================================
   Footer / abyss
   ============================================================ */
.abyss-footer {
    position: relative;
    min-height: 60vh;
    padding: 6rem 1.5rem 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        ellipse at center top,
        rgba(0, 245, 212, 0.06) 0%,
        rgba(5, 8, 16, 0) 60%
    );
    border-top: 1px solid rgba(0, 245, 212, 0.1);
}

.footer-inner {
    text-align: center;
    max-width: 540px;
}

.footer-mark {
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    color: #ffffff;
    text-shadow:
        0 0 16px rgba(0, 245, 212, 0.6),
        0 0 32px rgba(125, 249, 255, 0.25);
    margin-bottom: 1rem;
}

.footer-mark .dot {
    color: #00f5d4;
}

.footer-tagline {
    font-style: italic;
    color: rgba(200, 216, 232, 0.7);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.footer-meta {
    font-size: 0.6rem;
    color: rgba(200, 216, 232, 0.4);
}

.bio-text {
    color: rgba(0, 245, 212, 0.7);
    text-shadow: 0 0 6px rgba(0, 245, 212, 0.3);
}

/* ============================================================
   Section-specific glow intensification with depth
   ============================================================ */
.section-twilight .panel { /* default */ }

.section-pressure .panel {
    box-shadow: 0 0 16px rgba(0, 245, 212, 0.06);
}

.section-bathyal .panel,
.section-approach .panel {
    /* uses .panel-glow */
}

.section-abyss .panel {
    /* uses .panel-deep */
}

/* Active depth-marker emphasis */
.section.is-active .depth-marker {
    color: #00f5d4;
    text-shadow:
        0 0 10px rgba(0, 245, 212, 0.8),
        0 0 24px rgba(0, 245, 212, 0.35);
}

.section.is-active .panel {
    border-color: rgba(0, 245, 212, 0.28);
}

.section.is-active.section-bathyal .panel,
.section.is-active.section-approach .panel {
    box-shadow:
        0 0 28px rgba(0, 245, 212, 0.18),
        inset 0 0 30px rgba(0, 245, 212, 0.04);
}

.section.is-active.section-abyss .panel {
    box-shadow:
        0 0 40px rgba(0, 245, 212, 0.28),
        0 0 80px rgba(125, 249, 255, 0.12),
        inset 0 0 48px rgba(0, 245, 212, 0.06);
}

/* ============================================================
   Reveal-on-scroll for panels
   ============================================================ */
.panel {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity 0.9s ease-out,
        transform 0.9s ease-out,
        box-shadow 0.6s ease;
}

.section.is-revealed .panel {
    opacity: 1;
    transform: translateY(0);
}

/* Hero never hidden */
.section-surface .hero {
    opacity: 1;
    transform: none;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
    .descent { padding-left: 44px; }
    .depth-ruler { width: 44px; }
    .ruler-line { left: 22px; }
    .ruler-ticks { left: 16px; }
    .depth-readout { width: 44px; }
    .pressure-meter {
        right: 1rem;
        top: 1rem;
    }
    .pressure-bar { width: 90px; }
    .panel { padding: 2rem 1.5rem; }
    .depth-facts { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .lumen-row { grid-template-columns: 1fr; }
    .section { padding: 5rem 1rem 5rem; }
    .depth-marker { left: 0.6rem; top: 1.25rem; font-size: 0.6rem; }
}

@media (max-width: 420px) {
    .depth-facts { grid-template-columns: 1fr 1fr; }
    .domain-name { font-size: clamp(2.2rem, 12vw, 3.5rem); }
}
