/* ==========================================================================
   Guimaras Wonder's Farm — base layer: reset, typography, bands, grid
   ========================================================================== */

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

body {
  margin: 0;
  font-family: var(--gwf-body);
  font-size: var(--gwf-body-sz);
  line-height: 1.65;
  color: var(--gwf-ink);
  background: var(--gwf-bone);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gwf-green); }
a:hover { color: #0d4a24; }

/* Visible keyboard focus everywhere, on both grounds. */
:focus-visible {
  outline: 2px solid var(--gwf-green);
  outline-offset: 2px;
}
.gwf-band--ink :focus-visible,
.gwf-band--green :focus-visible { outline-color: var(--gwf-gold); }

.gwf-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;
}
.gwf-skip:focus {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  width: auto; height: auto; clip: auto; margin: 0;
  padding: 12px 20px; background: var(--gwf-gold);
  color: var(--gwf-ink); font-weight: 800; border-radius: var(--gwf-radius);
}

/* ---- Typography --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--gwf-display);
  margin: 0 0 20px;
  color: var(--gwf-ink);
  text-wrap: balance;
}
h1 {
  font-variation-settings: 'wdth' var(--gwf-w-expanded), 'wght' 800;
  font-size: var(--gwf-h1);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
h2 {
  font-variation-settings: 'wdth' var(--gwf-w-expanded), 'wght' 800;
  font-size: var(--gwf-h2);
  line-height: 1.05;
  letter-spacing: -0.015em;
}
h3 {
  font-variation-settings: 'wdth' var(--gwf-w-normal), 'wght' 700;
  font-size: var(--gwf-h3);
  line-height: 1.25;
  margin-bottom: 10px;
}
.gwf-band--ink h1, .gwf-band--ink h2, .gwf-band--ink h3,
.gwf-band--green h1, .gwf-band--green h2, .gwf-band--green h3 { color: var(--gwf-bone); }

p { margin: 0 0 18px; max-width: var(--gwf-measure); }
p:last-child { margin-bottom: 0; }

.gwf-lead {
  font-size: var(--gwf-lead);
  line-height: 1.5;
  max-width: var(--gwf-measure-lead);
}
.gwf-small { font-size: var(--gwf-small); color: var(--gwf-moss); }
.gwf-band--ink .gwf-small,
.gwf-band--green .gwf-small { color: rgba(247, 248, 241, 0.78); }
.gwf-band--ink p, .gwf-band--green p { color: rgba(247, 248, 241, 0.82); }

/* ---- Bands: full-bleed ground, contents held to the column -------------- */

.gwf-band {
  padding: var(--gwf-band-y) var(--gwf-gutter);
  background: var(--gwf-bone);
}
.gwf-band--bone  { background: var(--gwf-bone); }
.gwf-band--sage  { background: var(--gwf-sage); }
.gwf-band--ink   { background: var(--gwf-ink); }
.gwf-band--green { background: var(--gwf-green); }
.gwf-band--tight { padding-top: 32px; padding-bottom: 32px; }

.gwf-wrap {
  max-width: var(--gwf-column);
  margin-inline: auto;
}

/* ---- The paperwork margin ----------------------------------------------
   A 12-column grid where prose sits in 1–7 and the evidence — certificate
   years, kilos shipped, hectares, Brix — sits in a narrow rail at 9–12.
   The page has a margin where the documentation lives. Below 820px the rail
   moves under its paragraph as a bordered block: it is the argument, not
   decoration, so it never disappears. */

.gwf-doc {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0 40px;
  align-items: start;
}
.gwf-doc__body { grid-column: 1 / 8; }
.gwf-doc__rail { grid-column: 9 / -1; }

.gwf-rail {
  font-family: var(--gwf-display);
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 500;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--gwf-moss);
  border-top: 2px solid var(--gwf-gold);
  padding-top: 12px;
  margin: 0 0 28px;
}
.gwf-rail:last-child { margin-bottom: 0; }
.gwf-rail dt {
  font-variation-settings: 'wdth' var(--gwf-w-condensed), 'wght' 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gwf-ink);
  margin-bottom: 2px;
}
.gwf-rail dd { margin: 0 0 14px; }
.gwf-rail dd:last-child { margin-bottom: 0; }
.gwf-band--ink .gwf-rail { color: rgba(247, 248, 241, 0.72); }
.gwf-band--ink .gwf-rail dt { color: var(--gwf-bone); }

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

.gwf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--gwf-radius);
  font-family: var(--gwf-body);
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--gwf-dur) var(--gwf-ease),
              color var(--gwf-dur) var(--gwf-ease);
}
.gwf-btn--primary { background: var(--gwf-green); color: var(--gwf-bone); }
.gwf-btn--primary:hover { background: #0d4a24; color: var(--gwf-bone); }
/* Gold as a solid fill with ink text — the one correct use of gold with type. */
.gwf-btn--gold { background: var(--gwf-gold); color: var(--gwf-ink); }
.gwf-btn--gold:hover { background: #d0a31d; color: var(--gwf-ink); }
.gwf-btn--ghost {
  background: transparent;
  color: var(--gwf-green);
  border: 1px solid var(--gwf-moss);
}
.gwf-btn--ghost:hover { background: var(--gwf-green); color: var(--gwf-bone); }
.gwf-band--ink .gwf-btn--ghost,
.gwf-band--green .gwf-btn--ghost {
  color: var(--gwf-bone);
  border-color: rgba(247, 248, 241, 0.45);
}
.gwf-btn:disabled, .gwf-btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed;
}

.gwf-textlink {
  font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}

/* ---- Credential pill ---------------------------------------------------- */

.gwf-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border: 1px solid var(--gwf-moss);
  border-radius: var(--gwf-radius-pill);
  font-size: var(--gwf-small);
  font-weight: 700;
  color: var(--gwf-green);
  text-decoration: none;
}
.gwf-pill:hover { background: var(--gwf-green); color: var(--gwf-bone); border-color: var(--gwf-green); }

/* ---- Responsive ---------------------------------------------------------
   820px: multi-column collapses, the paperwork rail moves below its prose.
   560px: gutters tighten, band padding halves. */

@media (max-width: 820px) {
  .gwf-doc { grid-template-columns: 1fr; gap: 28px; }
  .gwf-doc__body, .gwf-doc__rail { grid-column: 1 / -1; }
  .gwf-doc__rail {
    border-left: 3px solid var(--gwf-gold);
    padding-left: 18px;
  }
  .gwf-rail { border-top: none; padding-top: 0; }
}

@media (max-width: 560px) {
  .gwf-band {
    padding-left: var(--gwf-gutter-sm);
    padding-right: var(--gwf-gutter-sm);
    padding-top: var(--gwf-band-y-sm);
    padding-bottom: var(--gwf-band-y-sm);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
