/*
 * VetMD design kit: tokens and components shared by every page we build.
 * Matches www.vet-md.co (Landingsite): Outfit headings, Plus Jakarta Sans body, teal primary,
 * deep-teal sections, amber accent, red for emergency. Docs: design/README.md.
 * Class prefix: vm-. Keep pages free of inline styles (the CSP disallows them).
 */

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/outfit-latin-variable.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans-latin-variable.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------------------------ */
:root {
  /* Brand (sampled from www.vet-md.co) */
  --vm-teal: #0d9488;          /* primary actions, links, "MD" */
  --vm-teal-hover: #0f766e;
  --vm-teal-soft: #ccfbf1;
  --vm-teal-tint: #f0fdfa;
  --vm-deep: #0b2b2a;          /* hero and footer sections */
  --vm-deep-raised: #123a38;   /* cards on deep sections */
  --vm-navy: #132d57;          /* "Vet" in the logo */
  --vm-amber: #f59e0b;         /* accent: search, highlights, footer links */
  --vm-amber-hover: #d97706;
  --vm-red: #dc2626;           /* emergency text and icons */
  --vm-red-solid: #ef4444;     /* emergency buttons */
  --vm-red-solid-hover: #dc2626;
  --vm-red-tint: #fef2f2;
  --vm-red-line: #fecaca;
  --vm-amber-tint: #fffbeb;
  --vm-amber-ink: #92400e;

  /* Neutrals (the site's shadcn/ui palette) */
  --vm-ink: #020817;
  --vm-ink-soft: rgba(11, 43, 42, 0.72);
  --vm-muted: #64748b;
  --vm-line: #e2e8f0;
  --vm-surface: #ffffff;
  --vm-page: #f5f8f8;
  --vm-subtle: #f1f5f9;

  /* Type */
  --vm-font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --vm-font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;

  /* Shape and space */
  --vm-radius: 0.5rem;
  --vm-radius-card: 1rem;
  --vm-radius-pill: 9999px;
  --vm-container: 80rem;       /* 1280px */
  --vm-gutter: 1rem;           /* 16px on phones, 32px from 768px */
  --vm-shadow-card: 0 1px 2px rgba(2, 8, 23, 0.04), 0 8px 24px -12px rgba(11, 43, 42, 0.18);
  --vm-shadow-teal: 0 10px 15px -3px rgba(13, 148, 136, 0.25), 0 4px 6px -4px rgba(13, 148, 136, 0.25);
  --vm-focus: 0 0 0 3px rgba(13, 148, 136, 0.45);

  /* Semantic */
  --vm-bg: var(--vm-page);
  --vm-fg: var(--vm-ink);
  --vm-card-bg: var(--vm-surface);
  --vm-card-line: var(--vm-line);
  --vm-heading: var(--vm-deep);
  --vm-link: var(--vm-teal);
}

/* Dark mode keeps the brand: deep-teal surfaces like the site's dark sections. The header stays
   light so the logo (navy + teal) remains legible. */
@media (prefers-color-scheme: dark) {
  :root {
    --vm-bg: #071c1b;
    --vm-fg: #e6f0ef;
    --vm-card-bg: var(--vm-deep);
    --vm-card-line: rgba(255, 255, 255, 0.1);
    --vm-heading: #ffffff;
    --vm-link: #5eead4;
    --vm-muted: #a7bcba;
    --vm-subtle: rgba(255, 255, 255, 0.06);
    --vm-red-tint: rgba(239, 68, 68, 0.14);
    --vm-red-line: rgba(239, 68, 68, 0.4);
    --vm-red: #fca5a5;
    --vm-amber-tint: rgba(245, 158, 11, 0.14);
    --vm-amber-ink: #fcd34d;
    --vm-teal-tint: rgba(13, 148, 136, 0.18);
  }
}

/* ---- Base -------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--vm-bg);
  color: var(--vm-fg);
  font: 400 1rem/1.55 var(--vm-font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--vm-font-display); font-weight: 600; letter-spacing: -0.01em; color: var(--vm-heading); line-height: 1.15; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 0.75rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin: 0 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.35rem; }
p { margin: 0 0 0.75rem; overflow-wrap: anywhere; }
a { color: var(--vm-link); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--vm-focus); border-radius: var(--vm-radius); }
img { max-width: 100%; height: auto; }
.vm-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.vm-skip { position: absolute; left: -999px; top: 0; }
.vm-skip:focus { left: var(--vm-gutter); top: 0.5rem; z-index: 50; background: var(--vm-surface); padding: 0.5rem 1rem; }

.vm-container { width: 100%; max-width: var(--vm-container); margin: 0 auto; padding: 0 var(--vm-gutter); }
@media (min-width: 768px) { :root { --vm-gutter: 2rem; } }

.vm-icon { width: 1em; height: 1em; flex: none; vertical-align: -0.125em; }

/* ---- Header (always light, like the main site) ------------------------------------------ */
.vm-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid rgba(11, 43, 42, 0.06);
  color: var(--vm-ink);
}
.vm-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 4.5rem; }
.vm-logo { display: inline-flex; flex: none; }
.vm-logo img { display: block; width: auto; height: 2.25rem; }
@media (min-width: 768px) { .vm-logo img { height: 2.75rem; } }
.vm-nav { display: none; gap: 1.75rem; margin: 0 auto; }
.vm-nav a { color: rgba(11, 43, 42, 0.72); font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.vm-nav a:hover { color: var(--vm-deep); }
.vm-header__actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.vm-header .vm-header__cta { display: none; } /* specific enough to beat .vm-btn below */
@media (min-width: 1024px) {
  .vm-nav { display: flex; }
  .vm-header__actions { margin-left: 0; }
  .vm-header .vm-header__cta { display: inline-flex; }
  .vm-menu { display: none; }
}

/* Phone menu: <details>, no JavaScript */
.vm-menu { position: relative; }
.vm-menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.875rem; font-weight: 600; color: var(--vm-deep); padding: 0.5rem 0.75rem; border-radius: var(--vm-radius-pill); border: 1px solid var(--vm-line); }
.vm-menu > summary::-webkit-details-marker { display: none; }
.vm-menu__panel { position: absolute; right: 0; top: calc(100% + 0.5rem); width: min(16rem, calc(100vw - 2rem)); background: #fff;
  border: 1px solid var(--vm-line); border-radius: var(--vm-radius-card); box-shadow: var(--vm-shadow-card); padding: 0.5rem; display: grid; }
.vm-menu__panel a { color: var(--vm-deep); text-decoration: none; padding: 0.6rem 0.75rem; border-radius: var(--vm-radius); font-size: 0.95rem; font-weight: 500; }
.vm-menu__panel a:hover { background: var(--vm-teal-tint); }

/* ---- Buttons and pills ----------------------------------------------------------------- */
.vm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: 600 0.875rem/1.2 var(--vm-font-body);
  padding: 0.625rem 1.25rem; border-radius: var(--vm-radius-pill); border: 1px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap; }
.vm-btn--primary { background: var(--vm-teal); color: #fff; box-shadow: var(--vm-shadow-teal); }
.vm-btn--primary:hover { background: var(--vm-teal-hover); }
.vm-btn--accent { background: var(--vm-amber); color: var(--vm-deep); }
.vm-btn--accent:hover { background: var(--vm-amber-hover); }
.vm-btn--call { background: var(--vm-red-solid); color: #fff; font-size: 1.05rem; padding: 0.85rem 1.25rem; }
.vm-btn--call:hover { background: var(--vm-red-solid-hover); }
.vm-btn--block { display: flex; width: 100%; }
.vm-pill-emergency { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.9rem; border-radius: var(--vm-radius-pill);
  background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; font-size: 0.875rem; font-weight: 600; text-decoration: none; }
.vm-pill-emergency[aria-current="page"] { background: #fee2e2; }

/* Eyebrows: small labels above headings */
.vm-eyebrow { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.75rem;
  border-radius: var(--vm-radius-pill); margin-bottom: 1rem; }
.vm-eyebrow--emergency { background: rgba(239, 68, 68, 0.14); color: #fecaca; border: 1px solid rgba(239, 68, 68, 0.35); }
.vm-kicker { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--vm-teal); margin-bottom: 0.5rem; }
@media (prefers-color-scheme: dark) { .vm-kicker { color: #5eead4; } }

/* ---- Hero (deep-teal band) ------------------------------------------------------------- */
.vm-hero { background: radial-gradient(120% 140% at 0% 0%, #12403d 0%, var(--vm-deep) 55%, #082322 100%); color: #e6f0ef; padding: 2.5rem 0 2.75rem; }
.vm-hero h1 { color: #fff; }
.vm-hero__lede { color: rgba(255, 255, 255, 0.78); font-size: 1.05rem; max-width: 42rem; }
.vm-hero__meta { color: rgba(255, 255, 255, 0.6); font-size: 0.875rem; }
.vm-hero a { color: #fcd34d; }

/* ---- Notices ----------------------------------------------------------------------------- */
.vm-notice { display: flex; gap: 0.75rem; align-items: flex-start; border-radius: var(--vm-radius-card); padding: 1rem 1.15rem; margin: 1.25rem 0 0; font-size: 0.95rem; }
.vm-notice .vm-icon { width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; }
.vm-notice p { margin: 0 0 0.35rem; }
.vm-notice p:last-child { margin: 0; }
.vm-notice--danger-on-dark { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12); color: rgba(255, 255, 255, 0.82); }
.vm-notice--danger-on-dark .vm-icon, .vm-notice--danger-on-dark strong { color: #fca5a5; }

/* ---- Sections and cards ----------------------------------------------------------------- */
.vm-section { padding: 2.5rem 0; }
.vm-section__head { margin-bottom: 1.25rem; }
.vm-section__sub { color: var(--vm-muted); max-width: 44rem; }
.vm-grid { display: grid; gap: 1rem; }
@media (min-width: 900px) { .vm-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.vm-card { background: var(--vm-card-bg); border: 1px solid var(--vm-card-line); border-radius: var(--vm-radius-card);
  box-shadow: var(--vm-shadow-card); padding: 1.25rem; min-width: 0; }
.vm-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.vm-card__note { color: var(--vm-muted); font-size: 0.9rem; margin: 0.4rem 0 0; }
.vm-card__foot { margin: 0.75rem 0 0; font-size: 0.8rem; color: var(--vm-muted); }
.vm-card__foot--stale { color: var(--vm-amber-ink); font-weight: 600; }

/* Status badges */
.vm-status { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: var(--vm-radius-pill); padding: 0.25rem 0.7rem; font-size: 0.82rem; font-weight: 600; }
.vm-status::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.vm-status--ok { background: var(--vm-teal-tint); color: #0f766e; }
.vm-status--warn { background: var(--vm-amber-tint); color: var(--vm-amber-ink); }
.vm-status--bad { background: var(--vm-red-tint); color: var(--vm-red); }
.vm-status--unknown { background: var(--vm-subtle); color: var(--vm-muted); }
@media (prefers-color-scheme: dark) { .vm-status--ok { color: #5eead4; } }

/* Chips (capabilities, accreditations) */
.vm-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.75rem 0; list-style: none; }
.vm-chips li { font-size: 0.8rem; font-weight: 500; padding: 0.2rem 0.65rem; border-radius: var(--vm-radius-pill);
  background: var(--vm-teal-tint); color: var(--vm-heading); border: 1px solid rgba(13, 148, 136, 0.18); }

/* Facts list */
.vm-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.15rem 1rem; margin: 0.75rem 0 0; font-size: 0.92rem; }
@media (min-width: 480px) { .vm-facts { grid-template-columns: 8.5rem minmax(0, 1fr); } }
.vm-facts dt { font-weight: 600; color: var(--vm-heading); }
.vm-facts dd { margin: 0 0 0.45rem; overflow-wrap: anywhere; }
.vm-facts dd p { margin: 0; }

/* ---- Footer (deep teal, like the main site) --------------------------------------------- */
.vm-footer { background: var(--vm-deep); color: rgba(255, 255, 255, 0.72); padding: 2.75rem 0 1.5rem; margin-top: 2rem; font-size: 0.9rem; }
.vm-footer a { color: rgba(255, 255, 255, 0.78); text-decoration: none; }
.vm-footer a:hover { color: #fff; }
.vm-footer__top { display: grid; gap: 2rem; }
@media (min-width: 900px) { .vm-footer__top { grid-template-columns: 1.4fr repeat(3, 1fr); } }
.vm-footer__brand img { height: 2.5rem; width: auto; background: #fff; padding: 0.35rem 0.6rem; border-radius: var(--vm-radius); }
.vm-footer__tagline { margin-top: 0.85rem; max-width: 22rem; }
.vm-footer h3 { color: #fff; font-size: 0.95rem; margin-bottom: 0.75rem; }
.vm-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.vm-footer__email { color: var(--vm-amber) !important; font-weight: 600; }
.vm-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 2rem; padding-top: 1.25rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); }
.vm-footer__bottom p { margin: 0 0 0.35rem; }

/* ---- Small screens: get to the first action quickly ------------------------------------- */
@media (max-width: 599px) {
  h1 { font-size: 1.85rem; }
  .vm-hero { padding: 1.25rem 0 1.5rem; }
  .vm-hero .vm-eyebrow { margin-bottom: 0.6rem; }
  .vm-hero__lede { display: none; } /* its message repeats in the notice and on every card */
  .vm-notice { padding: 0.8rem 0.9rem; font-size: 0.9rem; margin-top: 0.9rem; }
  .vm-section { padding: 1.5rem 0; }
  .vm-section__head { margin-bottom: 0.9rem; }
}
