/* Tail & Paw — vet-verified pet care guides. Mobile-first. */
/* System-font stack, lean, accessible. Warm paper + deep teal + coral. */

:root {
  --ink: #16232b;
  --ink-light: #5c6a72;
  --accent: #0e7c7a;
  --accent-deep: #0a5f5d;
  --accent-soft: #e2f0ee;
  --cta: #d96c4f;
  --cta-hover: #c05a40;
  --cta-text: #b6431f;      /* AA-safe coral for TEXT on light bg (5.5:1); --cta stays for borders/decoration (3.4:1, non-text) */
  --border: #e6e2d9;
  --bg: #ffffff;
  --bg-soft: #faf8f4;
  --bg-paper: #f4f1ea;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(22, 35, 43, 0.06), 0 1px 3px rgba(22, 35, 43, 0.08);
  --shadow-md: 0 6px 16px rgba(22, 35, 43, 0.10), 0 2px 6px rgba(22, 35, 43, 0.07);
  --focus-ring: 0 0 0 3px rgba(14, 124, 122, 0.35);
}

/* Dark mode — respect prefers-color-scheme */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceff1;
    --ink-light: #a8b2b8;
    --bg: #121a1f;
    --bg-soft: #1a242a;
    --bg-paper: #162026;
    --border: #2c3840;
    --accent: #4db6ae;
    --accent-deep: #6fc9c2;
    --accent-soft: #173230;
    --cta: #d96c4f;
    --cta-text: #e8825f;    /* AA-safe coral text on dark bg (6.5:1) */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.45);
    --focus-ring: 0 0 0 3px rgba(77, 182, 174, 0.4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Keyboard focus is visible everywhere, and only for keyboard users */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link — first focusable element, revealed on focus */
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent); color: var(--bg);
  font-weight: 700; border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 1rem; color: var(--bg); text-decoration: none; }

.container { max-width: 820px; margin: 0 auto; padding: 0 1.25rem; }
.container.max-prose { max-width: 700px; }

/* =========================================================================
   Grid / helpers
========================================================================= */
.prose :first-child:first-of-type { margin-top: 0; }
h1, .hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  margin-top: 2.5rem;
  letter-spacing: -0.015em;
  font-weight: 750;
}
h3 { font-size: clamp(1.12rem, 3vw, 1.3rem); margin-top: 1.75rem; letter-spacing: -0.01em; }
p + p { margin-top: 0; }
p { margin: 1rem 0; line-height: 1.7; }
ul, ol { margin: 1rem 0; padding-left: 1.75rem; line-height: 1.7; }

.checklist { padding-left: 0; list-style: none; }
.checklist li { margin: 0.5rem 0; position: relative; padding-left: 1.75rem; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 800;
}
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps li { counter-increment: step; margin: 0.6rem 0; position: relative; padding-left: 2.4rem; min-height: 1.9rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1rem;
  width: 1.7rem; height: 1.7rem;
  background: var(--accent); color: var(--bg); border-radius: 50%;
  text-align: center; font-size: 0.85rem; font-weight: 700; line-height: 1.7rem;
}
.action {
  background: var(--accent-soft); border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0;
}
.action p:first-child { margin-top: 0; }
.action p:last-child { margin-bottom: 0; }
.caption { font-size: 0.85rem; color: var(--ink-light); font-style: italic; margin: 0.5rem 0; }
.author-photo-inline {
  float: right; margin: 0 0 0.5rem 0.75rem; border-radius: 50%;
  width: 64px; height: 64px; object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.lede {
  font-size: clamp(1.1rem, 2.5vw, 1.2rem); line-height: 1.65; font-weight: 450;
  color: var(--ink); margin: 1.25rem 0;
}

/* Forms — labels always visible, 16px+ inputs (no iOS zoom) */
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-size: 0.9rem; margin-bottom: 0.3rem; font-weight: 600; }
.field input, .field textarea, .field button {
  font: inherit; font-size: 1rem; border-radius: var(--radius-sm);
}
.field input, .field textarea {
  width: 100%; padding: 0.75rem 0.85rem; border: 1px solid var(--border);
  background: var(--bg); color: var(--ink);
}
.field input:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.contact-form button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0.7rem 1.5rem;
  background: var(--accent); color: var(--bg); font-weight: 700;
  border: 0; cursor: pointer; border-radius: var(--radius-sm);
}
.contact-form button[type="submit"]:hover { background: var(--accent-deep); }
.form-hint { font-size: 0.85rem; color: var(--ink-light); }

/* =========================================================================
   Header / nav
========================================================================= */
.site-header {
  background: var(--bg); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 1rem;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--accent); min-height: 44px;
}
.logo:hover { text-decoration: none; }
.logo-mark { flex-shrink: 0; }
.logo-text {
  font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink);
}
.site-nav ul { display: flex; list-style: none; gap: 0.35rem; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 0.6rem; font-size: 0.92rem; font-weight: 550; color: var(--ink);
  border-radius: var(--radius-sm);
}
.site-nav a.current, .site-nav a[aria-current="page"] { color: var(--accent); font-weight: 700; }
.site-nav a:hover { color: var(--accent); text-decoration: none; background: var(--accent-soft); }

/* =========================================================================
   Hero
========================================================================= */
.hero {
  background:
    radial-gradient(ellipse 720px 420px at 88% -10%, var(--accent-soft), transparent 68%),
    var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 3.5rem 0 3rem;
}
.hero-inner { display: grid; gap: 2.25rem; align-items: center; }
.hero-copy h1 { max-width: 22ch; margin: 0 0 1rem; }
.hero .lede { max-width: 58ch; margin: 0 0 1.25rem; }
.hero-art {
  width: 100%; max-width: 440px; height: auto;
  margin: 0 auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.hero-badges {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
  list-style: none; padding: 0; margin: 0 0 1.5rem;
}
.hero-badges li {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.88rem; font-weight: 650; color: var(--ink);
}
.hero-badges li::before {
  content: "✓"; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--accent); color: var(--bg);
  font-size: 0.7rem; font-weight: 800;
}
.emergency-note {
  display: flex; align-items: baseline; gap: 0.5rem;
  margin: 0; padding: 0.85rem 1.1rem;
  background: var(--bg); border: 1px solid var(--border);
  border-left: 4px solid var(--cta); border-radius: var(--radius-sm);
  font-size: 0.95rem; max-width: 58ch;
  box-shadow: var(--shadow-sm);
}
.emergency-note strong { color: var(--cta-text); }

/* =========================================================================
   Homepage sections
========================================================================= */
.pillars { padding: 3rem 0 1rem; }
.section-head { margin-bottom: 2rem; }
.section-head h2, .latest h2, .trust-teaser h2 { margin: 0 0 0.4rem; }
.section-lead { color: var(--ink-light); margin: 0; max-width: 60ch; }
.latest, .pillars + .latest { padding: 1.5rem 0 2rem; }

.pillar-grid { display: grid; gap: 1.25rem; }
.pillar-card {
  display: flex; flex-direction: column;
  text-decoration: none; color: inherit;
  background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.pillar-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--accent);
}
.pillar-card:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.pillar-card .card-media { overflow: hidden; }
.pillar-card img {
  aspect-ratio: 1200 / 630; object-fit: cover; width: 100%;
  transition: transform 0.35s ease;
}
.pillar-card:hover img { transform: scale(1.03); }
.pillar-card .card-body {
  display: flex; flex-direction: column; flex-grow: 1;
  padding: 1.1rem 1.2rem 1.25rem;
}
.pillar-card h3 {
  font-size: 1.05rem; line-height: 1.35; margin: 0 0 0.5rem;
  color: var(--ink); letter-spacing: -0.01em;
  transition: color 0.15s ease;
}
.pillar-card:hover h3 { color: var(--accent); }
.pillar-card p {
  font-size: 0.9rem; color: var(--ink-light); margin: 0 0 0.9rem; line-height: 1.55;
  flex-grow: 1;
}
.card-cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.88rem; font-weight: 700; color: var(--accent);
}
.card-cta .arrow { transition: transform 0.2s ease; }
.pillar-card:hover .card-cta .arrow { transform: translateX(3px); }

/* Latest / RSS */
.article-list { list-style: none; padding: 0; margin: 0; }
.rss-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.25rem;
  background: var(--bg); color: var(--accent);
  border: 1.5px solid var(--accent); border-radius: 999px;
  font-weight: 700; font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.rss-link:hover { background: var(--accent); color: var(--bg); text-decoration: none; }
.rss-link svg { flex-shrink: 0; }

/* =========================================================================
   Article
========================================================================= */
.featured-image { margin: 2rem 0 1.75rem; }
.featured-image img {
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.article-header { margin-bottom: 2rem; }
.byline {
  display: flex; align-items: flex-start; gap: 0.85rem;
  background: var(--bg-soft); border: 1px solid var(--border);
  padding: 1rem 1.15rem; border-radius: var(--radius);
  margin: 0 0 1.5rem;
}
.byline-photo { border-radius: 50%; flex-shrink: 0; }
.byline-name { font-weight: 700; margin: 0 0 0.3rem; }
.byline-name a { color: var(--accent); }
.byline-bio { font-size: 0.88rem; color: var(--ink-light); margin: 0; line-height: 1.55; }
.article h1 { margin: 0 0 0.75rem; }
.updated {
  display: inline-block;
  font-size: 0.85rem; color: var(--ink-light); margin: 0 0 1.5rem;
}
.article-body { font-size: 1.02rem; }

/* Data tables */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.data-table caption { text-align: left; font-weight: 600; padding: 0.5rem 0; color: var(--ink-light); }
.data-table th, .data-table td { border: 1px solid var(--border); padding: 0.55rem 0.75rem; text-align: left; }
.data-table th { background: var(--bg-soft); font-weight: 700; }
.data-table tbody tr:nth-child(even) { background: var(--bg-soft); }
.table-scroll { overflow-x: auto; }

/* Social share */
.share {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin: 2.25rem 0; padding: 1rem 1.1rem;
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
}
.share-label { font-weight: 700; font-size: 0.9rem; margin-right: 0.25rem; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.45rem 0.95rem;
  font-size: 0.88rem; font-weight: 600; color: var(--ink);
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); text-decoration: none; }

/* Related reading */
.related {
  background: var(--bg-soft); border-block: 1px solid var(--border);
  padding: 2.5rem 0; margin: 2.5rem 0 0;
}
.related .container { max-width: 820px; }
.related h2 { margin-top: 0; }
.related p { color: var(--ink-light); margin-bottom: 1.25rem; }
.related ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.related a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0.5rem 1rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.92rem; font-weight: 600; color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.related a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* FAQ — CSS-only accordion */
.faq { margin: 2.5rem 0; }
.faq-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  cursor: pointer; padding: 1.1rem 0.25rem; font-weight: 650; font-size: 1rem;
  min-height: 44px;
  transition: color 0.15s ease;
}
.faq-q:hover { color: var(--accent); }
.faq-q .faq-icon {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 800; font-size: 1rem; line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.faq-toggle:checked + .faq-q .faq-icon {
  transform: rotate(45deg); background: var(--accent); color: var(--bg);
}
.faq-toggle:focus-visible + .faq-q {
  outline: 3px solid var(--accent); outline-offset: -2px; border-radius: var(--radius-sm);
}
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-toggle:checked + .faq-q + .faq-a { max-height: 2000px; }
.faq-a div { padding: 0 0.25rem 1.25rem; color: var(--ink); max-width: 62ch; }
.faq-a p:first-child { margin-top: 0; }

/* Disclaimer */
.disclaimer {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-left: 4px solid var(--cta);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.1rem 1.25rem; margin: 2rem 0 0; font-size: 0.95rem;
  color: var(--ink);
}
.disclaimer strong { color: var(--cta-text); }

/* Trust pages */
.trust-teaser {
  text-align: center; padding: 3.5rem 0;
  background: var(--accent);
  color: var(--bg);
  margin-top: 3rem;
}
.trust-teaser h2 { color: inherit; margin-top: 0; }
.trust-teaser p { max-width: 58ch; margin-left: auto; margin-right: auto; opacity: 0.96; }
.trust-teaser a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 650; }
.prose { max-width: 700px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.prose h1 { text-align: center; margin-top: 0.5rem; }
.prose table { font-size: 0.9rem; }
.prose .checklist li::before { color: var(--accent); }

/* =========================================================================
   Footer
========================================================================= */
.site-footer {
  background: var(--ink); color: #c9d2d6;
  padding: 2.5rem 0 2rem; margin-top: 0;
}
.site-footer .container { text-align: center; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #fff; }
.trust-links {
  list-style: none; display: flex; gap: 0.35rem 1.5rem; justify-content: center; flex-wrap: wrap;
  margin: 1.25rem 0; padding: 0;
}
.trust-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.25rem;
  font-size: 0.92rem;
}
.fine { font-size: 0.82rem; color: #8fa0a8; margin: 0; }

/* No-JS — if JS disabled, the share-native button is hidden, share links still work */
.no-js .share-native { display: none; }

/* =========================================================================
   404
========================================================================= */
.not-found { text-align: center; padding: 4.5rem 1.25rem; }
.not-found h1 { font-size: clamp(3rem, 10vw, 4.5rem); color: var(--accent); margin-bottom: 0.5rem; }
.not-found p { color: var(--ink-light); }

/* =========================================================================
   Viewport
========================================================================= */
@media (min-width: 640px) {
  .pillar-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}
@media (min-width: 768px) {
  .container { padding: 0 2rem; }
  .hero { padding: 4.5rem 0 3.75rem; }
  .site-nav ul { gap: 0.5rem; }
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; }
  .hero-art { max-width: none; }
}
@media (min-width: 1024px) {
  .pillar-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
}

/* Respect reduced motion — no transforms, no smooth scroll */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .pillar-card:hover { transform: none; }
  .pillar-card:hover img { transform: none; }
}
