:root {
  --ink-0: #07080f;
  --ink-1: #0c0e1a;
  --champagne: #d9c9a3;
  --champagne-bright: #f0e3c0;
  --rose: #d98ba4;
  --mist: #9a9db8;
  --mist-dim: #6b6e8a;
  --paper: #f2ecdd;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--ink-0);
}
body {
  font-family: 'Inter', sans-serif;
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  touch-action: manipulation;
}

/* ---------- ambient scene ---------- */
.scene {
  position: fixed; inset: 0; overflow: hidden; z-index: 0;
  background:
    radial-gradient(120% 90% at 50% 110%, #1a1430 0%, transparent 55%),
    linear-gradient(175deg, var(--ink-1) 0%, var(--ink-0) 60%, #0a0714 100%);
}
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.16; will-change: transform; }
.aurora.a { width: 55vmax; height: 40vmax; left: -12vmax; top: -14vmax;
  background: radial-gradient(circle, var(--rose) 0%, transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate; }
.aurora.b { width: 50vmax; height: 42vmax; right: -16vmax; bottom: -18vmax;
  background: radial-gradient(circle, #8a6ea8 0%, transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate; }
.aurora.c { width: 30vmax; height: 30vmax; left: 30vw; bottom: -20vmax;
  background: radial-gradient(circle, var(--champagne) 0%, transparent 60%);
  opacity: 0.07; animation: drift-a 38s ease-in-out infinite alternate-reverse; }
@keyframes drift-a { from { transform: translate(0,0) scale(1); } to { transform: translate(6vmax,4vmax) scale(1.15); } }
@keyframes drift-b { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-5vmax,-3vmax) scale(0.95); } }

#stars { position: absolute; inset: 0; }

.grain {
  position: absolute; inset: -50%; width: 200%; height: 200%; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 300 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045; animation: grain-shift 0.9s steps(3) infinite;
}
@keyframes grain-shift { 0%{transform:translate(0,0)} 33%{transform:translate(-2%,1%)} 66%{transform:translate(1%,-2%)} 100%{transform:translate(0,0)} }

/* ---------- app + slides ---------- */
.app {
  position: fixed; inset: 0; z-index: 5;
  height: 100dvh; width: 100%;
}
.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; padding: 20px 24px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  opacity: 0; transform: translateY(22px) scale(0.99);
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1);
  will-change: opacity, transform;
}
.slide.active { opacity: 1; transform: none; pointer-events: auto; }
.slide.leaving { opacity: 0; transform: translateY(-18px) scale(0.99); }

/* parallax wrapper inside a slide */
.par {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; will-change: transform;
  margin: auto;                 /* centers when there's room, scrolls when content is tall */
  padding: 18px 0 44px;
}

/* ---------- typography ---------- */
.kicker {
  font-size: clamp(11px, 1.4vw, 13px); font-weight: 400;
  letter-spacing: 0.55em; text-indent: 0.55em; color: var(--mist);
  text-transform: uppercase;
}
.name {
  font-family: 'Playfair Display', serif; font-weight: 500; font-style: italic;
  font-size: clamp(76px, 17vw, 178px); line-height: 1.18; letter-spacing: -0.01em;
  margin: 0.02em 0 0.1em; padding: 0.06em 0.18em 0.14em; overflow: visible;
  background: linear-gradient(115deg, var(--paper) 30%, var(--champagne-bright) 50%, var(--paper) 70%);
  background-size: 220% 100%; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.name.shimmer { animation: shimmer 7s ease-in-out infinite; }
@keyframes shimmer { 0%,100%{background-position:0% 0} 50%{background-position:100% 0} }
.name .dots { display: inline-flex; gap: 0.06em; margin-left: 0.08em; vertical-align: baseline; }
.name .dots i {
  display: inline-block; width: 0.16em; height: 0.16em; border-radius: 50%;
  background: var(--champagne-bright); align-self: flex-end; margin-bottom: 0.14em;
  animation: dot-breathe 2.6s ease-in-out infinite;
}
.name .dots i:nth-child(2) { animation-delay: 0.24s; }
.name .dots i:nth-child(3) { animation-delay: 0.48s; }
@keyframes dot-breathe { 0%,100%{opacity:1} 50%{opacity:0.28} }

.line {
  min-height: 2.6em; max-width: 42ch;
  font-size: clamp(15px, 2.1vw, 18px); font-weight: 300; line-height: 1.6;
  letter-spacing: 0.015em; color: var(--mist); text-wrap: balance;
}
.line1 { min-height: auto; margin-bottom: 3px; }
.line2 { min-height: 1.7em; margin-top: 0; }
.line .caret {
  display: inline-block; width: 1px; height: 1.05em; background: var(--champagne);
  vertical-align: -0.15em; margin-left: 2px; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.aside {
  font-family: 'Inter', sans-serif; font-style: italic; font-weight: 300;
  font-size: clamp(14px, 1.9vw, 17px); letter-spacing: 0.02em; color: var(--rose); margin-top: 16px;
}

.heading {
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 500;
  font-size: clamp(15px, 2.4vw, 20px); color: var(--mist); letter-spacing: 0.01em; margin-bottom: 10px;
}
.ask {
  font-family: 'Playfair Display', serif; font-weight: 500;
  font-size: clamp(30px, 6.4vw, 62px); line-height: 1.12; max-width: 16ch;
  color: var(--paper); margin: 0 0 14px; text-wrap: balance;
}

/* ---------- reveal helper ---------- */
.reveal { opacity: 0; }
.reveal.in { animation: rise 1.1s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }

/* ---------- buttons ---------- */
.cta {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 38px; font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 400;
  letter-spacing: 0.06em; color: var(--champagne-bright); background: transparent;
  border: 1px solid rgba(217,201,163,0.45); border-radius: 999px; cursor: pointer;
  overflow: hidden; transition: color 0.45s ease, border-color 0.45s ease, transform 0.2s ease;
  will-change: transform; -webkit-tap-highlight-color: transparent;
}
.cta::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(115deg, var(--champagne) 0%, var(--champagne-bright) 100%);
  transform: translateX(-101%); transition: transform 0.5s cubic-bezier(0.65,0,0.35,1);
}
.cta:hover::before, .cta:active::before { transform: translateX(0); }
.cta:hover, .cta:active { color: #211a08; border-color: var(--champagne-bright); }
.cta span, .cta svg { position: relative; z-index: 1; }
.cta svg { transition: transform 0.4s ease, color 0.4s ease; }
.cta:hover svg { transform: translateX(5px); }
/* on hover the heart fills with the same rose as the "suuuurely" aside */
.heart-ic path { transition: fill 0.35s ease, stroke 0.35s ease; }
.cta:hover .heart-ic path, .cta:active .heart-ic path { fill: var(--rose); stroke: var(--rose); }
.halo { position: absolute; inset: -18px; border-radius: 999px; border: 1px solid rgba(217,201,163,0.14);
  animation: halo-pulse 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes halo-pulse { 0%,100%{transform:scale(0.92);opacity:0} 45%{opacity:1} 70%{transform:scale(1.06);opacity:0} }

/* yes / no row */
.choices {
  display: flex; align-items: center; justify-content: center; gap: clamp(16px, 5vw, 44px);
  flex-wrap: wrap; margin-top: 10px; position: relative; min-height: 96px; width: 100%;
}
.btn {
  font-family: 'Inter', sans-serif; font-weight: 500; letter-spacing: 0.04em;
  border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.22,1,0.36,1), font-size 0.4s ease, padding 0.4s ease, opacity 0.4s ease, background 0.4s ease, color 0.4s ease;
  will-change: transform;
}
.btn-yes {
  color: #211a08; border: none;
  background: linear-gradient(115deg, var(--champagne) 0%, var(--champagne-bright) 100%);
  font-size: 17px; padding: 15px 40px; box-shadow: 0 6px 30px -10px rgba(217,201,163,0.6);
}
.btn-yes:hover { transform: scale(1.06); }
.btn-no {
  color: var(--mist); background: transparent; border: 1px solid rgba(154,157,184,0.4);
  font-size: 15px; padding: 13px 32px;
}
.btn-no:hover { color: var(--paper); border-color: var(--mist); }
.btn-no.floating {
  position: fixed; z-index: 30; margin: 0;
  transition: left 0.26s cubic-bezier(0.22,1,0.36,1), top 0.26s cubic-bezier(0.22,1,0.36,1), transform 0.26s ease;
}

/* fading breadcrumb the No button leaves behind so the eye can track it */
.no-trail {
  position: fixed; z-index: 29; pointer-events: none;
  border-radius: 999px; border: 1px solid rgba(154,157,184,0.4);
  background: rgba(154,157,184,0.05);
  animation: trail-fade 0.5s ease forwards;
}
@keyframes trail-fade {
  from { opacity: 0.55; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.72); }
}

/* escalating guilt line underneath the options */
.caption {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: clamp(15px, 2.6vw, 21px); color: var(--rose);
  margin-top: 24px; min-height: 1.4em; letter-spacing: 0.01em;
  transition: transform 0.18s cubic-bezier(0.22,1,0.36,1);
}

/* ---------- celebration ---------- */
.cel { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }

/* the horizontal offset is carried by the float keyframes (element-relative %),
   and the image reveals with opacity only — so nothing ever resets the transform */
.cel-male {
  width: min(250px, 62vw); height: auto; display: block; margin-bottom: -4px;
  position: relative; z-index: 3;
  opacity: 0; transition: opacity 0.9s ease;
  filter: drop-shadow(0 14px 34px rgba(0,0,0,0.55));
  animation: male-float 5s ease-in-out infinite;
}
.cel-male.in { opacity: 1; }
@keyframes male-float {
  0%,100% { transform: translateX(-32%) translateY(0) rotate(-0.6deg); }
  50%     { transform: translateX(-32%) translateY(-7px) rotate(0.6deg); }
}

.cel-female-wrap { position: relative; z-index: 2; margin-top: 8px; display: flex; justify-content: center; width: 100%; }
.cel-female {
  width: min(188px, 48vw); height: auto; display: block;
  opacity: 0; transition: opacity 0.9s ease;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,0.5));
  animation: female-float 4.4s ease-in-out infinite;
}
.cel-female.in { opacity: 1; }
@keyframes female-float {
  0%,100% { transform: translateX(68%) translateY(0) rotate(1deg); }
  50%     { transform: translateX(68%) translateY(-6px) rotate(-1deg); }
}
.cel-glow {
  position: absolute; z-index: -1; left: 62%; top: 42%; width: 240px; height: 190px;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(197,138,164,0.20), transparent 72%);
  pointer-events: none;
}

.cel-fall { position: absolute; top: 28%; left: 0; right: 0; height: 54%; z-index: 1; pointer-events: none; overflow: visible; }
.fh { position: absolute; top: 0; opacity: 0; will-change: transform, opacity; }
.fha { animation: fall-a linear infinite; }
.fhb { animation: fall-b linear infinite; }
@keyframes fall-a {
  0% { transform: translate(0,-10px) rotate(-8deg); opacity: 0; }
  14% { opacity: 1; }
  84% { opacity: 1; }
  100% { transform: translate(64px,270px) rotate(12deg); opacity: 0; }
}
@keyframes fall-b {
  0% { transform: translate(0,-10px) rotate(7deg); opacity: 0; }
  14% { opacity: 1; }
  84% { opacity: 1; }
  100% { transform: translate(84px,280px) rotate(-14deg); opacity: 0; }
}

/* ---------- calendar picker ---------- */
.cal { width: min(348px, 92vw); margin: 8px 0 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-title { font-family: 'Playfair Display', serif; font-style: italic; font-size: clamp(17px,4.5vw,21px); color: var(--paper); }
.cal-nav {
  background: transparent; border: 1px solid rgba(154,157,184,0.3); color: var(--paper);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1;
  transition: background 0.2s, border-color 0.2s; -webkit-tap-highlight-color: transparent;
}
.cal-nav:hover:not(:disabled) { background: rgba(217,201,163,0.12); border-color: var(--champagne); }
.cal-nav:disabled { opacity: 0.25; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { font-size: 11px; color: var(--mist-dim); text-transform: uppercase; letter-spacing: 0.06em; padding-bottom: 4px; }
.cal-cell {
  aspect-ratio: 1 / 1; border: none; border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,0.03); color: var(--paper); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s ease, background 0.2s ease; -webkit-tap-highlight-color: transparent;
}
.cal-cell:hover:not(:disabled):not(.empty) { background: rgba(217,201,163,0.14); transform: translateY(-2px); }
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell.past { color: var(--mist-dim); opacity: 0.3; background: transparent; cursor: default; }
.cal-cell.sel { background: linear-gradient(115deg, var(--champagne), var(--champagne-bright)); color: #211a08; font-weight: 500; }
.hint { font-size: 13px; color: var(--mist-dim); margin-top: 6px; }

/* ---------- countdown ---------- */
.cd {
  display: flex; gap: clamp(10px, 3vw, 26px); justify-content: center; margin: 20px 0 14px;
}
.cd-cell { min-width: 62px; }
.cd-num {
  font-family: 'Playfair Display', serif; font-weight: 500;
  font-size: clamp(38px, 9vw, 68px); line-height: 1; color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.cd-unit { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mist-dim); margin-top: 8px; }
.cd-target { font-family: 'Playfair Display', serif; font-style: italic; font-size: clamp(16px, 2.6vw, 22px); color: var(--champagne); margin-top: 6px; }

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

/* ---------- lang switcher ---------- */
.lang { position: fixed; top: 16px; right: 16px; z-index: 50; display: flex; gap: 4px;
  background: rgba(12,14,26,0.5); border: 1px solid rgba(154,157,184,0.2); border-radius: 999px; padding: 4px; backdrop-filter: blur(6px); }
.lang button {
  border: none; background: transparent; color: var(--mist); cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; transition: color 0.25s, background 0.25s;
}
.lang button.on { color: #211a08; background: var(--champagne); }

/* ---------- toast + foot ---------- */
.toast {
  position: fixed; left: 50%; bottom: 42px; transform: translateX(-50%) translateY(20px);
  font-family: 'Inter', sans-serif; font-style: italic; font-size: clamp(14px,2vw,17px); color: var(--champagne);
  opacity: 0; transition: opacity 0.5s ease, transform 0.5s ease; z-index: 45; pointer-events: none;
  text-align: center; width: 90vw; max-width: 520px;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.foot {
  position: fixed; bottom: 14px; width: 100%; text-align: center; z-index: 6;
  padding: 0 20px;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist);
  opacity: 0; transition: opacity 1.4s ease; pointer-events: none;
}
.foot.on { opacity: 0.78; }

@media (max-width: 480px) {
  .foot { font-size: 9px; letter-spacing: 0.16em; }
  .cd-cell { min-width: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
}
