/* =============================================
   SMUDGE & FRIENDS — Cat Information Website
   Blue palette, accessible, clean
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

:root {
  --blue-darkest:  #0d2b45;
  --blue-dark:     #1a4a72;
  --blue-mid:      #2e6fa3;
  --blue-light:    #5b9ecf;
  --blue-pale:     #c8dff2;
  --blue-faintest: #eaf4fb;
  --white:         #ffffff;
  --text-dark:     #1a2e3d;
  --text-mid:      #3d5a73;
  --text-light:    #6b8fa8;
  --accent:        #f0a500;
  --shadow:        rgba(13, 43, 69, 0.15);
  --nav-height:    68px;
  --radius:        10px;
  --transition:    0.25s ease;
}

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

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

body {
  font-family: 'Source Sans 3', sans-serif;
  background: var(--blue-faintest);
  color: var(--text-dark);
  min-height: 100vh;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--blue-darkest);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ══════════════════════════════════════════
   NAV BAR
══════════════════════════════════════════ */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--blue-dark);
  box-shadow: 0 3px 12px var(--shadow);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  margin-right: auto;
}

.nav-logo .paw { font-size: 1.6rem; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: stretch;
  height: var(--nav-height);
  gap: 0;
}

.nav-links li { display: flex; align-items: stretch; }

.nav-links a {
  display: flex;
  align-items: center;
  padding: 0 1.4rem;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background var(--transition), color var(--transition);
  border-bottom: 3px solid transparent;
  position: relative;
}

.nav-links a:hover,
.nav-links a:focus {
  background: var(--blue-mid);
  color: var(--white);
  border-bottom-color: var(--accent);
  outline: none;
}

.nav-links a[aria-current="page"],
.nav-links a.active {
  background: var(--blue-mid);
  color: var(--white);
  border-bottom-color: var(--accent);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 6px;
  color: var(--white);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  margin-left: auto;
}

/* ══════════════════════════════════════════
   PAGE SECTIONS (SPA routing)
══════════════════════════════════════════ */
.page { display: none; }
.page.active { display: block; }

/* ══════════════════════════════════════════
   HERO / IMAGE REEL
══════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  background: var(--blue-darkest);
}

.reel-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reel-slide {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.reel-slide img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  height: 100%;
  object-fit: contain;
  opacity: 0.7;
  z-index: 1;
}

.reel-caption {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 2rem 3rem;
  background: linear-gradient(to top, rgba(13,43,69,0.9) 0%, transparent 100%);
  color: var(--white);
}

.reel-caption h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.reel-caption p {
  font-size: 1rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

/* Fallback gradient slides (no real images needed) */
.slide-1 { background: linear-gradient(135deg, #1a4a72 0%, #5b9ecf 60%, #c8dff2 100%); }
.slide-2 { background: linear-gradient(135deg, #0d2b45 0%, #2e6fa3 60%, #5b9ecf 100%); }
.slide-3 { background: linear-gradient(135deg, #2e6fa3 0%, #0d2b45 50%, #1a4a72 100%); }
.slide-4 { background: linear-gradient(135deg, #5b9ecf 0%, #1a4a72 60%, #0d2b45 100%); }

.reel-slide .slide-emoji {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9rem;
  opacity: 0.25;
  pointer-events: none;
  user-select: none;
}

/* Reel controls */
.reel-controls {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  display: flex;
  gap: 0.5rem;
  z-index: 5;
}

.reel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: 2px solid rgba(255,255,255,0.7);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  padding: 0;
}

.reel-dot.active,
.reel-dot:hover {
  background: var(--white);
  transform: scale(1.25);
}

.reel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(13,43,69,0.5);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: var(--white);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.reel-arrow:hover, .reel-arrow:focus {
  background: rgba(46,111,163,0.8);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.reel-arrow.prev { left: 1rem; }
.reel-arrow.next { right: 1rem; }

/* ══════════════════════════════════════════
   MAIN CONTENT LAYOUT
══════════════════════════════════════════ */
.content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--blue-darkest);
  margin-bottom: 0.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  margin-top: 0.25rem;
}

/* ══════════════════════════════════════════
   OUR CATS / ABOUT SECTION
══════════════════════════════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.about-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--shadow);
  border-left: 4px solid var(--blue-mid);
}

.about-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--blue-dark);
  margin-bottom: 0.75rem;
}

.about-card p {
  line-height: 1.7;
  color: var(--text-mid);
  font-size: 0.97rem;
}

/* ══════════════════════════════════════════
   SPECIES GRID
══════════════════════════════════════════ */
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.species-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.species-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow);
}

.species-img {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  background: linear-gradient(135deg, var(--blue-pale), var(--blue-faintest));
}

.species-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.species-body h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--blue-darkest);
  margin-bottom: 0.4rem;
}

.species-badge {
  display: inline-block;
  background: var(--blue-pale);
  color: var(--blue-dark);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

.species-body p {
  color: var(--text-mid);
  line-height: 1.65;
  font-size: 0.93rem;
  flex: 1;
}

.species-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.trait {
  background: var(--blue-faintest);
  border: 1px solid var(--blue-pale);
  color: var(--text-mid);
  font-size: 0.78rem;
  padding: 0.15rem 0.6rem;
  border-radius: 20px;
}

/* ══════════════════════════════════════════
   CARE PAGE
══════════════════════════════════════════ */
.care-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.care-tab {
  background: var(--white);
  border: 2px solid var(--blue-pale);
  color: var(--text-mid);
  padding: 0.55rem 1.3rem;
  border-radius: 30px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
}

.care-tab:hover {
  border-color: var(--blue-mid);
  color: var(--blue-dark);
}

.care-tab.active {
  background: var(--blue-mid);
  border-color: var(--blue-mid);
  color: var(--white);
}

.care-panel { display: none; }
.care-panel.active { display: block; }

.care-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.care-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 10px var(--shadow);
  border-top: 4px solid var(--blue-light);
}

.care-card .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.care-card h4 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--blue-darkest);
  margin-bottom: 0.5rem;
}

.care-card p, .care-card li {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.65;
}

.care-card ul {
  list-style: none;
  padding: 0;
}

.care-card li::before {
  content: '› ';
  color: var(--blue-mid);
  font-weight: 700;
}

/* ══════════════════════════════════════════
   ADOPT PAGE
══════════════════════════════════════════ */
.adopt-intro {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  border-radius: var(--radius);
  padding: 2.5rem;
  color: var(--white);
  margin-bottom: 2.5rem;
}

.adopt-intro h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.adopt-intro p { opacity: 0.9; line-height: 1.7; max-width: 600px; }

.adopt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.adopt-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.adopt-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow);
}

.adopt-card .org-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.adopt-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--blue-darkest);
  margin-bottom: 0.5rem;
}

.adopt-card p {
  color: var(--text-mid);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
}

.adopt-link {
  display: inline-block;
  margin-top: 1rem;
  background: var(--blue-mid);
  color: var(--white);
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background var(--transition);
}

.adopt-link:hover, .adopt-link:focus {
  background: var(--blue-dark);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.adopt-checklist {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 12px var(--shadow);
}

.adopt-checklist h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--blue-darkest);
  margin-bottom: 1.25rem;
}

.checklist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem 2rem;
  list-style: none;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  color: var(--text-mid);
  font-size: 0.93rem;
  line-height: 1.5;
}

.checklist li::before {
  content: '✓';
  color: var(--blue-mid);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  background: var(--blue-darkest);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  margin-top: 4rem;
}

footer a { color: var(--blue-pale); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--blue-dark);
    flex-direction: column;
    height: auto;
    box-shadow: 0 6px 20px var(--shadow);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    border-left: none;
  }

  #main-nav { position: relative; }

  .hero { height: 320px; }
  .reel-caption h2 { font-size: 1.4rem; }
  .reel-caption { padding: 1.5rem; }

  .about-grid { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }

  .content-wrap { padding: 2rem 1rem; }
}

@media (max-width: 480px) {
  .hero { height: 260px; }
  .nav-logo { font-size: 1.1rem; }
}

/* ══════════════════════════════════════════
   FOCUS VISIBLE (accessibility)
══════════════════════════════════════════ */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
