:root {
  --bg-base: #d8ff75;
  --surface: rgba(248, 255, 232, 0.76);
  --surface-strong: rgba(251, 255, 241, 0.9);
  --surface-dark: rgba(71, 118, 20, 0.1);
  --border: rgba(78, 122, 23, 0.18);
  --shadow: rgba(45, 84, 13, 0.16);
  --text-strong: #1f3c0f;
  --text-body: #36571e;
  --text-soft: #5a7b32;
  --accent: #79b51d;
  --accent-soft: #d2ef83;
  --accent-gold: #a9cf2f;
  --font-display: "Fraunces", serif;
  --font-body: "Manrope", sans-serif;
  --font-script: "Allura", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-body);
  line-height: 1.65;
}

img {
  display: block;
  width: 100%;
}

#bg-container,
#petal-container {
  position: fixed;
  inset: 0;
}

#bg-container {
  z-index: 0;
  overflow: hidden;
  background: #dcff81;
}

#bg-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), transparent 35%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.04) 0,
      rgba(255, 255, 255, 0.04) 1px,
      transparent 1px,
      transparent 18px
    );
  pointer-events: none;
}

.bg-layer {
  position: absolute;
  inset: -10%;
  opacity: 0;
  transition: opacity 0.9s ease;
  transform: scale(1.05);
}

.bg-layer::before,
.bg-layer::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.55;
}

.bg-layer::before {
  width: 34rem;
  height: 34rem;
  top: -6rem;
  right: -5rem;
}

.bg-layer::after {
  width: 26rem;
  height: 26rem;
  left: -4rem;
  bottom: -6rem;
}

.bg-layer.active {
  opacity: 1;
}

.bg-layer--dawn {
  background: linear-gradient(135deg, #f8ffd2 0%, #dfff8a 42%, #9fd61f 100%);
}

.bg-layer--dawn::before {
  background: rgba(243, 255, 170, 0.9);
}

.bg-layer--dawn::after {
  background: rgba(144, 214, 41, 0.72);
}

.bg-layer--garden {
  background: linear-gradient(135deg, #f6ffd3 0%, #d7ff82 42%, #6dbf18 100%);
}

.bg-layer--garden::before {
  background: rgba(239, 255, 164, 0.84);
}

.bg-layer--garden::after {
  background: rgba(95, 186, 42, 0.82);
}

.bg-layer--blush {
  background: linear-gradient(135deg, #fbffd8 0%, #d9ff78 45%, #88cc1b 100%);
}

.bg-layer--blush::before {
  background: rgba(242, 255, 180, 0.8);
}

.bg-layer--blush::after {
  background: rgba(120, 196, 38, 0.74);
}

.bg-layer--apricot {
  background: linear-gradient(135deg, #f9ffd8 0%, #d5ff70 45%, #b2d928 100%);
}

.bg-layer--apricot::before {
  background: rgba(247, 255, 180, 0.84);
}

.bg-layer--apricot::after {
  background: rgba(155, 208, 39, 0.76);
}

.bg-layer--wine {
  background: linear-gradient(135deg, #f8ffd2 0%, #d0fb69 38%, #5ea70e 100%);
}

.bg-layer--wine::before {
  background: rgba(236, 255, 164, 0.76);
}

.bg-layer--wine::after {
  background: rgba(77, 144, 18, 0.74);
}

.bg-layer--evening {
  background: linear-gradient(135deg, #f4ffd1 0%, #c7f45f 40%, #3b7611 100%);
}

.bg-layer--evening::before {
  background: rgba(232, 255, 149, 0.76);
}

.bg-layer--evening::after {
  background: rgba(63, 111, 26, 0.68);
}

.bg-layer--rosewater {
  background: linear-gradient(135deg, #fcffde 0%, #ddff8f 45%, #93d01f 100%);
}

.bg-layer--rosewater::before {
  background: rgba(247, 255, 186, 0.84);
}

.bg-layer--rosewater::after {
  background: rgba(129, 199, 42, 0.68);
}

#petal-container {
  z-index: 4;
  pointer-events: none;
}

.hud {
  position: fixed;
  top: clamp(1rem, 2vw, 1.6rem);
  left: clamp(1rem, 2.2vw, 2rem);
  right: clamp(1rem, 2.2vw, 2rem);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  pointer-events: none;
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
}

.hud.hud-hidden {
  opacity: 0;
  transform: translateY(-0.7rem);
  visibility: hidden;
}

.hud-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
  pointer-events: auto;
}

.hud-chip,
.music-toggle {
  border: 1px solid rgba(248, 255, 229, 0.42);
  background: rgba(246, 255, 220, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 15px 45px rgba(45, 84, 13, 0.1);
}

.hud-chip {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.music-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  width: 2.9rem;
  padding: 0;
  border-radius: 999px;
  color: var(--text-strong);
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    color 0.22s ease;
}

.music-toggle:hover,
.music-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(121, 181, 29, 0.34);
  box-shadow: 0 18px 40px rgba(45, 84, 13, 0.16);
}

.music-toggle:focus-visible {
  outline: 2px solid rgba(121, 181, 29, 0.36);
  outline-offset: 3px;
}

.music-toggle.is-playing {
  background: linear-gradient(135deg, rgba(121, 181, 29, 0.92), rgba(169, 207, 47, 0.92));
  border-color: rgba(248, 255, 229, 0.5);
  color: #f8ffe6;
}

.music-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
}

.music-icon--pause {
  display: none;
}

.music-toggle.is-playing .music-icon--play {
  display: none;
}

.music-toggle.is-playing .music-icon--pause {
  display: block;
}

.scroller {
  position: relative;
  z-index: 10;
  height: 100svh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

.section {
  position: relative;
  min-height: 100svh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 10vw, 7rem) clamp(1.15rem, 3vw, 2.4rem) clamp(2rem, 4vw, 3rem);
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(72, 116, 24, 0.14));
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  width: min(1080px, 100%);
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
}

.content.visible {
  opacity: 1;
  transform: translateY(0);
}

.shell {
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: 2rem;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow:
    0 30px 80px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-shell {
  max-width: 780px;
  text-align: center;
}

.shell--split,
.shell--media {
  display: grid;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

.shell--reverse > :first-child {
  order: 2;
}

.shell--quote,
.shell--center {
  max-width: 820px;
  text-align: center;
}

.copy-stack {
  display: grid;
  gap: 1rem;
}

.eyebrow {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-soft);
}

.script-line {
  font-family: var(--font-script);
  font-size: clamp(2rem, 5vw, 3.6rem);
  color: var(--accent);
  line-height: 0.95;
  margin-bottom: 0.5rem;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.06;
}

h1 {
  font-size: clamp(3rem, 8vw, 5.8rem);
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.04em;
}

h3 {
  font-size: 1.3rem;
}

p {
  font-size: 1.05rem;
  color: var(--text-body);
}

.lead {
  max-width: 42rem;
  margin: 0 auto;
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
}

.lead--compact {
  max-width: 32rem;
}

.body-copy {
  max-width: 38rem;
  margin: 0 auto;
}

.body-copy--narrow {
  max-width: 30rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.tag-row span {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(250, 255, 236, 0.58);
  border: 1px solid rgba(121, 181, 29, 0.14);
  color: var(--text-strong);
  font-size: 0.92rem;
  font-weight: 600;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.7rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.scroll-cue::after {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: currentColor;
  animation: drift 1.8s ease-in-out infinite;
}

.stat-grid,
.story-grid {
  display: grid;
  gap: 1rem;
}

.stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-card,
.story-card {
  border-radius: 1.5rem;
  border: 1px solid rgba(78, 122, 23, 0.12);
  background: rgba(249, 255, 235, 0.44);
  box-shadow: 0 18px 40px rgba(45, 84, 13, 0.08);
}

.mini-card {
  padding: 1.2rem;
}

.mini-card p {
  font-size: 0.96rem;
}

.stat-number {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-frame {
  overflow: hidden;
  border-radius: 1.6rem;
  min-height: 100%;
  box-shadow: 0 24px 60px rgba(45, 84, 13, 0.18);
}

.image-frame img,
.story-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}

.image-frame--portrait {
  aspect-ratio: 4 / 5;
}

.image-frame--landscape {
  aspect-ratio: 5 / 4;
}

.image-frame--flowers {
  aspect-ratio: 3 / 2;
  min-height: 0;
  align-self: start;
}

.image-frame--flowers img {
  object-fit: contain;
  object-position: center;
}

.section.active .image-frame img,
.section.active .story-card img {
  transform: scale(1.04);
}

.story-grid {
  margin-top: 1.6rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-card {
  overflow: hidden;
}

.story-card img {
  aspect-ratio: 16 / 10;
}

.story-copy {
  padding: 1.25rem;
}

.story-copy p {
  font-size: 0.98rem;
}

.quote-card {
  margin: 1.5rem auto;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  max-width: 38rem;
  border-radius: 1.7rem;
  background: rgba(248, 255, 229, 0.44);
  border: 1px solid rgba(248, 255, 229, 0.4);
}

.quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--text-strong);
  line-height: 1.15;
}

.quote-card footer {
  margin-top: 1rem;
  color: var(--text-soft);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.closing-title {
  font-size: clamp(2.5rem, 6vw, 4.6rem);
}

.closing-signoff {
  margin-top: 1.4rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes drift {
  0%,
  100% {
    transform: translateX(0);
    opacity: 0.5;
  }

  50% {
    transform: translateX(0.45rem);
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .shell--split,
  .shell--media {
    grid-template-columns: 1fr;
  }

  .shell--reverse > :first-child {
    order: 0;
  }

  .stat-grid,
  .story-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .hud {
    flex-direction: row;
    align-items: center;
  }

  .hud-controls {
    width: auto;
    margin-left: auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .music-toggle {
    min-height: 2.75rem;
    width: 2.75rem;
  }

  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  #cover.section {
    padding-top: 6.8rem;
  }

  .shell {
    border-radius: 1.6rem;
  }

  p {
    font-size: 1rem;
  }

  .tag-row span {
    width: 100%;
  }

  .story-copy,
  .mini-card {
    padding: 1rem;
  }
}

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

  .content,
  .bg-layer,
  .image-frame img,
  .story-card img,
  .scroll-cue::after {
    transition: none;
    animation: none;
  }
}
