:root {
  --cream: #f8edda;
  --paper: #fffaf0;
  --ink: #402832;
  --berry: #8f2949;
  --thread: #c94667;
  --rose: #ee91a8;
  --blush: #ffd7dc;
  --gold: #f2c65e;
  --sage: #9eaf88;
  --white: #fffdf8;
  --shadow: rgba(64, 40, 50, 0.14);
  --border: 2px solid var(--ink);
  --radius-sm: 14px;
  --radius-md: 24px;
  --radius-lg: 38px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(242, 198, 94, 0.36), transparent 25rem),
    radial-gradient(circle at 92% 25%, rgba(238, 145, 168, 0.28), transparent 28rem),
    linear-gradient(115deg, transparent 49.5%, rgba(143, 41, 73, 0.035) 50%, transparent 50.5%),
    var(--cream);
  background-size: auto, auto, 18px 18px, auto;
  font-family: "Nunito", "Trebuchet MS", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.24;
  background-image: radial-gradient(rgba(64, 40, 50, 0.25) 0.7px, transparent 0.8px);
  background-size: 7px 7px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

::selection {
  color: var(--white);
  background: var(--berry);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.hero {
  min-height: min(820px, 92svh);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: clamp(44px, 7vw, 110px);
  padding-block: clamp(64px, 10vw, 126px) 72px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 22px;
  padding: 7px 13px;
  color: var(--berry);
  background: var(--blush);
  border: 1.5px solid var(--berry);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 rgba(143, 41, 73, 0.15);
}

.eyebrow span {
  margin-right: 5px;
}

h1,
h2 {
  font-family: "Fraunces", Georgia, serif;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.25rem, 7.2vw, 6.9rem);
  font-weight: 650;
  letter-spacing: -0.058em;
  line-height: 0.91;
}

h1 em {
  position: relative;
  display: inline-block;
  color: var(--berry);
  font-weight: 500;
}

h1 em::after {
  position: absolute;
  right: 1%;
  bottom: -8px;
  left: 2%;
  height: 9px;
  content: "";
  background: var(--gold);
  border-radius: 60% 30% 55% 35%;
  transform: rotate(-1deg);
  opacity: 0.8;
}

.hero__intro {
  max-width: 650px;
  margin: 34px 0 0;
  font-size: clamp(1.05rem, 1.45vw, 1.23rem);
  font-weight: 600;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 34px;
}

.hero__aside {
  max-width: 165px;
  color: rgba(64, 40, 50, 0.68);
  font-size: 0.83rem;
  font-weight: 700;
  line-height: 1.35;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 21px;
  border: var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 5px 5px 0 var(--ink);
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    background-color 180ms ease;
}

.button:hover {
  box-shadow: 2px 2px 0 var(--ink);
  transform: translate(3px, 3px);
}

.button:active {
  box-shadow: 0 0 0 var(--ink);
  transform: translate(5px, 5px);
}

.button:focus-visible,
a:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 4px;
}

.button--primary {
  color: var(--white);
  background: var(--berry);
}

.button--primary:hover {
  background: #a63256;
}

.button--secondary {
  color: var(--ink);
  background: var(--paper);
}

.bag-stage {
  position: relative;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 36px 30px 25px;
  background: var(--paper);
  border: var(--border);
  border-radius: 9px 25px 12px 20px;
  box-shadow: 15px 18px 0 rgba(64, 40, 50, 0.12);
  transform: rotate(2.5deg);
}

.bag-stage::before {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  content: "";
  border: 1.5px dashed rgba(143, 41, 73, 0.42);
  border-radius: 7px 18px 8px 14px;
}

.tape {
  position: absolute;
  z-index: 4;
  width: 96px;
  height: 29px;
  background: rgba(242, 198, 94, 0.76);
  box-shadow: 0 2px 4px rgba(64, 40, 50, 0.08);
}

.tape--top {
  top: -13px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
}

.bag-scene {
  position: relative;
  height: 330px;
}

.bag {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 235px;
  height: 270px;
  transform: translateX(-50%) rotate(-3deg);
  filter: drop-shadow(10px 12px 0 rgba(143, 41, 73, 0.12));
  animation: bag-breathe 5s ease-in-out infinite;
}

.bag__handle {
  position: absolute;
  top: 0;
  left: 47px;
  width: 141px;
  height: 102px;
  border: 17px solid var(--berry);
  border-bottom: 0;
  border-radius: 82px 82px 0 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.24) 0 3px, transparent 3px 8px),
    var(--rose);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.bag__body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 205px;
  overflow: hidden;
  background-color: var(--rose);
  background-image:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.5) 0 2px, transparent 2.7px),
    repeating-linear-gradient(0deg, rgba(143, 41, 73, 0.14) 0 2px, transparent 2px 11px);
  background-position: 0 0, 0 2px;
  background-size: 15px 12px, 100% 12px;
  border: 4px solid var(--berry);
  border-radius: 22px 22px 38px 38px;
  box-shadow:
    inset 0 -16px 0 rgba(143, 41, 73, 0.09),
    inset 12px 0 18px rgba(255, 255, 255, 0.14);
}

.bag__body::before {
  position: absolute;
  inset: 14px;
  content: "";
  border: 2px dashed rgba(255, 253, 248, 0.64);
  border-radius: 14px 14px 27px 27px;
}

.bag__tag {
  position: absolute;
  top: 60px;
  left: 50%;
  z-index: 2;
  padding: 7px 17px;
  color: var(--berry);
  background: var(--paper);
  border: 2px solid var(--berry);
  border-radius: 4px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.08rem;
  font-weight: 650;
  transform: translateX(-50%) rotate(2deg);
  box-shadow: 3px 3px 0 rgba(143, 41, 73, 0.2);
}

.bag__tag::before {
  position: absolute;
  top: -22px;
  left: 50%;
  width: 1px;
  height: 21px;
  content: "";
  background: var(--berry);
}

.bag__heart {
  position: absolute;
  right: 27px;
  bottom: 24px;
  z-index: 2;
  color: var(--berry);
  font-size: 1.65rem;
  transform: rotate(8deg);
}

.yarn-ball {
  position: absolute;
  right: 3px;
  bottom: 7px;
  width: 82px;
  height: 82px;
  overflow: visible;
  background:
    repeating-linear-gradient(22deg, transparent 0 9px, rgba(143, 41, 73, 0.3) 9px 11px),
    repeating-linear-gradient(158deg, transparent 0 11px, rgba(255, 255, 255, 0.36) 11px 13px),
    var(--thread);
  border: 3px solid var(--berry);
  border-radius: 50%;
  box-shadow: 5px 6px 0 rgba(143, 41, 73, 0.16);
}

.yarn-ball::after {
  position: absolute;
  right: 56px;
  bottom: -15px;
  width: 111px;
  height: 45px;
  content: "";
  border-bottom: 4px solid var(--thread);
  border-radius: 0 0 50% 50%;
  transform: rotate(4deg);
}

.yarn-ball span {
  position: absolute;
  right: 26px;
  bottom: -55px;
  width: 70px;
  height: 48px;
  border: 4px solid var(--thread);
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(16deg);
}

.bag-stage figcaption {
  position: relative;
  z-index: 2;
  margin: 9px 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.bag-stage figcaption strong {
  color: var(--berry);
}

.chapter-marker {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 5px 0 70px;
  color: rgba(64, 40, 50, 0.62);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chapter-marker span {
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--berry) 0 8px, transparent 8px 15px);
  opacity: 0.35;
}

.letter-wrap {
  scroll-margin-top: 28px;
}

.letter {
  position: relative;
  max-width: 960px;
  margin-inline: auto;
  padding: clamp(34px, 7vw, 84px);
  background:
    linear-gradient(rgba(143, 41, 73, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 31px;
  border: var(--border);
  border-radius: 8px 30px 13px 25px;
  box-shadow:
    14px 17px 0 var(--ink),
    25px 30px 0 rgba(201, 70, 103, 0.13);
  transform: rotate(-0.5deg);
}

.letter__stitches {
  position: absolute;
  inset: 13px;
  pointer-events: none;
  border: 2px dashed rgba(143, 41, 73, 0.4);
  border-radius: 4px 22px 7px 17px;
}

.letter__kicker {
  position: relative;
  width: fit-content;
  margin: 0 0 20px;
  padding: 5px 10px;
  color: var(--ink);
  background: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  transform: rotate(-1deg);
}

.letter h2,
.decision h2 {
  margin: 0;
  color: var(--berry);
  font-size: clamp(2.4rem, 5vw, 4.9rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1;
}

.letter__body {
  max-width: 740px;
  margin-top: 30px;
}

.letter__body p {
  margin: 0 0 20px;
  font-size: clamp(1.02rem, 1.5vw, 1.17rem);
  font-weight: 600;
}

.letter__body strong {
  color: var(--berry);
  font-weight: 800;
}

.promise-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 38px;
}

.promise {
  min-height: 142px;
  padding: 19px;
  background: var(--cream);
  border: 1.5px solid rgba(64, 40, 50, 0.72);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 rgba(64, 40, 50, 0.13);
}

.promise:nth-child(2) {
  background: var(--blush);
  transform: translateY(7px) rotate(0.8deg);
}

.promise:nth-child(3) {
  background: #edf0df;
  transform: rotate(-0.7deg);
}

.promise span {
  color: var(--berry);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 750;
}

.promise p {
  margin: 11px 0 0;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
}

.signature {
  width: fit-content;
  margin: 44px 0 0 auto;
  color: rgba(64, 40, 50, 0.76);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
  transform: rotate(-2deg);
}

.signature span {
  display: block;
  color: var(--berry);
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 650;
}

.decision {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
  margin-block: clamp(108px, 14vw, 170px) 80px;
  padding: clamp(28px, 5vw, 52px);
  background: var(--blush);
  border: var(--border);
  border-radius: var(--radius-lg) 12px var(--radius-lg) 12px;
  box-shadow: 10px 11px 0 rgba(64, 40, 50, 0.14);
}

.decision::before,
.decision::after {
  position: absolute;
  content: "♥";
  color: var(--berry);
  font-family: Georgia, serif;
}

.decision::before {
  top: -31px;
  right: 66px;
  font-size: 3.5rem;
  transform: rotate(12deg);
}

.decision::after {
  top: -12px;
  right: 28px;
  font-size: 1.7rem;
  transform: rotate(-15deg);
}

.decision .eyebrow {
  background: var(--paper);
}

.decision h2 {
  color: var(--ink);
  font-size: clamp(2.2rem, 4.7vw, 4.5rem);
}

.decision__copy > p:last-child {
  max-width: 600px;
  margin: 19px 0 0;
  font-weight: 700;
}

.decision__actions {
  min-width: 248px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 15px;
}

.decision.is-happy {
  background: #e5edcf;
  animation: happy-pop 620ms var(--ease);
}

.decision.is-patient {
  background: #f7dfb2;
  animation: tiny-wiggle 500ms var(--ease);
}

.celebration {
  position: absolute;
  inset: -50px 0 0;
  overflow: hidden;
  pointer-events: none;
}

.heart-confetti {
  position: absolute;
  top: 50%;
  left: 50%;
  color: var(--confetti-color, var(--thread));
  font-family: Georgia, serif;
  font-size: var(--confetti-size, 1.4rem);
  opacity: 0;
  animation: heart-burst 1.35s var(--ease) forwards;
  animation-delay: var(--confetti-delay, 0ms);
}

footer {
  padding: 0 0 35px;
  color: rgba(64, 40, 50, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.ambient__heart {
  position: absolute;
  color: rgba(143, 41, 73, 0.13);
  font-family: Georgia, serif;
}

.ambient__heart--one {
  top: 13%;
  left: 3%;
  font-size: 2.2rem;
  transform: rotate(-18deg);
}

.ambient__heart--two {
  top: 61%;
  right: 4%;
  font-size: 4.5rem;
  transform: rotate(14deg);
}

.ambient__heart--three {
  bottom: 8%;
  left: 9%;
  font-size: 1.6rem;
  transform: rotate(9deg);
}

.ambient__stitch {
  position: absolute;
  width: 180px;
  height: 110px;
  border: 3px dashed rgba(143, 41, 73, 0.12);
  border-radius: 50%;
}

.ambient__stitch--one {
  top: -55px;
  right: 16%;
  transform: rotate(-10deg);
}

.ambient__stitch--two {
  bottom: 13%;
  left: -80px;
  transform: rotate(22deg);
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 720ms var(--ease),
    transform 720ms var(--ease);
}

.js .bag-stage[data-reveal] {
  transform: translateY(24px) rotate(2.5deg);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.js .bag-stage[data-reveal].is-visible {
  transform: translateY(0) rotate(2.5deg);
}

@keyframes bag-breathe {
  0%,
  100% {
    transform: translateX(-50%) rotate(-3deg) translateY(0);
  }
  50% {
    transform: translateX(-50%) rotate(-1.5deg) translateY(-7px);
  }
}

@keyframes happy-pop {
  0%,
  100% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.018) rotate(-0.4deg);
  }
}

@keyframes tiny-wiggle {
  0%,
  100% {
    transform: rotate(0);
  }
  30% {
    transform: rotate(-0.5deg);
  }
  70% {
    transform: rotate(0.5deg);
  }
}

@keyframes heart-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) rotate(0) scale(0.4);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(
        calc(-50% + var(--confetti-x)),
        calc(-50% + var(--confetti-y))
      )
      rotate(var(--confetti-rotate)) scale(1.2);
  }
}

@media (max-width: 880px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 64px;
    padding-top: 72px;
  }

  .hero__copy {
    max-width: 700px;
  }

  .bag-stage {
    width: min(100%, 450px);
  }

  .decision {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .decision__actions {
    width: min(100%, 370px);
  }
}

@media (max-width: 620px) {
  main,
  footer {
    width: min(100% - 24px, 1180px);
  }

  .hero {
    gap: 52px;
    padding-block: 48px 58px;
  }

  h1 {
    font-size: clamp(3rem, 15.7vw, 4.45rem);
  }

  .hero__intro {
    margin-top: 28px;
    line-height: 1.65;
  }

  .hero__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .hero__aside {
    max-width: none;
    padding-left: 4px;
  }

  .bag-stage {
    padding: 27px 12px 21px;
    transform: rotate(1.2deg);
  }

  .bag-stage[data-reveal],
  .bag-stage[data-reveal].is-visible {
    transform: rotate(1.2deg);
  }

  .bag-scene {
    height: 295px;
    transform: scale(0.88);
    transform-origin: 50% 45%;
  }

  .bag-stage figcaption {
    margin-top: -17px;
  }

  .chapter-marker {
    margin-bottom: 50px;
    font-size: 0.6rem;
    letter-spacing: 0.11em;
  }

  .letter {
    padding: 42px 27px 45px;
    border-radius: 7px 20px 9px 17px;
    box-shadow:
      8px 10px 0 var(--ink),
      15px 18px 0 rgba(201, 70, 103, 0.13);
    transform: none;
  }

  .letter__stitches {
    inset: 9px;
  }

  .promise-row {
    grid-template-columns: 1fr;
  }

  .promise {
    min-height: 0;
  }

  .promise:nth-child(2),
  .promise:nth-child(3) {
    transform: none;
  }

  .signature {
    margin-top: 36px;
  }

  .decision {
    gap: 32px;
    margin-block: 105px 55px;
    padding: 34px 25px 29px;
    border-radius: 27px 9px 27px 9px;
  }

  .decision__actions {
    min-width: 0;
  }

  .button {
    width: 100%;
  }

  footer {
    font-size: 0.63rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
