/* Header, menu, filters, and the process spine. These sit outside Tailwind. */
:root {
  --font-plex-sans: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --font-plex-serif: "IBM Plex Serif", ui-serif, Georgia, serif;
}

.site-header { transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s, box-shadow 0.5s; }
.site-header.is-compact .header-bar { padding-top: 0.75rem; padding-bottom: 0.75rem; }

/* The mega menu hangs off the header, below the label. Extend the hover
   target through the header padding so the pointer can reach the links. */
@media (min-width: 1024px) {
  nav[aria-label="Primary"] > .group:has(> a + div) {
    display: flex;
    align-items: center;
    margin-top: -1.25rem;
    margin-bottom: calc(-1.25rem - 8px);
    padding-top: 1.25rem;
    padding-bottom: calc(1.25rem + 8px);
  }
  .site-header.is-compact nav[aria-label="Primary"] > .group:has(> a + div) {
    margin-top: -0.75rem;
    margin-bottom: calc(-0.75rem - 8px);
    padding-top: 0.75rem;
    padding-bottom: calc(0.75rem + 8px);
  }
  nav[aria-label="Primary"] > .group:hover > div {
    display: block;
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
  }
  /* Full-width strip above the panel, so a diagonal move still counts as hover. */
  nav[aria-label="Primary"] > .group > div::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;
    height: 2.25rem;
  }
}
.site-header.is-compact { box-shadow: 0 10px 40px -28px rgb(10 11 13 / 0.5); }

body[data-home] .site-header { position: fixed; inset-inline: 0; }
body[data-home] .site-header:not(.is-solid) {
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  box-shadow: none;
}
body[data-home] .site-header:not(.is-solid) .nav-link { color: rgb(255 255 255 / 0.7); }
body[data-home] .site-header:not(.is-solid) .nav-link.is-active,
body[data-home] .site-header:not(.is-solid) .nav-link:hover { color: #fff; }
body[data-home] .site-header:not(.is-solid) .logo-default { display: none; }
body[data-home] .site-header:not(.is-solid) .logo-ondark { display: block; }
body[data-home] .site-header:not(.is-solid) .header-contact {
  background: #fff;
  color: #0a0b0d;
  border-color: transparent;
}
body[data-home] .site-header:not(.is-solid) .header-contact:hover { background: #f3f2ef; }
body[data-home] .site-header:not(.is-solid) .menu-btn {
  border-color: rgb(255 255 255 / 0.25);
  color: #fff;
}
body[data-home] .site-header.is-solid {
  background: rgb(255 255 255 / 0.8);
  border-bottom-color: rgb(222 220 214 / 0.7);
  backdrop-filter: blur(24px);
}

.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  height: 1px;
  width: 1.125rem;
  background: currentColor;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), top 0.3s;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
body.is-nav-open .menu-icon { background: transparent; }
body.is-nav-open .menu-icon::before { top: 0; transform: rotate(45deg); }
body.is-nav-open .menu-icon::after { top: 0; transform: rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--mobile-nav-top, 4.5rem) 0 0 0;
  z-index: 40;
  overflow-y: auto;
  background: #fff;
  border-top: 1px solid #dedcd6;
}
body.is-nav-open .mobile-nav { display: block; }
body.is-nav-open { overflow: hidden; }
@media (min-width: 1024px) {
  .mobile-nav, body.is-nav-open .mobile-nav { display: none; }
  body.is-nav-open { overflow: auto; }
}

.filter-btn.is-on { background: #fe5b2a; color: #fff; border-color: transparent; }
.work-item .lead-layout { display: none; }
.work-item.is-lead { grid-column: 1 / -1; }
.work-item.is-lead .lead-layout { display: block; }
.work-item.is-lead .card-layout { display: none; }
.work-item[hidden] { display: none; }

.process-dot { border-color: #dedcd6; background: #f3f2ef; }
.process-dot.is-active { border-color: #fe5b2a; background: #fe5b2a; }

/* Blog posts: photo and copy on the left, popular posts and share on the right. */
.post-page { background: #fff; }
.post-grid { display: grid; gap: 2.75rem; align-items: start; }
.post-figure { overflow: hidden; border-radius: 1.15rem; }
.post-figure img { display: block; width: 100%; height: auto; }
.post-body p { color: #2b2b2b; }
.post-body h4 {
  margin-top: 2.25rem;
  font-size: 1.45rem;
  line-height: 1.3;
  font-weight: 700;
  color: #111;
}
.post-body h4 strong,
.post-body strong { font-weight: 700; color: #111; }
.post-side h2 {
  font-family: var(--font-plex-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: #111;
}
.popular-posts { display: flex; flex-direction: column; gap: 1.15rem; margin-top: 1.15rem; }
.popular-post {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: #1c1c1c;
}
.popular-post img {
  width: 4.6rem;
  height: 3.7rem;
  flex: none;
  object-fit: cover;
  border-radius: 0.7rem;
}
.popular-post span { font-size: 0.95rem; font-weight: 500; line-height: 1.35; }
.popular-post:hover span { color: #fe5b2a; }
.post-share { display: flex; gap: 0.65rem; margin-top: 0.9rem; }
.post-share a {
  display: inline-flex;
  width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #111;
  color: #fff;
}
.post-share a:hover { background: #fe5b2a; }
.post-share svg { width: 1rem; height: 1rem; }
@media (min-width: 1024px) {
  .post-grid { grid-template-columns: minmax(0, 1fr) 17.5rem; column-gap: 3.25rem; }
  .post-side { position: sticky; top: 6.5rem; }
}

/* Photo heroes: a slightly heavier wash so the picture reads darker. */
main > :is(header, section).isolate .brightness-95 {
  --tw-brightness: brightness(88%);
}
main > :is(header, section).isolate .bg-\[\#6a6966\]\/30 {
  background-color: color-mix(in oklab, #3f3e3c 42%, transparent);
}
main > :is(header, section).isolate .from-\[\#4a4946\]\/72 {
  --tw-gradient-from: color-mix(in oklab, #3a3937 82%, transparent);
}
main > :is(header, section).isolate .via-\[\#6a6966\]\/38 {
  --tw-gradient-via: color-mix(in oklab, #3f3e3c 50%, transparent);
}
main > :is(header, section).isolate .to-\[\#8a8884\]\/10 {
  --tw-gradient-to: color-mix(in oklab, #5c5b58 20%, transparent);
}
main > :is(header, section).isolate .from-\[\#4a4946\]\/40 {
  --tw-gradient-from: color-mix(in oklab, #3a3937 52%, transparent);
}
main > :is(header, section).isolate .to-\[\#6a6966\]\/15 {
  --tw-gradient-to: color-mix(in oklab, #3f3e3c 24%, transparent);
}

/* The homepage photo already carries the orange arcs. Leave that color in place. */
main > section.isolate .grayscale {
  --tw-grayscale: grayscale(0);
}
