/* ============================================
   relativity.quest — Zen Coastal Observatory
   ============================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #283848;
    background-color: #F6F8FA;
    line-height: 1.9;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Aurora Shimmer Background --- */
.aurora-shimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(160deg, rgba(80,180,170,0.04), rgba(80,120,180,0.04));
    background-size: 200% 200%;
    animation: auroraShift 25s ease-in-out infinite alternate;
}

.aurora-shimmer-2 {
    background:
        linear-gradient(340deg, rgba(192,168,120,0.03), transparent 60%);
    background-size: 200% 200%;
    animation: auroraShift2 30s ease-in-out infinite alternate;
    animation-delay: -8s;
}

@keyframes auroraShift {
    0% {
        background-position: 0% 0%;
        opacity: 0.6;
    }
    33% {
        opacity: 1;
    }
    66% {
        background-position: 80% 60%;
        opacity: 0.8;
    }
    100% {
        background-position: 40% 100%;
        opacity: 0.7;
    }
}

@keyframes auroraShift2 {
    0% {
        background-position: 100% 100%;
        opacity: 0.5;
    }
    50% {
        background-position: 30% 50%;
        opacity: 0.9;
    }
    100% {
        background-position: 70% 0%;
        opacity: 0.6;
    }
}

/* --- HUD Frame --- */
.hud-frame {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
    min-height: 100vh;
    z-index: 1;
}

/* HUD Corner Crosshairs */
.hud-corner {
    position: fixed;
    width: 40px;
    height: 40px;
    z-index: 100;
    opacity: 0;
    animation: cornerFadeIn 2.5s ease-out 0.5s forwards;
}

@keyframes cornerFadeIn {
    to { opacity: 1; }
}

.hud-corner::before,
.hud-corner::after {
    content: '';
    position: absolute;
    background-color: rgba(80, 136, 144, 0.3);
    transition: background-color 0.6s ease;
}

.hud-corner-tl {
    top: 16px;
    left: 16px;
}
.hud-corner-tl::before {
    top: 0; left: 0;
    width: 20px; height: 1px;
}
.hud-corner-tl::after {
    top: 0; left: 0;
    width: 1px; height: 20px;
}

.hud-corner-tr {
    top: 16px;
    right: 16px;
}
.hud-corner-tr::before {
    top: 0; right: 0;
    width: 20px; height: 1px;
}
.hud-corner-tr::after {
    top: 0; right: 0;
    width: 1px; height: 20px;
}

.hud-corner-bl {
    bottom: 16px;
    left: 16px;
}
.hud-corner-bl::before {
    bottom: 0; left: 0;
    width: 20px; height: 1px;
}
.hud-corner-bl::after {
    bottom: 0; left: 0;
    width: 1px; height: 20px;
}

.hud-corner-br {
    bottom: 16px;
    right: 16px;
}
.hud-corner-br::before {
    bottom: 0; right: 0;
    width: 20px; height: 1px;
}
.hud-corner-br::after {
    bottom: 0; right: 0;
    width: 1px; height: 20px;
}

/* --- Status Strips --- */
.status-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 24px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: #508890;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0;
    animation: stripFadeIn 1.5s ease-out 1.5s forwards;
    padding: 0 4px;
}

@keyframes stripFadeIn {
    to { opacity: 0.7; }
}

.status-strip-top {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 700px;
    width: calc(100% - 48px);
    z-index: 100;
    border-bottom: 1px solid rgba(80, 136, 144, 0.1);
}

.status-strip-bottom {
    padding-top: 60px;
    padding-bottom: 40px;
    border-top: 1px solid rgba(80, 136, 144, 0.1);
    position: relative;
    animation-delay: 2s;
}

.status-data {
    white-space: nowrap;
    transition: color 0.4s ease;
}

/* --- Hero Section --- */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    position: relative;
    padding: 80px 0;
}

.hero-title {
    font-family: 'Fraunces', serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    color: #0A1828;
    letter-spacing: 0.12em;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
    animation: titleReveal 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.8s forwards;
}

.title-light {
    font-weight: 300;
    font-variation-settings: 'wght' 300;
}

.title-dot {
    font-weight: 300;
    color: #508890;
    display: inline-block;
    animation: dotPulse 4s ease-in-out infinite;
}

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

.title-bold {
    font-weight: 700;
    font-variation-settings: 'wght' 700;
}

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

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: #508890;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    max-width: 500px;
    border-bottom: 1px solid rgba(192, 168, 120, 0.3);
    padding-bottom: 8px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2.5s ease-in-out infinite;
    opacity: 0.4;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Contemplation Objects --- */
.contemplation-object {
    opacity: 0.08;
    position: absolute;
    pointer-events: none;
    transition: opacity 2s ease;
}

.contemplation-circle {
    width: 200px;
    height: 200px;
    top: 15%;
    right: -60px;
}

.contemplation-hero-line {
    width: 80%;
    max-width: 500px;
    height: 2px;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.05;
}

.contemplation-wave {
    width: 300px;
    height: 45px;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.contemplation-line {
    width: 2px;
    height: 160px;
    top: 10px;
    right: -30px;
}

.contemplation-diamond {
    width: 80px;
    height: 80px;
    top: -10px;
    left: -40px;
}

.contemplation-rings {
    width: 160px;
    height: 160px;
    top: 0;
    right: -50px;
}

.contemplation-wave-long {
    width: 350px;
    height: 70px;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
}

.contemplation-horizon {
    width: 300px;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* --- Content Sections --- */
.content-section {
    padding: 100px 0;
    position: relative;
    border-top: 1px solid rgba(80, 136, 144, 0.08);
}

.section-inner {
    position: relative;
    background-color: #FAFCFE;
    border: 1px solid rgba(80, 136, 144, 0.15);
    padding: 60px 48px;
    border-radius: 2px;
    transition: border-color 0.6s ease, box-shadow 0.6s ease;
}

.section-inner:hover {
    box-shadow: 0 0 40px rgba(80, 136, 144, 0.04);
}

.section-heading {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    color: #0A1828;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

.section-body {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: #283848;
    line-height: 1.9;
    margin-bottom: 36px;
    max-width: 600px;
}

.section-data {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 20px;
    border-top: 1px solid rgba(80, 136, 144, 0.1);
}

.data-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: #508890;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.data-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85rem;
    color: #0A1828;
    letter-spacing: 0.04em;
    border-left: 2px solid #C0A878;
    padding-left: 10px;
}

/* --- Progressive Disclosure Reveal Stages --- */
.reveal-stage-1,
.reveal-stage-2,
.reveal-stage-3 {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-stage-2.revealed {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.reveal-stage-3.revealed {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

/* --- Section Final --- */
.section-final .section-inner {
    text-align: center;
}

.section-final .section-body {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 36px;
}

.section-final .section-data {
    align-items: center;
}

.section-final .data-value {
    border-left: none;
    padding-left: 0;
    border-bottom: 2px solid #C0A878;
    padding-bottom: 6px;
    display: inline-block;
}

/* --- Tidal Weight Animation for Hero Title --- */
@keyframes tidalWeightLight {
    0% { font-variation-settings: 'wght' 300; }
    50% { font-variation-settings: 'wght' 600; }
    100% { font-variation-settings: 'wght' 300; }
}

@keyframes tidalWeightBold {
    0% { font-variation-settings: 'wght' 700; }
    50% { font-variation-settings: 'wght' 400; }
    100% { font-variation-settings: 'wght' 700; }
}

.hero-title .title-light {
    animation: tidalWeightLight 8s ease-in-out infinite;
}

.hero-title .title-bold {
    animation: tidalWeightBold 8s ease-in-out infinite;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .hud-frame {
        padding: 0 16px;
    }

    .section-inner {
        padding: 40px 24px;
    }

    .status-strip {
        font-size: 0.55rem;
    }

    .status-strip-top {
        width: calc(100% - 32px);
    }

    .hud-corner {
        width: 24px;
        height: 24px;
    }

    .hud-corner-tl::before,
    .hud-corner-tr::before,
    .hud-corner-bl::before,
    .hud-corner-br::before {
        width: 14px;
    }

    .hud-corner-tl::after,
    .hud-corner-tr::after,
    .hud-corner-bl::after,
    .hud-corner-br::after {
        height: 14px;
    }

    .contemplation-circle {
        width: 120px;
        height: 120px;
        right: -30px;
    }

    .contemplation-rings {
        width: 100px;
        height: 100px;
        right: -20px;
    }

    .content-section {
        padding: 60px 0;
    }

    .scroll-indicator {
        bottom: 30px;
    }
}

@media (max-width: 480px) {
    .status-strip {
        font-size: 0.5rem;
        gap: 8px;
    }

    .status-data:nth-child(3) {
        display: none;
    }

    .section-inner {
        padding: 32px 18px;
    }

    .hero-title {
        letter-spacing: 0.06em;
    }
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #F6F8FA;
}

::-webkit-scrollbar-thumb {
    background: rgba(80, 136, 144, 0.2);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(80, 136, 144, 0.4);
}

/* --- Selection --- */
::selection {
    background: rgba(192, 168, 120, 0.25);
    color: #0A1828;
}
