/* ==========================================================================
   Cashew Web - base stylesheet (/css/site.css). Loaded by every page.
   css/app.css (the /app page) adds app-only rules on top of this file and
   reuses these tokens and classes. Light theme only. No remote resources:
   the fonts below are self-hosted (latin subset, SIL OFL - see /fonts/OFL.txt).

   Custom properties (:root)
     Palette   --cream --paper --backdrop --ink --ink-soft --muted --line
               --green-900 --green-700 --green-500 --green-100
               --gold-600 --gold-500 --gold-400 --gold-100
               --brown-700 --coral --coral-100
     Text-safe --gold-text (gold text on cream)   --on-gold (text on gold button)
               --on-green (text on dark green)    --on-green-soft (secondary on green)
               --danger (error text)              --focus (focus ring colour)
     Shape     --radius --radius-sm --shadow --shadow-sm
     Type      --font-display (Fraunces) --font-body (Nunito Sans)
     Layout    --wrap (page width) --prose (text width) --gutter (side padding)
               --tap (minimum touch target, 44px)

   Reusable classes
     Layout    .container .section .prose
     A11y      .skip-link .visually-hidden   ([hidden] always wins)
     Header    .site-header .site-header__inner .brand .brand__mark .brand__word
               .brand__accent .site-nav   (a[aria-current="page"] = current page)
     Buttons   .btn .btn--primary .btn--quiet .btn-row .btn-row--center
               (.btn works on <a> and <button>; :disabled is styled)
     Boxes     .card .card-grid .card__icon .card__title
               .callout .callout--green .callout--gold .callout--coral .callout__title
     Text      .eyebrow .lede .muted .updated .accent
     Footer    .site-footer .site-footer__brand .site-footer__word .site-footer__nav
               .site-footer__fine
     Pages     .hero .hero__copy .hero__pitch .hero__art (landing)
               .not-found .not-found__art (404)

   Breakpoints: 760px (single column, 16px gutter, static header), 420px.
   Base reset: * { margin: 0; padding: 0 } - give form fields their own
   padding in app.css. Focus ring: 3px --focus outline (cream inside the footer).
   ========================================================================== */

:root {
  color-scheme: light;

  /* Brand palette (old site, styles.css:7-38) */
  --cream: #FAF3E6;
  --paper: #FFFDF8;
  --backdrop: #EFE3CC;
  --ink: #2B2115;
  --ink-soft: #6B5A44;       /* AA secondary body text on cream (~6:1) */
  --muted: #8A7A64;          /* decorative / large text only */
  --line: #EADFC9;
  --green-900: #14392A;
  --green-700: #1E4D3A;
  --green-500: #2E7D5B;
  --green-100: #DDEBE0;
  --gold-600: #C9821F;       /* decorative only: 2.8:1 on cream */
  --gold-500: #E9A23B;
  --gold-400: #F2B84B;
  --gold-100: #FBEED3;
  --brown-700: #5F3D22;
  --coral: #E4572E;
  --coral-100: #FBE3D9;

  /* Text-safe colours (old site literals) */
  --gold-text: #8A5A0E;      /* gold text on cream, AA 5.4:1 */
  --on-gold: #4A2E0E;        /* text on the gold button, AA 5.7:1 */
  --on-green: #F6EFDC;       /* text on dark green */
  --on-green-soft: #BCD3C2;  /* secondary text on dark green, AA 6:1 */
  --danger: #C63D17;         /* error text, AA 4.7:1 on paper */
  --focus: #1E4D3A;          /* dark green ring, 8.7:1 on cream */

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(95, 61, 34, .10), 0 2px 8px rgba(95, 61, 34, .08);
  --shadow-sm: 0 4px 14px rgba(95, 61, 34, .08);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --wrap: 960px;
  --prose: 44rem;
  --gutter: 22px;
  --tap: 44px;
}

/* ============ Fonts (latin subset, variable) ============ */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/fraunces-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/nunito-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 78% -12%, #F7EDD8 0%, transparent 58%),
    radial-gradient(900px 700px at -10% 108%, #EFE1C3 0%, transparent 55%),
    var(--cream);
  background-attachment: fixed;
  line-height: 1.65;
  font-size: 1.0625rem;
  font-weight: 500;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

/* faint dot texture, matching the old site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .45;
  background-image: radial-gradient(rgba(95, 61, 34, .05) 1.2px, transparent 1.3px);
  background-size: 26px 26px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--green-900);
  line-height: 1.15;
  letter-spacing: -.01em;
  font-weight: 800;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 650; margin-top: 2.4em; }
h3 { font-size: 1.2rem; font-weight: 650; margin-top: 1.8em; }
h2 + h3 { margin-top: 1em; }

p { margin: 0 0 1em; }
strong, b { font-weight: 800; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; overflow-wrap: anywhere; }
svg { flex-shrink: 0; }

a {
  color: var(--green-700);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(30, 77, 58, .35);
  transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--green-900); text-decoration-color: var(--gold-500); }

/* Visible keyboard focus everywhere: dark green on light, cream on dark green */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.site-footer :focus-visible { outline-color: var(--on-green); }

[hidden] { display: none !important; }

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

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

/* ============ Skip link ============ */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  background: var(--green-700);
  color: var(--on-green);
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  transition: top .15s;
}
.skip-link:focus { top: 12px; color: var(--on-green); }

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 243, 230, .82);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1.5px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-block: 10px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: var(--tap);
  text-decoration: none;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 40px; height: 40px; filter: drop-shadow(0 3px 7px rgba(95, 61, 34, .22)); }
.brand__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -.5px;
  color: var(--green-900);
}
.brand__accent { color: var(--gold-600); } /* logo: exempt from text contrast */

.site-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.site-nav a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  text-decoration: none;
  color: var(--green-900);
  font-weight: 800;
  font-size: .92rem;
  padding: 8px 12px;
  border-radius: 11px;
  transition: background .15s;
}
.site-nav a:not(.btn):hover { background: var(--paper); color: var(--green-900); }
.site-nav a[aria-current="page"] { background: var(--green-100); color: var(--green-700); }
.site-nav .btn { margin-left: 6px; padding: 9px 18px; }

/* ============ Layout ============ */
main { flex: 1; }
.section { padding-block: clamp(2.2rem, 5vw, 3.4rem); }
.prose { max-width: var(--prose); }
.prose ul, .prose ol { margin: 0 0 1.1em 1.2em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--gold-600); }

.eyebrow {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: .5rem;
}
.lede { font-size: 1.18rem; }
.muted { color: var(--ink-soft); }
.updated { font-size: .9rem; color: var(--ink-soft); font-weight: 700; }
.accent { color: var(--gold-text); }

/* ============ Buttons ============ */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5em; }
.btn-row--center { justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 13px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, border-color .12s;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(180deg, var(--gold-400), var(--gold-500));
  color: var(--on-gold);
  box-shadow: 0 4px 0 var(--gold-600), 0 8px 16px rgba(201, 130, 31, .3);
}
.btn--primary:hover { color: var(--on-gold); }
.btn--primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-600); }
.btn--quiet {
  background: var(--paper);
  color: var(--green-900);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.btn--quiet:hover:not(:disabled) { color: var(--green-900); border-color: var(--gold-400); }

/* ============ Cards ============ */
.card {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 26px);
}
.card > :last-child { margin-bottom: 0; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}
.card__icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.card__icon svg { width: 26px; height: 26px; }
.card__title { margin-top: 0; margin-bottom: .4em; font-size: 1.15rem; font-weight: 650; }
.card p { color: var(--ink-soft); font-size: .98rem; }

/* ============ Callouts ============ */
.callout {
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  padding: 16px 18px;
  margin: 1.4em 0;
  box-shadow: var(--shadow-sm);
}
.callout > :last-child { margin-bottom: 0; }
.callout h3 { margin-top: 0; }
.callout--green { background: var(--green-100); border-color: #C8DECB; }
.callout--gold { background: var(--gold-100); border-color: #F0D9A8; }
.callout--coral { background: var(--coral-100); border-color: #F4CBB9; }
.callout__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green-900);
  margin-bottom: .3em;
}

/* ============ Landing hero ============ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  padding-block: clamp(2.4rem, 6vw, 4rem);
}
.hero__pitch { font-size: 1.1rem; max-width: 34rem; }
.hero__art { display: flex; align-items: center; justify-content: center; }
.hero__art svg {
  width: min(320px, 80%);
  height: auto;
  filter: drop-shadow(0 18px 34px rgba(95, 61, 34, .28));
}

/* ============ 404 ============ */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52vh;
  text-align: center;
}
.not-found .lede { max-width: 32rem; }
.not-found__art {
  width: 150px;
  height: 150px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 14px 28px rgba(95, 61, 34, .25));
}

/* ============ Footer ============ */
.site-footer {
  margin-top: auto;
  background: linear-gradient(150deg, var(--green-700), var(--green-900));
  color: #DCE9DD;
  padding-block: clamp(2rem, 5vw, 3rem);
}
.site-footer a { color: var(--on-green); text-decoration-color: rgba(246, 239, 220, .4); }
.site-footer a:hover { color: #fff; text-decoration-color: var(--gold-400); }
.site-footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.site-footer__brand svg { width: 44px; height: 44px; }
.site-footer__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--on-green);
  margin: 0;
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin-bottom: 10px;
  font-weight: 800;
}
.site-footer__nav a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: .95rem; }
.site-footer__fine { font-size: .92rem; font-weight: 700; color: var(--on-green-soft); margin-bottom: .6em; }

/* ============ Responsive ============ */
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .site-header { position: static; }
  .hero { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .hero__pitch { margin-inline: auto; }
  .hero__art { order: -1; }
  .hero__art svg { width: min(220px, 62%); }
  .hero .btn-row { justify-content: center; }
  .site-nav { gap: 2px; }
  .site-nav a:not(.btn) { padding: 7px 9px; font-size: .86rem; }
}
@media (max-width: 420px) {
  body { font-size: 1rem; }
  .brand__word { font-size: 1.4rem; }
  .site-nav .btn { padding: 9px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .btn--primary:active:not(:disabled) { transform: none; }
}
