/* ==========================================================================
   ACPL Design System — Base + Components
   Requires tokens.css. Reusable across corporate site and portals.
   Sections: 1 Base · 2 Layout · 3 Typography helpers · 4 Buttons
             5 Badges/Chips · 6 Cards · 7 Forms · 8 Feedback
             9 Tabs/Steps/Tables · 10 Header & Navigation · 11 Footer
             12 Page hero & breadcrumbs · 13 Motion utilities
   ========================================================================== */

/* 1. Base ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: inherit;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
}

h4 {
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
}

p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

p {
  text-wrap: pretty;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

a {
  color: var(--text-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--text-link-hover);
}

/* Quiet links (acpl.js) keep their target in data-href, so restore the link cursor */
a[data-href] {
  cursor: pointer;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

::selection {
  background: var(--blue-200);
  color: var(--navy-900);
}

hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-8) 0;
}

address {
  font-style: normal;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: calc(var(--z-dialog) + 1);
  padding: var(--space-2) var(--space-4);
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  transform: translateY(-160%);
  transition: transform var(--dur-fast) var(--ease-out);
}

.skip-link:focus-visible {
  transform: none;
  color: #fff;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon--sm {
  width: 1em;
  height: 1em;
}

.icon--lg {
  width: 1.5rem;
  height: 1.5rem;
}

.icon--inline {
  display: inline-block;
  vertical-align: -0.125em;
}

.icon--fill {
  fill: currentColor;
  stroke: none;
}

/* 2. Layout ---------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide {
  max-width: calc(var(--container-wide) + var(--gutter) * 2);
}

.container--narrow {
  max-width: calc(var(--container-narrow) + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--sm {
  padding-block: var(--section-y-sm);
}

.section--muted {
  background: var(--surface-secondary);
}

.section--tint {
  background: linear-gradient(180deg, var(--surface-tint), var(--surface-primary));
}

.section--dark {
  background: var(--surface-dark);
  color: var(--text-inverse);
}

.section--bordered {
  border-block: 1px solid var(--border-subtle);
}

.section-head {
  display: grid;
  gap: var(--space-4);
  max-width: 720px;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}

.section-head--split {
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
}

@media (min-width: 1024px) {
  .section-head--split {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--space-12);
  }
}

.section-head p {
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
}

.section--dark .section-head p {
  color: var(--text-inverse-muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, var(--space-4));
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--cluster-gap, var(--space-3));
}

.grid {
  display: grid;
  gap: var(--grid-gap, var(--space-6));
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--grid-min, 260px)), 1fr));
}

.grid--2 {
  --grid-min: 340px;
}

.grid--3 {
  --grid-min: 280px;
}

.grid--4 {
  --grid-min: 220px;
}

@media (min-width: 1024px) {
  .grid--fixed-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--fixed-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.split {
  display: grid;
  gap: clamp(var(--space-8), 5vw, var(--space-16));
  align-items: center;
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .split--wide-start {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }

  .split--wide-end {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }

  .split--top {
    align-items: start;
  }
}

/* 3. Typography helpers ---------------------------------------------------- */
.display {
  font-size: var(--fs-display);
  font-weight: var(--fw-heavy);
  letter-spacing: -0.028em;
  line-height: 1.06;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-overline);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--brand-primary);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section--dark .eyebrow,
.eyebrow--inverse {
  color: var(--blue-300);
}

.lead {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  line-height: 1.65;
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-sm {
  font-size: var(--fs-sm);
}

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

.text-center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.link {
  font-weight: var(--fw-semibold);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size var(--dur-base) var(--ease-out), color var(--dur-fast);
}

.link:hover {
  background-size: 100% 1px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.link-arrow .icon {
  transition: transform var(--dur-base) var(--ease-out);
}

.link-arrow:hover .icon {
  transform: translateX(3px);
}

.prose {
  max-width: 72ch;
  color: var(--text-secondary);
}

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

.prose h2,
.prose h3 {
  color: var(--text-primary);
  margin-top: var(--space-10);
}

.prose h2 {
  font-size: var(--fs-h3);
}

.prose h3 {
  font-size: var(--fs-h4);
}

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

.prose ul,
.prose ol {
  padding-left: 1.25rem;
  display: grid;
  gap: var(--space-2);
}

.prose li::marker {
  color: var(--brand-accent);
}

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

.prose a {
  overflow-wrap: anywhere;
}

/* 4. Buttons --------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-primary);
  --btn-fg: var(--text-primary);
  --btn-border: var(--border-default);
  --btn-bg-hover: var(--surface-secondary);
  --btn-fg-hover: var(--btn-fg);
  --btn-border-hover: var(--border-strong);
  --btn-shadow: var(--shadow-xs);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-h-md);
  padding: 0 var(--space-5);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  letter-spacing: 0.005em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

.btn:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
  color: var(--btn-fg-hover);
}

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

.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.btn .icon {
  width: 1.125rem;
  height: 1.125rem;
}

.btn__arrow {
  transition: transform var(--dur-base) var(--ease-out);
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

.btn--primary {
  --btn-bg: var(--brand-primary);
  --btn-fg: #fff;
  --btn-border: var(--brand-primary);
  --btn-bg-hover: var(--brand-primary-hover);
  --btn-border-hover: var(--brand-primary-hover);
  --btn-shadow: 0 1px 2px rgb(11 107 176 / 0.24), inset 0 1px 0 rgb(255 255 255 / 0.12);
}

.btn--primary:hover {
  box-shadow: 0 8px 18px -8px rgb(11 107 176 / 0.6);
  transform: translateY(-1px);
}

.btn--secondary {
  --btn-bg: var(--brand-secondary);
  --btn-fg: #fff;
  --btn-border: var(--brand-secondary);
  --btn-bg-hover: var(--brand-secondary-hover);
  --btn-border-hover: var(--brand-secondary-hover);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--brand-primary);
  --btn-border: var(--blue-200);
  --btn-bg-hover: var(--brand-primary-soft);
  --btn-border-hover: var(--blue-300);
  --btn-shadow: none;
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text-primary);
  --btn-border: transparent;
  --btn-bg-hover: var(--surface-tertiary);
  --btn-border-hover: transparent;
  --btn-shadow: none;
}

.btn--danger {
  --btn-bg: var(--error);
  --btn-fg: #fff;
  --btn-border: var(--error);
  --btn-bg-hover: var(--error-hover);
  --btn-border-hover: var(--error-hover);
}

/* Buttons on dark surfaces */
.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--navy-900);
  --btn-border: #fff;
  --btn-bg-hover: var(--blue-50);
  --btn-border-hover: var(--blue-50);
}

.btn--glass {
  --btn-bg: rgb(255 255 255 / 0.06);
  --btn-fg: #fff;
  --btn-border: rgb(255 255 255 / 0.22);
  --btn-bg-hover: rgb(255 255 255 / 0.12);
  --btn-border-hover: rgb(255 255 255 / 0.4);
  --btn-shadow: none;
}

.btn--sm {
  min-height: var(--control-h-sm);
  padding: 0 var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
}

.btn--lg {
  min-height: var(--control-h-lg);
  padding: 0 var(--space-6);
  font-size: var(--fs-body);
}

.btn--block {
  width: 100%;
}

.btn--icon {
  width: var(--control-h-md);
  padding: 0;
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 2px solid var(--btn-fg);
  border-right-color: transparent;
  animation: spin 700ms linear infinite;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* 5. Badges & chips -------------------------------------------------------- */
.badge {
  --badge-bg: var(--surface-tertiary);
  --badge-fg: var(--gray-700);
  --badge-border: var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 24px;
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--badge-fg);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  white-space: nowrap;
  transition: background-color var(--dur-base), border-color var(--dur-base), color var(--dur-base);
}

.badge .icon {
  width: 0.875rem;
  height: 0.875rem;
}

.badge--certified,
.badge--success {
  --badge-bg: var(--success-soft);
  --badge-fg: var(--success);
  --badge-border: var(--success-border);
}

.badge--version,
.badge--info {
  --badge-bg: var(--info-soft);
  --badge-fg: var(--blue-800);
  --badge-border: var(--info-border);
}

.badge--platform {
  --badge-bg: var(--surface-primary);
  --badge-fg: var(--gray-700);
  --badge-border: var(--border-default);
}

.badge--warning {
  --badge-bg: var(--warning-soft);
  --badge-fg: var(--warning);
  --badge-border: var(--warning-border);
}

.badge--error {
  --badge-bg: var(--error-soft);
  --badge-fg: var(--error);
  --badge-border: var(--error-border);
}

.badge--dark {
  --badge-bg: rgb(255 255 255 / 0.08);
  --badge-fg: #fff;
  --badge-border: rgb(255 255 255 / 0.18);
}

.badge--dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface-primary);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
}

/* 6. Cards ----------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--card-pad, clamp(var(--space-5), 2.5vw, var(--space-8)));
  background: var(--surface-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.card--muted {
  background: var(--surface-secondary);
  box-shadow: none;
}

.card--flat {
  box-shadow: none;
}

.card--dark {
  background: var(--surface-dark-raised);
  border-color: var(--border-inverse);
  color: var(--text-inverse);
}

.card--interactive {
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

.card--interactive:hover,
.card--interactive:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}

.card__title {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
}

.card__text {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

.card--dark .card__text {
  color: var(--text-inverse-muted);
}

.card__footer {
  margin-top: auto;
  padding-top: var(--space-2);
}

/* Stretched link: whole card clickable while keeping inner links usable */
.card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card__title .card__link {
  color: inherit;
  text-decoration: none;
}

.card__link:focus-visible {
  outline: none;
}

.card__link:focus-visible::after {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-md);
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  border: 1px solid var(--blue-100);
  transition: background-color var(--dur-base), color var(--dur-base), transform var(--dur-base) var(--ease-out);
}

.icon-tile .icon {
  width: 22px;
  height: 22px;
}

.icon-tile--dark {
  background: rgb(42 162 226 / 0.12);
  border-color: rgb(42 162 226 / 0.24);
  color: var(--blue-300);
}

/* Feature card */
.feature-card {
  gap: var(--space-4);
}

.feature-card .icon-tile {
  margin-bottom: var(--space-1);
}

.card--interactive:hover .icon-tile {
  background: var(--brand-primary);
  color: #fff;
}

/* Product card — hardware-first, image is the hero */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
}

.product-card:hover,
.product-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}

.product-card__media {
  position: relative;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr); /* the photo fits the box instead of stretching the row */
  place-items: center;
  aspect-ratio: 4 / 3;
  padding: var(--space-6);
  background:
    radial-gradient(120% 90% at 50% 100%, var(--blue-50) 0%, transparent 70%),
    #fff;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform var(--dur-slow) var(--ease-out);
}

.product-card:hover .product-card__media img {
  transform: scale(1.035);
}

.product-card__flags {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) var(--space-6);
}

.product-card__category {
  font-size: var(--fs-overline);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--text-muted);
}

.product-card__name {
  font-size: var(--fs-h3);
}

.product-card__desc {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}

.product-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-3);
}

.product-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-subtle);
  font-size: var(--fs-sm);
}

/* Horizontal / featured product card */
@media (min-width: 768px) {
  .product-card--feature {
    flex-direction: row;
  }

  .product-card--feature .product-card__media {
    flex: 0 0 46%;
    aspect-ratio: auto;
    min-height: 100%;
    border-bottom: 0;
    border-right: 1px solid var(--border-subtle);
  }

  .product-card--feature .product-card__body {
    padding: var(--space-8);
    justify-content: center;
  }
}

/* Resource list (downloads, documents) */
.resource-list {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}

.resource {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2) var(--space-4);
  align-items: center;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-subtle);
}

.resource:first-child {
  border-top: 0;
}

.resource__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
  color: var(--brand-primary);
  border: 1px solid var(--border-subtle);
}

.resource__icon .icon {
  width: 20px;
  height: 20px;
}

.resource__title {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  line-height: 1.35;
}

.resource__meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.resource__actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (min-width: 480px) {
  .resource {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .resource__actions {
    grid-column: auto;
    justify-content: flex-end;
  }
}

/* Leadership card */
.leader-card {
  align-items: flex-start;
  gap: var(--space-4);
  padding: 0;
  overflow: hidden;
}

.leader-card__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;
  background: var(--surface-secondary);
  transition: transform var(--dur-slow) var(--ease-out);
}

.leader-card__media {
  width: 100%;
  overflow: hidden;
}

.leader-card:hover .leader-card__photo {
  transform: scale(1.03);
}

.leader-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 0 var(--space-5) var(--space-6);
  flex: 1;
}

.leader-card__name {
  font-size: var(--fs-h4);
}

.leader-card__quote {
  position: relative;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  line-height: 1.6;
  padding-left: var(--space-4);
  border-left: 2px solid var(--blue-200);
}

.leader-card__contact {
  margin-top: auto;
  font-size: var(--fs-sm);
}

/* Contact card */
.contact-card {
  gap: var(--space-2);
}

.contact-card__label {
  font-family: var(--font-body);
  font-size: var(--fs-overline);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--text-muted);
}

.contact-card__value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-snug);
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.contact-card__value a {
  color: inherit;
  text-decoration: none;
}

.contact-card__value a:hover {
  color: var(--brand-primary);
}

/* Stats */
.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: var(--fw-heavy);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.stat__label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.section--dark .stat__value {
  color: #fff;
}

.section--dark .stat__label {
  color: var(--text-inverse-muted);
}

/* 7. Forms (Phase 2-ready) ------------------------------------------------- */
.form-grid {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .form-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

.fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}

.label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.label__req {
  color: var(--error);
  margin-left: 2px;
}

.label__opt {
  font-weight: var(--fw-regular);
  color: var(--text-muted);
}

.hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.field-error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--error);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: var(--control-h-md);
  padding: 0.625rem 0.875rem;
  background: var(--surface-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  font-size: var(--fs-body);
  line-height: 1.4;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--gray-500);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}

.input:focus-visible,
.select:focus-visible,
.textarea:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-md);
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23475467' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.125rem;
}

.input.is-invalid,
.select.is-invalid,
.textarea.is-invalid,
[aria-invalid="true"] {
  border-color: var(--error);
}

.input.is-invalid:focus-visible,
[aria-invalid="true"]:focus-visible {
  box-shadow: 0 0 0 3px rgb(180 35 24 / 0.18);
}

.input.is-valid {
  border-color: var(--success);
}

.input:disabled,
.select:disabled,
.textarea:disabled,
.input[readonly] {
  background: var(--surface-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
}

.input--mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Input with prefix/suffix, e.g. +91, ₹, GSTIN */
.input-group {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.input-group:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--ring-focus);
}

.input-group .input {
  border: 0;
  box-shadow: none;
  min-width: 0;
}

.input-group .input:focus-visible {
  box-shadow: none;
}

.input-group__addon {
  display: grid;
  place-items: center;
  padding: 0 0.875rem;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

.input-group__addon:first-child {
  border-right: 1px solid var(--border-subtle);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group__addon:last-child {
  border-left: 1px solid var(--border-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group .btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: none;
}

/* Checkbox & radio */
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand-primary);
  flex: none;
}

/* Option cards: subscription plans, USB / Type-C selector, one-year / lifetime */
.option-group {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--option-min, 180px)), 1fr));
  border: 0;
  margin: 0;
  padding: 0;
}

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  cursor: pointer;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option:hover {
  border-color: var(--blue-300);
}

.option:has(input:checked) {
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
  box-shadow: inset 0 0 0 1px var(--brand-primary);
}

.option:has(input:focus-visible) {
  box-shadow: var(--ring-focus), inset 0 0 0 1px var(--brand-primary);
}

.option:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
}

.option__title {
  font-weight: var(--fw-semibold);
}

.option__meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Segmented control (compact option group) */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  background: var(--surface-tertiary);
  border-radius: var(--radius-md);
  border: 0;
  margin: 0;
}

.segmented label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented label:has(input:checked) {
  background: var(--surface-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.segmented label:has(input:focus-visible) {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-primary);
}

.qty button {
  width: var(--control-h-md);
  border: 0;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 1.125rem;
  transition: background-color var(--dur-fast);
}

.qty button:hover {
  background: var(--surface-tertiary);
}

.qty input {
  width: 3.5rem;
  border: 0;
  border-inline: 1px solid var(--border-subtle);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
  -moz-appearance: textfield;
}

.qty input::-webkit-inner-spin-button,
.qty input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* 8. Feedback -------------------------------------------------------------- */
.alert {
  --alert-bg: var(--info-soft);
  --alert-fg: var(--blue-900);
  --alert-border: var(--info-border);
  --alert-icon: var(--info);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--alert-bg);
  color: var(--alert-fg);
  border: 1px solid var(--alert-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
}

.alert > .icon {
  color: var(--alert-icon);
  margin-top: 1px;
}

.alert__title {
  font-weight: var(--fw-semibold);
  color: inherit;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  letter-spacing: 0;
}

.alert--success {
  --alert-bg: var(--success-soft);
  --alert-fg: var(--success-text);
  --alert-border: var(--success-border);
  --alert-icon: var(--success);
}

.alert--warning {
  --alert-bg: var(--warning-soft);
  --alert-fg: var(--warning-text);
  --alert-border: var(--warning-border);
  --alert-icon: var(--warning);
}

.alert--error {
  --alert-bg: var(--error-soft);
  --alert-fg: var(--error-text);
  --alert-border: var(--error-border);
  --alert-icon: var(--error);
}

.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--blue-100);
  border-top-color: var(--brand-primary);
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  display: block;
  min-height: 1em;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--gray-100) 0%, var(--gray-50) 50%, var(--gray-100) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* Dialog — native <dialog> */
.dialog {
  width: min(560px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-xl);
}

.dialog::backdrop {
  background: var(--surface-overlay);
  backdrop-filter: blur(2px);
}

.dialog[open] {
  animation: dialog-in var(--dur-base) var(--ease-out);
}

.dialog__header,
.dialog__body,
.dialog__footer {
  padding: var(--space-5) var(--space-6);
}

.dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  background: var(--surface-secondary);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* 9. Tabs, steps, tables, summary ----------------------------------------- */
.tabs__list {
  display: flex;
  gap: var(--space-1);
  padding: 4px;
  margin: 0 0 var(--space-8);
  background: var(--surface-tertiary);
  border-radius: var(--radius-md);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs__list::-webkit-scrollbar {
  display: none;
}

.tabs__tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1 0 auto;
  justify-content: center;
  min-height: 40px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  transition: background-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}

.tabs__tab:hover {
  color: var(--text-primary);
}

.tabs__tab[aria-selected="true"] {
  background: var(--surface-primary);
  color: var(--brand-primary);
  box-shadow: var(--shadow-sm);
}

.tabs__panel[hidden] {
  display: none;
}

/* Without JS every panel stays readable, stacked */
html:not(.js) .tabs__panel[hidden] {
  display: block;
  margin-top: var(--space-12);
}

.tabs__panel:not([hidden]) {
  animation: fade-up var(--dur-slow) var(--ease-out);
}

/* Steps — checkout / subscription progress */
.steps {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-muted);
  counter-increment: step;
}

.steps__item::before {
  content: "";
  height: 4px;
  border-radius: 4px;
  background: var(--border-subtle);
  transition: background-color var(--dur-slow) var(--ease-out);
}

.steps__item.is-complete::before,
.steps__item[aria-current="step"]::before {
  background: var(--brand-primary);
}

.steps__item[aria-current="step"] {
  color: var(--text-primary);
}

/* Specification / data table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.table th,
.table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--border-subtle);
}

.table tr:first-child > * {
  border-top: 0;
}

.table thead th {
  background: var(--surface-secondary);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.table--spec th {
  width: 38%;
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  background: var(--surface-secondary);
}

.table--spec td {
  color: var(--text-secondary);
}

/* Order / subscription summary rows */
.summary {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  font-size: var(--fs-sm);
}

.summary__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

.summary__row dt {
  color: var(--text-secondary);
}

.summary__row dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-medium);
  text-align: right;
}

.summary__row--total {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-body);
}

.summary__row--total dt,
.summary__row--total dd {
  color: var(--text-primary);
  font-weight: var(--fw-bold);
}

/* Definition list (key facts) */
.facts {
  display: grid;
  gap: 0;
  margin: 0;
}

.facts__row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
}

.facts__row:first-child {
  border-top: 0;
}

.facts__row dt {
  color: var(--text-muted);
}

.facts__row dd {
  margin: 0;
  color: var(--text-primary);
  font-weight: var(--fw-medium);
}

/* 10. Header & navigation -------------------------------------------------- */
.utility-bar {
  display: none;
  background: var(--navy-900);
  color: var(--text-inverse-muted);
  font-size: var(--fs-xs);
}

@media (min-width: 1024px) {
  .utility-bar {
    display: block;
  }
}

.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  min-height: var(--utility-h);
}

.utility-bar__note {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
}

.utility-bar__note strong {
  color: #fff;
  font-weight: var(--fw-semibold);
}

.utility-bar a:not(.btn) {
  color: #fff;
  text-decoration: none;
}

.utility-bar a:hover {
  color: var(--blue-300);
}

.utility-bar__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.utility-bar__links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-inverse-muted);
}

.utility-bar__links .icon {
  width: 14px;
  height: 14px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--surface-primary);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out),
    background-color var(--dur-base);
}

.site-header.is-scrolled,
.site-header.is-menu-open {
  border-bottom-color: var(--border-subtle);
  box-shadow: 0 6px 24px -12px rgb(8 28 51 / 0.18);
}

/* Frosted header on desktop only: backdrop-filter creates a containing block
   for position:fixed descendants, which would clip the mobile drawer */
@media (min-width: 1024px) {
  .site-header {
    background: rgb(255 255 255 / 0.92);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
  }

  .site-header.is-scrolled {
    background: rgb(255 255 255 / 0.97);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex: none;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.brand:hover {
  color: var(--text-primary);
}

.brand__mark {
  width: auto;
  height: 44px;
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: var(--touch-min);
  height: var(--touch-min);
  margin-left: auto;
  margin-right: calc(var(--space-2) * -1);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
}

.nav-toggle:hover {
  background: var(--surface-tertiary);
}

.nav-toggle__bars {
  position: relative;
  width: 20px;
  height: 14px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast), top var(--dur-base) var(--ease-out);
}

.nav-toggle__bars span:nth-child(1) {
  top: 0;
}

.nav-toggle__bars span:nth-child(2) {
  top: 6px;
}

.nav-toggle__bars span:nth-child(3) {
  top: 12px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  top: 6px;
  transform: 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) {
  top: 6px;
  transform: rotate(-45deg);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-trigger,
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  width: 100%;
  border: 0;
  background: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  text-align: left;
}

.nav-trigger .icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--dur-base) var(--ease-out);
}

.nav-trigger[aria-expanded="true"] .icon {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

.nav-panel__heading {
  margin: 0 0 var(--space-2);
  padding: 0 var(--space-3);
  font-family: var(--font-body);
  font-size: var(--fs-overline);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-panel__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.nav-item-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.nav-item-link:hover,
.nav-item-link[aria-current="page"] {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

.nav-item-link .icon-tile {
  width: 36px;
  height: 36px;
}

.nav-item-link .icon-tile .icon {
  width: 18px;
  height: 18px;
}

.nav-item-link:hover .icon-tile {
  background: var(--brand-primary);
  color: #fff;
}

.nav-item-link__title {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.35;
}

.nav-item-link__desc {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.45;
}

.nav-promo {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--navy-900);
  background-image:
    radial-gradient(120% 80% at 100% 0%, rgb(42 162 226 / 0.28), transparent 60%);
  color: #fff;
}

.nav-promo__title {
  font-size: var(--fs-h4);
  color: #fff;
}

.nav-promo p {
  font-size: var(--fs-xs);
  color: var(--text-inverse-muted);
}

.nav-promo__stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
}

.store-link {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--border-subtle);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base);
}

.store-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.store-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.site-nav__actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.site-nav__contact {
  display: grid;
  gap: var(--space-2);
  font-size: var(--fs-sm);
}

.site-nav__contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-secondary);
  text-decoration: none;
  min-height: 32px;
}

/* Mobile / tablet drawer (< 1024px) */
@media (max-width: 1023.98px) {
  :root {
    --header-h: 64px;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    z-index: var(--z-drawer);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    padding: var(--space-4) var(--gutter) calc(var(--space-8) + env(safe-area-inset-bottom));
    background: var(--surface-primary);
    border-top: 1px solid var(--border-subtle);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
  }

  .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s;
  }

  .site-nav__actions {
    order: -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .site-nav__actions .btn {
    min-height: var(--control-h-lg);
  }

  .site-nav__actions .btn--primary {
    grid-column: 1 / -1;
    order: -1;
  }

  .site-nav__actions .nav-track {
    order: 1;
    border-color: var(--border-default);
  }

  .site-nav__actions .btn {
    white-space: normal;
  }

  .nav-list > li {
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-trigger,
  .nav-link {
    min-height: 56px;
    padding: 0 var(--space-1);
    font-size: 1.0625rem;
  }

  .nav-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--dur-base) var(--ease-out);
  }

  .nav-panel > .nav-panel__inner {
    overflow: hidden;
    min-height: 0;
    visibility: hidden;
    transition: visibility 0s linear var(--dur-base);
  }

  .nav-panel.is-open {
    grid-template-rows: 1fr;
  }

  .nav-panel.is-open > .nav-panel__inner {
    visibility: visible;
    transition: visibility 0s;
  }

  .nav-panel__grid {
    display: grid;
    gap: var(--space-4);
    padding: 0 0 var(--space-5);
  }

  .nav-panel__heading {
    padding: 0 var(--space-3);
    margin-top: var(--space-2);
  }

  .nav-item-link__desc {
    display: none;
  }

  .nav-item-link {
    align-items: center;
  }

  .nav-promo {
    display: none;
  }

  html.nav-locked,
  html.nav-locked body {
    overflow: hidden;
  }
}

/* Desktop navigation (>= 1024px) */
@media (min-width: 1024px) {
  .nav-toggle,
  .site-nav__contact {
    display: none;
  }

  .site-nav {
    display: flex;
    align-items: center;
    flex: 1;
    gap: var(--space-4);
  }

  .site-nav > nav {
    flex: 1;
  }

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

  .nav-list > li {
    position: relative;
  }

  .nav-trigger,
  .nav-link {
    position: relative;
    min-height: 40px;
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    white-space: nowrap;
    transition: color var(--dur-fast), background-color var(--dur-fast);
  }

  .nav-trigger::after,
  .nav-link::after {
    content: "";
    position: absolute;
    left: var(--space-3);
    right: var(--space-3);
    bottom: -15px;
    height: 2px;
    border-radius: 2px;
    background: var(--brand-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--dur-base) var(--ease-out);
  }

  .nav-trigger:hover,
  .nav-link:hover,
  .nav-trigger[aria-expanded="true"] {
    color: var(--brand-primary);
    background: var(--surface-secondary);
  }

  li.is-active > .nav-trigger::after,
  li.is-active > .nav-link::after,
  .nav-link[aria-current="page"]::after {
    transform: scaleX(1);
  }

  .nav-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    z-index: var(--z-dropdown);
    width: max-content;
    min-width: 300px;
    max-width: min(760px, calc(100vw - 2 * var(--gutter)));
    padding: var(--space-4);
    background: var(--surface-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
  }

  /* hover bridge so the pointer can travel from trigger to panel */
  .nav-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -16px;
    height: 16px;
  }

  .nav-panel--end {
    left: auto;
    right: 0;
  }

  /* The mega panel anchors to the header container (centred) so it can never
     overflow the viewport, whatever the trigger position */
  .site-header__inner {
    position: relative;
  }

  .nav-list > li:has(> .nav-panel--mega),
  .nav-list > li:has(> .nav-panel--wide) {
    position: static;
  }

  .nav-panel--mega,
  .nav-panel--wide {
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    max-width: 900px;
    margin-inline: auto;
  }

  .nav-panel--wide {
    max-width: 640px;
  }

  .nav-panel--mega::before,
  .nav-panel--wide::before {
    top: -20px;
    height: 20px;
  }

  .nav-panel.is-open,
  html:not(.js) li:hover > .nav-panel,
  html:not(.js) li:focus-within > .nav-panel {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s;
  }

  .nav-panel__grid {
    display: grid;
    gap: var(--space-5);
  }

  .nav-panel--mega .nav-panel__grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr)) minmax(220px, 0.9fr);
  }

  .nav-panel--wide .nav-panel__grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .nav-panel__heading {
    margin-top: var(--space-1);
  }

  .site-nav__actions {
    margin-left: auto;
  }
}

/* Compact desktop: Track order and Extend subscription stay reachable via the
   utility bar and the RD Service menu */
@media (min-width: 1024px) and (max-width: 1319.98px) {
  .site-nav__actions .btn--outline,
  .site-nav__actions .nav-track {
    display: none;
  }

  .site-header__inner {
    gap: var(--space-4);
  }

  .nav-trigger,
  .nav-link {
    padding: 0 var(--space-2);
  }
}

.nav-track {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* 11. Footer --------------------------------------------------------------- */
.site-footer {
  position: relative;
  background: var(--navy-950);
  color: var(--text-inverse-muted);
  font-size: var(--fs-sm);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(42 162 226 / 0.6), transparent);
}

.site-footer a:not(.btn) {
  color: var(--text-inverse-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.site-footer a:not(.btn):hover {
  color: #fff;
}

.site-footer__cta {
  display: grid;
  gap: var(--space-6);
  align-items: center;
  padding-block: var(--space-12);
  border-bottom: 1px solid var(--border-inverse);
}

@media (min-width: 768px) {
  .site-footer__cta {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.site-footer__cta h2 {
  color: #fff;
  font-size: var(--fs-h3);
}

.site-footer__cta p {
  margin-top: var(--space-2);
}

.site-footer__main {
  display: grid;
  gap: var(--space-10) var(--space-8);
  padding-block: var(--space-12);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .site-footer__main {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .site-footer__main {
    grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
  }
}

.site-footer__brand {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 420px;
  container-type: inline-size; /* the former-name line sizes itself to this column */
}

@media (min-width: 1200px) {
  .site-footer__brand {
    grid-column: auto;
  }
}

/* The name block never breaks inside a line; when it can't fit beside the
   logo (narrow phones) the whole block moves under the logo instead. */
.site-footer__logo {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  color: #fff;
}

.site-footer__logo img {
  height: 44px;
  width: auto;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: #fff;
}

.site-footer__logo span {
  font-family: var(--font-display);
  font-weight: var(--fw-heavy);
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
}

/* Former company name, on its own line under "Access Computech Ltd". Where the
   column is narrower than the line (small phones, the 1200px layout) the text
   shrinks just enough to stay on one line (the line is ~23.2 font-sizes wide). */
.site-footer__logo small {
  display: block;
  margin-top: 4px;
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-size: min(var(--fs-xs), 4.25cqi);
  font-weight: var(--fw-medium);
  letter-spacing: 0;
  color: var(--text-inverse-muted);
}

.site-footer__heading {
  margin-bottom: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--fs-overline);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: #fff;
}

.site-footer__links {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links a {
  display: inline-block;
  line-height: 1.4;
}

.site-footer__address {
  line-height: 1.7;
}

.site-footer__contact {
  display: grid;
  gap: var(--space-2);
}

.site-footer__contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.social-links {
  display: flex;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-inverse);
  color: var(--text-inverse-muted);
  transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast),
    transform var(--dur-base) var(--ease-out);
}

.social-links a:hover {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.3);
  color: #fff;
  transform: translateY(-2px);
}

.social-links .icon {
  width: 18px;
  height: 18px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-6) calc(var(--space-6) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-inverse);
  font-size: var(--fs-xs);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__certs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* 12. Page hero & breadcrumbs --------------------------------------------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3rem, 2rem + 4.5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4.5rem);
  background:
    radial-gradient(60% 90% at 90% 0%, rgb(42 162 226 / 0.14), transparent 60%),
    linear-gradient(180deg, var(--surface-tint) 0%, var(--surface-primary) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(11 107 176 / 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(11 107 176 / 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 90% at 80% 10%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 90% at 80% 10%, #000 20%, transparent 75%);
  pointer-events: none;
}

.page-hero > .container {
  position: relative;
}

.page-hero__content {
  display: grid;
  gap: var(--space-5);
  max-width: 760px;
}

.page-hero__title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-heavy);
}

.page-hero--dark {
  background:
    radial-gradient(60% 100% at 85% 0%, rgb(42 162 226 / 0.25), transparent 60%),
    var(--navy-900);
  color: #fff;
  border-bottom: 0;
}

.page-hero--dark::before {
  background-image:
    linear-gradient(to right, rgb(255 255 255 / 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(255 255 255 / 0.05) 1px, transparent 1px);
}

.page-hero--dark .lead {
  color: var(--text-inverse-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--gray-300);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--brand-primary);
}

.page-hero--dark .breadcrumbs,
.page-hero--dark .breadcrumbs a {
  color: var(--text-inverse-muted);
}

/* 13. Motion utilities ----------------------------------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }
}

/* Load-in (above the fold): runs once via CSS, no JS dependency */
.animate-in {
  animation: fade-up var(--dur-reveal) var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--stagger) + 60ms);
}

/* Scroll reveal: only hidden when JS is present, so content never gets lost */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--i, 0) * var(--stagger));
}

html.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  html.reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .utility-bar,
  .site-header,
  .site-footer,
  .skip-link {
    display: none !important;
  }

  html.reveal-ready [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* Small phones: long button labels wrap, and grouped actions stack full-width */
@media (max-width: 479.98px) {
  .btn {
    white-space: normal;
  }

  .btn-group > .btn {
    flex: 1 1 100%;
  }
}
