/* Tokens, reset and typography shared by every page */

:root {
  --wood: #2b1a12;
  --wood-2: #3d2619;
  --leaf: #22372a;
  --leaf-2: #2f4a39;
  --bamboo: #c8ae72;
  --bamboo-deep: #9c8247;
  --abaka: #ebe3d0;
  --abaka-2: #e0d5bc;
  --kalamansi: #d4dc4f;
  --ink-muted: #6b5444;
  --on-dark: #efe7d6;
  --on-dark-muted: #bfb29a;
  --danger: #a3341f;

  --font-display: 'Bricolage Grotesque', 'Arial Narrow', sans-serif;
  --font-body: 'Newsreader', Georgia, serif;

  --step--1: clamp(0.88rem, 0.85rem + 0.15vw, 0.95rem);
  --step-0: clamp(1.06rem, 1rem + 0.25vw, 1.2rem);
  --step-1: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.4rem + 1.3vw, 2.4rem);
  --step-3: clamp(2.3rem, 1.7rem + 2.6vw, 3.9rem);
  --step-4: clamp(3rem, 1.9rem + 5vw, 6.4rem);
  --step-5: clamp(3.6rem, 1.6rem + 9vw, 11rem);

  --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
  --max: 1320px;
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 28px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);

  --z-base: 1;
  --z-header: 50;
  --z-chat: 80;
  --z-cursor: 90;
  --z-curtain: 100;
}

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

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

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  background: var(--abaka);
  color: var(--wood);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

button {
  cursor: pointer;
  touch-action: manipulation;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
  font-variation-settings: 'wdth' 80;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-4);
}
h3 {
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}
h4 {
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  max-width: 62ch;
}

:focus-visible {
  outline: 3px solid var(--kalamansi);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--kalamansi);
  color: var(--wood);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-s);
}
.skip-link:focus {
  top: 1rem;
}

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.section {
  padding-block: clamp(4.5rem, 3rem + 7vw, 10rem);
  position: relative;
  overflow-x: clip;
}

.section--leaf {
  background: var(--leaf);
  color: var(--on-dark);
}
.section--wood {
  background: var(--wood);
  color: var(--on-dark);
}
.section--paper-2 {
  background: var(--abaka-2);
}

.lede {
  font-size: var(--step-1);
  line-height: 1.45;
  max-width: 40ch;
}

.kicker {
  font-family: var(--font-body);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--bamboo-deep);
  margin: 0 0 1rem;
}
.section--leaf .kicker,
.section--wood .kicker {
  color: var(--bamboo);
}

.muted {
  color: var(--ink-muted);
}
.section--leaf .muted,
.section--wood .muted {
  color: var(--on-dark-muted);
}

/* split-text helpers */
.split-line {
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

[hidden] {
  display: none !important;
}
