/* ==========================================================================
   MACKENZIE ABIGAIL — Bat Mitzvah 2026
   VOGUE Fashion Magazine Editorial Design
   ========================================================================== */

:root {
  /* WHY: VOGUE-inspired palette — high contrast black/white with gold accents */
  --black: #000;
  --near-black: #0a0a0a;
  --charcoal: #1a1a1a;
  --dark-gray: #2a2a2a;
  --mid-gray: #666;
  --light-gray: #999;
  --ivory: #f5f0eb;
  --off-white: #faf8f5;
  --white: #fff;
  --gold: #c9a96e;
  --gold-light: #d4b87a;
  --gold-dark: #a8894e;
  --rose-accent: #c4677a;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--charcoal);
  background: var(--off-white);
  overflow-x: hidden;
  line-height: 1.7;
  font-weight: 300;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  /* WHY: slight desaturation gives editorial/printed-magazine feel */
  filter: saturate(0.85);
}

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

button {
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================================================
   Canvas Overlays (sparkle, confetti)
   ========================================================================== */

.sparkle-canvas,
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.4s ease, transform 0.4s ease;
}

/* WHY: once user scrolls past the hero, nav needs a solid background
   so white text stays readable on light sections */
.nav.nav-scrolled {
  background: rgba(250, 248, 245, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav.nav-scrolled .nav-logo {
  color: var(--black);
}

.nav.nav-scrolled .nav-links a {
  color: var(--mid-gray);
}

.nav.nav-scrolled .nav-links a:hover {
  color: var(--black);
}

.nav.nav-scrolled .nav-toggle span {
  background: var(--black);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.35em;
  color: var(--white);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--gold-light);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav-toggle.active span:nth-child(2) {
  transform: rotate(-45deg) translate(1px, -1px);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--near-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: var(--gold);
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .nav {
    padding: 16px 24px;
  }
}

/* ==========================================================================
   Hero — Magazine Cover (ONLY section with text over image)
   ========================================================================== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--black);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.8) brightness(0.95);
}

/* WHY: subtle gradient at bottom so white/gold text stays readable over any photo */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0.0) 40%,
    rgba(0, 0, 0, 0.35) 75%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 1;
}

/* WHY: content at BOTTOM — like a VOGUE cover where model fills the frame
   and the headline sits at the bottom edge */
.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 48px 60px;
  text-align: center;
  color: var(--white);
}

.hero-masthead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 16px;
  opacity: 0.7;
}

.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-line {
  display: block;
}

.hero-line-1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 300;
}

.hero-line-2 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.04em;
}

.hero-line-2 em {
  font-style: italic;
}

.hero-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: var(--gold);
  opacity: 0.5;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.7; transform: scaleY(1.2); }
}

@media (max-width: 600px) {
  .hero-content {
    padding: 0 24px 40px;
  }
  .hero-masthead {
    font-size: 0.75rem;
    letter-spacing: 0.35em;
  }
  .hero-tagline {
    font-size: 0.5rem;
    letter-spacing: 0.15em;
  }
}

/* ==========================================================================
   Section System
   ========================================================================== */

.section {
  /* WHY: 140px vertical padding gives the airy, luxurious magazine spacing */
  padding: 140px 48px;
  position: relative;
}

.section-dark {
  background: var(--near-black);
  color: var(--white);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 80px;
}

.section-tag {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-title em {
  font-style: italic;
  font-weight: 300;
}

.section-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--light-gray);
  letter-spacing: 0.05em;
  line-height: 1.7;
}

.section-dark .section-desc {
  color: var(--light-gray);
}

@media (max-width: 900px) {
  .section {
    padding: 100px 32px;
  }
  .section-header {
    margin-bottom: 56px;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 80px 20px;
  }
  .section-header {
    margin-bottom: 40px;
  }
}

/* ==========================================================================
   Meet Mac — Side by Side Layout
   ========================================================================== */

.meet-mac-layout {
  display: flex;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}

.meet-mac-image {
  flex: 0 0 420px;
  overflow: hidden;
}

.meet-mac-image img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

.meet-mac-text {
  flex: 1;
}

.meet-mac-text .section-tag {
  display: block;
  margin-bottom: 12px;
}

.meet-mac-text .section-title {
  text-align: left;
  margin-bottom: 28px;
}

.meet-mac-bio {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--mid-gray);
  margin-bottom: 20px;
}

.meet-mac-bio strong {
  font-weight: 500;
  color: var(--charcoal);
}

.meet-mac-stats {
  display: flex;
  gap: 48px;
  margin-top: 40px;
  padding-top: 32px;
  /* WHY: thin gold line separates stats — editorial divider pattern */
  border-top: 1px solid var(--gold);
}

.mini-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mini-stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1;
}

.mini-stat-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-gray);
}

@media (max-width: 900px) {
  .meet-mac-layout {
    flex-direction: column;
    gap: 48px;
  }
  .meet-mac-image {
    flex: 0 0 auto;
    max-width: 400px;
    width: 100%;
  }
  .meet-mac-text .section-title {
    text-align: center;
  }
  .meet-mac-text .section-tag {
    text-align: center;
  }
  .meet-mac-bio {
    text-align: center;
  }
  .meet-mac-stats {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .meet-mac-image {
    max-width: 300px;
  }
  .meet-mac-stats {
    gap: 32px;
  }
}

/* ==========================================================================
   Her Story — Timeline Horizontal Scroll
   ========================================================================== */

.timeline-gallery {
  display: flex;
  gap: 32px;
  overflow-x: auto;
  padding: 0 48px 32px;
  max-width: 100%;
  scroll-snap-type: x proximity;
  /* WHY: hide scrollbar for cleaner editorial look */
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dark) var(--dark-gray);
}

.timeline-gallery::-webkit-scrollbar {
  height: 4px;
}

.timeline-gallery::-webkit-scrollbar-track {
  background: var(--dark-gray);
}

.timeline-gallery::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
}

.timeline-item {
  flex: 0 0 260px;
  scroll-snap-align: start;
  position: relative;
}

.timeline-year {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 12px;
}

.timeline-img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 12px;
}

.timeline-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.timeline-caption {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--light-gray);
  letter-spacing: 0.03em;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .timeline-gallery {
    padding: 0 20px 24px;
    gap: 20px;
  }
  .timeline-item {
    flex: 0 0 200px;
  }
}

/* ==========================================================================
   Her World — CSS Grid of Passions
   ========================================================================== */

.world-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 1200px;
  margin: 0 auto;
}

.world-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}

.world-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.world-card:hover img {
  transform: scale(1.04);
}

/* WHY: tall card spans 2 rows for editorial grid asymmetry */
.world-card-tall {
  grid-row: span 2;
  aspect-ratio: auto;
}

/* WHY: wide card spans 2 columns for visual variety */
.world-card-wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

/* WHY: overlay only on hover — clean photos are the VOGUE editorial way */
.world-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.6) 0%,
    rgba(0, 0, 0, 0.0) 50%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.world-card:hover .world-card-overlay {
  opacity: 1;
}

.world-card-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.world-card-sub {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* Expand button in world cards */
.world-card .expand-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.world-card:hover .expand-btn {
  opacity: 1;
}

@media (max-width: 900px) {
  .world-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* WHY: on mobile, keep overlay visible but with TINY text so labels don't dominate the photo */
@media (max-width: 600px) {
  .world-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
  .world-card-wide {
    grid-column: span 2;
  }
  .world-card-tall {
    grid-row: span 2;
  }
  .world-card-overlay {
    opacity: 1;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.0) 40%
    );
    padding: 10px;
  }
  .world-card-label {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }
  .world-card-sub {
    font-size: 0.4rem;
    display: none;
  }
  .world-card .expand-btn {
    opacity: 1;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    top: 6px;
    right: 6px;
  }
}

/* ==========================================================================
   Her People — Friends (Polaroid Gallery)
   ========================================================================== */

.subsection-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--white);
  margin-bottom: 32px;
}

.polaroid-controls {
  text-align: center;
  margin-bottom: 32px;
}

.shuffle-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--gold);
  padding: 10px 28px;
  border-radius: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.shuffle-btn:hover {
  background: var(--gold);
  color: var(--black);
}

.polaroid-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.polaroid-card {
  background: var(--white);
  /* WHY: subtle padding evokes polaroid border without looking crafty */
  padding: 8px 8px 32px;
  border-radius: 0;
  transition: transform 0.3s ease;
}

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

.polaroid-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.polaroid-photo .expand-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.polaroid-card:hover .expand-btn {
  opacity: 1;
}

.polaroid-label {
  display: block;
  font-family: 'Caveat', cursive;
  font-size: 0.95rem;
  color: var(--charcoal);
  text-align: center;
  margin-top: 8px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .polaroid-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .polaroid-card {
    padding: 4px 4px 24px;
  }
  .polaroid-label {
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   Her People — Family Gallery
   ========================================================================== */

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

.family-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 0;
}

.family-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.family-card:hover img {
  transform: scale(1.04);
}

/* WHY: wide family card spans 2 columns for the big group shots */
.family-card-wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

/* WHY: hover-only overlay with tiny text — same editorial principle as world grid */
.family-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  font-family: 'Caveat', cursive;
  font-size: 0.85rem;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.family-card:hover .family-label {
  opacity: 1;
}

.family-card .expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.family-card:hover .expand-btn {
  opacity: 1;
}

@media (max-width: 600px) {
  .family-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
  .family-card-wide {
    grid-column: span 2;
  }
  .family-label {
    opacity: 1;
    font-size: 0.6rem;
    padding: 8px;
  }
  .family-card .expand-btn {
    opacity: 1;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   Play — Game Tabs & Panels
   ========================================================================== */

.game-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 56px;
  /* WHY: thin gold bottom border ties tabs together visually */
  border-bottom: 1px solid rgba(201, 169, 110, 0.2);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.game-tab {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--light-gray);
  background: none;
  border: none;
  padding: 12px 20px;
  position: relative;
  transition: color 0.3s ease;
}

.game-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.game-tab.active {
  color: var(--charcoal);
}

.game-tab.active::after {
  transform: scaleX(1);
}

.game-tab:hover {
  color: var(--charcoal);
}

.game-panel {
  display: none;
  max-width: 700px;
  margin: 0 auto;
}

.game-panel.active {
  display: block;
}

.game-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  text-align: center;
  margin-bottom: 12px;
  color: var(--charcoal);
}

.game-title em {
  font-style: italic;
}

.game-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--light-gray);
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: 0.03em;
}

.game-reset-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--gold);
  padding: 8px 24px;
  border-radius: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.game-reset-btn:hover {
  background: var(--gold);
  color: var(--white);
}

@media (max-width: 600px) {
  .game-tabs {
    flex-wrap: wrap;
    gap: 0;
    border-bottom: none;
  }
  .game-tab {
    font-size: 0.5rem;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
  }
}

/* ==========================================================================
   Memory Match Game
   ========================================================================== */

.memory-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--mid-gray);
  letter-spacing: 0.05em;
}

.memory-stats strong {
  font-weight: 600;
  color: var(--charcoal);
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}

.memory-card {
  aspect-ratio: 3 / 4;
  cursor: pointer;
  perspective: 800px;
}

.memory-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
  transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
  transform: rotateY(180deg);
}

.memory-card-front,
.memory-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 0;
  overflow: hidden;
}

.memory-card-front {
  /* WHY: gold back with subtle pattern suggests elegance */
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 50%, var(--gold-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.memory-card-front::after {
  content: '✦';
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.4);
}

.memory-card-back {
  transform: rotateY(180deg);
}

.memory-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-card.matched {
  opacity: 0.7;
}

@media (max-width: 600px) {
  .memory-grid {
    max-width: 320px;
    gap: 6px;
  }
}

/* ==========================================================================
   This or That Game
   ========================================================================== */

.tot-card {
  text-align: center;
  margin-bottom: 24px;
}

.tot-question {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  color: var(--charcoal);
}

.tot-options {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.tot-option {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  padding: 14px 36px;
  border: 1px solid var(--charcoal);
  background: transparent;
  color: var(--charcoal);
  border-radius: 0;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.tot-option:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.tot-option.selected {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.tot-option.correct {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.tot-progress {
  margin-top: 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  color: var(--light-gray);
  letter-spacing: 0.1em;
}

.tot-result-badge {
  display: inline-block;
  margin-top: 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--gold);
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .tot-options {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .tot-option {
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
  }
}

/* ==========================================================================
   Quiz Game
   ========================================================================== */

.quiz-container {
  max-width: 560px;
  margin: 0 auto;
}

.quiz-progress {
  width: 100%;
  height: 2px;
  background: rgba(201, 169, 110, 0.15);
  margin-bottom: 40px;
  border-radius: 0;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: var(--gold);
  transition: width 0.4s ease;
  width: 0%;
}

.quiz-question {
  text-align: center;
  margin-bottom: 32px;
  animation: quizSlideIn 0.4s ease both;
}

@keyframes quizSlideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.quiz-question-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--charcoal);
  letter-spacing: 0.03em;
  line-height: 1.4;
  margin-bottom: 8px;
}

.quiz-question-count {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  color: var(--light-gray);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 14px 24px;
  border: 1px solid var(--charcoal);
  background: transparent;
  color: var(--charcoal);
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.quiz-option:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.quiz-option.correct {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.quiz-option.incorrect {
  border-color: var(--rose-accent);
  color: var(--rose-accent);
}

.quiz-option.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Quiz results */
.quiz-score {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 300;
  color: var(--gold);
  text-align: center;
  line-height: 1;
  margin-bottom: 8px;
}

.quiz-score-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-gray);
  text-align: center;
  margin-bottom: 16px;
}

.quiz-message {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--charcoal);
  text-align: center;
  margin-bottom: 32px;
}

.quiz-share-btn,
.quiz-retry-btn {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 32px;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.quiz-share-btn {
  background: var(--gold);
  color: var(--white);
  border: 1px solid var(--gold);
  margin-right: 8px;
}

.quiz-share-btn:hover {
  background: var(--gold-dark);
}

.quiz-retry-btn {
  background: none;
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
}

.quiz-retry-btn:hover {
  background: var(--charcoal);
  color: var(--white);
}

.quiz-copied {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  color: var(--gold);
  margin-top: 12px;
  text-align: center;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   Photo Puzzle Game
   ========================================================================== */

.puzzle-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--mid-gray);
  letter-spacing: 0.05em;
}

.puzzle-stats strong {
  font-weight: 600;
  color: var(--charcoal);
}

.puzzle-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  max-width: 360px;
  margin: 0 auto 32px;
  background: var(--ivory);
}

.puzzle-tile {
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease;
  border-radius: 0;
}

.puzzle-tile:hover {
  transform: scale(0.97);
}

.puzzle-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.puzzle-reference {
  text-align: center;
  margin-top: 24px;
}

.puzzle-ref-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-gray);
  margin-bottom: 8px;
}

.puzzle-ref-img {
  width: 120px;
  height: auto;
  margin: 0 auto;
  opacity: 0.7;
}

/* ==========================================================================
   Scratch Off Game
   ========================================================================== */

.scratch-off-container {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0;
}

.scratch-off-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scratch-off-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* ==========================================================================
   Milestone / Bat Mitzvah
   ========================================================================== */

.milestone-section {
  /* inherits .section and .section-dark styles */
}

.milestone-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  max-width: 1100px;
  margin: 0 auto 56px;
}

.milestone-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 0;
}

.milestone-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.milestone-card:hover img {
  transform: scale(1.04);
}

.milestone-card .expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  font-size: 0.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.milestone-card:hover .expand-btn {
  opacity: 1;
}

.milestone-video {
  text-align: center;
  margin-bottom: 48px;
}

.video-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 14px 36px;
  border-radius: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.video-cta:hover {
  background: var(--gold);
  color: var(--black);
}

.video-cta-icon {
  font-size: 0.8rem;
}

.video-cta-text {
  /* inherits from parent */
}

.milestone-quote {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.milestone-quote blockquote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--ivory);
  letter-spacing: 0.03em;
  line-height: 1.5;
  /* WHY: thin gold borders above/below frame the quote editorially */
  border-top: 1px solid var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  padding: 28px 0;
}

@media (max-width: 900px) {
  .milestone-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .milestone-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
  .milestone-card .expand-btn {
    opacity: 1;
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   Guestbook
   ========================================================================== */

/* WHY: guestbook uses dark background to contrast with the surrounding light sections */
.guestbook-section {
  background: var(--near-black);
  color: var(--white);
}

.guestbook-section .section-tag {
  color: var(--gold);
}

.guestbook-section .section-title {
  color: var(--white);
}

.guestbook-section .section-desc {
  color: var(--light-gray);
}

.guestbook-form-wrapper {
  max-width: 520px;
  margin: 0 auto 56px;
}

.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guestbook-form input,
.guestbook-form textarea {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  padding: 14px 16px;
  border: 1px solid var(--dark-gray);
  background: transparent;
  color: var(--white);
  border-radius: 0;
  outline: none;
  transition: border-color 0.3s ease;
  letter-spacing: 0.03em;
}

.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder {
  color: var(--mid-gray);
  font-weight: 300;
}

.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: var(--gold);
}

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

.guestbook-submit {
  align-self: flex-start;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  background: none;
  border: 1px solid var(--gold);
  padding: 12px 32px;
  border-radius: 0;
  transition: background 0.3s ease, color 0.3s ease;
}

.guestbook-submit:hover {
  background: var(--gold);
  color: var(--black);
}

.guestbook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.guestbook-card {
  background: var(--dark-gray);
  padding: 24px;
  border-radius: 0;
  /* WHY: thin gold left border gives each card a magazine pull-quote feel */
  border-left: 2px solid var(--gold-dark);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.guestbook-card:hover {
  transform: translateY(-3px) rotate(0deg) !important;
  border-color: var(--gold);
}

.guestbook-card.drop-in {
  animation: guestbookDropIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes guestbookDropIn {
  from {
    opacity: 0;
    transform: translateY(-40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--card-rotation, 0deg)) scale(1);
  }
}

.guestbook-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.guestbook-card-msg {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 300;
  color: var(--light-gray);
  line-height: 1.7;
  margin-bottom: 12px;
}

.guestbook-card-date {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 400;
  color: var(--mid-gray);
  letter-spacing: 0.1em;
}

@media (max-width: 600px) {
  .guestbook-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Emoji Reaction
   ========================================================================== */

.emoji-reaction {
  position: fixed;
  font-size: 2rem;
  pointer-events: none;
  animation: emojiFloat 1.5s ease-out forwards;
  z-index: 9998;
}

@keyframes emojiFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) scale(0.5);
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  background: var(--black);
  color: var(--white);
  padding: 100px 48px 48px;
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-masthead {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-rule {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 16px;
  opacity: 0.5;
}

.footer-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-gray);
  margin-bottom: 32px;
}

.footer-mazel {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 32px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.footer-mazel:hover {
  transform: scale(1.05);
}

.footer-copy {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--mid-gray);
}

@media (max-width: 600px) {
  .footer {
    padding: 64px 24px 32px;
  }
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  filter: none;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 2rem;
  color: var(--white);
  background: none;
  border: none;
  line-height: 1;
  transition: color 0.3s ease;
}

.lightbox-close:hover {
  color: var(--gold);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  padding: 16px;
  transition: color 0.3s ease;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--white);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

/* ==========================================================================
   Reveal Animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.polaroid-card.reveal.visible {
  transform: translateY(0) rotate(var(--rotation, 0deg));
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Expand Button (shared across sections)
   ========================================================================== */

.expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.3);
  color: var(--white);
  font-size: 0.9rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
  cursor: pointer;
  z-index: 3;
}

.expand-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* Show expand btn on hover of parent containers */
.timeline-img:hover .expand-btn {
  opacity: 1;
}

/* ==========================================================================
   Parallax Layer (used by JS)
   ========================================================================== */

.parallax-layer {
  will-change: transform;
}

/* ==========================================================================
   Utility / Print
   ========================================================================== */

@media print {
  .nav, .sparkle-canvas, .confetti-canvas, .lightbox,
  .game-tabs, .game-panel, .shuffle-btn, .expand-btn,
  .hero-scroll, .guestbook-form-wrapper {
    display: none !important;
  }
  .section {
    padding: 40px 20px;
  }
  body {
    color: #000;
    background: #fff;
  }
}
