/* ==========================================================================
   DigiCov - Components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   Accent colour is reserved for CTAs only - that restraint is what keeps the
   orange feeling premium rather than loud.
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--c-charcoal);
  --btn-fg: var(--c-white);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 0.875rem 1.625rem;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--tr-tight);
  line-height: 1;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;
  transition:
    transform   var(--d-base) var(--ease-out),
    box-shadow  var(--d-base) var(--ease-out),
    background  var(--d-base) var(--ease-out),
    border-color var(--d-base) var(--ease-out),
    color       var(--d-base) var(--ease-out);
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); transition-duration: var(--d-fast); }

.btn svg { width: 1.05em; height: 1.05em; flex: none; }

/* The arrow nudges forward on hover - small, and it does a lot of work */
.btn .btn-arrow { transition: transform var(--d-base) var(--ease-out); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* Primary - the brand gradient, with a brighter layer cross-fading in */
.btn--primary {
  --btn-bg: var(--c-orange);
  background: var(--grad-brand);
  box-shadow: 0 6px 18px -6px rgba(255, 90, 60, 0.5);
}
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, #FF8C1A 0%, #FF6B50 100%);
  opacity: 0;
  transition: opacity var(--d-base) var(--ease-out);
}
.btn--primary:hover {
  box-shadow: var(--e-brand);
}
.btn--primary:hover::after { opacity: 1; }

/* Secondary - outline on light backgrounds */
.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--text-strong);
  border-color: var(--border);
}
.btn--secondary:hover {
  border-color: var(--c-charcoal);
  background: var(--c-charcoal);
  --btn-fg: var(--c-white);
}

/* Ghost - outline on dark backgrounds */
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--c-white);
  border-color: var(--border-invert);
}
.btn--ghost:hover {
  background: var(--c-white);
  --btn-fg: var(--c-charcoal);
  border-color: var(--c-white);
}

.btn--lg { padding: 1.0625rem 2rem; font-size: var(--fs-body); }
.btn--block { width: 100%; }

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

/* Text link with an underline that draws in from the left */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-coral);
  position: relative;
}
.link-arrow svg { width: 1em; height: 1em; transition: transform var(--d-base) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  border-radius: var(--r-full);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-slow) var(--ease-expo);
}
.link-arrow:hover::after { transform: scaleX(1); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition:
    background   var(--d-slow) var(--ease-out),
    box-shadow   var(--d-slow) var(--ease-out),
    border-color var(--d-slow) var(--ease-out),
    height       var(--d-slow) var(--ease-out);
  border-bottom: 1px solid transparent;
}

/* Condensed state once the page scrolls past the hero's first fold */
.site-header.is-stuck {
  height: 64px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--border-soft);
  box-shadow: var(--e-1);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  width: 100%;
}

/* Logo lockup: SVG mark + wordmark set in the display face */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}
/* Height-driven so the mark's 135:126 ratio is never squashed */
.logo img { height: 38px; width: auto; transition: transform var(--d-slow) var(--ease-spring), height var(--d-slow) var(--ease-out); }
.logo:hover img { transform: rotate(-6deg) scale(1.06); }

/* Touch has no hover, so the mark was completely static on phones. It now
   settles in on load, using the same rotate-and-scale language as the hover so
   the two read as one idea rather than two effects.

   fill-mode is `backwards`, not `forwards`: a forwards-filled animation would
   keep owning `transform` after it finished and silently kill the hover
   transition, since animations outrank transitions in the cascade. */
.site-header .logo img {
  animation: logo-settle 720ms var(--ease-spring) 120ms backwards;
}
@keyframes logo-settle {
  from { opacity: 0; transform: rotate(-14deg) scale(0.72); }
}

/* Press feedback - the only transform state a touch device can actually reach */
.logo:active img {
  transform: rotate(-4deg) scale(0.94);
  transition-duration: var(--d-fast);
}

@media (prefers-reduced-motion: reduce) {
  .site-header .logo img { animation: none; }
}
.logo-word {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--text-strong);
  line-height: 1;
}
.logo--light .logo-word { color: var(--c-white); }

.site-header.is-stuck .logo img { height: 34px; }

/* Desktop navigation */
.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: var(--s-1); }

.nav-link {
  position: relative;
  display: block;
  padding: 0.55rem 0.9rem;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-body);
  border-radius: var(--r-8);
  transition: color var(--d-base) var(--ease-out);
}
.nav-link:hover { color: var(--text-strong); }

/* Active page gets a gradient underline rather than a heavy fill */
.nav-link::after {
  content: '';
  position: absolute;
  left: 0.9rem; right: 0.9rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--d-slow) var(--ease-expo);
}
.nav-link:hover::after { transform: scaleX(0.5); }
.nav-link[aria-current="page"] { color: var(--text-strong); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.header-cta { flex: none; }

/* Hamburger - three bars that fold into an X */
.nav-toggle {
  display: none;
  flex: none;
  width: 42px; height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
  margin-left: auto;
}
.nav-toggle-box { position: relative; width: 18px; height: 12px; }
.nav-toggle-bar {
  position: absolute;
  left: 0;
  width: 100%; height: 2px;
  background: var(--c-charcoal);
  border-radius: var(--r-full);
  transition: transform var(--d-slow) var(--ease-expo), opacity var(--d-fast) linear;
}
.nav-toggle-bar:nth-child(1) { top: 0; }
.nav-toggle-bar:nth-child(2) { top: 5px; }
.nav-toggle-bar:nth-child(3) { top: 10px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; transform: scaleX(0.3); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1000px) {
  .nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* The hero globe now bleeds under the top-right of the header on phones, and
   charcoal bars on a charcoal sphere are unreadable. A translucent plate keeps
   the toggle legible over whatever it happens to sit on. */
@media (max-width: 900px) {
  .nav-toggle {
    background: rgba(255, 255, 255, 0.82);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-color: var(--border-soft);
    box-shadow: var(--e-1);
  }
}

/* --------------------------------------------------------------------------
   Mobile navigation panel
   -------------------------------------------------------------------------- */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--c-charcoal);
  display: flex;
  flex-direction: column;
  padding: var(--s-6) var(--gutter) var(--s-10);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--d-slow) var(--ease-out), visibility var(--d-slow);
}
.mobile-nav.is-open { visibility: visible; opacity: 1; }

.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; height: 42px; }
.mobile-nav-close {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border-invert);
  border-radius: var(--r-full);
  color: var(--c-white);
  cursor: pointer;
}

.mobile-nav-list {
  margin-top: var(--s-12);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: var(--tr-heading);
  color: var(--c-white);
  border-bottom: 1px solid var(--border-invert);
  /* Links cascade in after the panel opens */
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--d-slow) var(--ease-out), transform var(--d-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 55ms + 90ms);
}
.mobile-nav.is-open .mobile-nav-link { opacity: 1; transform: none; }
.mobile-nav-link[aria-current="page"] { color: var(--c-orange); }

.mobile-nav-foot { margin-top: auto; padding-top: var(--s-8); }
.mobile-nav-foot .btn { width: 100%; }
.mobile-nav-meta {
  margin-top: var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--text-on-invert-mut);
}
.mobile-nav-meta a:hover { color: var(--c-white); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-16);
  overflow: hidden;
  transition:
    transform    var(--d-slow) var(--ease-out),
    box-shadow   var(--d-slow) var(--ease-out),
    border-color var(--d-slow) var(--ease-out);
}

/* A gradient hairline sweeps across the top edge on hover */
.card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--grad-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--d-slower) var(--ease-expo);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--e-3);
  border-color: transparent;
}
.card:hover::before { transform: scaleX(1); }

.card .h3 { margin-bottom: var(--s-3); }
.card p { font-size: var(--fs-sm); line-height: var(--lh-relaxed); }
.card .link-arrow { margin-top: auto; padding-top: var(--s-6); }

.card--dark {
  background: var(--surface-invert-2);
  border-color: var(--border-invert);
  color: var(--text-on-invert-mut);
}
.card--dark:hover { border-color: transparent; box-shadow: var(--e-4); }

/* Icon plate - soft accent wash that saturates on card hover */
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  margin-bottom: var(--s-6);
  border-radius: var(--r-12);
  background: var(--accent-wash);
  color: var(--c-coral);
  flex: none;
  transition: background var(--d-slow) var(--ease-out), color var(--d-slow) var(--ease-out), transform var(--d-slow) var(--ease-spring);
}
.card-icon svg { width: 24px; height: 24px; }
.card:hover .card-icon {
  background: var(--grad-brand);
  color: var(--c-white);
  transform: scale(1.06) rotate(-4deg);
}

/* Numbered process card */
.card-num {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--tr-display);
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--s-4);
}

/* --------------------------------------------------------------------------
   Chips / pills
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.4rem 0.85rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text-body);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  /* Explicit properties, not `all`: `all` sweeps in visibility, which made
     these vanish when an ancestor animated it. */
  transition: color var(--d-base) var(--ease-out),
              background-color var(--d-base) var(--ease-out),
              border-color var(--d-base) var(--ease-out);
}
.chip:hover { border-color: var(--c-coral); color: var(--c-coral); }
.chip--accent {
  color: var(--c-coral);
  background: var(--accent-wash);
  border-color: transparent;
}
.chip--invert {
  color: var(--text-on-invert-mut);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-invert);
}

.chip-row { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Availability dot with a soft pulse */
.status-dot {
  width: 7px; height: 7px;
  border-radius: var(--r-full);
  background: var(--c-success);
  flex: none;
  position: relative;
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1.5px solid var(--c-success);
  opacity: 0;
  animation: pulse 2.4s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { opacity: 0.7; transform: scale(0.7); }
  70%  { opacity: 0;   transform: scale(1.35); }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot::after { animation: none; }
}

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.7rem + 2.3vw, 3.25rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: var(--tr-display);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}
.section--dark .stat-value { color: var(--c-white); }
.stat-label {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.section--dark .stat-label { color: var(--text-on-invert-mut); }

/* --------------------------------------------------------------------------
   Accordion
   -------------------------------------------------------------------------- */

.accordion { border-top: 1px solid var(--border); }
.accordion-item { border-bottom: 1px solid var(--border); }

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
  width: 100%;
  padding: var(--s-6) 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: 600;
  letter-spacing: var(--tr-tight);
  color: var(--text-strong);
  transition: color var(--d-base) var(--ease-out);
}
.accordion-trigger:hover { color: var(--c-coral); }

.accordion-icon {
  position: relative;
  flex: none;
  width: 32px; height: 32px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  transition: all var(--d-slow) var(--ease-out);
}
.accordion-icon::before,
.accordion-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 11px; height: 1.5px;
  background: currentColor;
  border-radius: var(--r-full);
  transform: translate(-50%, -50%);
  transition: transform var(--d-slow) var(--ease-expo);
}
.accordion-icon::after { transform: translate(-50%, -50%) rotate(90deg); }

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  background: var(--grad-brand);
  border-color: transparent;
  color: var(--c-white);
}
.accordion-trigger[aria-expanded="true"] .accordion-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

/* Height is animated via grid-template-rows so no JS measurement is needed */
.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--d-slow) var(--ease-out);
}
.accordion-panel > div { overflow: hidden; }
.accordion-item.is-open .accordion-panel { grid-template-rows: 1fr; }
.accordion-panel p {
  padding-bottom: var(--s-6);
  max-width: 68ch;
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   Marquee - logo / tech strip
   -------------------------------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: var(--s-16);
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: var(--tr-tight);
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  opacity: 0.75;
  transition: opacity var(--d-base) var(--ease-out), color var(--d-base) var(--ease-out);
}
.marquee-item:hover { opacity: 1; color: var(--text-strong); }
.marquee-item svg { width: 20px; height: 20px; color: var(--c-coral); }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; gap: var(--s-6); }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: var(--s-2); }

.label {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-strong);
}
.label .req { color: var(--c-coral); }

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: var(--fs-body);
  color: var(--text-strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-12);
  transition:
    border-color var(--d-base) var(--ease-out),
    box-shadow   var(--d-base) var(--ease-out),
    background   var(--d-base) var(--ease-out);
}
.input::placeholder, .textarea::placeholder { color: #9AA3B0; }

.input:hover, .textarea:hover, .select:hover { border-color: #CBD2DC; }

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--c-orange);
  box-shadow: 0 0 0 4px var(--accent-wash-strong);
}

.textarea { resize: vertical; min-height: 148px; line-height: var(--lh-normal); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
  cursor: pointer;
}

/* Validation state, applied by form.js */
.field.has-error .input,
.field.has-error .textarea,
.field.has-error .select {
  border-color: var(--c-error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
.field-error {
  display: none;
  font-size: var(--fs-xs);
  color: var(--c-error);
  font-weight: 500;
}
.field.has-error .field-error { display: block; }

/* Budget / service selector rendered as pill radios */
.pill-group { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pill-group input { position: absolute; opacity: 0; pointer-events: none; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-body);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--d-base) var(--ease-out);
  user-select: none;
}
.pill:hover { border-color: var(--c-coral); color: var(--c-coral); }
.pill-group input:checked + .pill {
  color: var(--c-white);
  background: var(--c-charcoal);
  border-color: var(--c-charcoal);
}
.pill-group input:focus-visible + .pill {
  outline: 2px solid var(--c-orange);
  outline-offset: 3px;
}

.checkbox-row { display: flex; align-items: flex-start; gap: var(--s-3); }
.checkbox-row input { margin-top: 0.28rem; accent-color: var(--c-orange); width: 16px; height: 16px; flex: none; }
.checkbox-row label { font-size: var(--fs-sm); color: var(--text-muted); }

/* Honeypot - bots fill it, humans never see it */
.hp-field {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* Submit button spinner */
.btn .spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: var(--c-white);
  border-radius: var(--r-full);
  animation: spin 0.6s linear infinite;
  display: none;
}
.btn.is-loading .spinner   { display: block; }
.btn.is-loading .btn-label { opacity: 0.75; }
.btn.is-loading .btn-arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result banner */
.form-note {
  display: none;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-4);
  border-radius: var(--r-12);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
}
.form-note.is-shown { display: flex; }
.form-note svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.form-note--ok {
  background: rgba(22, 163, 74, 0.08);
  color: #14803B;
  border: 1px solid rgba(22, 163, 74, 0.22);
}
.form-note--err {
  background: rgba(239, 68, 68, 0.07);
  color: #C2352F;
  border: 1px solid rgba(239, 68, 68, 0.22);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--c-charcoal);
  color: var(--text-on-invert-mut);
  padding-block: var(--s-12) var(--s-6);
  position: relative;
  overflow: hidden;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: var(--s-10) var(--s-8);
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-8); } }

/* Nine service links stacked one per line was the single biggest contributor
   to footer height. Two columns halves it. */
.footer-links.footer-links--split {   /* compound: beats .footer-links regardless of source order */
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3) var(--s-5);
}
@media (max-width: 520px) { .footer-links--split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.footer-email {
  display: inline-block;
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--c-white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 2px;
  transition: border-color var(--d-base) var(--ease-out), color var(--d-base) var(--ease-out);
}
.footer-email:hover { color: var(--c-orange); border-color: var(--c-orange); }

.footer-brand { max-width: 34ch; }
.footer-brand p { margin-top: var(--s-4); font-size: var(--fs-sm); }

/* The tagline carries the brand voice; the locale line underneath carries the
   local-search signal. Kept visually distinct so neither dilutes the other. */
.footer-tagline {
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-tight);
  color: var(--c-white);
}
.footer-locale { color: var(--text-on-invert-mut); }

/* Service area, reduced to one line above the legal bar */
.footer-areas {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border-invert);
  font-size: var(--fs-sm);
  color: var(--text-on-invert-mut);
}

.footer-title {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tr-wide);
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: var(--s-4);
}

.footer-links { display: flex; flex-direction: column; gap: var(--s-3); }
.footer-links a {
  font-size: var(--fs-sm);
  color: var(--text-on-invert-mut);
  width: fit-content;
  transition: color var(--d-base) var(--ease-out), transform var(--d-base) var(--ease-out);
}
.footer-links a:hover { color: var(--c-white); transform: translateX(3px); }

.social-row { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-invert);
  color: var(--text-on-invert-mut);
  transition: all var(--d-base) var(--ease-out);
}
.social-link svg { width: 17px; height: 17px; }
.social-link:hover {
  background: var(--grad-brand);
  border-color: transparent;
  color: var(--c-white);
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-invert);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  font-size: var(--fs-xs);
}
.footer-bottom nav { display: flex; gap: var(--s-6); flex-wrap: wrap; }
.footer-bottom a:hover { color: var(--c-white); }

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: var(--s-6);
  bottom: var(--s-6);
  z-index: var(--z-sticky);
  width: 46px; height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-full);
  background: var(--c-charcoal);
  color: var(--c-white);
  cursor: pointer;
  box-shadow: var(--e-3);
  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition: all var(--d-slow) var(--ease-out);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--grad-brand); transform: translateY(-3px); }
.to-top svg { width: 18px; height: 18px; }

/* A trailing orphan in a three-up grid (7 services, 9th industry, etc.) reads
   as a mistake when it sits alone on the left. Centre it instead. */
@media (min-width: 961px) {
  .grid--3 > :last-child:nth-child(3n + 1) { grid-column: 2; }
}


/* --------------------------------------------------------------------------
   Header over a dark page head
   Until the header gains its white background on scroll, it is transparent -
   which means charcoal type on a charcoal hero is invisible. Pages whose head
   is inverted opt in with .site-header--over-dark and get reverse styling for
   exactly that window.
   -------------------------------------------------------------------------- */

/* The two marks cross-fade rather than swapping with display, which is
   instant. A display swap flips the mark to charcoal the moment .is-stuck
   lands, while the header background is still 400ms from being white - so the
   logo vanishes for the length of that transition. Same duration on both
   keeps them in step. */
.logo { position: relative; }
.logo-light {
  position: absolute;
  inset: 0 auto 0 0;
  opacity: 0;
  pointer-events: none;
}
.logo-dark, .logo-light { transition: opacity var(--d-slow) var(--ease-out); }
.logo-word { transition: color var(--d-slow) var(--ease-out); }

.site-header--over-dark:not(.is-stuck) .logo-dark  { opacity: 0; }
.site-header--over-dark:not(.is-stuck) .logo-light { opacity: 1; }
.site-header--over-dark:not(.is-stuck) .logo-word  { color: var(--c-white); }

.site-header--over-dark:not(.is-stuck) .nav-link { color: rgba(255, 255, 255, 0.72); }
.site-header--over-dark:not(.is-stuck) .nav-link:hover,
.site-header--over-dark:not(.is-stuck) .nav-link[aria-current="page"] { color: var(--c-white); }

.site-header--over-dark:not(.is-stuck) .nav-toggle {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}
.site-header--over-dark:not(.is-stuck) .nav-toggle-bar { background: var(--c-white); }

/* --------------------------------------------------------------------------
   Phone: country code + national number
   -------------------------------------------------------------------------- */

.phone-group {
  display: grid;
  /* Fixed narrow column for the code so the number field takes everything
     else. `auto` sized the select to its widest option (AE +971) and left the
     number cramped. */
  grid-template-columns: 5.75rem minmax(0, 1fr);
  gap: var(--s-2);
}
.phone-cc {
  width: 100%;
  padding-inline: 0.6rem 1.55rem;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  background-position: right 0.45rem center;
  background-size: 14px 14px;
}
.phone-num { min-width: 0; }
