/* nav: owned by one redesign agent (18 Nov 2026) */
/* Header nav, grouped. Top items: Curtains, Blinds, Shutters, Gallery, For designers, About. Markup from scripts/build.mjs, behaviour in assets/js/core.js. */

/* ---------- desktop ---------- */
@media (min-width: 1000px) {
  .hdr .logo { margin-right: 0; flex: 0 0 auto; }
  .nav { position: static; transform: none; display: flex; align-items: center; gap: 2px; margin-left: clamp(16px, 2.4vw, 40px); }
  .hdr-r { margin-left: auto; gap: 10px; }
  .nav-t { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 999px; font: 500 15px/1 var(--sans); white-space: nowrap; color: var(--walnut); text-decoration: none; cursor: pointer; transition: color .2s var(--ease), background-color .2s var(--ease); }
  .nav-t:hover, .nav-g.open > .nav-t { color: var(--accent); }
  .nav-t[aria-current], .nav-g.cur > .nav-t { color: var(--accent); }
  .nav-t i { width: 7px; height: 7px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: .6; transition: transform .3s var(--ease), margin .3s var(--ease); }
  .nav-g.open > .nav-t i { transform: rotate(225deg); margin-top: 3px; }

  .nav-g { position: relative; }
  /* padding-top bridges the gap between the button and the panel, so the pointer can travel down without closing it */
  .nav-d { position: absolute; top: 100%; left: -18px; padding-top: 12px; visibility: hidden; opacity: 0; transform: translateY(6px); transition: opacity .22s var(--ease), transform .3s var(--ease), visibility 0s linear .3s; z-index: 70; }
  .nav-g.open > .nav-d { visibility: visible; opacity: 1; transform: none; transition: opacity .22s var(--ease), transform .3s var(--ease), visibility 0s; }
  .nav-g:nth-last-child(-n+2) > .nav-d { left: auto; right: -18px; }
  .nav-d-in { display: grid; grid-template-columns: 330px 168px; gap: 14px; padding: 14px; background: #F8F5EF; border: 1px solid var(--hair); border-radius: 20px; box-shadow: 0 24px 48px -28px rgba(42, 35, 32, .35); }
  .nav-d ul { list-style: none; margin: 0; padding: 4px 0; display: grid; align-content: start; gap: 2px; }
  .nav-d li a { display: grid; gap: 4px; padding: 12px 14px; border-radius: 12px; color: var(--walnut); text-decoration: none; transition: background-color .2s var(--ease); }
  .nav-d li a:hover, .nav-d li a:focus-visible { background: var(--linen); }
  .nav-d li a:focus-visible { outline-offset: 0; }
  .nav-d b { font: 400 22px/1.1 var(--display); letter-spacing: -.01em; }
  .nav-d span { font-size: 13.5px; line-height: 1.35; text-wrap: pretty; color: var(--walnut-soft); }
  .nav-d a[aria-current] b { color: var(--accent); }
  .nav-d figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--linen); min-height: 200px; }
  .nav-d figure img { width: 100%; height: 100%; object-fit: cover; }

  .hdr-r .btn-s { padding: 0 20px; }
  .hdr-contact[aria-current] { color: var(--accent); border-color: var(--accent); }
}
/* Not enough room for both buttons beside the nav: Contact stays in the About group */
@media (min-width: 1000px) and (max-width: 1199px) { .hdr-r .hdr-contact { display: none; } .nav { margin-left: 8px; } .nav-t { padding: 0 9px; font-size: 14.5px; } .hdr-r .btn-s { padding: 0 16px; white-space: nowrap; letter-spacing: .1em; } }

@media (prefers-reduced-motion: reduce) { .nav-d, .nav-g.open > .nav-d, .nav-t i { transition: none; transform: none; } .nav-g.open > .nav-t i { transform: rotate(225deg); } }

/* ---------- phone menu ---------- */
.mm-nav { display: block; }
.mm-nav > .mm-t, .mm-g > .mm-t { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 60px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--hair); background: none; color: var(--walnut); font: 400 clamp(28px, 8vw, 36px)/1.1 var(--display); letter-spacing: -.01em; text-align: left; text-decoration: none; cursor: pointer; }
.mm-t[aria-current] { color: var(--accent); }
.mm-t i { position: relative; width: 14px; height: 14px; margin-right: 4px; flex: 0 0 auto; opacity: .55; }
.mm-t i::before, .mm-t i::after { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 1.5px; background: currentColor; transition: transform .3s var(--ease); }
.mm-t i::after { transform: rotate(90deg); }
.mm-t[aria-expanded=true] i::after { transform: rotate(0); }
.mm-p { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .35s var(--ease), visibility 0s linear .35s; }
.mm-t[aria-expanded=true] + .mm-p { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .35s var(--ease), visibility 0s; }
.mm-p > div { overflow: hidden; min-height: 0; }
/* While the menu is closed, the group that starts open (the current page's) must not stay visible inside the hidden
   overlay: its links were invisible but still caught touches across the top of the screen, so a downward swipe there
   scrolled the empty menu instead of the page (19 Nov 2026). Inherit keeps them showing during the close fade. */
body:not(.menu-open) .mm .mm-p { visibility: inherit; }
.mm-p > div > a:first-child { margin-top: 8px; }
.mm-p > div > a:last-child { margin-bottom: 12px; }
.mm .mm-p a { display: flex; align-items: center; min-height: 46px; padding: 0 0 0 2px; font-size: 18px; color: var(--walnut-soft); text-decoration: none; }
.mm .mm-p a[aria-current] { color: var(--accent); }
.mm .pin { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.mm .pin .mm-book { grid-column: 1 / -1; }
.mm .pin .btn-o { min-height: 48px; }
.mm .pin .mm-call { justify-self: start; }
@media (prefers-reduced-motion: reduce) { .mm-p, .mm-t[aria-expanded=true] + .mm-p, .mm-t i::before, .mm-t i::after { transition: none; } }

/* Phone and email in the header (18 Nov 2026): two small lines beside the buttons on desktop.
   Phones keep the Call link in the bar; the email sits in the open menu. */
.hdr-tel { display: none; }
@media (min-width: 1000px) {
  .hdr-tel { display: grid; justify-items: end; gap: 1px; margin-right: 6px; font: 500 13px/1.25 var(--sans); white-space: nowrap; }
  .hdr-tel a { display: inline-flex; align-items: center; min-height: 22px; color: var(--walnut); text-decoration: none; }
  .hdr-tel a + a { color: var(--walnut-soft); font-weight: 400; font-size: 12.5px; }
  .hdr-tel a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
}
.mm .pin .mm-mail { grid-column: 1 / -1; font-size: 16px; min-height: 44px; padding: 0; color: var(--walnut-soft); }
.mm .pin .mm-mail { order: 1; } .mm .pin .mm-book { order: 2; }
/* Room for the phone and email: Contact steps out below 1280px (it is in the About group and the email is right there),
   and the nav tightens a little between 1000 and 1359px so nothing wraps. */
@media (min-width: 1000px) { .hdr-r .btn-s { white-space: nowrap; } }
@media (min-width: 1000px) and (max-width: 1279px) { .hdr-r .hdr-contact { display: none; } }
@media (min-width: 1000px) and (max-width: 1199px) {
  .hdr-in { gap: 14px; } .nav { margin-left: 2px; } .nav-t { padding: 0 6px; font-size: 14px; }
  .hdr-r { gap: 8px; } .hdr-r .btn-s { padding: 0 13px; letter-spacing: .07em; font-size: 12px; }
  .hdr-tel { margin-right: 2px; font-size: 12.5px; } .hdr-tel a + a { font-size: 12px; }
}
@media (min-width: 1200px) and (max-width: 1359px) { .hdr-in { gap: 16px; } .nav { margin-left: 10px; } .nav-t { padding: 0 9px; } .hdr-r .btn-s { padding: 0 16px; } }
@media (min-width: 1000px) and (max-width: 1099px) { .hdr .logo { width: 128px; } .nav-t { padding: 0 5px; font-size: 13.5px; } .hdr-r .btn-s { padding: 0 12px; letter-spacing: .05em; } }
@media (min-width: 1280px) and (max-width: 1359px) { .nav { margin-left: 4px; } }
