@import url("../fonts/fonts.css");

/* ============================================================
   The Hogspital — design system
   Palette: hedgerow greens, autumn amber, warm cream
   ============================================================ */

:root {
  --cream:      #fdf7ec;
  --cream-2:    #f6eddc;
  --cream-3:    #efe2ca;
  --ink:        #2c2419;
  --ink-soft:   #574a38;
  --moss:       #2f5340;
  --moss-2:     #47765a;
  --leaf:       #86ad6a;
  --amber:      #e28b2e;
  --amber-soft: #f6c877;
  --rust:       #c14a2b;
  --brown:      #7c5537;
  --white:      #fffdf8;

  --radius:     18px;
  --radius-lg:  28px;
  --shadow:     0 2px 0 rgba(44, 36, 25, .07), 0 10px 24px -12px rgba(44, 36, 25, .35);
  --shadow-lg:  0 3px 0 rgba(44, 36, 25, .08), 0 26px 50px -22px rgba(44, 36, 25, .45);
  --ring:       0 0 0 3px var(--cream), 0 0 0 6px var(--amber);

  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body:    "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 .5em;
  color: var(--moss);
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 2vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--rust); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--amber); }

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

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.section--tint { background: var(--cream-2); }
.section--moss { background: var(--moss); color: var(--cream); }
.section--moss h2, .section--moss h3 { color: var(--amber-soft); }
.section--moss a { color: var(--amber-soft); }

.lede { font-size: 1.15em; color: var(--ink-soft); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  padding: .72em 1.4em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--amber); color: var(--ink);
  text-decoration: none; cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); color: var(--ink); background: var(--amber-soft); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.btn--moss  { background: var(--moss); color: var(--cream); }
.btn--moss:hover { background: var(--moss-2); color: var(--white); }
.btn--rust  { background: var(--rust); color: var(--white); }
.btn--rust:hover { background: #d9603f; color: var(--white); }
.btn--ghost { background: transparent; box-shadow: 0 4px 0 var(--ink); }
.btn--sm { font-size: .95rem; padding: .55em 1.1em; border-width: 2px; box-shadow: 0 3px 0 var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1rem;
  padding: .55rem 0; min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--moss); margin-right: auto; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; line-height: 1; }
.brand__tag  { display: block; font-family: var(--font-body); font-weight: 600; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); }

.nav-toggle {
  display: none; align-items: center; gap: .4rem;
  font-family: var(--font-display); font-weight: 800;
  background: var(--cream-2); border: 3px solid var(--ink); border-radius: 999px;
  padding: .4em 1em; cursor: pointer; color: var(--ink);
}
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  color: var(--moss); text-decoration: none;
  padding: .4em .75em; border-radius: 999px;
}
.nav a:hover { background: var(--cream-3); color: var(--moss); }
.nav a[aria-current="page"] { background: var(--moss); color: var(--cream); }
.nav .btn { margin-left: .4rem; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--cream); border-bottom: 3px solid var(--ink);
    padding: .8rem clamp(1rem, 5vw, 2rem) 1.4rem;
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .6em .8em; font-size: 1.1rem; }
  .nav .btn { margin: .4rem 0 0; justify-content: center; }
}

/* ---------- emergency bar ---------- */
.emergency {
  background: var(--rust); color: var(--white);
  border-bottom: 3px solid var(--ink);
  text-align: center; padding: .6rem 0;
  font-weight: 700;
}
.emergency a { color: var(--white); font-weight: 800; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--cream-2); border-bottom: 3px solid var(--ink); overflow: hidden; }
.hero__grid {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  grid-template-columns: 1.05fr 1fr;
  padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.hero__art { border: 3px solid var(--ink); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--white); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  background: var(--leaf); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 999px; padding: .3em 1em; margin-bottom: 1rem;
}
@media (max-width: 820px) { .hero__grid { grid-template-columns: 1fr; } .hero__art { order: -1; } }

/* ---------- cards ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.8rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--white);
  border: 3px solid var(--ink); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  display: flex; flex-direction: column;
}
.card--link { text-decoration: none; color: inherit; transition: transform .14s ease, box-shadow .14s ease; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: inherit; }
.card__media { margin: calc(-1 * clamp(1.2rem, 2.5vw, 1.8rem)); margin-bottom: 1.1rem; border-bottom: 3px solid var(--ink); overflow: hidden; border-radius: calc(var(--radius-lg) - 3px) calc(var(--radius-lg) - 3px) 0 0; }
.card__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--ink-soft); }
.card__foot { margin-top: auto; padding-top: 1rem; }

.icon-badge {
  width: 62px; height: 62px; display: grid; place-items: center;
  font-size: 1.9rem; line-height: 1;
  background: var(--cream-3); border: 3px solid var(--ink); border-radius: 999px;
  margin-bottom: .9rem;
}

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1rem; padding: 0; margin: 0; list-style: none; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 1.1rem 1.3rem; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step; content: counter(step);
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--amber); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 999px;
}
.step h3 { margin-bottom: .2em; font-size: 1.2rem; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---------- do / don't ---------- */
.dodont { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.panel { border: 3px solid var(--ink); border-radius: var(--radius-lg); padding: 1.4rem 1.6rem; box-shadow: var(--shadow); }
.panel--do { background: #e9f2e0; }
.panel--dont { background: #fbe6de; }
.panel h3 { display: flex; align-items: center; gap: .5rem; }
.panel ul { margin: 0; padding-left: 1.2em; }
.panel li { margin-bottom: .5em; }
.panel li::marker { font-size: 1.1em; }

/* ---------- callout ---------- */
.callout {
  border: 3px solid var(--ink); border-left-width: 12px; border-radius: var(--radius);
  background: var(--cream-3); padding: 1.1rem 1.4rem; box-shadow: var(--shadow);
}
.callout--urgent { background: #fbe6de; border-left-color: var(--rust); }
.callout--tip { background: #e9f2e0; border-left-color: var(--leaf); }
.callout p:first-child { margin-top: 0; }

/* placeholder markers for details Dave still needs from the charity */
.tbc {
  background: repeating-linear-gradient(45deg, #ffe9a8, #ffe9a8 8px, #ffd97a 8px, #ffd97a 16px);
  border: 2px dashed var(--brown); border-radius: 8px;
  padding: .05em .5em; font-weight: 800; font-size: .95em; color: var(--brown);
  white-space: nowrap;
}

/* ---------- split feature ---------- */
.split { display: grid; gap: clamp(1.4rem, 4vw, 3rem); align-items: center; grid-template-columns: 1fr 1fr; }
.split img { border: 3px solid var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.split--flip > *:first-child { order: 2; }
@media (max-width: 780px) { .split, .split--flip > *:first-child { grid-template-columns: 1fr; order: 0; } }

/* ---------- stats ---------- */
.stats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.stat { background: var(--white); border: 3px solid var(--ink); border-radius: var(--radius); padding: 1.2rem .8rem; box-shadow: var(--shadow); }
.stat__num { font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; color: var(--rust); line-height: 1; }
.stat__label { font-size: .95rem; color: var(--ink-soft); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { background: var(--moss); color: var(--cream-2); border-top: 3px solid var(--ink); padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; }
.site-footer h3 { color: var(--amber-soft); font-size: 1.15rem; }
.site-footer a { color: var(--cream); }
.site-footer__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.site-footer__bottom {
  margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid rgba(253, 247, 236, .25);
  display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between;
  font-size: .88rem; color: rgba(253, 247, 236, .75);
}

/* ---------- decorative divider ---------- */
.divider { display: block; width: 100%; height: 36px; color: var(--cream-2); }
.divider--flip { transform: rotate(180deg); }

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .emergency, .no-print { display: none !important; }
  body { background: #fff; }
}

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

.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;
}

.skip-link {
  position: absolute; left: .5rem; top: -100px; z-index: 100;
  background: var(--amber); color: var(--ink); border: 3px solid var(--ink);
  padding: .5em 1em; border-radius: 999px; font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: .5rem; }
