:root {
  /* Compliance tokens from generated typography parser: Interactions:** IntersectionObserver` with `threshold: 0.3` */
  --canvas: #f5efe6;
  --rose: #c4887a;
  --amber: #d4a574;
  --mauve: #a8829a;
  --sepia: #3d3530;
  --fog: #b8ada3;
  --honey: #e8c98a;
  --umber: #2a2420;
  --scroll-pct: 0%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--sepia);
  background: var(--canvas);
  font-family: "Quicksand", "Inter", sans-serif;
  overflow-x: hidden;
}

.ambient-gradient {
  position: fixed;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(circle at 18% 22%, rgba(232, 201, 138, 0.32), transparent 34%),
    radial-gradient(circle at 78% 62%, rgba(196, 136, 122, 0.22), transparent 38%),
    linear-gradient(135deg, #f5efe6 0%, color-mix(in oklch, #f5efe6, #d4a574 var(--scroll-pct)) 48%, color-mix(in oklch, #f5efe6, #a8829a calc(var(--scroll-pct) * .62)) 100%);
  transition: background 0.8s ease;
}

#dustCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 4;
  pointer-events: none;
  opacity: 0.82;
}

.dream-stage {
  position: relative;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.depth-layer {
  transform-style: preserve-3d;
  will-change: transform;
}

.background-plane {
  position: fixed;
  inset: -10vh -8vw;
  z-index: -3;
  transform: translateZ(-200px) scale(1.16);
  pointer-events: none;
}

.paper-noise {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(61, 53, 48, 0.38) 1px, transparent 0),
    radial-gradient(circle at 3px 5px, rgba(168, 130, 154, 0.18) 1px, transparent 0);
  background-size: 7px 7px, 11px 11px;
}

.far-smudge {
  position: absolute;
  border-radius: 999px;
  filter: blur(26px);
  opacity: 0.28;
  mix-blend-mode: multiply;
}

.smudge-one { width: 34vw; height: 22vw; left: 4vw; top: 42vh; background: #e8c98a; }
.smudge-two { width: 26vw; height: 30vw; right: 7vw; top: 128vh; background: #c4887a; }
.smudge-three { width: 44vw; height: 24vw; left: 26vw; top: 330vh; background: #a8829a; opacity: 0.16; }

.spread {
  position: relative;
  min-height: 108vh;
  padding: 9vh 7vw;
  transform-style: preserve-3d;
}

.midground-plane {
  position: relative;
  z-index: 2;
  transform: translateZ(0);
}

.foreground-plane {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  transform: translateZ(100px) scale(0.92);
}

.logotype {
  margin: 0 0 8vh 1vw;
  color: #c4887a;
  font-family: "Nunito", "Inter", sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  transform: rotate(-1.5deg);
  text-shadow: 1px 2px 0 rgba(232, 201, 138, 0.45);
}

.text-card {
  position: relative;
  max-width: 680px;
  padding: clamp(1.6rem, 4vw, 3.1rem);
  border-radius: 28px;
  background: rgba(245, 239, 230, 0.62);
  backdrop-filter: blur(2px);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), background 0.6s ease;
}

.text-card:hover {
  transform: scale(1.025) rotate(-0.2deg);
  background: rgba(245, 239, 230, 0.78);
  transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}

.text-card h1,
.text-card h2 {
  margin: 0 0 1rem;
  color: #3d3530;
  font-family: "Nunito", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.text-card h1 { font-size: clamp(3rem, 8vw, 6.3rem); }
.text-card h2 { font-size: clamp(2.15rem, 5.4vw, 4.6rem); }

.text-card p {
  margin: 0;
  max-width: 58ch;
  color: #3d3530;
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.handwritten {
  display: inline-block;
  color: #d4a574;
  font-family: "Caveat", cursive;
  font-size: 1.2em;
  font-weight: 700;
  transform: rotate(-2deg) translateY(-0.04em);
  text-shadow: none;
}

.wobbly-border {
  position: absolute;
  inset: -9px;
  width: calc(100% + 18px);
  height: calc(100% + 18px);
  overflow: visible;
  pointer-events: none;
}

.wobbly-border path,
.drawn-mark path,
.crosshatch path,
.doodle path {
  fill: none;
  stroke: #3d3530;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.wobbly-border path {
  stroke-width: 1.5px;
  stroke-dasharray: 7 5;
  transition: stroke-width 0.4s ease, stroke 0.4s ease;
}

.hand-border:hover .wobbly-border path { stroke-width: 2.5px; stroke: #2a2420; }

.intro-card { margin-left: 8%; }
.offset-left { margin-left: 5%; margin-top: 12vh; }
.offset-right { margin-left: auto; margin-right: 8%; margin-top: 18vh; }
.center-card { margin: 15vh auto 0; }
.warm-card { background: rgba(232, 201, 138, 0.16); }
.narrow-card { max-width: 560px; }
.final-card { margin: 18vh auto 0; text-align: center; }
.final-card p { margin-left: auto; margin-right: auto; }

.grid-spread {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2vw;
}

.grid-spread .text-card { grid-column: span 6; }

.photo-scatter {
  position: relative;
  width: var(--photo-w);
  height: var(--photo-h);
  transform: rotate(var(--rotate));
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), filter 0.6s ease;
  filter: sepia(20%) saturate(85%) contrast(90%);
}

.photo-scatter:hover {
  transform: scale(1.04) rotate(0deg);
  transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}

.vintage-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 6px solid #f5efe6;
  border-bottom-width: 34px;
  background:
    radial-gradient(circle at 25% 20%, rgba(245, 239, 230, 0.18), transparent 18%),
    radial-gradient(circle at 75% 68%, rgba(61, 53, 48, 0.2), transparent 22%),
    linear-gradient(135deg, #d4a574 0%, #c4887a 100%);
  box-shadow: inset 0 0 60px rgba(61, 53, 48, 0.3), 2px 3px 12px rgba(42, 36, 32, 0.15);
}

.vintage-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle at 1px 1px, rgba(245, 239, 230, 0.45) 1px, transparent 0), radial-gradient(circle at 2px 2px, rgba(42, 36, 32, 0.28) 1px, transparent 0);
  background-size: 3px 3px, 5px 5px;
}

.vintage-photo::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 40% 52% 44% 56%;
  background: rgba(232, 201, 138, 0.2);
  box-shadow: 0 0 35px rgba(245, 239, 230, 0.22);
}

.vintage-photo span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -29px;
  z-index: 2;
  color: #3d3530;
  font-family: "Caveat", cursive;
  font-size: 19px;
  text-align: center;
}

.first-photo { margin: -11vh 7vw 0 auto; }
.photo-two { grid-column: 8 / span 4; margin-top: 2vh; }
.photo-three { grid-column: 6 / span 3; margin-top: -7vh; }
.photo-four { grid-column: 2 / span 5; margin-top: 10vh; }
.photo-five { grid-column: 8 / span 4; margin-top: 8vh; }

.margin-note,
.tiny-caption,
.end-mark {
  color: #d4a574;
  font-family: "Caveat", cursive;
  font-size: clamp(1.15rem, 2.2vw, 1.8rem);
  line-height: 1.05;
}

.note-one { position: absolute; top: 31vh; right: 12vw; width: 210px; transform: rotate(5deg); }
.note-two { position: absolute; top: 54vh; left: 63vw; width: 250px; color: #a8829a; transform: rotate(-4deg); }
.note-four { position: absolute; top: 28vh; left: 10vw; width: 220px; transform: rotate(-6deg); }
.caption-three { margin: 3vh auto 0; max-width: 300px; transform: rotate(2deg); text-align: center; color: #a8829a; }
.end-mark { margin-top: 4vh; text-align: center; color: #c4887a; transform: rotate(-1deg); }

.drawn-mark,
.crosshatch,
.doodle {
  position: absolute;
  overflow: visible;
}

.drawn-mark path { stroke-width: 1.5px; stroke-dasharray: 6 4; }
.crosshatch path { stroke: #b8ada3; stroke-width: 0.8px; }
.doodle path { stroke: #a8829a; stroke-width: 1.6px; }

.arrow-one { width: 260px; height: 150px; top: 36vh; right: 22vw; }
.arrow-two { width: 320px; height: 170px; top: 32vh; left: 25vw; }
.loop-line { width: 420px; height: 180px; left: 10vw; top: 22vh; opacity: 0.8; }
.hatch-one { width: 120px; height: 90px; top: 18vh; left: 9vw; }
.hatch-two { width: 160px; height: 110px; top: 17vh; right: 11vw; }
.star-one { width: 80px; height: 80px; left: 58vw; top: 20vh; }
.circles { width: 150px; height: 90px; right: 12vw; bottom: 20vh; }
.wavy { width: 260px; height: 70px; left: 42vw; bottom: 18vh; }
.final-star { width: 100px; height: 100px; left: 17vw; top: 24vh; }

.drawn-mark path,
.crosshatch path,
.doodle path,
.wobbly-border path {
  opacity: 0;
  stroke-dashoffset: var(--dash, 500);
}

.in-view .drawn-mark path,
.in-view .crosshatch path,
.in-view .doodle path,
.in-view .wobbly-border path {
  animation: drawIn 1.7s ease-out forwards;
}

.in-view .doodle { animation: doodlePulse 4.5s ease-in-out 1.7s infinite; }

@keyframes drawIn {
  0% { opacity: 0; stroke-dashoffset: var(--dash, 500); }
  18% { opacity: 1; }
  100% { opacity: 1; stroke-dashoffset: 0; }
}

@keyframes doodlePulse {
  0%, 100% { opacity: 0.38; transform: translateY(0) rotate(0deg); }
  50% { opacity: 0.72; transform: translateY(-7px) rotate(2deg); }
}

.spread-dots {
  position: fixed;
  right: 22px;
  top: 50%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transform: translateY(-50%);
}

.dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid #b8ada3;
  border-radius: 999px;
  background: rgba(245, 239, 230, 0.5);
  box-shadow: 0 0 0 0 rgba(232, 201, 138, 0);
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), background 0.6s ease, box-shadow 0.6s ease;
}

.dot.active {
  background: #c4887a;
  border-color: #c4887a;
  transform: scale(1.55);
  box-shadow: 0 0 0 6px rgba(232, 201, 138, 0.2);
}

@media (max-width: 820px) {
  .spread { padding: 8vh 6vw; min-height: 112vh; }
  .intro-card,
  .offset-left,
  .offset-right,
  .center-card,
  .final-card { margin-left: 0; margin-right: 0; }
  .grid-spread { display: block; }
  .photo-scatter { width: min(var(--photo-w), 72vw); height: calc(min(var(--photo-w), 72vw) * .75); margin: 5vh auto 0; }
  .photo-two,
  .photo-three,
  .photo-four,
  .photo-five,
  .first-photo { margin: 5vh auto 0; }
  .foreground-plane { opacity: 0.72; }
  .note-one,
  .note-two,
  .note-four { display: none; }
  .spread-dots { right: 10px; }
}
