/**
 * base.css - Design tokens, reset and typography.
 *
 * The palette is built from weathered barn wood, lamplight and unbleached
 * paper. Warm greys throughout - a neutral grey would read as clinical and
 * fight the whole premise.
 */

:root {
  /* Surfaces */
  --paper: #faf4e8;
  --paper-sunk: #f2e9d8;
  --paper-raised: #fffaf1;
  --edge: #e2d6be;

  /* Ink */
  --ink: #2f2a24;
  --ink-soft: #5c5347;
  /* Darkened from #8a7f6d, which measured 3.26:1 on the sunk paper and
     failed WCAG AA for normal text. The hero eyebrow also sits on an amber
     gradient overlay, so this is pitched at ~5.6:1 on plain paper to keep
     the worst-case overlay reading comfortably above the 4.5:1 threshold. */
  --ink-muted: #635a4a;

  /* Accents */
  --barn: #9e3b32;
  --barn-dark: #7a2b24;
  --glow: #e0a13c;
  --sage: #6f7f63;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 68ch;
  --radius: 4px;
  --shadow-soft: 0 2px 10px rgba(47, 42, 36, 0.07);
  --shadow-lift: 0 10px 28px rgba(47, 42, 36, 0.14);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------------ */
/* Reset                                                               */
/* ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

/* The UA rule for [hidden] is display:none, but ANY author `display`
   declaration outranks it - so `.btn { display:inline-flex }` silently
   un-hides hidden buttons. This restores the intent. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--barn);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--barn-dark); }

ul { margin: 0; padding: 0; }

/* Visible focus for keyboard users, suppressed for mouse clicks. */
:focus-visible {
  outline: 2.5px solid var(--barn);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------------ */
/* Helpers                                                             */
/* ------------------------------------------------------------------ */

.wrap {
  width: min(1180px, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100%, var(--measure));
  margin-inline: auto;
}

.stack > * + * { margin-top: 1rem; }

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 54ch;
}

.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 for keyboard and screen-reader users. */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.18s var(--ease);
}

.skip-link:focus { top: 0.75rem; color: var(--paper); }

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.12s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--barn);
  border-color: var(--barn);
  color: var(--paper);
}

.btn-solid:hover {
  background: var(--barn-dark);
  border-color: var(--barn-dark);
  color: var(--paper);
}

.btn-outline {
  background: transparent;
  border-color: var(--edge);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--paper-raised);
  color: var(--ink);
}

.btn-inert,
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}
