/* =========================================================================
   Base / reset — sensible defaults built on top of tokens.css
   ========================================================================= */

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input {
  font: inherit;
}

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

h1,
h2,
h3,
h4 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-black);
  letter-spacing: -0.02em;
  color: var(--ink);
}

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

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.01em;
}

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

strong {
  color: var(--ink);
  font-weight: var(--fw-bold);
}

::selection {
  background: var(--yt-red);
  color: #fff;
}

/* Visible, accessible focus state */
:focus-visible {
  outline: 3px solid var(--yt-red);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Screen-reader only */
.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;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: calc(var(--z-header) + 1);
  transition: top var(--dur) var(--ease-out);
}

.skip-link:focus {
  top: 12px;
}
