/* =========================================
   Victoria · a date invitation
   palette: blush / powder / cream / deep-rose
   ========================================= */

:root {
  --blush: #FFE5EC;
  --powder: #FFC2D1;
  --cream: #FFF5F7;
  --rose: #FB6F92;
  --rose-deep: #D94F74;
  --ink: #5A3E4A;
  --ink-soft: #8A6575;
  --gold: #E8B4BC;
  --shadow: 0 20px 60px -20px rgba(251, 111, 146, 0.35);
  --shadow-soft: 0 10px 40px -15px rgba(251, 111, 146, 0.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: linear-gradient(160deg, var(--cream) 0%, var(--blush) 45%, var(--powder) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  position: relative;
  line-height: 1.5;
}

/* soft radial glow overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.6) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(251, 111, 146, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

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

/* =========================================
   Floating petals background
   ========================================= */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -40px;
  width: 18px;
  height: 18px;
  background: radial-gradient(ellipse at 30% 30%, #fff 0%, var(--powder) 60%, var(--rose) 100%);
  border-radius: 100% 0 100% 0;
  opacity: 0;
  animation: petalFall linear infinite;
  filter: drop-shadow(0 2px 4px rgba(251, 111, 146, 0.2));
}

@keyframes petalFall {
  0%   { transform: translate(0, -40px) rotate(0deg);    opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { transform: translate(40px, 110vh) rotate(720deg); opacity: 0; }
}

/* =========================================
   Screens
   ========================================= */
.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 24px;
  text-align: center;
  animation: fadeUp 1s cubic-bezier(0.19, 1, 0.22, 1);
}

.screen.active { display: flex; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   SCREEN 1 — greeting
   ========================================= */
.envelope-wrap {
  margin-bottom: 36px;
  animation: floatEnvelope 4s ease-in-out infinite;
}

@keyframes floatEnvelope {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.envelope {
  width: 140px;
  height: 95px;
  position: relative;
  filter: drop-shadow(0 15px 30px rgba(251, 111, 146, 0.35));
}

.envelope-body {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #fff 0%, var(--blush) 100%);
  border-radius: 6px;
  border: 1.5px solid var(--powder);
  overflow: hidden;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-left: 70px solid transparent;
  border-right: 70px solid transparent;
  border-top: 52px solid var(--powder);
  z-index: 2;
  transform-origin: top;
  transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.envelope-heart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  color: var(--rose);
  font-size: 28px;
  animation: heartbeat 1.8s ease-in-out infinite;
  z-index: 3;
}

@keyframes heartbeat {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.15); }
}

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

.hello {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(36px, 7vw, 58px);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}

.hello .name {
  font-style: italic;
  font-weight: 600;
  color: var(--rose-deep);
  display: inline-block;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub {
  font-size: clamp(15px, 3vw, 18px);
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 40px;
}

.dots { display: inline-block; animation: dots 1.5s steps(4) infinite; }
@keyframes dots {
  0%   { opacity: 0.2; }
  50%  { opacity: 1; }
  100% { opacity: 0.2; }
}

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 34px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #fff;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn-open:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 60px -15px rgba(251, 111, 146, 0.5);
}

.btn-open:active { transform: translateY(0); }

.btn-open svg { transition: transform 0.3s; }
.btn-open:hover svg { transform: translateX(4px); }

/* =========================================
   SCREEN 2 — the question
   ========================================= */
.whisper {
  font-family: 'Caveat', cursive;
  font-size: clamp(20px, 4vw, 26px);
  color: var(--rose-deep);
  margin-bottom: 24px;
  opacity: 0.8;
  transform: rotate(-3deg);
}

.question {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: clamp(34px, 7vw, 56px);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 56px;
  max-width: 600px;
}

.question em {
  font-weight: 600;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.buttons-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 90px;
  width: 100%;
  max-width: 500px;
}

.btn-yes {
  font-family: inherit;
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  border: none;
  padding: 22px 64px;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  position: relative;
  overflow: hidden;
  animation: pulseYes 2s ease-in-out infinite;
}

@keyframes pulseYes {
  0%, 100% { box-shadow: 0 20px 60px -20px rgba(251, 111, 146, 0.35), 0 0 0 0 rgba(251, 111, 146, 0.5); }
  50%      { box-shadow: 0 20px 60px -20px rgba(251, 111, 146, 0.35), 0 0 0 18px rgba(251, 111, 146, 0); }
}

.btn-yes:hover {
  transform: translateY(-4px) scale(1.03);
}

.btn-yes:active { transform: translateY(-1px) scale(1.01); }

.btn-no {
  font-family: inherit;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid rgba(138, 101, 117, 0.3);
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}

.btn-no:hover { color: var(--ink); }

.btn-no.running {
  position: fixed !important;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  z-index: 50;
  margin: 0 !important;
}

.hint {
  margin-top: 28px;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--rose-deep);
  min-height: 30px;
  opacity: 0;
  transition: opacity 0.5s;
}

.hint.show { opacity: 1; }

/* =========================================
   SCREEN 3 — details
   ========================================= */
.screen-3 {
  padding-top: 60px;
  padding-bottom: 60px;
}

.celebrate {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(46px, 9vw, 80px);
  line-height: 1;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--ink);
}

.celebrate-heart {
  color: var(--rose);
  font-style: normal;
  animation: heartbeat 1.4s ease-in-out infinite;
}

.intro {
  font-family: 'Caveat', cursive;
  font-size: clamp(22px, 4vw, 28px);
  color: var(--rose-deep);
  margin-bottom: 48px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 640px;
  width: 100%;
  margin-bottom: 56px;
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; max-width: 360px; }
}

.card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: var(--shadow-soft);
  transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
  animation: cardReveal 0.8s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.25s; }
.card:nth-child(3) { animation-delay: 0.4s; }
.card:nth-child(4) { animation-delay: 0.55s; }

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px -15px rgba(251, 111, 146, 0.35);
  background: rgba(255, 255, 255, 0.85);
}

.card-icon { font-size: 32px; margin-bottom: 12px; }

.card-label {
  font-family: 'Caveat', cursive;
  font-size: 20px;
  color: var(--rose-deep);
  margin-bottom: 8px;
}

.card-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.card-sub {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
  font-weight: 300;
  font-style: italic;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  color: var(--rose);
  text-decoration: none;
  border-bottom: 1px solid rgba(251, 111, 146, 0.3);
  transition: all 0.2s;
}

.card-link:hover { color: var(--rose-deep); border-bottom-color: var(--rose-deep); }

/* Countdown */
.countdown-wrap {
  margin-bottom: 40px;
  animation: cardReveal 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.7s both;
}

.countdown-label {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  color: var(--rose-deep);
  margin-bottom: 18px;
}

.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.cd-item {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 14px 10px;
  min-width: 72px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(26px, 5vw, 36px);
  color: var(--rose-deep);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.cd-lbl {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  margin-top: 6px;
}

.cd-sep {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--rose);
  font-weight: 600;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.signature {
  font-family: 'Caveat', cursive;
  font-size: clamp(26px, 5vw, 36px);
  color: var(--rose-deep);
  animation: cardReveal 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.9s both;
}

.sig-heart {
  display: inline-block;
  animation: heartbeat 1.4s ease-in-out infinite;
}

/* =========================================
   Confetti
   ========================================= */
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  opacity: 0;
  animation: confettiFall 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* =========================================
   Mobile tweaks
   ========================================= */
@media (max-width: 520px) {
  .countdown { gap: 3px; }
  .cd-item { min-width: 60px; padding: 12px 6px; }
  .cd-sep { font-size: 22px; }
  .cd-lbl { font-size: 9px; }
  .btn-yes { padding: 20px 48px; }
  .cards { gap: 14px; }
}

