:root {
  --forest: #173527;
  --forest-2: #254f39;
  --leaf: #78ad68;
  --cream: #f7f5ef;
  --paper: #fff;
  --ink: #1b2a24;
  --muted: #65746d;
  --line: rgba(31, 65, 49, .15);
  --shadow: 0 24px 70px rgba(23, 53, 39, .13);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.55; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.adopt-header { position: sticky; z-index: 20; top: 0; max-width: 1240px; margin: 14px auto 0; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 12px 40px rgba(23,53,39,.11); backdrop-filter: blur(16px); }
.adopt-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.adopt-brand img { width: 48px; height: 48px; object-fit: contain; }
.adopt-brand span { display: flex; flex-direction: column; line-height: 1.1; }
.adopt-brand small { margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.adopt-header nav { display: flex; gap: 18px; padding-right: 12px; }
.adopt-header nav a { color: var(--forest-2); font-size: 14px; font-weight: 800; text-decoration: none; }
.public-messages { max-width: 1160px; margin: 20px auto 0; padding: 0 24px; }
.public-messages p { padding: 14px 18px; border: 1px solid #e5d6a6; border-radius: 16px; color: #5d470c; background: #fff8df; font-weight: 750; }

.adopt-hero { min-height: 510px; margin-top: -76px; padding: 185px max(24px, calc((100vw - 1160px)/2)) 90px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background: radial-gradient(circle at 80% 20%, rgba(102,174,218,.27), transparent 25rem), radial-gradient(circle at 14% 70%, rgba(120,173,104,.4), transparent 26rem), var(--forest); }
.eyebrow { margin: 0 0 10px; color: var(--leaf); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.adopt-hero h1, .animal-detail h1, .thanks-card h1 { margin: 0; font-size: clamp(46px, 8vw, 96px); line-height: .92; letter-spacing: -.06em; }
.adopt-hero > p:last-child { max-width: 760px; margin: 24px 0 0; color: rgba(255,255,255,.8); font-size: clamp(18px, 2vw, 24px); }

.adopt-section, .species-section { max-width: 1180px; margin: 0 auto; padding: 80px 24px; }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: 30px; }
.section-heading h2, .species-section h2 { margin: 0; color: var(--forest); font-size: clamp(34px, 5vw, 60px); line-height: 1; letter-spacing: -.045em; }
.section-heading > p { color: var(--muted); }
.animal-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.animal-tile { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: 0 15px 45px rgba(23,53,39,.08); }
.animal-photo { position: relative; min-height: 250px; display: block; background: #dfeade; }
.animal-photo img { width: 100%; height: 270px; object-fit: cover; }
.status-pill { position: absolute; top: 14px; left: 14px; padding: 8px 12px; border-radius: 999px; color: #fff; background: var(--forest); font-size: 12px; font-weight: 900; }
.animal-copy { padding: 22px; }
.animal-kind { margin: 0; color: var(--leaf); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.animal-copy h3 { margin: 7px 0 8px; color: var(--forest); font-size: 29px; letter-spacing: -.035em; }
.animal-copy > p:not(.animal-kind) { min-height: 70px; color: var(--muted); }
.funding-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.funding-row strong { color: var(--forest); }
.funding-row span { color: var(--muted); font-size: 13px; font-weight: 700; }
.progress { height: 10px; margin: 10px 0 20px; overflow: hidden; border-radius: 999px; background: #e9eee7; }
.progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--leaf), #4b8d65); }
.adopt-button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 12px 20px; border: 0; border-radius: 999px; color: #fff; background: var(--forest-2); font: inherit; font-weight: 900; text-decoration: none; cursor: pointer; }
.empty-state { padding: 60px; border: 1px dashed var(--line); border-radius: 28px; text-align: center; background: #fff; }

.animal-detail { max-width: 1260px; margin: 0 auto; padding: 70px 24px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: start; }
.detail-photo { position: sticky; top: 110px; overflow: hidden; min-height: 600px; border-radius: 36px; background: #dfeade; box-shadow: var(--shadow); }
.detail-photo img { width: 100%; height: 680px; object-fit: cover; }
.detail-copy { padding-top: 15px; }
.detail-copy h1 { color: var(--forest); }
.back-link { display: inline-block; margin-bottom: 40px; color: var(--muted); font-weight: 800; text-decoration: none; }
.scientific-name { color: var(--muted); }
.lead { color: #3f5148; font-size: 19px; }
.care-box, .funding-card { margin-top: 28px; padding: 25px; border: 1px solid var(--line); border-radius: 26px; background: #fff; box-shadow: 0 12px 38px rgba(23,53,39,.07); }
.care-box > span { color: var(--leaf); font-size: 12px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.care-box h2 { margin: 7px 0; color: var(--forest); }
.care-box small, .support-form small { display: block; color: var(--muted); }
.support-form { margin-top: 22px; }
.support-form fieldset { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; border: 0; }
.support-form legend { width: 100%; margin-bottom: 8px; font-weight: 900; }
.support-form fieldset label { padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; font-weight: 750; }
.amount-label { display: grid; gap: 7px; margin: 18px 0; font-weight: 900; }
.amount-label input { width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; font: inherit; }
.support-form .adopt-button { width: 100%; margin-bottom: 12px; }
.closed-note { padding: 16px; border-radius: 15px; background: #eef4eb; }
.species-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: 60px; border-top: 1px solid var(--line); }
.species-copy > p:first-child { white-space: pre-line; font-size: 18px; }
.species-copy a { color: var(--forest-2); font-weight: 750; }
.source-note { padding: 14px 16px; border-radius: 14px; color: var(--muted); background: #eef4eb; font-size: 13px; }
.thanks-card { max-width: 760px; margin: 90px auto; padding: 70px 30px; text-align: center; }
.thanks-card > span { display: block; color: var(--leaf); font-size: 70px; }
.thanks-card h1 { color: var(--forest); }
.thanks-card p:not(.eyebrow) { max-width: 620px; margin: 24px auto; color: var(--muted); font-size: 18px; }
.adopt-footer { margin-top: 50px; padding: 34px max(24px, calc((100vw - 1160px)/2)); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; }

@media (max-width: 900px) {
  .adopt-header { margin: 8px; border-radius: 25px; }
  .adopt-header nav a:first-child { display: none; }
  .adopt-brand small { display: none; }
  .adopt-hero { margin-top: -90px; padding-top: 190px; }
  .section-heading, .species-section, .animal-detail { grid-template-columns: 1fr; }
  .animal-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-photo { position: static; min-height: 0; }
  .detail-photo img { height: min(600px, 80vh); }
}

@media (max-width: 600px) {
  .adopt-header nav { display: none; }
  .animal-catalog { grid-template-columns: 1fr; }
  .adopt-section, .species-section, .animal-detail { padding-left: 17px; padding-right: 17px; }
  .animal-detail { gap: 28px; }
  .detail-photo img { height: 480px; }
  .adopt-footer { flex-direction: column; }
}
