/* ========================================
   FONT FACE
   ======================================== */

/* Poppins */
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Bebas Neue */
@font-face {
    font-family: 'Bebas Neue';
    src: url('/assets/fonts/bebas-neue-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   CSS VARIABLES - MOBILE FIRST
   ======================================== */

:root {
    /* Colors */
    --primary-red: #e50914;
    --primary-red-hover: #c40812;
    --dark-bg: #141414;
    --card-bg: #181818;
    --text-primary: #ffffff;
    --text-secondary: #808080;
    --hover-bg: #2a2a2a;

    /* Motion */
    --transition-speed: 0.3s;

    /* Radius */
    --border-radius: 4px;

    /* Layout */
    --navbar-height: 60px;
    --page-side-padding: 1rem;
    --hero-height: 70vh;
    --card-width: 150px;
    --cards-row-gap: 0.5rem;
    --cards-row-padding: 0.5rem 0;
    --content-section-gap: 2rem;

    /* Grid layout */
    --grid-gap-x: 0.75rem;
    --grid-gap-y: 1rem;

    /* Debug logo colors */
    --debug-logo-color: var(--primary-red);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    min-height: 100vh;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    min-height: 100vh;
}

.page-main {
    padding-top: var(--navbar-height);
}

/* ========================================
   AUTH GUARDS
======================================== */

.auth-pending {
    visibility: hidden;
}

.auth-ready {
    visibility: visible;
}

/* ========================================
   GLOBAL SCROLLBAR
   ======================================== */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;

    transition: background-color var(--transition-speed);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ========================================
   UTILITIES
   ======================================== */

.hidden {
    display: none !important;
}

[hidden] {
    display: none !important;
}

/* ========================================
   TABLET - 768px+
   Global variables only
   ======================================== */

@media screen and (min-width: 768px) {
    :root {
        --navbar-height: 64px;
        --page-side-padding: 2rem;
        --hero-height: 75vh;
        --card-width: 170px;
        --cards-row-gap: 0.75rem;
        --cards-row-padding: 0.75rem 0.25rem 0.25rem;
        --content-section-gap: 2.5rem;
        --grid-gap-x: 1rem;
        --grid-gap-y: 1.25rem;

        /* Debug: tablet */
        --debug-logo-color: orange;
    }
}

/* ========================================
   LAPTOP - 1024px+
   Global variables only
   ======================================== */

@media screen and (min-width: 1024px) {
    :root {
        --navbar-height: 70px;
        --page-side-padding: 4%;
        --hero-height: 90vh;
        --card-width: 190px;
        --cards-row-gap: 1rem;
        --cards-row-padding: 0.9rem 0.5rem 0.5rem;
        --content-section-gap: 3rem;
        --grid-gap-x: 1rem;
        --grid-gap-y: 1.5rem;

        /* Debug: laptop */
        --debug-logo-color: dodgerblue;
    }
}

/* ========================================
   DESKTOP - 1440px+
   Global variables only
   ======================================== */

@media screen and (min-width: 1440px) {
    :root {
        --page-side-padding: 4%;
        --hero-height: 90vh;
        --card-width: 220px;
        --cards-row-gap: 1.25rem;
        --content-section-gap: 3.5rem;
        --grid-gap-x: 1.25rem;
        --grid-gap-y: 1.75rem;

        /* Debug: desktop */
        --debug-logo-color: limegreen;
    }
}

/* ========================================
   TV / VERY LARGE - 1920px+
   Global variables only
   ======================================== */

@media screen and (min-width: 1920px) {
    :root {
        --page-side-padding: 6%;
        --navbar-height: 90px;
        --hero-height: 92vh;
        --card-width: 260px;
        --cards-row-gap: 1.5rem;
        --content-section-gap: 4rem;
        --grid-gap-x: 1.5rem;
        --grid-gap-y: 2rem;

        /* Debug TV */
        --debug-logo-color: hotpink;
    }
}

/* ========================================
   SMALL MOBILE - 379px-
   Global variables only
   ======================================== */

@media screen and (max-width: 379px) {
    :root {
        --page-side-padding: 0.75rem;
        --card-width: 130px;
        --grid-gap-x: 0.6rem;
        --grid-gap-y: 0.9rem;

        /* Debug: small mobile */
        --debug-logo-color: yellow;
    }
}

/* ========================================
   ACCESSIBILITY / USER PREFERENCES
   ======================================== */

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

@media (prefers-contrast: high) {
    :root {
        --primary-red: #ff0000;
        --text-secondary: #cccccc;
    }
}

/* ========================================
   PRINT
   ======================================== */

@media print {
    .navbar {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .footer {
        display: none;
    }
}