:root {
  --ink: #5b2945;
  --berry: #d73574;
  --berry-dark: #ac1f5a;
  --cream: #fffaf4;
  --pink: #ffd6e6;
  --peach: #ffdec2;
  --sky: #cdeffd;
  --mint: #bdebd2;
  --shadow: 0 22px 60px rgba(112, 42, 77, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 7%, rgba(255, 255, 255, 0.9) 0 3%, transparent 12%),
    linear-gradient(155deg, #fff2f7 0%, #ffe1eb 42%, #dff6ff 100%);
  font-family:
    "Arial Rounded MT Bold", "Rubik", "Noto Sans Hebrew", Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky::before {
  position: absolute;
  inset: 0;
  content: "";
  opacity: 0.65;
  background-image:
    radial-gradient(circle at 15% 25%, #fff 0 2px, transparent 2.5px),
    radial-gradient(circle at 86% 32%, #fff 0 2px, transparent 2.5px),
    radial-gradient(circle at 46% 11%, rgba(255, 255, 255, 0.85) 0 1.5px, transparent 2px);
  background-size: 110px 110px, 145px 145px, 85px 85px;
}

.sun {
  position: absolute;
  top: clamp(26px, 7vw, 72px);
  left: clamp(22px, 8vw, 110px);
  width: clamp(82px, 10vw, 130px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffd86b;
  box-shadow:
    0 0 0 18px rgba(255, 219, 112, 0.16),
    0 0 60px rgba(255, 202, 75, 0.55);
  animation: sun-pulse 5s ease-in-out infinite;
}

.cloud {
  --cloud-color: rgba(255, 255, 255, 0.78);
  position: absolute;
  width: 118px;
  height: 34px;
  border-radius: 999px;
  background: var(--cloud-color);
  filter: drop-shadow(0 8px 16px rgba(100, 130, 160, 0.1));
  animation: cloud-drift 12s ease-in-out infinite alternate;
}

.cloud::before,
.cloud::after {
  position: absolute;
  bottom: 7px;
  content: "";
  border-radius: 50%;
  background: var(--cloud-color);
}

.cloud::before {
  left: 22px;
  width: 48px;
  height: 48px;
}

.cloud::after {
  right: 18px;
  width: 62px;
  height: 62px;
}

.cloud-one {
  top: 18%;
  right: 7%;
}

.cloud-two {
  top: 54%;
  left: -36px;
  scale: 0.72;
  animation-delay: -4s;
}

.cloud-three {
  top: 70%;
  right: 9%;
  scale: 0.5;
  opacity: 0.65;
  animation-delay: -8s;
}

.sparkle {
  position: absolute;
  color: rgba(215, 53, 116, 0.32);
  font-size: 24px;
  animation: twinkle 2.4s ease-in-out infinite;
}

.sparkle-one {
  top: 16%;
  left: 28%;
}

.sparkle-two {
  top: 34%;
  right: 20%;
  font-size: 15px;
  animation-delay: -0.8s;
}

.sparkle-three {
  bottom: 22%;
  left: 18%;
  font-size: 18px;
  animation-delay: -1.6s;
}

.horizon {
  position: absolute;
  z-index: -1;
  right: -10%;
  bottom: -21vh;
  left: -10%;
  height: 42vh;
  border-radius: 50% 50% 0 0;
  opacity: 0.65;
  background:
    radial-gradient(circle at 10% 20%, #fff 0 5px, #ffc6dc 5px 10px, transparent 11px),
    radial-gradient(circle at 32% 14%, #fff 0 5px, #ffbc4f 5px 10px, transparent 11px),
    radial-gradient(circle at 61% 18%, #fff 0 5px, #a3538c 5px 10px, transparent 11px),
    radial-gradient(circle at 86% 10%, #fff 0 5px, #ff8aae 5px 10px, transparent 11px),
    linear-gradient(180deg, var(--mint), #a7dfc3);
  background-size: 130px 90px, 170px 100px, 210px 120px, 155px 95px, auto;
}

.running-trail {
  position: absolute;
  right: clamp(12px, 5vw, 70px);
  bottom: clamp(20px, 5vh, 56px);
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.72;
  transform: rotate(-5deg);
  animation: runner-enter 1.2s 0.6s both cubic-bezier(0.2, 0.9, 0.28, 1.15);
}

.runner {
  font-size: clamp(32px, 5vw, 56px);
  transform: scaleX(-1);
  filter: drop-shadow(0 8px 7px rgba(94, 55, 75, 0.15));
}

.trail-line {
  width: clamp(48px, 9vw, 120px);
  height: 3px;
  border-radius: 99px;
  background: repeating-linear-gradient(
    90deg,
    rgba(91, 41, 69, 0.33) 0 10px,
    transparent 10px 17px
  );
}

.page-shell {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(20px, 5vw, 70px);
}

.love-note {
  position: relative;
  width: min(760px, 100%);
  padding: clamp(32px, 6vw, 68px) clamp(18px, 5vw, 60px) 26px;
  text-align: center;
  isolation: isolate;
  animation: note-entrance 0.9s cubic-bezier(0.19, 1, 0.22, 1) both;
}

.love-note::before {
  position: absolute;
  z-index: -1;
  inset: -2% -3%;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 47% 53% 45% 55% / 54% 42% 58% 46%;
  background: rgba(255, 250, 244, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transform: rotate(-0.8deg);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--berry-dark);
  font-size: clamp(0.72rem, 1.6vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.mini-heart {
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--berry);
  box-shadow: 0 9px 20px rgba(215, 53, 116, 0.26);
  animation: heart-beat 2.2s ease-in-out infinite;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 5.8vw, 4.55rem);
  font-weight: 900;
  line-height: 1.07;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

h1 span {
  color: var(--berry);
}

.promise {
  max-width: 540px;
  margin: 22px auto 0;
  color: rgba(91, 41, 69, 0.72);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  font-size: clamp(0.96rem, 2vw, 1.1rem);
  line-height: 1.55;
}

.promise span {
  color: var(--berry);
  font-weight: 900;
}

.action-area {
  position: relative;
  width: min(440px, 100%);
  height: 112px;
  margin: 24px auto 0;
}

.answer-button {
  position: absolute;
  top: 20px;
  min-width: 142px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.18rem;
  font-weight: 900;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
  touch-action: manipulation;
  user-select: none;
}

.answer-button:focus-visible {
  outline: 4px solid rgba(83, 101, 218, 0.35);
  outline-offset: 4px;
}

.yes-button {
  z-index: 3;
  right: calc(50% + 10px);
  color: #fff;
  background: linear-gradient(135deg, #ed4e8c, #c52569);
  box-shadow:
    0 14px 30px rgba(197, 37, 105, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.yes-button::before {
  position: absolute;
  inset: 5px;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: inherit;
}

.yes-button:hover {
  box-shadow:
    0 18px 38px rgba(197, 37, 105, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform: translateY(-4px) scale(1.04);
}

.yes-button:active {
  transform: translateY(0) scale(0.98);
}

.button-heart {
  display: inline-block;
  margin-right: 7px;
  font-size: 0.8em;
  animation: heart-beat 1.6s ease-in-out infinite;
}

.no-button {
  z-index: 5;
  left: calc(50% + 10px);
  color: var(--ink);
  border: 2px solid rgba(91, 41, 69, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(91, 41, 69, 0.12);
  will-change: left, top, transform;
}

.no-button.is-fleeing {
  position: fixed;
  margin: 0;
  transition:
    left 310ms cubic-bezier(0.22, 1.25, 0.4, 1),
    top 310ms cubic-bezier(0.22, 1.25, 0.4, 1),
    transform 310ms ease;
}

.tiny-hint {
  margin: -4px 0 0;
  color: rgba(91, 41, 69, 0.46);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  font-size: 0.78rem;
}

.celebration {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  visibility: hidden;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 40%, #fff 0%, #ffe5f2 44%, #cdeffd 100%);
  transition:
    opacity 500ms ease,
    visibility 500ms;
}

.celebration.is-visible {
  visibility: visible;
  opacity: 1;
}

.celebration-message {
  position: relative;
  z-index: 25;
  margin-top: -12vh;
  padding: 24px;
  text-align: center;
  opacity: 0;
  transform: translateY(25px) scale(0.92);
}

.is-visible .celebration-message {
  animation: celebration-message 850ms 320ms cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.celebration-kicker {
  margin: 0 0 10px;
  color: var(--berry);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 900;
}

.celebration h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 10px 30px rgba(255, 255, 255, 0.9);
}

.celebration h2:focus {
  outline: none;
}

.celebration-message > p:not(.celebration-kicker) {
  margin: 18px 0 0;
  color: rgba(91, 41, 69, 0.74);
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
}

.big-heart {
  display: inline-block;
  margin-top: 16px;
  color: var(--berry);
  font-size: clamp(2.5rem, 7vw, 5rem);
  filter: drop-shadow(0 10px 16px rgba(215, 53, 116, 0.22));
  animation: heart-beat 1.2s ease-in-out infinite;
}

.heart-rain,
.butterfly-garden {
  position: absolute;
  z-index: 22;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.falling-heart {
  position: absolute;
  top: -12vh;
  left: var(--x);
  color: var(--heart-color);
  font-size: var(--size);
  filter: drop-shadow(0 5px 5px rgba(91, 41, 69, 0.14));
  opacity: 0;
  animation: heart-fall var(--duration) var(--delay) linear infinite;
}

.butterfly {
  position: absolute;
  z-index: 23;
  left: var(--start-x);
  bottom: -70px;
  font-size: var(--size);
  filter: drop-shadow(0 7px 5px rgba(62, 48, 120, 0.18));
  opacity: 0;
  animation: butterfly-flight var(--duration) var(--delay) ease-in-out infinite;
}

.butterfly > span {
  display: block;
  animation: butterfly-flap 230ms ease-in-out infinite alternate;
}

.rainbow-scene {
  position: absolute;
  z-index: 21;
  right: 50%;
  bottom: -3px;
  width: min(118vw, 980px);
  height: min(59vw, 490px);
  overflow: hidden;
  opacity: 0;
  transform: translateX(50%) translateY(34%);
}

.is-visible .rainbow-scene {
  animation: rainbow-rise 1.25s 180ms cubic-bezier(0.15, 0.9, 0.25, 1) forwards;
}

.rainbow {
  position: absolute;
  right: 0;
  bottom: -100%;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    transparent 0 36%,
    #9b5de5 36% 40%,
    #5486e8 40% 44%,
    #40c9d0 44% 48%,
    #62c97d 48% 52%,
    #f5dc65 52% 56%,
    #ff9f55 56% 60%,
    #f25f74 60% 64%,
    transparent 64%
  );
  filter: drop-shadow(0 15px 22px rgba(100, 82, 160, 0.17));
}

.rainbow-cloud {
  position: absolute;
  bottom: 3%;
  width: clamp(108px, 20vw, 190px);
  height: clamp(50px, 10vw, 95px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    -60px 18px 0 -16px rgba(255, 255, 255, 0.94),
    60px 18px 0 -14px rgba(255, 255, 255, 0.94),
    0 16px 30px rgba(90, 109, 152, 0.15);
}

.rainbow-cloud-left {
  left: 0;
}

.rainbow-cloud-right {
  right: 0;
}

body.celebrating .page-shell {
  pointer-events: none;
}

@keyframes note-entrance {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes runner-enter {
  from {
    opacity: 0;
    transform: translateX(120px) rotate(-5deg);
  }
  to {
    opacity: 0.72;
    transform: translateX(0) rotate(-5deg);
  }
}

@keyframes sun-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

@keyframes cloud-drift {
  from {
    transform: translateX(-8px);
  }
  to {
    transform: translateX(16px);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.75) rotate(0);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.15) rotate(25deg);
  }
}

@keyframes heart-beat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.18);
  }
  30% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.12);
  }
}

@keyframes celebration-message {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rainbow-rise {
  to {
    opacity: 0.82;
    transform: translateX(50%) translateY(0);
  }
}

@keyframes heart-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -10vh, 0) rotate(0deg) scale(0.7);
  }
  8% {
    opacity: 0.95;
  }
  45% {
    transform: translate3d(var(--drift), 45vh, 0) rotate(190deg) scale(1);
  }
  92% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--drift) * -0.35), 118vh, 0) rotate(430deg) scale(0.75);
  }
}

@keyframes butterfly-flight {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-10deg) scale(0.7);
  }
  10% {
    opacity: 1;
  }
  30% {
    transform: translate3d(var(--sway), -32vh, 0) rotate(12deg) scale(1);
  }
  58% {
    transform: translate3d(calc(var(--sway) * -0.6), -65vh, 0) rotate(-14deg) scale(0.92);
  }
  90% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--sway) * 0.4), -116vh, 0) rotate(9deg) scale(0.7);
  }
}

@keyframes butterfly-flap {
  from {
    transform: scaleX(0.76) rotate(-7deg);
  }
  to {
    transform: scaleX(1.08) rotate(7deg);
  }
}

@media (max-width: 640px) {
  .love-note {
    padding-top: 40px;
  }

  .love-note::before {
    inset: -3% -6%;
  }

  .promise {
    max-width: 320px;
  }

  .action-area {
    height: 116px;
    margin-top: 15px;
  }

  .answer-button {
    min-width: 116px;
    min-height: 54px;
  }

  .yes-button {
    right: calc(50% + 7px);
  }

  .no-button {
    left: calc(50% + 7px);
  }

  .tiny-hint {
    margin-top: -10px;
  }

  .running-trail {
    display: none;
  }

  .celebration-message {
    margin-top: -20vh;
  }

  .rainbow-scene {
    width: 150vw;
    height: 75vw;
  }

  .rainbow-cloud-left {
    left: 4%;
  }

  .rainbow-cloud-right {
    right: 4%;
  }
}

@media (max-height: 650px) {
  .page-shell {
    padding-block: 12px;
  }

  .love-note {
    padding-block: 20px 14px;
  }

  .mini-heart {
    width: 30px;
    height: 30px;
    margin-bottom: 8px;
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  .promise {
    margin-top: 12px;
  }

  .action-area {
    height: 82px;
    margin-top: 8px;
  }

  .answer-button {
    top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }

  .falling-heart,
  .butterfly {
    animation-duration: var(--duration) !important;
    animation-iteration-count: 2 !important;
  }
}
