/* ============================================
   VALENTINE'S DAY WEBSITE — STYLES
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-deep: #2D0A0A;
  --bg-darkest: #1A0505;
  --crimson: #B91C3A;
  --rose: #D4828F;
  --gold: #C9A84C;
  --cream: #FFF5EE;
  --linen: #FAF0E6;
  --mahogany: #3B0F0F;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Cormorant Garamond', Garamond, serif;
  --font-handwritten: 'Caveat', cursive;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--linen);
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- SECTION TITLES ---------- */
.section-title {
  font-family: var(--font-heading);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

/* ============================================
   SECTION 1: HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-darkest) 100%);
  overflow: hidden;
}

.hero__hearts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 1.5rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.8rem, 10vw, 7rem);
  color: var(--gold);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 30px rgba(201, 168, 76, 0.15);
  opacity: 0;
}

.hero__subtitle {
  font-family: var(--font-handwritten);
  font-size: clamp(1.5rem, 5vw, 3rem);
  color: var(--linen);
  margin-top: 0.5rem;
  opacity: 0;
  position: relative;
  display: inline-block;
}

.hero__subtitle::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 10%;
  width: 80%;
  height: 2px;
  background: var(--rose);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.8s ease 1.2s;
}

.hero.is-loaded .hero__subtitle::after {
  transform: scaleX(1);
}

.hero__heart-icon {
  margin-top: 1.5rem;
  opacity: 0;
}

.hero__heart-icon svg {
  width: 40px;
  height: 40px;
  color: var(--crimson);
  animation: heartPulse 1.5s ease-in-out infinite;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
  width: 28px;
  height: 28px;
  color: var(--rose);
  opacity: 0.6;
}

/* ---------- Floating Heart Particle ---------- */
.floating-heart {
  position: absolute;
  bottom: -20px;
  pointer-events: none;
  opacity: var(--opacity, 0.12);
  animation: floatUp var(--duration, 12s) var(--delay, 0s) infinite linear;
  z-index: 0;
}

.floating-heart::before,
.floating-heart::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--heart-color, var(--crimson));
}

.floating-heart {
  width: var(--size, 16px);
  height: var(--size, 16px);
  background: var(--heart-color, var(--crimson));
  transform: rotate(-45deg);
}

.floating-heart::before {
  width: var(--size, 16px);
  height: var(--size, 16px);
  top: calc(var(--size, 16px) / -2);
  left: 0;
}

.floating-heart::after {
  width: var(--size, 16px);
  height: var(--size, 16px);
  top: 0;
  left: calc(var(--size, 16px) / 2);
}

/* Interactive hearts spawned at cursor position */
.interactive-heart {
  animation: none !important;
  bottom: auto;
  pointer-events: none;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0% {
    transform: rotate(-45deg) translateY(0) translateX(0);
    opacity: var(--opacity, 0.12);
  }
  20% {
    transform: rotate(-45deg) translateY(-20vh) translateX(15px);
  }
  40% {
    transform: rotate(-45deg) translateY(-40vh) translateX(-10px);
  }
  60% {
    transform: rotate(-45deg) translateY(-60vh) translateX(20px);
  }
  80% {
    transform: rotate(-45deg) translateY(-80vh) translateX(-5px);
    opacity: var(--opacity, 0.12);
  }
  100% {
    transform: rotate(-45deg) translateY(-110vh) translateX(10px);
    opacity: 0;
  }
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-10px); }
}

/* ============================================
   SECTION 2: INTRO
   ============================================ */
.intro {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-deep) 30%, #3d1515 100%);
}

.intro__divider {
  max-width: 400px;
  margin: 0 auto 2.5rem;
}

.divider-svg {
  width: 100%;
  height: auto;
}

.divider-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.divider-heart {
  opacity: 0;
}

.intro__text {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  color: var(--rose);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 0;
}

/* ============================================
   SECTION 3: HEART MOSAIC
   ============================================ */
.mosaic {
  padding: 5rem 1.5rem;
  background: var(--cream);
  position: relative;
}

.mosaic .section-title {
  color: var(--mahogany);
}

.mosaic__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

.mosaic__item {
  border-radius: 12px;
  overflow: hidden;
  opacity: 0;
  box-shadow: 0 4px 20px rgba(45, 10, 10, 0.15);
}

.mosaic__item--mum {
  transform: rotate(-3deg);
}

.mosaic__item--son {
  transform: rotate(3deg);
}

.mosaic__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  transition: transform 0.5s ease;
}

/* Center mum's face (she's center-top in the playground photo) */
.mosaic__item--mum img {
  object-position: 45% 15%;
}

/* Center son's face — shift right to avoid heart-center clip, lower for his face */
.mosaic__item--son img {
  object-position: 65% 35%;
}

.mosaic__item:hover img {
  transform: scale(1.05);
}

/* Desktop: heart clip-path with 2 photos */
@media (min-width: 768px) {
  .mosaic__grid {
    max-width: 500px;
    gap: 4px;
    clip-path: path('M250 40 C250 18, 280 0, 310 0 C355 0, 395 28, 395 68 C395 145, 250 255, 250 255 C250 255, 105 145, 105 68 C105 28, 145 0, 190 0 C220 0, 250 18, 250 40Z');
    padding: 0;
  }

  .mosaic__item {
    border-radius: 0;
  }

  .mosaic__item--mum,
  .mosaic__item--son {
    transform: none;
  }

  .mosaic__item img {
    aspect-ratio: auto;
    height: 255px;
  }
}

@media (min-width: 1024px) {
  .mosaic__grid {
    max-width: 600px;
    clip-path: path('M300 48 C300 22, 336 0, 372 0 C426 0, 474 34, 474 82 C474 174, 300 306, 300 306 C300 306, 126 174, 126 82 C126 34, 174 0, 228 0 C264 0, 300 22, 300 48Z');
  }

  .mosaic__item img {
    height: 306px;
  }
}

/* ============================================
   SECTION 4: SCROLLING ADVENTURE STRIP
   ============================================ */
.strip {
  padding: 4rem 0;
  background: linear-gradient(180deg, var(--cream) 0%, #f5e6de 50%, var(--cream) 100%);
  overflow: hidden;
}

.strip__title {
  color: var(--mahogany);
  padding: 0 1.5rem;
  margin-bottom: 2.5rem;
}

.strip__track {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.strip__track::-webkit-scrollbar {
  display: none;
}

.strip__item {
  flex: 0 0 auto;
  width: 280px;
  border-radius: 12px;
  overflow: hidden;
  scroll-snap-align: center;
  box-shadow: 0 4px 20px rgba(45, 10, 10, 0.12);
  opacity: 0;
  transition: transform 0.3s ease;
}

.strip__item:hover {
  transform: scale(1.03);
}

.strip__item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .strip__item {
    width: 320px;
  }

  .strip__item img {
    height: 260px;
  }
}

@media (min-width: 1024px) {
  .strip__item {
    width: 360px;
  }

  .strip__item img {
    height: 280px;
  }
}

/* ============================================
   SECTION 5: PARALLAX FEATURE
   ============================================ */
.parallax {
  position: relative;
  height: 70vh;
  overflow: hidden;
}

.parallax__image-wrapper {
  position: absolute;
  inset: -20% 0;
  z-index: 1;
}

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

.parallax__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    180deg,
    rgba(45, 10, 10, 0.1) 0%,
    rgba(45, 10, 10, 0) 30%,
    rgba(45, 10, 10, 0) 50%,
    rgba(45, 10, 10, 0.6) 100%
  );
}

/* ============================================
   SECTION 5: POLAROID WALL
   ============================================ */
.polaroids {
  padding: 5rem 1.5rem;
  background: var(--cream);
  overflow: hidden;
}

.polaroids__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.polaroid {
  background: #fff;
  padding: 12px 12px 40px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.04);
  transform: rotate(var(--rotation, 0deg));
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  max-width: 320px;
  width: 100%;
}

.polaroid:hover {
  transform: rotate(0deg) translateY(-8px) !important;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 4px 8px rgba(0, 0, 0, 0.08);
}

.polaroid__frame img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Desktop: scattered layout (3 polaroids) */
@media (min-width: 768px) {
  .polaroids__container {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    position: relative;
    min-height: 400px;
    padding: 2rem 0;
  }

  .polaroid {
    position: relative;
    max-width: 260px;
  }

  .polaroid:nth-child(1) {
    top: 20px;
    left: -10px;
    z-index: 1;
  }

  .polaroid:nth-child(2) {
    top: -10px;
    z-index: 3;
  }

  .polaroid:nth-child(3) {
    top: 25px;
    right: -10px;
    z-index: 2;
  }
}

@media (min-width: 1024px) {
  .polaroid {
    max-width: 280px;
    padding: 14px 14px 48px;
  }

  .polaroid:nth-child(1) {
    left: -20px;
    top: 25px;
  }

  .polaroid:nth-child(2) {
    top: -15px;
  }

  .polaroid:nth-child(3) {
    right: -20px;
    top: 30px;
  }
}

/* ============================================
   SECTION 7: BEACH DUO
   ============================================ */
.beach {
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, var(--cream) 0%, #f0ddd5 100%);
}

.beach__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.beach__item {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(45, 10, 10, 0.12);
  opacity: 0;
}

.beach__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.beach__item:hover img {
  transform: scale(1.04);
}

@media (min-width: 768px) {
  .beach__grid {
    gap: 1.5rem;
  }
}

/* ============================================
   SECTION 8: CLOSING
   ============================================ */
.closing {
  padding: 6rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-darkest) 100%);
  position: relative;
  overflow: hidden;
}

.closing__petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Falling petal */
.petal {
  position: absolute;
  top: -30px;
  pointer-events: none;
  opacity: var(--petal-opacity, 0.2);
  animation: petalFall var(--petal-duration, 10s) var(--petal-delay, 0s) infinite linear;
}

.petal svg {
  width: var(--petal-size, 20px);
  height: var(--petal-size, 20px);
}

@keyframes petalFall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: var(--petal-opacity, 0.2);
  }
  50% {
    transform: translateY(50vh) translateX(40px) rotate(180deg);
  }
  90% {
    opacity: var(--petal-opacity, 0.2);
  }
  100% {
    transform: translateY(110vh) translateX(-20px) rotate(360deg);
    opacity: 0;
  }
}

.closing__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.closing__photo {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  margin-bottom: 3rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0;
}

.closing__photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.closing__message {
  padding: 0 1rem;
}

.closing__text {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--linen);
  line-height: 1.8;
  opacity: 0;
}

.closing__text + .closing__text {
  margin-top: 0.25rem;
}

.closing__signature {
  font-family: var(--font-handwritten);
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--gold);
  margin-top: 1.5rem;
  opacity: 0;
}

/* ============================================
   SECTION 7: FOOTER
   ============================================ */
.footer {
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-darkest) 0%, #0d0202 100%);
}

.footer__heart {
  margin-bottom: 1.5rem;
}

.footer__heart svg {
  width: 36px;
  height: 36px;
  color: var(--crimson);
  animation: heartPulse 1.5s ease-in-out infinite;
}

.footer__title {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 3vw, 1.3rem);
  color: var(--rose);
  font-weight: 400;
  letter-spacing: 0.05em;
  opacity: 0;
}

.footer__year {
  font-family: var(--font-handwritten);
  font-size: 1.2rem;
  color: var(--gold);
  margin-top: 0.5rem;
  opacity: 0.6;
}
