/* ==========================================================================
   AGeqnies - Base
   Reset, typography, layout primitives, buttons, utilities, motion utilities.
   Depends on: tokens.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Anchor targets clear the fixed header */
  scroll-padding-top: calc(
    var(--header-h-compact) + var(--header-float) * 2 + var(--sp-5)
  );
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Guard against any child forcing a horizontal scrollbar */
  overflow-x: hidden;
}

body.is-menu-open {
  overflow: hidden;
}

/* Medium (500) is the weight for every heading, display scale included. One
   weight across the whole hierarchy is deliberate: size, leading and tracking
   do the separating instead, which is what keeps large type from looking heavy
   and small type from looking shouty. */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--heading);
  font-weight: var(--fw-heading);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  text-wrap: balance;
}

p {
  margin: 0;
}

/* The browser default is 700, which the design does not use. Pinned to 600
   rather than the 500 used elsewhere: emphasis has to be distinguishable from
   the 400 body text surrounding it, and 500 against 400 is too fine a step to
   register mid-sentence. */
strong,
b {
  font-weight: var(--fw-semibold);
}

ul,
ol {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

a {
  color: var(--teal-700);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}

a:hover {
  color: var(--teal-600);
}

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

img,
video {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

address {
  font-style: normal;
}

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

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

/* --------------------------------------------------------------------------
   2. Focus - always visible, never removed
   -------------------------------------------------------------------------- */

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

.on-dark :focus-visible,
.section--dark :focus-visible,
.section--ink :focus-visible,
.section--ink-2 :focus-visible,
.hero :focus-visible {
  outline-color: var(--teal-300);
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--navy);
  color: var(--white);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  box-shadow: var(--sh-lg);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--white);
}

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */

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

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

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

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

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

.section--tint {
  background: var(--bg-tint);
}

.section--soft {
  background: var(--bg-soft);
}

.section--mist {
  background: var(--bg-mist);
}

.section--paper + .section--paper {
  border-top: 1px solid var(--border);
}

/* Dark sections: layered, not glossy */
.section--dark {
  background: var(--d-bg);
  color: var(--d-text);
}

.section--deep {
  background: var(--d-bg-deep);
  color: var(--d-text);
}

/* Mid-navy, not near-black. Gives the page a third tone between the light
   sections and the very dark ones, instead of jumping straight to black. */
.section--navy {
  background: var(--navy);
  color: var(--d-text);
}

/* Editorial black - the homepage register. Two tones that alternate, separated
   by a hairline rather than by a colour change big enough to notice. See the
   note on --ed-bg in tokens.css for why these are not navy and not #000. */
.section--ink {
  background: var(--ed-bg);
  color: var(--ed-text);
}

.section--ink-2 {
  background: var(--ed-bg-2);
  color: var(--ed-text);
}

.section--charcoal {
  background: var(--ed-charcoal);
  color: var(--ed-text);
}

.section--ink + .section--ink,
.section--ink-2 + .section--ink-2 {
  border-top: 1px solid var(--ed-line-soft);
}

/* Dark-context inheritance.
   `.closing` is listed alongside the section modifiers because it is always a
   dark panel; that way a page cannot forget to opt in and end up with navy
   headings on a navy ground. Any other dark surface (e.g. the Data Centre
   pillar) opts in with `.on-dark`. */
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--deep h1,
.section--deep h2,
.section--deep h3,
.section--deep h4,
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4,
.section--ink h1,
.section--ink h2,
.section--ink h3,
.section--ink h4,
.section--ink-2 h1,
.section--ink-2 h2,
.section--ink-2 h3,
.section--ink-2 h4,
.closing h1,
.closing h2,
.closing h3,
.closing h4,
.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark h4 {
  color: var(--d-text-strong);
}

.section--dark a:not(.btn),
.section--deep a:not(.btn),
.section--navy a:not(.btn),
.section--ink a:not(.btn),
.section--ink-2 a:not(.btn),
.closing a:not(.btn),
.on-dark a:not(.btn) {
  color: var(--teal-300);
}

.section--dark a:not(.btn):hover,
.section--deep a:not(.btn):hover,
.section--navy a:not(.btn):hover,
.section--ink a:not(.btn):hover,
.section--ink-2 a:not(.btn):hover,
.closing a:not(.btn):hover,
.on-dark a:not(.btn):hover {
  color: var(--teal-200);
}

/* Body copy on dark surfaces */
.section--dark,
.section--deep,
.section--navy,
.closing,
.on-dark {
  color: var(--d-text);
}

/* The ink sections take the pure-white-derived scale rather than the navy-
   derived one. On #08090a the navy-tinted --d-text reads faintly blue against
   the white headings above it. */
.section--ink,
.section--ink-2,
.section--charcoal {
  color: var(--ed-text);
}

/* Hairline divider between two same-tone sections */
.section--ruled {
  border-top: 1px solid var(--border);
}

.section--ruled-dark {
  border-top: 1px solid var(--d-border);
}

/* Grid helpers */
.grid {
  display: grid;
  gap: var(--sp-6);
}

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

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

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

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

@media (max-width: 1080px) {
  .grid--4,
  .grid--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .grid--2,
  .grid--3,
  .grid--4,
  .grid--5 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Two-column editorial split: copy + media */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: center;
}

.split--media-first .split__media {
  order: -1;
}

/* Heading left, everything else right, tops aligned. `.split` centres its two
   columns against each other, which is right when both hold a paragraph and
   wrong when one holds a heading and the other holds a stack - the heading
   ends up floating halfway down the column beside it. */
.split--tight {
  align-items: start;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-7);
  }
  .split--media-first .split__media {
    order: 0;
  }
}

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

/* --------------------------------------------------------------------------
   4. Typography components
   -------------------------------------------------------------------------- */

/* Section labels — compact teal tag, not a flat chip.
   Uppercase tracking keeps it a label rather than a leftover button;
   the fill is a short teal gradient with a hairline and inset light. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.72rem;
  border: 1px solid rgba(158, 232, 234, 0.28);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 42%),
    linear-gradient(118deg, #1aa3a8 0%, #0e6c70 52%, #0a4548 100%);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  line-height: 1.2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 18px -10px rgba(13, 113, 117, 0.55);
}

.section--navy .eyebrow,
.on-dark .eyebrow,
.section--dark .eyebrow,
.section--deep .eyebrow,
.section--ink .eyebrow,
.section--ink-2 .eyebrow,
.closing .eyebrow {
  border-color: rgba(158, 232, 234, 0.22);
  color: #fff;
}

/* Display scale - medium weight, leading at 1, negative tracking. The three
   work together: at this weight the counters stay open even when the lines
   almost touch, and pulling the letters in turns a headline into one dense
   block instead of a row of separate words. Loosen any one of the three and the
   effect goes. */
.display-1 {
  font-size: var(--fs-display-1);
  font-weight: var(--fw-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

.display-2 {
  font-size: var(--fs-display-2);
  font-weight: var(--fw-display);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
}

.display-3 {
  font-size: var(--fs-display-3);
  font-weight: var(--fw-display);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-display);
}

/* Opt-in uppercase for a short statement heading. Nothing uses it: the hero
   moved to sentence case when the display treatment went to leading 1 and
   negative tracking, which caps fight rather than flatter. Kept because it also
   resets the tracking to positive, so if you ever do want a caps heading this is
   the correct way to get one - do not just add text-transform. */
.display-caps {
  text-transform: uppercase;
  letter-spacing: var(--ls-caps);
  text-wrap: balance;
}

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

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

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--text);
  max-width: var(--measure);
}

.section--navy .lead,
.on-dark .lead,
.section--dark .lead,
.section--deep .lead,
.section--ink .lead,
.section--ink-2 .lead,
.closing .lead {
  color: var(--ed-text);
}

.measure {
  max-width: var(--measure);
}

.measure-tight {
  max-width: var(--measure-tight);
}

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

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

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

.section--navy .text-muted,
.on-dark .text-muted,
.section--dark .text-muted,
.section--deep .text-muted,
.closing .text-muted {
  color: var(--d-text-muted);
}

.text-teal {
  color: var(--teal-700);
}

.on-dark .text-teal,
.section--dark .text-teal,
.section--deep .text-teal {
  color: var(--teal-300);
}

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

.text-balance {
  text-wrap: balance;
}

/* Section heading block.
   The measure is applied to the heading itself, not the wrapper: `ch` resolves
   against the element's own font-size, so capping the wrapper (at body size)
   would squeeze display headings to roughly half the intended width. */
.section-head > h1,
.section-head > h2,
.section-head > h3 {
  max-width: 26ch;
}

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

.section-head--center > h1,
.section-head--center > h2,
.section-head--center > h3 {
  margin-inline: auto;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head .eyebrow {
  margin-bottom: var(--sp-5);
}

.section-head .lead {
  margin-top: var(--sp-5);
}

.section-head--center .lead {
  margin-inline: auto;
}

/* Section head with a right-aligned action */
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-7);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: var(--teal-500);
  --btn-fg: var(--white);
  --btn-bd: var(--teal-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: 0.9375rem var(--sp-6);
  min-height: 50px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
}

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

.btn__icon {
  flex: none;
  width: 1em;
  height: 1em;
  transition: transform var(--dur) var(--ease-out);
}

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

/* Primary - solid teal, rounded, with a soft drop (Explore Careers). */
.btn--primary {
  border-radius: 10px;
  box-shadow: 0 14px 36px -10px rgba(23, 162, 166, 0.5);
}

.btn--primary:hover {
  --btn-bg: var(--teal-600);
  --btn-bd: var(--teal-600);
  box-shadow: 0 18px 40px -10px rgba(23, 162, 166, 0.62);
}

.btn--primary:hover .btn__icon {
  transform: translate(2px, -2px);
}

/* Progress feedback on primary actions (Apply, Submit, Choose file, Send). */
.progress-btn {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
}

.section--ink .progress-btn,
.section--ink-2 .progress-btn {
  border-radius: var(--r-md);
}

.progress-btn.is-loading,
.progress-btn.is-success {
  pointer-events: none;
  transform: none;
}

.progress-btn__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0;
  pointer-events: none;
}

.progress-btn.is-loading .progress-btn__bar,
.progress-btn.is-success .progress-btn__bar {
  opacity: 1;
}

.progress-btn__fill {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}

.progress-btn__face {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.progress-btn__spin,
.progress-btn__check {
  display: none;
  flex: none;
  width: 1em;
  height: 1em;
}

.progress-btn.is-loading:not([data-progress-bar]) .progress-btn__spin {
  display: block;
  animation: progress-spin 0.75s linear infinite;
}

.progress-btn.is-success .progress-btn__check {
  display: block;
}

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

@media (prefers-reduced-motion: reduce) {
  .progress-btn.is-loading:not([data-progress-bar]) .progress-btn__spin {
    animation: none;
  }
}

/* Secondary on light - navy outline */
.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--navy);
  --btn-bd: var(--border-strong);
}

.btn--secondary:hover {
  --btn-bg: var(--navy);
  --btn-fg: var(--white);
  --btn-bd: var(--navy);
}

/* Secondary on dark - light outline */
.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--d-text-strong);
  --btn-bd: var(--d-border-strong);
}

.btn--ghost-light:hover {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-fg: var(--white);
  --btn-bd: rgba(255, 255, 255, 0.35);
}

/* Solid navy */
.btn--navy {
  --btn-bg: var(--navy);
  --btn-bd: var(--navy);
}

.btn--navy:hover {
  --btn-bg: var(--navy-700);
  --btn-bd: var(--navy-700);
}

/* White fill for dark sections */
.btn--white {
  --btn-bg: var(--white);
  --btn-fg: var(--navy);
  --btn-bd: var(--white);
}

.btn--white:hover {
  --btn-bg: var(--n-100);
  --btn-bd: var(--n-100);
  --btn-fg: var(--navy-900);
}

.btn--sm {
  padding: 0.625rem var(--sp-5);
  min-height: 40px;
  font-size: var(--fs-xs);
}

.btn--lg {
  padding: 1.0625rem var(--sp-7);
  min-height: 56px;
  font-size: var(--fs-body);
}

/* Colorful glow button — vanilla port of ButtonColorful.
   Borderless dark fill with a layered teal–cyan wash. */
.btn-colorful {
  --btn-bg: rgba(11, 15, 18, 0.28);
  --btn-fg: #fff;
  --btn-bd: transparent;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: 0;
  border: 0;
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn-colorful:hover {
  --btn-bg: rgba(11, 15, 18, 0.4);
  --btn-fg: #fff;
  --btn-bd: transparent;
  color: #fff;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.btn-colorful:focus-visible {
  --btn-bg: rgba(11, 15, 18, 0.4);
  --btn-fg: #fff;
  --btn-bd: transparent;
  color: #fff;
  transform: none;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 3px rgba(23, 162, 166, 0.35);
}

.btn-colorful::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    rgba(8, 72, 76, 0.22) 0%,
    rgba(13, 113, 117, 0.42) 32%,
    rgba(18, 138, 141, 0.5) 58%,
    rgba(13, 113, 117, 0.32) 78%,
    rgba(8, 72, 76, 0.2) 100%
  );
  opacity: 0.7;
  transition: opacity 0.5s var(--ease-out);
}

.btn-colorful:hover::after,
.btn-colorful:focus-visible::after {
  opacity: 0.88;
}

.btn-colorful__glow {
  position: absolute;
  inset: -35% -15%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
      120% 90% at 12% 50%,
      rgba(8, 72, 76, 0.5) 0%,
      transparent 55%
    ),
    radial-gradient(
      90% 120% at 88% 40%,
      rgba(23, 162, 166, 0.45) 0%,
      transparent 58%
    ),
    linear-gradient(
      90deg,
      rgba(8, 72, 76, 0.65) 0%,
      rgba(13, 113, 117, 0.55) 42%,
      rgba(18, 138, 141, 0.5) 72%,
      rgba(13, 113, 117, 0.45) 100%
    );
  opacity: 0.32;
  filter: blur(18px);
  transition: opacity 0.5s var(--ease-out);
}

.btn-colorful:hover .btn-colorful__glow,
.btn-colorful:focus-visible .btn-colorful__glow {
  opacity: 0.48;
}

.btn-colorful__inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #fff;
}

.btn-colorful__icon {
  flex: none;
  width: 0.875rem;
  height: 0.875rem;
}

.btn-colorful.btn--lg .btn-colorful__icon {
  width: 1rem;
  height: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .btn-colorful::after,
  .btn-colorful__glow {
    transition: none;
  }
}

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

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.btn-row--center {
  justify-content: center;
}

@media (max-width: 420px) {
  .btn-row .btn {
    width: 100%;
  }
}

/* Text link with arrow - used for "Learn more" affordances */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  color: var(--teal-700);
}

.link-arrow svg {
  width: 1.05em;
  height: 1.05em;
  transition: transform var(--dur) var(--ease-out);
}

.link-arrow:hover svg {
  transform: translateX(4px);
}

.on-dark .link-arrow,
.section--dark .link-arrow,
.section--deep .link-arrow,
.section--ink .link-arrow,
.section--ink-2 .link-arrow,
.closing .link-arrow {
  color: var(--teal-300);
}

/* The larger cut, for the one link that has to carry a section on its own -
   the hero CTA, and the teasers that no longer end in a filled button. It is
   underlined by a rule that spans the link rather than the text, which is what
   keeps it reading as a destination instead of an inline link. */
.link-arrow--lg {
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid currentColor;
  transition: border-color var(--dur) var(--ease-out);
}

.link-arrow--lg:hover {
  border-bottom-color: transparent;
}

/* --------------------------------------------------------------------------
   6. Chips, pills, badges
   -------------------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.4375rem var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--navy);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.chip--teal {
  border-color: var(--teal-200);
  background: var(--teal-100);
  color: var(--teal-700);
}

.chip--dark {
  background: var(--d-surface);
  border-color: var(--d-border);
  color: var(--d-text-strong);
}

.chip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
  flex: none;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* --------------------------------------------------------------------------
   7. Cards
   -------------------------------------------------------------------------- */

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

.card--hover:hover {
  border-color: var(--teal-300);
  box-shadow: var(--sh-md);
  transform: translateY(-3px);
}

.card--dark {
  background: var(--d-surface);
  border-color: var(--d-border);
  box-shadow: var(--sh-inset-dark);
}

.card--dark.card--hover:hover {
  border-color: var(--teal-500);
  background: var(--d-surface-2);
}

.card__title {
  font-size: var(--fs-h4);
  margin-bottom: var(--sp-3);
}

.card__body {
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

.card__foot {
  margin-top: auto;
  padding-top: var(--sp-5);
}

/* Numbered index used on cards and steps */
.index-num {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  color: var(--teal-600);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   8. Icon frames
   -------------------------------------------------------------------------- */

.icon-frame {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--teal-100);
  color: var(--teal-700);
  border: 1px solid var(--teal-200);
}

.icon-frame svg {
  width: 26px;
  height: 26px;
}

.icon-frame--dark {
  background: rgba(23, 162, 166, 0.14);
  border-color: rgba(23, 162, 166, 0.32);
  color: var(--teal-300);
}

.icon-frame--navy {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--teal-300);
}

.icon-frame--sm {
  width: 40px;
  height: 40px;
}

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

/* --------------------------------------------------------------------------
   9. Decorative background layers
   -------------------------------------------------------------------------- */

/* Fine technical grid - sits behind dark sections */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(
    ellipse 80% 70% at 50% 40%,
    #000 20%,
    transparent 78%
  );
  pointer-events: none;
}

.bg-grid--light {
  background-image: linear-gradient(
      to right,
      rgba(28, 58, 94, 0.055) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(28, 58, 94, 0.055) 1px, transparent 1px);
}

/* Soft teal glow */
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}

.bg-glow--teal {
  background: radial-gradient(circle, rgba(23, 162, 166, 0.55), transparent 66%);
}

.bg-glow--navy {
  background: radial-gradient(circle, rgba(61, 106, 159, 0.5), transparent 66%);
}

/* Keeps decorative layers from spilling out of a section */
.clip {
  overflow: hidden;
  isolation: isolate;
}

.layer-content {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   10. Media frames
   -------------------------------------------------------------------------- */

.media-frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--n-50);
}

.media-frame--dark {
  border-color: var(--d-border);
  background: var(--navy-900);
  box-shadow: var(--sh-lg);
}

.media-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --------------------------------------------------------------------------
   11. Scroll reveal
   Progressive enhancement: `.reveal` only hides once JS adds `js-reveal`
   to <html>, so the page is fully readable with JS disabled or on error.
   -------------------------------------------------------------------------- */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.js-reveal .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js-reveal .reveal--scale {
  transform: translateY(22px) scale(0.985);
}

.js-reveal .reveal--left {
  transform: translateX(-26px);
}

.js-reveal .reveal--right {
  transform: translateX(26px);
}

/* Stagger children of a group */
.js-reveal .reveal-group > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
}

.js-reveal .reveal-group.is-in > * {
  opacity: 1;
  transform: none;
}

.js-reveal .reveal-group.is-in > *:nth-child(1) { transition-delay: 0ms; }
.js-reveal .reveal-group.is-in > *:nth-child(2) { transition-delay: 70ms; }
.js-reveal .reveal-group.is-in > *:nth-child(3) { transition-delay: 140ms; }
.js-reveal .reveal-group.is-in > *:nth-child(4) { transition-delay: 210ms; }
.js-reveal .reveal-group.is-in > *:nth-child(5) { transition-delay: 280ms; }
.js-reveal .reveal-group.is-in > *:nth-child(6) { transition-delay: 350ms; }
.js-reveal .reveal-group.is-in > *:nth-child(7) { transition-delay: 420ms; }
.js-reveal .reveal-group.is-in > *:nth-child(8) { transition-delay: 490ms; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal,
  .js-reveal .reveal-group > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   12. Utilities
   -------------------------------------------------------------------------- */

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

.flow-sm { --flow: var(--sp-3); }
.flow-md { --flow: var(--sp-5); }
.flow-lg { --flow: var(--sp-6); }

.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mt-8 { margin-top: var(--sp-8); }
.mt-9 { margin-top: var(--sp-9); }

.full-bleed-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.no-wrap {
  white-space: nowrap;
}
