/* PATCH 7.8.1 — logo consistency + footer logo contrast
   Keep this separate from style.css so it can be overwritten safely.
   Header uses the secondary CQ mark. Footer uses the primary logo PNG.
*/

.logo-image-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  text-decoration: none;
}

.site-logo-mark {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-logo-wording {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: 0;
}

.site-logo-wording .logo-title,
.site-logo-wording .logo-subtitle {
  display: block;
  white-space: nowrap;
}

/* Footer logo: image now has a built-in light outline. This CSS keeps it crisp on dark themes. */
.footer-brand-logo {
  display: block;
  width: min(245px, 100%);
  height: auto;
  margin: 0 0 0.95rem 0;
  object-fit: contain;
  image-rendering: auto;
  filter: none;
}

@media (max-width: 1100px) {
  .logo-image-link { gap: 0.5rem; }

  .site-logo-mark {
    width: 44px;
    height: 44px;
  }

  .site-logo-wording .logo-title {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
  }

  .site-logo-wording .logo-subtitle {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .footer-brand-logo { width: 185px; }
}

@media (max-width: 420px) {
  .site-logo-mark {
    width: 38px;
    height: 38px;
  }

  .site-logo-wording .logo-title { font-size: 0.82rem; }
  .site-logo-wording .logo-subtitle { font-size: 0.54rem; }
}


/* PATCH 7.8.2 — desktop header/menu spacing
   The logo mark takes extra horizontal room, so these desktop-only rules give
   the menu more breathing space without changing the mobile layout.
   Edit this block if the laptop header ever feels too tight again.
*/
@media (min-width: 1101px) {
  .site-header .container.nav {
    max-width: 1380px;
    width: min(100% - 2.25rem, 1380px);
    padding-left: 1.125rem;
    padding-right: 1.125rem;
    gap: clamp(1.15rem, 2vw, 3rem);
  }

  .site-header .logo-image-link {
    flex: 0 0 auto;
    max-width: min(34vw, 385px);
  }

  .site-header .site-logo-mark {
    width: 48px;
    height: 48px;
  }

  .site-header .nav-links {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: clamp(0.28rem, 0.7vw, 0.8rem);
    min-width: 0;
  }

  .site-header .nav-links li {
    flex: 0 0 auto;
  }

  .site-header .nav-links a {
    white-space: nowrap;
    padding-left: clamp(0.42rem, 0.65vw, 0.82rem);
    padding-right: clamp(0.42rem, 0.65vw, 0.82rem);
    font-size: clamp(0.78rem, 0.78vw, 0.94rem);
    line-height: 1.1;
  }
}

/* Tighter laptop range: keep the nav readable rather than crushed. */
@media (min-width: 1101px) and (max-width: 1180px) {
  .site-header .container.nav {
    width: min(100% - 1.5rem, 1180px);
    gap: 0.85rem;
  }

  .site-header .logo-image-link {
    max-width: 290px;
    gap: 0.45rem;
  }

  .site-header .site-logo-mark {
    width: 42px;
    height: 42px;
  }

  .site-header .site-logo-wording .logo-title {
    font-size: 0.86rem;
    letter-spacing: 0.055em;
  }

  .site-header .site-logo-wording .logo-subtitle {
    font-size: 0.55rem;
    letter-spacing: 0.105em;
  }

  .site-header .nav-links {
    gap: 0.22rem;
  }

  .site-header .nav-links a {
    font-size: 0.78rem;
    padding-left: 0.38rem;
    padding-right: 0.38rem;
  }
}


/* PATCH 7.8.3 — universal logo/header correction and laptop nav re-spacing
   This file must be linked in every root HTML file immediately after style.css.
   Header logo + menu are spaced on desktop/laptop without changing mobile menu behaviour.
*/
.logo-image-link {
  display: flex !important;
  align-items: center;
  gap: 0.72rem;
  min-width: max-content;
  text-decoration: none;
}

.site-logo-mark {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

.site-logo-wording {
  display: flex;
  flex-direction: column;
  line-height: 1;
  min-width: max-content;
}

.site-logo-wording .logo-title,
.site-logo-wording .logo-subtitle {
  display: block;
  white-space: nowrap;
}

@media (min-width: 1101px) {
  .site-header .container.nav {
    /* Wider desktop header so the logo does not squeeze the menu. */
    max-width: 1540px !important;
    width: min(calc(100% - 2rem), 1540px) !important;
    padding-left: clamp(1rem, 2vw, 2.2rem) !important;
    padding-right: clamp(1rem, 2vw, 2.2rem) !important;
    gap: clamp(1rem, 2.2vw, 3.5rem) !important;
  }

  .site-header .logo-image-link {
    flex: 0 0 auto !important;
    max-width: none !important;
  }

  .site-header .nav-links {
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
    gap: 0.45rem 0.7rem !important;
    min-width: 0 !important;
  }

  .site-header .nav-links li {
    flex: 0 0 auto !important;
  }

  .site-header .nav-links a {
    white-space: nowrap !important;
    padding: 0.52rem clamp(0.55rem, 0.8vw, 0.95rem) !important;
    font-size: clamp(0.78rem, 0.82vw, 0.95rem) !important;
    line-height: 1.1 !important;
  }
}

@media (min-width: 1101px) and (max-width: 1220px) {
  .site-header .container.nav {
    align-items: center !important;
    width: min(calc(100% - 1.25rem), 1220px) !important;
    gap: 0.8rem !important;
  }

  .site-header .site-logo-mark {
    width: 42px !important;
    height: 42px !important;
  }

  .site-header .site-logo-wording .logo-title {
    font-size: 0.82rem !important;
    letter-spacing: 0.045em !important;
  }

  .site-header .site-logo-wording .logo-subtitle {
    font-size: 0.54rem !important;
    letter-spacing: 0.1em !important;
  }

  .site-header .nav-links {
    gap: 0.32rem 0.45rem !important;
  }

  .site-header .nav-links a {
    font-size: 0.76rem !important;
    padding-left: 0.42rem !important;
    padding-right: 0.42rem !important;
  }
}
