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

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

body {
  margin: 0;
  /* Keeps the footer at the bottom on short pages (the home stub). */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background-default);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-400);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure {
  margin: 0;
}

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

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--layout-container-max);
  margin-inline: auto;
  padding-inline: var(--layout-column-inner);
}

main {
  flex: 1 0 auto;
}

.section {
  width: 100%;
}

/* ---------- Typography scale ---------- */
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-600);
}

.h1 {
  font-size: clamp(40px, 6.3vw, var(--font-size-8xl));
  line-height: 1;
  letter-spacing: var(--letter-spacing-tighter);
}

.h2 {
  font-size: clamp(32px, 3.9vw, var(--font-size-5xl));
  line-height: 1;
  letter-spacing: var(--letter-spacing-tight);
}

.h3 {
  font-size: clamp(28px, 3.24vw, var(--font-size-4xl));
  line-height: 1.1;
  letter-spacing: var(--letter-spacing-tight);
}

.h4 {
  font-size: clamp(24px, 2.6vw, var(--font-size-3xl));
  line-height: 1.1;
}

.h5 {
  font-size: var(--font-size-2xl);
  line-height: 1.4;
}

.h6 {
  font-size: var(--font-size-xl);
  line-height: 1.4;
}

.body-lg {
  font-size: var(--font-size-lg);
  line-height: 1.5;
}

.body-base {
  font-size: var(--font-size-md);
  line-height: 1.5;
}

.body-sm {
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.body-xs {
  font-size: var(--font-size-xs);
  line-height: 1.2;
  letter-spacing: var(--letter-spacing-wide);
}

.overline {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-600);
  line-height: 1.3;
  letter-spacing: var(--letter-spacing-wider);
  text-transform: uppercase;
}

.text-muted {
  color: #6b6f73;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  font-family: var(--font-button);
  font-weight: var(--font-weight-500);
  letter-spacing: var(--letter-spacing-wide);
  line-height: 24px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--md {
  font-size: var(--font-size-sm);
  padding: 9px var(--spacing-5);
}

.btn--lg {
  font-size: var(--font-size-md);
  padding: var(--spacing-3) var(--spacing-6);
}

.btn--primary {
  background: var(--button-primary);
  color: var(--text-inverse);
}

.btn--primary:hover {
  background: var(--brand-active);
}

.btn--black {
  background: var(--button-black);
  color: var(--text-inverse);
}

.btn--black:hover {
  background: #000000;
}

.btn--white {
  background: var(--button-white);
  color: var(--text-primary);
}

.btn--white:hover {
  background: var(--background-subtle);
}

.btn--ghost {
  background: transparent;
  color: var(--text-inverse);
  border: var(--border-width-medium) solid var(--button-white);
}

.btn--ghost:hover {
  background: var(--button-white);
  color: var(--text-primary);
}

.btn--outline {
  background: transparent;
  color: var(--text-primary);
  border: var(--border-width-medium) solid var(--button-black);
  padding-block: var(--spacing-2);
}

.btn--outline:hover {
  background: var(--button-black);
  color: var(--text-inverse);
}
