/* ===================================================================
   landing.css - Scapewatch marketing landing page.

   Styles extracted and adapted from the game's login screen
   (client/css/style.css, the .login-* and .patch-notes-* rules).
   Layout changes from the login screen:
     - logo at roughly half size, pinned toward the top
     - three stacked play buttons in the center
     - extra text links (Wiki / Guide / Map / Presskit) top-left
   =================================================================== */

/* ── Theme tokens (copied from the game's :root) ─────────────── */
:root {
    --game-font: 'Chakra Petch', sans-serif;
    --title-font: 'Cinzel', serif;
    --bg-panel: #2b2216;
    --border-primary: #5c4a2a;
    --text-gold: #FFD700;
    --text-accent: #c8a83e;
    --text-light: #cccccc;
}

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

html, body {
    width: 100%;
    height: 100%;
}

body {
    background: #1a1a2e;
    font-family: var(--game-font);
    overflow: hidden;
}

/* ── Full-screen stage ───────────────────────────────────────── */
.landing-screen {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* ── Background canvas (animated map tiles) ──────────────────── */
.bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 0;
}

/* ── Vignette overlay ────────────────────────────────────────── */
.landing-vignette {
    position: absolute;
    inset: -10px;
    background:
        radial-gradient(ellipse at center, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.9) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ── Top-left links (social + site links) ────────────────────── */
.landing-links {
    position: absolute;
    top: 31px;
    left: 31px;
    display: flex;
    flex-direction: column;
    gap: 13px;
    z-index: 3;
    animation: landingFadeIn 0.8s ease-out 1.6s both;
}
.landing-link {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 17px;
    font-family: var(--game-font);
    letter-spacing: 0.55px;
    transition: color 0.25s, transform 0.2s;
}
.landing-link:hover {
    color: rgba(255,255,255,0.95);
    transform: translateX(2px);
}
.landing-link svg {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    opacity: 0.7;
    transition: opacity 0.25s;
}
.landing-link:hover svg {
    opacity: 1;
}
/* Text-only links (Wiki / Guide / Map / Presskit) align their
   labels with the icon-link labels by reserving the icon's width. */
.landing-link.text-link .link-icon-gap {
    display: inline-block;
    width: 24px;
    flex-shrink: 0;
}
.landing-links-divider {
    height: 1px;
    background: rgba(200,168,62,0.18);
    margin: 3px 0;
}

/* ── Patch notes panel (top-right) ───────────────────────────── */
.patch-notes-panel {
    position: absolute;
    top: 31px;
    right: 31px;
    width: 330px;
    max-height: 60vh;
    overflow-y: auto;
    z-index: 3;
    background: rgba(10,8,18,0.55);
    border: 1px solid rgba(200,168,62,0.12);
    border-radius: 8px;
    padding: 20px 22px;
    color: var(--text-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: landingFadeIn 0.8s ease-out 1.4s both;
    /* Hide the scrollbar but keep scrolling, so the prev/next arrows
       do not jump horizontally between patch entries. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.patch-notes-panel::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}
.patch-notes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.patch-notes-title {
    font-size: 19px;
    color: var(--text-gold);
    margin: 0;
    font-weight: 600;
    letter-spacing: 1.1px;
    text-shadow: 1px 1px 0 #000;
}
.patch-notes-nav {
    display: flex;
    gap: 4px;
}
.patch-notes-arrow {
    width: 28px;
    height: 28px;
    background: rgba(200,168,62,0.10);
    border: 1px solid rgba(200,168,62,0.25);
    border-radius: 4px;
    color: var(--text-gold);
    font-size: 22px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
}
.patch-notes-arrow:hover {
    background: rgba(200,168,62,0.22);
    border-color: rgba(200,168,62,0.55);
    color: #fff;
}
.patch-notes-arrow.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}
.patch-note-version {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}
.patch-note-ver {
    color: var(--text-accent);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.55px;
}
.patch-note-date {
    color: rgba(255,255,255,0.3);
    font-size: 13px;
}
.patch-note-item {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    padding-left: 7px;
    line-height: 1.6;
}

/* ── Center stage: logo on top, play buttons below ───────────── */
.landing-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 70px 0 80px;
    box-sizing: border-box;
}

/* Logo at roughly half the login screen's 512px size, near the top. */
.landing-logo {
    display: block;
    width: 256px;
    height: 256px;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    filter: drop-shadow(0 8px 32px rgba(0,0,0,0.65))
            drop-shadow(0 0 60px rgba(255,215,0,0.1));
    user-select: none;
    /* No animation so the logo stays statically pinned. */
}

/* Three stacked play buttons, centered between logo and bottom. */
.landing-play {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    animation: landingFadeIn 0.8s ease-out 0.6s both;
}

/* ── Play buttons (adapted from .login-btn-steam) ────────────── */
.play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 560px;
    padding: 22px 56px;
    font-family: var(--game-font);
    font-size: 27px;
    font-weight: 700;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    color: #d8e0ee;
    background: linear-gradient(180deg, rgba(60,90,140,0.55) 0%, rgba(28,52,92,0.7) 100%);
    border: 1px solid rgba(150,180,220,0.65);
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
}
.play-btn svg {
    color: #d8e0ee;
    margin-right: 15px;
    vertical-align: middle;
    flex-shrink: 0;
}
.play-btn:hover {
    background: linear-gradient(180deg, rgba(80,118,180,0.55) 0%, rgba(40,72,124,0.65) 100%);
    border-color: rgba(170,200,240,0.85);
    box-shadow: 0 0 20px rgba(120,160,220,0.25), 0 0 60px rgba(120,160,220,0.08);
    transform: translateY(-1px);
}
.play-btn:active {
    transform: translateY(0);
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes landingFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Responsive: keep things usable on small screens ─────────── */
@media (max-width: 900px) {
    .patch-notes-panel {
        width: 280px;
        max-height: 40vh;
    }
}
@media (max-width: 640px) {
    /* Top-left nav links stay where they are, just a bit tighter. */
    .landing-links {
        top: 14px;
        left: 14px;
        gap: 9px;
    }
    .landing-link {
        font-size: 14px;
        gap: 9px;
    }
    .landing-link svg {
        width: 20px;
        height: 20px;
    }
    .landing-link.text-link .link-icon-gap {
        width: 20px;
    }

    /* Patch notes move to the BOTTOM on mobile so they do not cover the nav. */
    .patch-notes-panel {
        top: auto;
        bottom: 14px;
        right: 14px;
        left: 14px;
        width: auto;
        max-height: 28vh;
        padding: 12px 14px;
    }
    .patch-notes-title {
        font-size: 16px;
    }
    .patch-note-item {
        font-size: 13px;
        line-height: 1.5;
    }

    /* Stage: leave room for the bottom patch-notes panel; center the play area. */
    .landing-stage {
        padding: 16px 0 calc(28vh + 28px);
        justify-content: center;
    }
    .landing-logo {
        width: 140px;
        height: 140px;
    }
    .landing-play {
        flex: 0 0 auto;
        margin-top: 12px;
        gap: 12px;
    }
    .play-btn {
        min-width: 0;
        width: calc(100vw - 36px);
        padding: 14px 16px;
        font-size: 18px;
        letter-spacing: 1px;
    }
    .play-btn svg {
        width: 24px;
        height: 24px;
        margin-right: 10px;
    }
}
