/* Root & global styles */
:root {
  --bg-gradient-start: #ffb347;
  --bg-gradient-mid: #ff5f6d;
  --bg-gradient-end: #ffc371;
  --card-bg: #ffffff;
  --accent: #ff8a5c;
  --accent-soft: rgba(255, 255, 255, 0.16);
  --accent-2: #8e9dff;
  --text-main: #201415;
  --text-muted: #fbe9de;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.25);
  --radius-xl: 1.5rem;
  --radius-full: 999px;
  --max-width: 1100px;
  --spacing: 1.5rem;
  --transition-fast: 180ms ease-out;
}

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

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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 60%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.18), transparent 55%),
    linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-mid), var(--bg-gradient-end));
  color: var(--text-main);
  position: relative;
  overflow-x: hidden;
}

/* Confetti-style festive background (non-holiday-specific) */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.9;
}

.confetti-layer-1::before,
.confetti-layer-1::after,
.confetti-layer-2::before,
.confetti-layer-2::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0.85) 7px, transparent 7px),
    radial-gradient(circle, rgba(142, 157, 255, 0.6) 0, rgba(142, 157, 255, 0.6) 6px, transparent 6px),
    radial-gradient(circle, rgba(255, 218, 121, 0.6) 0, rgba(255, 218, 121, 0.6) 5px, transparent 5px),
    radial-gradient(circle, rgba(0, 0, 0, 0.14) 0, rgba(0, 0, 0, 0.14) 3px, transparent 3px);
  background-size: 220px 220px, 260px 260px, 310px 310px, 360px 360px;
  background-position: 0 0, 40px 60px, 120px -30px, -80px 90px;
  mix-blend-mode: screen;
}

.confetti-layer-1::after {
  transform: translate3d(0, 10px, 0);
  opacity: 0.8;
}

.confetti-layer-2 {
  opacity: 0.75;
}

.confetti-layer-2::before {
  background-size: 260px 260px, 300px 300px, 340px 340px, 400px 400px;
  background-position: -30px 50px, 80px -50px, -120px -40px, 130px 120px;
}

/* Layout containers */
.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

.site-header {
  padding-top: 2.7rem;
  padding-bottom: 1.5rem;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Script header */
.site-header h1 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.8rem, 4vw + 1rem, 4.5rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
  letter-spacing: 1px;

  color: #ffffff;

  text-shadow:
    0 4px 14px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(255,255,255,0.35);
}


.subtitle {
  margin: 0;
  font-size: 1rem;
  color: #ffe8d6;
}

/* Prominent tagline */
.prominent-tagline {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45),
               0 0 14px rgba(255, 200, 150, 0.55);
  margin-top: 0.75rem;
  letter-spacing: 0.5px;
}

/* Intro block */
.intro {
  background-color: rgba(20, 8, 4, 0.88);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 2rem;
  backdrop-filter: blur(14px);
  color: #ffece0;
}

.intro p {
  margin: 0 0 0.3rem;
}

.intro .hint {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: #ffded0;
}

/* Family grid */
.family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}

/* Person cards */
.person-card {
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.person-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 60%);
  opacity: 1;
  z-index: 0;
}

.person-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 138, 92, 0.8);
}

.person-card > * {
  position: relative;
  z-index: 1;
}

/* Photo & link */
.photo-link {
  display: block;
  margin: 0 auto 0.5rem;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(
    from 180deg,
    var(--accent),
    var(--accent-2),
    #ffd46f,
    var(--accent),
    var(--accent-2)
  );
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  overflow: hidden; /* keeps the image clipped in the circle */
}

.photo-link:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}

.person-photo {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  /* remove fallback color to avoid “gray circle” confusion */
  /* background-color: #f3f3f3; */
  transition: transform 160ms ease-out;
}

.photo-link:hover .person-photo {
  transform: scale(1.05);
}

/* Text on card */
.person-card h2 {
  text-align: center;
  margin: 0.3rem 0 0;
  font-size: 1.3rem;
  color: #1f1412;
}

/* Family photo section */
.family-photo-section {
  margin-bottom: 3rem;
}

.family-photo-frame {
  margin: 0;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: 0.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.family-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-xl) - 0.4rem);
  object-fit: cover;
}

/* Footer */
.site-footer {
  padding-bottom: 2.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: #ffeadd;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .site-header {
    padding-top: 2.2rem;
  }

  .intro {
    padding: 1rem 1.1rem;
  }

  .person-card {
    padding: 1.25rem 1.15rem 1.35rem;
  }
}

/* --- Safari image hover fix (override) --- */

/* Stop using transforms on the photo frame & image to avoid Safari glitches */
.photo-link,
.photo-link:hover,
.photo-link .person-photo,
.photo-link:hover .person-photo {
  transform: none !important;
}

/* Keep a nice hover effect with just shadow changes */
.photo-link {
  transition: box-shadow 180ms ease-out;
}

.photo-link:hover {
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}
