/* ---------- Cat Rescue and Rehome — shared styles ---------- */

:root {
  --ink: #2b2420;
  --muted: #6b6058;
  --paper: #e9f2e6;
  --card: #ffffff;
  --accent: #e0723c;
  --accent-dark: #c85a28;
  --line: #ece3d6;
  --good: #3f7d4f;
  --good-bg: #e6f2e8;
  --warn-bg: #f4ece0;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(43, 36, 32, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

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

.site-header {
  position: relative;
  overflow: visible;
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
}

.header-peek {
  position: absolute;
  width: 64px;
  bottom: -14px;
  filter: drop-shadow(0 3px 4px rgba(43, 36, 32, 0.18));
}

.header-peek.left { left: 6px; }
.header-peek.right { right: 6px; transform: scaleX(-1); }

@media (max-width: 480px) {
  .header-peek { width: 42px; bottom: -8px; }
}

.site-header h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  letter-spacing: -0.02em;
}

.site-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

/* ---------- Cat grid on the home page ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.cat-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cat-card .card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 44px;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  z-index: 2;
  background: none;
  filter: drop-shadow(0 2px 4px rgba(43, 36, 20, 0.35));
}

.cat-card .card-badge.badge-small {
  width: 30px;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(43, 36, 32, 0.14);
}

.cat-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--line);
}

.cat-card-body {
  padding: 1rem 1.1rem 1.2rem;
}

.cat-name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.cat-name-row h2 {
  margin: 0;
  font-size: 1.3rem;
}

.cat-sex {
  font-size: 0.85rem;
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0 0.65rem;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--muted);
  white-space: nowrap;
}

.badge.good {
  background: var(--good-bg);
  color: var(--good);
}

.traits {
  font-size: 0.85rem;
  color: var(--accent-dark);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.bio-excerpt {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Cat detail page ---------- */

.back-link {
  display: inline-block;
  margin: 1.5rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--accent-dark);
  font-weight: 600;
}

.detail-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.detail-header h1 {
  margin: 0;
  font-size: 2.1rem;
}

.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--line);
}

.gallery .main-photo {
  grid-row: 1 / 3;
}

.gallery.single {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.gallery.single .main-photo {
  grid-row: auto;
  aspect-ratio: 4 / 3;
}

.detail-section {
  margin: 1.75rem 0;
}

.detail-section h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.detail-section p {
  margin: 0;
}

.detail-birthdate {
  margin-top: 0.6rem !important;
  color: var(--muted);
  font-size: 0.9rem;
}

.trait-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.trait-pill {
  background: var(--warn-bg);
  color: var(--ink);
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

/* ---------- Inquiry form ---------- */

.inquiry-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-top: 1rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
}

.form-row .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.8rem;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.form-row textarea {
  resize: vertical;
  min-height: 100px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .two-col { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .gallery .main-photo { grid-row: auto; grid-column: 1 / 3; }
}

.submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:hover { background: var(--accent-dark); }

.submit-btn:disabled {
  opacity: 0.7;
  cursor: default;
}

.form-error {
  background: #fbe8e4;
  color: #9c3b2c;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

/* honeypot field — hidden from real visitors, tries to catch spam bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 2rem 1rem 3rem;
}

.site-footer p, .site-footer a {
  margin: 0;
}

.footer-mascot {
  display: block;
  width: 96px;
  margin: 0 auto 0.5rem;
}

.detail-peek {
  width: 52px;
  vertical-align: middle;
  margin-right: 0.5rem;
  filter: drop-shadow(0 2px 4px rgba(43, 36, 20, 0.25));
}

.detail-peek.badge-small {
  width: 38px;
}

@media (min-width: 521px) {
  .detail-section-contact {
    margin-top: 3.25rem;
  }
}

/* ---------- Life stories ---------- */

.story-teaser {
  background: rgba(224, 114, 60, 0.08);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.story-teaser h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
}

.story-teaser p {
  margin: 0 0 0.75rem;
}

.story-link {
  font-weight: 600;
  color: var(--accent-dark);
}

.story-link:hover {
  text-decoration: underline;
}

.story-summary {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0.5rem 0 1.25rem;
}

.story-featured-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.story-cat-pill {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.story-cat-pill:hover {
  background: var(--warn-bg);
}

.story-chapter {
  border-top: 1px solid var(--line);
  padding-top: 1.75rem;
}

.story-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.story-photo {
  margin: 0;
}

.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--line);
  display: block;
}

.story-photo figcaption {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ---------- Thank-you page ---------- */

.thanks-wrap {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}

.thanks-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 480px;
  width: 100%;
  padding: 3rem 2rem;
  text-align: center;
}

.thanks-paws {
  font-size: 1.3rem;
  letter-spacing: 0.5rem;
  opacity: 0.6;
  margin-bottom: 0.5rem;
}

.thanks-emoji {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  animation: thanks-pop 0.5s ease;
}

@keyframes thanks-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

.thanks-card h1 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
}

.thanks-card p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.thanks-subtext {
  font-size: 0.9rem;
}

.thanks-btn {
  display: inline-block;
  margin-top: 0.75rem;
  text-decoration: none;
}
