/* ============================================================
   SCG — Tokens & shared base
   Palette + type + reset + components used across all directions
   ============================================================ */

:root {
  /* Palette */
  --paper:       #f7f3ea;
  --paper-deep:  #f1ead9;
  --white:       #ffffff;
  --ink:         #211e17;
  --ink-soft:    #6f6859;
  --copper:      #a9772a;
  --copper-bright:#c2871f;
  --line:        #e7dfce;
  --line-strong: #d8ccb0;

  /* Copper tints */
  --copper-wash: rgba(169, 119, 42, 0.08);
  --copper-wash-2: rgba(169, 119, 42, 0.14);

  /* Fonts */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;

  /* Layout */
  --maxw: 1280px;
  --gut: clamp(20px, 5vw, 64px);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Accent — overridden per direction */
  --accent: var(--copper);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---- Display type ---- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--accent);
}

p { margin: 0; text-wrap: pretty; }

/* ---- Layout helpers ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gut);
}

section { position: relative; }

/* ---- Eyebrow / section index label ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow .idx { color: var(--accent); }
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85em 1.4em;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.35s var(--ease);
  white-space: nowrap;
}
.btn .arr { transition: transform 0.35s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }

.btn--solid {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

.btn--copper {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn--copper:hover { background: var(--ink); border-color: var(--ink); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--link {
  padding: 0;
  background: none;
  border: none;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn--link:hover { border-color: var(--accent); color: var(--accent); }

/* ---- Reveal animation (driven by JS IntersectionObserver) ---- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Section heading block ---- */
.shead { max-width: 760px; }
.shead h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  margin-top: 18px;
}
.shead .lede {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.5vw, 19px);
  max-width: 56ch;
}

/* ---- Utility ---- */
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.mono { font-family: var(--font-mono); }
