/* Shared styles for every page: tokens, fonts, base elements, buttons,
   navbar, footer, news cards and the scroll-to-top button.
   Page-specific styles live in index.css, news.css and detailedNews.css. */

:root {
    --primary: #071C65;
    --secondary: #81D6FF;
    --accent: #A87FFF;
    --text: #F0E4FF;
    --header: #3B73A7;
    --background: #321F30;
    --dark: #000000;
    --light: #FFFFFF;
    --overlay: rgba(10, 12, 20, 0.8);
    --nav-height: 5rem;
    /* Colours taken from the game's art: night-sky indigo, Elythian cyan glow */
    --bg: #0b0a1f;          /* page ground: deep indigo */
    --surface: #16153a;     /* one step lighter, for fields and tiles */
    --muted: rgba(226, 228, 255, 0.7);
    --line: rgba(226, 228, 255, 0.14);
    --glow-line: rgba(129, 214, 255, 0.45);

    /* The whole site uses these four text sizes and nothing else. */
    --fs-display: clamp(3rem, 15vw, 8rem);  /* hero title only */
    --fs-title: clamp(1.4rem, 2.4vw, 2rem); /* headings */
    --fs-body: 1rem;                        /* reading text */
    --fs-small: 0.75rem;                    /* labels, dates, nav, buttons */

    --space-section: 5rem;
    --radius: 6px;
}

@font-face {
    font-family: bigWriting;
    src: url(font/IntroRust-Base.woff2) format("woff2");
    font-display: swap;
}

/* Body text: Rajdhani (SIL Open Font License), the Artifika brand typeface. */
@font-face {
    font-family: Rajdhani;
    font-weight: 500;
    font-display: swap;
    src: url(font/rajdhani-latin-500.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Rajdhani;
    font-weight: 500;
    font-display: swap;
    src: url(font/rajdhani-latin-ext-500.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: Rajdhani;
    font-weight: 600;
    font-display: swap;
    src: url(font/rajdhani-latin-600.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Rajdhani;
    font-weight: 600;
    font-display: swap;
    src: url(font/rajdhani-latin-ext-600.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
    scroll-behavior: smooth;
    font-size: 120%;
}

body {
    background: var(--bg) radial-gradient(ellipse 120% 60rem at 50% 0, rgba(66, 48, 122, 0.35), transparent) no-repeat;
    color: var(--text);
    font-family: Rajdhani, system-ui, sans-serif;
    font-weight: 500;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Anchored sections stop below the fixed navbar. */
[id] {
    scroll-margin-top: var(--nav-height);
}

img, video, svg {
    max-width: 100%;
}

h1, h2, h3, h4 {
    font-family: bigWriting, system-ui, sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }

h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h3 {
    font-size: 1.8rem;
    color: var(--accent);
}

p {
    font-family: Rajdhani, system-ui, sans-serif;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
}

hr {
    width: 50%;
    height: 3px;
    margin: 0 auto;
    border: 0;
    background-color: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 3px;
}

.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    vertical-align: -0.125em;
    flex-shrink: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 2000;
    padding: 0.6rem 1rem;
    background: var(--accent);
    color: var(--dark);
    border-radius: 4px;
}

.skip-link:focus {
    top: 1rem;
}

/* Buttons: one size and one shape everywhere (.btn). Bare <button>s are unstyled. */
button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.btn, .filter-btn, .share-btn {
    font-family: bigWriting, system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    background-color: var(--accent);
    color: var(--dark);
    min-height: 48px;
    padding: 0 1.5rem;
    font-size: var(--fs-small);
    font-weight: 600;
    line-height: 1;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.btn:hover, .filter-btn:hover, .share-btn:hover {
    background-color: var(--text);
    border-color: var(--text);
}

.secondary-btn {
    background-color: transparent;
    color: var(--text);
}

.secondary-btn:hover {
    background-color: var(--accent);
    color: var(--dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar: transparent over the home hero, solid on scroll and on sub-pages */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
}

.navbar.scrolled,
.navbar--solid {
    background-color: var(--bg);
    padding: 1rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar--solid {
    position: sticky;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    flex-shrink: 0;
}

.logo-image {
    height: 40px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(0.8rem, 1.6vw, 2rem);
    list-style: none;
}

.nav-links a {
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
    width: 100%;
}

/* Wishlist button in the navbar */
.nav-links .nav-cta {
    color: var(--dark);
}

.nav-links .nav-cta::after {
    display: none;
}

.menu-toggle {
    display: none;
    background: none;
    color: var(--text);
    padding: 0.4rem;
    font-size: 1.5rem;
    position: relative;
    z-index: 1001;
}

.menu-toggle:hover {
    background: none;
    color: var(--accent);
    transform: none;
}

.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: inline; }

/* News cards (home Announcements and news.html) */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.news-card {
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.news-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Posts without a cover image (links out to Steam) */
.news-image--text {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-family: bigWriting, system-ui, sans-serif;
    font-size: 1.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text);
    background: linear-gradient(135deg, var(--primary), var(--background) 60%, #000);
    border: 1px solid rgba(168, 127, 255, 0.3);
}

.news-content {
    padding: 25px;
}

.news-category {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    font-size: 0.8em;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 15px;
    border: 1px solid var(--light);
}

.news-title {
    color: var(--text);
    font-size: 1.5em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    font-weight: 600;
}

.news-date {
    display: block;
    color: var(--text);
    font-size: 1em;
    margin-bottom: 15px;
}

.news-excerpt {
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.7;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid var(--accent);
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}

.read-more:hover {
    background: var(--accent);
    color: var(--background);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo-image {
    height: 30px;
    width: auto;
    margin: 0 auto;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 2rem;
    list-style: none;
    margin: 1.5rem 0;
}

.social-links,
.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social {
    justify-content: center;
    margin-bottom: 1.5rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent);
    color: var(--dark);
    transform: translateY(-5px);
}

.footer-nav a {
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.copyright,
.footer-address {
    margin: 0 auto 0.5rem;
    max-width: 40rem;
    font-size: var(--fs-small);
    font-style: normal;
    letter-spacing: 0.5px;
    color: var(--muted);
}

/* Scroll to top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.3rem;
    opacity: 0;
    visibility: hidden;
    z-index: 100;
}

.scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
}

/* Click-to-load YouTube embed: no YouTube scripts until the visitor presses play */
.yt-lite {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 1rem 0;
    padding: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #000 center / cover no-repeat;
}

.yt-lite:hover {
    background-color: #000;
    transform: none;
}

.yt-lite::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease;
}

.yt-lite:hover::after {
    background: rgba(0, 0, 0, 0.05);
}

.yt-lite .yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.yt-lite iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Trailer lightbox */
.video-dialog {
    width: min(1100px, 94vw);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #000;
    color: var(--text);
    overflow: visible;
}

.video-dialog::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

.video-dialog .video-frame {
    aspect-ratio: 16 / 9;
}

.video-dialog iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

.video-dialog .dialog-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 900px) {
    .navbar-container {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        height: 100dvh;
        background-color: var(--bg);
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transition: right 0.5s ease, visibility 0.5s;
        visibility: hidden;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
        visibility: visible;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    p { font-size: 1rem; }

    .container {
        padding: 0 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
