/* ==========================================================================
   Greatest Need Rescue — Design Tokens & Base Styles (staging build)
   --------------------------------------------------------------------------
   Plain CSS only. No PHP, no JavaScript, no API calls, no credentials.
   These tokens implement the approved Phase 2 design preview:
   pine + clay + cream palette, Newsreader headings / Public Sans body,
   real GNR logo, ONE primary button color (pine) everywhere.

   NOTE ON THE PALETTE: the rescue's brand guidelines specify voice and
   differentiators only — no official colors or typography. Pine / clay /
   cream is the PROPOSED palette from the approved design preview, not a
   brand fact. Confirm the hex values against the design preview at build
   time before they are treated as final.
   ========================================================================== */

:root {
  /* --- Brand palette (proposed, see note above) --- */
  --gnr-pine:        #2f4b3e;  /* primary: buttons, header accents, headings */
  --gnr-pine-deep:  #22382e;  /* primary hover / footer background */
  --gnr-pine-soft:  #e9efe9;  /* tinted backgrounds, selected states */
  --gnr-pine-mid:   #5c7a68;  /* secondary text on light, borders on dark */

  --gnr-clay:       #c08552;  /* accent only: eyebrows, rules, highlights */
  --gnr-clay-deep:  #9d6a3c;  /* accent hover / strong accent text */
  --gnr-clay-soft:  #f4e7d7;  /* tinted accent backgrounds */

  --gnr-cream:      #faf6ee;  /* page background */
  --gnr-cream-deep: #f1e9d8;  /* alternating section background */
  --gnr-white:      #ffffff;  /* cards, secondary buttons */
  --gnr-ink:        #262b25;  /* body text */
  --gnr-ink-soft:   #5a6156;  /* secondary / muted text */
  --gnr-line:       #e2d9c8;  /* hairlines, card borders */

  /* --- Typography --- */
  /* Enqueue Newsreader + Public Sans (Google Fonts) in the theme; the
     stacks below are the fallbacks if the webfonts fail to load. */
  --gnr-font-head: "Newsreader", Georgia, "Times New Roman", serif;
  --gnr-font-body: "Public Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gnr-text-base: 1.0625rem;        /* 17px */
  --gnr-line-body: 1.65;
  --gnr-line-head: 1.15;

  /* --- Shape, space, motion --- */
  --gnr-radius: 14px;
  --gnr-radius-sm: 8px;
  --gnr-shadow: 0 2px 10px rgba(38, 43, 37, 0.08);
  --gnr-shadow-lg: 0 8px 28px rgba(38, 43, 37, 0.12);
  --gnr-container: 1120px;
  --gnr-section-pad: clamp(2.5rem, 6vw, 4.5rem);
}

/* --- Base --- */
body {
  background: var(--gnr-cream);
  color: var(--gnr-ink);
  font-family: var(--gnr-font-body);
  font-size: var(--gnr-text-base);
  line-height: var(--gnr-line-body);
  margin: 0;
}

h1, h2, h3, h4 {
  font-family: var(--gnr-font-head);
  font-weight: 600;
  line-height: var(--gnr-line-head);
  color: var(--gnr-pine-deep);
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

a { color: var(--gnr-pine); }
a:hover { color: var(--gnr-pine-deep); }

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

/* Eyebrow / kicker label above section headings (clay accent only) */
.gnr-eyebrow {
  font-family: var(--gnr-font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gnr-clay-deep);
  margin-bottom: 0.5rem;
}

/* --- Layout --- */
.gnr-container {
  max-width: var(--gnr-container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.gnr-section { padding-block: var(--gnr-section-pad); }
.gnr-section--alt { background: var(--gnr-cream-deep); }
.gnr-section--pine {
  background: var(--gnr-pine-deep);
  color: var(--gnr-cream);
}
.gnr-section--pine h1,
.gnr-section--pine h2,
.gnr-section--pine h3 { color: var(--gnr-cream); }

/* ==========================================================================
   Buttons — ONE primary color (pine) everywhere.
   Decided 2026-11-06: contemporary design-system practice; per-action
   color coding (teal Volunteer, clay/gold Donate) was removed. Clay is
   accent only and is never a button fill. The only exception is a payment
   provider's own branded button (e.g. PayPal), which keeps its
   recognizable brand styling as a payment control.
   ========================================================================== */
.gnr-btn {
  display: inline-block;
  font-family: var(--gnr-font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--gnr-cream);
  background: var(--gnr-pine);
  border: 2px solid var(--gnr-pine);
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.gnr-btn:hover,
.gnr-btn:focus-visible {
  background: var(--gnr-pine-deep);
  border-color: var(--gnr-pine-deep);
  color: var(--gnr-cream);
}

/* Single secondary treatment: white with a strong pine border. */
.gnr-btn--secondary {
  background: var(--gnr-white);
  color: var(--gnr-pine);
  border: 2px solid var(--gnr-pine);
}
.gnr-btn--secondary:hover,
.gnr-btn--secondary:focus-visible {
  background: var(--gnr-pine-soft);
  color: var(--gnr-pine-deep);
  border-color: var(--gnr-pine-deep);
}

.gnr-btn--small { padding: 0.55rem 1.1rem; font-size: 0.925rem; }
.gnr-btn--large { padding: 1rem 2rem; font-size: 1.1rem; }
.gnr-btn--block { display: block; width: 100%; }

.gnr-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Visible keyboard focus everywhere. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.gnr-btn:focus-visible {
  outline: 3px solid var(--gnr-clay);
  outline-offset: 2px;
}

/* ==========================================================================
   Cards
   ========================================================================== */
.gnr-card {
  background: var(--gnr-white);
  border: 1px solid var(--gnr-line);
  border-radius: var(--gnr-radius);
  box-shadow: var(--gnr-shadow);
  overflow: hidden;
}

.gnr-card__body { padding: 1.25rem 1.4rem 1.5rem; }

.gnr-card__tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gnr-pine);
  background: var(--gnr-pine-soft);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.6rem;
}

/* --- Adopt gallery --- */
.gnr-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gnr-dog-card { display: flex; flex-direction: column; }
.gnr-dog-card__photo {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  background: var(--gnr-cream-deep);
}
.gnr-dog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.1rem 1.25rem 1.3rem;
}
.gnr-dog-card__name {
  font-family: var(--gnr-font-head);
  font-size: 1.45rem;
  margin: 0 0 0.25rem;
}
.gnr-dog-card__facts {
  font-size: 0.925rem;
  color: var(--gnr-ink-soft);
  margin: 0 0 0.75rem;
}
.gnr-dog-card__story { flex: 1; }
.gnr-dog-card__story p { margin-bottom: 0.6em; }

/* --- Dog profile page --- */
.gnr-profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 820px) {
  .gnr-profile { grid-template-columns: 1.15fr 1fr; }
}
.gnr-profile__photos img { border-radius: var(--gnr-radius); }
.gnr-profile__facts {
  background: var(--gnr-white);
  border: 1px solid var(--gnr-line);
  border-radius: var(--gnr-radius);
  padding: 1.25rem 1.4rem;
}
.gnr-profile__facts dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.95rem;
}
.gnr-profile__facts dt { font-weight: 700; color: var(--gnr-pine-deep); }
.gnr-profile__facts dd { margin: 0; }
.gnr-profile__unknown { color: var(--gnr-ink-soft); font-style: italic; }

/* --- Learning Library --- */
.gnr-lib-group { margin-bottom: 2.5rem; }
.gnr-lib-group > h2 {
  border-bottom: 2px solid var(--gnr-clay);
  padding-bottom: 0.4rem;
}
.gnr-guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.gnr-guide-card__title {
  font-family: var(--gnr-font-head);
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
}
.gnr-guide-card__desc { font-size: 0.95rem; color: var(--gnr-ink-soft); }
.gnr-guide-card__link {
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
}
.gnr-guide-card__link:hover { text-decoration: underline; }

.gnr-featured-333 {
  background: var(--gnr-pine-soft);
  border: 1px solid var(--gnr-pine-mid);
  border-radius: var(--gnr-radius);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}

/* --- Donation page --- */
.gnr-donate-box {
  background: var(--gnr-white);
  border: 1px solid var(--gnr-line);
  border-radius: var(--gnr-radius);
  box-shadow: var(--gnr-shadow-lg);
  padding: 1.75rem;
  max-width: 560px;
  margin-inline: auto;
}
.gnr-amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.gnr-amount {
  flex: 1 1 auto;
  min-width: 4.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--gnr-pine);
  background: var(--gnr-white);
  border: 2px solid var(--gnr-pine);
  border-radius: var(--gnr-radius-sm);
  padding: 0.6rem 0.5rem;
  cursor: pointer;
}
.gnr-amount[aria-pressed="true"] {
  background: var(--gnr-pine-soft);
  border-color: var(--gnr-pine-deep);
  color: var(--gnr-pine-deep);
}
.gnr-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--gnr-line);
  margin-bottom: 1.25rem;
}
.gnr-tab {
  font-weight: 700;
  color: var(--gnr-ink-soft);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}
.gnr-tab[aria-selected="true"] {
  color: var(--gnr-pine-deep);
  border-bottom-color: var(--gnr-clay);
}

/* --- Forms (application / contact) --- */
.gnr-form label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.gnr-form input[type="text"],
.gnr-form input[type="email"],
.gnr-form input[type="tel"],
.gnr-form input[type="number"],
.gnr-form select,
.gnr-form textarea {
  width: 100%;
  font-family: var(--gnr-font-body);
  font-size: 1rem;
  color: var(--gnr-ink);
  background: var(--gnr-white);
  border: 1.5px solid var(--gnr-line);
  border-radius: var(--gnr-radius-sm);
  padding: 0.65rem 0.8rem;
  margin-bottom: 1rem;
}
.gnr-form fieldset {
  border: 1px solid var(--gnr-line);
  border-radius: var(--gnr-radius);
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.5rem;
}
.gnr-form legend {
  font-family: var(--gnr-font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gnr-pine-deep);
  padding-inline: 0.5rem;
}
.gnr-form .required { color: var(--gnr-clay-deep); }
.gnr-form-note {
  font-size: 0.92rem;
  color: var(--gnr-ink-soft);
}

/* --- Header / footer --- */
.gnr-site-header {
  background: var(--gnr-cream);
  border-bottom: 1px solid var(--gnr-line);
}
.gnr-site-footer {
  background: var(--gnr-pine-deep);
  color: var(--gnr-cream);
  padding-block: 2.5rem;
}
.gnr-site-footer a { color: var(--gnr-cream); }
.gnr-site-footer h2,
.gnr-site-footer h3 { color: var(--gnr-cream); }

/* --- Utility --- */
.gnr-tagline {
  font-family: var(--gnr-font-head);
  font-style: italic;
  color: var(--gnr-pine);
}
.gnr-rule {
  border: none;
  border-top: 2px solid var(--gnr-clay);
  width: 4rem;
  margin: 1.5rem 0;
}
.gnr-muted { color: var(--gnr-ink-soft); }
.gnr-center { text-align: center; }

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
