:root {
  --blush-1: #fbdfe0;
  --blush-2: #f7c9c0;
  --champagne: #f5e2c8;
  --cream: #fff8f0;
  --gold: #c9a15a;
  --gold-light: #e8cd97;
  --gold-deep: #a8823f;
  --plum: #4a2436;
  --plum-soft: #6b3a4d;
  --ink: #3a2530;
  --card-bg: rgba(255, 251, 245, 0.86);
  --shadow: rgba(107, 45, 66, 0.18);
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Playfair Display", "Georgia", serif;
  color: var(--ink);
  background: linear-gradient(160deg, var(--blush-1) 0%, var(--blush-2) 38%, var(--champagne) 72%, var(--cream) 100%);
  overflow-x: hidden;
  position: relative;
}

/* ---------- Decorative background ---------- */

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

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  animation: drift 22s ease-in-out infinite;
}

.bg-blob.gold {
  background: radial-gradient(circle at 30% 30%, rgba(232, 205, 151, 0.95), rgba(232, 205, 151, 0));
}

.bg-blob.pink {
  background: radial-gradient(circle at 30% 30%, rgba(247, 201, 192, 0.95), rgba(247, 201, 192, 0));
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -25px) scale(1.08); }
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--gold-light);
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 4.5s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.6); }
  50% { opacity: 0.9; transform: scale(1.4); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 6.5rem 1.5rem 4rem;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--gold-deep);
  margin: 0 0 0.75rem;
  font-family: "Playfair Display", serif;
  font-weight: 600;
}

.hero__title {
  font-family: "Great Vibes", cursive;
  font-size: clamp(3.2rem, 10vw, 6rem);
  color: var(--plum);
  margin: 0;
  line-height: 1.05;
  text-shadow: 0 2px 18px rgba(107, 45, 66, 0.2);
}

.hero__amp {
  color: var(--gold);
  padding: 0 0.15em;
}

.hero__subtitle {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--plum-soft);
  margin: 0.4rem 0 1.6rem;
  letter-spacing: 0.02em;
}

.hero__dates {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1.4rem;
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  color: var(--plum);
}

.hero__divider {
  color: var(--gold);
}

.hero__hint {
  margin-top: 1.8rem;
  font-size: 0.95rem;
  color: var(--plum-soft);
}

.hero__scrolldown {
  margin: 2.2rem auto 0;
  width: 22px;
  height: 36px;
  border: 2px solid var(--gold);
  border-radius: 14px;
  position: relative;
}

.hero__scrolldown span {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--gold);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrolldown 1.6s ease-in-out infinite;
}

@keyframes scrolldown {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 18px; }
  100% { opacity: 0; top: 6px; }
}

/* ---------- Days / Timeline ---------- */

.days {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

.day-section {
  margin-bottom: 4.5rem;
}

.day-heading {
  text-align: center;
  margin-bottom: 2.6rem;
}

.day-heading__label {
  font-family: "Great Vibes", cursive;
  font-size: clamp(2.1rem, 6vw, 2.8rem);
  color: var(--plum);
  margin: 0;
}

.day-heading__date {
  display: block;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-top: 0.3rem;
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.node-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.node {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gold-deep);
  box-shadow: 0 4px 14px var(--shadow);
  transition: background 0.5s ease, border-color 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
  flex-shrink: 0;
  z-index: 2;
}

.node.revealed {
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  border-color: var(--gold);
  color: var(--cream);
  transform: scale(1.08);
  box-shadow: 0 0 0 6px rgba(201, 161, 90, 0.18), 0 6px 18px var(--shadow);
}

.connector {
  width: 2px;
  height: 56px;
  flex-shrink: 0;
  background-image: linear-gradient(var(--gold-light) 60%, transparent 0%);
  background-position: center;
  background-size: 2px 12px;
  background-repeat: repeat-y;
  transition: background-image 0.6s ease, opacity 0.6s ease;
}

.connector.active {
  background-image: linear-gradient(var(--gold) 100%, transparent 0%);
  background-size: 2px 2px;
}

.card-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0.9rem 0 1.6rem;
}

.card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid rgba(201, 161, 90, 0.35);
  box-shadow: 0 10px 30px var(--shadow);
  min-height: 150px;
}

.card__content {
  position: relative;
  z-index: 1;
  padding: 1.6rem 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 150px;
  justify-content: center;
}

.card__icon {
  font-size: 1.6rem;
}

.card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--plum);
  margin: 0;
}

.card__desc {
  font-size: 0.95rem;
  color: var(--plum-soft);
  margin: 0;
  line-height: 1.5;
  font-style: italic;
}

.card__time {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 0.15rem;
}

.scratch-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  touch-action: none;
  transition: opacity 0.7s ease;
}

.scratch-canvas.fading {
  opacity: 0;
}

.scratch-canvas.hidden {
  display: none;
}

/* burst hearts */
.burst {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  inset: 0;
  overflow: visible;
}

.burst-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 1rem;
  opacity: 0;
  animation: burst-fly 0.9s ease-out forwards;
}

@keyframes burst-fly {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.6); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.1); }
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1.5rem 3.5rem;
  color: var(--plum-soft);
  font-style: italic;
  font-size: 0.9rem;
}

.reset-btn {
  display: block;
  margin: 0.9rem auto 0;
  background: none;
  border: none;
  color: var(--gold-deep);
  font-family: inherit;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.45;
  cursor: pointer;
  padding: 0.4rem;
}

.reset-btn:hover {
  opacity: 0.85;
}

/* ---------- Responsive: alternate sides on wider screens ---------- */

@media (min-width: 640px) {
  .timeline-item {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
  }

  .timeline-item .card-wrap {
    margin: 0;
  }

  .timeline-item.side-left {
    flex-direction: row;
  }

  .timeline-item.side-right {
    flex-direction: row-reverse;
  }

  .timeline-item .card-wrap {
    width: 340px;
  }

  .timeline-item.side-left .card-wrap {
    margin-right: 1.4rem;
    text-align: right;
  }

  .timeline-item.side-right .card-wrap {
    margin-left: 1.4rem;
    text-align: left;
  }

  .timeline-item.side-left .card__content {
    align-items: flex-end;
  }

  .timeline-item.side-right .card__content {
    align-items: flex-start;
  }
}
