/* Theme "warm": loaded after site.css, which still styles the content itself (prose,
   facts, sources, breadcrumbs). Colours come from --primary and --accent per site. */

@font-face {
  font-family: "Nunito";
  src: url("nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #ffffff;
  --tint: color-mix(in srgb, var(--primary) 8%, #fff);
  --tint-strong: color-mix(in srgb, var(--primary) 16%, #fff);
  --dark: color-mix(in srgb, var(--primary) 70%, #000);
  --radius: 16px;
  --wrap: 1180px;
  --shadow: 0 6px 24px rgba(20, 30, 25, 0.08);
}

body { font-size: 1.075rem; }
h1, h2, h3 { font-weight: 800; letter-spacing: -0.01em; }
h2 { color: var(--dark); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Top bar and header ---------------------------------------------------------- */

.topbar { padding-top: 10px; }
.topbar-inner {
  display: flex; justify-content: space-between; gap: 1rem;
  background: var(--primary); color: #fff; font-size: 0.85rem;
  border-radius: 999px; padding: 0.4rem 1.2rem;
  width: calc(100% - 32px);
}
.topbar-right { display: none; }
@media (min-width: 700px) { .topbar-right { display: inline; } }

.site-header { background: #fff; color: var(--text); }
.header-inner { min-height: 84px; flex-wrap: wrap; }
.brand { color: var(--primary); font-weight: 900; font-size: 1.85rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--primary); }
.brand img { height: 44px; }

.site-nav { background: none; order: 3; width: 100%; }
.site-nav ul { padding: 0; gap: 0.1rem; }
.site-nav a {
  color: var(--text); font-weight: 600; padding: 0.5rem 0.8rem; border-radius: 999px;
}
.site-nav a:hover, .site-nav a[aria-current] { background: var(--tint); color: var(--primary); }
@media (min-width: 1000px) {
  .header-inner { flex-wrap: nowrap; }
  .site-nav { order: 0; width: auto; }
}
.site-header :focus-visible { outline-color: var(--accent); }

.search-button {
  display: inline-grid; place-items: center; width: 46px; height: 46px; flex: none;
  border: 2px solid var(--accent); border-radius: 50%; color: var(--accent);
}
.search-button:hover { background: var(--accent); color: #fff; }

/* Bands: home hero and the page banner, both ending in a soft wave. ----------- */

.home-hero, .banner { position: relative; background: var(--tint); padding-bottom: 56px; }
.home-hero::after, .banner::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
  background: var(--bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C240 0 480 0 720 26 S1200 60 1440 18 V60 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C240 0 480 0 720 26 S1200 60 1440 18 V60 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

.hero-inner { display: grid; gap: 2rem; align-items: center; padding-top: 2.5rem; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1.1fr 1fr; padding-top: 3.5rem; } }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 1.2rem; margin: 0; }  /* large text: 3:1 is enough on the tint */
.home-hero h1 { color: var(--primary); font-size: clamp(2.3rem, 6vw, 3.8rem); font-weight: 900; margin: 0.2rem 0 0.4rem; }
.hero-lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 1.5rem; }

.hero-feature {
  position: relative; display: block; border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow); color: #fff; text-decoration: none;
}
.hero-feature img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.4s; }
.hero-feature:hover img { transform: scale(1.03); }
.hero-feature-title {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.5rem 1.3rem 1.1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  font-weight: 800; font-size: 1.3rem; line-height: 1.25;
}
.hero-feature:hover { color: #fff; }

.banner { text-align: center; padding-top: 1.5rem; }
.banner h1 { color: var(--primary); margin: 0.5rem 0 0.3rem; font-weight: 900; }
.banner .breadcrumbs ol { justify-content: center; margin: 0; }
.banner-lead { max-width: 640px; margin: 0 auto; color: var(--muted); font-size: 1.15rem; }
.banner-lead p { margin: 0; }

/* Search form (pill with button) ---------------------------------------------- */

.search-form {
  display: flex; max-width: 480px; background: #fff;
  border: 2px solid var(--accent); border-radius: 999px; overflow: hidden;
}
.search-form input {
  flex: 1; min-width: 0; border: 0; padding: 0.8rem 1.2rem; font: inherit; background: none;
}
.search-form input:focus { outline: none; }
.search-form:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.search-form button {
  border: 0; background: var(--accent); color: #fff; font: inherit; font-weight: 800;
  padding: 0 1.4rem; border-radius: 999px; cursor: pointer;
}
.search-form button:hover { background: var(--primary); }

/* Sections, pills and cards ---------------------------------------------------- */

main { padding-top: 0.5rem; }
.section { margin-top: 2.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-head h2 { margin: 0 0 1rem; font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
.section-tint {
  background: var(--tint); border-radius: 28px; padding: 1.5rem 1.2rem 1.8rem;
}
@media (min-width: 700px) { .section-tint { padding: 2rem 2rem 2.4rem; } }

.pills { display: flex; flex-wrap: wrap; gap: 0.6rem; list-style: none; margin: 1.2rem 0 0; padding: 0; }
.pills a {
  display: block; padding: 0.5rem 1.2rem; border-radius: 999px; background: var(--tint);
  color: var(--text); font-weight: 700; text-decoration: none;
}
.pills a:hover, .pills a[aria-current] { background: var(--accent); color: #fff; }

@media (min-width: 960px) { .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.cards { gap: 1.4rem; }
.card {
  border: 1px solid color-mix(in srgb, var(--primary) 14%, #fff); border-radius: var(--radius);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card a { position: relative; }
.card-body { padding: 1rem 1.1rem 1.2rem; }
.card-body h3 { font-weight: 800; font-size: 1.15rem; }
.card a:hover h3 { color: var(--primary); }
/* The category label sits on the photo, top left. */
.card .label {
  position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff;
  border-radius: 999px; padding: 0.2rem 0.75rem; letter-spacing: 0.02em;
}
.card-placeholder { opacity: 1; background: var(--tint-strong); }
.more {
  color: var(--primary); text-decoration: none; border: 2px solid var(--primary);
  border-radius: 999px; padding: 0.3rem 1rem; font-size: 0.95rem; white-space: nowrap;
}
.more:hover { background: var(--primary); color: #fff; }

/* Article page with sidebar ------------------------------------------------------ */

.with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-top: 1rem; }  /* minmax: a wide child must not widen the page on phones */
@media (min-width: 1000px) {
  .with-sidebar { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
}
.page { max-width: 760px; }
.page-wide { max-width: none; }
.byline { margin: 0 0 0.5rem; }
.hero img, .figure img { border-radius: 24px; }

.sidebar { display: grid; gap: 1.2rem; }
@media (min-width: 1000px) { .sidebar { position: sticky; top: 1rem; } }
.side-block { background: var(--tint); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.side-block h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }
.side-block .search-form { max-width: none; }
.side-block ul { list-style: none; margin: 0; padding: 0; }
.side-topics li { display: flex; justify-content: space-between; padding: 0.3rem 0; }
.side-topics li + li { border-top: 1px solid var(--tint-strong); }
.side-topics a { text-decoration: none; font-weight: 600; }
.side-topics span { color: var(--muted); font-size: 0.9rem; }
.side-articles li + li { margin-top: 0.7rem; }
.side-articles a { display: flex; gap: 0.8rem; align-items: center; color: var(--text); text-decoration: none; font-weight: 700; line-height: 1.3; }
.side-articles a:hover { color: var(--primary); }
.side-articles img, .thumb-placeholder {
  width: 72px; height: 56px; flex: none; object-fit: cover; border-radius: 10px; background: var(--tint-strong);
}

.author-box { border-top: 0; border-radius: var(--radius); background: var(--tint); }
.related { margin-top: 3rem; }
.related h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
@media (min-width: 960px) { .related .cards { grid-template-columns: repeat(4, 1fr); } }

.facts, .breed-card { border-radius: var(--radius); background: var(--tint); border: 0; }

/* Footer ------------------------------------------------------------------------- */

.site-footer {
  position: relative; margin-top: 5rem; background: var(--dark); color: rgba(255, 255, 255, 0.85);
  padding: 3rem 0 2rem;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -47px; height: 48px; background: var(--dark);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C300 70 520 0 860 22 S1260 40 1440 8 V60 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0 30 C300 70 520 0 860 22 S1260 40 1440 8 V60 H0Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.footer-inner { display: grid; gap: 2rem; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer p { margin: 0.3rem 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.25rem 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-brand { font-size: 1.6rem; font-weight: 900; color: #fff; }
.footer-title { font-weight: 800; color: #fff; }
.site-footer :focus-visible { outline-color: #fff; }

/* Category pages: previous / next. */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 2rem;
  font-weight: 700;
}
.pagination a {
  padding: 0.45rem 1.1rem; border-radius: 999px; border: 2px solid var(--primary);
  color: var(--primary); text-decoration: none;
}
.pagination a:hover { background: var(--primary); color: #fff; }
.pagination span { color: var(--muted); font-weight: 600; }

.page-fixed { margin-top: 1rem; }
