/* =========================================================
   RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100dvh;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 16px;
    line-height: 1.5;

    background: #fff;
    color: #111;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
textarea,
select {
    margin: 0;
}


/* =========================================================
   VARIABLES
   ========================================================= */

:root {

    /* Container */
    --container-width: 1400px;
    --container-padding: 20px;

    /* Spacing */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-9: 48px;

    /* Typography */
    --fs-sm: clamp(14px, 0.8vw, 16px);
    --fs-md: clamp(15px, 0.9vw, 18px);
    --fs-lg: clamp(18px, 1.2vw, 22px);

    /* Header */
    --header-height: 72px;

    /* Footer */
    --footer-padding: clamp(24px, 4vw, 48px);

    /* Colors */
    --color-bg: #fff;
    --color-text: #111;
    --color-muted: #666;
    --color-border: #e5e5e5;
    --color-primary: #e50914;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}


/* =========================================================
   PAGE
   ========================================================= */

.site {
    min-height: 100dvh;

    display: grid;
    grid-template-rows: auto 1fr auto;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: min(
        100% - (var(--container-padding) * 2),
        var(--container-width)
    );

    margin-inline: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.header {
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.header__inner {
    min-height: var(--header-height);

    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 48px);
}


/* =========================================================
   LOGO
   ========================================================= */

.logo {
    flex: 0 0 auto;

    font-size: clamp(20px, 1.5vw, 26px);
    font-weight: 800;
    line-height: 1;

    color: var(--color-primary);
}


/* =========================================================
   NAV
   ========================================================= */

.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: clamp(12px, 2vw, 28px);

    margin-inline: auto;
}

.nav a {
    padding-block: 8px;

    font-size: var(--fs-sm);
    font-weight: 500;

    color: var(--color-text);

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.nav a:hover {
    color: var(--color-primary);
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.header__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    flex: 0 0 auto;
}

.header__button {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);

    padding:
        8px
        14px;

    background: transparent;
    color: var(--color-text);

    font-size: var(--fs-sm);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.header__button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}


/* =========================================================
   MAIN
   ========================================================= */

main {
    padding-block: clamp(24px, 4vw, 60px);
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    border-top: 1px solid var(--color-border);

    padding-block: var(--footer-padding);

    background: var(--color-bg);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}

.footer__copyright {
    color: var(--color-muted);
    font-size: var(--fs-sm);
}

.footer__nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: clamp(12px, 2vw, 24px);
}

.footer__nav a {
    color: var(--color-muted);
    font-size: var(--fs-sm);

    transition: color 0.2s ease;
}

.footer__nav a:hover {
    color: var(--color-text);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (width < 700px) {

    :root {
        --container-padding: 16px;
        --header-height: 64px;
    }

    .header__inner {
        flex-wrap: wrap;

        padding-block: 12px;
    }

    .nav {
        order: 3;

        width: 100%;

        margin-inline: 0;

        overflow-x: auto;
        flex-wrap: nowrap;

        scrollbar-width: none;
    }

    .nav::-webkit-scrollbar {
        display: none;
    }

    .nav a {
        flex: 0 0 auto;
    }

    .footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}