.site-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  width: min(100% - 32px, var(--max));
  min-height: 62px;
  margin: 12px auto 0;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 19, 19, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: clamp(100px, 10vw, 140px);
  height: 44px;
  min-width: 0;
  padding: 0;
  border-radius: 999px;
  font-family: var(--font-accent);
  color: var(--ink);
  line-height: 1;
  text-transform: uppercase;
}

.brand-logo::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  width: clamp(90px, 9vw, 126px);
  aspect-ratio: 1720 / 448;
  background: url("../assets/images/brand/rmcm-logo-clean.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.32));
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
}

.brand-logo-piece {
  display: none;
}

.nav-pill {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  transition: color 200ms ease, background 200ms ease, transform 200ms ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-item.is-open > .nav-link {
  background: var(--dark-pill);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-item {
  position: relative;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: -0.5rem;
  right: -0.5rem;
  top: 100%;
  height: 28px;
}

.nav-chevron {
  width: 10px;
  height: 7px;
  margin-left: 0.4rem;
  color: currentColor;
  transition: transform 220ms ease;
}

.nav-item:hover .nav-chevron,
.nav-item.is-open .nav-chevron,
[data-services-trigger][aria-expanded="true"] .nav-chevron {
  transform: rotate(180deg);
}

.services-menu {
  position: absolute;
  top: calc(100% + 22px);
  left: 50%;
  display: grid;
  gap: 0.7rem;
  width: min(320px, calc(100vw - 32px));
  padding: 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--orange);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, 10px, 0);
  transition: opacity 180ms ease, transform 180ms ease;
}

.services-menu a {
  position: relative;
  display: block;
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--dark-pill);
  border: 0;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}

.services-menu a:hover,
.services-menu a:focus-visible {
  background: var(--dark-pill);
  color: var(--yellow);
  transform: translateY(-1px);
}

.nav-item:hover .services-menu,
.nav-item.is-open .services-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0);
}

.mobile-toggle {
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--dark-pill);
  color: var(--ink);
}

.mobile-toggle::before,
.mobile-toggle::after {
  content: "";
  grid-area: 1 / 1;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-4px);
}

.mobile-toggle::after {
  transform: translateY(4px);
}

.mobile-menu {
  position: fixed;
  inset: 96px 16px auto;
  z-index: 19;
  display: grid;
  gap: 0.5rem;
  max-height: calc(100dvh - 112px);
  overflow-y: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(6, 19, 19, 0.96);
  box-shadow: var(--shadow);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  border-radius: 16px;
  padding: 0.95rem 1rem;
  color: var(--ink);
  font-weight: 800;
  text-transform: uppercase;
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible {
  background: var(--panel-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  min-height: 52px;
  max-width: 100%;
  padding: 0.35rem 1.1rem 0.35rem 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: var(--dark-pill);
  font-weight: 800;
  white-space: normal;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 24px rgba(0, 0, 0, 0.28);
  transition: transform 220ms ease, background 220ms ease, color 220ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--dark-pill);
  color: var(--ink);
}

.nav-cta {
  min-height: 42px;
  padding: 0.25rem 0.85rem 0.25rem 0.25rem;
  font-size: 0.8rem;
}

.nav-cta .btn-icon {
  width: 32px;
  height: 32px;
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(6, 19, 19, 0.96);
  color: var(--ink);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

.audit-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.05rem;
  width: min(100%, 560px);
  margin-top: 1.25rem;
}

.audit-form .btn {
  align-self: end;
}

.audit-footer .audit-form input,
.audit-footer .audit-form select,
.audit-footer .audit-form textarea {
  background: rgba(6, 19, 19, 0.94);
}

.field {
  display: grid;
  gap: 0.55rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.field span {
  color: var(--ink);
}

.field-wide {
  grid-column: 1 / -1;
}

.scan-state {
  position: relative;
  min-height: 48px;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(6, 19, 19, 0.7);
  color: var(--yellow);
  font-weight: 800;
}

.project-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(246, 240, 223, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(246, 240, 223, 0.08), rgba(255, 90, 61, 0.06));
  box-shadow: var(--shadow);
}

.project-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 26%);
}

.project-frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: top center;
}

.project-card .project-frame {
  height: clamp(180px, 22vw, 320px);
}

.work-card .project-frame {
  height: auto;
}

.work-card .project-frame img {
  display: block;
  height: auto;
  object-fit: contain;
  object-position: top center;
}

.carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: 2.5rem;
}

.carousel-track {
  display: grid;
  grid-auto-columns: minmax(280px, 52%);
  grid-auto-flow: column;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.35rem 0.1rem 1.3rem;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--orange) transparent;
}

.project-card {
  scroll-snap-align: start;
}

.project-card h3,
.work-card h2 {
  margin: 1rem 0 0.35rem;
  color: var(--ink);
  font-size: clamp(1.45rem, 2vw, 2.1rem);
  line-height: 1;
}

.project-card p,
.work-card p,
.insight-entry p {
  color: var(--muted);
}

.work-score {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  padding: 0.85rem 0;
  border-block: 1px solid rgba(255, 255, 255, 0.14);
}

.work-score span,
.work-score strong {
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 4.8rem);
  line-height: 0.86;
  letter-spacing: 0;
}

.work-score span {
  opacity: 0.5;
}

.work-facts {
  display: grid;
  gap: 0.45rem;
  margin: 0.2rem 0 0;
  padding: 0;
  list-style: none;
}

.work-facts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.58rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-weight: 700;
}

.work-facts strong {
  color: var(--ink);
  text-align: right;
}

.work-note {
  color: var(--ink);
}

.carousel-arrow {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--dark-pill);
  color: var(--ink);
  transition: transform 200ms ease, background 200ms ease;
}

.carousel-arrow:hover {
  background: var(--orange);
  transform: translateY(-2px);
}

.audit-footer {
  z-index: 4;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding-bottom: 0;
}

.audit-footer::before {
  content: none;
}

/* Compact padding for the audit footer — overrides the large .section defaults */
section.audit-footer.section {
  padding-top: clamp(48px, 6vw, 80px);
  padding-bottom: 0;
}

.audit-footer-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: end;
  min-height: min(760px, 74dvh);
}

.audit-footer-home {
  align-content: start;
  min-height: auto;
  margin-top: clamp(-90px, -6vw, -42px);
  padding-top: clamp(42px, 6vw, 86px);
}

.audit-footer-home .audit-footer-grid {
  align-items: center;
  min-height: min(620px, 58dvh);
}

.audit-copy {
  align-self: center;
  display: grid;
  gap: 0;
}

.audit-copy .display-small {
  font-size: clamp(2.7rem, 4.9vw, 5.1rem);
}

.audit-kicker {
  max-width: 520px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 1.3vw, 1.16rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.audit-art img {
  width: min(100%, 680px);
  margin-inline: auto;
  transform: translateY(9%);
  filter: drop-shadow(0 34px 48px rgba(0, 0, 0, 0.44));
}

.site-footer {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding-block: 1.5rem 1rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  justify-self: start;
}

.footer-links a {
  color: var(--muted);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  justify-self: center;
}

.site-footer > p {
  justify-self: end;
  margin: 0;
}

.social-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(246, 240, 223, 0.26);
  border-radius: 50%;
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 8px 22px rgba(0, 0, 0, 0.3);
  transition: transform 200ms ease, background 200ms ease, color 200ms ease;
}

.social-icon:hover,
.social-icon:focus-visible {
  background: var(--dark-pill);
  color: var(--ink);
  transform: translateY(-2px) rotate(-4deg);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .nav-pill,
  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: grid;
    justify-self: end;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 10px;
    width: min(100% - 20px, var(--max));
    min-height: 66px;
    margin-top: 10px;
  }

  .brand {
    width: 118px;
    height: 46px;
  }

  .brand-logo::before {
    width: 104px;
  }

  .audit-form,
  .audit-footer-grid {
    grid-template-columns: 1fr;
  }

  .audit-footer-grid {
    min-height: auto;
  }

  .audit-copy .display-small {
    font-size: clamp(2.25rem, 10vw, 3.3rem);
  }

  .audit-art img {
    width: min(100%, 520px);
    transform: translateY(4%);
  }

  .audit-form .btn {
    justify-self: start;
  }

  .carousel {
    grid-template-columns: 1fr;
  }

  .carousel-arrow {
    display: none;
  }

  .carousel-track {
    grid-auto-columns: minmax(260px, 86%);
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-links,
  .footer-socials,
  .site-footer > p {
    justify-self: center;
  }
}

/* ── Service page FAQ accordions ── */
.service-faq { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; padding: 0 24px 32px; }
.service-faq__label { font-size: 1rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 20px; font-family: var(--font-accent); }
.service-faq h2 { font-size: 1.75rem; color: var(--yellow); font-family: var(--font-display); text-transform: uppercase; margin-bottom: 1.25rem; }
.faq-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; background: var(--panel); }
.faq-item summary { padding: 16px 18px; cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; position: relative; padding-right: 44px; font-size: 1.0625rem; line-height: 1.45; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.375rem; color: var(--orange); font-weight: 400; }
.faq-item[open] summary::after { content: "-"; }
.faq-item__body { padding: 0 18px 18px; color: var(--muted); line-height: 1.7; font-size: 1.0625rem; }
.faq-item__body a { color: var(--orange-2); text-decoration: underline; text-underline-offset: 2px; }
.service-related { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; padding: 0 24px 20px; }
.service-related h3 { font-size: 1rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 14px; font-family: var(--font-accent); }
.service-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.service-related li::before { content: "→ "; color: var(--orange); font-weight: 700; }
.service-related a { color: var(--muted); text-decoration: none; font-size: 1.0625rem; }
.service-related a:hover { color: var(--ink); }

/* ── SEO Audit results card ── */
.audit-results {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin-top: 1.5rem;
}
.audit-results__url {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1rem;
  word-break: break-all;
  font-family: var(--font-body);
}
/* Overall score */
.audit-overall { margin-bottom: 1.25rem; }
.audit-score--big {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 28px;
  text-align: center;
}
.audit-score--big .audit-score__num {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--ink);
}
.audit-score--big .audit-score__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-accent);
}
[data-grade="poor"]       .audit-score__num { color: var(--orange); }
[data-grade="needs-work"] .audit-score__num { color: var(--yellow); }
[data-grade="good"]       .audit-score__num { color: var(--ink); }
/* Category bars */
.audit-cats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.25rem;
}
.audit-cat { display: flex; flex-direction: column; gap: 4px; }
.audit-cat__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.audit-cat__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  font-family: var(--font-body);
}
.audit-cat__num {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--ink);
}
.audit-cat__num[data-grade="poor"]       { color: var(--orange); }
.audit-cat__num[data-grade="needs-work"] { color: var(--yellow); }
.audit-cat__num[data-grade="good"]       { color: var(--ink); }
.audit-cat__bar {
  height: 5px;
  background: rgba(246, 240, 223, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.audit-cat__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--orange);
  transition: width 0.6s ease;
}
.audit-cat__fill[data-grade="needs-work"] { background: var(--yellow); }
.audit-cat__fill[data-grade="good"]       { background: rgba(246, 240, 223, 0.6); }
/* Issues / passes */
.audit-issues {
  background: rgba(255, 90, 61, 0.06);
  border: 1px solid rgba(255, 90, 61, 0.25);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 1rem;
}
.audit-passes {
  background: rgba(246, 240, 223, 0.04);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 1rem;
}
.audit-issues__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange-2);
  margin-bottom: 8px;
  font-family: var(--font-accent);
}
.audit-passes .audit-issues__label { color: var(--muted); }
.audit-issues__list, .audit-passes__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.audit-issues__list li {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}
.audit-issues__list li span { color: var(--orange); font-weight: 700; margin-right: 6px; }
.audit-passes__list li {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}
.audit-passes__list li span { color: rgba(246,240,223,0.5); font-weight: 700; margin-right: 6px; }
.audit-issues__none {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}
.audit-results__note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.65;
}
/* Error state */
.audit-results--error {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}
.audit-results__error-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.audit-results__error-body {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.65;
}
