/* matchumnews.com - Cartographic HUD Design */
/* Fonts: Josefin Sans (headlines), Libre Baskerville (body), IBM Plex Mono (data) */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #2a2018;
    color: #e8dcc8;
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.75;
    letter-spacing: 0.005em;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===== TERRAIN BACKGROUND ===== */

#terrain-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 200vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

#terrain-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#contour-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

/* ===== COMPASS ROSE ===== */

#compass-rose {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 100;
    opacity: 0.7;
    animation: compass-rotate 120s linear infinite;
}

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

/* ===== HUD NAVIGATION RAIL ===== */

#hud-rail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: rgba(42, 32, 24, 0.88);
    border-bottom: 1px solid #b8956a;
    z-index: 200;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#hud-rail-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
}

#hud-title {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    letter-spacing: 0.18em;
    color: #e8dcc8;
    text-transform: uppercase;
}

#hud-waypoints {
    display: flex;
    align-items: center;
    gap: 16px;
}

.waypoint {
    display: flex;
    align-items: center;
    cursor: default;
    transition: transform 0.3s ease;
}

.waypoint svg polygon {
    fill: none;
    stroke: #a89880;
    stroke-width: 1;
    opacity: 0.4;
    transition: all 0.4s ease;
}

.waypoint.active svg polygon {
    fill: #b8956a;
    stroke: #b8956a;
    opacity: 1;
}

#hud-coordinates {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.12em;
    color: #a89880;
    line-height: 1.4;
}

/* ===== ELEVATION SIDEBAR ===== */

#elevation-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 48px;
    height: 100vh;
    z-index: 150;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(42, 32, 24, 0.5);
    border-left: 1px solid rgba(184, 149, 106, 0.2);
}

#elevation-svg {
    width: 48px;
    height: calc(100vh - 24px);
    margin-top: 48px;
}

#elevation-readout {
    position: absolute;
    bottom: 8px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    color: #b8956a;
    white-space: nowrap;
    transform: rotate(-90deg);
    transform-origin: center;
}

/* ===== MAIN CONTENT AREA ===== */

#content-area {
    position: relative;
    z-index: 10;
    padding-top: 100px;
    padding-bottom: 200px;
    padding-right: 48px;
}

/* ===== DATA STRIPS ===== */

.data-strip {
    width: 100%;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px 0;
    position: relative;
}

.data-strip::before,
.data-strip::after {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    height: 1px;
    background: rgba(184, 149, 106, 0.2);
}

.data-strip::before {
    top: 0;
}

.data-strip::after {
    bottom: 0;
}

.strip-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.12em;
    color: #b8956a;
    line-height: 1.4;
}

.strip-cursor {
    display: inline-block;
    width: 0;
    height: 1em;
    border-right: 2px solid #b8956a;
    margin-left: 2px;
    vertical-align: middle;
    opacity: 0;
}

.strip-cursor.blinking {
    animation: cursor-blink 1s step-end infinite;
}

.strip-cursor.fade-out {
    animation: cursor-fade 0.5s ease-out forwards;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes cursor-fade {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ===== HUD PANELS ===== */

.hud-panel {
    max-width: 680px;
    border-radius: 2px;
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hud-panel::before {
    content: '';
    position: absolute;
    inset: -4px;
    border: 1px solid #5c4a36;
    border-radius: 3px;
    pointer-events: none;
}

.hud-panel::after {
    content: '';
    position: absolute;
    inset: -1px;
    border: 1px solid rgba(184, 149, 106, 0.4);
    border-radius: 2px;
    pointer-events: none;
}

.panel-left {
    margin-left: 8%;
    margin-right: 35%;
    transform: translateX(-40px);
}

.panel-right {
    margin-left: 35%;
    margin-right: 8%;
    transform: translateX(40px);
}

.hud-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

.panel-ridge-header {
    width: 100%;
    height: 16px;
    overflow: hidden;
}

.ridge-svg {
    width: 100%;
    height: 16px;
    display: block;
}

.panel-content {
    background: rgba(61, 48, 40, 0.92); /* #3d3028 at 92% */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 32px 36px;
}

.dispatch-number {
    display: inline-block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.12em;
    color: #c45a3a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.hud-panel h2 {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2.6rem);
    letter-spacing: 0.04em;
    color: #e8dcc8;
    line-height: 1.2;
    margin-bottom: 24px;
}

.hud-panel p {
    color: #e8dcc8;
    margin-bottom: 16px;
}

.hud-panel p:last-of-type {
    margin-bottom: 24px;
}

.panel-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid rgba(184, 149, 106, 0.2);
}

.cube-marker {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.meta-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.65rem, 0.9vw, 0.8rem);
    letter-spacing: 0.12em;
    color: #a89880;
    line-height: 1.4;
}

/* ===== END SPACER ===== */

#end-spacer {
    padding-top: 80px;
    padding-bottom: 100px;
}

/* ===== CONTOUR ANIMATION ===== */

.contour-path {
    fill: none;
    stroke: #b8956a;
    stroke-width: 0.5px;
    opacity: 0.15;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .panel-left,
    .panel-right {
        margin-left: 5%;
        margin-right: calc(5% + 48px);
    }

    .panel-left {
        transform: translateX(-20px);
    }

    .panel-right {
        transform: translateX(20px);
    }

    .hud-panel.visible {
        transform: translateX(0);
    }

    #hud-coordinates {
        display: none;
    }

    #hud-waypoints {
        gap: 10px;
    }

    .panel-content {
        padding: 24px 20px;
    }

    #compass-rose {
        bottom: 12px;
        left: 12px;
        opacity: 0.5;
    }
}

@media (max-width: 480px) {
    .panel-left,
    .panel-right {
        margin-left: 3%;
        margin-right: calc(3% + 48px);
    }

    .data-strip::before,
    .data-strip::after {
        left: 3%;
        right: 3%;
    }
}


/* ===== ADDITIONAL DESIGN COLORS ===== */

/* Deep forest terrain shadow: #2a3a28 */
#terrain-container {
    background: linear-gradient(180deg, #2a2018 0%, #2a3a28 60%, #1a2028 100%);
}

/* Sage moss for dispatch number hover */
.dispatch-number:hover {
    color: #6b8a5e;
}

/* Secondary accent: #c47a4a for interactive hover */
.hud-panel h2:hover {
    color: #c47a4a;
    transition: color 0.3s ease;
}

/* Alpine khaki terrain accent: #d4c4a0 */
.panel-ridge-header {
    border-bottom: 1px solid rgba(212, 196, 160, 0.2); /* #d4c4a0 */
}

/* Cool slate end-of-page tint: #1a2028 */
#end-spacer {
    color: #a89880;
}

/* Terrain shadow layers */
.hud-panel::before {
    border-color: #5c4a36;
}

/* Contour line colors matching terrain */
.contour-path {
    stroke: #6b8a5e;
}

/* Alpine khaki data strip accent */
.data-strip .strip-text::selection {
    background: #d4c4a0;
    color: #2a2018;
}
