/* ═══════════════════════════════════════════════════════
   Yuki & Mike — Family Website Styles
   Style: Colorful & Fun
═══════════════════════════════════════════════════════ */

/* ── Hidden utility (remove .hidden from element to show it) ── */
.hidden { display: none !important; }

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --coral:   #FF6B6B;
  --yellow:  #FFD93D;
  --mint:    #6BCB77;
  --blue:    #4D96FF;
  --purple:  #C77DFF;
  --light:   #FFF8F0;
  --dark:    #2D2D2D;
  --radius:  18px;
  --font-body: 'Nunito', sans-serif;
  --font-display: 'Pacifico', cursive;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--light);
  color: var(--dark);
  line-height: 1.6;
}

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

/* ── Section Label ──────────────────────────────────── */
.section-label {
  display: inline-block;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffffee;
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #f0e0d0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--coral);
  text-decoration: none;
}

.main-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.main-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--dark);
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover {
  background: var(--coral);
  color: #fff;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--coral) 0%, var(--purple) 50%, var(--blue) 100%);
  padding: 100px 1.5rem 60px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Ccircle cx='30' cy='30' r='6'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

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

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  color: #fff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.2);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 60px; display: block; }

/* ── Slideshow ──────────────────────────────────────── */
.slideshow-section {
  padding: 4rem 1.5rem;
  text-align: center;
  background: #fff;
}

.slideshow {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  aspect-ratio: 16 / 9;
  background: #f0e0d0;
}

.slides-track {
  /* position:absolute ensures height resolves correctly in Safari
     even when parent height comes from aspect-ratio */
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: flex;
  -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
  /* isolation:isolate creates a stacking context so z-index:-1
     on slide-bg stays contained and never goes behind .slide itself */
  isolation: isolate;
}

.slide-bg {
  position: absolute;
  top: -12%;
  right: -12%;
  bottom: -12%;
  left: -12%;
  background-size: cover;
  background-position: center;
  -webkit-filter: blur(18px);
  filter: blur(18px);
  /* z-index:-1 inside isolation:isolate puts it behind slide-img
     but still inside the slide — Safari-safe */
  z-index: -1;
}

.slide-img {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.slide-btn:hover {
  background: var(--coral);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}

.slide-btn.prev { left: 12px; }
.slide-btn.next { right: 12px; }

.slide-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
}

.dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ── About ──────────────────────────────────────────── */
.about-section {
  padding: 5rem 1.5rem;
  text-align: center;
  background: var(--light);
}

.about-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.about-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  width: 260px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: transform 0.2s;
}

.about-card:hover { transform: translateY(-4px); }

.about-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }

.about-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--coral);
}

.about-heart { font-size: 2.5rem; }

.about-story {
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: #555;
  background: #fff;
  padding: 1.5rem 2rem;
  border-radius: var(--radius);
  border-left: 5px solid var(--yellow);
}

/* ── Fluffy Family ──────────────────────────────────── */
.fluffy-section {
  padding: 5rem 1.5rem;
  background: #fff;
  text-align: center;
}

.fluffy-intro {
  color: #666;
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
  margin-top: -1rem;
}

.pets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pet-card {
  background: var(--light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

.pet-card:hover { transform: translateY(-5px); }

.pet-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--mint), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pet-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pet-placeholder {
  font-size: 4rem;
  position: absolute;
}

/* Hide placeholder when photo loads */
.pet-photo-wrap:not(.no-photo) .pet-placeholder { display: none; }
.pet-photo-wrap.no-photo .pet-photo { display: none; }

.pet-info { padding: 1.25rem; }

.pet-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.pet-desc { font-size: 0.9rem; color: #666; }

/* ── Pet Gallery ────────────────────────────────────── */
.pet-gallery-wrap {
  margin-top: 3rem;
}

.pet-slideshow {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  aspect-ratio: 16 / 9;
  background: #f0e0d0;
}

/* ── Updates ────────────────────────────────────────── */
.updates-section {
  padding: 5rem 1.5rem;
  background: var(--light);
  text-align: center;
}

.updates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.update-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  border-top: 4px solid var(--mint);
  transition: transform 0.2s;
}

.update-card:hover { transform: translateY(-4px); }

.update-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.update-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.update-body { font-size: 0.95rem; color: #555; }

/* ── Contact ────────────────────────────────────────── */
.contact-section {
  padding: 5rem 1.5rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--mint) 100%);
  text-align: center;
}

.contact-section .section-label {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.contact-intro {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
  margin: -1rem 0 2rem;
}

.contact-links { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.contact-btn {
  display: inline-block;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* ── Responsive ─────────────────────────────────────── */

/* Tablet (up to 768px) */
@media (max-width: 768px) {
  /* Sections: tighter vertical padding */
  .about-section,
  .fluffy-section,
  .updates-section,
  .contact-section { padding: 3rem 1.25rem; }

  .slideshow-section { padding: 2.5rem 1rem; }

  /* Pet cards: two columns on tablet */
  .pets-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

  /* Updates grid: single column */
  .updates-grid { grid-template-columns: 1fr; }

  /* About cards side by side but smaller */
  .about-card { width: 210px; padding: 1.5rem; }
}

/* Mobile (up to 480px) */
@media (max-width: 480px) {
  /* ── Header ── */
  .header-inner {
    flex-direction: row;          /* keep logo + nav on one line */
    height: 52px;
    padding: 0 1rem;
    gap: 0;
    justify-content: space-between;
  }
  .site-logo { font-size: 1.1rem; }
  .main-nav { gap: 0; }
  .main-nav a { font-size: 0.78rem; padding: 0.3rem 0.55rem; }

  /* ── Hero ── */
  .hero { padding: 60px 1rem 50px; }
  .hero-title { font-size: 2.6rem; }
  .hero-subtitle { font-size: 1rem; }

  /* ── Slideshow ── */
  .slideshow-section { padding: 2rem 0.75rem; }

  /* Smaller prev/next buttons */
  .slide-btn { width: 36px; height: 36px; font-size: 1rem; }
  .slide-btn.prev { left: 8px; }
  .slide-btn.next { right: 8px; }

  /* Dots: shrink and allow horizontal scroll so they never overflow */
  .slide-dots {
    max-width: 90%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE */
    flex-wrap: nowrap;
  }
  .slide-dots::-webkit-scrollbar { display: none; } /* Chrome/Safari */
  .dot { width: 7px; height: 7px; flex-shrink: 0; }

  /* ── Section label ── */
  .section-label { font-size: 0.85rem; padding: 0.3rem 0.85rem; }

  /* ── About ── */
  .about-section { padding: 2.5rem 1rem; }
  .about-grid { gap: 1rem; }
  .about-card { width: 100%; max-width: 300px; padding: 1.25rem; }
  .about-heart { display: none; }
  .about-story { padding: 1.25rem; font-size: 0.95rem; }

  /* ── Fluffy Family ── */
  .fluffy-section { padding: 2.5rem 1rem; }
  .fluffy-intro { font-size: 0.95rem; }
  .pets-grid { grid-template-columns: 1fr; gap: 1.25rem; max-width: 340px; margin: 0 auto; }

  /* ── Pet gallery (same dot/button fixes as main slideshow) ── */
  .pet-gallery-wrap { margin-top: 2rem; }

  /* ── Updates ── */
  .updates-section { padding: 2.5rem 1rem; }
  .update-card { padding: 1.25rem; }

  /* ── Contact ── */
  .contact-section { padding: 2.5rem 1rem; }
  .contact-intro { font-size: 0.95rem; }

  /* ── Footer ── */
  .site-footer { font-size: 0.8rem; padding: 1.25rem; }
}
