/* ==========================================================================
   Fauster's home on the internet 🐾
   ========================================================================== */

:root {
  /* Warm, cozy palette inspired by a German Shepherd's tan & espresso coat */
  --bg: #FBF6EE;
  --bg-alt: #F4EADB;
  --paper: #FFFDF9;
  --ink: #2A1E16;
  --ink-soft: #5F4C3D;
  --line: #E7D9C5;
  --tan: #D9A35B;
  --tan-soft: #F3DDB8;
  --brown: #8A4B1F;
  --heart: #C23B34;
  --heart-dark: #A12F29;
  --heart-soft: #FCECE9;
  --gift: #EBB466;
  --gift-dark: #DFA04B;

  --radius: 20px;
  --radius-lg: 30px;
  --shadow: 0 1px 2px rgba(42, 30, 22, .06), 0 8px 24px rgba(42, 30, 22, .08);
  --shadow-lg: 0 2px 6px rgba(42, 30, 22, .06), 0 24px 60px rgba(42, 30, 22, .14);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1140px;
  --gutter: 16px;
  --header-h: 64px;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --header-h: 76px; }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 4.6vw + 1rem, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 2.6vw + 1.1rem, 3.25rem); }
h3 { font-size: 1.375rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--brown); }
strong { font-weight: 800; }

::selection { background: var(--tan-soft); color: var(--ink); }
:focus-visible { outline: 3px solid var(--brown); outline-offset: 3px; border-radius: 6px; }

.container { width: min(100% - var(--gutter) * 2, var(--container)); margin-inline: auto; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 12px; font-weight: 800; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  margin: 0 0 14px;
  color: var(--brown);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 34em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 58px;
  padding: .8em 1.6em;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 800 1.125rem/1.2 var(--font-body);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-heart { background: var(--heart); color: #fff; box-shadow: 0 8px 20px rgba(194, 59, 52, .3); }
.btn-heart:hover { background: var(--heart-dark); box-shadow: 0 12px 26px rgba(194, 59, 52, .36); }

.btn-gift { background: var(--gift); color: var(--ink); box-shadow: 0 8px 20px rgba(223, 160, 75, .35); }
.btn-gift:hover { background: var(--gift-dark); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.btn-dark { background: var(--ink); color: var(--paper); box-shadow: var(--shadow); }
.btn-dark:hover { background: #46342A; }

.btn-small { min-height: 48px; padding: .55em 1.2em; font-size: 1rem; }
.btn-block { width: 100%; }

.btn[aria-busy="true"] { opacity: .85; cursor: progress; transform: none; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cta-row .btn { flex: 1 1 250px; }
.cta-row-center { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 246, 238, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(42, 30, 22, .06); }
/* At the very top the header floats transparently over the hero */
.js .site-header:not(.is-scrolled) { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); }

.brand {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--ink);
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-size: 1.5rem; font-weight: 800;
  text-decoration: none;
}
.brand-paw { width: 28px; height: 28px; fill: var(--heart); transform: rotate(-14deg); }

.nav { display: none; gap: 2px; }
.nav a {
  padding: 10px 14px; border-radius: 999px;
  color: var(--ink-soft); font-size: 1rem; font-weight: 700; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { background: var(--bg-alt); color: var(--ink); }

.header-ctas { display: flex; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border-radius: 999px;
  font-size: .9375rem; font-weight: 800; text-decoration: none; white-space: nowrap;
}
.pill svg { width: 18px; height: 18px; flex: none; }
.pill-heart { background: var(--heart); color: #fff; }
.pill-heart:hover { background: var(--heart-dark); }
.pill-gift { background: var(--gift); color: var(--ink); }
.pill-gift:hover { background: var(--gift-dark); }

@media (max-width: 359px) {
  .brand { font-size: 1.3rem; }
  .pill { padding: 0 12px; }
}
@media (min-width: 900px) {
  .nav { display: flex; }
  .pill-gift { display: none; }
}

/* ---------- Photos & placeholders ---------- */
.photo { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--tan-soft); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }

.photo-placeholder {
  position: absolute; inset: 0;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 16px;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(160deg, #F5E0BC, #E4B575);
  color: var(--brown);
  font-family: var(--font-display);
  font-size: 1.125rem; font-weight: 600; line-height: 1.3;
  text-align: center;
}
.photo-placeholder svg { width: 32%; max-width: 120px; height: auto; aspect-ratio: 1; fill: currentColor; opacity: .5; }
.photo.is-missing img { display: none; }
.photo.is-missing .photo-placeholder { display: flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  /* slide up underneath the sticky header so the background runs edge to edge */
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 28px) 0 64px;
  background:
    radial-gradient(900px 520px at 88% 8%, #F6E1C2 0%, transparent 62%),
    radial-gradient(700px 460px at 0% 100%, #F8E6E1 0%, transparent 60%),
    var(--bg);
}

.hero-paw { position: absolute; fill: var(--tan); opacity: .13; pointer-events: none; }
.hero-paw-1 { width: 120px; height: 120px; top: 14%; left: -34px; transform: rotate(-24deg); }
.hero-paw-2 { width: 74px; height: 74px; bottom: 6%; left: 44%; transform: rotate(18deg); }
.hero-paw-3 { width: 96px; height: 96px; top: 4%; right: 3%; transform: rotate(32deg); }

.hero-grid { position: relative; z-index: 1; display: grid; align-items: center; }

.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 18px;
  padding: 7px 16px;
  border-radius: 999px 999px 999px 6px;
  background: var(--paper);
  box-shadow: var(--shadow);
  color: var(--brown);
  font-family: var(--font-display);
  font-size: 1.1875rem; font-style: italic; font-weight: 600;
  letter-spacing: 0; text-transform: none;
}

.hero h1 { margin-bottom: .35em; }
.h1-accent { display: block; color: var(--heart); font-style: italic; }

.inline-paw {
  display: inline-block;
  width: .78em; height: .78em;
  margin-left: .22em;
  vertical-align: -.04em;
  fill: var(--tan);
  transform: rotate(-14deg);
}
.hero .eyebrow .inline-paw { width: 1.05em; height: 1.05em; margin-left: .1em; fill: var(--heart); }

.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.facts li {
  padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  color: var(--ink-soft); font-size: .9375rem; font-weight: 700;
}

.hero-media { position: relative; width: min(100%, 440px); justify-self: center; }
.hero-blob {
  position: absolute; inset: -5% -6% -4% -5%;
  border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background: var(--tan-soft);
  transform: rotate(-6deg);
}
.photo-hero img { object-position: 50% 45%; } /* keeps Fauster + the barn star in frame when cropped square on phones */
.photo-hero {
  margin: 0;
  aspect-ratio: 1;
  border: 10px solid var(--paper);
  box-shadow: var(--shadow-lg);
  transform: rotate(1.5deg);
}
.sticker {
  position: absolute; left: 6px; bottom: -18px; z-index: 2;
  display: grid; place-items: center;
  width: 104px; height: 104px; margin: 0;
  border-radius: 50%;
  background: var(--heart); color: #fff;
  box-shadow: 0 10px 24px rgba(194, 59, 52, .35);
  font-family: var(--font-display);
  font-size: .95rem; font-style: italic; font-weight: 700; line-height: 1.15;
  text-align: center;
  transform: rotate(-12deg);
}

/* Mobile: headline → photo → message → buttons */
@media (max-width: 899px) {
  .hero-copy { display: contents; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero .eyebrow { order: 1; justify-self: start; }
  .hero h1 { order: 2; }
  .hero-media { order: 3; margin: 14px auto 40px; }
  .hero .lead { order: 4; }
  .hero .cta-row { order: 5; margin-top: 4px; }
  .hero .facts { order: 6; }
}

@media (min-width: 900px) {
  .hero { padding: calc(var(--header-h) + 64px) 0 112px; }
  .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 64px; }
  .hero-media { justify-self: end; width: min(100%, 470px); }
  .photo-hero { aspect-ratio: 4 / 5; border-width: 12px; }
  .sticker { left: -34px; bottom: 36px; width: 120px; height: 120px; font-size: 1.05rem; }
}

/* ---------- Sections ---------- */
.section { position: relative; padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }

.section-head { max-width: 660px; margin-bottom: 40px; }
.section-head-center { margin-inline: auto; text-align: center; }
.section-lead { font-size: 1.25rem; color: var(--ink-soft); margin: 0; }

/* ---------- Story ---------- */
.story { background: var(--paper); }

.story-grid { display: grid; gap: 40px; }
@media (min-width: 900px) {
  .story-grid { grid-template-columns: 1.1fr .9fr; gap: 72px; align-items: start; }
  .story-figure { position: sticky; top: calc(var(--header-h) + 32px); }
}

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline-item {
  position: relative;
  display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px;
  padding-bottom: 34px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute; left: 24px; top: 62px; bottom: 6px;
  border-left: 4px dotted var(--tan);
}
.timeline-marker {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--tan-soft); color: var(--brown);
  font-size: 1.4rem;
}
.timeline-marker svg { width: 26px; height: 26px; fill: currentColor; }
.timeline-marker-heart { background: var(--heart-soft); color: var(--heart); }
.timeline-item h3 { margin: 10px 0 8px; font-size: 1.5rem; }
.timeline-item p { margin: 0; color: var(--ink-soft); }
.timeline-item strong { color: var(--ink); }

.story-figure { margin: 0; }
.photo-story { aspect-ratio: 4 / 5; box-shadow: var(--shadow-lg); transform: rotate(-1.5deg); }
.story-figure figcaption {
  margin-top: 20px;
  color: var(--ink-soft);
  font-family: var(--font-display); font-size: 1.125rem; font-style: italic;
  text-align: center;
}

/* ---------- Support / donate ---------- */
.support { background: linear-gradient(180deg, var(--bg-alt), #F6E5DA); }

.support-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .support-grid { grid-template-columns: minmax(0, 1fr) 460px; gap: 72px; } }

.support-copy > p { color: var(--ink-soft); }
.trust { display: grid; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.trust li { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.trust svg { width: 22px; height: 22px; color: var(--brown); flex: none; }

.donate-card {
  overflow: hidden;
  border: 1px solid var(--line); border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.donate-photo { margin: 0; aspect-ratio: 3 / 2; border-radius: 0; }
.donate-photo img { object-position: center 30%; }
.photo-tag {
  position: absolute; left: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; padding: 7px 14px;
  border-radius: 999px 999px 999px 6px;
  background: rgba(255, 253, 249, .95);
  box-shadow: var(--shadow);
  color: var(--brown);
  font: italic 600 1rem/1.2 var(--font-display);
}
.photo-tag svg { width: 16px; height: 16px; fill: var(--heart); }
.photo.is-missing .photo-tag { display: none; }
.donate-body { padding: 24px 20px 26px; }
@media (min-width: 600px) { .donate-body { padding: 30px 32px 32px; } }

.amounts { min-width: 0; margin: 0; padding: 0; border: 0; }
.donate-title {
  margin-bottom: 16px; padding: 0;
  font-family: var(--font-display); font-variation-settings: "SOFT" 100;
  font-size: 1.5rem; font-weight: 700;
}
.amount-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.amount-option { position: relative; display: block; }
.amount-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.amount-option span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 64px;
  border: 2px solid var(--line); border-radius: 16px;
  background: var(--bg);
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.amount-option span:hover { border-color: var(--tan); }
.amount-option input:checked + span {
  border-color: var(--heart);
  background: var(--heart-soft);
  color: var(--heart-dark);
  box-shadow: 0 0 0 3px rgba(194, 59, 52, .14);
}
.amount-option input:checked + span::after { content: "✓"; font-family: var(--font-body); font-size: 1rem; font-weight: 800; }
.amount-option input:focus-visible + span { outline: 3px solid var(--brown); outline-offset: 2px; }

.amounts:not([hidden]) + .custom-amount { margin-top: 20px; }
.custom-amount label { display: block; margin-bottom: 8px; font-size: 1rem; font-weight: 700; }
.custom-amount .donate-title { margin-bottom: 14px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.15; }
.input-wrap { position: relative; }
.input-prefix {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--ink-soft); font-size: 1.25rem; font-weight: 800; pointer-events: none;
}
.input-wrap input {
  width: 100%; min-height: 64px;
  padding: 0 18px 0 40px;
  border: 2px solid var(--line); border-radius: 16px;
  background: var(--bg);
  color: var(--ink);
  font: 700 1.375rem var(--font-body);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.input-wrap input::placeholder { color: #9A8573; font-weight: 600; }
.input-wrap input:focus { outline: none; border-color: var(--heart); box-shadow: 0 0 0 4px rgba(194, 59, 52, .15); }
.input-wrap input.is-active { border-color: var(--heart); background: var(--heart-soft); }

.donate-card .btn-block { margin-top: 22px; min-height: 62px; font-size: 1.1875rem; }

.form-error { margin: 14px 0 0; color: var(--heart-dark); font-size: 1rem; font-weight: 700; }
.notice {
  margin: 0 0 20px; padding: 12px 16px;
  border-radius: 14px;
  background: var(--tan-soft); color: var(--ink);
  font-size: 1rem; font-weight: 700;
}
.fine-print { margin: 14px 0 0; color: var(--ink-soft); font-size: .9375rem; text-align: center; }

/* ---------- Send a gift ---------- */
.gift-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .gift-grid { grid-template-columns: .9fr 1.1fr; gap: 72px; } }

.gift-copy > p { color: var(--ink-soft); }
.gift-ideas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.gift-ideas li {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper);
  font-size: 1rem; font-weight: 700;
}
.gift-ideas li span { font-size: 1.35rem; line-height: 1; }

/* The envelope, with airmail stripes */
.envelope {
  position: relative; isolation: isolate;
  padding: 40px 26px 30px;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
}
.envelope::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  padding: 9px;
  border-radius: inherit;
  background: repeating-linear-gradient(-45deg, var(--heart) 0 14px, var(--paper) 14px 28px, var(--tan) 28px 42px, var(--paper) 42px 56px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
}
@media (min-width: 600px) { .envelope { padding: 48px 40px 36px; } }

.stamp {
  position: absolute; top: 26px; right: 24px;
  width: 80px; height: 100px; padding: 8px;
  background: #F1D3A4;
  transform: rotate(5deg);
  /* perforated edges */
  -webkit-mask:
    radial-gradient(circle, #0000 3.5px, #000 4px) -5px -5px / 10px 10px,
    linear-gradient(#000 0 0) center / calc(100% - 10px) calc(100% - 10px) no-repeat;
          mask:
    radial-gradient(circle, #0000 3.5px, #000 4px) -5px -5px / 10px 10px,
    linear-gradient(#000 0 0) center / calc(100% - 10px) calc(100% - 10px) no-repeat;
}
.stamp-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  height: 100%;
  border: 2px solid rgba(138, 75, 31, .3);
  background: #FCEBCF;
  color: var(--brown);
}
.stamp-inner svg { width: 34px; height: 34px; fill: currentColor; }
.stamp-inner span { font-size: .625rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.mail-label { margin: 0 0 6px; color: var(--ink-soft); font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.address {
  margin: 0 0 24px;
  font-family: var(--font-display); font-variation-settings: "SOFT" 100;
  font-size: 1.5rem; font-style: normal; line-height: 1.35;
}
.address-line { display: block; padding: 6px 0; border-bottom: 2px dashed var(--line); overflow-wrap: anywhere; }
.address-name { font-weight: 800; }
/* only the lines beside the stamp need to leave room for it */
.mail-label, .address-name, .address-pending { padding-right: 92px; }
@media (max-width: 599px) {
  .stamp { top: 18px; right: 18px; width: 60px; height: 80px; padding: 6px; }
  .stamp-inner svg { width: 24px; height: 24px; }
  .stamp-inner span { font-size: .5rem; }
  .mail-label, .address-name, .address-pending { padding-right: 68px; }
}
@media (max-width: 359px) {
  .envelope { padding-inline: 20px; }
  .address { font-size: 1.25rem; }
}
.address-pending { display: block; padding-top: 4px; font-family: var(--font-body); font-size: 1.0625rem; color: var(--ink-soft); }
.address-pending strong { display: block; margin-bottom: 4px; color: var(--ink); font-family: var(--font-display); font-size: 1.375rem; }

.tips { margin-top: 20px; padding: 22px 24px; border-radius: 20px; background: var(--bg-alt); }
.tips h3 { margin-bottom: 10px; font-size: 1.25rem; }
.tips ul { display: grid; gap: 8px; margin: 0; padding-left: 1.2em; }
.tips li { color: var(--ink-soft); font-size: 1rem; }
.tips li::marker { color: var(--tan); }
.tips strong { color: var(--ink); }

/* ---------- Follow ---------- */
.follow { background: var(--paper); }

/* Column count adapts to however many photos exist (data-count is set by main.js) */
.gallery {
  --cols: 2; --gap: 12px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap);
  max-width: 960px; margin: 0 auto 44px;
}
.gallery[data-count="1"] { --cols: 1; max-width: 480px; }
@media (min-width: 700px) {
  .gallery { --cols: 3; --gap: 16px; }
  .gallery[data-count="2"] { --cols: 2; max-width: 720px; }
  .gallery[data-count="4"] { --cols: 4; max-width: 1040px; }
}
.gallery-item {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols));
  margin: 0; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius); background: var(--bg-alt);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.04); }

.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.social-links .btn { flex: 0 1 auto; }
.social-links .btn svg { width: 22px; height: 22px; }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 40px; background: var(--ink); color: #F1E6D6; text-align: center; }
.footer-inner { display: grid; justify-items: center; gap: 16px; }
.brand-light { color: #FFF7EC; }
.brand-light .brand-paw { fill: var(--gift); }
.footer-tagline { margin: 0; font-family: var(--font-display); font-size: 1.25rem; font-style: italic; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 1px solid rgba(241, 230, 214, .3); border-radius: 50%;
  color: #FFF7EC;
  transition: background-color .15s ease;
}
.footer-social a:hover { background: rgba(241, 230, 214, .12); }
.footer-social svg { width: 22px; height: 22px; }
.footer-fine { margin: 8px 0 0; color: rgba(241, 230, 214, .72); font-size: .875rem; line-height: 1.6; }
.site-footer :focus-visible { outline-color: var(--gift); }

/* ---------- Thank-you page ---------- */
.page-thanks {
  background:
    radial-gradient(800px 500px at 85% 0%, #F6E1C2 0%, transparent 60%),
    radial-gradient(700px 500px at 0% 100%, #F8E6E1 0%, transparent 60%),
    var(--bg);
}
.thanks { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 40px var(--gutter); }
.thanks-card {
  width: min(100%, 640px);
  padding: 40px 22px;
  border-radius: 32px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
@media (min-width: 600px) { .thanks-card { padding: 52px 48px; } }
.thanks-card h1 { font-size: clamp(2.1rem, 3vw + 1.2rem, 3.2rem); }
.thanks-card .lead { margin-inline: auto; }
.thanks-card > p { color: var(--ink-soft); }

.thanks-avatar-wrap { position: relative; width: 148px; margin: 0 auto 26px; }
.thanks-avatar { width: 148px; height: 148px; border-radius: 50%; border: 6px solid var(--paper); box-shadow: var(--shadow); }
.thanks-avatar .photo-placeholder svg { width: 46%; }
.thanks-heart {
  position: absolute; right: -4px; bottom: 2px;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--paper); box-shadow: var(--shadow);
  font-size: 1.5rem;
}
.signoff { margin: 28px 0 0; font-family: var(--font-display); font-size: 1.25rem; font-style: italic; color: var(--ink) !important; }
.signoff strong { font-style: normal; }

/* Celebration hearts & paws */
.confetti { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.confetti span {
  position: absolute; top: -8vh; left: var(--x);
  font-size: var(--s);
  opacity: 0;
  animation: confetti-fall var(--d) cubic-bezier(.25, .6, .45, 1) var(--delay) forwards;
}
@keyframes confetti-fall {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 112vh, 0) rotate(var(--r)); }
}

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }

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