/* Tokens */
:root {
  --blue-bg: #c3d3ea;
  --blue-soft: #bbd6f5;
  --blue-ink: #6f93b9;
  --blue-deep: #4f7399;
  --blue-on-tint: #3a5674;
  --pink: #f08fb0;
  --pink-deep: #9c5a70;
  --pink-soft: #f7c6e0;
  --pink-blush: #ffc2c2;
  --white: #ffffff;
  --grid: #eaf2fb;
  --radius: 22px;
  --shadow: 0 6px 18px rgba(79, 115, 153, 0.18);
  --font-display: "Almendra", Georgia, serif;
  --font-body: "Caudex", Georgia, serif;
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--blue-deep);
  background: var(--white);
  overflow-x: clip;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--blue-deep);
}

h1,
h2 {
  font-size: clamp(3.4rem, 9vw, 7rem);
  line-height: 1.08;
}

h3 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.2;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--blue-on-tint);
  outline-offset: 3px;
}

button {
  min-width: 44px;
  min-height: 44px;
}

/* Textures */
.bg-stripes {
  background-color: var(--blue-bg);
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.35) 0 6px,
    transparent 6px 56px
  );
}

.bg-grid {
  background-color: var(--white);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

.bg-plain {
  background: var(--white);
}

/* Sections */
.section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 96px 24px;
  text-align: center;
}

.section__inner {
  width: min(100%, 1240px);
}

.section.has-wave-top {
  padding-top: 120px;
}

.section.has-wave-bottom {
  padding-bottom: 120px;
}

/* Shapes */
.scallop {
  --r: 16px;
  --scallop-fill: var(--white);
  background: var(--scallop-fill);
  padding: calc(var(--r) + 1.35rem) calc(var(--r) + 1.1rem);
  filter: drop-shadow(var(--shadow));
  -webkit-mask-image:
    radial-gradient(circle at 50% 100%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    radial-gradient(circle at 50% 0%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    radial-gradient(circle at 100% 50%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    radial-gradient(circle at 0% 50%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    linear-gradient(#000, #000);
  mask-image:
    radial-gradient(circle at 50% 100%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    radial-gradient(circle at 50% 0%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    radial-gradient(circle at 100% 50%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    radial-gradient(circle at 0% 50%, #000 var(--r), #0000 calc(var(--r) + 0.8px)),
    linear-gradient(#000, #000);
  -webkit-mask-size:
    calc(var(--r) * 2) var(--r),
    calc(var(--r) * 2) var(--r),
    var(--r) calc(var(--r) * 2),
    var(--r) calc(var(--r) * 2),
    calc(100% - var(--r) * 2) calc(100% - var(--r) * 2);
  mask-size:
    calc(var(--r) * 2) var(--r),
    calc(var(--r) * 2) var(--r),
    var(--r) calc(var(--r) * 2),
    var(--r) calc(var(--r) * 2),
    calc(100% - var(--r) * 2) calc(100% - var(--r) * 2);
  -webkit-mask-position: top center, bottom center, left center, right center, center;
  mask-position: top center, bottom center, left center, right center, center;
  -webkit-mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y, no-repeat;
  mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y, no-repeat;
  -webkit-mask-composite: source-over, source-over, source-over, source-over, source-over;
  mask-composite: add, add, add, add, add;
}

.scallop--blush {
  --r: 14px;
  --scallop-fill: var(--pink-blush);
  padding: 22px;
}

.scallop__face {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 180px;
  padding: 20px 12px;
  border-radius: 16px;
  background: var(--white);
}

.wave-top,
.wave-bottom {
  position: absolute;
  left: 0;
  z-index: 1;
  width: 100%;
  height: 64px;
  background: var(--blue-soft);
  pointer-events: none;
  -webkit-mask: url("assets/stickers/wave.svg") center / 100% 100% no-repeat;
  mask: url("assets/stickers/wave.svg") center / 100% 100% no-repeat;
}

.wave-top {
  top: 0;
}

.wave-bottom {
  bottom: 0;
  transform: scaleY(-1);
}

.stamp,
.photo-frame {
  --edge: 14px;
  --wave-tile: 48px;
  background: var(--white);
  -webkit-mask-image:
    url("assets/stickers/stamp-top.svg"),
    url("assets/stickers/stamp-bottom.svg"),
    url("assets/stickers/stamp-left.svg"),
    url("assets/stickers/stamp-right.svg"),
    linear-gradient(#000, #000);
  mask-image:
    url("assets/stickers/stamp-top.svg"),
    url("assets/stickers/stamp-bottom.svg"),
    url("assets/stickers/stamp-left.svg"),
    url("assets/stickers/stamp-right.svg"),
    linear-gradient(#000, #000);
  -webkit-mask-size:
    var(--wave-tile) var(--edge),
    var(--wave-tile) var(--edge),
    var(--edge) var(--wave-tile),
    var(--edge) var(--wave-tile),
    calc(100% - var(--edge) - 2px) calc(100% - var(--edge) - 2px);
  mask-size:
    var(--wave-tile) var(--edge),
    var(--wave-tile) var(--edge),
    var(--edge) var(--wave-tile),
    var(--edge) var(--wave-tile),
    calc(100% - var(--edge) - 2px) calc(100% - var(--edge) - 2px);
  -webkit-mask-position: top center, bottom center, left center, right center, center;
  mask-position: top center, bottom center, left center, right center, center;
  -webkit-mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y, no-repeat;
  mask-repeat: repeat-x, repeat-x, repeat-y, repeat-y, no-repeat;
  -webkit-mask-composite: source-over, source-over, source-over, source-over, source-over;
  mask-composite: add, add, add, add, add;
}

.stamp {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 8.2rem 1.5rem 2.6rem;
  filter: drop-shadow(var(--shadow));
}

.photo-frame {
  --edge: 9px;
  --wave-tile: 28px;
  width: 100%;
  padding: var(--edge);
  background: var(--blue-ink);
  filter: drop-shadow(var(--shadow));
}

.photo-frame--pink {
  background: var(--pink);
}

.photo-frame__shot,
.memory-card__photo {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 42%, var(--pink-soft), transparent 42%),
    linear-gradient(165deg, var(--white), var(--blue-soft));
}

.photo-frame__shot img,
.memory-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-frame__shot {
  aspect-ratio: 3 / 4;
}

.tape {
  position: absolute;
  z-index: 2;
  width: 96px;
  height: 30px;
  background: url("assets/stickers/tape.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.tape--left {
  top: 8px;
  left: 10px;
  transform: rotate(-16deg);
}

.tape--right {
  top: 6px;
  right: 8px;
  transform: rotate(14deg);
}

.scribble {
  display: block;
  width: 220px;
  height: 22px;
  margin: 12px auto 0;
  background: var(--pink-soft);
  -webkit-mask: url("assets/stickers/scribble.svg") center / 100% 100% no-repeat;
  mask: url("assets/stickers/scribble.svg") center / 100% 100% no-repeat;
}

.sticker {
  position: absolute;
  z-index: 3;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* 1. Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  column-gap: 16px;
  width: min(100%, 920px);
  padding-top: 8px;
}

.hero__card {
  position: relative;
  grid-column: 1 / -1;
  width: min(100%, 680px);
  margin: 0 auto 22px;
}

.kicker {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-deep);
}

.lede,
.began__copy p,
.closing__note,
.heartline p,
.memory-card p,
.little-card p,
.place-card p,
.dream-list p,
.stat__label,
.caption,
.date-pill {
  font-size: 1.2rem;
}

.lede,
.began__copy p,
.closing__note {
  color: var(--blue-deep);
  line-height: 1.5;
}

.lede {
  max-width: 26rem;
  margin: 0.85rem auto 0;
}

.sticker--tag {
  top: 16px;
  right: 10px;
  width: 117px;
  margin: 0;
  padding: 20px 12px 16px;
  border-radius: 16px;
  background: var(--pink-deep);
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 1.15rem;
  line-height: 1.15;
  text-align: center;
  transform: rotate(8deg);
}

.sticker--tag::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--white);
}

.sticker--sparkle-hero {
  top: 12%;
  left: 0;
  width: 54px;
}

.tilted {
  position: relative;
  width: min(190px, 100%);
  min-width: 0;
}

.tilted--left {
  justify-self: start;
  transform: rotate(-6deg);
}

.tilted--right {
  justify-self: end;
  transform: rotate(5deg);
}

/* 2. Where It Began */
.section.began-section {
  display: block;
  padding: 0;
}

.began {
  display: grid;
  grid-template-columns: 1fr;
}

.began__media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 78svh;
  padding: 108px 16px 48px;
}

.began__cluster {
  position: relative;
  width: min(90vw, 100%, 520px);
  height: 540px;
}

.began__cluster .tilted {
  position: absolute;
  width: min(220px, 62%);
}

.began__cluster .tilted--left {
  top: 36px;
  left: 0;
  z-index: 1;
}

.began__cluster .tilted--right {
  right: 0;
  bottom: 8px;
  z-index: 2;
}

.sticker--keyboard {
  top: 4px;
  left: 40%;
  width: 148px;
}

.sticker--rose {
  left: -4px;
  bottom: 12px;
  width: 96px;
}

.sticker--beach {
  top: 64px;
  right: -8px;
  width: 128px;
}

.began__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72svh;
  padding: 80px 28px 96px;
  background: var(--white);
}

.began__copy p {
  max-width: 34rem;
  margin-top: 1rem;
}

.date-pill {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.55rem 1.2rem;
  border: 1.5px solid var(--pink-deep);
  border-radius: 999px;
  color: var(--blue-deep);
}

.caption {
  font-style: italic;
  color: var(--blue-deep);
}

/* 3. Our Timeline */
.heartline {
  position: relative;
  display: grid;
  gap: 22px;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.heartline::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 18px;
  bottom: 18px;
  left: 15px;
  width: 20px;
  background: var(--pink);
  pointer-events: none;
  -webkit-mask: url("assets/stickers/dash-wave-y.svg") center top / 20px 64px repeat-y;
  mask: url("assets/stickers/dash-wave-y.svg") center top / 20px 64px repeat-y;
}

.heartline li {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 50px 1fr;
  column-gap: 8px;
  align-items: center;
}

.heart-dot {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  justify-self: center;
  border-radius: 50%;
  background: var(--pink) url("assets/stickers/heart.svg") center / 16px 16px no-repeat;
  box-shadow: 0 0 0 4px var(--white);
}

.heartline p {
  margin-top: 0.2rem;
  color: var(--blue-deep);
  line-height: 1.4;
}

/* 4. Months Together */
.stat-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  color: var(--blue-deep);
}

.stat__value--long {
  font-size: clamp(1.35rem, 5vw, 2.4rem);
  line-height: 1.05;
}

.stat__label {
  margin-top: 0.4rem;
  color: var(--blue-deep);
  line-height: 1.3;
}

/* 5. Favorite Memories */
.memory-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin: 2.4rem 0 0;
  padding: 0;
  list-style: none;
}

.memory-card {
  padding: 28px 24px 36px;
  border-radius: 36px;
}

.memory-card--sky {
  background: var(--blue-soft);
}

.memory-card--deep {
  background: var(--blue-deep);
}

.memory-card--blush {
  background: var(--pink-soft);
}

.memory-card--pink {
  background: var(--pink-deep);
}

.memory-card__photo {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
}

.memory-card h3 {
  margin-top: 18px;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  overflow-wrap: break-word;
}

.memory-card p {
  margin-top: 0.2rem;
  color: var(--blue-deep);
}

.memory-card--sky h3,
.memory-card--sky p,
.memory-card--blush h3,
.memory-card--blush p {
  color: var(--blue-on-tint);
}

.memory-card--deep h3,
.memory-card--deep p,
.memory-card--pink h3,
.memory-card--pink p {
  color: var(--white);
}

/* 6. Little Things */
.little-grid {
  display: grid;
  gap: 24px;
  margin-top: 2rem;
  text-align: left;
}

.little-card {
  padding: 28px 24px 26px;
  border-radius: 24px;
  color: var(--white);
}

.little-card h3,
.little-card p {
  color: inherit;
}

.little-card p {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

.little-card--blue {
  background: var(--blue-deep);
}

.little-card--pink {
  background: var(--pink-deep);
}

/* 7. Places We've Been */
.place-row {
  display: grid;
  gap: 24px;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.place-card {
  padding: 40px 28px 36px;
  border: 2px solid var(--blue-ink);
  border-radius: 32px;
  background: var(--white);
}

.place-card img {
  width: 64px;
  height: 64px;
}

.place-card h3 {
  margin-top: 8px;
  font-style: italic;
}

.place-card p {
  margin-top: 0.35rem;
  color: var(--blue-deep);
}

/* 8. What's Next */
.dream-row {
  display: grid;
  gap: 24px;
  margin-top: 2rem;
}

.dream-list {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.dream-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--grid);
}

.dream-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dream-list img {
  width: 64px;
  height: 64px;
}

.dream-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--blue-deep);
}

.dream-list p {
  margin-top: 0.15rem;
  color: var(--blue-deep);
}

/* 9. Still Choosing You */
.closing {
  position: relative;
}

.closing__note {
  max-width: 40rem;
  margin: 0 auto;
}

.closing .caption {
  margin-top: 0.9rem;
}

.closing h2 {
  margin-top: 1.6rem;
  font-size: clamp(4rem, 12vw, 8.5rem);
}

#next h2 {
  color: var(--blue-on-tint);
}

#closing.section {
  padding-bottom: 140px;
}

.closing__button,
.love-popup__close {
  margin-top: 1.6rem;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border: 0;
  border-radius: 999px;
  background: var(--blue-deep);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
}

.love-popup {
  width: min(40rem, calc(100vw - 2rem));
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.love-popup::backdrop {
  background: rgba(58, 86, 116, 0.46);
}

.love-popup[open] {
  animation: popup-in 420ms cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.love-popup__card {
  position: relative;
  padding: 2.4rem 1.5rem 1.9rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 0%, var(--pink-soft), transparent 60%),
    var(--white);
  text-align: center;
  box-shadow: var(--shadow);
}

/* Sealed envelope */
.envelope__to {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: var(--blue-deep);
}

.envelope__prompt {
  margin-top: 1rem;
  font-size: 1.15rem;
  color: var(--pink-deep);
  animation: pulse 1.8s ease-in-out infinite;
}

.envelope {
  position: relative;
  display: block;
  width: min(260px, 70vw);
  aspect-ratio: 3 / 2;
  margin: 1.4rem auto 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 800px;
  animation: float 4s ease-in-out infinite;
}

.envelope__back,
.envelope__front,
.envelope__flap {
  position: absolute;
  inset: 0;
  border-radius: 14px;
}

.envelope__back {
  background: var(--blue-ink);
}

.envelope__front {
  background: var(--blue-soft);
  clip-path: polygon(0 30%, 50% 72%, 100% 30%, 100% 100%, 0 100%);
}

.envelope__flap {
  z-index: 2;
  background: var(--blue-deep);
  clip-path: polygon(0 0, 100% 0, 50% 64%);
  transform-origin: top;
  transition: transform 700ms ease;
}

.envelope__seal {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  translate: -50% -60%;
  border-radius: 50%;
  background: var(--pink) url("assets/stickers/heart.svg") center / 22px 22px no-repeat;
  box-shadow: 0 0 0 4px var(--white);
  transition: opacity 300ms ease, scale 300ms ease;
}

.envelope:hover .envelope__seal,
.envelope:focus-visible .envelope__seal {
  scale: 1.12;
}

.is-opening .envelope {
  animation: none;
}

.is-opening .envelope__flap {
  transform: rotateX(180deg);
}

.is-opening .envelope__seal {
  opacity: 0;
  scale: 0.4;
}

/* Letter */
.love-popup__letter {
  display: none;
}

.is-open .love-popup__sealed {
  display: none;
}

.is-open .love-popup__letter {
  display: block;
  animation: letter-up 650ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.love-popup__line {
  font-size: clamp(2.8rem, 11vw, 5.4rem);
  line-height: 1.02;
}

.love-popup__word {
  display: inline-block;
}

.is-open .love-popup__word {
  animation: word-in 600ms ease both;
  animation-delay: calc(400ms + var(--i) * 260ms);
}

.gift {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
  padding: 0.6rem 1.2rem 0.6rem 0.8rem;
  border: 2px dashed var(--pink);
  border-radius: 999px;
  background: var(--white);
  color: var(--pink-deep);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.6vw, 1.9rem);
  cursor: pointer;
}

.is-open .gift {
  animation: word-in 600ms ease 1.6s both;
}

.gift__box {
  position: relative;
  width: 34px;
  height: 30px;
  border-radius: 5px;
  background:
    linear-gradient(90deg, transparent 42%, var(--blue-deep) 42% 58%, transparent 58%),
    var(--pink);
  animation: wiggle 1.6s ease-in-out 2.4s infinite;
}

.gift__box::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -3px;
  right: -3px;
  height: 10px;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 42%, var(--blue-deep) 42% 58%, transparent 58%),
    var(--pink-deep);
  transition: translate 400ms ease, rotate 400ms ease;
}

.gift.is-open .gift__box {
  animation: none;
}

.gift.is-open .gift__box::before {
  translate: 6px -12px;
  rotate: 18deg;
}

.gift__note {
  max-height: 0;
  margin-top: 0.8rem;
  overflow: hidden;
  opacity: 0;
  font-size: 1.15rem;
  color: var(--blue-deep);
  transition: opacity 500ms ease, max-height 500ms ease;
}

.gift__note.is-visible {
  max-height: 6rem;
  opacity: 1;
}

.love-popup__close {
  display: block;
  margin-inline: auto;
}

@keyframes popup-in {
  from {
    opacity: 0;
    scale: 0.85;
  }
}

@keyframes letter-up {
  from {
    opacity: 0;
    translate: 0 60px;
  }
}

@keyframes word-in {
  from {
    opacity: 0;
    translate: 0 14px;
    filter: blur(4px);
  }
}

@keyframes wiggle {
  0%, 60%, 100% {
    rotate: 0deg;
  }
  70% {
    rotate: -12deg;
  }
  80% {
    rotate: 10deg;
  }
  90% {
    rotate: -6deg;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .love-popup[open],
  .envelope,
  .envelope__prompt,
  .gift__box,
  .is-open .love-popup__letter,
  .is-open .love-popup__word,
  .is-open .gift {
    animation: none;
  }

  .envelope__flap {
    transition: none;
  }
}

.heartline__date {
  margin-top: 0.15rem;
  color: var(--pink-deep);
}

.sticker--sparkle-end {
  top: -64px;
  right: 8px;
  width: 60px;
}

@media (min-width: 768px) {
  .section {
    padding: 128px 64px;
  }

  .section.has-wave-top {
    padding-top: 160px;
  }

  .section.has-wave-bottom {
    padding-bottom: 160px;
  }

  .lede,
  .began__copy p,
  .closing__note,
  .heartline p,
  .memory-card p,
  .little-card p,
  .place-card p,
  .dream-list p,
  .stat__label,
  .caption,
  .date-pill {
    font-size: 1.45rem;
  }

  .wave-top,
  .wave-bottom {
    height: 86px;
  }

  .stamp {
    padding: 6.1rem 2.2rem 3.2rem;
  }

  .sticker--tag {
    top: 22px;
    right: 18px;
    width: 120px;
  }

  .sticker--sparkle-hero {
    width: 72px;
    left: 4%;
  }

  .hero {
    width: min(100%, 1080px);
  }

  .hero .tilted {
    width: 400px;
    margin-top: -40px;
  }

  .began__cluster {
    height: 700px;
  }

  .began__cluster .tilted {
    width: min(300px, 62%);
  }

  .began {
    grid-template-columns: 1fr 1fr;
  }

  .began__media,
  .began__copy {
    min-height: 100svh;
  }

  .began__media {
    padding: 120px 36px 56px;
  }

  .began__copy {
    align-items: flex-start;
    padding: 120px 64px 72px;
    text-align: left;
  }

  .began__copy .scribble {
    margin-left: 0;
  }

  .heartline {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    text-align: center;
  }

  .heartline::before {
    top: 7px;
    right: 10%;
    bottom: auto;
    left: 10%;
    width: auto;
    height: 20px;
    -webkit-mask: url("assets/stickers/dash-wave-x.svg") center / 72px 20px repeat-x;
    mask: url("assets/stickers/dash-wave-x.svg") center / 72px 20px repeat-x;
  }

  .heartline li {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .heart-dot {
    grid-row: auto;
    margin-bottom: 10px;
  }

  .stat-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }

  .memory-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
  }

  .little-grid,
  .dream-row {
    grid-template-columns: 1fr 1fr;
  }

  .place-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .memory-card h3 {
    font-size: clamp(1.7rem, 2.4vw, 2.6rem);
  }
}

/* Interactions */
.reveal {
  opacity: 0;
  transition: opacity 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    translate: 0 16px;
    transition: opacity 700ms ease, translate 700ms ease;
  }

  .reveal.is-visible {
    translate: 0 0;
  }
}

.reveal.reveal-delay-1,
.reveal-group > .reveal:nth-child(2) {
  transition-delay: 100ms;
}

.reveal.reveal-delay-2,
.reveal-group > .reveal:nth-child(3) {
  transition-delay: 200ms;
}

.reveal.reveal-delay-3,
.reveal-group > .reveal:nth-child(4) {
  transition-delay: 300ms;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes float-tag {
  0%,
  100% {
    transform: translateY(0) rotate(8deg);
  }

  50% {
    transform: translateY(-6px) rotate(8deg);
  }
}

.sticker--keyboard,
.sticker--rose,
.sticker--beach {
  animation: float 6s ease-in-out infinite;
}

.sticker--rose {
  animation-delay: -2.2s;
}

.sticker--keyboard {
  animation-delay: -3.4s;
}

.sticker--tag {
  animation: float-tag 6s ease-in-out infinite;
}

.heart-burst {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  pointer-events: none;
}

.song-button {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--blue-deep);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.song-button::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 3px;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--white);
}

.song-button.is-playing::before {
  width: 12px;
  height: 14px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(var(--white), var(--white)) left center / 3px 14px no-repeat,
    linear-gradient(var(--white), var(--white)) right center / 3px 14px no-repeat;
}

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

  .sticker--keyboard,
  .sticker--rose,
  .sticker--beach,
  .sticker--tag {
    animation: none;
  }
}
