/* Header: one sticky graphite bar. Enqueued globally from inc/enqueue.php. */

.deltaes-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deltaes-graphite-950);
  border-bottom: 1px solid var(--deltaes-graphite-800);
}

/* WordPress's admin bar is fixed at the top for a logged-in editor. */
.admin-bar .deltaes-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .deltaes-header { top: 0; } }

.deltaes-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  min-height: var(--deltaes-header-height);
}

.deltaes-header__logo { display: flex; align-items: center; flex: none; }
.deltaes-header__logo .deltaes-logo { width: auto; height: 48px; }

.deltaes-nav { margin-left: auto; }

.deltaes-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.deltaes-nav__list > li { position: relative; }
/* Prefixed with the header so it outranks style.css's prose-link rule. */
.deltaes-header .deltaes-nav__list > li > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
}
/* Hover and the current section: an arc-blue bar under the words, so colour is
   never the only cue. */
.deltaes-header .deltaes-nav__list > li > a:hover,
.deltaes-header .deltaes-nav__list > li:focus-within > a,
.deltaes-header .deltaes-nav__list > .current-menu-item > a,
.deltaes-header .deltaes-nav__list > .current-menu-parent > a,
.deltaes-header .deltaes-nav__list > .current-menu-ancestor > a,
.deltaes-header .deltaes-nav__list > .current_page_item > a,
.deltaes-header .deltaes-nav__list > .current_page_parent > a {
  text-decoration: underline;
  text-decoration-color: var(--deltaes-arc);
  text-decoration-thickness: 3px;
  text-underline-offset: 9px;
}

.deltaes-nav__list .menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  width: .36em; height: .36em;
  margin-left: .55em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

/* Dropdowns. Kept in flow with visibility, so their links leave the tab order
   while closed. */
.deltaes-nav__list .sub-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 300px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--deltaes-graphite-900);
  border: 1px solid var(--deltaes-graphite-800);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s var(--deltaes-ease), transform .15s var(--deltaes-ease), visibility 0s linear .15s;
}
.deltaes-nav__list .sub-menu::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 100%;
  height: 16px;
}
.deltaes-nav__list > li:hover > .sub-menu,
.deltaes-nav__list > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.deltaes-header .deltaes-nav__list .sub-menu a {
  display: block;
  padding: 11px 20px;
  color: #ffffff;
  font-size: .9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.deltaes-header .deltaes-nav__list .sub-menu a:hover,
.deltaes-header .deltaes-nav__list .sub-menu .current-menu-item > a { background: var(--deltaes-graphite-800); }
.deltaes-header .deltaes-nav__list .sub-menu .current-menu-item > a { box-shadow: inset 3px 0 0 var(--deltaes-arc); }

.deltaes-header__actions { display: flex; align-items: center; gap: 24px; }
.deltaes-header__phone {
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.deltaes-header__phone:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Phone-only controls: Call and Menu, 48x48 each. */
.deltaes-header__call,
.deltaes-burger {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 48px;
  min-height: 48px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--deltaes-graphite-700);
  color: #ffffff;
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.deltaes-burger__lines { display: grid; gap: 4px; width: 18px; }
.deltaes-burger__lines span { display: block; height: 2px; background: currentColor; }

/* The menu sheet: full screen, graphite, a 150ms fade rather than a slide. */
.deltaes-drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  padding: 0 var(--deltaes-gutter) 32px;
  overflow-y: auto;
  --deltaes-bg: var(--deltaes-graphite-900);
  background: var(--deltaes-graphite-900);
  opacity: 0;
  transition: opacity .15s var(--deltaes-ease);
}
.deltaes-drawer.is-open { opacity: 1; }
/* The [hidden] attribute must beat display:flex above, or the closed sheet's
   links stay in the tab order. */
.deltaes-drawer[hidden] { display: none; }

.deltaes-drawer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  margin-bottom: 8px;
}
.deltaes-drawer__bar .deltaes-logo { width: auto; height: 40px; }
.deltaes-drawer__close {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  background: none;
  border: 1px solid var(--deltaes-graphite-700);
  color: #ffffff;
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
}

.deltaes-drawer__list { list-style: none; margin: 0; padding: 0; }
.deltaes-drawer__list > li { border-bottom: 1px solid var(--deltaes-graphite-800); }
.deltaes-drawer .deltaes-drawer__list > li > a {
  display: flex;
  align-items: center;
  min-height: 56px;
  color: #ffffff;
  font-family: var(--deltaes-font-display);
  font-stretch: 62%;
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
}
.deltaes-drawer .deltaes-drawer__list > .current-menu-item > a,
.deltaes-drawer .deltaes-drawer__list > .current_page_item > a { text-decoration: underline; text-decoration-color: var(--deltaes-arc); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.deltaes-drawer__list .sub-menu { list-style: none; margin: -4px 0 14px; padding: 0; }
.deltaes-drawer .deltaes-drawer__list .sub-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--deltaes-silver-300);
  font-size: 1.0625rem;
  text-decoration: none;
}

.deltaes-drawer__actions { display: grid; justify-items: start; gap: 20px; padding-top: 32px; }

/* ---- Breakpoints -------------------------------------------------------- */

@media (max-width: 1280px) {
  .deltaes-header__phone { display: none; }
}
@media (max-width: 1160px) {
  .deltaes-header .deltaes-nav__list > li > a { padding-inline: 8px; font-size: .9375rem; }
}
@media (max-width: 1040px) {
  .deltaes-nav,
  .deltaes-header__cta { display: none; }
  .deltaes-header__actions { margin-left: auto; gap: 8px; }
  .deltaes-header__call,
  .deltaes-burger { display: inline-flex; }
  :root { --deltaes-header-height: 72px; }
  .deltaes-header__logo .deltaes-logo { height: 40px; }
}
/* Under 400px the tagline is too small to read; the Call word goes too, the
   icon and its accessible name remain. */
@media (max-width: 400px) {
  .deltaes-header__logo .deltaes-logo { height: 32px; }
  .deltaes-header__call > span:not(.screen-reader-text) { display: none; }
}
/* At 320 the logo, Call and Menu ran 8px wider than the screen (1.4.10);
   tighter padding keeps both visible labels and the 48px targets. */
@media (max-width: 360px) {
  .deltaes-header__actions { gap: 4px; }
  .deltaes-header__call,
  .deltaes-burger { padding-inline: 6px; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .deltaes-drawer,
  .deltaes-nav__list .sub-menu { transition: none; transform: none; }
}
