*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #FDF8F3;
  --warm: #F5EDE0;
  --orange: #E8612A;
  --orange-light: #F28C5E;
  --brown: #3D2314;
  --brown-mid: #6B3F25;
  --green: #2D6A4F;
  --text: #2C1810;
  --muted: #7A6055;
  --card-bg: #FFFFFF;
  --shadow: 0 4px 24px rgba(61,35,20,0.10);
  --radius: 18px;
}

html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--cream); color: var(--text); }

/* NAV */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 5%; position: sticky; top: 0; z-index: 100;
  background: rgba(253,248,243,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232,97,42,0.12);
}
.nav-logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--orange); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--brown-mid); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--orange); }
.nav-cta {
  background: var(--orange); color: white !important; padding: 10px 22px;
  border-radius: 50px; font-weight: 600; transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--brown-mid) !important; transform: translateY(-1px); }

/* HERO */
.hero {
  min-height: 88vh; display: flex; align-items: center; justify-content: space-between;
  padding: 80px 5% 60px; gap: 40px; position: relative; overflow: hidden;
}
.hero-blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.25; pointer-events: none;
}
.blob1 { width: 500px; height: 500px; background: var(--orange-light); top: -100px; right: -100px; }
.blob2 { width: 350px; height: 350px; background: #F9D8C0; bottom: -80px; left: 10%; }

.hero-content { max-width: 560px; animation: fadeUp 0.8s ease both; }
.hero-tag {
  display: inline-block; background: var(--warm); color: var(--orange);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 6px 16px; border-radius: 50px; margin-bottom: 20px;
  border: 1px solid rgba(232,97,42,0.2);
}
.hero-title {
  font-family: 'Playfair Display', serif; font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 1.12; color: var(--brown); margin-bottom: 20px;
}
.hero-title em { color: var(--orange); font-style: italic; }
.hero-sub { color: var(--muted); font-size: 1.05rem; line-height: 1.65; margin-bottom: 36px; max-width: 460px; }

.hero-search {
  display: flex; gap: 10px; flex-wrap: wrap;
  background: white; padding: 10px; border-radius: 16px;
  box-shadow: var(--shadow); border: 1px solid rgba(232,97,42,0.12);
}
.hero-search select {
  flex: 1; min-width: 130px; padding: 12px 14px; border: 1px solid #EDD9CC;
  border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 0.92rem;
  background: var(--cream); color: var(--text); cursor: pointer;
}
.hero-search button {
  background: var(--orange); color: white; border: none; padding: 12px 26px;
  border-radius: 10px; font-family: 'DM Sans', sans-serif; font-weight: 600;
  font-size: 0.95rem; cursor: pointer; transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--brown-mid); transform: translateY(-1px); }

.hero-image { animation: fadeUp 0.8s 0.2s ease both; }
.hero-img-card {
  background: white; border-radius: var(--radius); padding: 28px 32px;
  box-shadow: 0 8px 40px rgba(61,35,20,0.14); display: flex; flex-direction: column;
  align-items: center; gap: 10px; min-width: 220px;
  border: 2px solid rgba(232,97,42,0.1);
}
.pet-emoji-big { font-size: 5rem; line-height: 1; }
.hero-card-text { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-card-text strong { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--brown); }
.hero-card-text span { font-size: 0.88rem; color: var(--muted); }
.badge-available {
  background: #D4EDDA; color: var(--green); font-size: 0.78rem;
  font-weight: 600; padding: 4px 12px; border-radius: 50px; margin-top: 4px;
}

/* STATS */
.stats {
  display: flex; justify-content: center; gap: 0;
  background: var(--brown); padding: 36px 5%;
}
.stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; max-width: 200px; border-right: 1px solid rgba(255,255,255,0.1);
  padding: 0 20px;
}
.stat:last-child { border-right: none; }
.stat-num { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 900; color: var(--orange-light); }
.stat span:last-child { color: rgba(255,255,255,0.65); font-size: 0.88rem; font-weight: 500; text-align: center; }

/* SECTIONS */
.section { padding: 80px 5%; }
.section-header { text-align: center; margin-bottom: 52px; }
.section-header h2 { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--brown); margin-bottom: 12px; }
.section-header p { color: var(--muted); font-size: 1rem; max-width: 480px; margin: 0 auto; }

/* PET GRID */
.pet-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}
.pet-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid rgba(232,97,42,0.07); animation: fadeUp 0.5s ease both;
}
.pet-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(61,35,20,0.16); }
.pet-card-img {
  height: 170px; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; position: relative;
}
.pet-card-img.dog { background: linear-gradient(135deg, #FFF0E6, #FFD9BE); }
.pet-card-img.cat { background: linear-gradient(135deg, #E8F5FF, #C8E6FF); }
.pet-card-img.other { background: linear-gradient(135deg, #F0FFE8, #C8F0C8); }
.pet-badge {
  position: absolute; top: 12px; right: 12px; font-size: 0.72rem;
  font-weight: 700; padding: 4px 10px; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-shelter { background: #FFF3CD; color: #856404; }
.badge-owner { background: #D1F5E0; color: #1A6B3C; }
.pet-card-body { padding: 18px 20px 20px; }
.pet-card-body h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--brown); margin-bottom: 4px; }
.pet-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.pet-desc { font-size: 0.88rem; color: #5A4A42; line-height: 1.55; margin-bottom: 16px; }
.pet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.pet-tag {
  background: var(--warm); color: var(--brown-mid); font-size: 0.75rem;
  font-weight: 600; padding: 4px 10px; border-radius: 50px;
}
.adopt-btn {
  display: block; width: 100%; text-align: center;
  background: var(--orange); color: white; border: none;
  padding: 11px; border-radius: 10px; font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 0.92rem; cursor: pointer;
  transition: background 0.2s, transform 0.15s; text-decoration: none;
}
.adopt-btn:hover { background: var(--brown-mid); transform: translateY(-1px); }

.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more {
  background: transparent; border: 2px solid var(--orange); color: var(--orange);
  padding: 13px 36px; border-radius: 50px; font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: 0.95rem; cursor: pointer; transition: all 0.2s;
}
.load-more:hover { background: var(--orange); color: white; }

/* HOW IT WORKS */
.how-section { background: var(--warm); border-radius: 32px; margin: 0 3%; }
.steps { display: flex; gap: 32px; justify-content: center; flex-wrap: wrap; }
.step {
  flex: 1; min-width: 220px; max-width: 300px; text-align: center; padding: 32px 20px;
  background: white; border-radius: var(--radius); box-shadow: var(--shadow);
}
.step-icon { font-size: 2.6rem; margin-bottom: 16px; }
.step h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--brown); margin-bottom: 10px; }
.step p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }

/* REHOME BANNER */
.rehome-banner {
  background: linear-gradient(135deg, var(--brown) 0%, var(--brown-mid) 100%);
  margin: 60px 3%; border-radius: 28px; padding: 60px 5%; text-align: center;
}
.rehome-content h2 { font-family: 'Playfair Display', serif; font-size: 2rem; color: white; margin-bottom: 14px; }
.rehome-content p { color: rgba(255,255,255,0.72); max-width: 500px; margin: 0 auto 28px; line-height: 1.65; }
.btn-white {
  display: inline-block; background: white; color: var(--brown);
  padding: 14px 36px; border-radius: 50px; font-weight: 700;
  text-decoration: none; font-size: 0.97rem; transition: all 0.2s;
}
.btn-white:hover { background: var(--orange-light); color: white; transform: translateY(-2px); }

/* FOOTER */
.footer { text-align: center; padding: 40px 5%; background: var(--brown); color: rgba(255,255,255,0.6); }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--orange-light); margin-bottom: 10px; }

/* REHOME PAGE */
.page-hero {
  background: linear-gradient(135deg, var(--warm), #FFE8D6);
  padding: 70px 5% 50px; text-align: center;
  border-bottom: 1px solid rgba(232,97,42,0.1);
}
.page-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.6rem; color: var(--brown); margin-bottom: 12px; }
.page-hero p { color: var(--muted); max-width: 480px; margin: 0 auto; line-height: 1.65; }

.form-container { max-width: 640px; margin: 52px auto; padding: 0 20px 80px; }
.form-group { margin-bottom: 22px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--brown); margin-bottom: 7px; }
input, select, textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid #E8D8CC;
  border-radius: 12px; font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem; background: white; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232,97,42,0.12);
}
textarea { resize: vertical; }
.submit-btn {
  width: 100%; background: var(--orange); color: white; border: none;
  padding: 15px; border-radius: 14px; font-family: 'DM Sans', sans-serif;
  font-weight: 700; font-size: 1rem; cursor: pointer; transition: background 0.2s, transform 0.15s;
  margin-top: 8px;
}
.submit-btn:hover { background: var(--brown-mid); transform: translateY(-1px); }
.success-msg {
  background: #D4EDDA; color: #155724; border: 1px solid #C3E6CB;
  border-radius: 14px; padding: 24px; font-size: 1rem; line-height: 1.6; text-align: center;
}

/* ANIMATIONS */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero { flex-direction: column; padding-top: 60px; text-align: center; }
  .hero-search { flex-direction: column; }
  .stats { flex-wrap: wrap; }
  .stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 16px; }
  .form-row { flex-direction: column; }
  .hero-image { display: none; }
  .nav-links a:not(.nav-cta) { display: none; }
}
