/*
 * Design B home: transparent header over the hero (2026-10-21).
 * Header attributes are set by components/home2/Header.tsx:
 *   [data-home]     the home page header (the hero slides up underneath the bar);
 *   [data-overlay]  transparent state: page at the top, nothing hovered, focused or open.
 * Any hover, keyboard focus, open mega menu or search, or scroll turns the bar white again.
 */
:root {
  --bar: 76px; /* the header bar's height (design-b.css), plus its 1px border */
}
@media (min-width: 1024px) {
  :root {
    --bar: 84px;
  }
}
.site-header {
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

/* Logo: colour by default, white in the transparent state. */
.site-header__logo {
  position: relative;
}
.site-header__logo .logo-white {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.site-header__logo .logo-colour {
  transition: opacity 0.25s ease;
}
.site-header[data-overlay] .logo-white {
  opacity: 1;
}
.site-header[data-overlay] .logo-colour {
  opacity: 0;
}

/* Transparent bar: a soft dark fade keeps the white type legible over any photo. */
.site-header[data-overlay] {
  background: transparent;
  border-bottom-color: rgb(255 255 255 / 0.14);
}
.site-header[data-overlay] .site-header__bar {
  background: linear-gradient(rgb(15 19 27 / 0.45), rgb(15 19 27 / 0));
}
.site-header__bar {
  transition: background 0.25s ease;
}
.site-header[data-overlay] .nav-link,
.site-header[data-overlay] .hdr-icon,
.site-header[data-overlay] .site-header__mobile .hdr-icon:first-child,
.site-header[data-overlay] .hdr-phone small,
.site-header[data-overlay] .hdr-phone strong {
  color: #fff;
}

/* The home hero runs up under the bar, keeping its own visible height below it. */
.site-header[data-home] ~ main .hero {
  margin-top: calc(-1 * var(--bar) - 1px);
  min-height: calc(clamp(560px, 100svh - 124px, 760px) + var(--bar));
}
.site-header[data-home] ~ main .hero__inner {
  padding-top: calc(72px + var(--bar));
}

/*
 * Mega menu (2026-10-21, client feedback: the menus felt too comprehensive). Only the main
 * practice areas are listed, with more room between them, and each area's key matters
 * (content/menu.json, at most six) show as icon + title + one short line in two columns, each icon
 * on its own soft tint.
 */
.mega__tabs {
  gap: 4px;
}
.mega__tab {
  padding-block: 12px;
  font-size: 15.5px;
}
/* Two columns; short titles (content/menu.json `label`) keep each title on one line. */
.mega__links.mega__links--rich {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 24px;
  columns: auto;
  padding-top: 14px;
}
.mega__links .mega__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-inline: -10px;
  padding: 10px;
  border-radius: 10px;
  color: var(--navy);
  transition: background-color 0.15s ease;
}
.mega__links .mega__item:hover {
  background: var(--paper);
}
.mega__item-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--stone);
  color: var(--navy);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.mega__item-icon svg {
  width: 20px;
  height: 20px;
}
.mega__item:hover .mega__item-icon {
  background: var(--brand);
  color: #fff;
}
.mega__item-title {
  display: block;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.35;
  transition: color 0.15s ease;
}
.mega__item:hover .mega__item-title {
  color: var(--brand);
}
.mega__item-text {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

/* Soft tints: each key matter's icon tile gets its own gentle hue (a light wash, a deeper ink of the
   same hue), cycling through six. Hover still turns the tile Curtis red. */
.mega__links--rich li:nth-child(6n + 1) .mega__item-icon { background: #e9eef9; color: #34508a; }
.mega__links--rich li:nth-child(6n + 2) .mega__item-icon { background: #f9e9ee; color: #9b2c4c; }
.mega__links--rich li:nth-child(6n + 3) .mega__item-icon { background: #e6f1eb; color: #2f6a4e; }
.mega__links--rich li:nth-child(6n + 4) .mega__item-icon { background: #f7eee0; color: #87591f; }
.mega__links--rich li:nth-child(6n + 5) .mega__item-icon { background: #eeeafa; color: #5a4196; }
.mega__links--rich li:nth-child(6n + 6) .mega__item-icon { background: #e2f1f2; color: #1f666d; }
.mega__links--rich .mega__item:hover .mega__item-icon {
  background: var(--brand);
  color: #fff;
}
/* Every line (38–50 characters) sets as two balanced lines, so the grid reads evenly. */
.mega__links--rich .mega__item-text {
  max-width: 210px;
  text-wrap: balance;
}
