:root {
  --berry: #ed2555;
  --berry-dark: #8e1238;
  --cream: #fff8e8;
  --ink: #5d1730;
  --leaf: #4cae5f;
  --soft-pink: #ffc7d3;
  color-scheme: light;
  font-family: "Trebuchet MS", "Avenir Next", Avenir, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #f84f77; }

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 247, 196, .9) 0 7%, transparent 7.2%),
    radial-gradient(circle at 81% 22%, rgba(123, 201, 112, .78) 0 11%, transparent 11.2%),
    radial-gradient(circle at 78% 85%, rgba(255, 199, 211, .95) 0 17%, transparent 17.2%),
    linear-gradient(145deg, #ff7c91 0%, #f64b74 48%, #e62c5d 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
}

body::before {
  width: min(36vw, 460px);
  aspect-ratio: 1;
  left: -12vw;
  bottom: -18vw;
  background: rgba(128, 204, 104, .7);
  border: 3px solid rgba(255, 255, 255, .32);
}

body::after {
  width: min(27vw, 360px);
  aspect-ratio: 1;
  right: -8vw;
  top: -10vw;
  background: rgba(255, 238, 169, .62);
  border: 3px solid rgba(255, 255, 255, .28);
}

.background-seeds {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .22;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 5px 9px at 12% 28%, #ffe594 95%, transparent),
    radial-gradient(ellipse 5px 9px at 28% 78%, #ffe594 95%, transparent),
    radial-gradient(ellipse 5px 9px at 68% 14%, #ffe594 95%, transparent),
    radial-gradient(ellipse 5px 9px at 87% 63%, #ffe594 95%, transparent),
    radial-gradient(ellipse 4px 8px at 47% 8%, #fff 95%, transparent),
    radial-gradient(ellipse 4px 8px at 7% 69%, #fff 95%, transparent);
  background-size: 280px 260px;
  transform: rotate(-8deg) scale(1.1);
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100svh;
  padding: clamp(18px, 3vw, 38px) 16px;
}

.strawberry-card {
  position: relative;
  min-width: 0;
  width: min(100%, 650px);
  padding: clamp(26px, 4vw, 42px) clamp(22px, 5vw, 54px) clamp(28px, 4vw, 42px);
  text-align: center;
  background: rgba(255, 248, 232, .88);
  border: 3px solid rgba(255, 255, 255, .72);
  border-radius: clamp(28px, 6vw, 54px);
  box-shadow: 0 28px 80px rgba(105, 11, 44, .25), inset 0 1px 0 #fff;
  backdrop-filter: blur(12px);
}

.eyebrow {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
  font-size: clamp(.7rem, 2.2vw, .84rem);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow span {
  padding: 7px 11px;
  color: #fff;
  background: var(--leaf);
  border: 2px solid #2b7e45;
  border-radius: 999px;
  box-shadow: 0 3px 0 #2b7e45;
}

.eyebrow span:nth-child(2) { background: #f34369; border-color: #aa1b43; box-shadow: 0 3px 0 #aa1b43; transform: rotate(-3deg); }
.eyebrow span:nth-child(3) { background: #f4aa32; border-color: #b56c25; box-shadow: 0 3px 0 #b56c25; transform: rotate(2deg); }

.berry-stage {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(370px, 52vh, 455px);
  margin: 0 auto 18px;
}

.strawberry-button {
  appearance: none;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 100%;
  width: min(94%, 405px);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: 50% 62%;
  -webkit-tap-highlight-color: transparent;
}

.strawberry-button:hover { transform: translateY(-5px) rotate(-1.5deg) scale(1.055); }
.strawberry-button:active { transform: scale(.96); }
.strawberry-button:focus-visible { outline: 5px solid #2c8b58; outline-offset: 8px; border-radius: 48%; }

.strawberry-art {
  display: block;
  width: auto;
  max-width: 100%;
  height: 100%;
  overflow: visible;
  transition: filter 220ms ease;
}

.strawberry-button:hover .strawberry-art { filter: saturate(1.08) drop-shadow(0 16px 13px rgba(126, 20, 56, .18)); }

.sunburst {
  position: absolute;
  inset: 3% 0 1%;
  z-index: 0;
  pointer-events: none;
}

.sun-ray {
  --ray-start: 48px;
  --ray-pop: 82px;
  --ray-middle: 142px;
  --ray-end: 185px;
  position: absolute;
  left: 50%;
  top: 49%;
  width: clamp(58px, 8vw, 92px);
  height: clamp(7px, .85vw, 11px);
  opacity: 0;
  background: linear-gradient(90deg, #ffad28, #ffe66f 48%, #fff4a9);
  border: 2px solid rgba(210, 109, 19, .55);
  border-radius: 999px 75% 75% 999px;
  box-shadow: 0 3px 0 rgba(154, 64, 18, .13);
  transform: rotate(var(--angle)) translateX(var(--ray-start)) scaleX(.12);
  transform-origin: 0 50%;
  will-change: transform, opacity;
}

.sun-ray:nth-child(1) { --angle: -55deg; --delay: 70ms; }
.sun-ray:nth-child(2) { --angle: -28deg; --delay: 20ms; }
.sun-ray:nth-child(3) { --angle: 0deg; --delay: 0ms; }
.sun-ray:nth-child(4) { --angle: 28deg; --delay: 40ms; }
.sun-ray:nth-child(5) { --angle: 55deg; --delay: 90ms; }
.sun-ray:nth-child(6) { --angle: 125deg; --delay: 80ms; }
.sun-ray:nth-child(7) { --angle: 152deg; --delay: 30ms; }
.sun-ray:nth-child(8) { --angle: 180deg; --delay: 10ms; }
.sun-ray:nth-child(9) { --angle: 208deg; --delay: 50ms; }
.sun-ray:nth-child(10) { --angle: 235deg; --delay: 100ms; }

.berry-stage.is-celebrating .sun-ray {
  animation: sun-ray-burst 1.8s cubic-bezier(.16,.72,.24,1) var(--delay) both;
}

@keyframes sun-ray-burst {
  0% { opacity: 0; transform: rotate(var(--angle)) translateX(var(--ray-start)) scaleX(.08); }
  16% { opacity: 1; transform: rotate(var(--angle)) translateX(var(--ray-pop)) scaleX(.72); }
  68% { opacity: .92; transform: rotate(var(--angle)) translateX(var(--ray-middle)) scaleX(1); }
  100% { opacity: 0; transform: rotate(var(--angle)) translateX(var(--ray-end)) scaleX(.46); }
}

.berry-eye,
.berry-smile,
.berry-cheek {
  transform-box: fill-box;
  transform-origin: center;
}

.berry-stage.is-celebrating .berry-eye-right { animation: berry-wink 1.65s ease-in-out both; }
.berry-stage.is-celebrating .berry-eye-left { animation: happy-eye-bounce 1.65s ease-in-out both; }
.berry-stage.is-celebrating .berry-smile { animation: bigger-smile 1.65s ease-in-out both; }
.berry-stage.is-celebrating .berry-cheek { animation: cheek-pop 1.65s ease-in-out both; }
.berry-stage.is-celebrating .berry-cheek-right { animation-delay: 70ms; }

@keyframes berry-wink {
  0%, 22%, 64%, 100% { transform: scaleY(1); }
  34%, 54% { transform: scaleY(.08) translateY(2px); }
}

@keyframes happy-eye-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  38% { transform: translateY(-3px) scale(1.08); }
  70% { transform: translateY(1px) scale(.98); }
}

@keyframes bigger-smile {
  0%, 100% { transform: scale(1); }
  36%, 64% { transform: translateY(-1px) scale(1.18, 1.28); }
}

@keyframes cheek-pop {
  0%, 100% { opacity: .72; transform: scale(1); }
  36%, 68% { opacity: 1; transform: scale(1.24); }
}

.orbit {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 50px;
  aspect-ratio: 1;
  color: #fff;
  background: #f5a92f;
  border: 3px solid #a9621b;
  border-radius: 50%;
  box-shadow: 0 5px 0 rgba(115, 49, 27, .2);
  font-size: 1.55rem;
  animation: floaty 3.4s ease-in-out infinite;
}

.orbit-one { left: 1%; top: 24%; transform: rotate(-12deg); }
.orbit-two { right: 0; top: 34%; color: #f52659; background: #ffd2dc; border-color: #dc6b85; animation-delay: -.9s; }
.orbit-three { right: 9%; bottom: 5%; color: #2d9856; background: #c7ec9c; border-color: #62a84d; animation-delay: -1.7s; }

@keyframes floaty {
  0%, 100% { translate: 0 0; rotate: -4deg; }
  50% { translate: 0 -9px; rotate: 5deg; }
}

.form-wrap { position: relative; z-index: 3; padding-top: 22px; }

h1 {
  margin: 0 0 18px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 10vw, 4.8rem);
  line-height: .96;
  letter-spacing: -.06em;
  text-wrap: balance;
  text-shadow: 2px 3px 0 rgba(255, 154, 172, .42);
}

form { display: grid; gap: 13px; }

textarea {
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  resize: vertical;
  padding: 18px 20px;
  color: var(--ink);
  background: #fffdf7;
  border: 3px solid #e8a2b2;
  border-radius: 20px;
  box-shadow: inset 0 3px 0 rgba(120, 21, 53, .05);
  font: 700 1.08rem/1.4 inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

textarea::placeholder { color: #b96c7d; opacity: .78; }
textarea:hover { border-color: #df7e96; }
textarea:focus { outline: 0; border-color: #318e57; box-shadow: 0 0 0 4px rgba(72, 171, 92, .2); transform: translateY(-1px); }

.submit-button {
  position: relative;
  isolation: isolate;
  min-height: 64px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #ff5077, #d91f50);
  border: 3px solid #a50f3b;
  border-radius: 18px;
  box-shadow: 0 6px 0 #981139, 0 11px 22px rgba(127, 22, 57, .18);
  cursor: pointer;
  font: 900 1.22rem/1 inherit;
  letter-spacing: .01em;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.submit-button:hover { filter: saturate(1.08) brightness(1.04); transform: translateY(-2px); box-shadow: 0 8px 0 #981139, 0 14px 24px rgba(127, 22, 57, .2); }
.submit-button:active { transform: translateY(4px); box-shadow: 0 2px 0 #981139, 0 6px 12px rgba(127, 22, 57, .16); }
.submit-button:focus-visible { outline: 4px solid #2c8b58; outline-offset: 4px; }
.submit-button:disabled { cursor: wait; filter: grayscale(.1); opacity: .76; }

.button-label { position: relative; z-index: 2; }
.button-shine { position: absolute; inset: -20% auto -20% -30%; z-index: 1; width: 28%; background: rgba(255,255,255,.28); transform: skewX(-18deg); transition: translate 350ms ease; }
.submit-button:hover .button-shine { translate: 500% 0; }

.form-status { min-height: 1.3em; margin: 4px 2px 0; font-size: 1rem; font-weight: 800; }
.form-status[data-state="success"] { color: #267844; }
.form-status[data-state="error"] { color: #a7113b; }

.form-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.emoji-layer { position: fixed; inset: 0; z-index: 20; overflow: hidden; pointer-events: none; }
.burst-emoji { position: fixed; z-index: 21; display: block; width: max-content; line-height: 1; will-change: transform, opacity; filter: drop-shadow(0 4px 2px rgba(91, 16, 42, .18)); }

@media (max-width: 520px) {
  .page-shell { padding: 12px; align-items: center; }
  .strawberry-card { padding: 18px 14px 20px; border-radius: 30px; }
  .berry-stage { height: clamp(285px, 45vh, 350px); margin-bottom: 12px; }
  .strawberry-button { width: min(92%, 325px); }
  .sun-ray {
    --ray-start: 34px;
    --ray-pop: 56px;
    --ray-middle: 90px;
    --ray-end: 118px;
    width: 48px;
    height: 7px;
  }
  .orbit { width: 34px; font-size: 1rem; border-width: 2px; }
  .eyebrow span { padding: 5px 7px; }
  .form-wrap { padding-top: 18px; }
  h1 { font-size: clamp(2.45rem, 13vw, 3.7rem); }
  textarea { min-height: 82px; }
  .submit-button { min-height: 58px; }
}

@media (max-height: 720px) and (min-width: 480px) {
  .page-shell { padding-block: 10px; }
  .strawberry-card { padding-block: 14px 18px; }
  .berry-stage { height: 340px; margin-bottom: 10px; }
  .strawberry-button { width: 315px; }
  h1 { font-size: 3.1rem; }
  textarea { min-height: 76px; }
  .submit-button { min-height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .sunburst { display: none; }
  .strawberry-button:hover { transform: none; }
}
