/* ============================================================
   base.css — design tokens, reset, typography, primitives
   Mobile-first. No inline styles, no !important.
   ============================================================ */

:root {
  /* surfaces */
  --bg: #F4EFE6;
  --surface: #FFFFFF;
  --surface-2: #EBE3D3;
  --surface-3: #E0D5BE;

  /* ink */
  --text: #1F1E1C;
  --text-soft: #3A3833;
  --muted: #6E6A63;
  --line: #DCD2C0;
  --line-soft: #E8E0CF;

  /* accents — warm earth palette */
  --sage:        #6B7A5A;
  --sage-deep:   #4A5740;
  --clay:        #B8755B;   /* terracotta */
  --clay-soft:   #D89A82;
  --ochre:       #C9A66B;   /* mustard / golden */
  --plum:        #5C3F4A;   /* deep accent for restraint */

  /* tokens used throughout */
  --accent:      var(--sage);
  --accent-deep: var(--sage-deep);
  --highlight:   var(--clay);

  /* radii / shadow */
  --radius-sm: 4px;
  --radius:    12px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-1: 0 1px 0 rgba(31,30,28,0.04), 0 6px 18px rgba(31,30,28,0.06);
  --shadow-2: 0 1px 0 rgba(31,30,28,0.04), 0 22px 50px -18px rgba(31,30,28,0.18);
  --shadow-warm: 0 30px 60px -28px rgba(184,117,91,0.35);

  /* fonts */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* layout */
  --container: 1180px;
  --container-narrow: 820px;
  --gutter: 20px;
  --gutter-lg: 36px;
  --header-h: 68px;

  /* motion */
  --ease:   cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-1: 180ms;
  --dur-2: 320ms;
  --dur-3: 600ms;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--dur-1) var(--ease);
}

a:hover,
a:focus-visible { color: var(--accent-deep); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 2.6vw, 1.55rem); }

p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection {
  background: var(--clay);
  color: var(--bg);
}

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

.skip-link {
  position: absolute;
  top: -48px; left: 12px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--dur-1) var(--ease);
}

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

/* ---------- Eyebrow ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 16px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--clay);
}

.eyebrow--centered { justify-content: center; }
.eyebrow--bare::before { display: none; }

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition:
    background-color var(--dur-2) var(--ease),
    color var(--dur-2) var(--ease),
    border-color var(--dur-2) var(--ease),
    transform var(--dur-2) var(--ease),
    box-shadow var(--dur-2) var(--ease);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.btn::after {
  content: "→";
  font-family: var(--font-body);
  transition: transform var(--dur-2) var(--ease);
}

.btn:hover::after,
.btn:focus-visible::after { transform: translateX(4px); }

.btn--primary {
  background: var(--sage);
  color: var(--bg);
  box-shadow: var(--shadow-1);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--sage-deep);
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 12px 32px -10px rgba(107,122,90,0.38);
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--text);
  color: var(--bg);
}

.btn--bare { padding: 10px 0; min-height: 0; }
.btn--bare::after { transform: translateX(0); }

/* ---------- Links ---------- */

.link--arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  color: var(--text);
}

.link--arrow::before {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--clay);
  transition: right var(--dur-2) var(--ease);
}

.link--arrow:hover::before,
.link--arrow:focus-visible::before { right: 0; }

.link--arrow::after {
  content: "→";
  transition: transform var(--dur-2) var(--ease);
}

.link--arrow:hover::after,
.link--arrow:focus-visible::after { transform: translateX(6px); }

/* ---------- Underlined word (decorative) ---------- */

.mark {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.mark::after {
  content: "";
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0.04em;
  height: 0.32em;
  background: var(--clay);
  opacity: 0.28;
  border-radius: 999px;
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-3) var(--ease-out);
}

.is-revealed .mark::after { transform: scaleX(1); }

/* ---------- Scroll reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 1ms;
    animation-duration: 1ms;
    scroll-behavior: auto;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Pull quote / decorative typography ---------- */

.pull-quote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  line-height: 1.25;
  color: var(--text);
  position: relative;
  padding: 24px 0 24px 28px;
  border-left: 2px solid var(--clay);
}

.pull-quote::before {
  content: "“";
  position: absolute;
  left: -8px;
  top: -22px;
  font-size: 4.5rem;
  color: var(--clay);
  opacity: 0.45;
  font-family: var(--font-display);
  line-height: 1;
}

/* ---------- Decorative chip / counter ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
}

.chip__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--clay);
}
