/* =====================================================================
   MovieDB.wiki — base.css
   Reset + design tokens (IMDB-inspired black / yellow / grey palette).
   Loaded before app.css on every page.
   ===================================================================== */

/* ---- Self-hosted font (bundled, no runtime CDN) ---- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/inter-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/inter-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/inter-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/inter-700.woff2') format('woff2');
}

/* ---- Design tokens (IMDB palette, user-friendly larger text) ---- */
:root {
    /* Brand */
    --yellow: #F5C518;
    --yellow-hover: #FFD633;
    --yellow-dark: #C9A20E;

    /* Surfaces (black + grey) */
    --bg: #000000;
    --surface: #121212;
    --surface-2: #1C1C1C;
    --surface-3: #2A2A2A;
    --divider: #1F1F1F;
    --border: #2E2E2E;

    /* Text */
    --text: #FFFFFF;
    --text-muted: #B3B3B3;
    --text-faint: #7A7A7A;
    --text-inverse: #000000;

    /* Semantic */
    --success: #46D369;
    --error: #E50914;
    --info: #2E9FFF;

    /* Type scale — deliberately large & readable (user-friendly) */
    --text-xs: clamp(0.8125rem, 0.8rem + 0.1vw, 0.875rem);   /* 13px floor */
    --text-sm: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);  /* 15px floor */
    --text-base: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); /* 17px floor */
    --text-lg: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);    /* 20px */
    --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.125rem);    /* 24px */
    --text-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);           /* 32px */

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 0.875rem;
    --radius-xl: 1.25rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.5);
    --shadow-md: 0 4px 14px rgba(0,0,0,.55);
    --shadow-lg: 0 12px 36px rgba(0,0,0,.65);

    /* Layout */
    --header-h: 68px;
    --content-max: 1400px;
    --transition: 180ms cubic-bezier(0.16,1,0.3,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}
body {
    min-height: 100dvh;
    line-height: 1.6;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--text-base);
    color: var(--text);
    background-color: var(--bg);
    overflow-x: hidden;
}
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role='list'], ol[role='list'] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
/* Fieldsets: strip the default inset/outset browser border. */
fieldset { border: 0; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.2; font-weight: 700; }
p, li, figcaption { text-wrap: pretty; }
::selection { background: var(--yellow); color: var(--text-inverse); }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: var(--radius-sm); }
button { cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--yellow); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 1000;
    background: var(--yellow); color: var(--text-inverse);
    padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
    font-weight: 600;
}
.skip-link:focus { left: var(--space-3); top: var(--space-3); }

/* ---------- Announcement banner ---------- */
.announcement-bar {
    display: flex; align-items: center; gap: var(--space-3);
    background: var(--yellow); color: #000;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm); font-weight: 500;
    text-align: center;
}
.announcement-bar[hidden] { display: none; }
.announcement-text { flex: 1; margin: 0; }
.announcement-close {
    flex-shrink: 0; font-size: 1.5rem; font-weight: 700; line-height: 1;
    color: #000; padding: 0 var(--space-1); min-height: 36px; min-width: 36px;
    border-radius: var(--radius-sm);
}
.announcement-close:hover { background: rgba(0,0,0,.15); }

/* ---------- Ad container ---------- */
.mdb-ad-container {
    max-width: var(--container); margin: 0 auto;
    padding: var(--space-4); text-align: center;
}
