/* ============================================================
   BASE - Reset + typo + base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  max-width: 100vw;
}

/* Reset elements */
figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, picture, svg, video, iframe { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

[hidden] { display: none !important; }

/* Typo display */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-display);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin: 0 0 .75rem;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.02; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; }
h3 { font-size: clamp(1.4rem, 2.3vw, 1.85rem); }
h4 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); }

p { margin: 0 0 1rem; max-width: 65ch; }

em, .em {
  font-style: italic;
  color: var(--accent);
}

/* Eyebrow / surtitre */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--ff-ui);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* Selection */
::selection { background: var(--accent); color: #fff; }
::-moz-selection { background: var(--accent); color: #fff; }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
::-webkit-scrollbar { width: 8px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--accent) 70%, transparent); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Section */
section { padding: 56px 0; position: relative; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
