:root {
  /* Intersection Observer is the only JavaScript beyond the scroll-position variable setter. Intersection Observer triggers `.in-view` when each section crosses the 20% visibility threshold. Each margin wildflower uses the same bounce-enter with a 100-200ms delay offset. */
  --color-cream: #FFF8F0;
  --color-parchment: #FFFBF5;
  --color-walnut: #4A3728;
  --color-herb: #7A6B5D;
  --color-rose: #D4837A;
  --color-rose-light: #E8ADA7;
  --color-sage: #8FA97E;
  --color-sage-soft: #B7C4A1;
  --color-honey: #E8C170;
  --color-linen: #DDD0C0;
  --shadow-warm: 0 4px 20px rgba(139, 115, 85, 0.12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-walnut);
  font-family: "Nunito", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.005em;
  background-color: var(--color-cream);
  background-image:
    radial-gradient(circle at 20% 10%, rgba(232, 193, 112, 0.18), transparent 24rem),
    radial-gradient(circle at 80% 30%, rgba(183, 196, 161, 0.22), transparent 26rem),
    radial-gradient(circle at 50% 80%, rgba(232, 173, 167, 0.14), transparent 30rem);
  overflow-x: hidden;
}

.paper-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.72;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='%234A3728' fill-opacity='0.035'%3E%3Ccircle cx='10' cy='14' r='0.8'/%3E%3Ccircle cx='42' cy='28' r='0.7'/%3E%3Ccircle cx='78' cy='18' r='0.6'/%3E%3Ccircle cx='20' cy='70' r='0.65'/%3E%3Ccircle cx='64' cy='64' r='0.75'/%3E%3C/g%3E%3C/svg%3E");
}

main,
.garden-bench,
.flower-nav {
  position: relative;
  z-index: 1;
}

.flower-nav {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 20;
}

.flower-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(221, 208, 192, 0.85);
  border-radius: 50%;
  background: rgba(255, 251, 245, 0.84);
  box-shadow: var(--shadow-warm);
  cursor: pointer;
  padding: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.flower-button:hover,
.flower-nav.is-open .flower-button {
  transform: rotate(-5deg) scale(1.04);
  box-shadow: 0 8px 32px rgba(139, 115, 85, 0.18);
}

.pressed-flower {
  display: block;
  width: 100%;
  height: 100%;
}

.pressed-flower .petal,
.pressed-flower .flower-center {
  transition: transform 0.35s ease, fill 0.35s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.flower-button:hover .petal-top,
.flower-nav.is-open .petal-top { transform: translateY(-2px); }
.flower-button:hover .petal-right,
.flower-nav.is-open .petal-right { transform: translateX(2px); }
.flower-button:hover .petal-bottom,
.flower-nav.is-open .petal-bottom { transform: translateY(2px); }
.flower-button:hover .petal-left,
.flower-nav.is-open .petal-left { transform: translateX(-2px); }
.flower-button:hover .flower-center,
.flower-nav.is-open .flower-center { fill: var(--color-honey); }

.nav-panel {
  position: absolute;
  top: 60px;
  left: 0;
  width: 210px;
  padding: 22px 24px;
  border: 1px solid var(--color-linen);
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.94);
  box-shadow: 0 8px 32px rgba(139, 115, 85, 0.16);
  transform: translateY(-12px) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flower-nav.is-open .nav-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.nav-panel a {
  display: block;
  color: var(--color-rose);
  font-family: "Caveat", cursive;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transform: rotate(-1deg);
  margin: 8px 0;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-panel a:hover {
  color: var(--color-walnut);
  transform: rotate(1deg) translateX(4px);
}

.garden-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 48px 24px;
}

.hero-content {
  position: relative;
  z-index: 2;
  transform: translateY(calc(var(--scroll-y, 0px) * -0.3));
}

.site-name {
  margin: 0;
  color: var(--color-walnut);
  font-family: "Baloo 2", cursive;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  text-shadow: 0 10px 30px rgba(139, 115, 85, 0.12);
}

.garden-whisper {
  margin: 14px 0 0;
  color: var(--color-herb);
  font-family: "Caveat", cursive;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 400;
  opacity: 0;
  animation: whisperIn 0.9s ease 0.6s forwards;
  transform: rotate(-1deg);
}

.falling-petals {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.falling-petal {
  position: absolute;
  top: 0;
  left: var(--petal-left);
  width: 12px;
  height: 18px;
  border-radius: 80% 20% 70% 30%;
  background: var(--petal-color);
  opacity: 0;
  animation: petalFall var(--petal-duration) linear infinite;
  animation-delay: var(--petal-delay);
}

.falling-petal::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 1px;
  height: 12px;
  background: rgba(74, 55, 40, 0.16);
  transform: rotate(8deg);
}

.falling-petal--one { --petal-left: 12%; --petal-color: #D4837A; --petal-duration: 11s; --petal-delay: -2s; --drift-x: 28px; --drift-end: -20px; --petal-opacity: 0.45; }
.falling-petal--two { --petal-left: 25%; --petal-color: #E8ADA7; --petal-duration: 14s; --petal-delay: -6s; --drift-x: -30px; --drift-end: 38px; --petal-opacity: 0.34; }
.falling-petal--three { --petal-left: 38%; --petal-color: #D4837A; --petal-duration: 9s; --petal-delay: -1s; --drift-x: 18px; --drift-end: 42px; --petal-opacity: 0.6; }
.falling-petal--four { --petal-left: 51%; --petal-color: #E8ADA7; --petal-duration: 15s; --petal-delay: -8s; --drift-x: -18px; --drift-end: -34px; --petal-opacity: 0.4; }
.falling-petal--five { --petal-left: 64%; --petal-color: #D4837A; --petal-duration: 12s; --petal-delay: -4s; --drift-x: 30px; --drift-end: 10px; --petal-opacity: 0.52; }
.falling-petal--six { --petal-left: 76%; --petal-color: #E8ADA7; --petal-duration: 8s; --petal-delay: -3s; --drift-x: -24px; --drift-end: 24px; --petal-opacity: 0.68; }
.falling-petal--seven { --petal-left: 86%; --petal-color: #D4837A; --petal-duration: 13s; --petal-delay: -7s; --drift-x: 22px; --drift-end: -18px; --petal-opacity: 0.32; }
.falling-petal--eight { --petal-left: 6%; --petal-color: #E8ADA7; --petal-duration: 10s; --petal-delay: -5s; --drift-x: -10px; --drift-end: 34px; --petal-opacity: 0.48; }

.botanical-divider {
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 24px;
}

.botanical-divider svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.botanical-divider path,
.botanical-divider circle,
.botanical-divider ellipse {
  stroke-dasharray: var(--path-length, 1);
  stroke-dashoffset: var(--path-length, 1);
  transition: stroke-dashoffset 1.2s ease-out;
}

.botanical-divider.in-view path,
.botanical-divider.in-view circle,
.botanical-divider.in-view ellipse {
  stroke-dashoffset: 0;
}

.garden-room {
  position: relative;
  max-width: 680px;
  min-height: 86vh;
  margin: 0 auto;
  padding: 120px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  animation: bounceEnter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-play-state: paused;
}

.garden-room.in-view {
  animation-play-state: running;
}

.room-content,
.recipe-card {
  position: relative;
}

.recipe-card {
  padding: 32px;
  border: 1px solid var(--color-linen);
  border-radius: 16px;
  background: var(--color-parchment);
  box-shadow: var(--shadow-warm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(139, 115, 85, 0.18);
}

.garden-room--second {
  gap: 44px;
}

.recipe-card--tilt-left { transform: rotate(-1.2deg); }
.recipe-card--tilt-left:hover { transform: rotate(-1.2deg) translateY(-2px); }
.recipe-card--tilt-right { transform: rotate(1deg); margin-left: 34px; }
.recipe-card--tilt-right:hover { transform: rotate(1deg) translateY(-2px); }

.card-stamp {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 58px;
  height: 58px;
  fill: none;
  stroke: var(--color-honey);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-rose);
  font-family: "Caveat", cursive;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 600;
  transform: rotate(-1deg);
}

h2 {
  margin: 0 0 18px;
  color: var(--color-walnut);
  font-family: "Baloo 2", cursive;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 18px;
}

p:last-child {
  margin-bottom: 0;
}

.hand-note {
  display: inline-block;
  margin-top: 14px;
  color: var(--color-herb);
  font-family: "Caveat", cursive;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  transform: rotate(1.4deg);
  background: linear-gradient(transparent 64%, rgba(232, 193, 112, 0.36) 64%);
}

.margin-flower {
  position: absolute;
  width: 118px;
  color: var(--color-sage);
  opacity: 0;
  transform: scale(0.8);
  animation: bounceEnter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.16s forwards;
  animation-play-state: paused;
}

.garden-room.in-view .margin-flower {
  animation-play-state: running;
}

.margin-flower svg {
  width: 100%;
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.margin-flower--left {
  left: -180px;
  top: 27%;
  transform: rotate(-6deg) scale(0.8);
}

.margin-flower--right {
  right: -190px;
  top: 25%;
  color: var(--color-rose);
  transform: rotate(7deg) scale(0.8);
}

.garden-bench {
  min-height: 42vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 90px 24px 120px;
  text-align: center;
}

.garden-bench p {
  margin: 0;
  color: var(--color-herb);
  font-family: "Caveat", cursive;
  font-size: 1.2rem;
  transform: rotate(-1deg);
}

.bench-icon {
  width: 40px;
  height: auto;
}

@keyframes bounceEnter {
  0% { opacity: 0; transform: translateY(30px) scale(0.92); }
  60% { opacity: 1; transform: translateY(-6px) scale(1.02); }
  80% { transform: translateY(2px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes whisperIn {
  from { opacity: 0; transform: translateY(8px) rotate(-1deg); }
  to { opacity: 1; transform: translateY(0) rotate(-1deg); }
}

@keyframes petalFall {
  0% { transform: translateY(-40px) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: var(--petal-opacity); }
  50% { transform: translateY(50vh) translateX(var(--drift-x)) rotate(180deg); opacity: var(--petal-opacity); }
  90% { opacity: var(--petal-opacity); }
  100% { transform: translateY(100vh) translateX(var(--drift-end)) rotate(360deg); opacity: 0; }
}

@media (max-width: 1024px) {
  .margin-flower { display: none; }
}

@media (max-width: 680px) {
  body { font-size: 1.03rem; }
  .flower-nav { top: 16px; left: 16px; }
  .garden-room { min-height: auto; padding: 90px 20px; }
  .botanical-divider { padding: 18px 20px; }
  .recipe-card { padding: 26px; }
  .recipe-card--tilt-right { margin-left: 0; }
}
