/* transactology.net - Celestial observatory catalog of exchange */

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

:root {
    --deep-navy: #0A0E1E;
    --observatory-blue: #1A2038;
    --twilight-slate: #3A4868;
    --gunmetal: #4A5878;
    --steel-mist: #8090A8;
    --fog-silver: #B0B8C8;
    --foam-silver: #D0D8E0;
    --observatory-brass: #D4B878;
    --star-bright: #C0C8D8;
}

body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.8;
    color: var(--foam-silver);
    background-color: var(--deep-navy);
    overflow-x: hidden;
}

/* === Navigation === */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 0 24px;
    background-color: rgba(10, 14, 30, 0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
}

.nav-link {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.6875rem;
    color: var(--steel-mist);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease, transform 0.3s ease;
    transform-style: preserve-3d;
    perspective: 600px;
}

.nav-link:hover {
    color: var(--foam-silver);
    transform: rotateX(2deg) rotateY(-3deg);
}

.nav-link.active {
    color: var(--observatory-brass);
}

/* === Star Field (Background Plane) === */
.star-field {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
}

.stars-cool {
    box-shadow:
        120px 80px 0 0.5px #8090A8,
        340px 160px 0 0.5px #B0B8C8,
        560px 40px 0 1px #8090A8,
        780px 200px 0 0.5px #B0B8C8,
        90px 320px 0 1px #8090A8,
        450px 400px 0 0.5px #B0B8C8,
        670px 350px 0 0.5px #8090A8,
        200px 500px 0 1px #B0B8C8,
        830px 480px 0 0.5px #8090A8,
        40px 600px 0 0.5px #B0B8C8,
        380px 650px 0 1px #8090A8,
        600px 580px 0 0.5px #B0B8C8,
        150px 750px 0 0.5px #8090A8,
        720px 700px 0 1px #B0B8C8,
        500px 800px 0 0.5px #8090A8,
        280px 870px 0 0.5px #B0B8C8,
        900px 900px 0 1px #8090A8,
        50px 980px 0 0.5px #B0B8C8,
        610px 1050px 0 0.5px #8090A8,
        310px 1100px 0 1px #B0B8C8,
        770px 1150px 0 0.5px #8090A8,
        430px 1250px 0 0.5px #B0B8C8,
        160px 1300px 0 1px #8090A8,
        850px 1350px 0 0.5px #B0B8C8,
        530px 1420px 0 0.5px #8090A8,
        70px 1500px 0 1px #B0B8C8,
        690px 1550px 0 0.5px #8090A8,
        240px 1600px 0 0.5px #B0B8C8,
        940px 1680px 0 1px #8090A8,
        410px 1750px 0 0.5px #B0B8C8,
        1050px 120px 0 0.5px #8090A8,
        1200px 300px 0 1px #B0B8C8,
        1100px 500px 0 0.5px #8090A8,
        1300px 680px 0 0.5px #B0B8C8,
        1150px 850px 0 1px #8090A8,
        1250px 1000px 0 0.5px #B0B8C8,
        1350px 1200px 0 0.5px #8090A8,
        1050px 1350px 0 1px #B0B8C8,
        1400px 1500px 0 0.5px #8090A8,
        1180px 1650px 0 0.5px #B0B8C8;
}

.stars-warm {
    box-shadow:
        250px 120px 0 0.5px #D4B878,
        480px 280px 0 1px #D4B878,
        700px 90px 0 0.5px #D4B878,
        130px 440px 0 0.5px #D4B878,
        580px 530px 0 1px #D4B878,
        350px 720px 0 0.5px #D4B878,
        820px 620px 0 0.5px #D4B878,
        60px 850px 0 1px #D4B878,
        500px 960px 0 0.5px #D4B878,
        740px 1080px 0 0.5px #D4B878,
        220px 1150px 0 1px #D4B878,
        900px 1240px 0 0.5px #D4B878,
        400px 1380px 0 0.5px #D4B878,
        650px 1500px 0 1px #D4B878,
        110px 1620px 0 0.5px #D4B878,
        1100px 200px 0 0.5px #D4B878,
        1280px 450px 0 1px #D4B878,
        1050px 700px 0 0.5px #D4B878,
        1320px 950px 0 0.5px #D4B878,
        1180px 1150px 0 1px #D4B878;
}

/* === Mid Plane (Deco Frames) === */
.mid-plane {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.deco-frame {
    position: absolute;
    opacity: 0.4;
}

.deco-ziggurat-left {
    left: -20px;
    top: 20%;
    width: 120px;
    height: 200px;
}

.deco-fan-right {
    right: -10px;
    top: 5%;
    width: 160px;
    height: 80px;
}

.deco-ziggurat-right {
    right: -20px;
    bottom: 25%;
    width: 120px;
    height: 200px;
}

.deco-fan-left {
    left: -10px;
    bottom: 10%;
    width: 160px;
    height: 80px;
}

.deco-corner-tl {
    left: 20px;
    top: 60%;
    width: 80px;
    height: 80px;
}

.deco-corner-br {
    right: 20px;
    bottom: 40%;
    width: 80px;
    height: 80px;
}

/* === Foreground Plane === */
.foreground {
    position: relative;
    z-index: 2;
}

/* === Dome Section (Hero) === */
.dome-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 48px;
}

.hero-constellation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 300px;
    opacity: 0.35;
}

.dome-title {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--foam-silver);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fadeInTitle 1s 2.5s ease forwards;
}

.dome-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    color: var(--fog-silver);
    text-align: center;
    margin-top: 12px;
    position: relative;
    z-index: 10;
    opacity: 0;
    animation: fadeInTitle 0.8s 3s ease forwards;
}

@keyframes fadeInTitle {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Constellation Elements === */
.star-dot {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.star-dot.warm { fill: var(--observatory-brass); }
.star-dot.cool { fill: var(--fog-silver); }

.constellation-line {
    stroke: var(--twilight-slate);
    stroke-width: 0.5;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.5s ease-out;
}

.constellation.animate .star-dot {
    opacity: 1;
}

.constellation.animate .constellation-line {
    stroke-dashoffset: 0;
}

.catalog-id {
    font-family: 'Space Mono', monospace;
    font-size: 8px;
    fill: var(--observatory-brass);
    letter-spacing: 0.05em;
    opacity: 0;
    transition: opacity 0.5s ease 1s;
}

.constellation.animate .catalog-id {
    opacity: 1;
}

/* === Observation Sections === */
.observation-section {
    display: flex;
    gap: 48px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 100px 48px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.observation-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.obs-text {
    flex: 0 0 55%;
}

.catalog-label {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.6875rem;
    color: var(--observatory-brass);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 12px;
}

.obs-header {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: var(--foam-silver);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.3;
}

.obs-body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.125rem);
    line-height: 1.8;
    color: var(--fog-silver);
    margin-bottom: 16px;
    max-width: 55ch;
}

.obs-viz {
    flex: 0 0 40%;
}

/* === Data Visualization === */
.data-viz {
    width: 100%;
    max-width: 320px;
}

.axis-label {
    font-family: 'Space Mono', monospace;
    font-size: 7px;
    fill: var(--steel-mist);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* === Tilt 3D System === */
.tilt-3d {
    perspective: 800px;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
}

/* === Deep Field Section === */
.deep-field-section {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 48px;
}

.deep-constellation {
    width: 100%;
    max-width: 600px;
    height: auto;
    margin-bottom: 48px;
    opacity: 0.6;
}

.deep-field-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.9;
    color: var(--fog-silver);
    max-width: 60ch;
    text-align: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.deep-field-section.visible .deep-field-text {
    opacity: 1;
}

/* === Closing Section === */
.closing-section {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 80px 24px;
}

.closing-log {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--steel-mist);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
}

.closing-plaque {
    width: 280px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--observatory-blue);
    border: 1px solid var(--twilight-slate);
    perspective: 800px;
}

.plaque-text {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--observatory-brass);
    letter-spacing: 0.1em;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    .dome-title, .dome-subtitle {
        opacity: 1;
        animation: none;
    }
    .star-dot {
        opacity: 1;
        transition: none;
    }
    .constellation-line {
        stroke-dashoffset: 0;
        transition: none;
    }
    .catalog-id {
        opacity: 1;
        transition: none;
    }
    .observation-section {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .deep-field-text {
        opacity: 1;
        transition: none;
    }
    .tilt-3d {
        transition: none;
    }
    .nav-link {
        transition: none;
    }
}

/* === Responsive === */
@media (max-width: 800px) {
    .observation-section {
        flex-direction: column;
        padding: 60px 20px;
    }
    .obs-text { flex: 1; }
    .obs-viz { flex: 1; width: 100%; }
    .deco-frame { display: none; }
    .top-nav {
        gap: 12px;
        overflow-x: auto;
    }
    .hero-constellation {
        width: 280px;
        height: 210px;
    }
}

@media (max-width: 480px) {
    .top-nav {
        gap: 8px;
        padding: 0 12px;
    }
    .nav-link {
        font-size: 0.5625rem;
    }
}
