/* Theme additions that the static design did not need. */
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 1000; }
.skip-link:focus { left: 8px; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
img { max-width: 100%; }

/* Mobile menu (the design hides the links below 980px without a replacement) */
.nav-toggle { display: none; position: relative; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; align-items: center; justify-content: center; margin-left: 8px; padding: 0; color: var(--navy); }
.nav-toggle svg { position: absolute; width: 20px; height: 20px; transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .2s ease; }
.nav-toggle .x { opacity: 0; transform: rotate(-90deg) scale(.7); }
.nav-toggle[aria-expanded="true"] .bars { opacity: 0; transform: rotate(90deg) scale(.7); }
.nav-toggle[aria-expanded="true"] .x { opacity: 1; transform: none; }
.mobile-menu { display: none; }
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .mobile-menu {
    display: block; position: fixed; left: 0; right: 0; top: var(--nav-h, 64px); bottom: 0; background: #fff; z-index: 49; padding: 12px 24px 32px; overflow-y: auto; border-top: 1px solid var(--line);
    visibility: hidden; opacity: 0; transform: translateY(-12px); pointer-events: none;
    transition: opacity .28s ease, transform .32s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .32s;
  }
  .mobile-menu.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .28s ease, transform .32s cubic-bezier(.4, 0, .2, 1), visibility 0s; }
  .mobile-menu > * { opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
  .mobile-menu.is-open > * { opacity: 1; transform: none; transition: opacity .35s ease, transform .35s cubic-bezier(.2, .7, .2, 1); }
  .mobile-menu.is-open > :nth-child(1) { transition-delay: .06s; }
  .mobile-menu.is-open > :nth-child(2) { transition-delay: .10s; }
  .mobile-menu.is-open > :nth-child(3) { transition-delay: .14s; }
  .mobile-menu.is-open > :nth-child(4) { transition-delay: .18s; }
  .mobile-menu.is-open > :nth-child(5) { transition-delay: .22s; }
  .mobile-menu.is-open > :nth-child(6) { transition-delay: .26s; }
  .mobile-menu a:not(.btn) { display: block; padding: 14px 0; font-size: 17px; font-weight: 500; color: var(--navy); border-bottom: 1px solid var(--line); }
  .mobile-menu .mm-label { display: block; padding: 18px 0 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--signal); }
  .mobile-menu .mm-sub a:not(.btn) { padding-left: 14px; font-size: 16px; font-weight: 400; }
  body.menu-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu.is-open, .mobile-menu > *, .mobile-menu.is-open > *, .nav-toggle svg { transition: none !important; transition-delay: 0s !important; }
}

/* Forms */
.form-notice { margin-top: 16px; padding: 14px 16px; border-radius: 8px; background: var(--bg-alt); border: 1px solid var(--line-strong); font-size: 14px; color: var(--ink-2); }
.form-notice.is-error { border-color: #C2453B; color: #8F2D25; background: #FDF1EF; }
.field-error { display: block; margin-top: 6px; font-size: 13px; color: #C2453B; }

/* Contact: the live calendar link replaces the static scheduler mock */
.sched-cta { grid-column: 1 / -1; text-align: center; padding: 48px 24px; }
.sched-cta-lead { max-width: 440px; margin: 0 auto 24px; font-size: 17px; line-height: 1.5; color: var(--ink-2); }

/* Case study detail */
.cs-detail-hero { padding-bottom: 56px; }
.cs-back { display: block; margin-bottom: 22px; font-size: 14px; font-weight: 500; color: var(--signal); }
.cs-back:hover { text-decoration: underline; }
.cs-detail-body { padding: 72px 0 96px; }
.cs-prose { max-width: 720px; margin: 0 auto; font-size: 17px; line-height: 1.7; color: var(--ink-2); }
.cs-prose h2 { margin: 2.2em 0 .6em; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; color: var(--navy); }
.cs-prose h2:first-child { margin-top: 0; }
.cs-prose p { margin: 0 0 1.2em; }
.cs-prose ul { margin: 0 0 1.4em; padding-left: 1.2em; }
.cs-prose li { margin-bottom: .5em; }
.cs-prose li::marker { color: var(--muted); }
.cs-prose strong { color: var(--ink); font-weight: 600; }
.cs-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--lime); font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--navy); }
.cs-prose a { color: var(--signal); border-bottom: 1px solid rgba(24,95,165,.32); }
.cs-prose img { border-radius: 8px; height: auto; }
.cs-detail-hero .hero-stats { margin-top: 36px; flex-wrap: wrap; }

/* Article body: keep table of contents hidden until JS has built it */
.article-body img { height: auto; border-radius: 8px; }

/* Consent banner */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900; max-width: 760px; margin: 0 auto; background: #fff; color: var(--ink); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(4,44,83,.35); padding: 20px 22px; }
.consent h2 { margin: 0 0 6px; font-size: 16px; color: var(--navy); }
.consent p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.consent a { color: var(--signal); text-decoration: underline; text-underline-offset: 2px; }
.consent-gpc { padding: 8px 10px; background: var(--bg-alt); border-radius: 6px; font-size: 13px !important; }
.consent-prefs { margin: 10px 0 4px; border-top: 1px solid var(--line); }
.consent-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.consent-row small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.consent-row input { width: 20px; height: 20px; accent-color: var(--signal); flex: none; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.consent-actions .btn { padding: 10px 18px; font-size: 14px; min-height: 40px; }
.consent .btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line-strong); }
.consent-link { background: none; border: 0; padding: 8px 4px; font-size: 14px; color: var(--signal); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.consent-reopen { cursor: pointer; background: none; border: 0; padding: 0; font: inherit; color: inherit; }
@media (max-width: 520px) {
  .consent { left: 8px; right: 8px; bottom: 8px; padding: 16px; max-height: 80vh; overflow-y: auto; }
  .consent-actions .btn { flex: 1 1 100%; }
}

/* Filter empty states */
.filter-empty { grid-column: 1 / -1; text-align: center; padding: 48px 0; color: var(--muted); }
.filter-empty button { background: none; border: 0; color: var(--signal); font-weight: 500; cursor: pointer; text-decoration: underline; }
