/* ==========================================================================
   Hound Welfare Fund — houndwelfarefund.org
   Design system: "Periwinkle Kennel" — heritage hunt-country nonprofit
   Base color: #7D7EAB — indigo darks #212238/#2B2C4B, lavender mist #EFEEF7,
   muted gold accent #A3924E, CTA periwinkle #63649C, ink #26273A
   Type:     Libre Caslon Text (display & long-form) · Libre Franklin (UI)
   ========================================================================== */

:root {
  /* Base color #7D7EAB (periwinkle) — all tones derived from it.
     Variable names kept from v1 for stability: pine-* = indigo darks,
     brass = muted gold accent, scarlet = CTA periwinkle. */
  --base: #7D7EAB;
  --pine-950: #212238;
  --pine-900: #2B2C4B;
  --pine-800: #45466F;
  --pine-700: #5C5D8A;
  --parchment: #EFEEF7;
  --paper: #FAFAFE;
  --brass: #A3924E;
  --brass-soft: #C6B87E;
  --scarlet: #63649C;
  --scarlet-dark: #4C4D80;
  --ink: #26273A;
  --ink-soft: #4E4F68;
  --line: rgba(38, 39, 58, 0.16);
  --line-light: rgba(239, 238, 247, 0.28);

  --serif: "Libre Caslon Text", "Georgia", serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --wrap-narrow: 760px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--pine-800); transition: color 180ms ease; }
a:hover { color: var(--base); }
.btn, .site-nav a, .card, .card__img, .kennel-roll li, .gallery img {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease,
              transform 220ms ease, box-shadow 220ms ease, filter 300ms ease;
}
.gallery figure:hover img { transform: scale(1.035); }
.kennel-roll li:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 4px var(--pine-800), inset 0 0 0 5px rgba(198, 184, 126, 0.35), 0 10px 22px rgba(33, 34, 56, 0.25); }

/* Page-load fade + cross-page view transitions (progressive) */
@view-transition { navigation: auto; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
body { animation: page-in 450ms ease; }

/* Scroll reveal (class applied by JS; safe without JS) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 650ms ease, transform 650ms ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brass); color: var(--pine-950);
  padding: 0.6rem 1.2rem; z-index: 100; font-weight: 600;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: var(--wrap-narrow); }

/* ---------- Header ---------- */
.site-header {
  background: var(--pine-900);
  border-bottom: 1px solid var(--line-light);
  position: relative;
  z-index: 20;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 0.9rem 1.25rem;
  max-width: var(--wrap); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 62px; width: auto; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line-light);
  color: var(--parchment); padding: 0.5rem 0.85rem;
  font-family: var(--sans); font-size: 0.9rem; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; border-radius: 3px;
}
.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 1.6rem;
}
.site-nav a {
  color: var(--parchment); text-decoration: none;
  font-size: 0.86rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--brass-soft); }
.site-nav a[aria-current="page"] {
  color: var(--brass-soft);
  border-bottom-color: var(--brass);
}
.site-nav .nav-donate a {
  background: var(--scarlet); color: #fff;
  padding: 0.55rem 1.3rem; border-radius: 3px;
  border-bottom: none;
}
.site-nav .nav-donate a:hover { background: var(--base); color: #fff; }
.site-nav .nav-donate a[aria-current="page"] { outline: 2px solid var(--brass); outline-offset: 2px; }

@media (max-width: 880px) {
  .brand img { height: 50px; }
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--pine-950); border-bottom: 2px solid var(--brass);
    padding: 0.75rem 1.25rem 1.25rem; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { display: block; padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line-light); font-size: 1rem; }
  .site-nav .nav-donate { margin-top: 0.9rem; }
  .site-nav .nav-donate a { text-align: center; border-radius: 4px; }
}

/* ---------- Keyline frame (signature device) ---------- */
.keyline {
  border: 1px solid rgba(198, 184, 126, 0.55);
  outline: 1px solid rgba(198, 184, 126, 0.3);
  outline-offset: 5px;
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--pine-900);
  color: var(--parchment);
  padding: 4.5rem 1.25rem 5rem;
  text-align: center;
}
.hero__bg {
  position: absolute; inset: -4%;
  background: url("/img/slide001.jpg") center / cover no-repeat;
  animation: hero-drift 38s ease-in-out infinite alternate;
  will-change: transform;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(125, 126, 171, 0.30), transparent 60%),
    linear-gradient(180deg, rgba(33, 34, 56, 0.88), rgba(43, 44, 75, 0.90));
}
@keyframes hero-drift {
  from { transform: scale(1) translateX(0); }
  to   { transform: scale(1.1) translateX(-1.5%); }
}
.hero__frame { position: relative; z-index: 1; background: rgba(33, 34, 56, 0.25); backdrop-filter: blur(2px); }
.hero__frame {
  max-width: 900px; margin: 0 auto;
  padding: 3.25rem 2rem 3.5rem;
  position: relative;
}
.hero__mark { width: 132px; margin: 0 auto 1.6rem; opacity: 0.95; }
.hero__eyebrow {
  font-family: var(--sans);
  font-size: 0.8rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--brass-soft); margin: 0 0 1.3rem;
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.2; margin: 0 0 1.4rem;
  color: #fff;
}
.hero h1 em { font-style: italic; color: var(--brass-soft); }
.hero__lede {
  max-width: 700px; margin: 0 auto;
  font-size: 1.05rem; line-height: 1.85;
  color: rgba(244, 239, 227, 0.92);
}
.hero__rule {
  width: 72px; height: 1px; background: var(--brass);
  margin: 1.8rem auto 0; border: 0; position: relative;
}

/* ---------- Section scaffolding ---------- */
.section { padding: 4.25rem 0; }
.section--parchment { background: var(--parchment); }
.section--pine { background: var(--pine-900); color: var(--parchment); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 2.75rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.9rem;
  font-size: 0.78rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--brass); font-weight: 600; margin: 0 0 0.9rem;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 34px; height: 1px; background: var(--brass); }
.section--pine .eyebrow { color: var(--brass-soft); }
.section--pine .eyebrow::before, .section--pine .eyebrow::after { background: var(--brass-soft); }

h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.25; }
.section h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: 0; color: var(--pine-900); }
.section--pine h2 { color: #fff; }

/* ---------- Video ---------- */
.video-frame {
  position: relative; aspect-ratio: 16 / 9;
  background: var(--pine-950);
  margin: 0 auto; max-width: 880px;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-caption {
  text-align: center; margin: 1.4rem auto 0; max-width: 700px;
  font-family: var(--serif); font-style: italic; font-size: 1.02rem;
  color: var(--ink-soft);
}
.section--pine .video-caption { color: rgba(244, 239, 227, 0.85); }
.section--pine .video-caption a { color: var(--brass-soft); }
.section--pine .video-caption a:hover { color: #fff; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.gallery figure { margin: 0; overflow: hidden; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 12 / 5; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }

/* ---------- Blurb cards ---------- */
.cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
@media (max-width: 880px) { .cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 2.4rem 1.8rem 2.2rem;
  text-align: center;
  position: relative;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid rgba(163, 146, 78, 0.35);
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(33, 34, 56, 0.16); }
.card__img {
  width: 138px; height: 138px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 1.4rem;
  border: 3px solid var(--parchment);
  box-shadow: 0 0 0 1px var(--brass);
}
.card h3 { font-size: 1.3rem; margin: 0 0 0.45rem; }
.card h3 a { color: var(--pine-900); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--scarlet); }
.card p {
  margin: 0; color: var(--ink-soft);
  font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase;
}

/* ---------- Page header (interior) ---------- */
.page-header {
  background:
    radial-gradient(ellipse at 50% -40%, rgba(125, 126, 171, 0.35), transparent 65%),
    var(--pine-900);
  color: var(--parchment);
  text-align: center;
  padding: 3.4rem 1.25rem 3.6rem;
}
.page-header__frame { max-width: 780px; margin: 0 auto; padding: 2.2rem 1.5rem 2.4rem; }
.page-header h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  margin: 0 0 0.6rem; color: #fff;
}
.page-header p {
  margin: 0;
  font-size: 0.85rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--brass-soft);
}

/* ---------- Prose (long-form) ---------- */
.prose { font-family: var(--serif); font-size: 1.08rem; line-height: 1.95; }
.prose p { margin: 0 0 1.6rem; }
.prose ul { margin: 0 0 1.6rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.65rem; }
.prose li::marker { color: var(--brass); }
.prose h2 {
  font-size: 1.7rem; color: var(--pine-900);
  margin: 2.6rem 0 1.2rem;
}
.prose h2:first-child { margin-top: 0; }

.lead-cap::first-letter {
  font-family: var(--serif);
  float: left; font-size: 3.6em; line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--pine-800);
}

/* ---------- Kennel roll (Meet the Hounds) ---------- */
.kennel-roll {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
@media (max-width: 880px) { .kennel-roll { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .kennel-roll { grid-template-columns: 1fr; } }
.kennel-roll li {
  background: linear-gradient(160deg, rgba(125,126,171,0.28) 0%, transparent 100%), var(--pine-800);
  color: var(--parchment);
  border: 1px solid rgba(198, 184, 126, 0.45);
  box-shadow: inset 0 0 0 4px var(--pine-800), inset 0 0 0 5px rgba(198, 184, 126, 0.35);
  text-align: center;
  padding: 1.25rem 0.75rem;
  font-family: var(--serif);
  font-size: 1.22rem;
  letter-spacing: 0.04em;
}

/* ---------- Honor list (Events chairs) ---------- */
.honor-list { list-style: none; margin: 0; padding: 0; max-width: 560px; margin-inline: auto; }
.honor-list li {
  display: flex; align-items: baseline; gap: 1.1rem;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px dotted rgba(163, 146, 78, 0.5);
  font-family: var(--serif); font-size: 1.06rem;
}
.honor-list .year {
  font-family: var(--sans); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.12em; color: var(--brass);
  min-width: 3.4rem;
}

/* ---------- Committee columns ---------- */
.committee {
  list-style: none; margin: 0; padding: 0;
  columns: 3; column-gap: 2.5rem;
}
@media (max-width: 760px) { .committee { columns: 2; } }
@media (max-width: 460px) { .committee { columns: 1; } }
.committee li {
  font-family: var(--serif); font-size: 1.04rem;
  padding: 0.42rem 0;
  border-bottom: 1px dotted rgba(163, 146, 78, 0.4);
  break-inside: avoid;
}

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1.3rem; }
.form-field label {
  display: block; font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.45rem; color: var(--pine-800);
}
.form-field input, .form-field textarea {
  width: 100%;
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: #fff;
  border: 1px solid rgba(35, 38, 32, 0.3);
  border-radius: 3px;
  padding: 0.8rem 0.95rem;
}
.form-field input:focus, .form-field textarea:focus {
  outline: 3px solid var(--brass); outline-offset: 1px;
  border-color: var(--pine-800);
}
.form-field textarea { min-height: 170px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.btn {
  display: inline-block;
  background: var(--scarlet); color: #fff;
  font-family: var(--sans); font-weight: 600;
  font-size: 0.92rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.95rem 2.6rem;
  border: 0; border-radius: 3px; cursor: pointer;
  text-decoration: none;
  transition: background 140ms ease;
}
.btn:hover { background: var(--base); color: #fff; }

.form-note {
  margin-top: 1.1rem; font-size: 0.9rem; color: var(--ink-soft);
}

/* ---------- Contact / Donate detail panels ---------- */
.detail-panel {
  background: var(--parchment);
  border: 1px solid var(--line);
  padding: 2.2rem 2rem;
  position: relative;
}
.detail-panel::before {
  content: ""; position: absolute; inset: 7px;
  border: 1px solid rgba(163, 146, 78, 0.35);
  pointer-events: none;
}
.detail-panel h2 { margin-top: 0; }
.address { font-style: normal; font-family: var(--serif); font-size: 1.08rem; line-height: 1.9; }

.two-col {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Donate ---------- */
.donate-list { list-style: none; margin: 0 0 1.6rem; padding: 0; }
.donate-list li {
  padding: 1rem 0 1rem 2rem; position: relative;
  border-bottom: 1px dotted rgba(163, 146, 78, 0.5);
  font-family: var(--serif); font-size: 1.08rem; line-height: 1.8;
}
.donate-list li::before {
  content: "✓"; position: absolute; left: 0.2rem; top: 1rem;
  color: var(--brass); font-family: var(--sans); font-weight: 700;
}
.donate-close {
  font-family: var(--serif); font-style: italic;
  font-size: 1.25rem; color: var(--pine-800);
  text-align: center; margin: 2.4rem 0 0;
}

/* ---------- Address band (home) ---------- */
.address-band { text-align: center; }
.address-band strong {
  display: block; font-family: var(--serif); font-weight: 700;
  font-size: 1.25rem; margin-bottom: 0.3rem; color: var(--pine-900);
}
.address-band p { margin: 0; font-family: var(--serif); font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--pine-950); color: rgba(244, 239, 227, 0.85);
  padding: 3.2rem 0 2.2rem;
  border-top: 3px solid var(--brass);
}
.site-footer__grid {
  display: grid; grid-template-columns: auto 1fr auto; gap: 2.5rem; align-items: start;
  margin-bottom: 2.4rem;
}
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; text-align: center; }
  .site-footer__grid > * { justify-self: center; } }
.site-footer img { height: 84px; width: auto; }
.site-footer address { font-style: normal; font-family: var(--serif); line-height: 1.9; }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.site-footer nav a {
  color: rgba(244, 239, 227, 0.85); text-decoration: none;
  font-size: 0.84rem; letter-spacing: 0.14em; text-transform: uppercase;
}
.site-footer nav a:hover { color: var(--brass-soft); }
.site-footer__legal {
  border-top: 1px solid var(--line-light);
  padding-top: 1.6rem; text-align: center;
  font-size: 0.86rem; color: rgba(244, 239, 227, 0.65);
}
.site-footer__legal p { margin: 0.3rem 0; }
.site-footer__legal a { color: var(--brass-soft); text-decoration: none; }
.site-footer__legal a:hover { color: #fff; }

/* ---------- Form validation & AJAX status ---------- */
.form-field .field-error {
  display: none; margin-top: 0.4rem;
  font-size: 0.86rem; font-weight: 600; color: #A03A3A;
}
.form-field.has-error input, .form-field.has-error textarea { border-color: #A03A3A; }
.form-field.has-error .field-error { display: block; }
.form-status {
  display: none; margin: 0 0 1.4rem; padding: 0.9rem 1.1rem;
  border-radius: 3px; font-weight: 600;
}
.form-status.is-success { display: block; background: #E9F2EC; color: #2C5B3F; border: 1px solid #7FAE92; }
.form-status.is-error   { display: block; background: #F7E9E9; color: #8E2A2A; border: 1px solid #C98A8A; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

/* ---------- Blockquotes (Headlines) ---------- */
.prose blockquote {
  margin: 0 0 1.8rem; padding: 1.4rem 1.8rem;
  background: var(--parchment);
  border-left: 3px solid var(--brass);
  font-style: italic;
}
.prose blockquote p { margin-bottom: 0.7rem; }
.prose blockquote footer {
  font-style: normal; font-family: var(--sans);
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--pine-700); font-weight: 600;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 50;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--pine-800); color: #fff;
  border: 1px solid rgba(198, 184, 126, 0.55);
  font-size: 1.25rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 250ms ease, transform 250ms ease, visibility 250ms, background-color 180ms ease;
  box-shadow: 0 6px 18px rgba(33, 34, 56, 0.3);
}
.back-to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--base); }
