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

  * {
    margin: 0;
  }

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--nav-h) + 1rem);
  }

  body {
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

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

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

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

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

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  [hidden] {
    display: none !important;
  }
}

@layer base {
  /* Fonts. Display: PT Sans Pro Condensed ExtraBold for Latin and Cyrillic alike, so Russian,
     Uzbek and English headings share one face and one size (client feedback: the Russian pages
     are the reference). Futura Condensed has no Cyrillic; swap in ParaType Futura PT Cond here
     once it is supplied.

     font-display: block, not swap. Swap paints the fallback first and changes it a moment later,
     and a headline in the wrong face for a moment — condensed against not-condensed — is exactly
     what the client objected to. Block waits instead. It can do that because every one of these
     is preloaded in base.html, same-origin and subset to about 20 KB, so it is there by the time
     there is anything to paint; and if one ever fails to arrive, the fallback still appears after
     three seconds rather than never. */
  @font-face {
    font-family: "LD Display";
    src: url("../fonts/display-cyrillic-800.f15c61b0f6db.woff2") format("woff2");
    font-weight: 700 900;
    font-display: block;
    size-adjust: 92%;
  }

  @font-face {
    font-family: "LD Sans";
    src: url("../fonts/sans-400.f5bd631e725e.woff2") format("woff2");
    font-weight: 400;
    font-display: block;
  }

  /* The one exception to block. Nothing in the design selects italic body text — this face is
     only reached by an <em> inside copy the client writes, which is below the fold and is not
     worth a seventh preload. Unpreloaded and blocking would mean invisible words in the middle
     of a paragraph; a word changing face there is the lesser of the two. */
  @font-face {
    font-family: "LD Sans";
    src: url("../fonts/sans-400-italic.19309fdc7696.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
  }

  @font-face {
    font-family: "LD Sans";
    src: url("../fonts/sans-600.efa0d90d3059.woff2") format("woff2");
    font-weight: 600;
    font-display: block;
  }

  @font-face {
    font-family: "LD Sans";
    src: url("../fonts/sans-700.eb9f98ff5521.woff2") format("woff2");
    font-weight: 700 800;
    font-display: block;
  }

  @font-face {
    font-family: "LD Sans";
    src: url("../fonts/sans-900.8a1447aa07bb.woff2") format("woff2");
    font-weight: 900;
    font-display: block;
  }

  @font-face {
    font-family: "LD Serif";
    src: url("../fonts/serif-700-italic.caf4765e371d.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: block;
  }

  body {
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--ink);
    background: var(--surface);
    font-variant-numeric: lining-nums;
  }

  ::selection {
    background: var(--yellow);
    color: var(--navy);
  }

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

  .on-dark :focus-visible,
  :where(.hero, .site-footer) :focus-visible {
    outline-color: var(--yellow);
  }

  /* Client request: no visible page scrollbar. Inner scroll areas keep a thin one. */
  html {
    scrollbar-width: none;
  }

  html::-webkit-scrollbar {
    display: none;
  }

  * {
    scrollbar-width: thin;
    scrollbar-color: var(--line-3) transparent;
  }

  a {
    color: inherit;
    text-underline-offset: 0.22em;
    text-decoration-thickness: 1px;
  }

  h1,
  h2,
  h3,
  h4 {
    font-weight: 700;
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-heading);
    text-wrap: balance;
  }

  p {
    text-wrap: pretty;
  }

  strong,
  b {
    font-weight: 700;
  }

  input::placeholder,
  textarea::placeholder {
    color: var(--ink-3);
    opacity: 1;
  }

  input,
  textarea {
    caret-color: var(--blue);
  }

  table {
    border-collapse: collapse;
  }

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

  /* Type roles */
  .display-xl,
  .display-l,
  .display-m,
  .display-s {
    font-family: var(--font-display);
    font-weight: 800;
    text-transform: uppercase;
    line-height: var(--lh-display);
    letter-spacing: var(--ls-display);
    text-wrap: balance;
  }

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

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

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

  .display-s {
    font-size: var(--fs-display-s);
    letter-spacing: var(--ls-caps);
  }

  .h1 {
    font-size: var(--fs-h1);
    line-height: 1.12;
  }

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

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

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

  .lead {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 700;
    font-size: var(--fs-lead);
    line-height: 1.32;
    text-wrap: pretty;
  }

  .brand-label {
    font-size: var(--fs-xs);
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .muted {
    color: var(--ink-2);
  }

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

  /* Client feedback: a tyre size ("245/45 R19") is never split over two lines. */
  .nowrap {
    white-space: nowrap;
  }

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

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

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

  .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;
  }

  .skip-link {
    position: absolute;
    left: var(--space-s);
    top: -100px;
    z-index: calc(var(--z-modal) + 1);
    padding: var(--space-xs) var(--space-s);
    background: var(--surface);
    color: var(--navy);
    font-weight: 700;
    border-radius: var(--r-s);
    box-shadow: var(--shadow-pop);
  }

  .skip-link:focus {
    top: var(--space-s);
  }

  .icon {
    width: 1.25em;
    height: 1.25em;
    flex: none;
  }

  /* Reduced motion keeps fades and colour changes; components drop movement via
     their own prefers-reduced-motion rules. Keyframe loops stop here. */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 1ms !important;
      animation-iteration-count: 1 !important;
      scroll-behavior: auto !important;
    }
  }
}
