/* Adopt page specifics */

/* Dog illustration animations */
@keyframes dogBreathe {
  0%, 100% { transform: scaleY(1) scaleX(1); }
  50% { transform: scaleY(1.02) scaleX(1.008); }
}
@keyframes dogTail {
  0%, 100% { transform: rotate(-12deg); }
  50% { transform: rotate(12deg); }
}
@keyframes dogEar {
  0%, 100% { transform: rotate(0deg); }
  35% { transform: rotate(-3deg); }
  65% { transform: rotate(4deg); }
}
@keyframes dogHead {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-4deg); }
  50% { transform: rotate(2deg); }
  80% { transform: rotate(-1deg); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dog-illust-wrap {
  position: relative;
  background: linear-gradient(135deg, oklch(0.96 0.02 300), oklch(0.93 0.04 305));
}
.dog-illust-wrap[data-palette="cream"]   { background: linear-gradient(135deg, #fff5e6, #f5e7d4); }
.dog-illust-wrap[data-palette="lavender"] { background: linear-gradient(135deg, #f0ebf8, #e1d8ef); }
.dog-illust-wrap[data-palette="sage"]    { background: linear-gradient(135deg, #ecf0e8, #d8e2d3); }
.dog-illust-wrap[data-palette="rose"]    { background: linear-gradient(135deg, #fbeceb, #f1d7d5); }
.dog-illust-wrap[data-palette="sky"]     { background: linear-gradient(135deg, #e6eef5, #d2dfeb); }
.dog-illust-wrap[data-palette="gold"]    { background: linear-gradient(135deg, #fbf1dd, #efd7a7); }


.adopt-hero-filter {
  background: linear-gradient(180deg, oklch(0.22 0.06 310) 0%, oklch(0.32 0.1 305) 100%);
  color: #fff;
  padding: 48px 0 80px;
  position: relative; overflow: hidden;
}
.adopt-hero-filter::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, oklch(0.55 0.2 305 / 0.28), transparent 50%),
    radial-gradient(ellipse at 80% 80%, oklch(0.7 0.15 305 / 0.2), transparent 50%);
  pointer-events: none;
}
.adopt-hero-edit {
  background: var(--lav-50); color: var(--ink);
  padding: 56px 0 72px;
  position: relative; overflow: hidden;
}

/* Filter bar v2 — single row of 3 pills with inline option expansion */
.filter-bar-v2 {
  background: #fff;
  border: 1px solid var(--line-light);
  border-radius: 16px;
  margin-bottom: 20px;
  box-shadow: 0 1px 0 var(--line-light);
  overflow: hidden;
}
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 18px;
}
.filter-prompt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding-right: 6px;
}
.filter-chip {
  background: var(--lav-100);
  color: var(--ink-1);
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  transition: all .2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-weight: 500;
}
.filter-chip:hover { background: var(--lav-200); }
.filter-chip.active {
  background: var(--purple-soft);
  border-color: var(--purple-400);
  color: var(--purple-700);
}
.filter-chip.open {
  background: var(--purple-500);
  border-color: var(--purple-500);
  color: #fff;
}
.filter-chip .label { color: inherit; font-weight: 500; }
.filter-chip.active .label::after { content: ":"; margin-right: 4px; }
.filter-chip .value { font-weight: 600; }
.filter-chip:not(.active) .value { display: none; }

.filter-clear {
  font-size: 12px;
  color: var(--ink-3);
  padding: 0 8px;
  font-family: var(--font-ui);
  text-decoration: underline;
  text-decoration-color: var(--line-light);
  text-underline-offset: 3px;
  transition: color .2s;
}
.filter-clear:hover { color: var(--purple-700); }

.filter-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  padding-left: 10px;
  border-left: 1px solid var(--line-light);
}

.filter-options {
  background: var(--lav-50);
  border-top: 1px solid var(--line-light);
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  animation: fade .2s ease;
}
.filter-options .opt {
  padding: 8px 16px;
  background: #fff;
  border: 1.5px solid var(--line-light);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-2);
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.filter-options .opt:hover {
  border-color: var(--purple-400);
  color: var(--ink-1);
}
.filter-options .opt.sel {
  background: var(--purple-500);
  border-color: var(--purple-500);
  color: #fff;
}

/* Dropdown */
.chip-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; color: var(--ink);
  border-radius: 16px;
  box-shadow: 0 30px 80px -20px oklch(0 0 0 / 0.45);
  margin-top: 8px;
  padding: 8px;
  z-index: 30;
  animation: fade .15s ease;
  max-height: 280px; overflow-y: auto;
}
.chip-option {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .15s;
}
.chip-option:hover { background: var(--lav-100); }
.chip-option.sel { background: var(--purple-soft); color: var(--purple-700); font-weight: 600; }

/* Active chips row (below filter bar) */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.14); color: #fff;
  border-radius: 999px; padding: 6px 14px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.15);
}
.pill button { color: rgba(255,255,255,0.7); font-size: 14px; line-height: 1; }
.pill button:hover { color: #fff; }

/* Directory */
.directory {
  background: var(--lav-50); color: var(--ink);
  padding: 56px 0 72px;
  position: relative;
}

/* Masonry */
.dog-grid {
  column-count: 3;
  column-gap: 20px;
}
@media (max-width: 960px) {
  .dog-grid { column-count: 2; }
  .filter-btn { margin-left: 0; width: 100%; justify-content: center; }
}
/* Keep dogs 2-up on phones — single column made each portrait photo huge. */
@media (max-width: 600px) {
  .dog-grid { column-count: 2; column-gap: 14px; }
  .dog-card { margin-bottom: 14px; }
}
.dog-card {
  break-inside: avoid;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line-light);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  display: block;
  text-align: left;
  width: 100%;
  padding: 0;
  color: inherit;
}
.dog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.dog-card .img-wrap { position: relative; overflow: hidden; background: var(--lav-200); }
.dog-card .img-wrap img {
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.dog-card:hover .img-wrap img { transform: scale(1.05); }

.urgency-pill {
  position: absolute; top: 12px; left: 12px;
  background: oklch(0.9 0.08 25 / 0.95); color: oklch(0.4 0.15 25);
  padding: 5px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.urgency-pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.55 0.2 25); animation: pulse-red 1.6s ease-in-out infinite;
}
@keyframes pulse-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 oklch(0.55 0.2 25 / 0.5); }
  50% { opacity: 0.7; box-shadow: 0 0 0 5px oklch(0.55 0.2 25 / 0); }
}

.new-pill {
  position: absolute; top: 12px; left: 12px;
  background: var(--purple-500); color: #fff;
  padding: 5px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
}

.fav-btn {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.95);
  display: grid; place-items: center;
  font-size: 16px; color: var(--ink-3);
  transition: color .2s, transform .2s;
  cursor: pointer;
}
.fav-btn:hover { color: oklch(0.55 0.2 25); transform: scale(1.1); }
.fav-btn.on { color: oklch(0.55 0.2 25); }

/* Modal */
.profile-modal {
  background: #fff; color: var(--ink);
  border-radius: 24px;
  max-width: 960px; width: 100%;
  max-height: 92vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  box-shadow: var(--shadow);
  animation: pop .25s cubic-bezier(.2,.7,.3,1.3);
}
@media (max-width: 840px) {
  .profile-modal { grid-template-columns: 1fr; max-height: 100vh; border-radius: 0; overflow-y: auto; }
  /* Single column on phones: let the whole modal scroll as one. */
  .profile-modal .body { max-height: none; overflow: visible; }
}
.profile-modal .gallery {
  background: var(--lav-200);
  position: relative;
  min-height: 420px;
}
.profile-modal .gallery img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.profile-modal .body {
  padding: 32px;
  overflow-y: auto;
  max-height: 92vh;
  min-height: 0;
  display: flex; flex-direction: column;
}
.thumb-row {
  position: absolute; bottom: 16px; left: 16px; right: 16px;
  display: flex; gap: 8px; overflow-x: auto;
}
.thumb {
  width: 64px; height: 64px; flex-shrink: 0; border-radius: 10px;
  overflow: hidden; cursor: pointer; border: 2px solid transparent;
  opacity: 0.7; transition: opacity .2s, border-color .2s;
}
.thumb.sel { opacity: 1; border-color: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.stat-pair {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.stat-pair .sp {
  background: var(--lav-100); border-radius: 12px; padding: 12px 14px;
}
.stat-pair .sp .k {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 4px;
}
.stat-pair .sp .v { font-weight: 600; font-size: 14px; color: var(--ink); }

.traits { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
/* Card pills — each kind of marker gets its own soft, color-coded chip so a
   glance separates "new" from age, size, and temperament. */
.tag, .trait {
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 500; line-height: 1.3;
  padding: 5px 12px; border-radius: 999px;
  display: inline-flex; align-items: center; white-space: nowrap;
}
.trait    { background: oklch(0.93 0.05 152); color: oklch(0.40 0.08 158); }   /* good with — sage green */
.tag-good { background: oklch(0.93 0.05 152); color: oklch(0.40 0.08 158); }
.tag-age  { background: var(--lav-200);        color: var(--ink-2); }           /* age — lavender */
.tag-size { background: oklch(0.93 0.05 235);  color: oklch(0.42 0.09 245); }   /* size — soft blue */
.tag-new  { background: oklch(0.94 0.07 80);   color: oklch(0.47 0.12 62);      /* just arrived — warm amber */
  font-weight: 600; letter-spacing: 0.02em; }

/* Process */
.process-section {
  background: var(--plum-900); color: #fff;
  padding: 72px 0;
  position: relative; overflow: hidden;
}
.process-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 40px;
}
@media (max-width: 800px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
}
.process-step {
  position: relative;
  padding-top: 8px;
}
.process-step .num {
  font-family: var(--font-display); font-size: 56px; font-weight: 700;
  color: var(--purple-400); line-height: 1; margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.process-step h4 {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  margin: 0 0 8px; color: #fff;
}
.process-step p {
  margin: 0; color: var(--on-dark-2); font-size: 14px; line-height: 1.55;
}

/* ===== Find your match ================================================== */
.match-cta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--purple-soft), var(--lav-100));
  border: 1px solid var(--lav-200); border-radius: 18px;
  padding: 18px 22px; margin-bottom: 22px;
}
.match-cta-title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.match-cta-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }

/* quiz modal */
.match-modal {
  position: relative; background: #fff; border-radius: 24px;
  width: min(440px, calc(100% - 32px)); padding: 30px 30px 22px;
  box-shadow: var(--shadow);
}
.match-close {
  position: absolute; top: 14px; right: 16px; width: 32px; height: 32px;
  border: 0; background: var(--lav-100); border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--ink-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.match-close:hover { background: var(--lav-200); color: var(--ink); }
.match-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--purple-600); font-weight: 600;
}
.match-dots { display: flex; gap: 6px; margin: 14px 0 18px; }
.match-dot { width: 26px; height: 5px; border-radius: 999px; background: var(--lav-200); transition: background .25s ease; }
.match-dot.on { background: var(--purple-500); }
.match-q { font-size: 26px; margin: 0 0 4px; color: var(--ink); }
.match-sub { font-size: 13.5px; color: var(--ink-3); margin: 0 0 18px; }
.match-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match-opt {
  font-family: var(--font-ui); font-size: 15px; font-weight: 600; color: var(--ink);
  background: var(--lav-50); border: 1.5px solid var(--lav-200); border-radius: 14px;
  padding: 18px 14px; cursor: pointer; text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .12s ease;
}
.match-opt:hover { border-color: var(--purple-400); background: var(--purple-soft); transform: translateY(-2px); }
.match-opt:active { transform: scale(0.98); }
.match-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.match-back, .match-skip {
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; font-weight: 600; color: var(--ink-3); padding: 4px;
}
.match-back:hover, .match-skip:hover { color: var(--ink); }

/* featured result */
.match-feature {
  position: relative; background: #fff;
  border: 1.5px solid var(--purple-400); border-radius: 24px;
  padding: 18px; margin-bottom: 24px;
  box-shadow: 0 0 0 4px var(--purple-soft), 0 18px 44px -26px rgba(120, 60, 200, 0.4);
}
.match-feature-clear {
  position: absolute; top: 12px; right: 14px; width: 28px; height: 28px; z-index: 2;
  border: 0; background: var(--lav-100); border-radius: 50%;
  font-size: 18px; line-height: 1; color: var(--ink-3); cursor: pointer;
}
.match-feature-clear:hover { background: var(--lav-200); color: var(--ink); }
.match-feature-main { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 22px; align-items: center; }
@media (max-width: 680px) { .match-feature-main { grid-template-columns: 1fr; } }
.match-feature-photo {
  position: relative; aspect-ratio: 4/5; max-height: 300px;
  border-radius: 18px; overflow: hidden; background: var(--lav-200); cursor: pointer;
}
.match-feature-badge { position: absolute; top: 12px; left: 12px; }
.match-feature-name { font-size: 34px; margin: 6px 0 4px; color: var(--ink); }
.match-feature-meta {
  font-family: var(--font-ui); font-size: 12px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--purple-600); font-weight: 600; margin-bottom: 10px;
}
.match-feature-bio { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin: 0 0 12px; }
.match-feature-why { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.match-feature-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.match-retake { background: none; border: 0; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--purple-600); }
.match-retake:hover { color: var(--purple-700); text-decoration: underline; }
.match-alts { margin-top: 18px; border-top: 1px solid var(--line-light); padding-top: 16px; }
.match-alts-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 10px;
}
.match-alts-row { display: flex; gap: 12px; flex-wrap: wrap; }
.match-alt {
  display: flex; align-items: center; gap: 10px;
  background: var(--lav-50); border: 1px solid var(--lav-200); border-radius: 14px;
  padding: 8px 14px 8px 8px; cursor: pointer;
  transition: border-color .15s ease, transform .12s ease;
}
.match-alt:hover { border-color: var(--purple-400); transform: translateY(-2px); }
.match-alt-photo { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: var(--lav-200); flex-shrink: 0; }
.match-alt-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.match-alt-meta { font-size: 11px; color: var(--ink-3); }
