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

[hidden] {
  display: none !important;
}

/* Widths: mobile under 768 px, tablet 768 to 1279 px, desktop from 1280 px. Every value comes
   from tokens.css. */

/* --- Reset ------------------------------------------------------------------------------ */

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

body,
h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

summary {
  list-style: none;
  cursor: pointer;
}

summary::-webkit-details-marker {
  display: none;
}

/* --- Base --------------------------------------------------------------------------------- */

html {
  scroll-padding-top: var(--header-clearance);
}

html.menu-open,
html:has(#site-menu:target) {
  overflow: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-page);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

input,
select,
textarea {
  font-size: var(--text-input-size);
  line-height: var(--text-input-line);
}

h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line);
  font-weight: var(--weight-bold);
}

h2 {
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  font-weight: var(--weight-semibold);
}

/* --- Type scale (the Figma text styles) --------------------------------------------------- */

.t-hero {
  font-size: var(--text-hero-size);
  line-height: var(--text-hero-line);
  font-weight: var(--weight-bold);
}

.t-display {
  font-size: var(--text-display-size);
  line-height: var(--text-display-line);
  font-weight: var(--weight-bold);
}

.t-h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line);
  font-weight: var(--weight-bold);
}

.t-h2 {
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line);
  font-weight: var(--weight-bold);
}

.t-h3 {
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  font-weight: var(--weight-semibold);
}

.t-quote {
  font-size: var(--text-quote-size);
  line-height: var(--text-quote-line);
  font-weight: var(--weight-regular);
}

.t-metric-hero {
  font-size: var(--text-metric-hero-size);
  line-height: var(--text-metric-hero-line);
  font-weight: var(--weight-bold);
}

.t-metric-xl {
  font-size: var(--text-metric-xl-size);
  line-height: var(--text-metric-xl-line);
  font-weight: var(--weight-bold);
}

.t-metric {
  font-size: var(--text-metric-size);
  line-height: var(--text-metric-line);
  font-weight: var(--weight-bold);
}

.t-body-lg {
  font-size: var(--text-body-lg-size);
  line-height: var(--text-body-lg-line);
  font-weight: var(--weight-regular);
}

.t-body {
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  font-weight: var(--weight-regular);
}

.t-body-sm {
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
  font-weight: var(--weight-regular);
}

.t-eyebrow {
  font-size: var(--text-eyebrow-size);
  line-height: var(--text-eyebrow-line);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--text-eyebrow-tracking);
  text-transform: uppercase;
}

.t-button {
  font-size: var(--text-button-size);
  line-height: var(--text-button-line);
  font-weight: var(--weight-semibold);
}

.t-nav {
  font-size: var(--text-nav-size);
  line-height: var(--text-nav-line);
  font-weight: var(--weight-medium);
}

.t-input {
  font-size: var(--text-input-size);
  line-height: var(--text-input-line);
  font-weight: var(--weight-regular);
}

.t-label {
  font-size: var(--text-label-size);
  line-height: var(--text-label-line);
  font-weight: var(--weight-medium);
}

/* Read by assistive technology, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --- Layout ------------------------------------------------------------------------------- */

/* Content width: 350 at 390, 688 at 768, 1200 from 1280 (the page margin on each side). */
.container {
  width: min(100% - 2 * var(--page-margin), var(--content-max));
  margin-inline: auto;
}

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

.page {
  flex: 1 0 auto;
  padding-top: var(--header-clearance);
}

/* --- Logo --------------------------------------------------------------------------------- */

.logo {
  width: var(--logo-width);
  height: var(--logo-height);
  color: var(--color-accent);
}

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

/* Under 1280 px: a bar (logo, menu button) and a full-screen menu panel under it.
   From 1280 px: the header itself is the floating pill; bar and menu lay out inside it. */
.site-header {
  position: fixed;
  z-index: 10;
  top: var(--header-top);
  left: 0;
  right: 0;
  width: min(100% - 2 * var(--page-margin), var(--content-max));
  margin-inline: auto;
  color: var(--color-white);
}

.site-header :focus-visible {
  outline-color: var(--color-accent);
}

.site-header__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-bar-height);
  padding: var(--space-6) var(--space-6) var(--space-6) var(--space-20);
  border-radius: var(--radius-bar);
  background: var(--color-navy-900);
}

.site-header__logo {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  padding: var(--space-10);
  color: var(--color-white);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.menu-toggle[aria-expanded="true"] .icon-menu,
.menu-toggle:not([aria-expanded="true"]) .icon-close,
.menu-toggle--close,
.site-header:has(#site-menu:target) .menu-toggle--open {
  display: none;
}

.site-header:has(#site-menu:target) .menu-toggle--close {
  display: flex;
}

/* The menu panel, closed until the button opens it (or #site-menu is the target, without
   JavaScript). Fixed to the viewport, under the bar. */
.site-menu {
  display: none;
}

.site-header.is-open .site-menu,
.site-menu:target {
  position: fixed;
  z-index: 1;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: calc(var(--header-top) + var(--header-bar-height) + var(--space-24)) var(--page-margin)
    var(--space-32);
  background: var(--color-navy-900);
}

.site-menu__links a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: var(--space-14) var(--space-20);
  font-size: var(--text-menu-size);
  line-height: var(--text-menu-line);
  font-weight: var(--weight-semibold);
}

.site-menu__links li + li {
  border-top: 1px solid var(--color-on-navy-rule);
}

.site-menu__links a[aria-current="page"] {
  color: var(--color-accent);
}

.site-menu__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  padding-top: var(--space-24);
}

.languages {
  display: flex;
  padding: var(--space-32) 0 0 var(--space-8);
}

.languages a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-target);
  height: var(--touch-target);
  font-size: var(--text-nav-size);
  line-height: var(--text-nav-line);
  font-weight: var(--weight-medium);
  color: var(--color-on-navy-muted);
}

.languages a[aria-current="true"] {
  color: var(--color-white);
}

.button-outline,
.button-accent {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-height);
  white-space: nowrap;
}

.button-outline {
  padding: var(--space-14) var(--space-20);
  border: 1px solid var(--color-on-navy-border);
  border-radius: var(--radius-round);
  font-size: var(--text-nav-size);
  line-height: var(--text-nav-line);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
}

.button-accent {
  height: var(--button-height);
  padding: 0 var(--space-24);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-text-on-action);
  font-size: var(--text-button-size);
  line-height: var(--text-button-line);
  font-weight: var(--weight-semibold);
}

/* Hover only adds emphasis; it never carries information. */
@media (hover: hover) {
  .site-footer__links a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }
}

/*
 * --- Hover and pressed states (card 46, Figma "02 Foundations", "· States" 2527:98) ----------
 * The five buttons, and what is drawn as one of them: on hover the default colours and the glow
 * of their set, nothing else; pressed, one colour step and no glow. Hover only where the device
 * hovers; pressed everywhere. A disabled or sending button (aria-disabled) shows neither. The
 * focus ring (an outline) stays as it is, with a hover too. 150 ms, ease, on what changes only,
 * once the page's styles are in (data-states-ready, main.js); nothing moves with reduced motion,
 * and the state still shows.
 *   Button Primary (482:31): .button-primary
 *   Button Secondary (482:31): .button-secondary, .careers__all, .legal-button,
 *     .not-found__button--outline
 *   Button on inverse (482:47): .button-inverse, .consent-banner__button
 *   Button accent (3847:137): .button-accent
 *   Button outline on inverse (3847:185): .button-outline (its background stays transparent)
 * Card 51: the Imprint's entity tabs (teal pills, none drawn for their states) follow the same
 * rules: a tab not selected glows teal on hover, as a light button; pressed, its label takes one
 * step (teal-700 to teal-800, as a text link) and no glow. The selected tab shows neither.
 */
@media (prefers-reduced-motion: no-preference) {
  :root[data-states-ready]
    :is(
      .button-primary,
      .button-secondary,
      .careers__all,
      .legal-button,
      .not-found__button--outline,
      .button-inverse,
      .consent-banner__button,
      .button-accent,
      .button-outline
    ) {
    transition:
      box-shadow var(--state-duration) var(--state-easing),
      background-color var(--state-duration) var(--state-easing);
  }

  :root[data-states-ready] .legal-tabs__tab {
    transition:
      box-shadow var(--state-duration) var(--state-easing),
      color var(--state-duration) var(--state-easing);
  }

  :root[data-states-ready] :is(.site-menu__links a, .text-link, .certification__link) {
    transition: color var(--state-duration) var(--state-easing);
  }
}

@media (hover: hover) {
  .button-primary:not(:disabled, [aria-disabled="true"]):hover,
  .button-secondary:not(:disabled, [aria-disabled="true"]):hover,
  .careers__all:not(:disabled, [aria-disabled="true"]):hover,
  .legal-button:not(:disabled, [aria-disabled="true"]):hover,
  .not-found__button--outline:not(:disabled, [aria-disabled="true"]):hover {
    box-shadow: var(--glow-hover-teal);
  }

  .button-inverse:not(:disabled, [aria-disabled="true"]):hover,
  .consent-banner__button:not(:disabled, [aria-disabled="true"]):hover,
  .button-outline:not(:disabled, [aria-disabled="true"]):hover {
    box-shadow: var(--glow-hover-white);
  }

  .button-accent:not(:disabled, [aria-disabled="true"]):hover {
    box-shadow: var(--glow-hover-mint);
  }

  .legal-tabs__tab:not([aria-selected="true"]):hover {
    box-shadow: var(--glow-hover-teal);
  }

  /* Nav link (2525:37): the label in teal on hover; the current page's link keeps its colour. */
  .site-menu__links a:not([aria-current="page"]):hover {
    color: var(--color-text-accent-on-inverse);
  }
}

.button-primary:not(:disabled, [aria-disabled="true"]):active {
  background-color: var(--color-action-primary-pressed);
  box-shadow: none;
}

.button-secondary:not(:disabled, [aria-disabled="true"]):active,
.careers__all:not(:disabled, [aria-disabled="true"]):active,
.legal-button:not(:disabled, [aria-disabled="true"]):active,
.not-found__button--outline:not(:disabled, [aria-disabled="true"]):active,
.button-inverse:not(:disabled, [aria-disabled="true"]):active,
.consent-banner__button:not(:disabled, [aria-disabled="true"]):active {
  background-color: var(--color-action-secondary-pressed);
  box-shadow: none;
}

.button-accent:not(:disabled, [aria-disabled="true"]):active {
  background-color: var(--color-action-accent-pressed);
  box-shadow: none;
}

.button-outline:not(:disabled, [aria-disabled="true"]):active {
  background-color: var(--color-action-outline-on-inverse-pressed);
  box-shadow: none;
}

/* Text link (2525:24), pressed: one step darker on light, lighter on navy. */
.text-link:active {
  color: var(--color-text-accent-pressed);
}

.certification__link:active {
  color: var(--color-text-accent-on-inverse-pressed);
}

.legal-tabs__tab:not([aria-selected="true"]):active {
  box-shadow: none;
  color: var(--color-text-accent-pressed);
}

/* --- Language list (a disclosure: works without JavaScript) ------------------------------- */

.language-list {
  position: relative;
  display: none;
}

.language-list__summary {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--touch-target);
  font-size: var(--text-button-size);
  line-height: var(--text-button-line);
  font-weight: var(--weight-semibold);
}

.language-list__summary svg {
  width: 10px;
  height: 5px;
  overflow: visible;
}

.language-list[open] .language-list__summary svg {
  transform: rotate(180deg);
}

.language-list__options {
  position: absolute;
  z-index: 3;
  top: calc(100% + var(--space-4));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  min-width: 72px;
  padding: var(--space-8);
  border: 1px solid var(--color-on-navy-rule);
  border-radius: var(--radius-list);
  background: var(--color-navy-900);
  box-shadow: var(--shadow-header);
}

.language-list__options a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target);
  padding: 0 var(--space-12);
  font-size: var(--text-nav-size);
  line-height: var(--text-nav-line);
  font-weight: var(--weight-medium);
  color: var(--color-on-navy-muted);
}

.language-list__options a[aria-current="true"] {
  color: var(--color-white);
}

/* --- Header from 1280 px: the floating pill ------------------------------------------------ */

@media (min-width: 1280px) {
  .site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-pill-height);
    padding: 0 var(--space-12) 0 var(--space-24);
    border-radius: var(--radius-bar);
    background: var(--color-navy-900);
    box-shadow: var(--shadow-header);
    backdrop-filter: blur(var(--blur-header));
    -webkit-backdrop-filter: blur(var(--blur-header));
  }

  .site-header__bar,
  .site-menu,
  .site-header.is-open .site-menu,
  .site-menu:target {
    display: contents;
  }

  .menu-toggle,
  .site-header:has(#site-menu:target) .menu-toggle--close {
    display: none;
  }

  .site-menu__links {
    display: flex;
    gap: var(--space-36);
  }

  .site-menu__links li + li {
    border: 0;
  }

  .site-menu__links a {
    min-height: var(--touch-target);
    padding: 0;
    font-size: var(--text-nav-size);
    line-height: var(--text-nav-line);
    font-weight: var(--weight-medium);
  }

  .site-menu__actions {
    flex-direction: row;
    align-items: center;
    gap: var(--space-16);
    padding: 0;
  }

  .languages {
    display: none;
  }

  .site-header .language-list {
    display: block;
  }
}

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

.site-footer {
  flex-shrink: 0;
  padding: var(--space-64) 0 var(--space-32);
  background: var(--color-navy-900);
  color: var(--color-white);
}

.site-footer :focus-visible {
  outline-color: var(--color-accent);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-20);
}

.site-footer__brand {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-16);
}

.site-footer__brand .logo {
  width: var(--footer-logo-width);
  height: var(--footer-logo-height);
}

/* Card 45b: the logo's link, a 44 px touch target that takes the logo's own height in the
   footer (nothing moves). */
.site-footer__logo {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
  margin-block: calc((var(--footer-logo-height) - var(--touch-target)) / 2);
}

.site-footer__tagline {
  max-width: 320px;
  color: var(--color-on-navy-text);
}

.site-footer__offices {
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
  color: var(--color-on-navy-muted);
}

.site-footer__column {
  padding-top: var(--space-40);
}

.site-footer__column--touch {
  grid-column: 1 / -1;
  padding-top: var(--space-32);
}

.site-footer__title {
  font-size: var(--text-eyebrow-size);
  line-height: var(--text-eyebrow-line);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--text-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--color-accent);
}

.site-footer__links a {
  display: flex;
  align-items: center;
  min-height: var(--touch-target);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin-top: var(--space-40);
  padding-top: var(--space-24);
  border-top: 1px solid var(--color-on-navy-rule);
}

.site-footer__copyright {
  flex: 1;
  font-size: var(--text-body-sm-size);
  line-height: var(--text-body-sm-line);
  color: var(--color-on-navy-text);
}

.site-footer .language-list {
  display: block;
}

.site-footer .language-list__summary {
  padding: 0 var(--space-6);
  font-weight: var(--weight-medium);
  line-height: var(--text-label-line);
  color: var(--color-on-navy-language);
}

.site-footer .language-list__summary svg {
  color: var(--color-slate-300);
}

.site-footer .language-list__options {
  top: auto;
  bottom: calc(100% + var(--space-4));
  left: auto;
  right: 0;
  transform: none;
}

/* Tablet: brand on top, the three columns in one row, then the rule and the bottom row. */
@media (min-width: 768px) {
  .site-footer {
    padding-top: var(--space-80);
  }

  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    column-gap: var(--space-24);
  }

  .site-footer__column--touch {
    grid-column: auto;
    padding-top: var(--space-40);
  }
}

/* Desktop: brand and the three columns side by side, as drawn (480 + 3 x 240 = 1200). */
@media (min-width: 1280px) {
  .site-footer {
    padding: var(--space-80) 0 76px;
  }

  .site-footer__grid {
    grid-template-columns: 480px repeat(3, 240px);
    column-gap: 0;
  }

  .site-footer__brand {
    grid-column: auto;
  }

  .site-footer__column,
  .site-footer__column--touch {
    padding-top: 0;
  }

  .site-footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    padding-top: var(--space-12);
  }

  .site-footer__links a {
    min-height: 0;
  }

  .site-footer__bottom {
    margin-top: 55px;
    padding-top: 23px;
  }

  .site-footer .language-list__summary {
    min-height: var(--text-label-line);
  }
}
