:root {
  /* DESIGN typography tokens: Space Grotesk near the upper-left, Space Grotesk** in 500/700 for the `jill.moe` wordmark */
  --lacquer-burgundy: #5A1022;
  --oxheart-ink: #260711;
  --petal-cream: #F7E8D8;
  --blush-membrane: #DFA1A7;
  --stem-sage: #778B62;
  --pollen-amber: #F2B95E;
  --night-mauve: #8D5A72;
  --sans: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Nunito Sans", "Avenir Next", system-ui, sans-serif;
  --accent: "Cormorant Garamond", "Lora", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--petal-cream);
  background:
    radial-gradient(circle at 12% 8%, rgba(141, 90, 114, .38), transparent 30vw),
    radial-gradient(circle at 88% 42%, rgba(90, 16, 34, .72), transparent 34vw),
    linear-gradient(135deg, var(--oxheart-ink), var(--lacquer-burgundy) 48%, var(--oxheart-ink));
  font-family: var(--body);
  overflow-x: hidden;
}

button { font: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  opacity: .18;
  background-image: radial-gradient(rgba(247, 232, 216, .16) 1px, transparent 1px);
  background-size: 4px 4px;
  mix-blend-mode: soft-light;
}

.cursor-petal {
  position: fixed;
  width: 18px;
  height: 28px;
  left: 0;
  top: 0;
  border-radius: 80% 20% 70% 30%;
  background: rgba(223, 161, 167, .42);
  border: 1px solid rgba(247, 232, 216, .28);
  filter: blur(.2px);
  pointer-events: none;
  z-index: 12;
  transform: translate3d(-40px, -40px, 0) rotate(20deg);
}

.diary { position: relative; z-index: 1; }

.scene {
  position: relative;
  min-height: 100vh;
  padding: clamp(28px, 5vw, 72px);
  overflow: hidden;
  perspective: 1100px;
  transform-style: preserve-3d;
  isolation: isolate;
}

.scene::after {
  content: attr(data-scene);
  position: absolute;
  right: clamp(24px, 5vw, 72px);
  bottom: clamp(20px, 4vw, 56px);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(247, 232, 216, .32);
}

.vine-progress {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .9;
}

.vine-progress svg { width: 100%; height: 100%; }

.vine-shadow, .vine-line {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vine-shadow { stroke: rgba(38, 7, 17, .48); stroke-width: 5; }
.vine-line {
  stroke: var(--stem-sage);
  stroke-width: 2.4;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  filter: drop-shadow(0 0 10px rgba(119, 139, 98, .28));
}

.wordmark {
  position: absolute;
  left: clamp(24px, 6vw, 82px);
  top: clamp(18px, 5vw, 68px);
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(72px, 17vw, 230px);
  line-height: .76;
  letter-spacing: -.08em;
  color: var(--petal-cream);
  text-shadow: 0 24px 70px rgba(38, 7, 17, .65);
}

.corner-mark, .caption, .label, .side-whisper {
  font-family: var(--accent);
  font-style: italic;
  color: var(--pollen-amber);
}

.corner-mark {
  position: absolute;
  left: clamp(30px, 4vw, 56px);
  top: 24px;
  font-size: 15px;
  opacity: .78;
}

.diagonal-caption {
  position: absolute;
  top: 23vh;
  right: 8vw;
  max-width: 230px;
  font-size: clamp(24px, 3vw, 46px);
  line-height: .95;
  transform: rotate(-8deg);
}

.blob {
  position: absolute;
  width: clamp(220px, 32vw, 520px);
  aspect-ratio: 1.15;
  border: 1px solid rgba(247, 232, 216, .13);
  background:
    radial-gradient(circle at 35% 28%, rgba(247, 232, 216, .30), transparent 18%),
    radial-gradient(circle at 65% 70%, rgba(242, 185, 94, .16), transparent 22%),
    rgba(223, 161, 167, .34);
  filter: blur(.2px) saturate(105%);
  box-shadow: inset 0 0 80px rgba(141, 90, 114, .38), 0 36px 90px rgba(38, 7, 17, .34);
  animation: membrane 10s ease-in-out infinite alternate;
  z-index: -1;
}

.blob-one { left: 15vw; top: 8vh; border-radius: 62% 38% 54% 46% / 42% 58% 38% 62%; }
.blob-two { right: 4vw; top: 12vh; width: clamp(260px, 36vw, 560px); border-radius: 38% 62% 48% 52% / 60% 30% 70% 40%; animation-delay: -3s; }
.blob-three { left: 6vw; bottom: 9vh; border-radius: 58% 42% 28% 72% / 44% 46% 54% 56%; animation-delay: -6s; }

@keyframes membrane {
  0% { border-radius: 62% 38% 54% 46% / 42% 58% 38% 62%; transform: translate3d(0,0,-30px) rotate(-4deg) scale(1); }
  100% { border-radius: 37% 63% 34% 66% / 62% 35% 65% 38%; transform: translate3d(10px,-18px,-30px) rotate(5deg) scale(1.04); }
}

.vellum, .herbarium-card, .after-card {
  background: linear-gradient(145deg, rgba(247, 232, 216, .94), rgba(247, 232, 216, .74));
  color: var(--oxheart-ink);
  border: 1px solid rgba(247, 232, 216, .55);
  box-shadow: 0 28px 70px rgba(38, 7, 17, .38), inset 0 0 35px rgba(223, 161, 167, .18);
  transform-style: preserve-3d;
}

.specimen-note {
  position: absolute;
  width: min(320px, 68vw);
  left: 8vw;
  bottom: 11vh;
  padding: 32px 34px;
  transform: rotate(-4deg);
}

.specimen-note p { margin: 0; font-size: 18px; line-height: 1.55; }
.pin {
  position: absolute;
  right: 22px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pollen-amber);
  box-shadow: 0 0 0 7px rgba(242, 185, 94, .16);
}

.seed-cluster { position: absolute; display: grid; gap: 14px; transform: rotate(18deg); }
.seed-cluster i, .pollen-map i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pollen-amber);
  box-shadow: 0 0 14px rgba(242, 185, 94, .7);
}
.upper-right { right: 15vw; top: 12vh; }
.lower-right { right: 16vw; bottom: 17vh; }

.glass-pane {
  position: absolute;
  left: 10vw;
  top: 12vh;
  width: 34vw;
  min-width: 280px;
  height: 62vh;
  border: 1px solid rgba(247, 232, 216, .20);
  background: linear-gradient(115deg, rgba(247, 232, 216, .12), rgba(141, 90, 114, .18), rgba(38, 7, 17, .04));
  box-shadow: inset 0 0 70px rgba(247, 232, 216, .04), 0 30px 90px rgba(38, 7, 17, .34);
  transform: rotateY(-10deg) rotateZ(4deg);
}

.scene-title { position: absolute; font-family: var(--sans); max-width: 430px; }
.scene-title span {
  display: block;
  font-size: clamp(48px, 8vw, 116px);
  line-height: .82;
  letter-spacing: -.06em;
}
.scene-title em {
  display: block;
  margin-top: 18px;
  font-family: var(--accent);
  font-size: clamp(24px, 3vw, 42px);
  color: var(--blush-membrane);
}
.upper-right-title { right: 8vw; top: 16vh; text-align: right; }
.lower-left-title { left: 7vw; bottom: 15vh; }
.margin-note {
  position: absolute;
  left: 8vw;
  bottom: 16vh;
  font-size: clamp(28px, 5vw, 64px);
  font-family: var(--accent);
  color: var(--pollen-amber);
  transform: rotate(3deg);
}

.botanical-line { position: absolute; right: 20vw; bottom: 15vh; width: 150px; height: 150px; }
.botanical-line span {
  position: absolute;
  left: 50%; top: 50%;
  width: 72px; height: 28px;
  border: 1px solid var(--stem-sage);
  border-radius: 80% 20% 80% 20%;
  transform-origin: left center;
}
.botanical-line span:nth-child(1) { transform: rotate(10deg); }
.botanical-line span:nth-child(2) { transform: rotate(92deg); }
.botanical-line span:nth-child(3) { transform: rotate(177deg); }
.botanical-line span:nth-child(4) { transform: rotate(262deg); }
.botanical-line b { position: absolute; left: 49%; top: 49%; width: 9px; height: 9px; border-radius: 50%; background: var(--pollen-amber); }

.herbarium-card {
  position: absolute;
  right: 12vw;
  top: 14vh;
  width: min(480px, 78vw);
  min-height: 470px;
  padding: 50px 48px;
  transform: rotate(5deg);
}
.fold {
  position: absolute;
  right: 0; top: 0;
  border-left: 42px solid rgba(223, 161, 167, .45);
  border-bottom: 42px solid transparent;
}
.herbarium-card h2 { margin: 26px 0 20px; font-family: var(--sans); font-size: clamp(42px, 6vw, 78px); line-height: .88; letter-spacing: -.055em; }
.herbarium-card p { font-size: 18px; line-height: 1.65; }
.pressed-petal { position: absolute; left: 52px; bottom: 48px; width: 160px; height: 120px; }
.pressed-petal i {
  position: absolute;
  width: 86px; height: 34px;
  border-radius: 80% 20% 65% 35%;
  background: rgba(223, 161, 167, .58);
  border: 1px solid rgba(90, 16, 34, .22);
}
.pressed-petal i:nth-child(1) { transform: rotate(-24deg); left: 0; top: 22px; }
.pressed-petal i:nth-child(2) { transform: rotate(38deg); left: 50px; top: 40px; }
.pressed-petal i:nth-child(3) { transform: rotate(92deg); left: 44px; top: -8px; }
.side-whisper { position: absolute; left: 10vw; bottom: 18vh; font-size: clamp(34px, 7vw, 108px); opacity: .72; }
.pollen-map { position: absolute; left: 18vw; top: 24vh; display: grid; grid-template-columns: repeat(3, 30px); gap: 28px 44px; opacity: .85; }

.bloom-diagram {
  position: absolute;
  right: 12vw;
  top: 13vh;
  width: min(430px, 74vw);
  aspect-ratio: 1;
  transform: rotate(-9deg);
  animation: reconsider 18s linear infinite;
}
@keyframes reconsider { to { rotate: 360deg; } }
.petal {
  position: absolute;
  left: 50%; top: 50%;
  width: 48%; height: 18%;
  transform-origin: 0 50%;
  border: 1.5px solid var(--stem-sage);
  border-radius: 88% 12% 72% 28%;
  background: linear-gradient(90deg, rgba(223, 161, 167, .18), transparent);
}
.p1 { transform: rotate(0deg); } .p2 { transform: rotate(72deg); } .p3 { transform: rotate(144deg); } .p4 { transform: rotate(216deg); } .p5 { transform: rotate(288deg); }
.core { position: absolute; inset: 46%; border-radius: 50%; background: var(--pollen-amber); box-shadow: 0 0 35px rgba(242, 185, 94, .65); }
.specimen-tabs { position: absolute; right: 12vw; bottom: 16vh; display: flex; gap: 12px; flex-wrap: wrap; }
.specimen-tabs button {
  border: 1px solid rgba(247, 232, 216, .26);
  color: var(--petal-cream);
  background: rgba(90, 16, 34, .42);
  padding: 12px 18px;
  border-radius: 2px 18px 2px 18px;
  cursor: pointer;
  transition: transform .3s ease, background .3s ease, color .3s ease;
}
.specimen-tabs button:hover, .specimen-tabs button.active { background: var(--stem-sage); color: var(--oxheart-ink); transform: translateY(-4px) rotate(-2deg); }
.tab-reply { position: absolute; right: 14vw; bottom: 8vh; font-family: var(--accent); color: var(--pollen-amber); font-size: 32px; transition: opacity .25s ease, transform .25s ease; }
.tab-reply.fade { opacity: 0; transform: translateY(12px); }

.afterimage { background: radial-gradient(circle at 70% 70%, rgba(247, 232, 216, .08), transparent 28vw); }
.after-card {
  position: absolute;
  right: 11vw;
  bottom: 13vh;
  width: min(520px, 80vw);
  padding: 44px 46px;
  transform: rotate(-3deg);
  text-align: right;
}
.after-card h2 { margin: 8px 0 0; font-family: var(--sans); font-size: clamp(56px, 9vw, 130px); line-height: .8; letter-spacing: -.07em; color: var(--oxheart-ink); text-shadow: 0 0 28px rgba(90, 16, 34, .18); }
.single-blossom { width: 92px; height: 92px; margin-left: auto; border: 1px solid var(--stem-sage); border-radius: 70% 30% 62% 38%; background: rgba(223, 161, 167, .42); transform: rotate(22deg); }
.closing-note { position: absolute; left: 9vw; top: 28vh; max-width: 300px; font-family: var(--accent); font-size: clamp(34px, 5vw, 72px); line-height: .95; color: var(--pollen-amber); }

.tilt-layer { will-change: transform; transition: transform .18s ease-out; }

@media (max-width: 760px) {
  .scene { padding: 28px; }
  .wordmark { top: 9vh; }
  .diagonal-caption, .upper-right-title, .herbarium-card, .bloom-diagram, .after-card { right: 28px; }
  .specimen-note, .margin-note, .side-whisper, .lower-left-title, .closing-note { left: 28px; }
  .glass-pane { left: 28px; width: 70vw; }
  .specimen-tabs { left: 28px; right: auto; bottom: 10vh; }
  .tab-reply { left: 32px; right: auto; bottom: 4vh; }
}
