:root {
  --paper: #F7F1E5;
  --paper-2: #EFE6D3;
  --ink: #26221B;
  --ink-soft: #5B5345;
  --terra: #D2663A;
  --terra-dark: #B54F28;
  --moss: #4A6741;
  --moss-dark: #35502E;
  --mustard: #E2A72E;
  --sky: #AFC8C0;
  --line: rgba(38, 34, 27, 0.14);
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;
  --max: 1240px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.nav-open { overflow: hidden; }

::selection { background: var(--terra); color: #fff; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- texture & cursor ---------- */
.noise {
  position: fixed; inset: 0; z-index: 2000; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor {
  position: fixed; top: 0; left: 0; z-index: 3000; pointer-events: none;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--terra); transform: translate(-50%, -50%);
  transition: width .25s, height .25s, background .25s, opacity .25s;
  opacity: 0;
}
.cursor.is-active { width: 60px; height: 60px; background: rgba(210,102,58,.12); }
@media (hover: none), (max-width: 900px) { .cursor { display: none; } }

/* ---------- reveal (контент виден и без JS) ---------- */
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal { opacity: 0; transform: translateY(34px); }
.reveal.in-view, .js .reveal.in-view { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; letter-spacing: .01em;
  padding: 14px 26px; border-radius: 999px; border: 2px solid var(--ink);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s;
  position: relative;
}
.btn--primary { background: var(--terra); color: #fff; border-color: var(--terra); }
.btn--primary:hover { background: var(--terra-dark); border-color: var(--terra-dark); transform: translateY(-3px) rotate(-1deg); box-shadow: 6px 8px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-3px) rotate(1deg); }
.btn--nav { padding: 11px 22px; font-size: 14px; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--nav:hover { background: var(--terra); border-color: var(--terra); color: #fff; transform: translateY(-2px); }

/* ---------- header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 48px);
  transition: background .4s, box-shadow .4s, padding .4s;
}
.site-header.scrolled {
  background: rgba(247, 241, 229, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px clamp(18px, 4vw, 48px);
}
.logo { display: flex; align-items: center; gap: 11px; }
.logo__mark { width: 42px; height: 42px; color: var(--terra); flex: none; }
.logo__text { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.05; letter-spacing: -.01em; }

.nav { display: flex; gap: 30px; }
.nav a { font-weight: 600; font-size: 15px; position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -5px; height: 3px; width: 0;
  background: var(--terra); border-radius: 2px; transition: width .3s var(--ease);
}
.nav a:hover::after { width: 100%; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 6px; }
.burger span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 150px clamp(18px, 4vw, 48px) 0; }
.hero__inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
}
.eyebrow {
  font-family: var(--font-hand); font-size: 22px; color: var(--terra);
  transform: rotate(-1deg); margin-bottom: 18px;
}
.hero__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 6vw, 78px); line-height: 1.02; letter-spacing: -.02em;
}
.hero__title .hero__line2 { display: block; }
.scribble { position: relative; font-style: normal; white-space: nowrap; }
.scribble svg {
  position: absolute; left: -2%; bottom: -0.18em; width: 104%; height: .32em;
  stroke: var(--mustard); stroke-width: 5; fill: none; stroke-linecap: round;
}
.hero__word { color: var(--terra); display: inline-block; }
.scribble #swapVerb { display: inline-block; }

.hero__lead { margin: 26px 0 30px; max-width: 46ch; font-size: 18px; color: var(--ink-soft); }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__note {
  margin-top: 34px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  font-family: var(--font-hand); font-size: 22px; color: var(--ink-soft);
}
.hero__note strong { font-family: var(--font-display); font-size: 34px; color: var(--ink); font-weight: 800; }

.hero__visual { position: relative; height: 460px; }
.polaroid {
  position: absolute; background: #fff; padding: 12px 12px 14px;
  box-shadow: 0 20px 50px rgba(38,34,27,.16); border-radius: 6px;
  transform: rotate(-7deg);
}
.polaroid img { width: 100%; border-radius: 3px; }
.polaroid figcaption {
  font-family: var(--font-hand); font-size: 20px; margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.polaroid .like { background: none; border: none; font-size: 22px; color: var(--terra); transition: transform .3s; }
.polaroid .like:hover { transform: scale(1.3); }
.polaroid--1 { width: 260px; top: 0; left: 6%; animation: float 6s ease-in-out infinite; }
.polaroid--2 { width: 210px; bottom: 0; right: 4%; transform: rotate(8deg); animation: float 7s ease-in-out infinite reverse; }

.hero__paws { position: absolute; top: 46%; left: 38%; width: 180px; height: 180px; z-index: -1; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(var(--r, -7deg)); } 50% { transform: translateY(-16px) rotate(var(--r, -7deg)); } }
.polaroid--1 { --r: -7deg; }
.polaroid--2 { --r: 8deg; }

/* ---------- marquee ---------- */
.marquee { margin: 70px calc(-1 * clamp(18px, 4vw, 48px)) 0; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; background: var(--mustard); }
.marquee__track { display: flex; align-items: center; padding: 14px 0; white-space: nowrap; width: max-content; will-change: transform; animation: marquee 30s linear infinite; }
.marquee__group { display: flex; align-items: center; flex: none; }
.marquee__group > * { padding-right: 28px; }
.marquee__track span { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: .02em; }
.marquee__track i { font-style: normal; color: var(--terra); font-size: 20px; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 110px clamp(18px, 4vw, 48px); }
.section__head {
  max-width: var(--max); margin: 0 auto 50px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px;
}
.section__num {
  font-family: var(--font-hand); font-size: 26px; color: var(--terra);
  display: block; margin-bottom: 8px;
}
.section__title {
  font-family: var(--font-display); font-weight: 800; line-height: 1.05;
  font-size: clamp(32px, 4.6vw, 56px); letter-spacing: -.02em;
}
.accent { color: var(--terra); }
.section__sub { max-width: 42ch; font-size: 17px; color: var(--ink-soft); }

/* ---------- pets ---------- */
.filters { max-width: var(--max); margin: 0 auto 34px; display: flex; gap: 10px; }
.chip {
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font-weight: 700; font-size: 14px; padding: 9px 20px; border-radius: 999px;
  transition: all .3s var(--ease);
}
.chip:hover { transform: translateY(-2px); }
.chip.is-active { background: var(--ink); color: var(--paper); }

.pets__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.pet-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.pet-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 24px 50px rgba(38,34,27,.16); }
.pet-card.is-hidden { display: none; }
.pet-card:not(.is-loaded) { display: none; }
.pet-card__photo { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--paper-2); }
.pet-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.pet-card:hover .pet-card__photo img { transform: scale(1.06) rotate(1.5deg); }
.stamp {
  position: absolute; top: 14px; right: -34px; transform: rotate(38deg);
  background: var(--moss); color: #fff; font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 40px; box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.stamp--hot { background: var(--terra); }
.stamp--cool { background: var(--sky); color: var(--ink); }
.pet-card__body { padding: 20px 22px 24px; }
.pet-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.pet-card__age { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.pet-card__desc { margin: 8px 0 14px; font-size: 15px; color: var(--ink-soft); }
.pet-card__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.pet-card__tags span { font-size: 12px; font-weight: 700; color: var(--moss-dark); background: #EAF0E6; border-radius: 6px; padding: 4px 9px; }
.pet-card__link { font-weight: 700; font-size: 14px; color: var(--terra); border-bottom: 2px solid transparent; transition: border-color .3s; }
.pet-card__link:hover { border-color: var(--terra); }

.pets__more { max-width: var(--max); margin: 40px auto 0; text-align: center; font-size: 17px; color: var(--ink-soft); }
.pets__more a { color: var(--terra); font-weight: 700; border-bottom: 2px solid var(--terra); }
.pets__more-row { max-width: var(--max); margin: 34px auto 0; text-align: center; }

/* ---------- help ---------- */
.help { background: var(--moss); color: var(--paper); }
.help .section__num { color: var(--mustard); }
.help .accent { color: var(--mustard); }
.help .section__sub { color: rgba(247,241,229,.8); }

.help__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.help-card {
  border: 1px solid rgba(247,241,229,.2); border-radius: var(--radius);
  padding: 28px 24px; transition: background .4s, transform .4s var(--ease);
}
.help-card:hover { background: rgba(247,241,229,.08); transform: translateY(-6px); }
.help-card__icon { font-size: 30px; color: var(--mustard); display: block; margin-bottom: 14px; }
.help-card h3 { font-family: var(--font-display); font-size: 18px; margin-bottom: 10px; }
.help-card p { font-size: 14.5px; color: rgba(247,241,229,.85); margin-bottom: 18px; }
.help-card__link { font-weight: 700; font-size: 14px; color: var(--mustard); }

.donate {
  max-width: var(--max); margin: 46px auto 0;
  background: var(--paper); color: var(--ink); border-radius: 22px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 40px 44px;
  box-shadow: 0 30px 60px rgba(0,0,0,.22);
}
.donate__counter { display: flex; flex-direction: column; }
.donate__label { font-family: var(--font-hand); font-size: 22px; color: var(--terra); }
.donate__amount { font-family: var(--font-display); font-weight: 800; font-size: clamp(40px, 5vw, 64px); line-height: 1.1; margin: 6px 0 4px; }
.donate__goal { font-size: 14px; color: var(--ink-soft); }
.donate__bar { margin-top: 18px; height: 16px; background: var(--paper-2); border-radius: 999px; border: 2px solid var(--ink); overflow: hidden; }
.donate__bar span { display: block; height: 100%; width: 0; background: var(--terra); border-radius: 999px; transition: width 1.6s var(--ease); }

.donate__info { border-left: 2px dashed var(--line); padding-left: 30px; }
.donate__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.donate__list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.donate__list li { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.donate__list span { color: var(--ink-soft); font-size: 14px; }
.donate__list b { font-weight: 700; font-size: 15px; }
.donate__hint { margin-top: 16px; font-family: var(--font-hand); font-size: 18px; color: var(--ink-soft); }

/* ---------- news ---------- */
.news__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; }
.news-card { display: block; border-top: 2px solid var(--ink); padding-top: 18px; transition: padding .4s var(--ease); }
.news-card:hover { padding-left: 12px; }
.news-card__thumb { border-radius: 14px; overflow: hidden; margin-bottom: 16px; aspect-ratio: 16/9; background: var(--paper-2); }
.news-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.news-card:hover .news-card__thumb img { transform: scale(1.05); }
.news-card__meta { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.news-card__meta time { font-family: var(--font-hand); font-size: 20px; color: var(--terra); }
.news-card__meta span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); border: 1.5px solid var(--line); padding: 2px 9px; border-radius: 999px; }
.news-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 1.2; margin-bottom: 8px; }
.news-card--feature h3 { font-size: 26px; }
.news-card p { font-size: 15px; color: var(--ink-soft); margin-bottom: 12px; }
.news-card__more { font-weight: 700; font-size: 14px; color: var(--terra); }

/* ---------- contacts ---------- */
.contacts__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.contacts__lead { font-size: 18px; max-width: 40ch; margin-bottom: 26px; }
.contacts__list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.contacts__list li { display: flex; flex-direction: column; }
.contacts__list span { font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; }
.contacts__list b, .contacts__list a { font-size: 17px; font-weight: 700; }
.contacts__list a:hover { color: var(--terra); }
.contacts__socials { display: flex; gap: 10px; flex-wrap: wrap; }
.contacts__socials a {
  border: 2px solid var(--ink); border-radius: 999px; padding: 9px 18px;
  font-weight: 700; font-size: 14px; transition: all .3s var(--ease);
}
.contacts__socials a:hover { background: var(--ink); color: var(--paper); transform: translateY(-3px); }

.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; display: flex; flex-direction: column; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
.contact-form input, .contact-form textarea {
  font-family: inherit; font-size: 15px; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 10px; background: var(--paper); transition: border-color .3s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--terra); }
.contact-form textarea { resize: vertical; }
.contact-form__ok { color: var(--moss-dark); font-weight: 700; }

.contacts__map { grid-column: 1 / -1; border-radius: 22px; overflow: hidden; border: 2px solid var(--ink); }
.contacts__map iframe { width: 100%; height: 360px; border: 0; display: block; filter: sepia(0.22) saturate(0.9); }

/* ---------- footer ---------- */
.site-footer { border-top: 2px solid var(--ink); padding: 50px clamp(18px, 4vw, 48px) 30px; }
.footer__top { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; align-items: flex-start; }
.logo--footer .logo__mark { color: var(--terra); }
.footer__top p { color: var(--ink-soft); font-size: 15px; text-align: right; }
.footer__bottom { max-width: var(--max); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--ink-soft); }
.footer__admin { font-weight: 700; color: var(--terra); }
.footer__admin:hover { text-decoration: underline; }

.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 16px; flex-basis: 100%; order: -1; margin-bottom: 14px; }
.footer__legal a { font-size: 13px; color: var(--ink-soft); text-decoration: none; }
.footer__legal a:hover { color: var(--terra); text-decoration: underline; }

/* consent checkbox in forms */
.consent {
  flex-direction: row !important; align-items: flex-start; gap: 10px !important;
  font-weight: 600 !important; font-size: 13px !important; color: var(--ink-soft);
}
.consent input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--terra); }
.consent a { color: var(--terra); text-decoration: underline; }

/* cookie banner */
.cookie-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(920px, calc(100% - 28px)); z-index: 2500;
  background: var(--ink); color: var(--paper); border-radius: 16px;
  padding: 16px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { flex: 1 1 380px; font-size: 13.5px; margin: 0; color: rgba(247, 241, 229, 0.86); }
.cookie-banner a { color: var(--mustard); text-decoration: underline; }
.cookie-banner button {
  background: var(--terra); color: #fff; border: none; font-weight: 700; font-size: 14px;
  padding: 10px 22px; border-radius: 999px; cursor: pointer; font-family: inherit;
}
.cookie-banner button:hover { background: var(--terra-dark); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { height: 380px; margin-top: 30px; }
  .help__grid { grid-template-columns: repeat(2, 1fr); }
  .news__grid { grid-template-columns: 1fr; }
  .contacts__grid { grid-template-columns: 1fr; }
  .donate { grid-template-columns: 1fr; }
  .donate__info { border-left: none; padding-left: 0; border-top: 2px dashed var(--line); padding-top: 24px; }
}

@media (max-width: 760px) {
  .nav { position: fixed; inset: 0; background: var(--paper); flex-direction: column; align-items: center; justify-content: center; gap: 30px; font-size: 22px; transform: translateY(-100%); transition: transform .5s var(--ease); }
  .nav.open { transform: translateY(0); }
  .burger { display: flex; z-index: 1001; }
  .btn--nav { display: none; }
  .pets__grid { grid-template-columns: 1fr; }
  .help__grid { grid-template-columns: 1fr; }
  .section__head { flex-direction: column; align-items: flex-start; }
  .footer__top { flex-direction: column; }
  .footer__top p { text-align: left; }
  .footer__bottom { flex-direction: column; }
}

/* ---------- refinements ---------- */
.hero__title .reveal:first-child { display: inline-block; }
.hero__visual { isolation: isolate; }

.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--terra); z-index: 1500; pointer-events: none;
}

/* watermark section numbers */
.section { position: relative; }
.section::before {
  content: attr(data-num);
  position: absolute; top: 30px; right: clamp(18px, 4vw, 48px);
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(110px, 16vw, 230px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(38, 34, 27, 0.09);
  pointer-events: none; user-select: none; z-index: 0;
}
.section > * { position: relative; z-index: 1; }

/* scalloped "torn paper" edges on the green section */
.help::before {
  content: ""; position: absolute; left: 0; right: 0; top: -27px; height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M0 28 L0 14 A14 14 0 0 1 28 14 L28 28 Z' fill='%234A6741'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 28px 28px; pointer-events: none;
}
.help::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -27px; height: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M0 0 L0 14 A14 14 0 0 0 28 14 L28 0 Z' fill='%234A6741'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 28px 28px; pointer-events: none;
}

/* stats strip */
.stats { background: var(--paper-2); border-bottom: 2px solid var(--ink); }
.stats__inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 34px clamp(18px, 4vw, 48px); display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 4vw, 54px); line-height: 1; }
.stat span { font-size: 14px; color: var(--ink-soft); line-height: 1.4; }

/* scrollspy active nav */
.nav a.is-active { color: var(--terra); }
.nav a.is-active::after { width: 100%; }

/* hand-made tilts */
.news-card:nth-child(3n) { rotate: -0.35deg; }
.news-card:nth-child(3n + 1) { rotate: 0.3deg; }
.help-card:nth-child(even) { rotate: 0.4deg; }
.help-card:nth-child(odd) { rotate: -0.35deg; }

/* hero polaroids on small screens */
@media (max-width: 760px) {
  .hero__visual { height: 330px; }
  .polaroid--1 { width: 215px; left: 0; }
  .polaroid--2 { width: 180px; right: 0; }
}
@media (max-width: 480px) {
  .hero__visual { height: 290px; }
  .polaroid--1 { width: 175px; }
  .polaroid--2 { width: 150px; }
  .stats__inner { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--line); }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* ---------- help modal ---------- */
.help-card__link {
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-weight: 700; font-size: 14px; color: var(--mustard);
  border-bottom: 2px solid transparent; transition: border-color .3s;
}
.help-card__link:hover { border-color: var(--mustard); }

.help-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 20px; }
.help-modal[hidden] { display: none; }
.help-modal__backdrop { position: absolute; inset: 0; background: rgba(38, 34, 27, 0.55); }
.help-modal__card {
  position: relative; background: var(--paper); border-radius: 22px; border: 2px solid var(--ink);
  width: min(560px, 100%); max-height: 90vh; overflow-y: auto; padding: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  animation: pop .35s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.help-modal__close {
  position: absolute; top: 14px; right: 16px; background: none; border: none;
  font-size: 30px; line-height: 1; color: var(--ink-soft); transition: color .2s;
}
.help-modal__close:hover { color: var(--terra); }
.help-modal__icon { font-size: 34px; color: var(--terra); }
.help-modal h3 { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 8px 0 4px; }
.help-modal__sub { font-size: 15px; color: var(--ink-soft); margin-bottom: 20px; }
.help-form { display: flex; flex-direction: column; gap: 14px; }
.help-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; }
.help-form input, .help-form textarea {
  font-family: inherit; font-size: 15px; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: 10px; background: #fff; transition: border-color .3s;
}
.help-form input:focus, .help-form textarea:focus { outline: none; border-color: var(--terra); }
.help-form textarea { resize: vertical; }
.help-form__ok { color: var(--moss-dark); font-weight: 700; }
.help-modal__map { margin-top: 6px; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); }
.help-modal__map iframe { width: 100%; height: 200px; border: 0; display: block; }
.help-modal__point {
  display: flex; gap: 10px; align-items: flex-start; background: var(--paper-2);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 4px;
}
.help-modal__point b { display: block; margin-bottom: 2px; }
.help-modal__point span { color: var(--ink-soft); }

/* ---------- hero polaroids (clickable) ---------- */
.polaroid { cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.polaroid:hover { box-shadow: 0 28px 60px rgba(38, 34, 27, 0.24); }
.polaroid__hint {
  position: absolute; left: 50%; bottom: 52px; transform: translate(-50%, 8px);
  background: var(--ink); color: var(--paper); font-family: var(--font-display);
  font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 6px 14px; border-radius: 999px;
  opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; white-space: nowrap;
}
.polaroid:hover .polaroid__hint { opacity: 1; transform: translate(-50%, 0); }
.polaroid__name { display: inline-block; }

.pet-card--flash { animation: flashRing 1.8s var(--ease); }
@keyframes flashRing {
  0% { box-shadow: 0 0 0 0 var(--terra); }
  30% { box-shadow: 0 0 0 6px rgba(210, 102, 58, 0.55); }
  70% { box-shadow: 0 0 0 12px rgba(210, 102, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(210, 102, 58, 0); }
}


/* ============ 2026-09 additions ============ */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.api-note { max-width: var(--max); margin: 0 auto 24px; padding: 12px 16px; background: #FBEBDD; border-left: 4px solid var(--terra); border-radius: 10px; font-size: 14px; }
.empty-note { max-width: var(--max); margin: 0 auto; padding: 30px; text-align: center; color: var(--ink-soft); }

.illus-note {
  position: absolute; left: 10px; bottom: 10px; background: rgba(38,34,27,.72); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px;
}
.pet-card__photo { position: relative; display: block; }
.pet-card__actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pet-card__meet { background: none; border: none; padding: 0; cursor: pointer; }
.like { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255,255,255,.9); border: none; width: 38px; height: 38px; border-radius: 50%; font-size: 20px; color: var(--terra); box-shadow: 0 4px 12px rgba(0,0,0,.14); }
.like.is-liked { color: #C0392B; }

.status-tag { font-size: 11px !important; text-transform: uppercase; letter-spacing: .04em; }
.status-looking { background: #EAF0E6 !important; color: var(--moss-dark) !important; }
.status-meeting { background: #FBEBDD !important; color: var(--terra) !important; }
.status-adopted { background: #E5E7EB !important; color: #4B5563 !important; }

.polaroid__open { position: absolute; inset: 0; z-index: 3; }

.news-card__event { font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }

.contacts__visit { margin: 14px 0 0; font-weight: 700; color: var(--moss-dark); }

.donate__updated { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.field-error { display: block; color: #C0392B; font-size: 13px; font-weight: 600; margin-top: 4px; }
.form-status { font-weight: 700; font-size: 14px; margin-top: 8px; }
.form-status--ok { color: var(--moss-dark); }
.form-status--err { color: #C0392B; }
.consent-note { font-size: 12px; color: var(--ink-soft); }
.consent-note a { color: var(--terra); }

/* donation modal */
.donate-recipient, .donate-dest { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.donate-recipient span, .donate-dest span { color: var(--ink-soft); }
.donate-updated, .donate-goal { font-size: 13px; color: var(--ink-soft); margin: 8px 0; }
.donate-rows { margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.donate-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--paper-2); border-radius: 10px; padding: 10px 14px; }
.donate-row span { display: block; font-size: 12px; color: var(--ink-soft); }
.donate-row b { font-size: 15px; }
.donate-check { font-style: normal; font-size: 11px; color: var(--terra); margin-left: 8px; }
.btn-copy { background: var(--ink); color: var(--paper); border: none; border-radius: 999px; font-weight: 700; font-size: 12px; padding: 8px 16px; cursor: pointer; white-space: nowrap; }
.btn-copy:hover { background: var(--terra); }
.donate-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.donate-warn { font-size: 12px; color: var(--ink-soft); margin-top: 12px; }
.foster-list { margin: 8px 0 14px 20px; display: grid; gap: 6px; font-size: 14px; }

body.has-cookie { padding-bottom: 96px; }
.cookie-banner { z-index: 2500; }

/* keyboard focus */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
.chip:focus-visible, .pet-card__link:focus-visible {
  outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 4px;
}

.polaroid figcaption { position: relative; z-index: 4; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

[hidden] { display: none !important; }

/* mobile overflow safety */
html { overflow-x: hidden; }
img, svg, iframe { max-width: 100%; }
@media (max-width: 560px) {
  .hero { padding-left: 16px; padding-right: 16px; }
  .hero__title { font-size: clamp(30px, 10vw, 46px); overflow-wrap: break-word; }
  .hero__lead { font-size: 16px; max-width: 100%; }
  .hero__visual { height: 300px; }
  .polaroid--1 { width: 160px; }
  .polaroid--2 { width: 138px; }
  .marquee { margin-left: -16px; margin-right: -16px; }
  .section { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 430px) {
  .hero__title { font-size: clamp(24px, 8vw, 32px); }
  .hero__visual { height: 268px; }
  .polaroid--1 { width: 140px; }
  .polaroid--2 { width: 120px; }
  .hero__actions .btn { padding: 12px 20px; font-size: 14px; }
}
