:root {
    --red: #d51f29;
    --ink: #151515;
    --muted: #676767;
    --line: #dedbd5;
    --paper: #f7f5f1;
    --white: #ffffff;
}

/* =========================================================
   GLOBAL FOUNDATION
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
}

/* =========================================================
   LOGO
   ========================================================= */

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.brand-logo {
    display: block;
    width: 210px;
    height: auto;
    max-height: 64px;
    object-fit: contain;
    object-position: left center;
}

/* =========================================================
   DESKTOP NAVIGATION
   ========================================================= */

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-size: 14px;
    font-weight: 700;
}

.nav > a,
.dropdown-toggle {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nav > a:hover,
.nav > a:focus-visible,
.dropdown-toggle:hover,
.dropdown-toggle:focus-visible,
.nav-dropdown.open .dropdown-toggle {
    color: var(--red);
}

.nav-cta {
    padding: 12px 18px;
    border: 1px solid var(--ink);
}

.nav-cta:hover,
.nav-cta:focus-visible {
    color: var(--white) !important;
    background: var(--red);
    border-color: var(--red);
}

/* =========================================================
   WEBSITES DROPDOWN
   ========================================================= */

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.dropdown-arrow {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.2s ease;
}

.nav-dropdown.open .dropdown-arrow,
.nav-dropdown:focus-within .dropdown-arrow {
    transform: translateY(2px) rotate(225deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 20;
    display: grid;
    width: min(390px, calc(100vw - 32px));
    padding: 10px;
    visibility: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 20px 45px rgba(21, 21, 21, 0.14);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.dropdown-menu::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 15px;
    content: "";
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    display: grid;
    gap: 4px;
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
}

.dropdown-menu a:last-child {
    border-bottom: 0;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible {
    color: var(--ink);
    background: var(--paper);
}

.dropdown-menu strong {
    color: var(--ink);
    font-size: 14px;
}

.dropdown-menu a:hover strong,
.dropdown-menu a:focus-visible strong {
    color: var(--red);
}

.dropdown-menu span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.menu-button {
    display: none;
    padding: 9px 12px;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--ink);
    border-radius: 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.menu-button:hover,
.menu-button:focus-visible {
    color: var(--white);
    background: var(--red);
    border-color: var(--red);
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.brand:focus-visible,
.nav a:focus-visible,
.dropdown-toggle:focus-visible,
.menu-button:focus-visible {
    outline: 3px solid rgba(213, 31, 41, 0.25);
    outline-offset: 4px;
}

/* =========================================================
   TABLET AND MOBILE
   ========================================================= */

@media (max-width: 800px) {
    .shell {
        width: min(100% - 32px, 1180px);
    }

    .nav-wrap {
        min-height: 72px;
    }

    .brand-logo {
        width: 175px;
        max-height: 54px;
    }

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav {
        position: absolute;
        top: 72px;
        right: -16px;
        left: -16px;
        display: none;
        align-items: stretch;
        gap: 0;
        padding: 18px 24px 24px;
        background: var(--white);
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 35px rgba(21, 21, 21, 0.1);
    }

    .nav.open {
        display: flex;
        flex-direction: column;
    }

    .nav > a,
    .dropdown-toggle {
        display: flex;
        width: 100%;
        min-height: 50px;
        align-items: center;
        justify-content: space-between;
        padding: 15px 0;
        border-bottom: 1px solid var(--line);
        text-align: left;
    }

    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        padding: 6px 0 10px 14px;
        visibility: visible;
        border: 0;
        border-bottom: 1px solid var(--line);
        box-shadow: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        transition: none;
    }

    .dropdown-menu::before {
        display: none;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown:focus-within .dropdown-menu {
        display: none;
    }

    .nav-dropdown.open .dropdown-menu {
        display: grid;
    }

    .dropdown-menu a {
        padding: 14px 12px;
    }

    .nav .nav-cta {
        justify-content: center;
        margin-top: 16px;
        padding: 14px 18px;
        text-align: center;
        border: 1px solid var(--ink);
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 430px) {
    .brand-logo {
        width: 150px;
        max-height: 48px;
    }

    .menu-button {
        padding: 8px 10px;
        font-size: 12px;
    }
}
