/* ==========================================================================
   Sunbeam Paws — Editorial Warm Pet Rescue Stylesheet
   Pure CSS with custom properties, fluid typography & smooth animations.
   Easy to re-theme for your own portfolio!
   ========================================================================== */

:root {
  /* Palette */
  --bg: #fbf7f0;
  --bg-soft: #f3eadb;
  --surface: #ffffff;
  --surface-tint: #fffcf7;
  --ink: #1f2a24;
  --ink-muted: #526158;
  --ink-soft: #75847b;
  --accent: #e26d47;
  --accent-hover: #cf5b35;
  --accent-soft: #fce8df;
  --sage: #4a7860;
  --sage-soft: #e3efe8;
  --amber: #e6ae3e;
  --border: rgba(31, 42, 36, 0.1);
  --border-strong: rgba(31, 42, 36, 0.18);

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radii & Shadows */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-pill: 999px;
  --shadow-sm: 0 6px 20px rgba(31, 42, 36, 0.06);
  --shadow-md: 0 18px 45px rgba(31, 42, 36, 0.09);
  --shadow-lg: 0 30px 70px rgba(31, 42, 36, 0.14);

  /* Motion */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font-family: inherit;
}

.container {
  width: min(1160px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Confetti Overlay */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.28s var(--ease-spring), background 0.25s ease, color 0.25s ease, box-shadow 0.28s var(--ease-spring), border-color 0.25s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-sm {
  padding: 0.62rem 1.2rem;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 0.95rem 1.65rem;
  font-size: 0.98rem;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(226, 109, 71, 0.28);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(226, 109, 71, 0.36);
}

.btn-primary svg {
  transition: transform 0.3s var(--ease-spring);
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--surface);
  border-color: var(--ink);
  transform: translateY(-2px);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.35s ease, padding 0.35s var(--ease-spring), box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

.site-header.is-scrolled {
  padding: 0.65rem 0;
  background: rgba(251, 247, 240, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(31, 42, 36, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--bg);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(226, 109, 71, 0.28);
  transition: transform 0.35s var(--ease-bounce);
}

.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text small {
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.nav-links a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-muted);
  position: relative;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-spring);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-saved {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.btn-saved:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.saved-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  transition: transform 0.3s var(--ease-bounce);
}

.saved-count.pop {
  transform: scale(1.32);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  padding: 0 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.mobile-nav {
  margin: 0.75rem 1.25rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  color: var(--ink);
}

.mobile-nav a:hover {
  background: var(--bg-soft);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  padding: 8.5rem 0 4.5rem;
  overflow: hidden;
}

#sunbeam-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-glow-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(230, 174, 62, 0.26), transparent 70%);
  top: -110px;
  right: 8%;
  animation: driftGlow 14s ease-in-out infinite alternate;
}

.hero-glow-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(226, 109, 71, 0.16), transparent 70%);
  bottom: -120px;
  left: -60px;
  animation: driftGlow 18s ease-in-out infinite alternate-reverse;
}

@keyframes driftGlow {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(36px, 28px) scale(1.1); }
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 3.5rem;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 1.4rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sage);
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--sage);
  animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.7); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 5.2vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0 0 1.4rem;
  color: var(--ink);
}

.accent-underline {
  position: relative;
  display: inline-block;
  color: var(--accent);
  font-style: italic;
}

.swoosh {
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: -6px;
  width: calc(100% + 8px);
  height: 16px;
  color: var(--amber);
}

.swoosh path {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: drawSwoosh 1.2s var(--ease-spring) 0.55s forwards;
}

@keyframes drawSwoosh {
  to { stroke-dashoffset: 0; }
}

.hero-subtitle {
  font-size: 1.08rem;
  color: var(--ink-muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.2rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.hero-trust p {
  margin: 0;
}

.avatar-stack {
  display: flex;
}

.avatar-stack img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--bg);
  margin-left: -10px;
  box-shadow: 0 4px 10px rgba(31, 42, 36, 0.12);
}

.avatar-stack img:first-child {
  margin-left: 0;
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
}

.hero-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  transform-style: preserve-3d;
  transition: transform 0.25s ease-out;
}

.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 22px;
}

.floating-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.05rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(31, 42, 36, 0.08);
  box-shadow: 0 16px 36px rgba(31, 42, 36, 0.13);
  line-height: 1.25;
}

.floating-badge strong {
  display: block;
  font-size: 0.88rem;
  color: var(--ink);
}

.floating-badge small {
  font-size: 0.76rem;
  color: var(--ink-muted);
}

.badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff4dd;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.badge-top {
  top: -18px;
  left: -20px;
  animation: floatGentle 5.5s ease-in-out infinite;
}

.badge-bottom {
  bottom: -18px;
  right: -16px;
  animation: floatGentle 6.4s ease-in-out infinite reverse;
}

.status-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 5px var(--sage-soft);
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ==========================================================================
   Impact Counter Strip
   ========================================================================== */
.impact-strip {
  padding: 1.5rem 0 3.5rem;
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring);
}

.impact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.impact-number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.65rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.impact-label {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
}

/* ==========================================================================
   Common Section Typography
   ========================================================================== */
.section {
  padding: 5rem 0;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.85rem;
}

.section-tag.tag-light {
  background: rgba(251, 247, 240, 0.14);
  color: #f6c96b;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.section-head.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0;
}

.section-lead {
  color: var(--ink-muted);
  max-width: 48ch;
  margin: 0;
  font-size: 1rem;
}

/* ==========================================================================
   Adoptable Pets Gallery
   ========================================================================== */
.pet-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-pill {
  padding: 0.62rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.filter-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-1px);
}

.filter-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  box-shadow: 0 8px 20px rgba(31, 42, 36, 0.2);
}

.search-wrap {
  position: relative;
  min-width: 260px;
  flex: 0 1 320px;
}

.search-wrap svg {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  padding: 0.72rem 1rem 0.72rem 2.7rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(226, 109, 71, 0.14);
}

.pets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.pet-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-spring);
  animation: cardEnter 0.5s var(--ease-spring) backwards;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pet-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.pet-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
}

.pet-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-spring);
}

.pet-card:hover .pet-media img {
  transform: scale(1.06);
}

.pet-species-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 0.35rem 0.78rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(31, 42, 36, 0.1);
}

.fav-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  color: var(--ink-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(31, 42, 36, 0.12);
  transition: transform 0.3s var(--ease-bounce), color 0.2s ease, background 0.2s ease;
}

.fav-btn:hover {
  transform: scale(1.12);
  color: var(--accent);
}

.fav-btn.is-fav {
  color: var(--accent);
  background: #fff;
}

.fav-btn.is-fav svg {
  fill: var(--accent);
  animation: heartPop 0.45s var(--ease-bounce);
}

@keyframes heartPop {
  0% { transform: scale(0.6); }
  55% { transform: scale(1.32); }
  100% { transform: scale(1); }
}

.heart-burst {
  position: fixed;
  pointer-events: none;
  font-size: 14px;
  z-index: 999;
  animation: burstFloat 0.85s var(--ease-spring) forwards;
}

@keyframes burstFloat {
  0% { opacity: 1; transform: translate(0, 0) scale(0.7); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.25); }
}

.pet-body {
  padding: 1.35rem 1.4rem 1.45rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pet-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.pet-name {
  font-family: var(--font-display);
  font-size: 1.48rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.pet-age {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--sage);
  background: var(--sage-soft);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
}

.pet-breed {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
}

.pet-bio {
  font-size: 0.93rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.pet-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.pet-tag {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.3rem 0.68rem;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--ink-muted);
}

.pet-card-btn {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-tint);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.25s var(--ease-spring);
}

.pet-card-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.empty-state {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
}

.empty-state[hidden] {
  display: none;
}

.empty-emoji {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Interactive Soulmate Match Quiz
   ========================================================================== */
.matcher-shell {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.8rem);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.matcher-shell::before {
  content: '';
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 109, 71, 0.28), transparent 70%);
  top: -160px;
  right: -120px;
  pointer-events: none;
}

.matcher-header {
  position: relative;
  max-width: 600px;
  margin-bottom: 2rem;
}

.matcher-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  margin: 0 0 0.65rem;
  line-height: 1.12;
}

.matcher-header p {
  margin: 0;
  color: rgba(251, 247, 240, 0.78);
}

.matcher-progress {
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(251, 247, 240, 0.14);
  overflow: hidden;
  margin-bottom: 2.2rem;
}

.matcher-progress-fill {
  height: 100%;
  width: 33%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--amber), var(--accent));
  transition: width 0.5s var(--ease-spring);
}

.matcher-stage {
  position: relative;
  min-height: 230px;
}

.quiz-step {
  animation: fadeSlideUp 0.45s var(--ease-spring);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-question {
  font-family: var(--font-display);
  font-size: 1.45rem;
  margin: 0 0 1.35rem;
  font-weight: 500;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.quiz-option {
  text-align: left;
  padding: 1.35rem;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(251, 247, 240, 0.16);
  background: rgba(251, 247, 240, 0.06);
  color: var(--bg);
  cursor: pointer;
  transition: transform 0.28s var(--ease-spring), background 0.25s ease, border-color 0.25s ease;
}

.quiz-option:hover {
  background: rgba(251, 247, 240, 0.13);
  border-color: var(--amber);
  transform: translateY(-4px);
}

.quiz-option-emoji {
  font-size: 1.7rem;
  display: block;
  margin-bottom: 0.65rem;
}

.quiz-option strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 0.3rem;
}

.quiz-option span {
  font-size: 0.86rem;
  color: rgba(251, 247, 240, 0.72);
}

/* Quiz Result Card */
.quiz-result {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: center;
  background: rgba(251, 247, 240, 0.07);
  border: 1px solid rgba(251, 247, 240, 0.14);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  animation: fadeSlideUp 0.55s var(--ease-spring);
}

.quiz-result img {
  width: 220px;
  height: 220px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.match-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: rgba(230, 174, 62, 0.2);
  color: #f9d17b;
  font-weight: 700;
  font-size: 0.84rem;
  margin-bottom: 0.75rem;
}

.quiz-result h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.5rem;
}

.quiz-result p {
  margin: 0 0 1.25rem;
  color: rgba(251, 247, 240, 0.82);
}

.quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-ghost-light {
  background: transparent;
  color: var(--bg);
  border: 1.5px solid rgba(251, 247, 240, 0.28);
}

.btn-ghost-light:hover {
  background: rgba(251, 247, 240, 0.12);
  border-color: var(--bg);
}

/* ==========================================================================
   How Adoption Works
   ========================================================================== */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}

.process-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s var(--ease-spring);
}

.process-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.15rem;
}

.process-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.55rem;
}

.process-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Happy Tails Carousel
   ========================================================================== */
.stories-section {
  background: var(--bg-soft);
}

.carousel-controls {
  display: flex;
  gap: 0.65rem;
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.icon-btn:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
  transform: scale(1.06);
}

.stories-viewport {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.stories-track {
  display: flex;
  transition: transform 0.6s var(--ease-spring);
}

.story-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: 1px solid var(--border);
}

.story-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
}

.story-quote {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.3vw, 1.75rem);
  line-height: 1.38;
  margin: 0 0 1.4rem;
  color: var(--ink);
}

.story-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.story-author strong {
  display: block;
  font-size: 1rem;
}

.story-author small {
  color: var(--ink-muted);
}

.story-badge {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  background: var(--sage-soft);
  color: var(--sage);
  font-size: 0.82rem;
  font-weight: 700;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: rgba(31, 42, 36, 0.22);
  cursor: pointer;
  padding: 0;
  transition: width 0.35s var(--ease-spring), background 0.25s ease;
}

.carousel-dot.is-active {
  width: 30px;
  background: var(--accent);
}

/* ==========================================================================
   Support / Sponsor Section
   ========================================================================== */
.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4.5vw, 3.5rem);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.support-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  line-height: 1.12;
  margin: 0 0 0.85rem;
}

.support-copy > p {
  color: var(--ink-muted);
  margin: 0 0 1.6rem;
}

.tier-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.tier-pill {
  padding: 0.68rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s var(--ease-spring);
}

.tier-pill:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tier-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(226, 109, 71, 0.28);
}

.impact-preview {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.impact-preview-icon {
  font-size: 1.5rem;
}

.impact-preview p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-muted);
}

.support-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.demo-note {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.support-meter-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}

.meter-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.meter-header strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sage);
}

.goal-bar {
  height: 12px;
  border-radius: var(--radius-pill);
  background: rgba(31, 42, 36, 0.1);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.goal-bar-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--sage), #74a98c);
  transition: width 0.7s var(--ease-spring);
}

.meter-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.meter-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.meter-stats small {
  color: var(--ink-muted);
  font-size: 0.82rem;
}

.perk-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(251, 247, 240, 0.8);
  padding: 4.5rem 0 2.2rem;
}

.site-footer .brand-text strong {
  color: var(--bg);
}

.site-footer .brand-text small {
  color: rgba(251, 247, 240, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(251, 247, 240, 0.12);
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.92rem;
  max-width: 34ch;
}

.site-footer h4 {
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 1.08rem;
  margin: 0 0 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.9rem;
}

.site-footer ul a:hover {
  color: var(--amber);
}

.footer-mini {
  font-size: 0.88rem;
  margin: 0 0 0.85rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(251, 247, 240, 0.22);
  background: rgba(251, 247, 240, 0.08);
  color: var(--bg);
  font-size: 0.88rem;
  outline: none;
}

.newsletter-form input:focus {
  border-color: var(--amber);
}

.footer-bottom {
  padding-top: 1.6rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.84rem;
  color: rgba(251, 247, 240, 0.55);
}

.footer-bottom p {
  margin: 0;
}

/* ==========================================================================
   Modal (Pet Detail + Meet Form)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(21, 29, 25, 0.62);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1.25rem;
  animation: fadeIn 0.25s ease;
}

.modal-backdrop[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: min(90vh, 760px);
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: clamp(1.4rem, 3.5vw, 2.4rem);
  animation: modalPop 0.38s var(--ease-spring);
}

@keyframes modalPop {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.25s var(--ease-spring), background 0.2s ease;
}

.modal-close:hover {
  background: var(--ink);
  color: var(--bg);
  transform: rotate(90deg);
}

.modal-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 2rem;
  align-items: start;
}

.modal-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 1rem;
}

.vet-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vet-pill {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.72rem;
  border-radius: var(--radius-pill);
  background: var(--sage-soft);
  color: var(--sage);
}

.modal-info h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 0.25rem;
}

.modal-sub {
  color: var(--ink-soft);
  margin: 0 0 1rem;
  font-size: 0.94rem;
}

.modal-story {
  color: var(--ink-muted);
  margin: 0 0 1.3rem;
  font-size: 0.95rem;
}

.trait-meters {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.trait-row {
  display: grid;
  grid-template-columns: 118px 1fr 38px;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.trait-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  overflow: hidden;
}

.trait-bar-fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--amber), var(--accent));
  transition: width 0.8s var(--ease-spring);
}

.inquiry-form {
  display: grid;
  gap: 0.75rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.inquiry-form h4 {
  margin: 0 0 0.2rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.inquiry-form input {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 0.9rem;
  outline: none;
}

.inquiry-form input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast-region {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 900;
  display: grid;
  gap: 0.65rem;
  max-width: min(360px, calc(100vw - 2rem));
}

.toast {
  background: var(--ink);
  color: var(--bg);
  padding: 0.95rem 1.2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.4s var(--ease-spring);
}

.toast.is-leaving {
  animation: toastOut 0.3s ease forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(18px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(10px) scale(0.96); }
}

/* ==========================================================================
   Scroll Reveal Utility
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-spring) var(--delay, 0ms), transform 0.75s var(--ease-spring) var(--delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.8rem;
  }

  .hero-visual {
    max-width: 620px;
    margin-inline: auto;
  }

  .pets-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .support-card,
  .story-slide,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quiz-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .header-actions .btn-primary,
  .saved-label {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding-top: 6.8rem;
  }

  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pets-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .badge-top {
    left: 10px;
    top: -14px;
  }

  .badge-bottom {
    right: 10px;
    bottom: -14px;
  }

  .quiz-result,
  .modal-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .quiz-result img {
    width: 100%;
    height: 240px;
  }
}

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