/* HEADER + MAIN MENU */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--cream);
               border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 18px rgba(80,55,34,.06); }
.h-inner { width: min(1280px, 100% - 48px); margin-inline: auto; height: var(--header-h);
           display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.h-logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.h-name { font: 400 22px/1.1 var(--font-title); color: var(--brown); }
.h-tag  { font: 400 13px/1.2 var(--font-title); color: var(--brown-soft); margin-top: 3px; }

.h-nav ul { list-style: none; margin: 0; padding: 0; }
.h-nav > ul { display: flex; align-items: center; gap: 6px; }
.h-nav li { position: relative; }
.h-nav > ul > li > a { display: block; padding: 10px 14px; font-size: 15px; color: var(--brown); text-decoration: none; border-radius: 30px; }
.h-nav > ul > li > a:hover,
.h-nav > ul > li.active > a { background: var(--sand); }
.h-nav li.has-sub { display: flex; align-items: center; }
.h-nav li.has-sub > a { padding-right: 4px; }
.h-subtoggle { background: none; border: 0; padding: 6px 8px 6px 2px; color: var(--brown); cursor: pointer; display: grid; place-items: center; }

/* drop-down (desktop) */
.h-sub { position: absolute; top: 100%; left: 0; min-width: 220px; padding: 8px !important; margin-top: 6px !important;
         background: var(--cream); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px rgba(80,55,34,.12);
         opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s; }
.h-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* hover bridge */
.h-sub a { display: block; padding: 9px 12px; border-radius: 9px; font-size: 14.5px; text-decoration: none; color: var(--brown); white-space: nowrap; }
.h-sub a:hover, .h-sub a[aria-current] { background: var(--sand); }
@media (min-width: 861px) {
  .has-sub:hover > .h-sub, .has-sub:focus-within > .h-sub, .has-sub.open > .h-sub { opacity: 1; visibility: visible; transform: none; }
}

/* burger (mobile) */
.h-burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; position: relative; z-index: 2; }
.h-burger span { display: block; height: 1.6px; background: var(--brown); border-radius: 2px; transition: transform .25s, opacity .2s; }
.h-burger span + span { margin-top: 6px; }
.menu-open .h-burger span:nth-child(1) { transform: translateY(7.6px) rotate(45deg); }
.menu-open .h-burger span:nth-child(2) { opacity: 0; }
.menu-open .h-burger span:nth-child(3) { transform: translateY(-7.6px) rotate(-45deg); }

@media (max-width: 860px) {
  :root { --header-h: 62px; }
  .h-inner { width: calc(100% - 32px); }
  .h-name { font-size: 20px; }
  .h-tag { font-size: 12px; }
  .h-burger { display: block; }
  .h-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--cream); overflow-y: auto;
           padding: 12px 20px 40px; opacity: 0; visibility: hidden; transform: translateY(-8px);
           transition: opacity .22s, transform .22s, visibility .22s; border-top: 1px solid var(--line); }
  .menu-open .h-nav { opacity: 1; visibility: visible; transform: none; }
  .menu-open { overflow: hidden; }
  .h-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .h-nav > ul > li { border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .h-nav > ul > li > a { padding: 16px 4px; font: 400 22px/1.2 var(--font-title); border-radius: 0; flex: 1; }
  .h-nav > ul > li > a:hover, .h-nav > ul > li.active > a { background: none; }
  .h-subtoggle { padding: 14px; }
  .h-subtoggle svg { width: 16px; height: 16px; transition: transform .2s; }
  .has-sub.open .h-subtoggle svg { transform: rotate(180deg); }
  .h-sub { position: static; flex-basis: 100%; min-width: 0; margin: 0 0 12px !important; padding: 0 !important; border: 0; box-shadow: none;
           background: none; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub.open > .h-sub { display: block; }
  .h-sub a { font-size: 16px; padding: 10px 12px; }
}
