/* Shared accessibility and legibility layer for the Advisory SA service. */
:root {
  --teal: #017161;
  --orange-text: #8a4100;
  --a11y-ink: #17120e;
  --a11y-muted: #5f5a54;
  --a11y-teal: #017161;
  --a11y-orange-text: #8a4100;
  --a11y-red: #d32a00;
}

html {
  font-size: 100%;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

/* Correct the role-page wrapper that previously made all copy 13px/extra-bold. */
.dglx-ccma-page {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
}

.dglx-ccma-page h1,
.hero h1 {
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.dglx-ccma-page h2,
.section h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.875rem);
  line-height: 1.16;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.dglx-ccma-page h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.28;
  text-wrap: balance;
}

.dglx-ccma-page p,
.dglx-ccma-page li,
.hero .lede,
.section p,
.section li {
  line-height: 1.65;
}

.dglx-ccma-page p,
.hero .lede,
.section > .wrap > p {
  max-width: 72ch;
}

.dglx-ccma-page h1 + p,
.dglx-ccma-page h2 + p,
.dglx-ccma-page h3 + p,
.section h2 + p {
  margin-top: 0.875rem;
}

/* Brand-safe accessible colours for text and interactive states. */
a:not(.btn):not(.whatsapp):not(.whatsapp-float) {
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.18em;
}

.back,
.links a {
  color: var(--a11y-teal);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--a11y-teal);
  outline-offset: 3px;
}

:where(button, .btn, .whatsapp, .whatsapp-float, input[type="submit"]) {
  min-height: 44px;
}

.whatsapp,
.whatsapp-float {
  background: var(--a11y-teal);
  color: #fff;
}

@media (max-width: 760px) {
  body {
    padding-bottom: max(5.5rem, env(safe-area-inset-bottom));
  }

  .dglx-ccma-page h1,
  .hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .dglx-ccma-page h2,
  .section h2 {
    font-size: clamp(1.5rem, 7vw, 2.125rem);
  }

  .dglx-ccma-page section,
  .section {
    padding-block: clamp(3rem, 12vw, 4rem);
  }

  .whatsapp,
  .whatsapp-float {
    right: 0.75rem;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    max-width: calc(100vw - 1.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
