/* ==========================================================================
   TATTOUH — components
   ========================================================================== */

/* --------------------------------------------------------------------------
   Glass surface
   The frosted-panel primitive everything else builds on. backdrop-filter is
   feature-detected: without it the fill is raised to an opaque surface colour
   so the panel never becomes an unreadable transparent box.
   -------------------------------------------------------------------------- */

.glass {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-glass);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  }
}

/* Specular top edge: the highlight that sells the material as glass. */
.glass::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28) 35%, rgba(255, 255, 255, 0.28) 65%, transparent);
  opacity: 0.7;
  pointer-events: none;
}

:root[data-theme='light'] .glass::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9) 50%, transparent);
}

.glass-strong {
  background: var(--glass-bg-strong);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-normal);
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn svg {
  flex: none;
  width: 1.05em;
  height: 1.05em;
  transition: transform var(--dur) var(--ease-out);
}

.btn-lg {
  padding: 1rem 1.85rem;
  font-size: var(--fs-body);
  border-radius: var(--r-md);
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: var(--fs-xs);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-on-primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset, 0 6px 20px -8px var(--primary);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--text-on-primary);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 14px 30px -10px var(--primary);
}

/* Sheen that sweeps across the primary button on hover. */
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.42) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform var(--dur-slow) var(--ease-out);
  pointer-events: none;
}
.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--text-strong);
  transform: translateY(-2px);
}

.btn-glass {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
}
.btn-glass:hover {
  border-color: var(--glass-border-hover);
  color: var(--text-strong);
  transform: translateY(-2px);
}

.btn-link {
  padding: 0;
  background: none;
  color: var(--primary);
  font-weight: var(--fw-semi);
}
.btn-link:hover {
  color: var(--primary-hover);
  gap: var(--sp-3);
}
.btn-link:hover svg {
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Eyebrow / pill / badge
   -------------------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--primary);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.eyebrow-plain::before {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.32rem 0.72rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.pill-primary {
  border-color: transparent;
  background: var(--primary-soft);
  color: var(--primary);
}

.pill-accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}

.pill-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* --------------------------------------------------------------------------
   Navigation + mega menu
   -------------------------------------------------------------------------- */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
}

.site-nav.is-stuck {
  background: var(--glass-bg-strong);
  border-bottom-color: var(--glass-border);
  box-shadow: var(--shadow-md);
  -webkit-backdrop-filter: blur(var(--glass-blur-lg)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur-lg)) saturate(170%);
}

/* While a mega panel is open the bar must be opaque regardless of scroll. */
.site-nav.is-open {
  background: var(--glass-bg-strong);
  border-bottom-color: var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur-lg)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur-lg)) saturate(170%);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Brand lockup link.
   Held at one size at every breakpoint. Shrinking it was tempting on mobile but
   the wordmark is 69% of the lockup, so anything under 38px tall drops it below
   the 120px brand minimum. At 38px the lockup is 178px wide and still fits a
   360px viewport, because the CTA button already hides below 420px. */
.brandlink {
  display: inline-flex;
  align-items: center;
  color: var(--text-strong);
  transition: color var(--dur-fast) var(--ease);
}
.brandlink:hover {
  color: var(--text-strong);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav-link:hover,
.nav-link[aria-expanded='true'],
.nav-link[aria-current='page'] {
  color: var(--text-strong);
  background: var(--primary-soft);
}

.nav-link__chevron {
  width: 14px;
  height: 14px;
  transition: transform var(--dur) var(--ease);
}
.nav-link[aria-expanded='true'] .nav-link__chevron {
  transform: rotate(180deg);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Mega panel
   Full-bleed: the panel spans the viewport and is anchored under the nav bar,
   while its contents stay inside the normal container. position: fixed rather
   than absolute because the panel must escape the nav's own width. It sits
   flush against the bottom of the bar (top = --nav-h) so there is no dead gap
   for the pointer to cross on the way down. */
.mega {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  width: 100%;
  border-bottom: 1px solid var(--glass-border);
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  background: var(--panel-bg);
  box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(var(--glass-blur-lg)) saturate(160%);
  backdrop-filter: blur(var(--glass-blur-lg)) saturate(160%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-out),
    visibility var(--dur) var(--ease);
  /* Never taller than the space below the bar; long menus scroll instead. */
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-item.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega__inner {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding: var(--sp-7) var(--gutter);
}

.mega__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-6);
}

/* Panels whose items are peers rather than grouped columns fill the full
   width instead of leaving a sparse single column. */
.mega__grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.mega__col-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-dim);
}

.mega__link {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  color: var(--text);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.mega__link:hover {
  background: var(--primary-soft);
  color: var(--text);
  transform: translateX(3px);
}

/* The text column must be a block box, otherwise the name and the description
   run together as inline spans on one line. */
.mega__text {
  display: block;
  min-width: 0;
}

.mega__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.mega__link:hover .mega__icon {
  background: var(--primary-soft-hover);
  border-color: var(--primary);
}
.mega__icon svg {
  width: 18px;
  height: 18px;
}

.mega__name {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  color: var(--text-strong);
  line-height: 1.3;
}

.mega__desc {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-dim);
}

.mega__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
}

/* Mobile drawer */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text);
}

.nav-toggle__bars {
  display: grid;
  gap: 4px;
}
.nav-toggle__bars span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur-fast) var(--ease);
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.drawer {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  /* env() keeps the last item clear of the iOS home indicator. */
  padding: var(--sp-5) var(--gutter) calc(var(--sp-8) + env(safe-area-inset-bottom, 0px));
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur-lg));
  backdrop-filter: blur(var(--glass-blur-lg));
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease-out),
    visibility var(--dur) var(--ease);
}
.drawer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.drawer__group + .drawer__group {
  border-top: 1px solid var(--rule);
}

.drawer__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: var(--sp-4) 0;
  cursor: pointer;
  list-style: none;
}
.drawer__summary::-webkit-details-marker {
  display: none;
}
.drawer__summary {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: var(--fw-semi);
  color: var(--text-strong);
  text-align: left;
}
.drawer__summary svg {
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  transition: transform var(--dur) var(--ease);
}
.drawer__group[open] .drawer__summary svg {
  transform: rotate(180deg);
}

.drawer__panel {
  padding-bottom: var(--sp-4);
  display: grid;
  gap: 2px;
}

.drawer__link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  /* 44px minimum tap target. */
  min-height: 44px;
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.drawer__link:hover {
  background: var(--primary-soft);
  color: var(--text-strong);
}

/* Flat top-level links in the drawer. They are peers of the collapsible
   groups, not children of one, so they carry the same weight as a group
   heading rather than the smaller sub-item treatment. */
.drawer__group--flat {
  display: grid;
  padding-block: var(--sp-2);
}

.drawer__link--top {
  min-height: 52px;
  padding-inline: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: var(--fw-semi);
  color: var(--text-strong);
}
.drawer__link--top:hover {
  padding-inline: var(--sp-3);
}

/* Below the desktop breakpoint the whole link row is replaced by the drawer,
   so the mega panels must never render even if something else reveals them. */
@media (max-width: 1024px) {
  .mega {
    display: none;
  }
}

/* Narrow desktop: three service columns get cramped, so let them wrap. */
@media (min-width: 1025px) and (max-width: 1200px) {
  .mega__grid {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  }
  .mega__inner {
    padding-block: var(--sp-6);
  }
}

/* --------------------------------------------------------------------------
   Theme toggle
   -------------------------------------------------------------------------- */

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
  transition: transform var(--dur-slow) var(--ease-spring), opacity var(--dur) var(--ease);
}
.theme-toggle .icon-moon {
  display: none;
}
:root[data-theme='light'] .theme-toggle .icon-moon {
  display: block;
}
:root[data-theme='light'] .theme-toggle .icon-sun {
  display: none;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .icon-moon {
    display: block;
  }
  :root:not([data-theme]) .theme-toggle .icon-sun {
    display: none;
  }
}
.theme-toggle:hover svg {
  transform: rotate(35deg);
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.card-hover:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-lg);
}

/* Pointer-tracked spotlight. --mx/--my are written by site.js on mousemove. */
.card-spot::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 0%),
    var(--primary-soft-hover),
    transparent 62%
  );
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  pointer-events: none;
}
.card-spot:hover::before {
  opacity: 1;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: var(--sp-2);
  border-radius: var(--r-md);
  background: var(--primary-soft);
  border: 1px solid var(--border);
  color: var(--primary);
  transition: transform var(--dur) var(--ease-spring), background var(--dur) var(--ease);
}
.card-hover:hover .card__icon {
  transform: scale(1.08) rotate(-4deg);
  background: var(--primary-soft-hover);
}
.card__icon svg {
  width: 22px;
  height: 22px;
}

.card__num {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  color: var(--primary);
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-normal);
  color: var(--text-strong);
  line-height: 1.3;
}

.card__body {
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-muted);
  flex: 1;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule);
}

/* Feature card: the emphasised one in a set. */
.card-feature {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border-color: var(--border-strong);
}
.card-feature::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -30%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aurora-1), transparent 68%);
  pointer-events: none;
}

/* Whole-card link */
a.card {
  color: inherit;
}
a.card:hover {
  color: inherit;
}

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

.stat__value {
  font-family: var(--font-display);
  font-size: var(--fs-stat);
  font-weight: var(--fw-black);
  line-height: 1;
  letter-spacing: var(--ls-tighter);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.stat__value--primary {
  background: linear-gradient(120deg, var(--primary), var(--primary-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  margin-top: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.5;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: var(--sp-6);
  padding-block: var(--sp-7);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stat-strip > * + * {
  padding-left: var(--sp-6);
  border-left: 1px solid var(--rule);
}

@media (max-width: 640px) {
  .stat-strip > * + * {
    padding-left: 0;
    padding-top: var(--sp-5);
    border-left: none;
    border-top: 1px solid var(--rule);
  }
}

/* --------------------------------------------------------------------------
   Process / timeline
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--sp-5);
}

.step__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
}

.step__badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  color: var(--primary);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.step:hover .step__badge {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--glow-primary);
}

.step__line {
  flex: 1;
  width: 1px;
  min-height: 28px;
  background: linear-gradient(180deg, var(--border-strong), transparent);
}

.step__body {
  padding-bottom: var(--sp-8);
}

.step:last-child .step__body {
  padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   Accordion (FAQ)
   -------------------------------------------------------------------------- */

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

.accordion__item {
  border-bottom: 1px solid var(--rule);
}

.accordion__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-5) 0;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semi);
  color: var(--text-strong);
  text-align: left;
  cursor: pointer;
  list-style: none;
  transition: color var(--dur-fast) var(--ease);
}
.accordion__summary::-webkit-details-marker {
  display: none;
}
.accordion__summary:hover {
  color: var(--primary);
}

.accordion__sign {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
}
.accordion__sign::before,
.accordion__sign::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease);
}
.accordion__sign::after {
  transform: rotate(90deg);
}
.accordion__item[open] .accordion__sign::after {
  transform: rotate(0deg);
}

.accordion__panel {
  padding-bottom: var(--sp-5);
  color: var(--text-muted);
  max-width: 72ch;
}

/* --------------------------------------------------------------------------
   Bullets / checklists
   -------------------------------------------------------------------------- */

.checklist {
  display: grid;
  gap: var(--sp-3);
}

.checklist li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-muted);
}

.checklist li svg {
  width: 18px;
  height: 18px;
  margin-top: 0.2em;
  color: var(--primary);
}

.checklist strong {
  color: var(--text-strong);
  font-weight: var(--fw-semi);
}

.dashlist {
  display: grid;
  gap: var(--sp-3);
}
.dashlist li {
  position: relative;
  padding-left: var(--sp-5);
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--text-muted);
}
.dashlist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 12px;
  height: 1px;
  background: var(--primary);
}

/* --------------------------------------------------------------------------
   Marquee (tool logos / trust strip)
   -------------------------------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--sp-8);
  animation: marquee 68s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  letter-spacing: var(--ls-wide);
  color: var(--text-dim);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
.marquee__item:hover {
  color: var(--primary);
}
.marquee__item svg {
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: var(--sp-5);
  }
}

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-2xl);
  border: 1px solid var(--glass-border);
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  padding: clamp(2rem, 1rem + 4vw, 4.5rem);
  text-align: center;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: -55%;
  left: 50%;
  translate: -50% 0;
  width: min(760px, 130%);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--aurora-1), transparent 62%);
  pointer-events: none;
}

.cta-band > * {
  position: relative;
}

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

.field {
  display: grid;
  gap: var(--sp-2);
}

.field__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-normal);
  color: var(--text);
}

.field__input,
.field__textarea,
.field__select {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}

.field__textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.field__input::placeholder,
.field__textarea::placeholder {
  color: var(--text-dim);
}

.field__input:focus,
.field__textarea:focus,
.field__select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.field__error {
  font-size: var(--fs-xs);
  color: var(--danger);
}

/* Honeypot: must stay in the DOM and out of sight. */
.field-hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  pointer-events: none;
}

.form-note {
  font-size: var(--fs-xs);
  color: var(--text-dim);
  line-height: 1.55;
}

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

.site-footer {
  position: relative;
  z-index: var(--z-base);
  margin-top: var(--section-y);
  border-top: 1px solid var(--rule);
  background: var(--bg-deep);
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-7);
  padding-block: var(--sp-9) var(--sp-8);
}

.footer__col-title {
  margin-bottom: var(--sp-4);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-dim);
}

.footer__links {
  display: grid;
  gap: var(--sp-3);
}

.footer__links a {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  width: fit-content;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.footer__links a:hover {
  color: var(--primary);
  transform: translateX(3px);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-top: 1px solid var(--rule);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}

.social-row {
  display: flex;
  gap: var(--sp-2);
}

.social-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease);
}
.social-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
}
.social-link svg {
  width: 17px;
  height: 17px;
}

@media (max-width: 900px) {
  .footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   Prose (legal pages, blog bodies rendered by the CMS)
   -------------------------------------------------------------------------- */

.prose {
  color: var(--text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

.prose > * + * {
  margin-top: var(--sp-4);
}

.prose h2 {
  margin-top: var(--sp-8);
  font-size: var(--fs-h2);
  scroll-margin-top: calc(var(--nav-h) + 2rem);
}

.prose h3 {
  margin-top: var(--sp-6);
  font-size: var(--fs-h3);
  scroll-margin-top: calc(var(--nav-h) + 2rem);
}

.prose h2 + *,
.prose h3 + * {
  margin-top: var(--sp-3);
}

.prose ul,
.prose ol {
  display: grid;
  gap: var(--sp-2);
  padding-left: var(--sp-5);
}
.prose ul li {
  list-style: none;
  position: relative;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--sp-5) + 2px);
  top: 0.72em;
  width: 10px;
  height: 1px;
  background: var(--primary);
}
.prose ol {
  list-style: decimal;
}
.prose ol li::marker {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.prose strong {
  color: var(--text-strong);
  font-weight: var(--fw-semi);
}

.prose blockquote {
  padding-left: var(--sp-5);
  border-left: 2px solid var(--primary);
  color: var(--text);
  font-style: italic;
}

.prose code {
  padding: 0.15em 0.4em;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--primary);
}

.prose pre {
  padding: var(--sp-5);
  border-radius: var(--r-md);
  background: var(--bg-deep);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.prose pre code {
  padding: 0;
  background: none;
  border: none;
  color: var(--text);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.prose th,
.prose td {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.prose th {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}

.prose img {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}

/* Table of contents beside a long article */
.toc {
  font-size: var(--fs-sm);
}
.toc__label {
  margin-bottom: var(--sp-3);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-dim);
}
.toc ol {
  display: grid;
  gap: 1px;
}
.toc a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-left: 2px solid var(--rule);
  color: var(--text-muted);
  font-size: var(--fs-xs);
  line-height: 1.45;
  transition: all var(--dur-fast) var(--ease);
}
.toc a:hover,
.toc a.is-active {
  border-left-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text-strong);
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.crumbs {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}
.crumbs a {
  color: var(--text-dim);
}
.crumbs a:hover {
  color: var(--primary);
}
.crumbs svg {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Article layout (CMS blog posts and prose pages)
   -------------------------------------------------------------------------- */

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: start;
}

@media (max-width: 1000px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .article-aside {
    display: none;
  }
}

/* Code blocks with a copy button, emitted by the CMS blog assets. */
.code-block {
  margin-block: var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.code-block__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-dim);
}
.code-block__copy {
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xs);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.code-block__copy:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.code-block pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

/* Callout */
.callout {
  display: flex;
  gap: var(--sp-3);
  margin-block: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--primary-soft-hover);
  border-radius: var(--r-md);
  background: var(--primary-soft);
}
.callout p {
  margin: 0;
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------------
   Shared section furniture
   These are used both by SectionHead.astro and directly inside pages, so they
   must be global: an Astro component-scoped rule would not reach the pages.
   -------------------------------------------------------------------------- */

.section-head {
  display: grid;
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.section-head.center {
  justify-items: center;
  text-align: center;
}
.section-head.center .measure,
.section-head.center .measure-sm,
.section-head.center .measure-lg {
  margin-inline: auto;
}

/* Category chip used on the home page and the services index */
.cat-chip {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.cat-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
  transform: translateY(-2px);
}
.cat-chip > span:nth-child(2) {
  display: grid;
  flex: 1;
  line-height: 1.35;
}
.cat-chip strong {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
}
.cat-chip .t-dim {
  font-size: var(--fs-xs);
}

/* Pull quote card, used on the home page and About */
.quote-card {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}
.quote-card__mark {
  color: var(--primary);
  opacity: 0.35;
  margin-bottom: var(--sp-4);
}

/* --------------------------------------------------------------------------
   Diagram frame
   Deliberately border-less and background-less. The system diagram's own node
   boxes supply the structure; wrapping them in a panel put a frame around a
   set of frames and made the whole thing feel squeezed.
   -------------------------------------------------------------------------- */

.diagram-frame {
  padding-block: clamp(0.5rem, 0.25rem + 1.5vw, 1.75rem);
}

/* --------------------------------------------------------------------------
   About stat strip
   Global rather than page-scoped: the class is handed to StatBlock as a prop,
   so the rendered element carries StatBlock's scope id, not the caller's. A
   page-scoped rule silently never matches and gets tree-shaken away.
   -------------------------------------------------------------------------- */

.about-stats {
  margin-top: clamp(2.75rem, 2rem + 3.5vw, 5rem);
  margin-bottom: clamp(1rem, 0.5rem + 1.5vw, 2rem);
}
