/* ==========================================================================
   base.css — structure only. No colors, no fonts, no textures here.
   Every visual value comes from custom properties; themes/*/theme.css
   supplies the values. Sane fallbacks are given so the site is never
   unstyled if a theme file fails to load.
   ========================================================================== */

:root {
    --color-bg: #14141a;
    --color-bg-alt: #1c1c24;
    --color-surface: #22222c;
    --color-text: #eee;
    --color-text-muted: #a0a0ac;
    --color-accent: #ff2ea8;
    --color-accent-2: #23d5f0;
    --color-border: #34343f;
    --color-link: var(--color-accent-2);
    --color-badge-won: #23d5f0;
    --color-badge-nominated: #a0a0ac;

    --font-display: Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, Segoe UI, Roboto, sans-serif;

    --card-radius: 6px;
    --card-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    --card-border: 1px solid var(--color-border);
    --card-bg: var(--color-surface);
    --overlay-image: none;
    --overlay-opacity: 0;

    --header-bg: var(--color-bg-alt);
    --header-border: 1px solid var(--color-border);
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: clamp(15px, 1vw + 12px, 17px);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: var(--overlay-image);
    opacity: var(--overlay-opacity);
    mix-blend-mode: var(--overlay-blend, normal);
    z-index: 9999;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--color-link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0 0 0.6em;
}

h1 {
    font-size: clamp(1.8rem, 2vw + 1.2rem, 2.8rem);
}

h2 {
    font-size: clamp(1.4rem, 1.2vw + 1rem, 2rem);
}

p {
    margin: 0 0 1em;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Header / Nav ------------------------------------------------------ */

.site-header {
    background: var(--header-bg);
    border-bottom: var(--header-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.site-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    color: var(--color-text);
}

.site-title:hover {
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 0.35rem 0;
    display: inline-block;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--color-accent);
    text-decoration: none;
}

@media (max-width: 780px) {
    .nav-toggle {
        display: inline-block;
    }

    .main-nav {
        display: none;
        width: 100%;
        padding: 0 1.25rem 1rem;
    }

    .main-nav.is-open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .site-header__inner {
        flex-wrap: wrap;
    }
}

/* --- Page shell --------------------------------------------------------- */

.page-intro {
    padding: 2.5rem 0 1rem;
}

.page-intro__body {
    color: var(--color-text-muted);
    max-width: 70ch;
}

.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 70ch) minmax(320px, 1fr);
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 780px) {
    .home-layout {
        grid-template-columns: 1fr;
    }
}

.home-movies {
    margin-top: 2rem;
}

.home-movies h2 {
    margin-top: 0;
}

.home-movies__more {
    margin-top: 0.5rem;
}

.home-news h2 {
    margin-top: 0;
}

.home-news .news-item {
    padding: 1rem 0;
}

.home-news .news-item h3 {
    margin: 0.25rem 0;
}

.home-news__more {
    margin-top: 0.5rem;
}

main {
    padding-bottom: 3rem;
    min-height: 50vh;
}

/* --- Grids & cards ------------------------------------------------------ */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.grid--gallery {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.85rem;
}

.card {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease;
}

.card:hover {
    transform: translateY(-3px);
}

a.card {
    color: inherit;
}

a.card:hover {
    text-decoration: none;
}

.card__media {
    aspect-ratio: 2 / 3;
    background: var(--color-bg-alt);
    overflow: hidden;
}

.card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__media--placeholder {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(45deg, transparent 48%, var(--color-border) 49%, var(--color-border) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, var(--color-border) 49%, var(--color-border) 51%, transparent 52%);
}

.card__body {
    padding: 0.9rem 1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card__title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin: 0 0 0.25rem;
    color: var(--color-text);
}

.card a {
    text-decoration: none;
}

.card__meta {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

figure.gallery-item {
    margin: 0;
    aspect-ratio: 1 / 1;
    border-radius: var(--card-radius);
    overflow: hidden;
    background: var(--color-bg-alt);
    border: var(--card-border);
}

figure.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

figure.gallery-item figcaption {
    display: none;
}

/* --- Detail pages -------------------------------------------------------- */

.detail-header {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 2rem;
    padding: 2.5rem 0 1.5rem;
    align-items: start;
}

@media (max-width: 640px) {
    .detail-header {
        grid-template-columns: 1fr;
    }
}

.detail-header__poster {
    border-radius: var(--card-radius);
    overflow: hidden;
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    aspect-ratio: 2 / 3;
    background: var(--color-bg-alt);
}

.detail-header__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-header__meta {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.detail-section {
    margin-bottom: 1.75rem;
}

.detail-section h2 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-accent);
}

.poster-source {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.4rem;
}

/* --- Badges --------------------------------------------------------------- */

.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid currentColor;
}

.badge--won {
    color: var(--color-badge-won);
}

.badge--nominated {
    color: var(--color-badge-nominated);
}

/* --- News list ------------------------------------------------------------ */

.news-item {
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 0;
}

.news-item__date {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-item__source {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* --- Pagination ------------------------------------------------------------ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 0;
}

.pagination a,
.pagination span {
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-text-muted);
}

.pagination a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.pagination .is-current {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* --- Flash messages --------------------------------------------------------- */

.flash {
    max-width: 1100px;
    margin: 1rem auto 0;
    padding: 0 1.25rem;
}

.flash__message {
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--color-border);
}

.flash__message--success {
    border-color: var(--color-badge-won);
    color: var(--color-badge-won);
}

.flash__message--error {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* --- Footer ----------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.site-footer a {
    color: var(--color-text-muted);
}

.site-footer__links {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

/* --- Content blocks (biography/my-story/impressum) --------------------------- */

.prose {
    max-width: 70ch;
}

.prose img {
    border-radius: var(--card-radius);
    margin: 1rem 0;
}

.prose--impressum {
    white-space: pre-line;
}

.prose--full-width {
    max-width: none;
}

.empty-state {
    color: var(--color-text-muted);
    font-style: italic;
    padding: 2rem 0;
}

/* --- Gallery lightbox --------------------------------------------------- */

.gallery-item__link {
    display: block;
    width: 100%;
    height: 100%;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox[hidden] {
    display: none;
}

.lightbox__image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--card-radius);
}

.lightbox__caption {
    color: var(--color-text);
    margin-top: 1rem;
    text-align: center;
}

.lightbox__close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
