/*
 * WP chrome — header, footer and fallback templates.
 *
 * Kept separate from main.css on purpose: main.css is generated from the
 * prototype's globals.css, so anything added there is lost on regeneration.
 * This file holds the classes that only exist in the PHP templates.
 */

/* --- Accessibility ------------------------------------------------------ */

.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 999;

  width: auto;
  height: auto;
  padding: 10px 16px;

  background: var(--gold);
  color: #111111;

  font-family: "Barlow Condensed", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}

/* --- Top bar ----------------------------------------------------------- */

.topbar {
  background: var(--black);
  color: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-inner {
  min-height: 42px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar span,
.topbar a {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;

  color: inherit;
  text-decoration: none;
}

.topbar a:hover {
  color: var(--gold);
}

/* --- Header ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;

  background: #ffffff;
  border-bottom: 1px solid var(--border);

  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.site-header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 22px;

  min-height: 78px;
}

.site-logo {
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo img {
  display: block;
  max-height: 46px;
  width: auto;
}

.site-nav {
  justify-self: center;
  align-self: stretch;
  display: flex;
  align-items: center;
}

.nav-menu {
  margin: 0;
  padding: 0;

  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 78px;

  list-style: none;
}

.nav-menu > li {
  display: flex;
  align-items: center;
  min-height: 78px;
}

.nav-menu a {
  font-family: "Barlow Condensed", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;

  color: var(--text);
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a {
  color: var(--gold-dark);
}

.nav-menu .menu-item-has-children {
  position: relative;
}

.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 20;
  transform: translateX(-50%);

  margin: 0;
  padding: 10px 0;

  min-width: 230px;

  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);

  display: none;
  list-style: none;
}

.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

.nav-menu .sub-menu a {
  display: block;
  padding: 7px 16px;
  font-size: 15px;
}

.nav-menu > .wd-nav-areas > .sub-menu {
  display: none;
  grid-template-columns: repeat(3, minmax(145px, 1fr));
  min-width: 500px;
}

.nav-menu > .wd-nav-services > .sub-menu {
  display: none;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  min-width: 390px;
}

.nav-menu > .wd-nav-areas:hover > .sub-menu,
.nav-menu > .wd-nav-areas:focus-within > .sub-menu,
.nav-menu > .wd-nav-services:hover > .sub-menu,
.nav-menu > .wd-nav-services:focus-within > .sub-menu {
  display: grid;
}

.nav-menu > .wd-nav-areas > .sub-menu a,
.nav-menu > .wd-nav-services > .sub-menu a {
  padding: 9px 14px;
}

/* --- Header actions ---------------------------------------------------- */

.site-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-self: end;
}

.site-nav + .site-actions {
  margin-left: 0;
}

.action-call,
.action-wa {
  padding: 10px 16px;

  font-family: "Barlow Condensed", sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;

  text-decoration: none;
  white-space: nowrap;
}

.action-call {
  background: var(--black);
  color: var(--white);
}

.action-call:hover {
  background: var(--dark);
}

.action-wa {
  background: var(--gold);
  color: #111111;
}

.action-wa:hover {
  background: var(--gold-light);
}

.nav-toggle {
  display: none;

  flex-direction: column;
  justify-content: center;
  gap: 5px;

  width: 42px;
  height: 42px;
  padding: 0;

  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 0 auto;
  width: 20px;

  background: var(--text);
}

/* --- Mobile nav -------------------------------------------------------- */

.site-nav-mobile {
  display: none;
}

.site-nav-mobile.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 30;
  width: 100%;
  max-height: calc(100dvh - 66px);
  overflow-y: auto;
  padding: 0 24px 18px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.14);
}

.nav-menu--mobile {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-height: 0;
}

.nav-menu--mobile li {
  width: 100%;
  min-height: 0;
  border-top: 1px solid var(--border);
}

.nav-menu--mobile > li {
  display: block;
}

.nav-item-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item-heading > a {
  flex: 1;
  min-width: 0;
}

.nav-submenu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.nav-submenu-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.nav-menu--mobile a {
  display: block;
  padding: 12px 0;
}

.site-nav-mobile .nav-menu--mobile .sub-menu {
  position: static;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  min-width: 0;
  padding: 0 0 10px 14px;
  transform: none;
  border: 0;
  box-shadow: none;
}

.site-nav-mobile .nav-menu--mobile .sub-menu[hidden] {
  display: none !important;
}

.nav-menu--mobile .sub-menu a {
  padding: 9px 0;
  font-size: 14px;
}

/* --- Footer ------------------------------------------------------------ */

.site-footer {
  background: var(--black);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;

  padding: 56px 0 40px;
}

.footer-brand img {
  display: block;
  max-height: 44px;
  width: auto;
  margin-bottom: 14px;

  /* The logo is dark artwork on transparent — invert it for the dark footer. */
  filter: brightness(0) invert(1);
}

.footer-brand p {
  margin: 0 0 15px;
  max-width: 40ch;

  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  line-height: 1.6;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-contact a {
  font-size: 15px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-col h3 {
  margin: 0 0 13px;

  font-family: "Barlow Condensed", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;

  color: var(--gold);
}

.footer-col a {
  display: block;
  padding: 4px 0;

  font-size: 14px;
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom > .container {
  min-height: 62px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-bottom p {
  margin: 0;

  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom div {
  display: flex;
  gap: 18px;
}

.footer-bottom a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--gold);
}

/* Keep the panel hidden until JavaScript opens it, and restore the fixed
  desktop dimensions used by the original widget. The mobile full-screen
  treatment is defined in main.css. */
.bot-panel {
  width: 360px;
  height: 520px;
}

.bot-panel[hidden] {
  display: none !important;
}

/* --- Page hero --------------------------------------------------------- */

.page-hero {
  position: relative;
  isolation: isolate;

  min-height: 380px;

  display: flex;
  align-items: center;

  padding: 68px 0;
  overflow: hidden;

  background: var(--black);
  color: var(--white);
}

.page-hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim: heavy enough that the h1 stays AA-contrast over any photo. */
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background: linear-gradient(
    100deg,
    rgba(10, 10, 10, 0.94) 0%,
    rgba(10, 10, 10, 0.78) 46%,
    rgba(10, 10, 10, 0.5) 100%
  );
}

.page-hero-inner {
  max-width: 760px;
}

.page-hero h1 {
  margin: 0;

  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.06;
  text-transform: uppercase;
}

.page-hero-lead {
  margin: 20px 0 0;
  max-width: 58ch;

  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.65;
}

.page-hero .hero-actions {
  margin-top: 30px;
}

/* --- CTA band ---------------------------------------------------------- */

.cta-band-media {
  position: absolute;
  inset: 0;
}

.cta-band-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Fallback / entry -------------------------------------------------- */

.content-narrow {
  max-width: 820px;
  padding: 60px 0;
}

.entry-title {
  margin: 0 0 18px;

  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 700;
  text-transform: uppercase;
}

.entry-content p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.page-links {
  margin-top: 26px;
  font-size: 14px;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 1000px) {
  .site-header-inner {
    display: flex;
  }

  .site-actions {
    margin-left: auto;
  }

  .site-nav {
    display: none;
  }

  .site-nav-mobile {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 700px) {
  .topbar-inner {
    flex-direction: column;
    gap: 6px;
    padding: 9px 0;
  }

  .topbar-right {
    gap: 12px;
  }

  .site-header-inner {
    min-height: 66px;
    gap: 12px;
    justify-content: center;
  }

  .site-actions {
    margin-left: 0;
  }

  .action-call {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom > .container {
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 14px 0;
  }
}
