/* Alapok: reset, tipográfiai alaphang, fókuszgyűrű, ugrólink, mozgáscsökkentés. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--f-ground);
  color: var(--f-ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

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

h1,
h2 {
  font-weight: 500;
  line-height: 0.99;
}

h1 {
  font-size: var(--t-h1);
  letter-spacing: -0.048em;
}

h2 {
  font-size: var(--t-h2);
  letter-spacing: -0.043em;
}

h3 {
  margin: 0;
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

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

a:hover {
  color: var(--f-primary-hover);
}

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

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

strong,
b {
  font-weight: 600;
}

/* Fókusz: mindig látható, minden felületen. */
:focus-visible {
  outline: 3px solid var(--f-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.on-dark :focus-visible,
.u-dark :focus-visible {
  outline-color: var(--f-mustard);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -200px;
  z-index: 100;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  background: var(--f-dark);
  color: var(--f-on-dark-strong);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: var(--f-on-dark-strong);
}

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.u-mono {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.u-lead {
  font-size: var(--t-lead);
  line-height: 1.45;
}

.u-soft {
  color: var(--f-ink-soft);
}

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