:root {
  --night-950: #0f1430;
  --night-900: #171e42;
  --night-800: #222b5a;
  --night-700: #303c7a;
  --night-600: #4352a0;
  --night-100: #e1e5f5;
  --night-50: #f2f4fb;
  --gold-300: #ffd27a;
  --gold-400: #f8b93a;
  --gold-500: #e99b12;
  --coral-500: #c94425;
  --coral-600: #ad381d;
  --cream: #fbf8f2;
  --ink: #1b2036;
  --ink-soft: #545a72;
  --line: #e7e2d8;
  --radius: 18px;
  --radius-sm: 12px;
  --tip: 34px;
  --shadow: 0 10px 30px -12px rgba(23, 30, 66, 0.28);
  --shadow-lg: 0 24px 60px -20px rgba(23, 30, 66, 0.4);
  --font-sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: var(--night-600); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; margin: 0 0 0.5em; color: var(--night-900); }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.28rem; font-weight: 700; letter-spacing: -0.01em; }
h1, h2, h3 { text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
li { text-wrap: pretty; }

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 40px); }
.nowrap { white-space: nowrap; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--gold-400); --fg: var(--night-900);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0.8em 1.4em; border-radius: 999px; border: 2px solid transparent;
  background: var(--bg); color: var(--fg);
  font: 700 1rem/1.2 var(--font-sans); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:focus-visible { outline: 3px solid var(--night-600); outline-offset: 3px; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }
.btn-primary:hover { --bg: var(--gold-300); }
.btn-alert { --bg: var(--coral-500); --fg: #fff; }
.btn-alert:hover { --bg: var(--coral-600); }
.btn-light { --bg: #fff; --fg: var(--night-900); }
.btn-ghost { --bg: transparent; --fg: var(--night-800); border-color: var(--night-800); }
.btn-ghost:hover { --bg: var(--night-50); }
.btn-lg { font-size: 1.08rem; padding: 0.95em 1.7em; }
.btn-small { font-size: 0.92rem; padding: 0.55em 1.05em; }
.btn-block { width: 100%; }
.section-dark .btn:focus-visible,
.hero .btn:focus-visible { outline-color: var(--gold-300); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(251, 248, 242, 0.9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0, 0, 0, 0.3); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: none; }
.brand-name { font: 800 1.32rem/1 var(--font-display); letter-spacing: -0.02em; color: var(--night-900); white-space: nowrap; }
.brand-sub { font-weight: 600; color: var(--night-600); }
.site-nav { display: flex; align-items: center; gap: 20px; }
.site-nav > a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.97rem; white-space: nowrap; }
.site-nav > a:not(.btn):hover { color: var(--night-600); }
.site-nav .btn { white-space: nowrap; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px; border-radius: 10px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(84vh, 760px);
  display: flex; align-items: flex-end; overflow: hidden; isolation: isolate;
  background: var(--night-950);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%; z-index: -2; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 16, 40, 0.86) 0%, rgba(12, 16, 40, 0.6) 36%, rgba(12, 16, 40, 0) 62%),
    linear-gradient(0deg, rgba(12, 16, 40, 0.7) 0%, rgba(12, 16, 40, 0) 48%);
}
.hero-content { padding: 120px 0 150px; color: #fff; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero-lead { font-size: clamp(1.08rem, 1.8vw, 1.28rem); max-width: 38ch; color: rgba(255, 255, 255, 0.92); }
.hero-lead strong { color: var(--gold-300); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }


/* ---------- Pillars ---------- */
.pillars { position: relative; z-index: 2; margin-top: -84px; }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pillar {
  display: grid; gap: 6px; align-content: start; padding: 26px 26px 28px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg);
  color: var(--ink); text-decoration: none;
  transition: transform 0.2s ease;
}
.pillar:hover { transform: translateY(-4px); }
.pillar:focus-visible { outline: 3px solid var(--night-600); outline-offset: 3px; }
.pillar .icon { width: 46px; height: 46px; padding: 10px; border-radius: 12px; background: #fff1cf; color: var(--night-800); margin-bottom: 8px; }
.pillar-title { font: 700 1.25rem/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--night-900); }
.pillar-text { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 9vw, 120px) 0; }
.section-tint { background: var(--night-50); }
.section-dark { background: var(--night-900); color: rgba(255, 255, 255, 0.9); }
.section-dark h2 { color: #fff; }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 52px; }
.section-head p:last-child { color: var(--ink-soft); font-size: 1.08rem; margin-bottom: 0; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.split-form { align-items: start; }
.split-media { margin: 0; }
.split-media img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.split-copy > p { color: var(--ink-soft); }
.split-copy > .list-label { color: var(--ink); font-weight: 600; margin: 22px 0 0; }
.split-copy > .list-label + .checks { margin-top: 12px; }
.section-dark .split-copy > p { color: rgba(255, 255, 255, 0.82); }

/* The clipped corner echoes the ear-tip that marks a sterilized community cat. */
.tipped { filter: drop-shadow(0 18px 26px rgba(23, 30, 66, 0.26)); }
.tipped img {
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% var(--tip), 100% 100%, 0 100%);
}
.section-dark .tipped { filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.4)); }

.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--night-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23303c7a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.inline-photo { margin: 30px 0 0; }
.inline-photo img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }

.note {
  margin: 26px 0 0; padding: 16px 18px; border-radius: var(--radius-sm);
  background: #fff6e2; border: 1px solid #f3deaa; color: var(--ink); font-size: 0.97rem;
}
.note a { color: var(--night-800); font-weight: 600; }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step {
  position: relative; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); padding-bottom: 24px;
}
.step figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.step figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.step:hover figure img { transform: scale(1.05); }
.step-num {
  position: absolute; top: 14px; left: 14px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-400); color: var(--night-900);
  font: 800 1.1rem/1 var(--font-display); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}
.step h3 { margin: 20px 22px 8px; font-size: 1.4rem; }
.step p { margin: 0 22px; color: var(--ink-soft); font-size: 0.97rem; }

/* ---------- Forms ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.section-dark .card { box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55); }
.form { padding: clamp(24px, 3.5vw, 40px); display: grid; gap: 16px; color: var(--ink); }
.form h3 { margin-bottom: 4px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: end; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.93rem; color: var(--ink); }
.form .optional { font-weight: 400; color: var(--ink-soft); }
.form input,
.form select,
.form textarea {
  width: 100%; min-width: 0; font: 400 1rem/1.4 var(--font-sans); color: var(--ink);
  padding: 0.75em 0.9em; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fcfbf8; transition: border-color 0.15s, box-shadow 0.15s;
}
.form textarea { resize: vertical; }
.form ::placeholder { color: #6b7086; }
.form input:focus,
.form select:focus,
.form textarea:focus { outline: none; border-color: var(--night-600); box-shadow: 0 0 0 4px rgba(67, 82, 160, 0.18); background: #fff; }
.form .invalid { border-color: var(--coral-500); box-shadow: 0 0 0 4px rgba(201, 68, 37, 0.14); }
.form label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; }
.form label.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--night-700); flex: none; padding: 0; }
.form-status { margin: 0; font-weight: 600; font-size: 0.95rem; }
.form-status:empty { margin-top: -16px; }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status.ok { color: #1f7a4d; }
.form-status.err { color: var(--coral-600); }

/* ---------- Lost cat ---------- */
.tips { counter-reset: tip; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tips li { counter-increment: tip; position: relative; padding-left: 44px; color: rgba(255, 255, 255, 0.85); }
.tips li strong { color: #fff; }
.tips a { color: var(--gold-300); }
.tips a:hover { color: #fff; }
.tips li::before {
  content: counter(tip); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-400); color: var(--night-900); font-weight: 800; font-size: 0.9rem;
}
.stack { display: grid; gap: 20px; }
.found {
  padding: 24px 26px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.16);
}
.found h3 { color: #fff; font-size: 1.15rem; margin-bottom: 8px; }
.found p { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 0.98rem; }
.found a { color: var(--gold-300); }

/* ---------- Cat care ---------- */
.care { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.care-photos { display: grid; gap: 22px; }
.care-photos figure { margin: 0; }
.care-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.care-photos figure:nth-child(2) { width: 82%; margin-left: auto; margin-top: -70px; }
.care-photos figure:nth-child(2) img { clip-path: none; border: 6px solid var(--cream); border-radius: calc(var(--radius) + 4px); }
.care-list { counter-reset: care; list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.care-list li {
  counter-increment: care; position: relative; padding: 20px 0 20px 64px;
  border-bottom: 1px solid var(--line);
}
.care-list li:last-child { border-bottom: 0; }
.care-list li::before {
  content: counter(care); position: absolute; left: 0; top: 18px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: var(--night-100); color: var(--night-800);
  font: 800 1.2rem/1 var(--font-display);
}
.care-list h3 { margin-bottom: 4px; font-size: 1.2rem; }
.care-list p { margin: 0; color: var(--ink-soft); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 240px; grid-auto-flow: dense; gap: 16px; }
.g-item {
  padding: 0; border: 0; cursor: zoom-in; border-radius: var(--radius); overflow: hidden;
  background: var(--night-100); box-shadow: var(--shadow);
}
.g-item:focus-visible { outline: 3px solid var(--night-600); outline-offset: 3px; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.g-item:hover img { transform: scale(1.06); }
.g-tall { grid-row: span 2; }
.g-wide { grid-column: span 2; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(10, 13, 32, 0.93);
  display: grid; place-items: center; padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1400px, 100%); max-height: 88vh; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

/* ---------- Support ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.tier { position: relative; padding: 34px 28px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tier p { color: var(--ink-soft); flex: 1; }
.icon-lg {
  width: 56px; height: 56px; padding: 14px; margin-bottom: 16px; border-radius: 50%;
  background: var(--night-50); color: var(--night-700);
}
.tier-featured { outline: 3px solid var(--gold-400); transform: translateY(-8px); }
.tier-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--night-900); color: var(--gold-300); padding: 5px 14px; border-radius: 999px;
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.04em; white-space: nowrap;
}
.volunteer { margin-top: 32px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.volunteer h3 { margin-bottom: 6px; }
.volunteer p { margin: 0; color: var(--ink-soft); }
.volunteer .btn { flex: none; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: #fff; border-radius: var(--radius-sm); box-shadow: 0 4px 16px -10px rgba(23, 30, 66, 0.25); border: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 24px; position: relative;
  font-weight: 600; font-size: 1.05rem; color: var(--night-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 3px solid var(--night-600); outline-offset: 2px; border-radius: var(--radius-sm); }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--night-600); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.contact > div > p { color: var(--ink-soft); }
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; font-weight: 500; }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.contact-list .icon { color: var(--night-600); }

/* ---------- Footer ---------- */
.site-footer { background: var(--night-950); color: rgba(255, 255, 255, 0.75); padding: 56px 0 26px; font-size: 0.95rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-inner > div { max-width: 460px; }
.footer-brand { font: 800 1.5rem/1 var(--font-display); letter-spacing: -0.02em; color: #fff; margin-bottom: 12px; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; align-content: start; }
.site-footer nav a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold-400); }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.12); margin-top: 36px; padding-top: 20px; font-size: 0.87rem; }
.footer-legal p { margin: 0; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
.tier-featured.reveal.in { transform: translateY(-8px); }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .pillar, .step figure img, .g-item img { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 16px 20px 24px;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all 0.2s ease;
  }
  .site-nav.open { transform: none; opacity: 1; visibility: visible; }
  .site-nav > a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 8px; }
}

@media (max-width: 900px) {
  .split, .contact, .care { grid-template-columns: 1fr; }
  .split-media { order: -1; }
  .care-photos { grid-template-columns: 1fr 1fr; gap: 14px; }
  .care-photos figure:nth-child(2) { width: 100%; margin: 0; }
  .tiers { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .tier-featured, .tier-featured.reveal.in { transform: none; }
  .volunteer { flex-direction: column; align-items: flex-start; }
  .pillars-grid { grid-template-columns: 1fr; gap: 12px; }
  .pillars { margin-top: -48px; }
  .hero-content { padding-bottom: 96px; }
  .pillar { grid-template-columns: auto 1fr; column-gap: 16px; padding: 20px 22px; }
  .pillar .icon { grid-row: span 2; margin: 2px 0 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  :root { --tip: 24px; }
  /* On phones the photo sits above the text so the cat and volunteer stay visible. */
  .hero { display: block; min-height: 0; }
  .hero-bg { position: relative; inset: auto; z-index: 0; height: 300px; object-position: 92% 50%; }
  .hero-shade { inset: 0 0 auto 0; height: 300px; z-index: 1; background: linear-gradient(0deg, var(--night-950) 0%, rgba(15, 20, 48, 0) 50%); }
  .hero-content { position: relative; z-index: 2; margin-top: -36px; padding: 0 0 88px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brand-name { font-size: 1.16rem; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; gap: 10px; }
  .g-wide { grid-column: span 2; }
  .care-list li { padding-left: 56px; }
  .care-list li::before { width: 40px; height: 40px; }
}
