/* ==========================================================
   EpiVet Chronicles · Learn
   Brand charter: Fraunces (headings), Source Sans 3 (text),
   magenta action, purple authority, blue insight, navy depth.
   ========================================================== */
:root {
  --magenta: #D4146E;
  --magenta-dark: #B80F5D;
  --purple: #4B1E8C;
  --blue: #2F5FD0;
  --link: #2552BD;
  --navy: #1B1F5E;
  --pink: #F06BA8;
  --ink: #2A2540;
  --mist: #6B6680;
  --pearl: #E6E2EE;
  --lavender: #F3EEFA;
  --paper: #FBF9FC;
  --gradient: linear-gradient(90deg, #D4146E, #4B1E8C 55%, #2F5FD0);
  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-text: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 4px 16px rgba(75, 30, 140, .07);
  --shadow-lg: 0 14px 36px rgba(75, 30, 140, .13);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: 18px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
::selection { background: #F6D9E8; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; color: var(--purple); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 16px; }
h1 { font-size: 44px; }
h2 { font-size: 34px; }
h3 { font-size: 23px; }
p { margin: 0 0 20px; }
main p, main li { text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
.lead { font-size: 21px; line-height: 1.6; }
.muted { color: var(--mist); }
.small { font-size: 15px; line-height: 1.5; }
.eyebrow { display: block; margin: 0 0 12px; font-size: 13px; font-weight: 700; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; color: var(--magenta-dark); text-align: left !important; }
.grad-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.sr-only { 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: -9999px; top: 8px; background: var(--purple); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: saturate(1.5) blur(10px); backdrop-filter: saturate(1.5) blur(10px); border-bottom: 1px solid var(--pearl); }
.site-header::before { content: ''; display: block; height: 4px; background: var(--gradient); }
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.brand-tag { padding: 4px 12px; border-radius: 999px; background: var(--lavender); color: var(--purple); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 16px; font-weight: 600; color: var(--purple); text-decoration: none; transition: background-color .15s ease; }
.site-nav a:hover { background: var(--lavender); }
.site-nav a[aria-current="page"] { color: var(--magenta-dark); }
.site-nav a[aria-current="page"]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--magenta); }
.site-nav .nav-cta { margin-left: 8px; background: var(--magenta); color: #fff; }
.site-nav .nav-cta:hover { background: var(--magenta-dark); }
.site-nav .nav-cta[aria-current="page"]::after { display: none; }
.site-nav .nav-cta[aria-current="page"] { color: #fff; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 2px solid var(--magenta); background: var(--magenta); color: #fff; font-family: var(--font-text); font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn:hover { background: var(--magenta-dark); border-color: var(--magenta-dark); color: #fff; text-decoration: none; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-secondary { background: transparent; color: var(--purple); border-color: var(--purple); }
.btn-secondary:hover { background: var(--lavender); border-color: var(--purple); color: var(--purple); }
.btn-light { background: #fff; border-color: #fff; color: var(--purple); }
.btn-light:hover { background: var(--lavender); border-color: var(--lavender); color: var(--purple); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--link); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 14px; border-radius: 999px; background: var(--lavender); color: var(--purple); font-size: 14px; font-weight: 700; line-height: 1.2; }
.chip-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 80px 0 88px; background: radial-gradient(circle at 90% 8%, rgba(240, 107, 168, .16), transparent 40%), radial-gradient(circle at 0% 100%, rgba(47, 95, 208, .09), transparent 42%), linear-gradient(135deg, #fff 0%, var(--lavender) 100%); border-bottom: 1px solid var(--pearl); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 56px; align-items: center; }
.hero h1 { font-size: 54px; line-height: 1.1; letter-spacing: -.025em; margin: 0 0 24px; }
.hero h1 .grad-text { display: block; }
.hero .lead { max-width: 620px; margin: 0; }
.hero-art svg { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.hero-sign { display: flex; align-items: center; gap: 12px; margin: 36px 0 0; font-size: 15px; line-height: 1.4; color: var(--mist); }
.hero-sign strong { display: block; color: var(--ink); font-weight: 600; font-size: 16px; }
.hero-sign a { color: inherit; text-decoration: none; }
.page-hero { padding: 64px 0 56px; background: radial-gradient(circle at 95% 0%, rgba(240, 107, 168, .14), transparent 45%), linear-gradient(135deg, #fff, var(--lavender)); border-bottom: 1px solid var(--pearl); }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { max-width: 720px; margin: 0; }

.avatar { flex: none; display: block; width: 48px; height: 48px; border-radius: 50%; padding: 2px; background: var(--gradient); }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 22%; border: 2px solid #fff; }

/* ---------- Bands ---------- */
.band { padding: 88px 0; }
.band--white { background: #fff; }
.band--lavender { background: var(--lavender); }
.band--purple { position: relative; background: var(--purple); color: #fff; }
.band--purple h2, .band--purple h3 { color: #fff; }
.band--purple .lead, .band--purple p { color: #F3EEFA; }
.band--purple a:not(.btn) { color: #fff; }
.band--purple :focus-visible { outline-color: #fff; }
.section-head { max-width: 720px; margin: 0 0 40px; }
.section-head h2 { margin-bottom: 12px; }
.section-head .lead { margin: 0; color: var(--mist); }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.section-head--row h2 { margin: 0; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--pearl); border-radius: var(--radius-lg); padding: 30px 28px 26px; box-shadow: var(--shadow); overflow: hidden; }
.card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gradient); }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 17px; line-height: 1.6; }
.card p:last-child { margin-bottom: 0; }
.card .card-foot { margin-top: auto; padding-top: 16px; }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 14px; background: var(--lavender); color: var(--purple); }
.icon-tile svg { width: 28px; height: 28px; }

.course-card { padding: 36px 34px 32px; box-shadow: var(--shadow-lg); }
.course-card::before { height: 6px; }
.course-card h3 { font-size: 28px; line-height: 1.25; }
.course-meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 22px; padding: 14px 0; border-top: 1px solid var(--pearl); border-bottom: 1px solid var(--pearl); font-size: 15px; color: var(--mist); }
.course-meta li { margin: 0; text-align: left; }
.course-meta strong { color: var(--ink); font-weight: 600; }

/* Articles from the blog */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.post-card { position: relative; }
.post-card h3 { font-size: 22px; line-height: 1.3; }
.post-card h3 a { color: var(--purple); text-decoration: none; }
.post-card h3 a::after { content: ''; position: absolute; inset: 0; }
.post-card h3 a:hover { text-decoration: underline; }
.post-card .excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.post-card .card-foot { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--pearl); font-size: 14px; color: var(--mist); }
.post-card .read { font-weight: 600; color: var(--link); }
.skeleton { min-height: 260px; background: linear-gradient(100deg, #fff 30%, var(--lavender) 50%, #fff 70%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Quote */
.quote { margin: 0; padding: 26px 30px; background: #fff; border-left: 6px solid var(--magenta); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; box-shadow: var(--shadow); font-family: var(--font-head); font-size: 24px; line-height: 1.45; color: var(--purple); }
.quote p { margin: 0; text-align: left; }
.quote footer { margin-top: 14px; font-family: var(--font-text); font-size: 16px; color: var(--mist); }
.note { padding: 20px 24px; background: var(--lavender); border-left: 4px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0; }
.note > :last-child { margin-bottom: 0; }

/* Lists */
.check-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.check-list li { position: relative; margin: 0; padding-left: 36px; }
.check-list li::before { content: ''; position: absolute; left: 0; top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--lavender) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B1E8C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* Founder */
.founder-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: center; }
.founder-photo { position: relative; width: 220px; margin: 0 auto; }
.founder-photo::before { content: ''; position: absolute; inset: 14px -14px -14px 14px; border-radius: 20px; background: var(--gradient); opacity: .9; }
.founder-photo img { position: relative; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; border-radius: 20px; border: 4px solid #fff; box-shadow: var(--shadow-lg); }

/* ---------- Forms ---------- */
.signup { display: grid; gap: 14px; max-width: 560px; }
.signup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; text-align: left; }
.field input { min-height: 50px; padding: 0 18px; border: 1px solid #80798E; border-radius: 999px; background: #fff; color: var(--ink); font-family: var(--font-text); font-size: 17px; }
.field input::placeholder { color: var(--mist); }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.5; text-align: left; }
.consent input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--magenta); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: 0; padding: 14px 18px; border-radius: var(--radius); font-size: 16px; line-height: 1.5; text-align: left; }
.form-msg.ok { background: #E9F6EE; color: #17552F; }
.form-msg.err { background: #FCE4EF; color: #8E0B47; }
.band--purple .field label, .band--purple .consent { color: #fff; }
.band--purple .field input { border-color: #fff; }
.band--purple .consent a { color: #fff; }
.signup-card { padding: 36px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }

/* ---------- Prose pages ---------- */
.prose { padding: 56px 0 88px; }
.prose h2 { font-size: 28px; margin-top: 44px; }
.prose ul { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--magenta); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #D9D5E8; font-size: 16px; }
.site-footer::before { content: ''; display: block; height: 4px; background: var(--gradient); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; padding-top: 64px; padding-bottom: 48px; }
.footer-logo img { height: 52px; width: auto; }
.footer-brand p { max-width: 360px; margin: 16px 0 0; line-height: 1.6; text-align: left; }
.footer-tagline { font-family: var(--font-head); font-size: 19px; color: #fff; }
.site-footer h2 { margin: 0 0 14px; font-family: var(--font-text); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0; text-align: left; }
.site-footer a { color: #D9D5E8; text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 14px; color: #B4AEC8; }
.footer-bottom p { margin: 0; text-align: left; }
.footer-bottom a { color: #B4AEC8; min-height: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 46px; }
}
@media (max-width: 880px) {
  .js .nav-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--purple); background: transparent; color: var(--purple); font-family: var(--font-text); font-size: 16px; font-weight: 600; cursor: pointer; }
  .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
  .nav-toggle .bars { position: relative; }
  .nav-toggle .bars::before, .nav-toggle .bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle .bars::before { top: -6px; }
  .nav-toggle .bars::after { top: 6px; }
  .js .site-nav { display: none; position: absolute; left: -24px; right: -24px; top: 100%; padding: 8px 24px 20px; background: #fff; border-bottom: 1px solid var(--pearl); box-shadow: var(--shadow-lg); }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { display: flex; width: 100%; min-height: 52px; padding: 0 4px; border-radius: 0; border-bottom: 1px solid var(--pearl); }
  .site-nav a[aria-current="page"]::after { display: none; }
  .site-nav .nav-cta { margin: 14px 0 0; justify-content: center; border-radius: 999px; border: 0; }
  .hero-grid, .founder-grid, .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 320px; margin: 0 auto; }
  .founder-photo { width: 180px; margin: 0; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  h1 { font-size: 34px; }
  h2 { font-size: 27px; }
  .lead { font-size: 19px; }
  .wrap { padding: 0 20px; }
  .brand img { height: 40px; }
  .brand-tag { display: none; }
  .hero { padding: 48px 0 64px; }
  .hero h1 { font-size: 36px; }
  .page-hero { padding: 44px 0 40px; }
  .band { padding: 64px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .course-card, .signup-card { padding: 28px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.signup .actions { margin: 4px 0 0; }
.band--purple .eyebrow { color: #F6D9E8; }
.h3-size { font-size: 26px; line-height: 1.25; }
.eyebrow a { color: inherit; }
