/* ==========================================================================
   Rescue Recycle — "Meet the Family" page (Iris design system, Bricks build)
   Layout classes are rrf- prefixed; mask/accent classes (.rr-mask, .rr-paw*,
   .rr-catface) are Iris's canonical system from _concepts/about-family/assets.
   Palette: night #141414 · mint #88CB9F · light-mint #e1f2e7 · indigo #214263
   ========================================================================== */

:root {
	--rr-night: #141414;
	--rr-mint: #88cb9f;
	--rr-mint-tint: #e1f2e7;
	--rr-indigo: #214263;
	--rrf-ink: #2a2a2a;
	--rrf-maxw: 1180px;
}

/* --------------------------------------------------------------------------
   ORGANIC PHOTO MASKS (Iris) — shadow on wrapper, clip on inner img
   -------------------------------------------------------------------------- */
.rr-mask { display: inline-block; position: relative; filter: drop-shadow(0 18px 34px rgba(20, 20, 20, 0.20)); line-height: 0; }
.rr-mask img, .rr-mask figure { display: block; width: 100%; height: 100%; margin: 0; }
.rr-mask img { object-fit: cover; }
.rr-mask.is-hero img   { clip-path: url(#mask-hero); }
.rr-mask.is-petA img   { clip-path: url(#mask-petA); }
.rr-mask.is-petB img   { clip-path: url(#mask-petB); }
.rr-mask.is-petC img   { clip-path: url(#mask-petC); }
.rr-mask.is-story img  { clip-path: url(#mask-story); }
.rr-mask.is-card1 img  { clip-path: url(#mask-card-1); }
.rr-mask.is-card2 img  { clip-path: url(#mask-card-2); }
.rr-mask.is-card3 img  { clip-path: url(#mask-card-3); }
.rr-mask.is-galA img   { clip-path: url(#mask-gal-a); }
.rr-mask.is-galB img   { clip-path: url(#mask-gal-b); }

.rr-mask.has-ring::before { content: ""; position: absolute; inset: -14px; background: var(--rr-mint); z-index: -1; opacity: 0.55; }
.rr-mask.is-petA.has-ring::before  { clip-path: url(#mask-petA); }
.rr-mask.is-petB.has-ring::before  { clip-path: url(#mask-petB); }
.rr-mask.is-petC.has-ring::before  { clip-path: url(#mask-petC); }
.rr-mask.is-story.has-ring::before { clip-path: url(#mask-story); }
.rr-mask.is-card1.has-ring::before { clip-path: url(#mask-card-1); }
.rr-mask.is-card2.has-ring::before { clip-path: url(#mask-card-2); }
.rr-mask.is-card3.has-ring::before { clip-path: url(#mask-card-3); }

/* --------------------------------------------------------------------------
   PAW TRAILS (Iris) — populated by family.js into .rr-pawtrail placeholders
   -------------------------------------------------------------------------- */
.rr-pawtrail { display: flex !important; flex-direction: row !important; align-items: center; gap: clamp(10px, 3.2vw, 40px); pointer-events: none; color: var(--rr-mint); }
.rr-pawtrail.is-night { color: var(--rr-night); }
.rr-paw { flex: 0 0 auto; width: clamp(26px, 4vw, 46px); opacity: 0; }
.rr-paw svg { display: block; width: 100%; height: auto; fill: currentColor; }
.rr-paw:nth-child(odd)  svg { transform: rotate(-7deg); }
.rr-paw:nth-child(even) svg { transform: rotate(9deg); }
.rr-paw:nth-child(even)     { margin-top: clamp(14px, 3vw, 30px); }

@media (prefers-reduced-motion: no-preference) {
	.rr-pawtrail.in-view .rr-paw { animation: rr-pawpop 0.5s cubic-bezier(0.34, 1.45, 0.5, 1) both; }
	.rr-pawtrail.in-view .rr-paw:nth-child(1) { animation-delay: 0.02s; }
	.rr-pawtrail.in-view .rr-paw:nth-child(2) { animation-delay: 0.14s; }
	.rr-pawtrail.in-view .rr-paw:nth-child(3) { animation-delay: 0.26s; }
	.rr-pawtrail.in-view .rr-paw:nth-child(4) { animation-delay: 0.38s; }
	.rr-pawtrail.in-view .rr-paw:nth-child(5) { animation-delay: 0.50s; }
	.rr-pawtrail.in-view .rr-paw:nth-child(6) { animation-delay: 0.62s; }
	.rr-pawtrail.in-view .rr-paw:nth-child(7) { animation-delay: 0.74s; }
	.rr-pawtrail.in-view .rr-paw:nth-child(8) { animation-delay: 0.86s; }
}
@keyframes rr-pawpop {
	from { opacity: 0; transform: translateY(10px) scale(0.45); }
	to   { opacity: 1; transform: translateY(0)    scale(1); }
}
@media (prefers-reduced-motion: reduce) { .rr-paw { opacity: 0.5; } }

/* --------------------------------------------------------------------------
   CAT NOSE + WHISKER TWITCH (Iris) — injected by family.js into .rrf-catface
   -------------------------------------------------------------------------- */
.rr-catface { color: var(--rr-night); }
.rr-catface.is-mint { color: var(--rr-mint); }
.rr-catface.is-indigo { color: var(--rr-indigo); }
.rr-catface svg { display: block; width: 100%; height: auto; overflow: visible; }
/* "The Boys" section (#brxe-fam053) recolor to mint per Terry — overrides the
   is-indigo class still on the element rather than editing the built-page
   markup. #id + .class beats .class.class, no !important needed. */
#brxe-fam053 .rr-catface { color: var(--rr-mint); }

@media (prefers-reduced-motion: no-preference) {
	.rr-catface .rr-nose { transform-box: fill-box; transform-origin: center 40%; animation: rr-nosetwitch 4.2s ease-in-out infinite; }
	.rr-catface .rr-muzzle { transform-box: fill-box; transform-origin: top center; animation: rr-nosetwitch 4.2s ease-in-out infinite; }
	.rr-catface .rr-whiskers-l { transform-box: fill-box; transform-origin: right center; animation: rr-whisk-l 4.2s ease-in-out infinite; }
	.rr-catface .rr-whiskers-r { transform-box: fill-box; transform-origin: left center; animation: rr-whisk-r 4.2s ease-in-out infinite; }
}
@keyframes rr-nosetwitch {
	0%, 68%, 100% { transform: scale(1) translateY(0); }
	74% { transform: scale(1.09) translateY(-1.5px); }
	80% { transform: scale(0.95) translateY(1.5px); }
	86% { transform: scale(1.04) translateY(0); }
	92% { transform: scale(0.99); }
}
@keyframes rr-whisk-l {
	0%, 70%, 100% { transform: rotate(0deg); }
	76% { transform: rotate(-5deg); }
	84% { transform: rotate(3deg); }
	90% { transform: rotate(-1deg); }
}
@keyframes rr-whisk-r {
	0%, 70%, 100% { transform: rotate(0deg); }
	76% { transform: rotate(5deg); }
	84% { transform: rotate(-3deg); }
	90% { transform: rotate(1deg); }
}

/* --------------------------------------------------------------------------
   PAGE LAYOUT (rrf-) — Iris's preview rhythm, namespaced for Bricks
   -------------------------------------------------------------------------- */
.rrf-kicker { font-family: "Lora", Georgia, serif; font-style: italic; color: var(--rr-mint); font-size: 1.15rem; letter-spacing: .3px; margin-bottom: .35em; display: block; }
.rrf-eyebrow { font-weight: 600; text-transform: uppercase; letter-spacing: .28em; font-size: .72rem; color: var(--rr-mint); }

/* HERO */
.rrf-hero { position: relative; background: var(--rr-night); color: #fff; padding: clamp(64px, 9vw, 120px) 20px clamp(120px, 14vw, 190px); overflow: hidden; }
.rrf-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 82% 8%, rgba(136, 203, 159, .16), transparent 55%); pointer-events: none; }
.rrf-hero-grid { display: grid !important; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 5vw, 70px); align-items: center; position: relative; z-index: 2; max-width: var(--rrf-maxw); margin: 0 auto; width: 100%; }
.rrf-hero h1 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(3.4rem, 8.5vw, 7.5rem); line-height: .92; color: #fff; margin: 0 0 .28em; }
.rrf-hero h1 span { color: var(--rr-mint); }
.rrf-hero-lead { font-size: clamp(1rem, 1.5vw, 1.18rem); color: #dfe6e1; max-width: 40ch; }
.rrf-hero-photo { max-width: 520px; margin-left: auto; width: 100%; }
.rrf-hero-photo .rr-mask { width: 100%; }
.rrf-hero-photo .rr-mask img { aspect-ratio: 1 / 1; }
.rrf-hero-paws { position: absolute; left: 3%; bottom: clamp(46px, 8vw, 86px); width: 66%; z-index: 2; }
.rrf-hero-divider { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; line-height: 0; }
.rrf-hero-divider svg { display: block; width: 100%; height: clamp(50px, 7vw, 96px); }

/* SHARED SECTION SHELL */
.rrf-wrap { max-width: var(--rrf-maxw); margin: 0 auto; width: 100%; }
.rrf-pet, .rrf-brothers, .rrf-gallery-sec, .rrf-cta { padding: clamp(48px, 7vw, 96px) 20px; }
.rrf-intro-paws { padding: clamp(36px, 5vw, 56px) 20px 0; }
.rrf-intro-paws .rr-pawtrail { width: min(420px, 80%); }

/* VALKYRIE SECTION — Lottie paw-trail background, walks behind the content
   on the night bg. Container built + initialized by family.js. Negative
   z-index keeps it under the in-flow .rrf-pet-row (painted above it) while
   still sitting on top of the section's own #141414 background. */
#rr-family__valkyrie { position: relative; z-index: 0; overflow: hidden; }
/* aspect-ratio (not width:auto) forces the true 512x512 square off the
   definite height — lottie-web sets its own inline width/height style on
   the svg it renders, which beats a plain `width:auto` in our stylesheet. */
.rrf-pet-lottie { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 1 / 1; transform: translateX(-50%); z-index: -1; pointer-events: none; }
.rrf-pet-lottie svg { display: block !important; width: 100% !important; height: 100% !important; }

/* FEATURED PET ROWS */
.rrf-pet-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 84px); align-items: center; max-width: var(--rrf-maxw); margin: 0 auto; width: 100%; }
.rrf-pet.rrf-alt .rrf-pet-row { direction: rtl; }
.rrf-pet.rrf-alt .rrf-pet-row > * { direction: ltr; }
.rrf-pet-photo .rr-mask { width: 100%; max-width: 460px; }
.rrf-pet.rrf-alt .rrf-pet-photo { text-align: right; }
.rrf-pet-photo .rr-mask img { aspect-ratio: 4 / 5; }
.rrf-pet h2 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(2.8rem, 5vw, 5rem); line-height: .95; color: var(--rr-night); margin: 0; }
.rrf-pet-body { max-width: 44ch; }
.rrf-pet-body p { margin: 0 0 1.1em; }
.rrf-pet-paws { margin-top: 26px; width: min(320px, 80%); }
.rrf-pet.rrf-alt .rrf-pet-paws { margin-left: auto; }

/* THE BOYS STORY */
.rrf-story { background: var(--rr-mint-tint); border-bottom: 20px solid var(--rr-mint); padding: clamp(56px, 8vw, 104px) 20px; position: relative; overflow: hidden; }
.rrf-story-head { text-align: center; max-width: 760px; margin: 0 auto clamp(30px, 5vw, 54px); }
.rrf-story-head h2 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(3rem, 6vw, 6rem); color: var(--rr-indigo); line-height: .94; margin: 0; }
.rrf-catface { width: clamp(120px, 16vw, 190px); margin: 0 auto clamp(6px, 2vw, 14px); }
.rrf-story-grid { display: grid !important; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 70px); align-items: center; max-width: var(--rrf-maxw); margin: 0 auto; width: 100%; }
.rrf-story-photo .rr-mask { width: 100%; max-width: 440px; }
.rrf-story-photo .rr-mask img { aspect-ratio: 1 / 1; }
.rrf-story-body { max-width: 56ch; }
.rrf-story-body p { margin: 0 0 1.1em; }
.rrf-story-extra { max-width: 56ch; margin: clamp(24px, 4vw, 40px) auto 0; text-align: center; }
.rrf-story-close { text-align: center; font-family: "Lora", Georgia, serif; font-style: italic; color: var(--rr-indigo); font-size: clamp(1.05rem, 2vw, 1.4rem); max-width: 62ch; margin: clamp(30px, 5vw, 50px) auto 0; }

/* 3-UP BROTHER CARDS */
.rrf-brothers-head { text-align: center; margin: 0 auto clamp(34px, 5vw, 60px); }
.rrf-brothers-head h2 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(2.8rem, 5.5vw, 5.5rem); color: var(--rr-night); line-height: .95; margin: 0; }
.rrf-cards { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); max-width: var(--rrf-maxw); margin: 0 auto; width: 100%; }
.rrf-card { text-align: center; display: block !important; }
.rrf-card .rr-mask { width: 100%; max-width: 300px; margin: 0 auto 20px; }
.rrf-card .rr-mask img { aspect-ratio: 1 / 1; }
.rrf-card h3 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(2rem, 3vw, 2.9rem); color: var(--rr-indigo); line-height: 1; margin: 0; }
.rrf-nick { font-family: "Lora", Georgia, serif; font-style: italic; color: var(--rr-mint); font-size: 1rem; }
.rrf-card p { max-width: 38ch; margin: .6em auto 0; font-size: .96rem; }

/* GALLERY */
.rrf-gallery-head { text-align: center; margin: 0 auto clamp(30px, 4vw, 52px); }
.rrf-gallery-head h2 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(2.6rem, 5vw, 5rem); color: var(--rr-night); line-height: .95; margin: 0; }
.rrf-gallery { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 3vw, 40px); align-items: center; max-width: var(--rrf-maxw); margin: 0 auto; width: 100%; }
.rrf-gallery .rr-mask { width: 100%; }
.rrf-gallery .rr-mask img { aspect-ratio: 1 / 1; }
.rrf-gallery .rrf-gshift { margin-top: clamp(20px, 4vw, 52px); }

/* DONATE CTA */
.rrf-cta { padding-bottom: clamp(60px, 8vw, 110px); }
.rrf-cta-band { background: var(--rr-mint); border-radius: 22px; text-align: center; padding: clamp(44px, 6vw, 80px) clamp(24px, 5vw, 60px); position: relative; overflow: hidden; max-width: var(--rrf-maxw); margin: 0 auto; width: 100%; }
.rrf-cta-band h2 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(2.6rem, 5vw, 5rem); color: var(--rr-night); line-height: .95; margin: 0; }
.rrf-cta-band .rrf-cta-copy { max-width: 48ch; margin: 1em auto 1.6em; color: #173a26; }
.rrf-btn, .rrf-cta-band a.brxe-button { display: inline-block; background: #fff; color: var(--rr-night); font-family: "Bebas Neue", sans-serif; font-size: 1.35rem; letter-spacing: 1px; padding: .55em 1.5em .48em; border: 1.5px solid var(--rr-night); border-radius: 10px; text-decoration: none; transition: transform .15s ease; }
.rrf-btn:hover, .rrf-cta-band a.brxe-button:hover { transform: translateY(-2px); color: var(--rr-night); }
.rrf-cta-paws { width: min(360px, 70%); margin: 26px auto -10px; }
.rrf-cta-paws .rr-pawtrail { justify-content: center; }

/* RESPONSIVE */
@media (max-width: 860px) {
	.rrf-hero-grid { grid-template-columns: 1fr; text-align: center; }
	.rrf-hero-photo { margin: 30px auto 0; max-width: 420px; }
	.rrf-hero-lead { margin-inline: auto; }
	.rrf-hero-paws { width: 82%; }
	.rrf-pet-row, .rrf-pet.rrf-alt .rrf-pet-row { grid-template-columns: 1fr; direction: ltr; text-align: center; }
	.rrf-pet-photo .rr-mask { margin: 0 auto; }
	.rrf-pet.rrf-alt .rrf-pet-photo { text-align: center; }
	.rrf-pet-body { margin: 0 auto; }
	.rrf-pet-paws, .rrf-pet.rrf-alt .rrf-pet-paws { margin: 22px auto 0; }
	.rrf-story-grid { grid-template-columns: 1fr; text-align: center; }
	.rrf-story-photo .rr-mask { margin: 0 auto; }
	.rrf-story-body { margin: 0 auto; }
	.rrf-cards { grid-template-columns: 1fr; gap: 44px; }
	.rrf-gallery { grid-template-columns: repeat(2, 1fr); }
	.rrf-gallery .rrf-gshift { margin-top: 0; }
}
