/* ==========================================================================
   ANAZ — Site header & navigation drawer
   Requires css/base.css (tokens).

   Stacking (inside .site-header, which is its own stacking context, z 100):
     z 0  ::before  navy geometric block (upper-right)
     z 0  ::after   thin orange parallel accent
     z 1  .site-header__inner (logo, nav, CTA, burger) — always clickable
   The drawer (.nav-drawer) sits above everything at z 200.
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    isolation: isolate;
    height: var(--anaz-header-h);
    background: var(--anaz-white);
    transition: box-shadow 0.35s ease, background-color 0.35s ease;
}

/* Navy block entering from the upper-right edge (diagonal left side) */
.site-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    width: var(--anaz-shape-w);
    background: linear-gradient(135deg, var(--anaz-navy) 0%, var(--anaz-navy-dark) 100%);
    clip-path: polygon(var(--anaz-shape-slant) 0, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}

/* Thin orange parallelogram that runs parallel to the navy block's edge */
.site-header::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: calc(var(--anaz-shape-w) - var(--anaz-shape-slant) + 8px);
    z-index: 0;
    width: calc(var(--anaz-shape-slant) + 7px);
    background: var(--anaz-orange);
    clip-path: polygon(var(--anaz-shape-slant) 0, 100% 0, calc(100% - var(--anaz-shape-slant)) 100%, 0 100%);
    pointer-events: none;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 6px 24px rgba(11, 45, 73, 0.10);
}

@supports (backdrop-filter: blur(8px)) {
    .site-header.is-scrolled {
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(10px);
    }
}

.site-header__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.4vw, 40px);
    height: 100%;
    max-width: calc(var(--anaz-container) + 2 * var(--anaz-gutter));
    margin: 0 auto;
    padding: 0 var(--anaz-gutter);
}

/* ---- Brand ------------------------------------------------------------ */

.site-header__brand {
    flex: 0 0 auto;
    display: block;
    border-radius: 6px;
}

.site-header__logo {
    width: 240px;
    height: auto;
}

/* ---- Primary navigation ----------------------------------------------- */

.site-header__nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.site-header__menu {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.3vw, 38px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 2px;
    color: var(--anaz-navy);
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: color 0.25s ease;
}

.site-header__link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 3px;
    background: var(--anaz-orange);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.35s var(--anaz-ease);
}

.site-header__link:hover {
    color: var(--anaz-orange-dark);
}

.site-header__link:hover::after,
.site-header__link[aria-current="page"]::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Active item: underline + heavier weight (not colour alone) */
.site-header__link[aria-current="page"] {
    font-weight: 800;
}

/* ---- Actions: CTA + burger -------------------------------------------- */

.site-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.site-header__cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    height: 54px;
    padding: 0 7px 0 24px;
    border-radius: var(--anaz-radius-button);
    background: var(--anaz-navy);
    color: var(--anaz-white);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: var(--anaz-shadow-soft);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header__cta-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--anaz-orange);
    color: var(--anaz-white);
    transition: transform 0.35s var(--anaz-ease), background-color 0.3s ease;
}

.site-header__cta:hover {
    background: var(--anaz-navy-dark);
    box-shadow: 0 14px 30px rgba(11, 45, 73, 0.22);
}

.site-header__cta:hover .site-header__cta-icon {
    transform: translateX(4px);
    background: var(--anaz-orange-light);
}

/* Burger sits inside the navy block — gap clears the slanted edge + orange accent */
.site-header__burger {
    display: grid;
    place-items: center;
    width: var(--anaz-shape-burger);
    height: var(--anaz-shape-burger);
    margin-left: calc(var(--anaz-shape-slant) + 48px);
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--anaz-white);
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.site-header__burger:hover {
    background: rgba(255, 255, 255, 0.08);
}

.site-header__burger-lines {
    display: grid;
    justify-items: end;
    gap: 7px;
    width: 28px;
}

.site-header__burger-lines span {
    display: block;
    width: 100%;
    height: 2.5px;
    border-radius: 2px;
    background: currentColor;
    transition: width 0.35s var(--anaz-ease), background-color 0.25s ease;
}

.site-header__burger-lines span:nth-child(2) {
    width: 66%;
    background: var(--anaz-orange);
}

.site-header__burger-lines span:nth-child(3) {
    width: 82%;
}

.site-header__burger:hover .site-header__burger-lines span,
.site-header__burger[aria-expanded="true"] .site-header__burger-lines span {
    width: 100%;
}

/* ---- Focus states ------------------------------------------------------ */

.site-header a:focus-visible,
.site-header button:focus-visible {
    outline: none;
    box-shadow: var(--anaz-focus);
}

.site-header__link:focus-visible {
    border-radius: 4px;
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 1279px) {
    .site-header__logo {
        width: 210px;
    }

    .site-header__link {
        font-size: 15px;
    }
}

/* iPad landscape and below: the drawer takes over navigation */
@media (max-width: 1079px) {
    .site-header__nav {
        display: none;
    }

    .site-header__logo {
        width: 196px;
    }

    .site-header__burger {
        margin-left: calc(var(--anaz-shape-slant) + 40px);
    }
}

@media (max-width: 767px) {
    .site-header__logo {
        width: 158px;
    }

    .site-header__cta {
        height: 46px;
        padding-left: 18px;
        gap: 10px;
        border-radius: 14px;
        font-size: 14px;
    }

    .site-header__cta-icon {
        width: 34px;
        height: 34px;
    }

    .site-header__burger {
        margin-left: calc(var(--anaz-shape-slant) + 30px);
    }

    .site-header__burger-lines {
        width: 24px;
        gap: 6px;
    }
}

/* Small phones: CTA moves into the drawer */
@media (max-width: 599px) {
    .site-header__cta {
        display: none;
    }
}

@media (max-width: 359px) {
    .site-header__logo {
        width: 138px;
    }
}

/* ==========================================================================
   Navigation drawer
   Default (no class) = final "open" look; GSAP animates from off-canvas.
   .nav-drawer--css = CSS-transition fallback used when GSAP is unavailable.
   ========================================================================== */

.nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
}

.nav-drawer[hidden] {
    display: none;
}

.nav-drawer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 31, 54, 0.62);
    cursor: pointer;
}

@supports (backdrop-filter: blur(4px)) {
    .nav-drawer__overlay {
        backdrop-filter: blur(3px);
    }
}

.nav-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(480px, 100%);
    padding: 24px clamp(24px, 4vw, 44px) 32px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background:
        radial-gradient(120% 60% at 100% 100%, rgba(255, 101, 0, 0.10) 0%, rgba(255, 101, 0, 0) 60%),
        linear-gradient(160deg, var(--anaz-navy) 0%, var(--anaz-navy-dark) 100%);
    color: var(--anaz-white);
    box-shadow: -24px 0 60px rgba(6, 31, 54, 0.35);
}

/* Angular accents inside the panel (decorative, non-interactive) */
.nav-drawer__panel::before,
.nav-drawer__panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.nav-drawer__panel::before {
    top: 0;
    left: 0;
    width: 6px;
    height: 34%;
    background: var(--anaz-orange);
    clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.nav-drawer__panel::after {
    right: -60px;
    bottom: -40px;
    width: 260px;
    height: 220px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
    clip-path: polygon(40% 0, 100% 0, 60% 100%, 0 100%);
}

.nav-drawer__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-drawer__brand {
    display: block;
    border-radius: 6px;
}

.nav-drawer__brand img {
    width: 176px;
    height: auto;
}

.nav-drawer__close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: transparent;
    color: var(--anaz-white);
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.35s var(--anaz-ease);
}

.nav-drawer__close:hover {
    background: var(--anaz-orange);
    border-color: var(--anaz-orange);
    transform: rotate(90deg);
}

.nav-drawer__nav {
    position: relative;
    z-index: 1;
    padding: clamp(18px, 4vh, 40px) 0;
}

.nav-drawer__menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-drawer__link {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: clamp(8px, 1.4vh, 12px) 0;
    color: var(--anaz-white);
    font-size: clamp(24px, 3.4vh, 32px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: color 0.25s ease, transform 0.35s var(--anaz-ease);
}

.nav-drawer__num {
    min-width: 22px;
    color: var(--anaz-orange);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.nav-drawer__link:hover {
    color: var(--anaz-orange-light);
    transform: translateX(6px);
}

.nav-drawer__link[aria-current="page"] {
    color: var(--anaz-orange-light);
}

.nav-drawer__link[aria-current="page"]::after {
    content: "";
    align-self: center;
    width: 28px;
    height: 2px;
    background: currentColor;
}

.nav-drawer__footer {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 22px;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-drawer__statement {
    max-width: 34ch;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 15px;
    line-height: 1.6;
}

.nav-drawer__cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    justify-self: start;
    height: 54px;
    padding: 0 7px 0 24px;
    border-radius: var(--anaz-radius-button);
    background: var(--anaz-orange);
    color: var(--anaz-white);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--anaz-shadow-orange);
    transition: background-color 0.3s ease;
}

.nav-drawer__cta-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--anaz-white);
    color: var(--anaz-orange);
    transition: transform 0.35s var(--anaz-ease);
}

.nav-drawer__cta:hover {
    background: var(--anaz-orange-dark);
}

.nav-drawer__cta:hover .nav-drawer__cta-icon {
    transform: translateX(4px);
}

.nav-drawer__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.nav-drawer__contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--anaz-white);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease;
}

.nav-drawer__contact svg {
    color: var(--anaz-orange);
}

.nav-drawer__contact:hover {
    color: var(--anaz-orange-light);
}

.nav-drawer__social {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-drawer__social a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--anaz-white);
    transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-drawer__social a:hover {
    background: var(--anaz-orange);
    border-color: var(--anaz-orange);
}

.nav-drawer a:focus-visible,
.nav-drawer button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--anaz-navy), 0 0 0 4px var(--anaz-orange-light);
}

.nav-drawer__link:focus-visible {
    border-radius: 4px;
}

/* CSS-only fallback transitions (GSAP unavailable) */
.nav-drawer--css .nav-drawer__overlay {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-drawer--css .nav-drawer__panel {
    transform: translateX(100%);
    transition: transform 0.5s var(--anaz-ease);
}

.nav-drawer--css.is-visible .nav-drawer__overlay {
    opacity: 1;
}

.nav-drawer--css.is-visible .nav-drawer__panel {
    transform: none;
}

/* Tablet & mobile: nearly full-width drawer */
@media (max-width: 1079px) {
    .nav-drawer__panel {
        width: min(88vw, 620px);
    }
}

@media (max-width: 599px) {
    .nav-drawer__panel {
        width: 92vw;
        padding-top: 14px;
    }

    .nav-drawer__brand img {
        width: 148px;
    }

    .nav-drawer__top {
        padding-bottom: 14px;
    }
}

@media (max-width: 359px) {
    .nav-drawer__panel {
        width: 100vw;
    }
}

/* Scroll lock while the drawer is open (class set by js/header.js) */
html.anaz-scroll-lock,
html.anaz-scroll-lock body {
    overflow: hidden;
}
