/* Villa Hadas header — light cream background, deep-navy typography.
   Differs from `.site-nav` in colour language and brand mark, but mirrors
   its structural role (start / centre / end + slide-in drawer). */

:root {
    --villa-navy: #1B335A;
    --villa-navy-dark: #142549;
    --villa-cream: #EFEBE1;
    --villa-cream-warm: #F5F1E6;
}

.villa-nav {
    /* Same ruler the Studio header uses (see site-nav.css) so both sides
       share exactly one hamburger + language pill geometry. */
    --nav-pad: clamp(14px, 1.76vw, 26px);      /* 18px @1024 */
    --nav-ham-w: clamp(18px, 2.25vw, 32px);    /* 23px @1024 */
    --nav-ham-bar: clamp(3px, 0.39vw, 5px);    /*  4px @1024 */
    --nav-ham-gap: clamp(4px, 0.54vw, 8px);    /*  5.5px @1024 */

    position: fixed;
    inset-block-start: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    min-height: var(--site-nav-size, 92px);
    padding-block: 0;
    color: var(--villa-navy);
    background: transparent;
    border-block-end: 1px solid transparent;
}

/* No plate behind the header even while the drawer is open — the design
   shows the photo through the gaps at every state. */
.villa-nav.is-open {
    background: transparent;
    color: var(--villa-navy);
    border-block-end-color: transparent;
}

/* Over photos and dark sections the header turns ivory (tone-watch.js). */
.villa-nav[data-bg="media"]:not(.is-open),
.villa-nav[data-bg="dark"]:not(.is-open) {
    color: var(--villa-cream, #EFEBE1);
    text-shadow: 0 1px 10px rgba(20, 33, 60, 0.45);
}

/* — Brand: the Villa Hadas wordmark, centred like the studio mark. Drawn
   as a mask so it takes the header's ink. — */

.villa-nav__brand {
    position: absolute;
    left: 50%;
    top: var(--nav-pad);
    transform: translateX(-50%);
    display: block;
    color: currentColor;
}

.villa-nav__brand-mark {
    display: block;
    width: clamp(150px, 15.6vw, 230px);
    aspect-ratio: 720 / 157;
    background: currentColor;
    -webkit-mask: url('/static/site/brand/villa-hadas-wordmark.png') center / contain no-repeat;
    mask: url('/static/site/brand/villa-hadas-wordmark.png') center / contain no-repeat;
    transition: background var(--dur-fast) var(--ease-out);
}

.villa-nav__brand:hover { opacity: 0.8; }

@media (max-width: 720px) {
    .villa-nav__brand-mark { width: 120px; }
}

/* — Lead cluster (hamburger + optional cart) — physical left, aligned on
   the same baseline as the language switcher on the right. */

.villa-nav__lead {
    position: absolute;
    left: var(--nav-pad);
    top: var(--nav-pad);
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
}

.villa-nav__hamburger {
    display: inline-flex;
    flex-direction: column;
    gap: var(--nav-ham-gap);
    width: var(--nav-ham-w);
    padding: 0;
    background: transparent;
    border: 0;
    color: currentColor;
    align-items: stretch;
    justify-content: center;
    filter: drop-shadow(0 1px 6px rgba(255, 255, 255, 0.35));
}

.villa-nav__hamburger span {
    display: block;
    height: var(--nav-ham-bar);
    background: currentColor;
    transition: transform var(--dur-base) var(--ease-out),
                opacity var(--dur-fast) var(--ease-out);
}

.villa-nav.is-open .villa-nav__hamburger span:nth-child(1) {
    transform: translateY(calc(var(--nav-ham-bar) + var(--nav-ham-gap))) rotate(45deg);
}
.villa-nav.is-open .villa-nav__hamburger span:nth-child(2) { opacity: 0; }
.villa-nav.is-open .villa-nav__hamburger span:nth-child(3) {
    transform: translateY(calc(-1 * (var(--nav-ham-bar) + var(--nav-ham-gap)))) rotate(-45deg);
}

/* — Cart basket — */

.villa-nav__cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: currentColor;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity var(--dur-fast) var(--ease-out);
}

.villa-nav__cart:hover,
.villa-nav__cart.has-items {
    opacity: 1;
}

.villa-nav__cart-icon {
    width: 26px;
    height: 26px;
}

.villa-nav__cart-badge {
    position: absolute;
    inset-block-start: 2px;
    inset-inline-end: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--villa-navy);
    color: var(--villa-cream);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* — Brand mark (Villa Hadas wordmark) — */

.villa-nav__brand {
    justify-self: center;
    display: inline-flex;
    align-items: baseline;
    gap: 12px;
    color: currentColor;
    text-decoration: none;
    line-height: 1;
    padding-block: 4px;
}

.villa-nav__brand:hover,
.villa-nav__brand:focus-visible {
    color: currentColor;
}

.villa-nav__brand-serif {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: 0.22em;
    font-size: clamp(20px, 2.4vw, 30px);
}

.villa-nav__brand-script {
    font-family: var(--font-script);
    font-size: clamp(28px, 3.2vw, 40px);
    line-height: 1;
    transform: translateY(4px);
    color: var(--villa-navy);
}

/* — Language pill — physical right, matches studio proportions. */

.villa-nav__langs {
    position: absolute;
    right: clamp(18px, 2.34vw, 34px);       /* 24px @1024 */
    top: var(--nav-pad);
    display: inline-flex;
    direction: ltr;
    gap: clamp(9px, 1.27vw, 17px);          /* 13px @1024 */
    align-items: baseline;
}

.villa-nav__lang-form { margin: 0; }

.villa-nav__lang {
    background: transparent;
    color: currentColor;
    border: 0;
    padding: 0;
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(10px, 1.07vw, 15px);   /* 11px @1024 */
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
    transition: opacity var(--dur-fast) var(--ease-out);
}

.villa-nav__lang:hover,
.villa-nav__lang.is-active { opacity: 1; }

/* — Drawer overlay —
   Same visual language as the Studio site: full-screen translucent cream
   bands that let the hero photo show through the gaps, plus a footer strip
   with the villa-only actions (back to Studio, newsletter, client area). */

.villa-nav__drawer {
    position: fixed;
    inset: 0;
    background: transparent;
    color: var(--villa-navy);
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    z-index: calc(var(--z-header) - 1);
    animation: villa-nav-fade-in var(--dur-slow) var(--ease-out);
}

.villa-nav__drawer[hidden] { display: none; }

/* Menu takes the full width; each <li> is a translucent cream band. */
.villa-nav__menu {
    width: 100%;
    max-width: 100%;
}

.villa-nav__menu ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.villa-nav__menu li {
    background: rgba(245, 241, 230, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-block-end: 1px solid rgba(27, 51, 90, 0.14);
}

.villa-nav__menu li:first-child {
    border-block-start: 1px solid rgba(27, 51, 90, 0.14);
}

.villa-nav__link {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    color: var(--villa-navy);
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(28px, 4.4vw, 48px);
    line-height: 1.15;
    letter-spacing: 0.005em;
    text-decoration: none;
    padding: clamp(10px, 1.4vw, 18px) clamp(var(--space-6), 6vw, var(--space-8));
    transition: background var(--dur-fast) var(--ease-out);
    opacity: 1;
}

.villa-nav__link:hover,
.villa-nav__link.is-current {
    background: rgba(245, 241, 230, 0.96);
    transform: none;
}

.villa-nav__bullet {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.85;
    flex-shrink: 0;
    align-self: center;
}

/* Villa-only drawer footer: sits inside one more translucent band pinned
   below the menu. */
.villa-nav__drawer-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    flex-wrap: wrap;
    flex-direction: row-reverse;
    padding: clamp(var(--space-3), 1.6vw, var(--space-5))
             clamp(var(--space-6), 6vw, var(--space-8));
    background: rgba(245, 241, 230, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-block-start: 1px solid rgba(27, 51, 90, 0.14);
}

.villa-nav__drawer-side {
    display: flex;
    align-items: center;
    gap: clamp(var(--space-4), 3vw, var(--space-6));
    flex-wrap: wrap;
}

.villa-nav__drawer-action {
    border: none;
    background: none;
    padding: 0;
    color: currentColor;
    font: inherit;
    font-size: 13px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity var(--dur-fast) var(--ease-out);
}

.villa-nav__drawer-action:hover { opacity: 1; }

@keyframes villa-nav-fade-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 720px) {
    .villa-nav__brand-serif { font-size: 18px; letter-spacing: 0.20em; }
    .villa-nav__brand-script { font-size: 24px; }
}
