:root {
  --aqua: #7FE7F2;
  --dew: #C9F7FF;
  --leaf: #A8F06A;
  --sakura: #FFB8D7;
  --cream: #FFF6C8;
  --teal: #083B4A;
  --white: #F8FFFF;
  --chrome: #7E93A1;
  --px: 0px;
  --py: 0px;
  --scene: 0;
  --design-font-token: "Grotes*";
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 500vh;
  color: var(--teal);
  background: var(--dew);
  font-family: "Nunito Sans", ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.lens-diary {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at calc(42% + var(--px) * .06) calc(30% + var(--py) * .04), rgba(255, 246, 200, .95), transparent 18%),
    radial-gradient(circle at calc(70% - var(--px) * .05) calc(74% - var(--py) * .04), rgba(255, 184, 215, .62), transparent 24%),
    linear-gradient(135deg, var(--dew), var(--aqua) 45%, var(--cream) 80%);
}

.weather-backdrop {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 18% 84%, rgba(168, 240, 106, .45), transparent 18%),
    radial-gradient(circle at 78% 18%, rgba(248, 255, 255, .9), transparent 15%),
    conic-gradient(from 160deg at 52% 54%, rgba(127, 231, 242, .5), rgba(255, 184, 215, .34), rgba(255, 246, 200, .5), rgba(201, 247, 255, .55));
  filter: blur(12px) saturate(1.18);
  transform: translate(calc(var(--px) * -0.018), calc(var(--py) * -0.018)) scale(1.05);
  transition: filter 700ms ease;
}

.mist-field {
  position: absolute;
  inset: 0;
  opacity: calc(.82 - var(--scene) * .12);
  background-image:
    radial-gradient(circle at 20% 22%, rgba(248, 255, 255, .8) 0 1px, transparent 3px),
    radial-gradient(circle at 65% 40%, rgba(248, 255, 255, .65) 0 2px, transparent 5px),
    radial-gradient(circle at 34% 72%, rgba(248, 255, 255, .5) 0 1px, transparent 4px),
    linear-gradient(110deg, rgba(248, 255, 255, .46), transparent 38%, rgba(248, 255, 255, .28));
  background-size: 80px 80px, 130px 130px, 100px 100px, 100% 100%;
  backdrop-filter: blur(12px);
  pointer-events: none;
  z-index: 8;
}

.scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translate3d(0, 36px, 0) scale(.985);
  filter: blur(16px);
  transition: opacity 850ms ease, transform 950ms cubic-bezier(.2, .9, .1, 1), filter 850ms ease;
  pointer-events: none;
}

.scene.active {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
  pointer-events: auto;
}

.scene::before,
.scene::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(248, 255, 255, .62);
  box-shadow: inset 0 0 30px rgba(248, 255, 255, .45), 0 18px 40px rgba(8, 59, 74, .08);
}

.scene::before { width: 24vmin; height: 24vmin; left: 10%; bottom: 10%; }
.scene::after { width: 13vmin; height: 13vmin; right: 12%; top: 14%; }

.scene-dew { background: radial-gradient(circle at 50% 50%, rgba(248,255,255,.5), transparent 30%); }
.scene-puddle { background: radial-gradient(ellipse at 54% 62%, rgba(8, 59, 74, .22), transparent 38%); }
.scene-petal { background: radial-gradient(circle at 66% 35%, rgba(255, 184, 215, .48), transparent 30%); }
.scene-roll { background: radial-gradient(circle at 48% 46%, rgba(127, 231, 242, .45), transparent 34%); }
.scene-flare { background: radial-gradient(circle at 50% 46%, rgba(255, 246, 200, .9), transparent 42%); }

.scene-copy {
  position: absolute;
  max-width: min(440px, 40vw);
  padding: 22px 24px 24px;
  border-radius: 30px;
  color: var(--teal);
  background: linear-gradient(145deg, rgba(248, 255, 255, .68), rgba(201, 247, 255, .34));
  border: 1px solid rgba(248, 255, 255, .78);
  box-shadow: inset 0 1px 0 rgba(248, 255, 255, .88), 0 22px 60px rgba(8, 59, 74, .12);
  backdrop-filter: blur(18px) saturate(1.2);
}

.sticker-left { left: 7vw; top: 18vh; transform: rotate(-4deg); }
.sticker-right { right: 7vw; top: 18vh; transform: rotate(4deg); }
.sticker-left.lower { top: auto; bottom: 13vh; }
.sticker-right.lower { top: auto; bottom: 12vh; }
.sticker-center { left: 50%; top: 16vh; transform: translateX(-50%) rotate(-1deg); text-align: center; }

h1, h2, .final-wordmark {
  margin: 8px 0 10px;
  font-family: "Zen Maru Gothic", "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .95;
}

h1 { font-size: clamp(3.7rem, 8vw, 8.8rem); color: rgba(8, 59, 74, .76); filter: blur(1.5px); }
h2 { font-size: clamp(2.15rem, 4.6vw, 5.2rem); }
p { margin: 0; font-size: clamp(1rem, 1.25vw, 1.22rem); line-height: 1.55; }

.frame-number,
.caption-tab,
.exposure-readout,
.camera-control {
  font-family: "Grotes*", "Grotesk**", "Space Grotesk", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}

.frame-number { color: var(--chrome); }
.poem-line {
  position: absolute;
  left: 11vw;
  bottom: 7vh;
  font-family: "Noto Serif JP", Georgia, serif;
  color: rgba(8, 59, 74, .56);
  letter-spacing: .18em;
}

.caption-tab {
  position: absolute;
  right: 13vw;
  bottom: 16vh;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(248, 255, 255, .58);
  border: 1px solid rgba(248, 255, 255, .78);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 34px rgba(8, 59, 74, .1);
}
.caption-tab.tab-left { left: 9vw; right: auto; bottom: 18vh; }

.aperture-shell {
  position: absolute;
  left: calc(28% + var(--scene) * 9.5%);
  top: calc(68% - var(--scene) * 12%);
  width: clamp(310px, 43vmin, 540px);
  height: clamp(310px, 43vmin, 540px);
  transform: translate(-50%, -50%) translate(calc(var(--px) * .012), calc(var(--py) * .012));
  z-index: 12;
  transition: left 900ms cubic-bezier(.2,.9,.1,1), top 900ms cubic-bezier(.2,.9,.1,1), filter 700ms ease;
}

.toy-camera-body {
  position: absolute;
  inset: 12% -18%;
  border-radius: 42% 50% 44% 50% / 48% 40% 50% 44%;
  background: linear-gradient(135deg, rgba(248,255,255,.45), rgba(127,231,242,.28), rgba(255,184,215,.18));
  border: 1px solid rgba(248,255,255,.7);
  box-shadow: inset 0 12px 26px rgba(248,255,255,.72), inset 0 -18px 35px rgba(126,147,161,.15), 0 34px 90px rgba(8,59,74,.14);
  backdrop-filter: blur(18px);
}

.aperture {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at calc(38% + var(--px) * .03) calc(30% + var(--py) * .03), rgba(248,255,255,.95) 0 7%, transparent 18%),
    radial-gradient(circle at calc(65% - var(--px) * .025) calc(68% - var(--py) * .025), rgba(255,184,215,.5), transparent 25%),
    linear-gradient(145deg, rgba(201,247,255,.88), rgba(127,231,242,.74) 44%, rgba(8,59,74,.26));
  border: 13px solid rgba(248,255,255,.68);
  box-shadow: inset 0 0 35px rgba(8,59,74,.16), inset 0 0 85px rgba(248,255,255,.48), 0 0 0 13px rgba(127,231,242,.22), 0 34px 100px rgba(8,59,74,.16);
}

.aperture-reflection {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background:
    repeating-radial-gradient(ellipse at calc(52% + var(--px) * .025) calc(62% + var(--py) * .025), rgba(248,255,255,.38) 0 2px, transparent 3px 16px),
    radial-gradient(ellipse at 50% 70%, rgba(8,59,74,.26), transparent 35%),
    linear-gradient(180deg, rgba(248,255,255,.42), rgba(168,240,106,.18), rgba(255,184,215,.25));
  mix-blend-mode: screen;
  animation: puddle 5s ease-in-out infinite;
}

.lens-rings,
.lens-rings::before,
.lens-rings::after {
  position: absolute;
  content: "";
  inset: 11%;
  border-radius: 50%;
  border: 1px solid rgba(248,255,255,.72);
  box-shadow: inset 0 0 18px rgba(8,59,74,.09);
}
.lens-rings::before { inset: 14%; border-style: dashed; }
.lens-rings::after { inset: 28%; border-color: rgba(255,246,200,.78); }

.iris { position: absolute; inset: 20%; border-radius: 50%; opacity: .28; mix-blend-mode: overlay; }
.iris-one { background: conic-gradient(from 0deg, transparent, rgba(248,255,255,.8), transparent 30%); animation: iris 9s linear infinite; }
.iris-two { background: conic-gradient(from 90deg, transparent, rgba(255,246,200,.7), transparent 34%); animation: iris 11s linear infinite reverse; }
.iris-three { background: conic-gradient(from 200deg, transparent, rgba(168,240,106,.55), transparent 24%); animation: iris 13s linear infinite; }

.dew-sprite {
  position: absolute;
  width: 30px;
  height: 30px;
  left: calc(22% + var(--scene) * 12%);
  top: calc(22% + var(--scene) * 8%);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 24%, var(--white) 0 18%, rgba(201,247,255,.88) 20% 50%, rgba(127,231,242,.48));
  box-shadow: 0 0 22px rgba(248,255,255,.9), 0 0 42px rgba(127,231,242,.58);
  animation: spriteBreath 2.7s ease-in-out infinite;
  transition: left 900ms ease, top 900ms ease, transform 700ms ease;
}
.released .dew-sprite { transform: scale(12); background: radial-gradient(circle, rgba(255,246,200,1), rgba(248,255,255,.7) 35%, transparent 72%); }

.exposure-readout {
  position: absolute;
  left: 50%;
  bottom: -48px;
  transform: translateX(-50%);
  padding: 11px 16px;
  border-radius: 999px;
  color: rgba(8,59,74,.72);
  background: rgba(248,255,255,.54);
  border: 1px solid rgba(248,255,255,.72);
  backdrop-filter: blur(10px);
}

.chrome-screw { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 28%, var(--white), var(--chrome)); box-shadow: inset 0 -2px 5px rgba(8,59,74,.22); }
.screw-a { left: 14%; top: 22%; }
.screw-b { right: 15%; bottom: 21%; }
.gel-tab { position: absolute; right: 17%; top: 15%; width: 72px; height: 24px; border-radius: 999px; background: rgba(168,240,106,.45); border: 1px solid rgba(248,255,255,.65); }

.focus-rail {
  position: absolute;
  left: 20%;
  top: 72%;
  width: 62%;
  height: 1px;
  z-index: 20;
  transform: rotate(-35deg);
  background: linear-gradient(90deg, transparent, rgba(248,255,255,.8), transparent);
}
.rail-dot { position: absolute; top: -7px; width: 15px; height: 15px; border-radius: 50%; background: rgba(248,255,255,.72); border: 1px solid rgba(8,59,74,.14); box-shadow: 0 0 18px rgba(127,231,242,.65); }
.rail-dot:nth-child(1) { left: 0%; } .rail-dot:nth-child(2) { left: 25%; } .rail-dot:nth-child(3) { left: 50%; } .rail-dot:nth-child(4) { left: 75%; } .rail-dot:nth-child(5) { left: 100%; }
.rail-dot.active { background: var(--leaf); box-shadow: 0 0 22px rgba(168,240,106,.9), 0 0 45px rgba(248,255,255,.7); }

.film-dots { position: absolute; top: 9vh; bottom: 9vh; width: 20px; z-index: 6; opacity: .55; background: radial-gradient(circle, rgba(248,255,255,.86) 0 5px, transparent 6px) 0 0 / 20px 42px; filter: drop-shadow(0 10px 12px rgba(8,59,74,.08)); }
.film-dots-left { left: 26px; border-radius: 999px; }
.film-dots-right { right: 26px; border-radius: 999px; }

.viewfinder-corner { position: absolute; width: 20vmin; height: 20vmin; border-color: rgba(248,255,255,.7); border-style: solid; filter: drop-shadow(0 12px 22px rgba(8,59,74,.08)); }
.top-left { left: 8vw; top: 9vh; border-width: 4px 0 0 4px; border-radius: 34px 0 0 0; }
.bottom-right { right: 8vw; bottom: 9vh; border-width: 0 4px 4px 0; border-radius: 0 0 34px 0; }

.puddle-rings { position: absolute; left: 16vw; bottom: 13vh; width: 30vmin; height: 14vmin; transform: rotate(-12deg); }
.puddle-rings i { position: absolute; inset: calc(var(--i, 0) * 12px); border: 2px solid rgba(248,255,255,.55); border-radius: 50%; animation: ripple 3.4s ease-in-out infinite; }
.puddle-rings i:nth-child(2) { --i: 1; animation-delay: .4s; } .puddle-rings i:nth-child(3) { --i: 2; animation-delay: .8s; }

.focus-brackets { position: absolute; right: 20vw; top: 24vh; width: 28vmin; height: 28vmin; animation: autofocus 2.4s ease-in-out infinite; }
.focus-brackets b { position: absolute; width: 46px; height: 46px; border-color: var(--leaf); border-style: solid; filter: drop-shadow(0 0 10px rgba(168,240,106,.9)); }
.focus-brackets b:nth-child(1) { left: 0; top: 0; border-width: 4px 0 0 4px; }
.focus-brackets b:nth-child(2) { right: 0; top: 0; border-width: 4px 4px 0 0; }
.focus-brackets b:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 4px 4px; }
.focus-brackets b:nth-child(4) { right: 0; bottom: 0; border-width: 0 4px 4px 0; }

.petals span { position: absolute; width: 34px; height: 54px; border-radius: 70% 30% 70% 30%; background: linear-gradient(135deg, rgba(255,184,215,.8), rgba(248,255,255,.52)); box-shadow: 0 14px 24px rgba(8,59,74,.08); animation: petalDrift 8s ease-in-out infinite; }
.petals span:nth-child(1) { left: 20%; top: 18%; } .petals span:nth-child(2) { left: 68%; top: 22%; animation-delay: -2s; } .petals span:nth-child(3) { left: 80%; top: 70%; animation-delay: -4s; } .petals span:nth-child(4) { left: 32%; top: 76%; animation-delay: -6s; } .petals span:nth-child(5) { left: 52%; top: 12%; animation-delay: -3s; }

.memory-roll { position: absolute; left: 9vw; top: 18vh; width: 28vw; height: 62vh; border-radius: 999px; border: 2px solid rgba(248,255,255,.5); transform: rotate(16deg); background: linear-gradient(180deg, rgba(248,255,255,.32), rgba(127,231,242,.18)); backdrop-filter: blur(10px); }
.memory-roll span { position: absolute; left: 50%; width: 26px; height: 26px; border-radius: 50%; background: rgba(248,255,255,.76); transform: translateX(-50%); box-shadow: 0 0 18px rgba(127,231,242,.5); }
.memory-roll span:nth-child(1) { top: 7%; } .memory-roll span:nth-child(2) { top: 22%; } .memory-roll span:nth-child(3) { top: 37%; } .memory-roll span:nth-child(4) { top: 52%; } .memory-roll span:nth-child(5) { top: 67%; } .memory-roll span:nth-child(6) { top: 82%; }

.final-wordmark { position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); font-size: clamp(4rem, 13vw, 15rem); color: rgba(248,255,255,.78); text-shadow: 0 0 38px rgba(255,246,200,.9), 0 10px 50px rgba(8,59,74,.12); }
.flare-polygons i { position: absolute; clip-path: polygon(50% 0, 62% 36%, 100% 50%, 62% 64%, 50% 100%, 38% 64%, 0 50%, 38% 36%); background: rgba(255,246,200,.62); filter: blur(.3px); animation: glint 4s ease-in-out infinite; }
.flare-polygons i:nth-child(1) { width: 120px; height: 120px; right: 18%; top: 17%; } .flare-polygons i:nth-child(2) { width: 70px; height: 70px; left: 24%; top: 54%; animation-delay: -1.2s; } .flare-polygons i:nth-child(3) { width: 90px; height: 90px; right: 30%; bottom: 18%; animation-delay: -2.4s; }

.camera-control { border: 1px solid rgba(248,255,255,.75); background: linear-gradient(145deg, rgba(248,255,255,.7), rgba(201,247,255,.38)); color: var(--teal); border-radius: 999px; padding: 13px 18px; box-shadow: inset 0 1px 0 rgba(248,255,255,.92), 0 14px 30px rgba(8,59,74,.12); cursor: pointer; }
.wind-control { position: absolute; right: 7vw; bottom: 6vh; z-index: 30; backdrop-filter: blur(12px); }
.camera-control:active { transform: scale(.97); }

.scene-flare .camera-control { margin-top: 18px; }

@keyframes puddle { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(8px) scale(1.04); } }
@keyframes iris { to { transform: rotate(1turn); } }
@keyframes spriteBreath { 0%,100% { filter: blur(0); } 50% { filter: blur(.8px); box-shadow: 0 0 34px rgba(248,255,255,1), 0 0 60px rgba(168,240,106,.55); } }
@keyframes ripple { 0%,100% { transform: scale(.92); opacity: .8; } 50% { transform: scale(1.08); opacity: .35; } }
@keyframes autofocus { 0%,100% { transform: scale(.92); opacity: .6; } 45%,55% { transform: scale(1.05); opacity: 1; } }
@keyframes petalDrift { 0%,100% { transform: translate3d(0,0,0) rotate(12deg); } 50% { transform: translate3d(22px,38px,0) rotate(58deg); } }
@keyframes glint { 0%,100% { transform: scale(.8) rotate(0); opacity: .45; } 50% { transform: scale(1.2) rotate(35deg); opacity: .95; } }

body.awake h1 { filter: blur(0); }
body.awake .mist-field { backdrop-filter: blur(4px); }

@media (max-width: 760px) {
  .scene-copy { max-width: 78vw; }
  .sticker-left, .sticker-right, .sticker-left.lower, .sticker-right.lower { left: 50%; right: auto; top: 8vh; bottom: auto; transform: translateX(-50%) rotate(-2deg); }
  .sticker-center { width: 78vw; }
  .aperture-shell { width: 72vmin; height: 72vmin; left: 50%; top: 59%; }
  .focus-rail { width: 78%; left: 11%; }
  .caption-tab { left: 8vw; right: 8vw; bottom: 8vh; }
  .wind-control { right: 50%; transform: translateX(50%); }
}
