:root {
  --paper: #f6f1e6;
  --paper-bright: #fffaf0;
  --paper-deep: #eadcc8;
  --red: #df0909;
  --red-dark: #7e1714;
  --ink: #231712;
  --muted: #745f52;
  --night: #1c0808;
  --hold-progress: 0;
  color-scheme: light;
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, .9) 0 7%, transparent 42%),
    var(--paper);
  transition: color .5s ease, background-color .5s ease;
}

body::before,
body::after {
  position: fixed;
  z-index: -2;
  content: "";
  border: 1px solid rgba(223, 9, 9, .09);
  border-radius: 50%;
  pointer-events: none;
}

body::before {
  top: -32vw;
  left: -28vw;
  width: 72vw;
  height: 72vw;
}

body::after {
  right: -28vw;
  bottom: -37vw;
  width: 82vw;
  height: 82vw;
}

.paper-noise {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: .22;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(126, 23, 20, .16) .65px, transparent .7px),
    radial-gradient(rgba(35, 23, 18, .08) .55px, transparent .65px);
  background-position: 0 0, 7px 9px;
  background-size: 17px 17px, 13px 13px;
}

button,
textarea {
  font: inherit;
}

button {
  min-height: 48px;
}

button:focus-visible,
textarea:focus-visible {
  outline: 4px solid rgba(223, 9, 9, .28);
  outline-offset: 4px;
}

.brand-bar,
.site-footer {
  position: fixed;
  z-index: 20;
  left: 0;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.brand-bar {
  top: 0;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(223, 9, 9, .2);
  background: rgba(246, 241, 230, .87);
  backdrop-filter: blur(10px);
}

.brand-mark,
.footer-star {
  color: var(--red);
  font-size: 14px;
}

.brand-rule {
  opacity: .55;
}

.site-footer {
  bottom: 0;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid rgba(223, 9, 9, .18);
  background: rgba(246, 241, 230, .88);
  backdrop-filter: blur(10px);
}

.experience {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(74px, 8vw, 112px) clamp(18px, 5vw, 70px);
}

.scene {
  position: relative;
  width: min(1120px, 100%);
  margin: auto;
  text-align: center;
  animation: scene-in .48s cubic-bezier(.2, .85, .2, 1) both;
}

.scene[hidden] {
  display: none;
}

.eyebrow,
.step-label {
  margin: 0 0 10px;
  color: var(--red);
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 1000;
  letter-spacing: .19em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--red);
  font-weight: 1000;
  line-height: .84;
  letter-spacing: -.055em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(62px, 9.4vw, 132px);
  text-shadow: 3px 3px 0 var(--paper-bright);
}

h2 {
  font-size: clamp(42px, 6.2vw, 82px);
}

.lede,
.ritual-instruction {
  margin: 22px auto;
  color: var(--muted);
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.65;
}

.primary-button {
  display: inline-flex;
  min-width: 180px;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 14px 24px;
  border: 2px solid var(--red);
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  box-shadow: 5px 5px 0 var(--red-dark);
  cursor: pointer;
  font-weight: 900;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.primary-button:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--red-dark);
}

.primary-button:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--red-dark);
}

.primary-button:disabled {
  border-color: #a99a8b;
  color: #776b61;
  background: #d8cdbf;
  box-shadow: 4px 4px 0 #b9aa9b;
  cursor: not-allowed;
  opacity: .82;
}

.scene--packaged {
  display: grid;
  grid-template-columns: minmax(0, .96fr) minmax(360px, .8fr);
  align-items: center;
  gap: clamp(10px, 4vw, 68px);
  text-align: left;
}

.scene--packaged > .sunburst {
  display: none;
}

.scene--packaged .eyebrow,
.scene--packaged .lede {
  margin-left: 4px;
}

.package-stage {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
}

.package {
  display: block;
  width: min(490px, 46vw);
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: drop-shadow(0 26px 22px rgba(91, 38, 11, .22));
}

.price-burst {
  position: absolute;
  z-index: 2;
  top: 5%;
  right: 1%;
  display: grid;
  width: 104px;
  aspect-ratio: 1;
  place-items: center;
  color: #fff;
  background: var(--red);
  clip-path: polygon(50% 0, 60% 32%, 82% 9%, 76% 39%, 100% 33%, 77% 53%, 100% 67%, 69% 66%, 79% 96%, 56% 73%, 45% 100%, 38% 69%, 10% 88%, 24% 58%, 0 49%, 32% 42%, 10% 16%, 41% 30%);
  font-size: 12px;
  font-weight: 1000;
  line-height: .95;
  text-align: center;
  transform: rotate(11deg);
}

.fine-print {
  grid-column: 1 / -1;
  margin: 16px 0 0;
  color: var(--red-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
  text-align: center;
}

.scene--writing,
.scene--ritual,
.scene--broken {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intact-frame {
  position: relative;
  width: min(850px, calc(100vw - 36px));
  margin: clamp(24px, 5vw, 52px) auto 16px;
  padding: 2px 0 20px;
}

.intact-frame::before,
.intact-frame::after {
  position: absolute;
  top: 50%;
  width: clamp(24px, 5vw, 68px);
  height: 1px;
  content: "";
  background: var(--red);
}

.intact-frame::before { left: -4px; }
.intact-frame::after { right: -4px; }

.willow {
  display: block;
  mix-blend-mode: multiply;
  user-select: none;
  -webkit-user-drag: none;
}

.willow--intact {
  width: 100%;
  height: clamp(104px, 14vw, 168px);
  object-fit: cover;
  object-position: center;
}

.model-caption {
  display: block;
  margin-top: 2px;
  color: var(--red-dark);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.wish-form {
  width: min(660px, 100%);
  margin: 0 auto;
  text-align: left;
}

.wish-form label {
  display: block;
  margin: 0 0 7px 4px;
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

textarea {
  display: block;
  width: 100%;
  min-height: 116px;
  resize: none;
  padding: 18px 20px;
  border: 3px solid var(--red);
  border-radius: 16px;
  color: var(--red-dark);
  background: rgba(255, 253, 247, .94);
  box-shadow: inset 0 0 0 1px rgba(126, 23, 20, .15), 7px 7px 0 rgba(126, 23, 20, .12);
  font-family: Georgia, "Songti SC", serif;
  font-size: 18px;
  line-height: 1.6;
}

textarea::placeholder {
  color: #ad847d;
  font-style: italic;
}

.field-meta {
  display: flex;
  min-height: 29px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 4px;
}

.counter,
.error-message {
  margin: 0;
  font-size: 11px;
}

.counter { color: var(--muted); }
.error-message { color: var(--red-dark); }

.wish-form .primary-button {
  width: 100%;
  margin-top: 4px;
}

.privacy-note,
.warning-message {
  margin: 23px 0 0;
  color: var(--muted);
  font-family: Georgia, "Songti SC", serif;
  font-size: 12px;
}

.scene--ritual h2 {
  margin-bottom: 8px;
}

.ritual-instruction {
  margin: 8px 0 12px;
  font-size: 15px;
}

.hold-zone {
  position: relative;
  display: grid;
  width: min(900px, 100%);
  min-height: clamp(230px, 31vw, 350px);
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--red);
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.hold-zone:active {
  cursor: grabbing;
}

.willow-stage,
.broken-willow {
  position: relative;
  display: block;
  width: min(850px, calc(100vw - 36px));
  height: clamp(112px, 17vw, 190px);
  margin: auto;
}

.willow-stage {
  transition: transform .14s linear, filter .2s ease;
}

.willow-stage .willow,
.broken-willow .willow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
  transform: translate(-50%, -50%);
  transition: transform .75s cubic-bezier(.2, .85, .2, 1), filter .45s ease;
}

.willow--left {
  clip-path: inset(0 50% 0 0);
  transform-origin: 50% 50%;
}

.willow--right {
  clip-path: inset(0 0 0 50%);
  transform-origin: 50% 50%;
}

.hold-label {
  position: absolute;
  z-index: 8;
  top: 50%;
  left: 50%;
  display: inline-flex;
  min-width: 92px;
  min-height: 92px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  background: rgba(246, 241, 230, .9);
  box-shadow: 0 0 0 8px rgba(223, 9, 9, .08);
  font-size: 12px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.hold-icon {
  font-size: 20px;
}

.charge-ring {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 116px;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: conic-gradient(var(--red) calc(var(--hold-progress) * 1turn), transparent 0);
  transform: translate(-50%, -50%) rotate(-90deg);
  transition: opacity .14s ease;
}

.charge-ring::after {
  position: absolute;
  inset: 7px;
  content: "";
  border-radius: inherit;
  background: var(--paper);
}

.spark {
  position: absolute;
  z-index: 7;
  top: 50%;
  left: 50%;
  display: block;
  aspect-ratio: 1;
  opacity: 0;
  background: var(--red);
  clip-path: polygon(50% 0, 60% 35%, 86% 14%, 72% 43%, 100% 50%, 68% 58%, 86% 86%, 59% 69%, 50% 100%, 41% 68%, 14% 86%, 31% 58%, 0 50%, 29% 42%, 14% 14%, 40% 34%);
  transform: translate(-50%, -50%) scale(.3);
  pointer-events: none;
}

.spark--outer { width: 88px; }
.spark--inner { width: 34px; background: #fff6b7; }

body[data-state="CHARGING"] .willow-stage {
  filter: drop-shadow(0 0 calc(4px + var(--hold-progress) * 14px) rgba(223, 9, 9, .35));
  transform: scaleX(calc(1 - var(--hold-progress) * .035)) scaleY(calc(1 + var(--hold-progress) * .035));
}

body[data-state="CHARGING"] .spark {
  opacity: calc(.12 + var(--hold-progress));
  transform: translate(-50%, -50%) rotate(calc(var(--hold-progress) * 120deg)) scale(calc(.35 + var(--hold-progress) * .9));
}

body[data-state="CHARGING"] .spark--inner {
  transform: translate(-50%, -50%) rotate(calc(var(--hold-progress) * -170deg)) scale(calc(.25 + var(--hold-progress) * .7));
}

body[data-state="CHARGING"] .charge-ring {
  opacity: 1;
}

body[data-state="CHARGING"] .hold-label {
  color: #fff;
  background: var(--red);
  transform: translate(-50%, -50%) scale(calc(1 - var(--hold-progress) * .08));
}

.ritual-rule {
  margin: -3px 0 0;
  color: var(--red-dark);
  font-family: Georgia, serif;
  font-size: 12px;
  letter-spacing: .09em;
}

body[data-state="BROKEN"] {
  color: var(--paper);
  background: var(--night);
}

body[data-state="BROKEN"]::before,
body[data-state="BROKEN"]::after {
  border-color: rgba(223, 9, 9, .22);
}

body[data-state="BROKEN"] .paper-noise {
  opacity: .4;
}

body[data-state="BROKEN"] .brand-bar,
body[data-state="BROKEN"] .site-footer {
  color: #e7b9a7;
  border-color: rgba(223, 9, 9, .32);
  background: rgba(28, 8, 8, .82);
}

.scene--broken .step-label {
  color: #dd8177;
}

.broken-willow {
  overflow: hidden;
  margin: clamp(12px, 3vw, 34px) auto 4px;
  border-radius: 999px;
  background: var(--paper);
}

body[data-state="BROKEN"] .broken-willow .willow {
  mix-blend-mode: multiply;
}

body[data-state="BROKEN"] .broken-willow .willow--left {
  transform: translate(-59%, -50%) rotate(-8deg);
}

body[data-state="BROKEN"] .broken-willow .willow--right {
  transform: translate(-41%, -50%) rotate(9deg);
}

.final-flash {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 50%;
  width: min(54vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle, rgba(223, 9, 9, .7), rgba(223, 9, 9, 0) 67%);
  transform: translate(-50%, -50%);
  animation: final-flash .8s ease-out .08s both;
}

.scene--broken h2 {
  color: #fff;
  font-size: clamp(54px, 9.2vw, 116px);
  text-shadow: 0 0 34px rgba(223, 9, 9, .25);
}

#final-wish {
  max-width: 670px;
  margin: 24px auto 0;
  padding: 18px 24px;
  border: 1px solid rgba(223, 129, 119, .38);
  border-radius: 13px;
  color: #f1d3c5;
  background: rgba(74, 15, 14, .35);
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(16px, 2vw, 22px);
  font-style: italic;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#final-wish::before { content: "“"; }
#final-wish::after { content: "”"; }

.final-note {
  margin: 14px 0 0;
  color: #bb8e82;
  font-family: Georgia, "Songti SC", serif;
  font-size: 12px;
}

.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;
}

@keyframes scene-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes final-flash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.2); }
  28% { opacity: .9; }
  100% { opacity: .17; transform: translate(-50%, -50%) scale(1.15); }
}

@media (max-width: 760px) {
  .brand-rule { display: none; }

  .experience {
    padding: 70px 16px 66px;
  }

  .scene--packaged {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }

  .scene--packaged .eyebrow,
  .scene--packaged .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .package-stage {
    grid-row: 1;
    margin-bottom: -18px;
  }

  .package {
    width: min(310px, 74vw);
  }

  .price-burst {
    top: 7%;
    right: 8%;
    width: 82px;
    font-size: 10px;
  }

  h1 {
    font-size: clamp(56px, 18vw, 86px);
  }

  h2 {
    font-size: clamp(40px, 12vw, 58px);
  }

  .fine-print {
    margin-top: 26px;
    line-height: 1.6;
  }

  .willow-stage,
  .broken-willow,
  .intact-frame {
    width: calc(100vw - 32px);
  }

  .hold-zone {
    min-height: 220px;
  }

  .willow-stage,
  .broken-willow {
    height: 120px;
  }

  .intact-frame::before,
  .intact-frame::after {
    display: none;
  }

  .site-footer {
    gap: 5px;
    font-size: 7px;
    letter-spacing: .1em;
  }
}

@media (max-width: 390px) {
  .brand-bar {
    font-size: 8px;
  }

  .price-burst {
    right: 3%;
  }

  textarea {
    min-height: 102px;
    font-size: 16px;
  }

  .hold-label {
    min-width: 82px;
    min-height: 82px;
  }
}

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

  body[data-state="CHARGING"] .willow-stage {
    transform: none;
  }

  body[data-state="BROKEN"] .broken-willow .willow--left {
    transform: translate(-53%, -50%) rotate(-2deg);
  }

  body[data-state="BROKEN"] .broken-willow .willow--right {
    transform: translate(-47%, -50%) rotate(2deg);
  }
}
