:root {
  --color-bg: #0f3d3e;
  --color-bg-alt: #123f40;
  --color-panel: #164a4b;
  --color-accent: #f2c879;
  --color-accent-soft: #e7b96a;
  --color-text: #eef4f2;
  --color-text-muted: #b7c9c6;
  --color-border: #2a5f60;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.site-header {
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-accent);
}

.site-header .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.brand span {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
}

.main-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--color-text-muted);
  font-weight: 600;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--color-accent);
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  overflow: hidden;
  padding: 90px 24px;
  text-align: center;
  margin-bottom: 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,61,62,0.55), rgba(15,61,62,0.85));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.6rem;
  margin: 0 0 8px;
  color: var(--color-text);
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-accent-soft);
  margin: 0 0 24px;
}

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #1a1a1a;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  background: var(--color-accent-soft);
  text-decoration: none;
}

section {
  margin-bottom: 48px;
}

h2 {
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.card {
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 18px 20px;
}

.card h3 {
  margin-top: 0;
  color: var(--color-text);
}

.card p {
  color: var(--color-text-muted);
}

.card a.card-link {
  font-weight: 600;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.placeholder-note {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.pet-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}

.status-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.status-available {
  background: #2e7d32;
  color: #eef4f2;
}

.status-pending {
  background: #c9960c;
  color: #1a1a1a;
}

.status-adopted {
  background: #555;
  color: #eef4f2;
}

.site-footer {
  background: var(--color-bg-alt);
  border-top: 2px solid var(--color-accent);
  text-align: center;
  padding: 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ---- Rescue page ---- */
.rescue-intro {
  background: linear-gradient(135deg, var(--color-panel), var(--color-bg-alt));
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 28px 28px 20px;
  margin-bottom: 40px;
}

.rescue-intro h1 { margin-top: 0; }
.rescue-jump { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  padding: 10px 26px;
}

.btn-outline:hover { background: rgba(242,200,121,0.12); }
.btn-small { padding: 8px 18px; font-size: 0.9rem; }

.chip-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

.chip {
  background: var(--color-panel);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 16px;
  font: inherit;
  cursor: pointer;
}

.chip.active, .chip:hover { background: var(--color-accent); color: #1a1a1a; border-color: var(--color-accent); }

.pet-card, .tail-card { padding: 0; overflow: hidden; margin: 0; }
.pet-card > :not(.photo-wrap), .tail-card figcaption { padding-left: 20px; padding-right: 20px; }
.pet-card h3 { margin: 16px 0 2px; }
.pet-card .pet-kind { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-accent-soft); }
.pet-card .btn { margin: 0 20px 20px; }
.pet-card > p:last-child { padding-bottom: 18px; }

.pet-card .photo-wrap, .tail-card { position: relative; }
.pet-card .pet-photo, .tail-card .pet-photo { margin-bottom: 0; border-radius: 0; aspect-ratio: 1 / 1; }
.pet-card .status-badge { position: absolute; top: 12px; left: 12px; margin: 0; }
.pet-card .fixed-badge {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 0.72rem; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: rgba(15,61,62,0.78); color: var(--color-text); border: 1px solid rgba(238,244,242,0.35);
}
.pet-card.is-adopted .pet-photo { filter: grayscale(0.6); }
.pet-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.tails-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }

.tail-thumbs { display: flex; gap: 6px; padding: 8px 20px 0; }
.tail-thumb { width: 54px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: 0.65; }
.tail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tail-thumb.active, .tail-thumb:hover { opacity: 1; border-color: var(--color-accent); }
.tail-card figcaption { padding-top: 14px; padding-bottom: 8px; }
.tail-card h3 { margin: 0; }
.tail-card .tail-family { margin: 0 0 8px; font-size: 0.9rem; color: var(--color-accent-soft); }

.share-callout {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: var(--color-panel); border: 1px dashed var(--color-accent); border-radius: 10px;
  padding: 8px 24px; margin-top: 16px;
}
.share-callout p { margin: 12px 0; flex: 1; min-width: 240px; }

/* Whole-card click: cards whose only interactive element is a single .card-link.
   Cards with buttons, embeds, or any other link are left alone. */
.card:has(a.card-link):not(:has(.btn, iframe, a:not(.card-link))) {
  position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.card:has(a.card-link):not(:has(.btn, iframe, a:not(.card-link))) a.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card:has(a.card-link):not(:has(.btn, iframe, a:not(.card-link))):hover {
  border-color: var(--color-accent);
  background-color: #1b5657;
}

.card:has(a.card-link:focus-visible):not(:has(.btn, iframe, a:not(.card-link))) {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Home page scrolling "how to join the show" banner */
.announce-banner {
  background: var(--color-accent);
  color: #1a1a1a;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 2px solid var(--color-bg-alt);
}

.announce-track {
  display: inline-flex;
  animation: announce-scroll 28s linear infinite;
}

.announce-banner:hover .announce-track,
.announce-banner:focus-within .announce-track,
.announce-banner:active .announce-track {
  animation-play-state: paused;
}

.announce-group {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.announce-group a {
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: underline;
  padding: 12px 0;
}

.announce-group .sep { margin: 0 28px; opacity: 0.6; }
.announce-group span.msg { padding: 12px 0; }

@keyframes announce-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .announce-banner { white-space: normal; text-align: center; }
  .announce-track { animation: none; display: block; }
  .announce-group[aria-hidden="true"] { display: none; }
  .announce-group { flex-wrap: wrap; justify-content: center; padding: 4px 12px; }
}

/* Lightshows page: "join the show" panel */
.join-show {
  background: var(--color-panel);
  border: 2px solid var(--color-accent);
  border-radius: 12px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.join-show h2 { margin-top: 0; border-bottom: 0; padding-bottom: 0; }
.join-show .qr { text-align: center; }
.join-show .qr img { width: 170px; background: #fff; padding: 10px; border-radius: 8px; margin: 0 auto 8px; }
.join-show .qr p { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }

.btn-large { font-size: 1.2rem; padding: 16px 34px; }

.steps { margin: 18px 0; padding-left: 1.3em; }
.steps li { margin-bottom: 10px; }
.steps strong { color: var(--color-accent); }

/* app.html: install instructions for the Light Up Arizona app */
.callout {
  background: #3a2f12;
  border: 2px solid var(--color-accent);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 24px;
}
.callout[hidden] { display: none; }

.map-embed {
  display: block;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-panel);
}

.app-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 24px 0 12px; }
.app-steps .card.is-mine { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }

@media (max-width: 700px) {
  .app-steps { grid-template-columns: 1fr; }
  .app-page .join-show .qr { display: none; }
}

@media (max-width: 700px) {
  .join-show { grid-template-columns: 1fr; padding: 20px; }
  .join-show .btn-large { display: block; text-align: center; padding: 16px 12px; font-size: 1.1rem; }
}

/* Footer tip jar (look changes by season; see js/nav.js) */
.site-footer p { margin: 0 auto 14px; max-width: 560px; }
.site-footer .copyright { margin: 18px auto 0; }

.tip-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--color-accent);
  color: #1a1a1a;
}
.tip-btn:hover { text-decoration: none; filter: brightness(1.1); }
.tip-btn[data-season="halloween"] { background: #ff6600; color: #111; box-shadow: 0 0 12px rgba(255, 102, 0, 0.5); }
.tip-btn[data-season="christmas"] { background: #b3261e; color: #fff; box-shadow: 0 0 0 2px #2e7d32, 0 0 12px rgba(46, 125, 50, 0.5); }

/* pet cards open a detail pop-up */
.pet-card.is-clickable { cursor: pointer; transition: transform .12s, border-color .12s; }
.pet-card.is-clickable:hover, .pet-card.is-clickable:focus-visible { transform: translateY(-3px); border-color: var(--color-accent); outline: none; }
.pet-card .pet-bio { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pet-card .pet-more { margin: 0; padding-bottom: 14px; font-size: 0.85rem; font-weight: 600; color: var(--color-accent); }
.pet-card .photo-count {
  position: absolute; bottom: 10px; right: 10px; font-size: 0.75rem; font-weight: 600; padding: 3px 9px;
  border-radius: 999px; background: rgba(15,61,62,0.78); color: var(--color-text);
}

#pet-dialog {
  width: min(960px, 94vw); max-height: 92vh; padding: 0; overflow-y: auto; overflow-x: hidden;
  background: var(--color-bg-alt); color: var(--color-text);
  border: 1px solid var(--color-accent); border-radius: 12px;
}
#pet-dialog::backdrop { background: rgba(0,0,0,0.72); }
.dialog-close {
  position: absolute; top: 8px; right: 12px; z-index: 2; width: 38px; height: 38px;
  border: 0; border-radius: 50%; background: rgba(15,61,62,0.85); color: var(--color-text);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.dialog-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; padding: 20px; }
.gallery-main { width: 100%; max-height: 70vh; object-fit: contain; background: #0c2f30; border-radius: 8px; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gallery-thumb { width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: 0.65; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { opacity: 1; border-color: var(--color-accent); }
.dialog-info h2 { margin-top: 0; border: 0; padding-right: 36px; }
.dialog-tags { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dialog-tags .status-badge { margin: 0; }
.tag { font-size: 0.8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--color-border); color: var(--color-text-muted); }
.dialog-bio { white-space: pre-line; color: var(--color-text-muted); }

@media (max-width: 700px) {
  .dialog-body { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero {
    padding: 60px 16px;
  }
  .hero h1 {
    font-size: 2rem;
  }
}
