/* Shared top bar: mirrors the homepage header (homepage-visual.css), scoped under .topbar. */
.topbar {
  --tb-ink: #122a23;
  --tb-forest: #0b5748;
  --tb-forest-deep: #073b32;
  --tb-paper: #f5ead6;
  --tb-paper-2: #ead8b7;
  --tb-cream: #fff9ed;
  --tb-rust: #a94731;
  --tb-gold: #e6ad43;
  --tb-line: rgba(18, 42, 35, .22);
  position: fixed;
  inset: 18px 22px auto;
  z-index: 50;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  width: auto;
  max-width: 1160px;
  min-height: 56px;
  margin: 0 auto;
  padding: 9px 12px 9px 14px;
  border: 1px solid rgba(11, 87, 72, .28);
  border-radius: 999px;
  background: rgba(245, 234, 214, .86);
  box-shadow: 0 10px 30px rgba(24, 57, 45, .08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--tb-ink);
  font-family: "Aptos", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
}
.topbar *, .topbar *::before, .topbar *::after { box-sizing: border-box; }
.topbar a { color: inherit; text-decoration: none; }

.topbar .brand { order: 1; display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 0; color: var(--tb-ink); font-weight: 400; text-decoration: none; }
.topbar .brand img { width: 32px; height: 32px; }
.topbar .brand span { display: grid; gap: 0; line-height: 1; }
.topbar .brand strong { font: 700 18px/1 Georgia, "Times New Roman", serif; letter-spacing: -.025em; }
.topbar .brand small { margin-top: 4px; color: var(--tb-rust); font: 800 8px/1 ui-monospace, monospace; letter-spacing: .2em; text-transform: uppercase; }

.topbar .brand { flex: 0 0 auto; }
.topbar .primary-nav { order: 2; display: flex; flex: 1 1 auto; justify-content: center; gap: 4px 22px; margin: 0; padding: 0; border: 0; color: var(--tb-ink); font-size: 13px; }
.topbar .menu, .topbar .top-cta { flex: 0 0 auto; }
.topbar .primary-nav a { color: var(--tb-ink); font-size: 13px; font-weight: 650; text-decoration: none; }
.topbar .primary-nav a:hover, .topbar .primary-nav a[aria-current="page"] { color: var(--tb-rust); }
.topbar .primary-nav a[aria-current="page"] { font-weight: 800; }

.topbar .menu { order: 3; position: relative; margin: 0; padding: 0; }
.topbar .menu summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid rgba(11, 87, 72, .26); border-radius: 999px; color: var(--tb-forest-deep); cursor: pointer; font-size: 12px; font-weight: 800; list-style: none; }
.topbar .menu summary::-webkit-details-marker { display: none; }
.topbar .menu summary span { color: var(--tb-rust); font-size: 18px; line-height: .7; }
.topbar .menu[open] summary { background: var(--tb-paper-2); }
.topbar .menu-panel { position: absolute; right: 0; top: calc(100% + 10px); display: grid; gap: 5px; width: min(650px, calc(100vw - 48px)); max-height: 70svh; overflow: auto; padding: 24px; border: 1px solid rgba(11, 87, 72, .25); border-radius: 12px; background: var(--tb-cream); box-shadow: 10px 14px 0 rgba(11, 87, 72, .14); }
.topbar .menu-panel a { display: grid; gap: 4px; padding: 10px 0; border-radius: 9px; color: var(--tb-ink); font-size: 14px; font-weight: 400; text-decoration: none; }
.topbar .menu-panel a:hover, .topbar .menu-panel a:focus-visible { background: var(--tb-paper); }
.topbar .menu-heading { margin: 0 0 12px; color: var(--tb-rust); font: 700 22px Georgia, serif; }
.topbar .menu-packages, .topbar .menu-services { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--tb-line); }

.topbar .top-cta { order: 4; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 10px 16px; border-radius: 999px; background: var(--tb-forest); color: var(--tb-cream); font-size: 12px; font-weight: 650; line-height: 1.1; text-align: center; text-decoration: none; white-space: nowrap; }
.topbar .top-cta .cta-short { display: none; }
.topbar .top-cta .cta-full, .topbar .top-cta .cta-short { color: inherit; font-size: inherit; line-height: 1.1; }
.topbar .top-cta > span:last-child { color: var(--tb-gold); font-size: 15px; line-height: 1; }

/* Single-row bar at every width: the primary links drop off the end as space runs out (all stay reachable in "All services"). */
.topbar { flex-wrap: nowrap; gap: 12px 20px; }
.topbar .brand { margin-right: 0; }
.topbar .primary-nav { order: 2; flex: 1 1 0; min-width: 0; width: auto; flex-wrap: nowrap; justify-content: center; gap: 0 22px; padding: 0; border: 0; overflow: hidden; }
.topbar .primary-nav a { white-space: nowrap; }

@media (max-width: 1240px) {
  .topbar .top-cta .cta-full { display: none; }
  .topbar .top-cta .cta-short { display: inline; }
}
@media (max-width: 1080px) { .topbar .primary-nav a:nth-child(6) { display: none; } }
@media (max-width: 1000px) { .topbar .primary-nav a:nth-child(5) { display: none; } }
@media (max-width: 900px) {
  .topbar { inset: 10px 12px auto; padding-inline: 16px; }
  .topbar .primary-nav { display: none; }
  .topbar .brand { margin-right: auto; }
  .topbar .top-cta { padding: 10px 13px; }
}

@media (max-width: 560px) {
  .topbar { inset: 8px 10px auto; gap: 2px 8px; min-height: 0; padding: 6px 10px 5px; border-radius: 14px; }
  .topbar .brand strong { font-size: 15px; }
  .topbar .brand img { width: 26px; height: 26px; }
  .topbar .menu summary { padding: 7px 10px; font-size: 11px; }
  .topbar .menu-panel { position: fixed; top: 68px; left: 6px; right: 6px; width: auto; padding: 18px; }
  .topbar .menu-packages, .topbar .menu-services { grid-template-columns: 1fr; }
  .topbar .top-cta { min-height: 34px; padding: 7px 12px; font-size: 10px; }
  .topbar .top-cta .cta-full { display: none; }
  .topbar .top-cta .cta-short { display: inline; }
  .topbar .top-cta > span:not(.cta-short) { display: none; }
}

/* The bar floats over the page: each page's first block runs up behind it and carries extra top padding. */
html:has(.topbar) { --tb-clear: 84px; scroll-padding-top: 100px; }
@media (max-width: 900px) { html:has(.topbar) { --tb-clear: 84px; scroll-padding-top: 100px; } }
@media (max-width: 560px) { html:has(.topbar) { --tb-clear: 72px; scroll-padding-top: 88px; } }

html:has(.topbar) .topbar ~ main > .service-hero > .content,
html:has(.topbar) .topbar ~ main > article > .article-hero > .content { padding-top: calc(var(--tb-clear) + 40px); }
html:has(.topbar) .topbar ~ main > .insight-page { padding-top: calc(var(--tb-clear) + clamp(36px, 5vw, 70px)); }
html:has(.topbar) .topbar ~ main > :first-child:not(.service-hero):not(article):not(.insight-page) { padding-top: calc(var(--tb-clear) + 24px); }
