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

html {
  height: 100%;
  overflow-x: hidden;
  /* prevent overscroll bounce cutting content */
  overscroll-behavior: none;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #2a1520;
  color: #f8e8ee;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  margin: 0;
  position: relative;
  /* safe areas for notched phones */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.hearts-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.25;
}
.heart {
  position: absolute;
  bottom: -40px;
  animation: floatUp linear infinite;
  opacity: 0.25;
  font-size: 14px;
}
@keyframes floatUp {
  0% { transform: translateY(0); opacity: 0; }
  10% { opacity: 0.3; }
  90% { opacity: 0.15; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

/* ===== Pages ===== */
.page {
  display: none;
  width: 100%;
  max-width: 100%;
  z-index: 1;
  animation: fadeIn 0.45s ease;
}
.page.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== HERO - full viewport, nothing cut ===== */
.cinematic-hero {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100svh; /* small viewport = visible area without browser chrome */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(42, 21, 32, 0.94) 0%,
    rgba(42, 21, 32, 0.45) 45%,
    rgba(42, 21, 32, 0.15) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 32px 28px calc(40px + env(safe-area-inset-bottom));
  width: 100%;
}

.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ffb6c9;
  margin-bottom: 12px;
  font-weight: 500;
}

.hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 8vw, 3.2rem);
  font-weight: 500;
  line-height: 1.12;
  color: #fff;
  margin-bottom: 10px;
}

.hero-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(255, 230, 240, 0.85);
  margin-bottom: 24px;
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255, 182, 201, 0.75);
  color: #ffe6f0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 36px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  touch-action: manipulation;
}
.btn-ghost:hover, .btn-ghost:active {
  background: rgba(255, 182, 201, 0.18);
}

/* ===== FULL-SCREEN PHOTO SCROLL ===== */
.photo-scroll {
  height: 100dvh;
  height: 100svh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.photo-slide {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  flex-shrink: 0;
}

.photo-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.slide-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30, 12, 22, 0.88) 0%,
    rgba(30, 12, 22, 0.2) 45%,
    rgba(30, 12, 22, 0.1) 100%
  );
  pointer-events: none;
}

.slide-text {
  position: absolute;
  bottom: calc(80px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 28px;
  z-index: 2;
}

.slide-label {
  font-size: 0.7rem;
  letter-spacing: 4px;
  color: #ff8fab;
  margin-bottom: 10px;
  font-weight: 500;
}

.slide-line {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem;
  font-style: italic;
  color: #fff;
  line-height: 1.35;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
}

.slide-hint {
  position: absolute;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 200, 215, 0.45);
  z-index: 2;
}

.slide-btn {
  position: absolute;
  bottom: calc(36px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
}

/* ===== PANELS (poem, letter, plan, etc) ===== */
.panel {
  background: #321a28;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 48px 24px calc(52px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-label {
  font-size: 0.7rem;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #ff8fab;
  margin-bottom: 12px;
  font-weight: 500;
  text-align: center;
}

.panel-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.85rem;
  font-weight: 500;
  text-align: center;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.25;
}

.panel-sub {
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 220, 230, 0.6);
  margin-bottom: 26px;
}

/* Poem */
.poem-panel { text-align: center; }
.poem-block {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.7;
  color: rgba(255, 240, 245, 0.92);
  margin: 26px 0 36px;
}
.poem-block p { margin-bottom: 2px; }
.poem-break { margin-top: 20px !important; }
.poem-emphasis {
  color: #ffb6c9;
  font-style: italic;
  margin-top: 8px !important;
}

.btn-ghost-dark {
  align-self: center;
  background: transparent;
  border: 1.5px solid rgba(255, 182, 201, 0.55);
  color: #ffe6f0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  touch-action: manipulation;
}
.btn-ghost-dark:hover, .btn-ghost-dark:active {
  background: rgba(255, 182, 201, 0.12);
}

/* Letter */
.letter-body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.12rem;
  line-height: 1.7;
  color: rgba(255, 240, 245, 0.9);
  margin: 18px 0 32px;
}
.letter-body p { margin-bottom: 15px; }
.letter-sign {
  margin-top: 22px !important;
  font-style: italic;
  color: #ffb6c9;
}
.letter-sign span { font-size: 0.95rem; opacity: 0.8; }

/* ===== VIDEO - full width, no cut ===== */
.video-stage {
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #1a0a12;
  padding-top: calc(28px + env(safe-area-inset-top));
  padding-bottom: env(safe-area-inset-bottom);
}
.video-stage .panel-title {
  margin-bottom: 4px;
}
.video-stage .panel-sub {
  margin-bottom: 18px;
}

.video-full {
  position: relative;
  width: 100%;
  /* use aspect ratio without cutting top */
  aspect-ratio: 16 / 9;
  max-height: 56dvh;
  background: #000;
  overflow: hidden;
  flex-shrink: 0;
}

.video-full iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-actions {
  padding: 24px 24px calc(40px + env(safe-area-inset-bottom));
  text-align: center;
}

.video-label {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(255, 220, 230, 0.8);
  margin-bottom: 18px;
}

.rotate-prompt {
  background: rgba(255, 107, 157, 0.15);
  border: 1px solid rgba(255, 143, 171, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  margin: 16px 24px;
  font-size: 0.9rem;
  color: #ffb6c9;
}

/* ===== CHOICES / FORM ===== */
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.choice-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 182, 201, 0.28);
  border-radius: 14px;
  padding: 16px 10px;
  color: #ffe6f0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
}
.choice-btn .choice-icon { font-size: 1.4rem; }
.choice-btn.selected,
.choice-btn:hover {
  background: rgba(255, 107, 157, 0.22);
  border-color: #ff8fab;
}

.form-group { margin-bottom: 14px; text-align: left; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: rgba(255, 200, 215, 0.7);
  margin-bottom: 8px;
}
.date-time-row { display: flex; gap: 10px; }
.input-field {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid rgba(255, 182, 201, 0.3);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: #ffe6f0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  outline: none;
}
.input-field:focus { border-color: #ff8fab; }
.input-field::placeholder { color: rgba(255, 200, 215, 0.4); }
.input-field::-webkit-calendar-picker-indicator { filter: invert(0.8); }

.summary-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 182, 201, 0.22);
  border-radius: 14px;
  padding: 18px;
  margin: 14px 0 12px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255, 230, 240, 0.9);
  text-align: left;
}
.fun-note {
  text-align: center;
  font-size: 0.95rem;
  color: rgba(255, 200, 215, 0.7);
  margin-bottom: 22px;
}

/* Final */
.final-panel {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-copy {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.18rem;
  line-height: 1.65;
  color: rgba(255, 240, 245, 0.9);
  margin: 18px 0 26px;
}
.final-copy p { margin-bottom: 2px; }
.final-space { margin-top: 16px !important; }
.years {
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: #ff8fab;
  margin-bottom: 12px;
}
.final-hearts { font-size: 1.3rem; margin-bottom: 18px; }
.final-note {
  font-size: 0.95rem;
  color: rgba(255, 200, 215, 0.7);
  line-height: 1.5;
  margin-bottom: 26px;
}
.replay {
  font-size: 0.85rem;
  color: rgba(255, 182, 201, 0.5);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Buttons */
.btn-main {
  width: 100%;
  background: linear-gradient(135deg, #ff6b9d, #ff4785);
  color: white;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.25s ease;
  touch-action: manipulation;
  box-shadow: 0 8px 24px rgba(255, 71, 133, 0.35);
  margin-top: 8px;
}
.btn-main:hover, .btn-main:active {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(255, 71, 133, 0.45);
}
.btn-main:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-text {
  background: none;
  border: none;
  color: rgba(255, 182, 201, 0.7);
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  margin-top: 16px;
  cursor: pointer;
  padding: 10px;
  touch-action: manipulation;
}
.btn-text:hover { color: #ffb6c9; }

.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti-piece {
  position: absolute;
  top: -12px;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.tiny-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(255, 71, 133, 0.95);
  color: white;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 10000;
  pointer-events: none;
  white-space: nowrap;
}
.tiny-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Desktop */
@media (min-width: 768px) {
  body {
    background: #24121c;
  }

  .cinematic-hero,
  .photo-slide,
  .photo-scroll {
    height: 100vh;
  }

  .panel {
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
  }

  .video-full {
    max-width: 720px;
    margin: 0 auto;
    max-height: 50vh;
  }

  .video-actions {
    max-width: 480px;
    margin: 0 auto;
  }

  .slide-line { font-size: 1.6rem; }
  .poem-block { font-size: 1.32rem; }
  .letter-body { font-size: 1.18rem; }
}

@media (min-width: 1024px) {
  .panel { max-width: 560px; }
  .hero-title { font-size: 3.4rem; }
}

/* ===== Show actual photos — less aggressive crop ===== */
.photo-slide {
  background: #1a0a12;
}

.photo-slide img {
  /* show the full photo, letterbox if needed */
  object-fit: contain !important;
  object-position: center center !important;
  background: #1a0a12;
}

/* Hero can stay cover but framed better */
.photo-tulips {
  object-fit: cover !important;
  object-position: center 15% !important;
}

/* If you prefer cover with gentler crop instead of contain, uncomment these:
.photo-beach { object-fit: cover !important; object-position: center 20% !important; }
.photo-heart { object-fit: cover !important; object-position: center 25% !important; }
.photo-peace { object-fit: cover !important; object-position: center 15% !important; }
*/

/* ===== Prepare page ===== */
.prepare-panel {
  text-align: center;
}

.prepare-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  font-weight: 500;
  color: #fff;
  line-height: 1.25;
  margin: 16px 0 28px;
}

.prepare-body {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.7;
  color: rgba(255, 230, 240, 0.85);
  margin-bottom: 28px;
}

.prepare-soft {
  font-size: 0.9rem;
  color: rgba(255, 182, 201, 0.65);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}


/* ===== Prepare multi-step ===== */
.prep-step { display: none; text-align: center; }
.prep-step.active { display: block; animation: fadeIn 0.35s ease; }

.prep-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.guess-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.guess-btn {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,182,201,0.3);
  border-radius: 14px;
  padding: 16px 12px;
  color: #ffe6f0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s ease;
}
.guess-btn:hover, .guess-btn:active {
  background: rgba(255,107,157,0.22);
  border-color: #ff8fab;
}
