/*
 * Shared styles for every page except 404.html (which has its own standalone design).
 * Page-specific styles live in css/pages/<page>.css and load after this file.
 */

/*
 * Glacial Indifference, self-hosted (SIL Open Font License — see fonts/LICENSE.txt).
 * Previously loaded from fonts.cdnfonts.com; self-hosting removes that third-party
 * request entirely (no separate consent needed for it, and one less thing that can
 * be slow or go down).
 */
@font-face {
    font-family: 'Glacial Indifference';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/glacial-indifference-400.woff2') format('woff2'),
         url('../fonts/glacial-indifference-400.woff') format('woff');
}

@font-face {
    font-family: 'Glacial Indifference';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/glacial-indifference-400italic.woff2') format('woff2'),
         url('../fonts/glacial-indifference-400italic.woff') format('woff');
}

@font-face {
    font-family: 'Glacial Indifference';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/glacial-indifference-700.woff2') format('woff2'),
         url('../fonts/glacial-indifference-700.woff') format('woff');
}

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

:root {
    --primary-red: #a42020;
    --deep-black: #000;
    --off-white: #fafafa;
    --warm-gray: #333;
    --light-gray: #888;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Glacial Indifference', sans-serif;
    background: var(--deep-black);
    color: var(--off-white);
    line-height: 1.6;
    font-weight: 300;
    /* Clears the fixed header */
    padding-top: 75px;
}

/* Skip link: hidden until focused, so keyboard/screen-reader users can jump
   past the repeated header/nav straight to each page's main content. */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2000;
    background: var(--primary-red);
    color: var(--off-white);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    transform: translateY(-100%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Header */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    transition: all 0.4s ease;
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--primary-red);
    transition: width 0.6s ease;
}

.header.scrolled::before {
    width: 200px;
}

.header_content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 75px;
}

.logo img {
    height: 45px;
    width: auto;
}

/* Navigation */
.nav {
    transition: all 0.3s ease-in-out;
}

.nav_list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav_item a {
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: lowercase;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav_item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.nav_item a:hover::after {
    width: 80%;
}

.nav_item a:hover {
    color: var(--primary-red);
}

/* Mobile menu button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
}

.bar {
    width: 22px;
    height: 2px;
    background: var(--off-white);
    margin: 2px 0;
    transition: all 0.3s ease;
}

.nav-open {
    transform: translateX(0) !important;
}

.hamburger-open .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger-open .bar:nth-child(2) {
    opacity: 0;
}

.hamburger-open .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Footer */
footer {
    background: var(--deep-black);
    padding: 2rem;
    border-top: 1px solid rgba(164, 32, 32, 0.2);
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--light-gray);
    font-size: 0.85rem;
}

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

.social-links a,
.footer-social-links a {
    color: var(--light-gray);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover,
.footer-social-links a:hover {
    color: var(--primary-red);
    transform: translateY(-2px);
}

/* Mobile menu: the nav slides in from the left below 1024px */
@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 75px;
        left: 0;
        width: 100%;
        height: calc(100vh - 75px);
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(15px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 3rem 2rem;
    }

    .nav-open {
        transform: translateX(0);
    }

    .nav_list {
        flex-direction: column;
        gap: 2rem;
        height: 100%;
        justify-content: flex-start;
    }

    .nav_item a {
        font-size: 1.2rem;
    }

    .hamburger-open .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .hamburger-open .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-open .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .footer-content {
        text-align: center;
        flex-direction: column;
    }
}

/* Cookie consent banner (js/consent.js builds and controls this) */
.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20000;
    background: #0a0a0a;
    border-top: 1px solid rgba(164, 32, 32, 0.4);
    padding: 1.25rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner-content {
    max-width: 900px;
    margin: 0 auto;
}

.cookie-banner-text {
    color: var(--off-white);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.cookie-banner-text a {
    color: var(--primary-red);
}

.cookie-banner-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cookie-btn {
    padding: 0.7rem 1.4rem;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid rgba(164, 32, 32, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.cookie-btn-primary {
    background: var(--primary-red);
    color: white;
}

.cookie-btn-primary:hover {
    background: #8a1b1b;
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--off-white);
}

.cookie-btn-secondary:hover {
    border-color: var(--off-white);
}

.cookie-panel {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-panel[hidden] {
    display: none;
}

.cookie-toggle-row {
    color: var(--off-white);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
}

.cookie-toggle-row input {
    width: 16px;
    height: 16px;
}

.footer-cookie-link,
.footer-impressum-link {
    display: block;
    color: var(--light-gray);
    font-size: 0.8rem;
    text-decoration: none;
    margin-top: 0.75rem;
}

.footer-cookie-link:hover,
.footer-impressum-link:hover {
    color: var(--primary-red);
}

@media (max-width: 480px) {
    .cookie-banner-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }
}
