/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* The mobile menu drawer is position:fixed and parked off-screen. In RTL it
     sits at a negative left offset, which expands the document's scroll width
     and causes a few pixels of horizontal scroll. body's overflow-x cannot
     contain a fixed element, so it is also set here. */
  overflow-x: hidden;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--color-ink);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-light);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: calc(var(--z-nav) + 1);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

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

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  color: var(--color-primary);
}

h1 {
  font-size: var(--text-hero);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--text-h2);
  letter-spacing: -0.015em;
}

h3 {
  font-size: var(--text-h3);
}

p {
  max-width: 65ch;
}

.label {
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin-bottom: var(--space-sm);
}

.label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-accent);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-stat);
  line-height: 1;
  color: var(--color-primary);
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--space-3xl);
}

.section--dark {
  background-color: var(--color-primary-dark);
  color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-white);
}

.section--dark .label {
  color: var(--color-accent-light);
}

.section--dark .label::before {
  background: var(--color-accent-light);
}

.section--cream {
  background-color: var(--color-cream);
}

.section--sand {
  background-color: var(--color-sand);
}

.section--off-white {
  background-color: var(--color-off-white);
}

/* ── Grid ── */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding-block: var(--space-2xl);
  }
}

@media (max-width: 480px) {
  .grid--4 {
    grid-template-columns: 1fr;
  }

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

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
  }
}

/* ── Visually hidden (accessible) ── */
.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;
}
