/* ============================================
   FOR AMY — shared design system
   ============================================ */

:root{
  --crimson: #C81D4A;
  --deep-wine: #5C0E2A;
  --blush: #FFD6E4;
  --rose: #FF7FA6;
  --cream-pink: #FFF3F6;
  --gold: #E8B84B;
  --gold-soft: #F6DFA6;
  --shadow-soft: 0 14px 40px rgba(200,29,74,0.14);
  --shadow-card: 0 10px 30px rgba(200,29,74,0.10);
  --radius-lg: 28px;
  --radius-md: 22px;
  --radius-sm: 14px;
}

*{ box-sizing: border-box; margin:0; padding:0; }
html{ scroll-behavior: smooth; }

body{
  font-family: 'Cormorant Garamond', serif;
  background: var(--cream-pink);
  color: var(--deep-wine);
  overflow-x: hidden;
  position: relative;
}

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

::selection{ background: var(--blush); color: var(--deep-wine); }

/* ---------- background ambience ---------- */

.bg-blobs{
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.bg-blobs span{
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  animation: blob-float 16s ease-in-out infinite;
}

.bg-blobs span:nth-child(1){ width: 420px; height: 420px; background: var(--blush); top: -120px; left: -100px; animation-duration: 18s; }
.bg-blobs span:nth-child(2){ width: 360px; height: 360px; background: var(--gold-soft); top: 40%; right: -140px; animation-duration: 22s; animation-delay: -4s; }
.bg-blobs span:nth-child(3){ width: 300px; height: 300px; background: var(--rose); bottom: -100px; left: 20%; animation-duration: 20s; animation-delay: -8s; }

@keyframes blob-float{
  0%,100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(30px,-40px) scale(1.12); }
}

.heart-field{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.drift-heart{
  position: absolute;
  top: -60px;
  font-size: 22px;
  opacity: 0.3;
  animation: fall linear infinite;
  color: var(--rose);
}

@keyframes fall{
  to{ transform: translateY(115vh) rotate(25deg); }
}

/* ---------- nav ---------- */

.site-nav{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 243, 246, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(200, 29, 74, 0.15);
}

.brand{
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  color: var(--crimson);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links{
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a{
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--deep-wine);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
}

.nav-links a:hover{ background: var(--blush); }
.nav-links a.active{ background: var(--crimson); color: white; }

.nav-toggle{
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--crimson);
  cursor: pointer;
}

@media (max-width: 760px){
  .nav-links{
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--cream-pink);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.2rem 1.6rem;
    box-shadow: var(--shadow-soft);
    transform: translateY(-140%);
    transition: transform 0.35s ease;
  }
  .nav-links.open{ transform: translateY(0); }
  .nav-links a{ text-align: center; padding: 0.7rem; }
  .nav-toggle{ display: block; }
}

/* ---------- layout helpers ---------- */

main{ position: relative; z-index: 1; }

.page-hero{
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}

section{
  position: relative;
  padding: 4rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.signature-title{
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  color: var(--crimson);
  text-align: center;
  line-height: 1.1;
  text-shadow: 0 4px 18px rgba(200,29,74,0.25);
}

.sub-title{
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--deep-wine);
  text-align: center;
  max-width: 640px;
  margin: 1.2rem auto 0;
}

.update-badge{
  margin-top: 1.6rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  color: var(--crimson);
  background: white;
  border: 1px solid var(--blush);
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}

h2.section-title{
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  color: var(--crimson);
  text-align: center;
  margin-bottom: 0.5rem;
}

p.section-subtitle{
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  text-align: center;
  max-width: 560px;
  color: var(--deep-wine);
  opacity: 0.85;
  margin-bottom: 2.4rem;
}

.cta-row{
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.btn{
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.75rem 1.8rem;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  display: inline-block;
}

.btn-primary{
  background: var(--crimson);
  color: white;
  box-shadow: 0 10px 26px rgba(200,29,74,0.30);
}
.btn-primary:hover{ background: var(--deep-wine); transform: translateY(-2px); }

.btn-outline{
  background: white;
  color: var(--crimson);
  border: 1.5px solid var(--crimson);
}
.btn-outline:hover{ background: var(--blush); transform: translateY(-2px); }

/* ---------- reveal-on-scroll ---------- */

.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view{
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1.in-view{ transition-delay: 0.08s; }
.reveal-delay-2.in-view{ transition-delay: 0.16s; }
.reveal-delay-3.in-view{ transition-delay: 0.24s; }
.reveal-delay-4.in-view{ transition-delay: 0.32s; }
.reveal-delay-5.in-view{ transition-delay: 0.40s; }

/* ---------- quote cards ---------- */

.quote-grid{
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  max-width: 1100px;
  width: 100%;
}

.quote-card{
  background: white;
  border-radius: var(--radius-md);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-card);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.quote-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-soft); }

.quote-card::before{
  content: '❝';
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  color: var(--rose);
  display: block;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.quote-text{
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--deep-wine);
}

.quote-author{
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--crimson);
  letter-spacing: 0.03em;
}

/* ---------- love note ---------- */

.love-note{
  margin-top: 3rem;
  max-width: 720px;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  line-height: 1.7;
  color: var(--deep-wine);
  background: linear-gradient(135deg, white, var(--blush));
  padding: 2.4rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.love-note span{
  font-family: 'Dancing Script', cursive;
  color: var(--crimson);
  font-size: 1.3em;
}

/* ---------- rotating locket photo ---------- */

.locket-wrap{
  perspective: 1400px;
  margin: 1rem auto 0;
}

.locket{
  width: min(320px, 70vw);
  height: min(320px, 70vw);
  position: relative;
  transform-style: preserve-3d;
  animation: spin-locket 14s linear infinite;
  border-radius: 50%;
}

@keyframes spin-locket{
  from{ transform: rotateY(0deg); }
  to{ transform: rotateY(360deg); }
}

.locket-face{
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  backface-visibility: hidden;
  border: 8px solid white;
  box-shadow: 0 20px 50px rgba(200,29,74,0.35);
}

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

.locket-face.back{ transform: rotateY(180deg); }

/* ---------- floating polaroid stack (hero) ---------- */

.polaroid-stack{
  position: relative;
  width: min(360px, 80vw);
  height: min(360px, 80vw);
  margin: 2.5rem auto 0;
}

.polaroid{
  position: absolute;
  width: 62%;
  background: white;
  padding: 10px 10px 34px;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(92,14,42,0.25);
  animation: float-y 6s ease-in-out infinite;
}

.polaroid img{ border-radius: 4px; width: 100%; height: 170px; object-fit: cover; }

.polaroid.p1{ top: 0; left: 0; transform: rotate(-9deg); animation-delay: 0s; z-index: 2; }
.polaroid.p2{ top: 10%; right: 0; transform: rotate(8deg); animation-delay: -2s; z-index: 1; }
.polaroid.p3{ bottom: -6%; left: 18%; transform: rotate(-4deg); animation-delay: -4s; z-index: 3; }

@keyframes float-y{
  0%,100%{ transform: translateY(0) rotate(var(--r,0deg)); }
  50%{ transform: translateY(-14px) rotate(var(--r,0deg)); }
}

/* ---------- gallery ---------- */

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.6rem;
  max-width: 1200px;
  width: 100%;
}

.gallery-item{
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  perspective: 1000px;
}

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

.gallery-item:hover img{ transform: scale(1.08) rotate(-1deg); }

.gallery-caption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem 1.1rem 1rem;
  background: linear-gradient(to top, rgba(92,14,42,0.85), transparent);
  color: white;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.gallery-item:hover .gallery-caption{ opacity: 1; transform: translateY(0); }

.gallery-item.flip-card{
  perspective: 1200px;
}
.flip-inner{
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}
.gallery-item.flip-card.flipped .flip-inner{ transform: rotateY(180deg); }
.flip-front, .flip-back{
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
}
.flip-front img{ width:100%; height:100%; object-fit: cover; }
.flip-back{
  background: linear-gradient(135deg, var(--crimson), var(--deep-wine));
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
}
.flip-back p{
  font-family: 'Dancing Script', cursive;
  color: white;
  font-size: 1.6rem;
  line-height: 1.3;
}

/* lightbox */

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(92,14,42,0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
  animation: fade-in 0.25s ease;
}
.lightbox.open{ display: flex; }
@keyframes fade-in{ from{ opacity: 0; } to{ opacity: 1; } }

.lightbox img{
  max-width: min(720px, 92vw);
  max-height: 84vh;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: pop-in 0.3s ease;
}
@keyframes pop-in{ from{ transform: scale(0.9); opacity: 0.4; } to{ transform: scale(1); opacity: 1; } }

.lightbox-close{
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  font-size: 2.2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

/* ---------- timeline (our story) ---------- */

.timeline{
  max-width: 780px;
  width: 100%;
  position: relative;
  padding-left: 2.4rem;
}

.timeline::before{
  content: '';
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: linear-gradient(to bottom, var(--rose), var(--gold));
  border-radius: 3px;
}

.timeline-item{
  position: relative;
  margin-bottom: 3rem;
  padding-left: 1.2rem;
}

.timeline-item::before{
  content: '♥';
  position: absolute;
  left: -2.4rem;
  top: -2px;
  width: 26px;
  height: 26px;
  background: var(--crimson);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 6px 16px rgba(200,29,74,0.35);
}

.timeline-item h3{
  font-family: 'Playfair Display', serif;
  color: var(--crimson);
  font-size: 1.3rem;
  margin-bottom: 0.4rem;
}

.timeline-item p{
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--deep-wine);
}

.timeline-item .timeline-photo{
  margin-top: 1rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 320px;
  box-shadow: var(--shadow-card);
}

/* ---------- reasons flip cards ---------- */

.reasons-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.4rem;
  max-width: 1100px;
  width: 100%;
}

.reason-card{
  height: 190px;
  perspective: 1000px;
  cursor: pointer;
}

.reason-inner{
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(.4,.2,.2,1);
  transform-style: preserve-3d;
}

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

.reason-front, .reason-back{
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.2rem;
}

.reason-front{
  background: white;
  box-shadow: var(--shadow-card);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--crimson);
  flex-direction: column;
  gap: 0.5rem;
}
.reason-front .num{
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--gold);
}

.reason-back{
  background: linear-gradient(135deg, var(--crimson), var(--deep-wine));
  color: white;
  transform: rotateY(180deg);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  line-height: 1.5;
}

/* ---------- heart garden ---------- */

.heart-garden{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 1rem;
  max-width: 640px;
  width: 100%;
}

.clickable-heart{
  background: none;
  border: none;
  font-size: 2.8rem;
  cursor: pointer;
  color: var(--blush);
  transition: transform 0.15s ease, color 0.15s ease;
  user-select: none;
}
.clickable-heart:hover{ transform: scale(1.15); }
.clickable-heart.tapped{ animation: pop 0.35s ease; }
@keyframes pop{
  0%{ transform: scale(1); }
  40%{ transform: scale(1.4); }
  100%{ transform: scale(1); }
}

.garden-status{
  margin-top: 2.2rem;
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  color: var(--crimson);
  text-align: center;
  min-height: 2.2rem;
}

.reset-link{
  margin-top: 1.2rem;
  background: none;
  border: 1px solid var(--crimson);
  color: var(--crimson);
  padding: 0.5rem 1.3rem;
  border-radius: 999px;
  font-family: 'Cormorant Garamond', serif;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.reset-link:hover{ background: var(--crimson); color: white; }

/* ---------- quiz ---------- */

.quiz-box{
  max-width: 640px;
  width: 100%;
  background: white;
  border-radius: 26px;
  padding: 2.4rem 2rem;
  box-shadow: var(--shadow-soft);
}

.quiz-progress{
  text-align: center;
  font-size: 0.95rem;
  color: var(--crimson);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.quiz-question{
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  text-align: center;
  color: var(--deep-wine);
  margin-bottom: 1.6rem;
}

.quiz-options{ display: grid; gap: 0.9rem; }

.quiz-option{
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  padding: 0.9rem 1.2rem;
  border-radius: 16px;
  border: 1.5px solid var(--blush);
  background: var(--cream-pink);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s, border 0.2s, transform 0.15s;
  color: var(--deep-wine);
}
.quiz-option:hover{ transform: translateX(4px); border-color: var(--rose); }
.quiz-option.correct{ background: #DFF3E1; border-color: #4CAF50; }
.quiz-option.wrong{ background: #FBDEE3; border-color: var(--crimson); }

.quiz-feedback{
  margin-top: 1.4rem;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--crimson);
  min-height: 1.6rem;
}

.quiz-result{
  text-align: center;
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--crimson);
}

.quiz-nav{ display: flex; justify-content: center; margin-top: 1.6rem; }

.next-btn{
  background: var(--crimson);
  color: white;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: 999px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.2s;
}
.next-btn:hover{ background: var(--deep-wine); }
.next-btn:disabled{ opacity: 0.4; cursor: not-allowed; }

/* ---------- page nav (prev/next) ---------- */

.page-links{
  max-width: 1100px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.page-link-card{
  flex: 1;
  min-width: 220px;
  background: white;
  border-radius: var(--radius-md);
  padding: 1.4rem 1.6rem;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.page-link-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.page-link-card .label{
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
}
.page-link-card .title{
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--crimson);
  margin-top: 0.3rem;
}
.page-link-card.next{ text-align: right; }

/* ---------- footer ---------- */

footer{
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.4rem 1rem 3rem;
  font-size: 0.95rem;
  color: var(--crimson);
  opacity: 0.8;
}

footer .foot-heart{
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 1.3rem;
  animation: pop 1.8s ease-in-out infinite;
}

@media (max-width: 480px){
  .quiz-box{ padding: 1.8rem 1.3rem; }
  .timeline{ padding-left: 1.9rem; }
  .timeline-item::before{ left: -1.9rem; }
}
