/* ==========================================================================
   Oasis Code — reset, sheet shell, typography, shared utilities (light)
   ========================================================================== */

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

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

body,
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
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; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-weight: inherit; }

:where(a, button, summary):focus-visible {
  outline: 2px solid var(--water);
  outline-offset: 3px;
}

::selection { background: var(--water-soft); color: var(--ink); }

/* Page shell --------------------------------------------------------------- */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.58;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* The channel needs a lane of its own so it never sits under text. */
@media (min-width: 1180px) {
  body { padding-left: var(--channel); }
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: var(--wdth-statement);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); letter-spacing: -0.03em; line-height: 0.94; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-1); font-stretch: 104%; font-weight: 700; letter-spacing: -0.012em; line-height: 1.2; }

p { max-width: 68ch; }

.lede {
  font-size: var(--step-1);
  color: var(--mute);
  line-height: 1.5;
  max-width: 46ch;
}

/* Sections ----------------------------------------------------------------- */

.section { padding-block: clamp(60px, 8vw, 124px); scroll-margin-top: calc(var(--header-h) + 12px); }
.section--ruled { border-top: var(--rule-w) solid var(--rule-soft); }

.section__head {
  display: grid;
  gap: 20px 56px;
  align-items: end;
  margin-bottom: clamp(34px, 4.5vw, 64px);
}

@media (min-width: 900px) {
  .section__head { grid-template-columns: minmax(0, 1fr) minmax(0, 40ch); }
}

.section__head .lede { max-width: 40ch; }

/* Reveal on scroll: one pattern, staggered inside a block ------------------ */

/* Scoped to .js so a page without JavaScript shows everything. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Load sequence: one orchestrated moment for the sheet -------------------- */

.js [data-anim] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.js.is-loaded [data-anim] { opacity: 1; transform: none; }
.js.is-loaded [data-anim="title"]  { transition-delay: 60ms; }
.js.is-loaded [data-anim="sub"]    { transition-delay: 180ms; }
.js.is-loaded [data-anim="cta"]    { transition-delay: 270ms; }
.js.is-loaded [data-anim="map"]    { transition-delay: 340ms; }
.js.is-loaded [data-anim="legend"] { transition-delay: 520ms; }

/* Utilities ---------------------------------------------------------------- */

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-weight: 600;
  transition: top 160ms var(--ease);
}

.skip:focus-visible { top: 12px; }

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

html.is-locked { overflow: hidden; }

/* Motion preferences ------------------------------------------------------ */

@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;
    transition-delay: 0ms !important;
  }

  .js [data-reveal], .js [data-anim] { opacity: 1; transform: none; }
}
