/* Site v2 shared styles: type, layout and the components in PLAN.md 2.6. Page files only add their own layout. */
html { background: var(--paper); overflow-x: clip; scroll-padding-top: calc(var(--strip-h) + 12px); }
body { overflow-x: clip; background: var(--paper); color: var(--ink); }
h1, h2, h3, h4, p, figure, ul, ol, blockquote { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.display { font-family: var(--sc-font-display); font-weight: 400; line-height: 1.04; letter-spacing: 0.005em; text-wrap: balance; }
.hand { font-family: var(--hand); font-weight: 500; line-height: 1.12; }
.h1 { font-size: 2.375rem; line-height: 1.16; }
.h2 { font-size: 1.75rem; line-height: 1.2; }
.h3 { font-size: 1.375rem; line-height: 1.25; }
.lead { font-size: 1.0625rem; line-height: 1.6; max-width: 62ch; }
.small { font-size: 0.8125rem; line-height: 1.45; color: var(--ink-muted); }
@media (min-width: 860px) { .h1 { font-size: 3.25rem; line-height: 1.08; } .h2 { font-size: 2.375rem; line-height: 1.16; } }
.num { font-variant-numeric: tabular-nums; }

/* ---------- sections ---------- */
.sheet { position: relative; padding: clamp(3rem, 10vw, 5.5rem) 0; background: var(--paper); }
.sheet--sunken { background: var(--paper-sunken); }
.sheet--kraft { background: var(--kraft); }
.sheet--tint { background: var(--t-tint); }
.sheet__head { max-width: 40rem; display: grid; gap: 0.6rem; margin-bottom: 1.8rem; }
.sheet__head .hand { font-size: 1.45rem; color: var(--ink-muted); }

/* ---------- paper ---------- */
.note { position: relative; background: var(--paper-raised); color: var(--ink); padding: 1.15rem 1.2rem 1.25rem; border-radius: 3px; box-shadow: var(--shadow-note); rotate: var(--r, 0deg); }
.note > * + * { margin-top: 0.6rem; }
.note::before, .print::before, .tape::before {
  content: ""; position: absolute; top: -11px; left: 50%; width: 74px; height: 24px; translate: -50% 0; rotate: var(--tape-r, -4deg);
  background: rgb(var(--tape) / 0.8); box-shadow: 0 1px 2px rgb(42 35 28 / 0.16); z-index: 3; pointer-events: none;
}
.note--plain::before { display: none; }
.tagline { display: inline-block; padding: 0.2rem 0.75rem 0.3rem; background: var(--paper-raised); font-family: var(--hand); font-weight: 700; font-size: 1.35rem; line-height: 1.12; rotate: var(--r, -2.5deg); box-shadow: var(--shadow-print); border-radius: 2px; }

/* ---------- buttons: one shape, one label per action ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0.5rem 1.1rem;
  background: var(--t); color: var(--ink); font-weight: 800; font-size: 1rem; line-height: 1.1; text-decoration: none; text-align: center;
  border: 0; border-radius: 8px; box-shadow: 0 2px 0 rgb(42 35 28 / 0.55); cursor: pointer;
  transition: translate 140ms var(--ease), box-shadow 140ms var(--ease);
}
.btn:active { translate: 0 2px; box-shadow: 0 0 0 rgb(42 35 28 / 0.55); }
.btn--quiet { background: var(--paper-raised); box-shadow: inset 0 0 0 2px var(--ink); }
.btn--quiet:active { box-shadow: inset 0 0 0 2px var(--ink); }
.btn--small { min-height: 40px; padding: 0.35rem 0.8rem; font-size: 0.9rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.textlink { font-weight: 800; color: var(--t-deep); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { translate: 0 -1px; box-shadow: 0 3px 0 rgb(42 35 28 / 0.55); }
  .btn--quiet:hover { box-shadow: inset 0 0 0 2px var(--ink), 0 3px 0 rgb(42 35 28 / 0.3); }
}

/* ---------- the strip (top bar) ---------- */
.strip {
  position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: calc(var(--strip-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 0.6rem; background: var(--paper-raised);
  box-shadow: 0 1px 0 var(--rule), 0 6px 14px rgb(42 35 28 / 0.08);
  transition: opacity 220ms linear, visibility 220ms linear;
}
.strip::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px; border-bottom: 2px dashed var(--rule-strong); pointer-events: none; }
.strip.is-away { opacity: 0; visibility: hidden; }
.strip__badge { flex: none; display: block; width: 38px; height: 38px; border-radius: 50%; }
.strip__badge img { width: 100%; height: 100%; display: block; }
.strip__name { flex: 1; min-width: 0; font-family: var(--sc-font-display); font-size: 1.25rem; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.strip__links { display: none; }
.strip__donate { min-height: 36px; padding: 0.3rem 0.85rem; font-size: 0.9rem; background: var(--rescue); border-radius: 999px; rotate: -2deg; }
.strip__menu { min-height: 36px; padding: 0.3rem 0.8rem; font-size: 0.9rem; background: var(--kraft); box-shadow: 0 2px 0 rgb(42 35 28 / 0.35); }
@media (min-width: 860px) {
  .strip__badge { width: 46px; height: 46px; }
  .strip__name { flex: none; }
  .strip__links { display: flex; flex: 1; justify-content: flex-end; flex-wrap: nowrap; gap: 0.1rem 0.9rem; padding: 0; list-style: none; }
  .strip__links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; font-size: 0.95rem; text-decoration: none; white-space: nowrap; border-bottom: 3px dashed transparent; }
  .strip__links a[data-t] { border-bottom-color: color-mix(in srgb, var(--c) 70%, transparent); }
  .strip__links a[aria-current="page"] { border-bottom-style: solid; border-bottom-color: var(--c, var(--ink)); }
  .strip__menu { display: none; }
}
@media (min-width: 860px) and (max-width: 1100px) { .strip__links { gap: 0.1rem 0.6rem; } .strip__links a { font-size: 0.86rem; } .strip__name { display: none; } }

/* ---------- the menu: the same loop of four patches ---------- */
.menu { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--kraft); color: var(--ink); }
.menu::backdrop { background: rgb(42 35 28 / 0.4); }
.menu__inner { min-height: 100%; display: grid; align-content: start; gap: 1.2rem; padding: calc(env(safe-area-inset-top) + 14px) 18px calc(env(safe-area-inset-bottom) + 24px); }
.menu__top { display: flex; align-items: center; gap: 0.6rem; }
.menu__top .strip__name { flex: 1; }
.menu__close { min-height: 40px; padding: 0.3rem 0.9rem; font-size: 0.9rem; background: var(--paper-raised); box-shadow: 0 2px 0 rgb(42 35 28 / 0.35); }
.menu__loop { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 1.1rem; padding: 0.4rem 0.2rem; }
.menu__loop .patch[data-t="petcare"] { grid-area: 1 / 1; } .menu__loop .patch[data-t="rescue"] { grid-area: 1 / 2; }
.menu__loop .patch[data-t="sanctuary"] { grid-area: 2 / 2; } .menu__loop .patch[data-t="community"] { grid-area: 2 / 1; }
.menu__tags { display: grid; gap: 0.6rem; padding: 0; list-style: none; }
.menu__tags a { display: flex; align-items: center; min-height: 52px; padding: 0.4rem 1rem; background: var(--paper-raised); border-radius: 6px; box-shadow: var(--shadow-sticker); font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.menu__foot { display: grid; gap: 0.4rem; font-family: var(--hand); font-size: 1.35rem; line-height: 1.2; }
.menu__foot a { text-decoration: none; }

/* ---------- patch: one part of the organisation ---------- */
.patch {
  --c: var(--t); --c-soft: var(--t-soft); --c-deep: var(--t-deep); --c-tex: var(--t-tex);
  position: relative; display: block; padding: 0.9rem 0.95rem 1rem; color: var(--ink); text-decoration: none;
  background: var(--c-tex), var(--c-soft); border-radius: 14px; rotate: var(--r, -2deg);
  box-shadow: var(--shadow-sticker), inset 0 0 0 1px rgb(42 35 28 / 0.08);
  transition: opacity 320ms var(--ease), scale 320ms var(--ease), box-shadow 320ms var(--ease);
}
.patch::after { content: ""; position: absolute; inset: 6px; border: 2px dashed rgb(255 253 248 / 0.95); border-radius: 10px; pointer-events: none; }
.patch__name { display: block; font-family: var(--sc-font-display); font-size: 1.45rem; line-height: 1.05; }
.patch__line { display: block; margin-top: 0.3rem; font-family: var(--hand); font-weight: 600; font-size: 1.15rem; line-height: 1.1; color: var(--c-deep); }
.patch[data-t="petcare"]   { --c: var(--petcare);   --c-soft: var(--petcare-soft);   --c-deep: var(--petcare-deep);   --c-tex: var(--tex-petcare); }
.patch[data-t="rescue"]    { --c: var(--rescue);    --c-soft: var(--rescue-soft);    --c-deep: var(--rescue-deep);    --c-tex: var(--tex-rescue); }
.patch[data-t="sanctuary"] { --c: var(--sanctuary); --c-soft: var(--sanctuary-soft); --c-deep: var(--sanctuary-deep); --c-tex: var(--tex-sanctuary); }
.patch[data-t="community"] { --c: var(--community); --c-soft: var(--community-soft); --c-deep: var(--community-deep); --c-tex: var(--tex-community); }
.patch[data-t="farming"]   { --c: var(--farming);   --c-soft: var(--farming-soft);   --c-deep: var(--farming-deep);   --c-tex: var(--tex-farming); }
[data-t="petcare"] { --c: var(--petcare); } [data-t="rescue"] { --c: var(--rescue); } [data-t="sanctuary"] { --c: var(--sanctuary); } [data-t="community"] { --c: var(--community); }
.patch.is-waiting { opacity: 0.55; scale: 0.96; box-shadow: none; }

/* page title patch, opening every inner page */
.pagehead { position: relative; padding: calc(var(--strip-h) + 2.2rem) 0 1.4rem; }
.pagehead .patch { display: inline-block; max-width: 34rem; padding: 1.2rem 1.4rem 1.3rem; }
.pagehead .patch__name { font-size: 2.375rem; }
@media (min-width: 860px) { .pagehead .patch__name { font-size: 3.25rem; } }

/* ---------- the thread ---------- */
.stitch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.stitch path.stitch__line { fill: none; stroke: var(--stitch-c, var(--stitch)); stroke-width: 2.6; stroke-dasharray: 9 8; stroke-linecap: round; }
.stitch mask path { fill: none; stroke: #fff; stroke-width: 10; stroke-linecap: round; }

/* knots: numbered beads on the thread */
.knot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper-raised); box-shadow: inset 0 0 0 3px var(--c, var(--t)), var(--shadow-sticker); font-family: var(--sc-font-display); font-size: 1.05rem; color: var(--c-deep, var(--t-deep)); transition: opacity 280ms var(--ease), scale 280ms var(--ease); }
.knot.is-waiting { opacity: 0.45; scale: 0.9; box-shadow: inset 0 0 0 3px var(--rule-strong); }

/* ---------- process steps ---------- */
.steps { position: relative; display: grid; gap: 1.5rem; padding: 0 0 0 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 0 0.95rem; z-index: 1; }
.steps > li > .knot { grid-row: span 2; }
.steps h3 { font-weight: 800; font-size: 1.125rem; line-height: 1.33; align-self: center; }
.steps p { grid-column: 2; font-size: 0.95rem; line-height: 1.55; color: var(--ink); }

/* ---------- prints: taped on, lift to read (ported from draft 4) ---------- */
.print { position: relative; width: var(--w, 100%); rotate: var(--r, 0deg); perspective: 900px; z-index: 2; }
.print[data-at] { position: absolute; left: var(--x); top: var(--y); opacity: 0; translate: 0 -24px; scale: 1.08; pointer-events: none; transition: opacity 300ms var(--ease), translate 520ms var(--ease), scale 520ms var(--ease); }
.print[data-at].is-on { opacity: 1; translate: 0 0; scale: 1; pointer-events: auto; }
.print::before { width: 58px; height: 20px; transition: opacity 180ms 260ms linear, scale 320ms 260ms var(--ease); }
.print[data-at]::before { opacity: 0; scale: 1.2; }
.print[data-at].is-on::before { opacity: 1; scale: 1; }
.print__card { position: relative; transform-style: preserve-3d; transition: transform 620ms var(--ease); }
.print__front, .print__back { -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 2px; box-shadow: var(--shadow-print); }
.print__front { display: block; width: 100%; padding: 7px 7px 20px; margin: 0; border: 0; background: var(--paper-raised); cursor: pointer; font: inherit; color: inherit; text-align: left; }
.print__front img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 4 / 5); object-fit: cover; object-position: var(--op, 50% 50%); background: var(--paper-sunken); }
.print--static .print__front { cursor: default; }
.print__cap { display: block; margin-top: 0.35rem; font-family: var(--hand); font-weight: 600; font-size: 1.15rem; line-height: 1.1; padding: 0 0.2rem; }
.print__back {
  position: absolute; inset: 0; transform: rotateY(180deg); padding: 0.7rem 0.7rem 0.6rem;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 0.3rem;
  background: var(--paper-raised) repeating-linear-gradient(to bottom, transparent 0 1.42rem, var(--rule) 1.42rem calc(1.42rem + 1px));
}
.print__back .hand { font-size: 1.22rem; }
.print__back .btn { min-height: 44px; padding: 0.4rem 0.7rem; font-size: 0.88rem; }
.turnback { align-self: flex-end; min-height: 30px; padding: 0 0.2rem; border: 0; background: none; font: inherit; font-size: 0.78rem; font-weight: 700; color: var(--ink-muted); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.print.is-turned { z-index: 8; scale: 1.1; rotate: 0deg; }
.print.is-turned::before { opacity: 0; }
.print.is-turned .print__card { transform: rotateY(180deg); }
.print--wide { --ar: 5 / 4; }

/* ---------- partner marquee ---------- */
.marquee { position: relative; display: flex; overflow: hidden; padding: 0.6rem 0 0.4rem; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; flex: none; gap: 0.75rem; padding: 0 0.375rem; margin: 0; list-style: none; animation: marquee 46s linear infinite; }
/* The logo gets a fixed box equal to the chip's content box (120x76 minus padding = 96x60). A percentage height
   inside a grid item did not resolve in iPad Safari, so logos rendered at natural size and spilled out of the chip
   (Zakk, 2026-11-15). overflow: hidden is the backstop. */
.marquee__chip { display: flex; align-items: center; justify-content: center; flex: none; width: 120px; height: 76px; padding: 8px 12px; overflow: hidden; background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgb(42 35 28 / 0.18), 0 4px 10px rgb(42 35 28 / 0.1); }
.marquee__chip img { display: block; width: 96px; height: 60px; max-width: none; object-fit: contain; }
.marquee__chip--yours { background: var(--paper-raised); box-shadow: inset 0 0 0 2px var(--rule-strong); outline: 2px dashed var(--rule-strong); outline-offset: -7px; text-decoration: none; text-align: center; }
.marquee__chip--yours .hand { font-size: 1.15rem; line-height: 1.05; color: var(--ink-muted); }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track, .marquee.is-paused .marquee__track { animation-play-state: paused; }
.marquee__pause { position: absolute; right: 6px; bottom: -2px; min-height: 30px; padding: 0.1rem 0.6rem; border: 0; border-radius: 999px; background: var(--paper-raised); box-shadow: 0 1px 3px rgb(42 35 28 / 0.25); font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.marquee-wrap { padding-bottom: 1.6rem; }
@keyframes marquee { to { translate: -100% 0; } }

/* ---------- donation set: a flyer with tear-off strips ---------- */
.give { position: relative; }
.give__strips { display: grid; padding: 0; margin: 0; list-style: none; border-top: 2px dashed var(--rule-strong); }
.give__strips li { border-bottom: 2px dashed var(--rule-strong); }
.give__strips a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 54px; padding: 0.5rem 0.9rem; font-weight: 800; font-size: 1.05rem; text-decoration: none; background: var(--paper-raised); transition: translate 160ms var(--ease), rotate 160ms var(--ease), background-color 160ms linear; transform-origin: 0% 50%; }
.give__tear { font-size: 1.15rem; color: var(--ink-muted); font-weight: 600; }
.give__tear::after { content: " \203A"; }
.give__strips a:active { translate: 14px 0; rotate: 1.5deg; background: var(--t-soft); }
@media (hover: hover) and (pointer: fine) { .give__strips a:hover { translate: 6px 0; background: var(--t-tint); } }
.give-compact { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.give-compact a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.3rem 0.9rem; background: var(--paper-raised); border-radius: 999px; box-shadow: inset 0 0 0 2px var(--rule-strong); font-weight: 800; font-size: 0.92rem; text-decoration: none; }

/* ---------- price sticker ---------- */
.price { display: grid; align-content: center; justify-items: center; gap: 0.1rem; padding: 0.7rem 0.5rem 0.8rem; min-height: 92px; text-align: center; text-decoration: none; color: var(--ink); background: var(--c-tex, none), var(--c-soft, var(--t-soft)); border-radius: 12px; rotate: var(--r, -2deg); box-shadow: var(--shadow-sticker); }
.price__what { font-weight: 800; font-size: 0.85rem; line-height: 1.15; }
.price__num { font-family: var(--sc-font-display); font-size: 1.85rem; line-height: 1; font-variant-numeric: tabular-nums; }
.price__per { font-weight: 700; font-size: 0.8rem; line-height: 1.15; color: var(--ink); }

/* ---------- FAQ cards (draft 4's index cards) ---------- */
.qa { display: grid; gap: 0.7rem; max-width: 42rem; }
.qa__card { background: var(--paper-raised); border-radius: 3px; box-shadow: var(--shadow-print); }
.qa__card summary { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; min-height: 56px; padding: 0.7rem 1rem; font-weight: 800; font-size: 1.05rem; line-height: 1.25; cursor: pointer; list-style: none; }
.qa__card summary::-webkit-details-marker { display: none; }
.qa__card summary::after { content: "+"; flex: none; font-family: var(--hand); font-weight: 700; font-size: 2rem; line-height: 0.6; color: var(--t); transition: rotate 200ms var(--ease); }
.qa__card[open] summary::after { rotate: 45deg; }
.qa__card[open] summary { border-bottom: 2px solid var(--t); }
.qa__body { padding: 0.8rem 1rem 1rem; font-size: 1rem; line-height: 1.55; }

/* ---------- Petfinder frame ---------- */
.pf { position: relative; background: var(--paper); border-radius: 6px; box-shadow: inset 0 0 0 2px var(--rule); padding: 6px; }
.pf iframe { display: block; width: 100%; height: 360px; border: 0; transition: height 200ms var(--ease); }
.pf__fallback { padding: 1rem; font-size: 0.95rem; line-height: 1.5; }
.pf.is-empty iframe { display: none; }
.pf:not(.is-empty) .pf__fallback { display: none; }
.pf__credit { margin-top: 0.45rem; font-size: 0.8rem; color: var(--ink-muted); }

/* ---------- the door: every page ends here ---------- */
.door { position: relative; padding: clamp(2.6rem, 9vw, 4.5rem) 0 calc(2rem + env(safe-area-inset-bottom)); background: var(--paper-sunken); }
.door__grid { display: grid; gap: 1.6rem; }
.door__brand { display: flex; align-items: center; gap: 0.8rem; }
.door__brand img { width: 64px; height: 64px; flex: none; }
.door__brand .hand { font-size: 1.4rem; line-height: 1.1; }
.door h2 { font-size: 1.5rem; }
.door address { font-style: normal; display: grid; gap: 0.15rem; line-height: 1.55; }
.door address a, .door__list a { font-weight: 800; text-underline-offset: 0.2em; }
.door__hours { display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 1rem; margin: 0; font-variant-numeric: tabular-nums; }
.door__hours dt { font-weight: 800; }
.door__hours dd { margin: 0; }
.door__list { display: flex; flex-wrap: wrap; gap: 0 1.1rem; padding: 0; list-style: none; }
.door__list a { display: inline-flex; align-items: center; min-height: 44px; }
.door__fine { padding-top: 1rem; border-top: 2px dashed var(--rule-strong); font-size: 0.82rem; line-height: 1.5; color: var(--ink-muted); }
@media (min-width: 860px) { .door__grid { grid-template-columns: 1.1fr 1fr 1fr; gap: 2.5rem; } .door__fine { grid-column: 1 / -1; } }

/* ---------- placeholder page (until each page is built) ---------- */
.soon { padding: 2rem 0 4rem; }
.soon .note { max-width: 32rem; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .print[data-at] { translate: none; scale: 1; transition: opacity 200ms linear; }
  .print__card { transition: none; transform: none !important; }
  .print__back { transform: none; opacity: 0; }
  .print.is-turned { scale: 1; }
  .print.is-turned .print__front { opacity: 0; }
  .print.is-turned .print__back { opacity: 1; }
  .btn, .patch, .knot, .qa__card summary::after, .give__strips a { transition: none; }
  .patch.is-waiting, .knot.is-waiting { opacity: 1; scale: 1; }
  .marquee { overflow-x: auto; scroll-snap-type: x mandatory; mask-image: none; }
  .marquee__track { animation: none; }
  .marquee__track li { scroll-snap-align: start; }
  .marquee__track--copy, .marquee__pause { display: none; }
}

/* ---------- photo placeholder (a print still waiting for its real photo; mark the print data-placeholder) ---------- */
.ph { display: grid; place-items: center; width: 100%; aspect-ratio: var(--ar, 4 / 5); padding: 1rem; text-align: center;
  background: var(--paper-sunken) repeating-linear-gradient(-45deg, transparent 0 14px, rgb(188 166 128 / 0.18) 14px 16px);
  outline: 2px dashed var(--rule-strong); outline-offset: -8px; color: var(--ink-muted); }
.ph .hand { font-size: clamp(1.2rem, 4.2vw, 2rem); line-height: 1.1; }
