/* ============================================================
   Rivergarden Trading — rgtus.com

   Colour and type are taken verbatim from the Brand Identity
   Standards v1.0 (_brand/). Do not introduce values outside the
   approved palette (guide §11).

     Primary Forest Green  #283627
     Evergreen             #364433
     Sage                  #556254
     Ivory                 #E7E2D7
     Antique Gold          #C2A25A
     Bronze                #8B6B34

   Green is the dominant corporate colour; gold is reserved for
   premium accents (guide §4). Layout follows §6: generous white
   space, strong alignment, minimal ornamentation.

   The one structural idea is drawn from the emblem itself — its
   vertical columns become the page's ruled grid, its waves the
   line beneath the hero.
   ============================================================ */

/* Cinzel and Inter are the specified faces (guide §5), self-hosted
   rather than loaded from a CDN so the CSP can stay font-src 'self'.
   Both are SIL Open Font License 1.1 — see assets/fonts/LICENSE.txt. */
@font-face {
  font-family: "Cinzel";
  src: url("/assets/fonts/cinzel-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --forest:    #283627;
  --evergreen: #364433;
  --sage:      #556254;
  --ivory:     #E7E2D7;
  --gold:      #C2A25A;
  --bronze:    #8B6B34;

  /* Roles. Every value below resolves to a palette colour or a tint of one. */
  --ground:    var(--ivory);
  --ground-2:  #DED8CA;          /* ivory, one step down, for alternating bands */
  --ink:       var(--forest);
  --ink-2:     var(--evergreen);
  --muted:     var(--sage);
  --accent:    var(--bronze);    /* on ivory, bronze holds contrast; gold does not */
  --rule:      rgba(40, 54, 39, 0.18);
  --rule-soft: rgba(40, 54, 39, 0.08);
  --field:     rgba(255, 255, 255, 0.5);

  --f-display: "Cinzel", "Trajan Pro", "Cormorant Garamond", Georgia, serif;
  --f-body: "Inter", "Source Sans 3", "Helvetica Neue", system-ui, -apple-system, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --max: 72rem;
}

/* Dark rendering stays inside the palette: forest becomes the ground,
   ivory the ink, gold the accent (gold reads correctly on green). */
@media (prefers-color-scheme: dark) {
  :root {
    --ground:    #1E2A1D;
    --ground-2:  var(--forest);
    --ink:       var(--ivory);
    --ink-2:     #CFC9BB;
    --muted:     #9AA595;
    --accent:    var(--gold);
    --rule:      rgba(231, 226, 215, 0.16);
    --rule-soft: rgba(231, 226, 215, 0.07);
    --field:     rgba(255, 255, 255, 0.04);
  }
}

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

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

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
  overflow-x: hidden;
  font-variant-numeric: lining-nums;   /* guide §5 */
}

h1, h2 {
  font-family: var(--f-display);
  font-weight: 400;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--ground);
  padding: 0.75rem 1.25rem; z-index: 100; text-decoration: none;
}
.skip:focus { left: 0; }

.label {
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ---- the emblem's columns, as the page grid ---------------------- */

.palisade {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.palisade span { border-left: 1px solid var(--rule-soft); }
.palisade span:first-child { border-left: 0; }
@media (max-width: 640px) { .palisade { display: none; } }

.shell {
  position: relative; z-index: 1;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}

/* ---- nav / brand lockup ------------------------------------------ */

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 1.75rem 0 1.5rem;
}

/* Guide §11: clear space around the emblem equal to the cap height of the
   'R' in RIVERGARDEN — ~24% of the emblem's height. Held in CSS rather than
   baked into the raster so small sizes stay legible. */
.brand { display: flex; align-items: center; gap: 0.875rem; text-decoration: none; }
.brand__emblem {
  display: block;
  width: 38px; height: 38px;
  flex: none;
  padding: 9px;                 /* the clear space */
  background: var(--ivory);     /* the emblem's own ground; never recoloured */
  box-sizing: content-box;
}
.brand__name {
  font-family: var(--f-display);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}
.brand__sub {
  display: block;
  font-family: var(--f-body);
  font-size: 0.5625rem;
  letter-spacing: 0.34em;
  color: var(--accent);
  margin-top: 0.35rem;
  font-weight: 600;
}

.nav__links { display: flex; gap: 2rem; }
.nav__links a {
  font-size: 0.8125rem; letter-spacing: 0.09em; text-transform: uppercase;
  text-decoration: none; color: var(--muted);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 620px) { .nav__links { display: none; } }

/* ---- hero --------------------------------------------------------- */

.hero { padding: clamp(3rem, 10vw, 7rem) 0 0; border-top: 1px solid var(--rule); }

.hero__eyebrow {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}
.hero__eyebrow span { display: flex; align-items: center; gap: 0.6rem; }
.hero__eyebrow span::before {
  content: ""; width: 14px; height: 1px; background: var(--accent); flex: none;
}

.hero h1 {
  font-size: clamp(1.875rem, 4.6vw, 3.125rem);
  line-height: 1.18;
  letter-spacing: 0.005em;
  max-width: 17ch;
}

.hero__lede {
  margin-top: clamp(1.5rem, 3.5vw, 2rem);
  font-size: clamp(1.0625rem, 1.6vw, 1.125rem);
  color: var(--ink-2); line-height: 1.78; max-width: 38rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.875rem; margin-top: clamp(2rem, 4vw, 2.5rem); }

.btn {
  font-family: var(--f-body); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 600; text-decoration: none;
  padding: 0.95rem 1.75rem; border: 1px solid var(--ink);
  background: var(--ink); color: var(--ground); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--ink); }

.hero__river {
  display: block; width: 100vw; margin-left: calc(50% - 50vw);
  height: 88px; margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

/* ---- sections ------------------------------------------------------ */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--rule); }
.section--tint { background: var(--ground-2); }
.section h2 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); line-height: 1.3; max-width: 22ch; }
.section > .shell > .label { display: block; margin-bottom: 1rem; }
.lede { margin-top: 1.125rem; color: var(--muted); max-width: 36rem; line-height: 1.78; }

/* ---- storefronts ---------------------------------------------------- */

.stores {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  /* Capped rather than 1fr so a single storefront sits at a natural width
     instead of stretching into an empty band. */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 22rem));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule);
  width: fit-content; max-width: 100%;
}
.store {
  background: var(--ground-2); padding: clamp(1.5rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: 0.65rem;
  text-decoration: none; transition: background 0.2s;
}
.store:hover { background: var(--ground); }
.store__name { font-family: var(--f-display); font-size: 1.1875rem; letter-spacing: 0.02em; }
.store p { font-size: 0.875rem; color: var(--muted); line-height: 1.65; }
.store__go {
  margin-top: auto; padding-top: 0.75rem;
  font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 600; color: var(--accent);
  display: flex; align-items: center; gap: 0.5rem;
}
.store__go::after { content: ""; width: 18px; height: 1px; background: currentColor; transition: width 0.2s; }
.store:hover .store__go::after { width: 30px; }

/* ---- form ------------------------------------------------------------ */

.form { margin-top: clamp(1.75rem, 4vw, 2.5rem); max-width: 36rem; display: grid; gap: 1.125rem; }
.form__pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1.125rem; }
.field { display: grid; gap: 0.45rem; }
.field > label {
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.field input, .field select, .field textarea {
  font-family: var(--f-body); font-size: 0.9375rem; color: var(--ink);
  background: var(--field); border: 1px solid var(--rule); border-radius: 0;
  padding: 0.8rem 0.9rem; width: 100%; transition: border-color 0.2s;
}
.field textarea { min-height: 6.5rem; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sage); }
.form__note { font-size: 0.8125rem; color: var(--muted); }

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- contact.php response page ---------------------------------------- */

.response { padding: clamp(3rem, 9vw, 6rem) 0; }
.response h1 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2.125rem); line-height: 1.25; }
.response .lede { margin-top: 1.25rem; color: var(--ink-2); font-size: 1.0625rem; }
.response__errors { margin: 1.75rem 0 0; padding: 0 0 0 1.1rem; color: var(--muted); }
.response__errors li { margin-bottom: 0.4rem; }
.response__back { margin-top: 2rem; display: inline-block; }

/* ---- footer ------------------------------------------------------------ */

.foot { border-top: 1px solid var(--rule); padding: clamp(2.5rem, 5vw, 3.5rem) 0 3rem; }
.foot__grid {
  display: flex; flex-wrap: wrap; gap: 2rem 3.5rem;
  justify-content: space-between; align-items: flex-start;
}
.foot address {
  font-style: normal; font-size: 0.875rem; color: var(--muted);
  line-height: 1.75; margin-top: 1rem;
}
.foot__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.foot__links a { font-size: 0.875rem; text-decoration: none; color: var(--muted); transition: color 0.2s; }
.foot__links a:hover { color: var(--ink); }
.foot__bar { margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.foot__bar p { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums lining-nums; }

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