/* Adba Labs — page layout. Loaded after tokens.css and components.css.
   Token variables only: no colour literals, no px values off the 5px grid except
   hairlines. No JavaScript anywhere on the site: menus are <details>. */

html { scroll-padding-top: 96px; }
.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--sp-3); }
@media (min-width: 768px) { .wrap { padding-inline: var(--sp-4); } }
main#main { padding: 0; }

/* ---------- header + nav (CSS-only menus) ---------- */
.site-head { padding: 0; display: block; border-bottom: 1px solid var(--border-soft); }
.site-head .wrap { display: flex; align-items: center; gap: var(--sp-4); min-height: 76px; }
.brand img { height: 56px; width: auto; max-height: none; }
[data-theme="dark"] .brand img { background: #fff; padding: 3px 5px; border-radius: var(--radius); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { background: #fff; padding: 3px 5px; border-radius: var(--radius); } }
.site-head nav { margin-left: auto; flex: 0 1 auto; display: block; }
.menu-mobile { display: none; }
.menu-list { display: flex; align-items: center; gap: var(--sp-1) var(--sp-4); list-style: none; margin: 0; padding: 0; }
.menu-list > li { margin: 0; position: relative; }
.menu-list a, .menu-list summary { color: var(--text); font-size: var(--fs-nav); font-weight: 500; text-decoration: none; cursor: pointer; padding: var(--sp-2) 0; display: inline-flex; align-items: center; gap: 6px; list-style: none; }
.menu-list summary::-webkit-details-marker { display: none; }
.menu-list summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.menu-list details[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.menu-list a:hover, .menu-list summary:hover, .menu-list a[aria-current="page"] { color: var(--brand-text); }
.menu-list a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--brand); }
.sub { list-style: none; margin: 0; padding: var(--sp-2) 0; min-width: 300px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-card); box-shadow: var(--shadow-card); position: absolute; top: calc(100% + 6px); left: calc(-1 * var(--sp-3)); z-index: 50; }
.sub li { margin: 0; }
.sub a { display: block; padding: var(--sp-2) var(--sp-4); }
.sub a:hover { background: var(--surface-2); }
.menu-cta { margin-left: var(--sp-2); }
.menu-cta .btn { min-height: 41px; font-size: 15px; }
@media (max-width: 1099px) {
  .menu-desktop { display: none; }
  .menu-mobile { display: block; }
  .menu > summary { display: inline-flex; align-items: center; gap: var(--sp-2); font-weight: 600; cursor: pointer; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border-soft); border-radius: var(--radius); list-style: none; }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu:not([open]) .menu-list { display: none; }
  /* Floating panel, not a flush-docked bar: inset from both edges, its own
     radius + shadow, so it reads as detached over the page (2026 polish). */
  .menu[open] .menu-list {
    position: absolute;
    left: var(--sp-3);
    right: var(--sp-3);
    top: calc(76px + var(--sp-2));
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-card);
    box-shadow: 0 24px 48px -16px color-mix(in srgb, var(--text) 24%, transparent), var(--shadow-card);
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-3);
    gap: 0;
    z-index: 60;
    max-height: calc(100vh - 76px - var(--sp-4));
    overflow-y: auto;
  }
  .menu-list > li { border-bottom: 1px solid var(--border-soft); }
  .menu-list a, .menu-list summary { padding: var(--sp-3) 0; width: 100%; }
  .sub { position: static; box-shadow: none; border: 0; padding: 0 0 var(--sp-2) var(--sp-3); min-width: 0; }
  .sub a { padding: var(--sp-2) 0; }
  .menu-cta { margin: var(--sp-3) 0 0; border: 0 !important; }
}

/* ---------- glass surfaces (2026 polish) ---------- */
/* Translucent + blurred header/menu/sub-menu, gated behind feature support
   so a browser without backdrop-filter silently keeps the solid --surface
   background set above it -- never a transparent panel with no blur under
   it (illegible). Same color-mix-against-transparent recipe the CTA-band /
   page-head glows already use below, so it tracks both themes for free. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-head {
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
  }
  @media (min-width: 1100px) {
    .sub {
      background: color-mix(in srgb, var(--surface) 86%, transparent);
      -webkit-backdrop-filter: blur(16px) saturate(160%);
      backdrop-filter: blur(16px) saturate(160%);
    }
  }
  @media (max-width: 1099px) {
    .menu[open] .menu-list {
      background: color-mix(in srgb, var(--surface) 84%, transparent);
      -webkit-backdrop-filter: blur(18px) saturate(160%);
      backdrop-filter: blur(18px) saturate(160%);
    }
  }
}

/* ---------- sections ---------- */
.section { padding-block: var(--sp-7); }
@media (min-width: 1024px) { .section { padding-block: var(--sp-8) ; } }
.section.tint { background: var(--surface-2); }
.section h2 { margin-top: 0; }
.section-head { max-width: 760px; margin-bottom: var(--sp-6); }
.section-head p { color: var(--text-muted); }
.eyebrow { display: block; color: var(--brand-ui); font-size: 15px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; margin-bottom: var(--sp-2); }
.lead { font-size: 1.3125rem; line-height: 1.55; }

/* ---------- hero ---------- */
.hero { padding-block: var(--sp-7) var(--sp-8); border-bottom: 1px solid var(--border-soft); }
.hero .wrap { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 1024px) { .hero .wrap { grid-template-columns: 7fr 5fr; } }
.hero h1 { text-wrap: pretty; font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.12; letter-spacing: -0.5px; margin-bottom: var(--sp-4); }
.hero .lead { color: var(--text-muted); max-width: 640px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-top: var(--sp-5); }
.tel { font-weight: 600; color: var(--text); text-decoration: none; }
.tel:hover { color: var(--brand-text); }
.since { margin-top: var(--sp-4); color: var(--text-muted); font-size: var(--fs-small); }
/* Hero photo -- same slot the abstract motif / the logo occupied before it
   (right column, beside the h1). Founder direction 2026-10-16: a real photo
   here, not the logo -- CC BY licensed, so the figcaption credit is the
   licence term, not decoration; keep it visible, don't be tempted to shrink
   it to nothing. */
.hero-photo { justify-self: end; width: 100%; max-width: 460px; margin: 0; }
.hero-photo img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.hero-photo figcaption { margin-top: var(--sp-2); font-size: var(--fs-small); color: var(--text-muted); text-align: right; }
.hero-photo figcaption a { color: inherit; }
@media (max-width: 1023px) { .hero-photo { max-width: 320px; justify-self: start; } }

/* ---------- method ---------- */
.method { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); counter-reset: step; }
.method li { counter-increment: step; margin: 0; padding: var(--sp-4) var(--sp-3); border-top: 4px solid var(--brand); background: var(--surface); border-radius: 0 0 var(--radius-card) var(--radius-card); box-shadow: var(--shadow-card); font-weight: 600; }
.method li::before { content: counter(step, decimal-leading-zero); display: block; color: var(--brand-ui); font-size: 15px; font-weight: 700; margin-bottom: var(--sp-1); }
.method li:nth-child(3n+2) { border-top-color: var(--accent); }
.method li:nth-child(3n) { border-top-color: var(--green); }

/* ---------- cards / lists ---------- */
.svc { display: flex; flex-direction: column; }
.svc h3 { margin-bottom: var(--sp-2); }
.svc .more { margin-top: auto; padding-top: var(--sp-3); font-weight: 600; }
.svc.maroon { border-top: 4px solid var(--accent); } .svc.green { border-top: 4px solid var(--green); } .svc:not(.maroon):not(.green) { border-top: 4px solid var(--brand); }
.icon-list li > span { flex: 1; }
.two-col { display: grid; gap: var(--sp-6); }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }
.tile-link { display: block; text-decoration: none; color: var(--text); height: 100%; }
.tile-link h3 { font-size: var(--fs-h4); color: var(--text); }
.tile-link:hover h3 { color: var(--brand-text); }
.tile-link p { color: var(--text-muted); margin: 0; }
.notice { border: 1px solid var(--border-soft); border-left: 0; background: var(--surface-2); border-radius: var(--radius-card); padding: var(--sp-4); }

/* ---------- testimonials ---------- */
.quote { margin: 0; padding: var(--sp-5); background: var(--surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: var(--sp-3); }
.quote blockquote { margin: 0; padding: 0; border: 0; background: none; font-size: 17px; line-height: 1.65; }
.quote blockquote::before { content: "“"; display: block; font-size: 56px; line-height: .6; color: var(--brand); font-weight: 700; margin-bottom: var(--sp-2); }
.quote figcaption { margin: 0; font-size: 15px; color: var(--text-muted); }
.quote figcaption strong { display: block; color: var(--text); }

/* ---------- insight cards ---------- */
.post-card { display: flex; flex-direction: column; gap: var(--sp-2); }
.post-card .meta { font-size: 14px; color: var(--text-muted); }
.post-card h3 { font-size: var(--fs-h4); margin: 0; }
.post-card h3 a { color: var(--text); text-decoration: none; }
.post-card h3 a:hover { color: var(--brand-text); text-decoration: underline; }
.post-card p { color: var(--text-muted); margin: 0; }

/* ---------- CTA band ---------- */
/* Two soft colour-mixed glows over the existing solid base -- no stock photo,
   no new asset, no licence to track. Tokens only, so it holds in both themes:
   color-mix against a transparent stop fades the brand hex into nothing, it
   never needs a theme-specific override. */
.cta-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px circle at 10% 125%, color-mix(in srgb, var(--brand) 25%, transparent), transparent 60%),
    radial-gradient(700px circle at 92% -25%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 55%),
    var(--text);
  color: var(--surface);
  padding-block: var(--sp-8);
}
.cta-band h2 { color: var(--surface); }
.cta-band p { color: var(--surface); opacity: .88; max-width: 720px; }
.cta-band .tel { color: var(--surface); }
.cta-band .tel:hover { color: var(--brand); }

/* ---------- page header (inner pages) ---------- */
/* Every one of the 39 inner pages landed here as plain whitespace -- the
   homepage got a hand-built motif, nothing else did. Same no-asset approach:
   a brand-coloured glow in one corner plus a faint diagonal hatch for
   texture, both token-driven so they track theme changes automatically. */
.page-head {
  position: relative;
  overflow: hidden;
  padding-block: var(--sp-7) var(--sp-6);
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(640px circle at 88% -15%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 60%),
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--text) 4%, transparent) 0 1px, transparent 1px 22px);
}
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; max-width: 900px; }
.page-head .lead { color: var(--text-muted); max-width: 760px; margin: 0; }

/* ---------- partner table (/partnerships) ---------- */
/* Founder direction 2026-10-16: strict 1:1 logo+partner pairing, no ribbons,
   every logo the same visual size regardless of its own aspect ratio. Third-
   party marks sit on a white card unconditionally (both themes) -- their
   brand colours aren't ours to repaint with the token system; AEC's own mark
   gets the same treatment for visual consistency across every row, not
   because it needs the contrast fix the others do. */
.partner-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: var(--sp-5); }
.partner-table tr { border-bottom: 1px solid var(--border-soft); }
.partner-table tr:last-child { border-bottom: 0; }
.partner-table td { padding: var(--sp-5) 0; vertical-align: middle; }
.partner-table .partner-logo { width: 180px; padding-right: var(--sp-5); }
.partner-table .partner-logo a {
  display: flex; align-items: center; justify-content: center;
  width: 160px; height: 80px; background: #ffffff;
  border: 1px solid var(--border-soft); border-radius: var(--radius-card);
  padding: var(--sp-3);
}
.partner-table .partner-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; }
.partner-table .partner-desc p { margin: 0; color: var(--text-muted); }
.partner-table .partner-desc strong { color: var(--text); }
@media (max-width: 640px) {
  .partner-table, .partner-table tbody, .partner-table tr, .partner-table td { display: block; width: 100%; }
  .partner-table tr { padding-block: var(--sp-4); }
  .partner-table .partner-logo { padding-right: 0; padding-bottom: var(--sp-3); }
  .partner-table .partner-logo a { width: 160px; }
}
.crumbs { font-size: 14px; color: var(--text-muted); margin-bottom: var(--sp-3); }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--brand-text); }

/* ---------- article layout (service + post) ---------- */
.with-aside { display: grid; gap: var(--sp-6); padding-block: var(--sp-6) var(--sp-8); }
@media (min-width: 1024px) { .with-aside { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--sp-8); } }
.prose { max-width: 740px; }
.prose > h2 { margin-top: var(--sp-7); padding-top: var(--sp-2); }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--fs-h4); }
.prose h4 { font-size: var(--fs-h5); margin-bottom: var(--sp-1); }
.prose ul li::marker { color: var(--brand-ui); }
aside.side { display: grid; gap: var(--sp-4); align-content: start; }
@media (min-width: 1024px) { aside.side { position: sticky; top: var(--sp-4); } }
.toc { font-size: 15px; }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin: 0 0 var(--sp-2); font-weight: 600; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border-soft); }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px var(--sp-3); color: var(--text); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--brand-text); border-left-color: var(--brand); }
.person { display: grid; gap: var(--sp-2); }
.person .who { font-weight: 600; }
.person .role { color: var(--text-muted); font-size: 14px; margin-top: -6px; }
.person a { font-size: 15px; }
.byline { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); color: var(--text-muted); font-size: 15px; margin-top: var(--sp-3); }
.related { border-top: 1px solid var(--border-soft); padding-block: var(--sp-7); }

/* ---------- contact ---------- */
.contact-big { font-size: clamp(1.125rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.3; display: inline-block; overflow-wrap: anywhere; }
.contact-grid { display: grid; gap: var(--sp-5); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-grid .card h2 { font-size: var(--fs-h5); text-transform: uppercase; letter-spacing: .3px; color: var(--text-muted); margin-bottom: var(--sp-2); }
address { font-style: normal; }

/* ---------- footer ---------- */
.site-foot { margin-top: 0; padding: var(--sp-7) 0 var(--sp-5); }
.foot-in { padding-inline: var(--sp-3); }
@media (min-width: 768px) { .foot-in { grid-template-columns: 1.4fr 1fr 1fr 1fr; padding-inline: var(--sp-4); } }
.site-foot h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .4px; margin: 0 0 var(--sp-3); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: var(--sp-2); font-size: 15px; }
.site-foot .brandline { font-weight: 600; }
.foot-base { max-width: var(--container); margin: var(--sp-6) auto 0; padding: var(--sp-4) var(--sp-4) 0; border-top: 1px solid var(--border-soft); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2); font-size: 14px; color: var(--text-muted); }
/* the component layer's animated nav underline is replaced by the active-state rule above */
.site-head nav a::after { content: none; }
.site-head nav .btn { color: var(--brand-on); }
.site-head nav .btn:hover { color: var(--surface); }
/* menus are <details>, which the component layer styles as an FAQ accordion: reset that here */
.site-head details { border: 0; padding: 0; }
.site-head details > summary { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: var(--fs-nav); font-weight: 500; justify-content: flex-start; }
.site-head details > summary + * { margin-top: 0; }
.site-head .menu-list details > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); font-weight: 400; color: inherit; }
.site-head .menu-list details[open] > summary::after { content: ""; transform: translateY(2px) rotate(-135deg); }
.site-head .menu-list details[open] > summary, .site-head .menu-list details.is-active > summary { color: var(--brand-text); }
.site-head .menu-mobile > summary { font-weight: 600; }
.site-head .menu-mobile > summary::after { content: none; }
.site-head .sub a { padding: var(--sp-2) var(--sp-4); }
@media (max-width: 1099px) {
  .site-head .sub a { padding: var(--sp-2) 0; }
  .site-head .menu-list summary { width: 100%; justify-content: space-between; padding: var(--sp-3) 0; }
}

.site-head nav .btn { padding: 0 var(--btn-px); white-space: nowrap; }

/* ---------- 2026 motion + depth polish ---------- */
/* Restrained load-in on the hero and page-head content blocks ONLY -- not
   every card on every page, which reads busy/cheap on a B2B consulting
   site. prefers-reduced-motion is already handled globally in
   components.css S3 (it zeroes every animation-duration site-wide), so no
   separate reduced-motion override is needed for this plain @keyframes. */
@keyframes panel-rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .wrap > div:first-child,
.page-head .wrap {
  animation: panel-rise-in .45s ease-out both;
}
.hero-photo {
  animation: panel-rise-in .5s ease-out .1s both;
}

/* Floating-panel hover/focus depth: cards and tiles lift off the page
   instead of sitting flat. The shadow layers the existing --shadow-card
   under a colour-mixed offset shadow -- same recipe as the CTA-band /
   page-head glows above, so it tracks both themes with no override. */
.card,
.svc,
.quote,
.post-card,
.method li,
.testimonial,
.partner-table .partner-logo a {
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover, .card:focus-within,
.svc:hover, .svc:focus-within,
.quote:hover, .quote:focus-within,
.post-card:hover, .post-card:focus-within,
.method li:hover, .method li:focus-within,
.testimonial:hover, .testimonial:focus-within,
.partner-table .partner-logo a:hover, .partner-table .partner-logo a:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -16px color-mix(in srgb, var(--text) 22%, transparent), var(--shadow-card);
}

/* Button lift. Redeclares the FULL transition list components.css's .btn
   already sets (same property, this file loads later and wins outright --
   a partial redeclare would silently drop the color/background/border
   transitions), with transform + box-shadow joining them. */
.btn {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease,
              transform .18s ease, box-shadow .18s ease;
}
.btn:hover, .btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--text) 25%, transparent);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
