/* ==========================================================================
   BASE — reset, typography, buttons, container, section headings
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

/* Fluid root size: 16px up to ~1440px wide, then scales up smoothly
   (≈18px at 1920px, max 20px on 2560px+ monitors). Every size on the site is
   in rem, so text, spacing, cards and the container all grow together. */
html {
  font-size: clamp(100%, 0.625rem + 0.4167vw, 125%);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* clip off-screen reveal animations without breaking position: sticky */
main { overflow-x: clip; }

img, video, svg { display: block; max-width: 100%; }
iframe, table { max-width: 100%; }
h1, h2, h3, h4, p, li, a, dd { overflow-wrap: break-word; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.25rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
h4 { font-size: 1rem; font-weight: 800; letter-spacing: 0; }
/* smaller h2 for long headings that sit in a half-width column */
.h2--sm { font-size: clamp(1.6rem, 2.6vw, 2.25rem); line-height: 1.12; }

::selection { background: var(--pine); color: #fff; }

:focus-visible { outline: 2px solid var(--pine); outline-offset: 0.1875rem; border-radius: 2px; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--mist { background: var(--pine-mist); }
.section--dark { background: var(--coal); color: rgba(255, 255, 255, 0.72); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split > *, .grid > * { min-width: 0; } /* stop wide media (videos, tables) from stretching columns */
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* ---------- Section heading (used on every page for a consistent look) ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pine);
}
.eyebrow::before { content: ""; width: 1.5rem; height: 2px; background: currentColor; }

.section-head { max-width: 52rem; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.section-head h2 { margin-top: 1rem; }
.section-head .lead { margin-top: 1.25rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow::after { content: ""; width: 1.5rem; height: 2px; background: currentColor; }

.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); line-height: 1.7; }
.section--dark .lead { color: rgba(255, 255, 255, 0.65); }
.mono { font-family: var(--font-mono); }
.accent { color: var(--pine); }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.5rem;
  border: 1.5px solid var(--ink);
  border-radius: 62.4375rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}
.btn svg { width: 1.125rem; height: 1.125rem; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(0.1875rem); }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pine);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { border-color: var(--pine); color: #fff; }

.btn--solid { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--light { border-color: #fff; color: var(--ink); background: #fff; }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.5); color: #fff; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.3s, gap 0.3s var(--ease);
}
.link-arrow svg { width: 1rem; height: 1rem; }
.link-arrow:hover { color: var(--pine); gap: 0.75rem; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 62.4375rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #fff;
}
.chip--pine { border-color: transparent; background: var(--pine-soft); color: var(--pine-deep); }

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