@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@300;400&family=Manrope:wght@300;400;500&family=Playfair+Display:ital,wght@1,500&display=swap');

:root {
  color-scheme: dark;
  --ink: #eef2df;
  --muted: #9aab9f;
  --acid: #d8e58b;
  --glass: rgba(5, 22, 20, .62);
  --line: rgba(218, 236, 202, .2);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #061210; }
body { color: var(--ink); font-family: Manrope, sans-serif; }
button { color: inherit; font: inherit; }
#scene, #scene canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#scene::after {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 55% 45%, transparent 25%, rgba(2, 9, 8, .2) 58%, rgba(2, 8, 7, .72) 100%);
}

.masthead { position: fixed; z-index: 3; top: 28px; left: 34px; right: 34px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 13px; }
.eyebrow, .counter, .chapter, .hint, .sound { font-family: "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow, .counter { margin: 0; font-size: 10px; }
.counter { color: var(--muted); }
.counter span { color: var(--acid); }

.story { position: fixed; z-index: 3; left: clamp(28px, 5vw, 76px); top: 50%; width: min(540px, 44vw); transform: translateY(-48%); pointer-events: none; }
.chapter { color: var(--acid); font-size: 10px; margin: 0 0 22px; }
h1 { margin: 0; font-weight: 300; font-size: clamp(52px, 7.8vw, 112px); line-height: .84; letter-spacing: -.065em; }
h1 em { color: var(--acid); font-family: "Playfair Display", serif; font-weight: 500; }
.lede { width: min(410px, 100%); margin: 29px 0 28px; color: #b7c2b8; font-size: 13px; line-height: 1.65; }
.actions { display: flex; gap: 10px; pointer-events: auto; }
.actions button { border-radius: 999px; padding: 12px 19px; border: 1px solid var(--line); cursor: pointer; font-size: 11px; transition: .25s ease; }
.primary { color: #07110f; background: var(--acid); border-color: var(--acid) !important; }
.secondary { background: var(--glass); backdrop-filter: blur(12px); }
.actions button:hover { transform: translateY(-2px); filter: brightness(1.12); }

.memories { position: fixed; z-index: 3; right: 34px; top: 50%; width: 184px; transform: translateY(-50%); display: grid; gap: 9px; }
.memories > p:first-child { margin: 0 0 3px; color: var(--acid); font: 9px "DM Mono", monospace; letter-spacing: .12em; }
.memories button { width: 184px; min-height: 54px; padding: 10px 13px; display: grid; grid-template-columns: 26px 1fr; text-align: left; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); cursor: pointer; font-size: 11px; transition: .25s ease; }
.memories button span { color: var(--acid); font-family: "DM Mono", monospace; margin-right: 10px; }
.memories button strong { font-weight: 500; }
.memories button small { grid-column: 2; margin-top: 3px; color: var(--muted); font-size: 9px; }
.memories button:hover { transform: translateX(-3px); border-color: rgba(216, 229, 139, .58); }
.memories button.active { border-color: var(--acid); background: rgba(176, 199, 99, .16); box-shadow: 0 0 28px rgba(216, 229, 139, .12); }
#memory-description { min-height: 45px; margin: 5px 2px 0; color: #b7c2b8; font-size: 10px; line-height: 1.5; }
.actions button.active { border-color: #ffc56c; box-shadow: 0 0 30px rgba(255, 165, 64, .32); color: #fff0c7; }

.hint { position: fixed; z-index: 3; left: 34px; bottom: 27px; color: var(--muted); font-size: 9px; }
.sound { position: fixed; z-index: 3; right: 34px; bottom: 23px; border: 1px solid var(--line); background: var(--glass); padding: 8px 10px; font-size: 9px; cursor: pointer; }
#status { position: fixed; z-index: 4; left: 50%; bottom: 50px; transform: translateX(-50%); opacity: 0; background: rgba(3, 12, 11, .85); border: 1px solid var(--line); padding: 9px 13px; font-size: 11px; transition: opacity .25s ease; }
#status.show { opacity: 1; }

body.entered .story { opacity: .35; transform: translateY(-48%) scale(.98); transition: .8s ease; }
body.entered .story:hover { opacity: 1; }

@media (max-width: 760px) {
  .masthead { top: 20px; left: 20px; right: 20px; }
  .counter { display: none; }
  .story { left: 20px; top: auto; bottom: 118px; width: calc(100% - 40px); transform: none; }
  h1 { font-size: clamp(50px, 15vw, 76px); }
  .lede { margin: 20px 0; max-width: 350px; }
  .memories { left: 20px; right: 20px; top: auto; bottom: 62px; width: auto; transform: none; display: flex; }
  .memories button { flex: 1; width: auto; padding: 10px 7px; }
  .memories button span { display: none; }
  .memories > p { display: none; }
  .hint { display: none; }
  .sound { right: 20px; bottom: 20px; }
}
