/* ===== Tokens ===== */
:root{
  --ink:#3A2433;
  --plum:#0B1957;
  --plum-deep:#081040;
  --rose:#B76E79;
  --rose-soft:#E7AAAF;
  --sky-soft:#9ECCFA;
  --gold:#C9A66B;
  --beige:#E6D8C7;
  --blush:#F8F3EA;
  --cream:#F8F3EA;
  --white:#ffffff;
}

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

body{
  font-family:"Poppins", sans-serif;
  background:var(--blush);
  color:var(--ink);
}

h1,h2,h3{ font-family:"Cormorant Garamond", serif; }

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

section{
  width:100%;
  min-height:100vh;
  padding:100px 8% 80px;
}

.eyebrow{
  text-transform:uppercase;
  letter-spacing:.25em;
  font-size:12px;
  color:var(--rose);
  font-weight:600;
  margin-bottom:10px;
}
.eyebrow.light{ color:var(--gold); }

.divider{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin:0 auto 46px;
}
.divider::before, .divider::after{
  content:"";
  width:60px;
  height:1px;
  background:linear-gradient(90deg, transparent, var(--gold));
}
.divider::after{ background:linear-gradient(90deg, var(--gold), transparent); }
.divider span{ color:var(--gold); font-size:14px; }

/* ===== Scroll reveal ===== */
.reveal{
  opacity:0;
  transform:translateY(28px);
  transition:opacity .8s ease, transform .8s ease;
}
.reveal.in-view{
  opacity:1;
  transform:translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
}

/* ===== Firsts flip card ===== */
.first-card{ perspective:1200px; background:transparent; box-shadow:none; }
.first-card .flip-inner{
  position:relative;
  width:100%;
  height:380px;
  transition:transform .6s cubic-bezier(.2,.8,.2,1);
  transform-style:preserve-3d;
  border-radius:20px;
  box-shadow:0 8px 20px rgba(61,31,58,.06);
}
.first-card:hover .flip-inner,
.first-card.flipped .flip-inner{ transform:rotateY(180deg); }

.flip-face{
  position:absolute; inset:0;
  backface-visibility:hidden;
  border-radius:20px;
  overflow:hidden;
  background:var(--white);
}
.flip-face.front .photo-slot{ height:100%; }
.flip-face.front .photo-slot img{ object-position: top center; }
.flip-face.front h3{ position:absolute; bottom:0; left:0; right:0; text-align:center; padding:16px; font-size:26px; color:var(--white); background:linear-gradient(0deg, rgba(61,31,58,.65), transparent); }

.flip-face.back{
  transform:rotateY(180deg);
  background:linear-gradient(135deg, var(--plum), var(--plum-deep));
  color:var(--cream);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:26px;
}
.flip-face.back p{ font-family:"Cormorant Garamond", serif; font-style:italic; font-size:1.3rem; line-height:1.6; }

.section-title{ text-align:center; max-width:600px; margin:0 auto 50px; }
.section-title h2{ font-size:3rem; }
.section-title p:not(.eyebrow){ color:#8a7580; margin-top:10px; }

/* ===== Dot Nav ===== */
#dot-nav{
  position:fixed;
  right:26px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  flex-direction:column;
  gap:16px;
  z-index:50;
}
#dot-nav a{
  width:10px;
  height:10px;
  border-radius:50%;
  background:rgba(61,31,58,.25);
  position:relative;
  transition:.3s;
}
#dot-nav a:hover, #dot-nav a.active{
  background:var(--rose);
  transform:scale(1.3);
}
#dot-nav a::after{
  content:attr(data-label);
  position:absolute;
  right:22px;
  top:50%;
  transform:translateY(-50%);
  font-size:11px;
  letter-spacing:.05em;
  white-space:nowrap;
  background:var(--plum);
  color:var(--white);
  padding:4px 10px;
  border-radius:20px;
  opacity:0;
  pointer-events:none;
  transition:.25s;
}
#dot-nav a:hover::after{ opacity:1; }
@media (max-width:800px){ #dot-nav{ display:none; } }

/* ===== Loading Screen ===== */
#loading-screen.hidden{ display:none; }
#loading-screen{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:radial-gradient(120% 120% at 50% 20%, var(--plum) 0%, var(--plum-deep) 55%, var(--ink) 100%);
  opacity:1;
  transition:opacity .8s ease;
}
#loading-screen.fade-out{ opacity:0; pointer-events:none; }
.loading-content{ text-align:center; animation: loadingFadeIn 1s ease both; }
@keyframes loadingFadeIn{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}
.loading-title{
  font-family:"Cormorant Garamond", serif;
  font-style:italic;
  font-size:2.4rem;
  color:var(--white);
  margin-bottom:18px;
}
.loading-heart{
  font-size:2rem;
  animation: heartbeat 1.1s ease-in-out infinite;
}
@keyframes heartbeat{
  0%, 100%{ transform:scale(1); }
  25%{ transform:scale(1.2); }
  40%{ transform:scale(0.95); }
  55%{ transform:scale(1.15); }
}
.loading-sub{
  margin-top:18px;
  font-size:13px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--sky-soft);
}

/* ===== Welcome ===== */
#welcome{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  text-align:center;
  overflow:hidden;
  background:radial-gradient(120% 120% at 50% 20%, var(--plum) 0%, var(--plum-deep) 55%, var(--ink) 100%);
}

.sparkles{
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(2px 2px at 15% 25%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 80% 15%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 40% 70%, #ffffff, transparent),
    radial-gradient(2.5px 2.5px at 65% 55%, var(--gold), transparent),
    radial-gradient(1.5px 1.5px at 90% 80%, #ffffff, transparent),
    radial-gradient(2px 2px at 25% 85%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 55% 30%, var(--sky-soft), transparent),
    radial-gradient(1.5px 1.5px at 10% 55%, #ffffff, transparent),
    radial-gradient(2px 2px at 48% 12%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 72% 90%, var(--gold), transparent),
    radial-gradient(1.5px 1.5px at 5% 40%, #ffffff, transparent),
    radial-gradient(1.5px 1.5px at 95% 45%, #ffffff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle{
  from{ opacity:.65; transform: translateY(0); }
  to{ opacity:1; transform: translateY(-14px); }
}
@keyframes drift{
  from{ transform: translateY(0); }
  to{ transform: translateY(-18px); }
}

.overlay{ position:absolute; inset:0; background:rgba(0,0,0,.15); }

.welcome-content{ position:relative; z-index:2; color:var(--cream); animation: fadeUp 1.1s ease both; }
@keyframes fadeUp{
  from{ opacity:0; transform:translateY(18px); }
  to{ opacity:1; transform:translateY(0); }
}

.welcome-content h1{
  font-size:4.4rem;
  font-style:italic;
  margin-bottom:14px;
  color:var(--white);
}
.typing-cursor{
  display:inline-block;
  margin-left:3px;
  animation: cursorBlink 1s step-end infinite;
  color:var(--gold);
}
@keyframes cursorBlink{
  0%, 100%{ opacity:1; }
  50%{ opacity:0; }
}
.welcome-heart{
  font-size:1.8rem;
  color:var(--gold);
  margin:18px 0 10px;
  animation: heartbeat 1.4s ease-in-out infinite;
}
.welcome-content .tagline{ font-size:1.15rem; color:var(--sky-soft); margin-bottom:34px; }

.enter-btn{
  display:inline-block;
  text-decoration:none;
  color:var(--ink);
  background:var(--gold);
  padding:15px 38px;
  border-radius:50px;
  font-weight:500;
  letter-spacing:.02em;
  transition:.3s ease;
}
.enter-btn:hover{
  transform:translateY(-4px);
  box-shadow:0 14px 30px rgba(212,175,127,.35);
}

/* ===== Home ===== */
#home{ display:flex; justify-content:center; align-items:center; background:var(--blush); }
.home-container{ width:100%; max-width:1100px; text-align:center; }

.photo-slot{
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg, var(--rose-soft), var(--gold));
}
.photo-slot img{ width:100%; height:100%; object-fit:cover; display:block; }
.photo-slot .placeholder-label{
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  text-align:center;
  color:var(--white);
  font-size:13px;
  font-weight:500;
  letter-spacing:.03em;
  padding:10px;
  background:linear-gradient(135deg, var(--rose-soft), var(--gold));
}

.photo-slot.round{
  width:220px; height:220px;
  border-radius:50%;
  margin:0 auto;
  border:5px solid var(--white);
  box-shadow:0 10px 30px rgba(61,31,58,.18);
}

.home-container h2{ margin-top:30px; font-size:3rem; }
.home-container p{ width:70%; margin:20px auto 50px; line-height:1.8; color:#5c4a56; }

.cards{ display:grid; grid-template-columns:repeat(2,1fr); gap:22px; }
.card{
  background:var(--white);
  padding:36px;
  border-radius:20px;
  cursor:pointer;
  transition:.3s;
  text-decoration:none;
  color:var(--ink);
  display:block;
  box-shadow:0 8px 20px rgba(61,31,58,.06);
}
.card:hover{ transform:translateY(-8px); box-shadow:0 20px 40px rgba(61,31,58,.14); border-color:var(--gold); }
.card span{ font-size:38px; }
.card h3{ margin-top:14px; }

/* ===== Gallery ===== */
.gallery{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:16px; }
.gallery .photo-slot{ height:300px; border-radius:18px; cursor:pointer; transition:.3s; }
.gallery .photo-slot:hover{ transform:scale(1.03); opacity:.92; }

.lightbox{
  position:fixed; inset:0;
  background:rgba(43,27,46,.92);
  display:none; justify-content:center; align-items:center;
  z-index:999;
}
.lightbox.active{ display:flex; }
.lightbox-img{ max-width:90%; max-height:85%; border-radius:15px; }
.close{ position:absolute; top:25px; right:35px; color:var(--white); font-size:45px; cursor:pointer; }

/* ===== Places (postcard style, no photo needed) ===== */
#places{ background:var(--cream); }
.places-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:28px; max-width:1100px; margin:auto; }
.place-card{
  background:var(--white);
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(61,31,58,.08);
  transition:.3s ease;
}
.place-card:hover{ transform:translateY(-8px); box-shadow:0 20px 40px rgba(61,31,58,.14); }

.postcard-visual{
  position:relative;
  height:200px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.postcard-visual::before{
  content:"";
  position:absolute; inset:0;
  background:var(--pc-bg, linear-gradient(135deg, var(--rose-soft), var(--gold)));
  opacity:.9;
}
.postcard-visual::after{ content:none; }
.postcard-visual svg{ position:relative; z-index:2; width:46px; height:46px; }
.postcard-visual .stamp{
  position:absolute;
  top:14px; right:14px;
  width:30px; height:30px;
  border-radius:50%;
  background:rgba(255,255,255,.25);
  display:flex; align-items:center; justify-content:center;
  font-size:14px;
  z-index:2;
}

.place-content{ padding:22px; text-align:center; }
.place-content h3{ font-size:28px; margin-bottom:10px; }
.place-content p{ color:#8a7580; line-height:1.6; font-size:15px; }

.places-grid.highlights{ grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); margin-bottom:60px; }

/* ---- Coffee map (grouped list of visited spots) ---- */
.coffee-map{ max-width:800px; margin:0 auto; }
.coffee-map-title{
  text-align:center;
  font-family:"Cormorant Garamond", serif;
  font-size:1.8rem;
  color:var(--ink);
  margin-bottom:36px;
}
.area-group{ margin-bottom:30px; }
.area-name{
  font-weight:600;
  font-size:15px;
  letter-spacing:.03em;
  color:var(--gold);
  margin-bottom:14px;
  text-transform:uppercase;
}
.venue-chips{ display:flex; flex-wrap:wrap; gap:10px; }
.venue-chip{
  background:var(--white);
  padding:9px 16px;
  border-radius:30px;
  font-size:14.5px;
  color:var(--ink);
  box-shadow:0 4px 14px rgba(61,31,58,.06);
  transition:.25s;
  display:inline-block;
}
.venue-chip:hover{ background:var(--gold); color:var(--white); transform:translateY(-2px); }

/* ===== Firsts ===== */
#firsts{ background:var(--blush); }
.firsts-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:28px; max-width:1100px; margin:auto; }
.first-card{
  background:var(--white);
  border-radius:20px;
  overflow:hidden;
  transition:.3s;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(61,31,58,.06);
}
.first-card:hover{ transform:translateY(-8px); box-shadow:0 18px 35px rgba(61,31,58,.12); }
.first-card .photo-slot{ height:240px; }
.first-card h3{ text-align:center; padding:18px; font-size:26px; }

/* ===== Playlist ===== */
#playlist{ background:var(--cream); }
.spotify-embed{
  max-width:700px;
  margin:0 auto;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(61,31,58,.1);
}
.spotify-embed.our-song{ margin-bottom:34px; }
.spotify-embed iframe{ display:block; }
.our-song-label{
  text-align:center;
  font-family:"Cormorant Garamond", serif;
  font-size:1.3rem;
  color:var(--gold);
  margin-bottom:14px;
}

/* ===== Our List (checklist) ===== */
#ourlist{ background:var(--blush); }
.checklist{
  list-style:none;
  max-width:640px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.check-item{
  position:relative;
  display:flex;
  align-items:center;
  gap:16px;
  background:var(--white);
  padding:18px 22px 18px 30px;
  border-radius:10px;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(61,31,58,.05);
  transition:.3s;
  user-select:none;
  border-left:3px dashed var(--gold);
  overflow:hidden;
}
.check-item::before{
  content:"";
  position:absolute;
  left:-9px; top:50%;
  width:18px; height:18px;
  border-radius:50%;
  background:var(--blush);
  box-shadow:0 0 0 1px rgba(61,31,58,.05) inset;
  transform:translateY(-50%);
}
.check-item::after{
  content:"";
  position:absolute;
  right:-9px; top:50%;
  width:18px; height:18px;
  border-radius:50%;
  background:var(--blush);
  transform:translateY(-50%);
}
.check-item:hover{ transform:translateX(6px); box-shadow:0 10px 24px rgba(61,31,58,.1); }
.check-item.done{ background:linear-gradient(90deg, rgba(201,166,107,.14), var(--white) 40%); border-left-color:var(--gold); }

.check-item .box{
  flex:0 0 26px;
  width:26px; height:26px;
  border-radius:50%;
  border:2px solid var(--gold);
  position:relative;
  transition:.25s;
}
.check-item .box::after{
  content:"✓";
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  color:var(--white);
  font-size:14px;
  opacity:0;
  transform:scale(.5);
  transition:.25s;
}
.check-item.done .box{ background:var(--gold); }
.check-item.done .box::after{ opacity:1; transform:scale(1); }
.check-item .txt{ font-size:16px; transition:.25s; }
.check-item.done .txt{ color:#a8949f; text-decoration:line-through; }

.checklist-hint{
  text-align:center;
  margin-top:22px;
  font-size:13px;
  color:#a8909e;
  letter-spacing:.02em;
}

/* ===== Ending ===== */
#ending{
  min-height:100vh;
  background:radial-gradient(120% 120% at 50% 20%, var(--plum) 0%, var(--plum-deep) 55%, var(--ink) 100%);
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:0;
}
.ending-overlay{
  width:100%; height:100%;
  display:flex; flex-direction:column;
  justify-content:center; align-items:center;
  text-align:center;
  color:var(--cream);
  padding:60px;
}
.ending-overlay h2{ font-size:4.4rem; font-style:italic; color:var(--white); }
.ending-overlay p{ max-width:640px; line-height:1.9; margin:26px 0; color:var(--sky-soft); }
#days-counter{ color:var(--gold); margin:20px 0; font-size:1.8rem; }

.live-counter{ display:flex; flex-direction:column; align-items:center; }
.counter-label{
  font-family:"Cormorant Garamond", serif;
  font-style:italic;
  font-size:1.6rem;
  color:var(--white);
  margin-bottom:16px;
}
.counter-ymd{ display:flex; gap:22px; margin-bottom:14px; }
.counter-block{
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:64px;
}
.counter-block span{
  font-family:"Cormorant Garamond", serif;
  font-size:2.4rem;
  color:var(--gold);
  line-height:1;
}
.counter-block small{
  margin-top:6px;
  font-size:11px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--sky-soft);
}
.counter-time{
  font-family:"Cormorant Garamond", serif;
  font-size:1.5rem;
  letter-spacing:.05em;
  color:var(--white);
  opacity:.85;
}
.signature{ font-style:italic; color:#cbb8c4; }

.ending-animation{ display:flex; flex-direction:column; align-items:center; }
.end-line{
  opacity:0;
  transform:translateY(22px);
}
.ending-animation.play .end-line{
  animation: endFadeUp .9s ease forwards;
  animation-delay: var(--d, 0s);
}
.ending-animation p.end-line{
  font-family:"Cormorant Garamond", serif;
  font-style:italic;
  font-size:1.7rem;
  color:var(--white);
  max-width:640px;
  margin:14px 0;
  line-height:1.6;
}
.ending-animation .signature.end-line{
  font-size:1.05rem;
  color:#cbb8c4;
  margin-top:30px;
}
@keyframes endFadeUp{
  to{ opacity:1; transform:translateY(0); }
}
@media (prefers-reduced-motion: reduce){
  .end-line{ opacity:1; transform:none; animation:none; }
}
.top-btn{
  margin-top:36px;
  color:var(--white);
  text-decoration:none;
  border:1px solid var(--gold);
  padding:14px 34px;
  border-radius:30px;
  transition:.3s;
}
.top-btn:hover{ background:var(--gold); color:var(--ink); }

footer{ text-align:center; padding:26px; background:var(--blush); color:#a9909e; font-size:14px; }

/* ===== Responsive ===== */
@media (max-width:760px){
  .welcome-content h1{ font-size:2.4rem; }
  .home-container p{ width:100%; }
  .cards, .places-grid, .firsts-grid{ grid-template-columns:1fr; }
  section{ padding:70px 6% 50px; }
  .ending-overlay h2{ font-size:2.8rem; }

  .welcome-content .tagline{ font-size:1rem; padding:0 8px; }
  .loading-title{ font-size:1.9rem; }
  .loading-sub{ font-size:11px; }

  .first-card .flip-inner{ height:300px; }

  .counter-ymd{ gap:12px; }
  .counter-block{ min-width:52px; }
  .counter-block span{ font-size:1.9rem; }
  .counter-time{ font-size:1.2rem; }
  .ending-overlay p, .ending-animation p.end-line{ font-size:1.25rem; padding:0 6px; }

  .gallery{ grid-template-columns:repeat(2,1fr); gap:10px; }
  .gallery .photo-slot{ height:170px; border-radius:12px; }

  .check-item{ padding:14px 16px 14px 22px; }
  .venue-chip{ font-size:13px; padding:7px 13px; }
  .coffee-map-title{ font-size:1.4rem; }

  .home-container h2{ font-size:2.2rem; }
  .section-title h2{ font-size:2.2rem; }
  .photo-slot.round{ width:150px; height:150px; }

  .spotify-embed{ margin-left:0; margin-right:0; }
}

@media (max-width:400px){
  .counter-ymd{ gap:8px; }
  .counter-block{ min-width:46px; }
  .counter-block span{ font-size:1.6rem; }
  .gallery{ grid-template-columns:1fr 1fr; }
}
