/* Layout: a full-screen 3D night forest you walk into by scrolling, ending at a jar on a fence post.
   Words float over the fog; writing happens on a firefly's back in typewriter ink; the reply types
   straight onto the night. Deliberately single dark theme. */
:root {
  color-scheme: dark;
  --fog: #0a1a28;
  --ink: #e8ecef;
  --ink-soft: #9fb3c2;
  --ink-blue: #f6ecd8;                    /* the ink is warm cream, like the lantern light */
  --ink-bleed: rgba(255, 190, 110, .55);
  --glow: #dcff7a;
  --type-ink: #ece6d6;
  --f-poem: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-type: "Special Elite", "Courier Prime", "Courier New", monospace;
}
html { background: var(--fog); }
body { margin: 0; background: var(--fog); color: var(--ink); font-family: var(--f-poem); -webkit-tap-highlight-color: transparent; }
body.locked { overflow: hidden; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#gl.pointer { cursor: pointer; }
.spacer { height: 760vh; }
[hidden] { display: none !important; }
button { -webkit-tap-highlight-color: transparent; }

/* walk-in words */
.line {
  position: fixed; left: 50%; top: 40%; width: min(30ch, calc(100vw - 32px)); translate: -50% -50%;
  text-align: center; font-weight: 400; font-size: clamp(26px, 3.6vw, 46px); line-height: 1.15; font-style: italic;
  text-wrap: balance; color: var(--ink); text-shadow: 0 0 30px rgba(10,26,40,.9), 0 0 2px rgba(10,26,40,.8);
  opacity: 0; pointer-events: none; margin: 0;
}
.line small { display: block; margin-top: 14px; font-size: .45em; font-style: normal; letter-spacing: .08em; color: var(--ink-soft); }
.cue {
  position: fixed; left: 50%; bottom: max(28px, env(safe-area-inset-bottom, 0px)); translate: -50% 0; margin: 0;
  font: 14px var(--f-type); letter-spacing: .12em; color: var(--ink-soft); text-transform: lowercase; transition: opacity .6s ease;
}
.cue::after { content: ""; display: block; width: 1px; height: 34px; margin: 10px auto 0; background: linear-gradient(var(--ink-soft), transparent); animation: drip 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

.open-jar {
  position: fixed; left: 0; top: 0; translate: -50% 0; margin-top: 18px;
  font: 15px var(--f-type); letter-spacing: .06em; color: var(--ink); background: rgba(10,26,40,.55);
  border: 1px solid rgba(220,255,122,.35); border-radius: 999px; padding: 0 22px; min-height: 44px; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .8s ease;
}
.open-jar.show { opacity: 1; pointer-events: auto; }
.open-jar:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

/* the canvas where the queen's words are made of light */
#lightText { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
