/* --- Reset / Base --- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background:#000; color:#fff; }

/* --- Envelope Intro --- */
.envelope-section {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(1200px 600px at 50% 50%, #0d1b2a 0%, #000 70%);
  z-index: 10;
}

.envelope-section.hidden { display: none; }

.envelope {
  position: relative;
  width: 360px;
  height: 240px;
  perspective: 1000px;
}

.envelope-back,
.envelope-front {
  position: absolute;
  inset: 0;
  background: #f4f4f4;
  border: 2px solid #ddd;
  border-radius: 14px;
}

.envelope-front {
  height: 55%;
  top: auto;
  bottom: 0;
  background: #fff;
  border-radius: 14px 14px 10px 10px;
  transform-origin: bottom center;
  transition: transform 0.6s ease;
  z-index: 2;
}

.envelope-flap {
  position: absolute;
  top: -1px; left: -1px;
  width: calc(100% + 2px);
  height: 55%;
  background: #e8e8e8;
  border: 2px solid #ddd;
  border-bottom: none;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.6s ease 0.2s;
  z-index: 3;
}

.envelope.open .envelope-front { transform: rotateX(-180deg); }
.envelope.open .envelope-flap  { transform: rotateX(-180deg); }

.love-letter {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 320px; height: 420px;
  background: #fff; color: #333;
  padding: 30px; border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  transition: transform 0.6s ease 0.4s;
  z-index: 4; overflow-y: auto;
}
.envelope.open .love-letter { transform: translate(-50%, -50%) scale(1); }

.letter-content { font-family: Georgia, 'Times New Roman', serif; line-height: 1.6; font-size: 16px; }
.letter-title { font-size: 24px; margin-bottom: 20px; color:#d63384; text-align:center; font-weight:700; }
.letter-text { margin-bottom: 18px; }
.done-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white; border: none; padding: 12px 24px; border-radius: 25px;
  font-size: 16px; cursor: pointer; transition: transform 0.3s ease; display:block; margin: 20px auto 0; font-weight:600;
}
.done-btn:hover { transform: translateY(-2px); }

.click-hint {
  position: absolute; bottom: 50px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.8); font-size: 18px; animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:.6} 50%{opacity:1} }

/* --- Main Content / Hero --- */
.main-content { position: relative; z-index: 1; }

.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  background: #050b20;
  overflow: hidden;
}

.hero-content {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 0 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; width: 100%;
}
.hero-text { color: white; }
.hero-title { font-size: clamp(48px, 8vw, 80px); font-weight: 700; line-height: 1.1; margin-bottom: 24px; text-transform: uppercase; letter-spacing: -2px; }
.hero-subtitle { font-size: clamp(18px, 2.5vw, 24px); line-height: 1.4; margin-bottom: 40px; opacity: .9; font-weight: 300; }
.explore-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px; background: transparent; border: 2px solid white; color: white; text-decoration: none;
  font-size: 16px; font-weight: 600; transition: all .3s ease; text-transform: uppercase; letter-spacing: 1px;
}
.explore-btn:hover { background:#fff; color:#000; transform: translateY(-2px); }
.arrow { transition: transform .3s ease; }
.explore-btn:hover .arrow { transform: translateX(4px); }

.hero-image-container { position: relative; display:flex; justify-content:center; align-items:center; }
.hero-image { width: 400px; height: 400px; border-radius: 50%; object-fit: cover; object-position: center; border: 4px solid rgba(255,255,255,0.1); box-shadow: 0 0 100px rgba(255,255,255,0.1); transition: transform .3s ease; display:block; }
.hero-image:hover { transform: scale(1.05); }

/* --- Favorites Section (5 across on desktop) --- */
.favorites-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  padding: 80px 0;
  display: flex; align-items: center;
}
.section-content { max-width: 1200px; margin: 0 auto; padding: 0 40px; text-align: center; }
.section-title {
  font-size: clamp(36px, 6vw, 64px); font-weight: 700; margin-bottom: 24px; color: #fff; text-transform: uppercase; letter-spacing: -1px;
}
.section-subtitle { font-size: clamp(16px, 2vw, 20px); color: rgba(255,255,255,0.8); margin-bottom: 60px; font-weight: 300; }

.envelopes-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  margin-top: 40px;
}

/* envelope card */
.envelope-item { position: relative; cursor: pointer; transition: transform .3s ease; }
.envelope-item:hover { transform: translateY(-8px); }

/* size tuned down to fit 5 */
.mini-envelope { position: relative; width: 180px; height: 118px; margin: 0 auto 14px; }
.mini-envelope-back {
  position: absolute; width: 100%; height: 100%; background: #f4f4f4; border: 2px solid #ddd; border-radius: 8px;
}
.mini-envelope-front {
  position: absolute; width: 100%; height: 60%; background: #fff; border: 2px solid #ddd;
  border-radius: 8px 8px 0 0; transform-origin: bottom center; transition: transform .6s ease; z-index: 2;
}
.mini-envelope.open .mini-envelope-front { transform: rotateX(-180deg); }

.mini-envelope-flap {
  position: absolute; top: -1px; left: -1px; width: calc(100% + 2px); height: 50%;
  background:#e8e8e8; border: 2px solid #ddd; border-bottom: none; clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center; transition: transform .6s ease .2s; z-index: 3;
}
.mini-envelope.open .mini-envelope-flap { transform: rotateX(-180deg); }

/* Photo badge – moved lower + above front so it’s not cut off */
.envelope-photo {
  position: absolute; top: 76%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(255,255,255,0.9);
  z-index: 4; /* above the front so full circle shows */
  transition: opacity .3s ease;
}
.mini-envelope.open .envelope-photo { opacity: 0; }
.envelope-img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Tiny letter popup */
.mini-love-letter {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0);
  width: 170px; height: 190px; background:#fff; color:#333; padding: 16px; border-radius: 8px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.3); transition: transform .6s ease .4s; z-index: 5; overflow-y: auto;
}
.mini-envelope.open .mini-love-letter { transform: translate(-50%, -50%) scale(1); }
.mini-letter-content { font-family: Georgia, serif; line-height: 1.4; font-size: 12px; }
.mini-letter-title { font-size: 16px; margin-bottom: 10px; color:#d63384; text-align: center; font-weight:700; }
.mini-letter-text { font-size: 11px; line-height: 1.45; }

.envelope-label { color: rgba(255,255,255,0.95); font-size: 15px; font-weight: 500; margin-top: 6px; }

/* Sparkles */
@keyframes sparkle { 0%{opacity:0;transform:scale(0)} 50%{opacity:1;transform:scale(1)} 100%{opacity:0;transform:scale(0)} }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .envelopes-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; text-align:center; }
  .envelopes-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .envelopes-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
  .mini-envelope { width: 160px; height: 104px; }
  .envelope-photo { width: 50px; height: 50px; top: 76%; }
}
@media (max-width: 420px) {
  .envelopes-grid { grid-template-columns: 1fr; }
}

/* Make letter smaller on small screens */
@media (max-width: 768px) {
  .envelope { width: 300px; height: 200px; }
  .love-letter { width: 90vw; max-width: 320px; height: 75vh; max-height: 420px; padding: 20px; }
  .hero-image { width: 300px; height: 300px; }
}

/* TIMELINE STYLES (append to bottom of styles.css) */
.timeline-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #1B1A55, #343354);
  color: #ffffff;
}
.timeline-wrapper { position: relative; max-width: 1200px; margin: 40px auto 0; padding: 40px 20px; }

.timeline-bar {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 56px; /* center line height */
  height: 6px;
  background: linear-gradient(90deg,#8bd3d7 0%, #7fbcd0 35%, #f6b26b 70%, #c27ba0 100%);
  border-radius: 6px;
  z-index: 1;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

.timeline-items {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  z-index: 2;
}

/* each node+card */
.timeline-item { width: calc(20% - 18px); min-width: 140px; position: relative; text-align: center; cursor: default; }
.timeline-node {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg,#4aa0b2,#2b7b83);
  box-shadow: 0 8px 30px rgba(0,0,0,0.45); margin: 0 auto;
  transform: translateY(-32px);
  transition: transform .36s cubic-bezier(.2,.9,.3,1), box-shadow .3s;
  z-index: 3;
  border: 4px solid rgba(255,255,255,0.06);
}
.timeline-node svg { stroke: rgba(255,255,255,0.95); }

.timeline-card {
  background: rgba(255,255,255,0.06);
  padding: 14px 12px;
  border-radius: 10px;
  margin-top: 8px;
  min-height: 88px;
  transition: transform .36s, box-shadow .36s, background .36s;
  cursor: default;
}
.timeline-date { font-size: 13px; opacity: 0.85; margin-bottom: 6px; font-weight:600; }
.timeline-title { font-size: 16px; font-weight:700; margin-bottom: 6px; }
.timeline-desc { font-size: 13px; line-height:1.3; color: rgba(255,255,255,0.9); }

/* hover / in-view state */
.timeline-item.in-view .timeline-node {
  transform: translateY(-46px) scale(1.06);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.timeline-item.in-view .timeline-card {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
}

/* mobile: switch to vertical timeline */
@media (max-width: 900px) {
  .timeline-bar { left: 20px; right: auto; top: 40px; width: 6px; height: calc(100% - 80px); right: auto; left: 20px; border-radius: 6px; transform: translateX(0); }
  .timeline-items { flex-direction: column; align-items: flex-start; gap: 28px; padding-left: 64px; }
  .timeline-item { width: auto; min-width: 0; display: flex; align-items: flex-start; gap: 18px; }
  .timeline-node { transform: translateY(0); margin: 0; width: 56px; height: 56px; }
  .timeline-card { margin-top: 0; min-height: unset; padding: 12px; border-radius: 8px; width: calc(100% - 96px); }
  .timeline-wrapper { padding: 20px 8px; }
}

/* small polish */
.timeline-section .section-title { margin-bottom: 8px; }
.timeline-section .section-subtitle { margin-bottom: 18px; opacity: .9; font-weight:300; }
/* PHOTOS / COLLAGE */
.photos-section { padding: 60px 0; background: linear-gradient(180deg,#362c42,#501a8d); color:#fff; }
.photos-section .collage { position: relative; max-width: 1200px; margin: 36px auto 0; display: grid; gap: 12px;
  /* responsive mosaic: min 120px up to 1fr */
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-auto-rows: 140px;
  align-items: center;
  justify-items: center;
}

/* make a dynamic mosaic feel by spanning a few items (if available) */
.collage-img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

/* center camera overlay (always above images) */
.camera-link {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 5;
  width: 86px; height: 86px; border-radius: 50%;
  display:grid; place-items:center;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,0.06);
  box-shadow: 0 12px 36px rgba(0,0,0,0.45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.camera-link:hover { transform: translate(-50%,-50%) scale(1.06); box-shadow: 0 20px 48px rgba(0,0,0,0.55); }

/* make camera icon responsive */
.camera-link svg { width: 30px; height: 30px; }

/* COUNTDOWN */
.countdown-section { padding: 64px 0; background: linear-gradient(180deg,#120228,#02131a); color: #ffffff; text-align:center; }
.countdown-grid { display: flex; gap: 18px; justify-content:center; align-items:center; margin-top: 18px; flex-wrap:wrap; }
.count-col { min-width: 80px; padding: 14px 18px; background: rgba(255,255,255,0.03); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }
.count-num { font-size: clamp(28px, 5vw, 48px); font-weight: 800; line-height:1; }
.count-label { font-size: 12px; opacity: .9; margin-top: 6px; }

/* message after countdown hits zero */
.countdown-message { font-size: 16px; font-weight:600; color:#ffffff; }

/* Responsive */
@media (max-width: 900px) {
  .photos-section .collage { grid-auto-rows: 110px; gap: 10px; }
  .camera-link { width: 72px; height:72px; }
  .count-col { min-width: 64px; padding: 10px 12px; }
}
@media (max-width: 520px) {
  .photos-section .collage { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); grid-auto-rows: 100px; }
  .camera-link { width: 64px; height:64px; }
  .count-num { font-size: clamp(20px, 7vw, 36px); }
}
/* SURPRISE BUTTON (append to styles.css) */
.surprise-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 9999;
  background: linear-gradient(135deg,#ff7ab6,#7b6bff);
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .6px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  cursor: pointer;
  transform-origin: center;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s;
  opacity: 0.95;
}
.surprise-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 18px 40px rgba(0,0,0,0.55); }
.surprise-btn:active { transform: translateY(0) scale(.99); }
/* nicer inline SVG styling */
.car-btn i.fa-solid { font-size: 46px; color: #fff; line-height:1; }
@media (max-width:520px) { .car-btn i.fa-solid { font-size: 36px; } }


/* keep button small on narrow screens */
@media (max-width: 480px) {
  .surprise-btn { top: 12px; right: 12px; padding: 8px 12px; font-size: 14px; }
}

