/* ==========================================================================
   Socialting — Base styles
   Reset, root typography and small utility classes shared by every page.
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-ink);
  letter-spacing: var(--ls-tighter);
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* ---- Layout helpers -------------------------------------------------------*/

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

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

.section--dark {
  background: var(--gradient-primary);
  color: var(--color-on-blue);
}

.section--soft {
  background: var(--color-bg-soft-2);
}

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

/* ---- Typography scale ------------------------------------------------------*/

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-primary);
}

.section--dark .eyebrow {
  color: var(--color-on-blue);
}

.display-serif {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.text-muted {
  color: var(--color-muted);
}

.text-body {
  color: var(--color-body);
  line-height: var(--lh-relaxed);
}

.text-accent {
  color: var(--color-primary);
}

/* ---- Utility ---------------------------------------------------------------*/

.u-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;
}

.u-no-scroll {
  overflow: hidden;
}

/* ---- Scroll-reveal (progressive enhancement, see js/reveal.js) -------------*/

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-out);
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
