:root {
  --bg: #efefec;
  --bg-alt: #e8e8e4;
  --surface: #f7f7f4;
  --text: #101011;
  --muted: #505055;
  --line: #b8b8b3;
  --line-strong: #7f7f7b;
  --dark: #0a0a0b;

  --space-1: clamp(0.4rem, 0.35rem + 0.18vw, 0.6rem);
  --space-2: clamp(0.7rem, 0.6rem + 0.25vw, 1rem);
  --space-3: clamp(1rem, 0.9rem + 0.4vw, 1.5rem);
  --space-4: clamp(1.5rem, 1.35rem + 0.75vw, 2.4rem);
  --space-5: clamp(2.4rem, 2.1rem + 1.25vw, 4rem);
  --space-6: clamp(3.5rem, 3.1rem + 2vw, 6.5rem);
  --space-7: clamp(5rem, 4.2rem + 3.8vw, 10rem);

  --text-sm: clamp(0.84rem, 0.8rem + 0.15vw, 0.95rem);
  --text-md: clamp(1rem, 0.97rem + 0.15vw, 1.1rem);
  --text-lg: clamp(1.2rem, 1rem + 0.65vw, 1.55rem);
  --h4: clamp(1.2rem, 1rem + 0.9vw, 1.9rem);
  --h3: clamp(1.6rem, 1.2rem + 1.65vw, 2.8rem);
  --h2: clamp(2.2rem, 1.45rem + 3.8vw, 5.3rem);
  --h1: clamp(3rem, 1.9rem + 6.2vw, 8.6rem);

  --content-max: 1480px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter Variable", "Inter", "Space Grotesk", "Segoe UI", sans-serif;
  font-size: var(--text-md);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  letter-spacing: 0.003em;
  text-rendering: geometricPrecision;
}

img { max-width: 100%; height: auto; display: block; }

main,
section,
footer,
header { position: relative; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  font-family: "Space Grotesk", "Inter Variable", sans-serif;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }

p {
  margin: 0 0 var(--space-3);
  max-width: 70ch;
  color: color-mix(in srgb, var(--text) 90%, white 10%);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
  z-index: 999;
  padding: var(--space-2);
  background: #fff;
}

.texture-grain::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 8%, rgba(255, 255, 255, 0.33), transparent 44%),
    radial-gradient(circle at 84% 90%, rgba(255, 255, 255, 0.16), transparent 40%),
    url('/assets/img/textures/grain.svg');
  background-size: auto, auto, 240px 240px;
  opacity: 0.44;
}

.container {
  width: min(var(--content-max), 92vw);
  margin-inline: auto;
}

.section { padding: var(--space-7) 0; }

.split {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 980px) {
  .split {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
  }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-2);
}

/* Refined editorial scale and rhythm */
:root {
  --space-6: clamp(3rem, 4.8vw, 5rem);
  --space-7: clamp(3.5rem, 6vw, 6rem);
  --text-md: clamp(1rem, 0.98rem + 0.1vw, 1.05rem);
  --text-lg: clamp(1.15rem, 1.05rem + 0.4vw, 1.45rem);
  --h4: clamp(1.2rem, 1.05rem + 0.5vw, 1.65rem);
  --h3: clamp(1.4rem, 1.16rem + 0.8vw, 2rem);
  --h2: clamp(2.5rem, 1.9rem + 2.2vw, 4.2rem);
  --h1: clamp(3.2rem, 2.25rem + 3vw, 5.3rem);
}

h1, h2, h3, h4 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
h1 { line-height: .96; }
h2 { line-height: 1; }
h3, h4 { line-height: 1.04; }
p { max-width: 65ch; }
.section { padding-block: clamp(3.5rem, 6vw, 6rem); }
.section-compact { padding-block: clamp(2.5rem, 4vw, 4rem); }

@media (max-width: 639px) {
  :root {
    --h1: clamp(2.7rem, 12vw, 4.4rem);
    --h2: clamp(2rem, 8vw, 3rem);
    --h3: clamp(1.6rem, 6vw, 2.25rem);
  }
  .section { padding-block: 3rem; }
}
