/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0B0E1A;
    color: #C8CDD8;
    font-family: 'Crimson Pro', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== CANVAS STAR FIELD ===== */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ===== TRAJECTORY SVG LINES ===== */
.trajectory-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    overflow: visible;
}

.trajectory-path {
    fill: none;
    stroke: #8B7355;
    stroke-opacity: 0.15;
    stroke-width: 1;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.trajectory-path.drawn {
    transition: stroke-dashoffset 3s ease-out;
    stroke-dashoffset: 0;
}

/* ===== HUD FRAME ===== */
#hud-frame {
    position: fixed;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 10;
    pointer-events: none;
}

.hud-corner {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0;
}

.hud-corner.visible {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.hud-corner-tl { top: 0; left: 0; }
.hud-corner-tr { top: 0; right: 0; }
.hud-corner-bl { bottom: 0; left: 0; }
.hud-corner-br { bottom: 0; right: 0; }

.hud-line {
    position: absolute;
    background: #8B7355;
    opacity: 0;
}

.hud-line.visible {
    opacity: 0.3;
    transition: opacity 0.4s ease;
}

.hud-line-top {
    top: 0;
    left: 60px;
    right: 60px;
    height: 1px;
}

.hud-line-bottom {
    bottom: 0;
    left: 60px;
    right: 60px;
    height: 1px;
}

.hud-line-left {
    top: 60px;
    bottom: 60px;
    left: 0;
    width: 1px;
}

.hud-line-right {
    top: 60px;
    bottom: 60px;
    right: 0;
    width: 1px;
}

/* ===== HUD DATA READOUTS ===== */
.hud-data {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
}

.hud-data.visible {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.hud-label {
    font-family: 'Overpass Mono', monospace;
    font-size: clamp(0.55rem, 0.7vw, 0.65rem);
    letter-spacing: 0.06em;
    color: #6B7080;
    text-transform: uppercase;
}

.hud-value {
    font-family: 'Overpass Mono', monospace;
    font-size: clamp(0.65rem, 0.8vw, 0.75rem);
    letter-spacing: 0.06em;
    color: #8B7355;
}

.hud-data-tl { top: 8px; left: 70px; }
.hud-data-tr { top: 8px; right: 70px; text-align: right; }
.hud-data-bl { bottom: 8px; left: 70px; }
.hud-data-br { bottom: 8px; right: 70px; text-align: right; }

/* ===== COMMAND STRIP ===== */
#command-strip {
    position: fixed;
    top: 24px;
    left: 24px;
    right: 24px;
    height: 48px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 70px;
    opacity: 0;
}

#command-strip.visible {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.command-strip-logo {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: clamp(0.8rem, 1vw, 0.95rem);
    letter-spacing: 0.12em;
    color: #C8CDD8;
    text-transform: uppercase;
}

.logo-dot {
    color: #D4A54A;
}

.command-strip-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    font-family: 'Overpass Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.7rem);
    letter-spacing: 0.06em;
    color: #6B7080;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: #2A8F8F;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #2A8F8F;
    transition: width 0.2s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-pipe {
    font-family: 'Overpass Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.7rem);
    color: #8B7355;
    opacity: 0.4;
}

/* ===== MAIN CONTENT ===== */
#content-scroll {
    position: relative;
    z-index: 5;
    padding-top: 0;
}

/* ===== HERO SECTION ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
}

.hero-inner {
    max-width: 680px;
    text-align: center;
}

/* ===== HOLOGRAPHIC SEAL ===== */
#holographic-seal {
    width: 200px;
    height: 200px;
    margin: 0 auto 48px;
    opacity: 0;
    transform: scale(0.8);
}

#holographic-seal.visible {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seal-svg {
    width: 100%;
    height: 100%;
}

.seal-outer-ring {
    animation: seal-rotate 360s linear infinite;
    transform-origin: 150px 150px;
}

.seal-text {
    font-family: 'Overpass Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    fill: #8B7355;
    text-transform: uppercase;
}

.seal-inner circle,
.seal-inner ellipse {
    stroke: #8B7355;
}

.seal-inner circle:last-child {
    fill: #D4A54A;
}

@keyframes seal-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== HERO TYPOGRAPHY ===== */
#hero-heading {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #C8CDD8;
    margin-bottom: 32px;
    line-height: 1.2;
    min-height: 1.2em;
}

#hero-heading .cursor {
    display: inline-block;
    width: 2px;
    height: 0.9em;
    background: #D4A54A;
    margin-left: 2px;
    animation: blink 0.8s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    50% { opacity: 0; }
}

.hero-text {
    max-width: 600px;
    margin: 0 auto;
}

.hero-paragraph {
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: #C8CDD8;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(10px);
}

.hero-paragraph.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ===== MANIFEST SECTIONS ===== */
.manifest-section {
    padding: 20px 24px 40px;
    position: relative;
}

/* ===== DIAGONAL DIVIDERS ===== */
.diagonal-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 20px auto 40px;
    max-width: 800px;
    opacity: 0;
    transform: translateY(10px);
}

.diagonal-divider.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #8B7355;
    opacity: 0.25;
    transform: rotate(3deg);
}

.divider-diamond {
    width: 8px;
    height: 8px;
    background: #D4A54A;
    transform: rotate(45deg);
    flex-shrink: 0;
    margin: 0 12px;
}

/* ===== MANIFEST PANELS (DIAGONAL) ===== */
.manifest-panel {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 56px;
    background: #151929;
    position: relative;
    opacity: 0;
}

.manifest-panel.revealed {
    opacity: 1;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel-skew-right {
    clip-path: polygon(3% 0%, 100% 0%, 97% 100%, 0% 100%);
    transform: translateX(-30px);
}

.panel-skew-right.revealed {
    transform: translateX(0);
}

.panel-skew-left {
    clip-path: polygon(0% 0%, 97% 0%, 100% 100%, 3% 100%);
    transform: translateX(30px);
}

.panel-skew-left.revealed {
    transform: translateX(0);
}

.panel-inner {
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SECTION TYPOGRAPHY ===== */
.section-heading {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #D4A54A;
    margin-bottom: 24px;
}

.section-body {
    font-family: 'Crimson Pro', serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.85;
    letter-spacing: 0.01em;
    color: #C8CDD8;
    margin-bottom: 16px;
}

.section-body:last-child {
    margin-bottom: 0;
}

/* ===== LINKS ===== */
a {
    color: #2A8F8F;
    text-decoration: none;
    position: relative;
}

a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: #2A8F8F;
    transition: width 0.2s ease;
}

a:hover::after {
    width: 100%;
}

/* ===== DOCKING FOOTER ===== */
#docking-footer {
    position: relative;
    z-index: 5;
    height: 120px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    border-top: 1px solid rgba(139, 115, 85, 0.2);
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 48px;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-label {
    font-family: 'Overpass Mono', monospace;
    font-size: clamp(0.55rem, 0.65vw, 0.6rem);
    letter-spacing: 0.06em;
    color: #6B7080;
    text-transform: uppercase;
    display: block;
    margin-bottom: 2px;
}

.footer-value {
    font-family: 'Overpass Mono', monospace;
    font-size: clamp(0.6rem, 0.75vw, 0.7rem);
    letter-spacing: 0.06em;
    color: #8B7355;
    display: block;
}

/* ===== COMMODITY TICKER ===== */
.ticker-container {
    width: 100%;
    overflow: hidden;
    height: 20px;
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll 40s linear infinite;
}

.ticker-content {
    font-family: 'Overpass Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    color: #6B7080;
    white-space: nowrap;
    padding-right: 0;
}

.ticker-up {
    color: #2A8F8F;
}

.ticker-down {
    color: #A04040;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ===== FADE ELEMENT (SCROLL REVEAL) ===== */
.fade-element {
    opacity: 0;
    transform: translateY(15px);
}

.fade-element.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* ===== PULSE ATTENTION (STARS) ===== */
@keyframes pulse-attention {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ===== SEAL PROXIMITY EFFECT ===== */
#holographic-seal.proximity .seal-outer-ring {
    animation-duration: 36s;
}

#holographic-seal.proximity .seal-text {
    fill: #A08A66;
    transition: fill 0.3s ease;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .trajectory-path.drawn {
        transition: none;
        stroke-dashoffset: 0;
    }

    .hud-corner.visible,
    .hud-line.visible,
    .hud-data.visible,
    #command-strip.visible,
    #holographic-seal.visible,
    .hero-paragraph.revealed,
    .manifest-panel.revealed,
    .diagonal-divider.revealed,
    .fade-element.revealed {
        transition: none;
    }

    .seal-outer-ring {
        animation: none;
    }

    .ticker-track {
        animation: none;
    }

    #hero-heading .cursor {
        animation: none;
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #hud-frame {
        top: 12px;
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    #command-strip {
        top: 12px;
        left: 12px;
        right: 12px;
        padding: 0 40px;
        flex-direction: column;
        height: auto;
        gap: 4px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .command-strip-nav {
        gap: 8px;
    }

    .nav-link {
        font-size: 0.55rem;
    }

    #hero {
        padding: 120px 24px 40px;
    }

    .manifest-panel {
        padding: 32px 28px;
    }

    .panel-skew-right,
    .panel-skew-left {
        clip-path: polygon(2% 0%, 100% 0%, 98% 100%, 0% 100%);
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 24px;
    }

    .hud-data-tl,
    .hud-data-tr,
    .hud-data-bl,
    .hud-data-br {
        display: none;
    }

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

    .hud-line-top,
    .hud-line-bottom {
        left: 40px;
        right: 40px;
    }

    .hud-line-left,
    .hud-line-right {
        top: 40px;
        bottom: 40px;
    }
}
