/* Violet Louise: the room. Object positions live in hotspots.css. */

@font-face { font-family: "Hanken"; src: url("assets/hanken.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Reenie"; src: url("assets/reenie.woff2") format("woff2"); font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #07050b;
  --panel: #120d1b;
  --panel-2: #1b1427;
  --line: #33284a;
  --ink: #f0ebf8;
  --ink-2: #b9aecb;
  --violet: #9b72ff;
  --violet-hot: #c3a6ff;
  --note: #e9e2a8;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sans: "Hanken", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Reenie", "Segoe Print", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); }
body { overflow-x: clip; -webkit-tap-highlight-color: transparent; }
a { color: var(--violet-hot); }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 4px; }

/* ---------- the room ---------- */
.js body { overflow: hidden; height: 100dvh; }
.room { position: relative; height: 100dvh; min-height: 420px; overflow: clip; background: radial-gradient(90% 60% at 60% 45%, #2b1a52, var(--bg)); }
#scene { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
#scene:active { cursor: grabbing; }

/* Raw phone photo finish: vignette and grain, no blend modes so it stays cheap over a live canvas. */
.grade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(115% 90% at 50% 46%, transparent 58%, rgba(4, 2, 8, .5)); }
.grade::after {
  content: ""; position: absolute; inset: 0; opacity: .11;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Decorative lights that sit on the 3D objects. The real links are in .objects below. */
.pins { position: absolute; inset: 0; pointer-events: none; overflow: clip; }
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; transition: opacity .25s ease; font-style: normal; }
.pin::before {
  content: ""; position: absolute; width: 9px; height: 9px; margin: -4.5px; border-radius: 50%;
  background: var(--violet-hot); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4), 0 0 12px 3px rgba(155, 114, 255, .9);
  animation: dot 3.2s ease-in-out infinite;
}
.pin:nth-child(2n)::before { animation-delay: -1.1s; }
.pin:nth-child(3n)::before { animation-delay: -2.2s; }
.pin--note::before { background: var(--note); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4), 0 0 12px 3px rgba(233, 226, 168, .85); }
@keyframes dot { 0%, 100% { opacity: .5; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.05); } }
.pin.is-away { opacity: 0; }
.pin.is-hover::before { transform: scale(1.5); opacity: 1; animation: none; }
.pin span {
  position: absolute; left: 0; top: 11px; transform: translate(-50%, 4px);
  padding: 3px 9px; border-radius: 999px; background: rgba(9, 6, 14, .84); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; color: var(--ink);
  transition: opacity .2s ease, transform .2s var(--ease);
}
.pin.is-hover span, .is-intro .pin:not(.is-away) span { opacity: 1; transform: translate(-50%, 0); }

/* ---------- room chrome ---------- */
.hud {
  position: fixed; left: 0; right: 0; top: 0; z-index: 2; pointer-events: none;
  padding: max(14px, env(safe-area-inset-top)) 16px 26px;
  background: linear-gradient(rgba(7, 5, 11, .72), transparent);
}
.hud h1 { margin: 0; font: 400 clamp(38px, 7vmin, 52px)/.9 var(--hand); letter-spacing: .01em; text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }
.hud p { margin: 2px 0 0; font-size: 13px; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .85); }
.mode {
  position: fixed; right: 16px; top: max(16px, env(safe-area-inset-top)); z-index: 2; min-height: 44px; min-width: 64px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(9, 6, 14, .6); color: var(--ink);
  font: 600 13px/1 var(--sans); cursor: pointer; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.mode:hover { background: rgba(40, 28, 64, .8); }
.loading { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); margin: 0; font: 400 28px/1 var(--hand); color: var(--ink-2); white-space: nowrap; }
.loading[hidden] { display: none; }
.hint {
  position: fixed; left: 50%; bottom: calc(66px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; margin: 0;
  padding: 5px 13px; border-radius: 999px; background: rgba(9, 6, 14, .78); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); white-space: nowrap; pointer-events: none; transition: opacity .6s ease;
}
.hint.is-gone { opacity: 0; }
.objects {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); overscroll-behavior-x: contain; scroll-padding: 16px;
  background: linear-gradient(transparent, rgba(7, 5, 11, .7));
}
.objects::-webkit-scrollbar { display: none; }
.obj {
  flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: rgba(13, 9, 21, .74); border: 1px solid rgba(255, 255, 255, .16); color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: background .2s ease, border-color .2s ease;
}
.obj:hover { background: rgba(50, 34, 84, .9); border-color: var(--violet-hot); }
.obj:focus-visible { outline-offset: -3px; }
.obj--note { background: #e9dc62; border-color: #e9dc62; color: #1d1832; border-radius: 3px 3px 12px 3px; font: 400 21px/1 var(--hand); transform: rotate(-1.2deg); }
.obj--note:hover { background: #f4e874; border-color: #f4e874; }
@media (min-width: 900px) { .objects { justify-content: center; } }

.objects, .hint { transition: opacity .3s ease; }
.has-panel .objects, .has-panel .hint, .has-panel .pins { opacity: 0; pointer-events: none; }

/* ---------- panels ---------- */
.panel {
  position: fixed; margin: 0; padding: 0; border: 0; color: var(--ink); background: var(--panel);
  left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-width: 100%;
  max-height: min(66dvh, 640px); border-radius: 18px 18px 0 0; overflow: hidden;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, .55), inset 0 1px 0 #3d2f5c;
  transform: translateY(102%); transition: transform .42s var(--ease);
}
.panel[open] { display: flex; flex-direction: column; }
.panel.is-open { transform: none; }
.panel::backdrop { background: rgba(5, 3, 9, 0); transition: background .35s ease; }
.panel.is-open::backdrop { background: rgba(5, 3, 9, 0); }
.panel__grab { flex: none; width: 42px; height: 22px; margin: 0 auto; position: relative; touch-action: none; cursor: grab; }
.panel__grab::before { content: ""; position: absolute; left: 0; right: 0; top: 9px; height: 4px; border-radius: 4px; background: var(--line); }
.panel__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 2px 16px 12px; border-bottom: 1px solid #241b35; }
.eyebrow { margin: 0; font: 400 21px/1 var(--hand); color: var(--violet-hot); }
.panel h2 { margin: 3px 0 0; font-size: clamp(21px, 5.4vw, 25px); line-height: 1.12; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -2px -8px 0 0; border-radius: 50%; color: var(--ink); }
.close:hover { background: var(--panel-2); }
.close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.panel__body { padding: 14px 16px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.panel__body > :first-child { margin-top: 0; }
.panel p { margin: 0 0 12px; }
.panel h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 600; }
.panel h4 { margin: 7px 0 7px; font-size: 14px; font-weight: 600; }
.fine { font-size: 13px; color: var(--ink-2); margin-top: 12px !important; }
.signoff { font: 400 32px/1 var(--hand); color: var(--violet-hot); margin-top: 16px !important; }

@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .panel {
    left: auto; right: 0; top: 0; bottom: 0; width: 440px; height: 100dvh; max-height: 100dvh; border-radius: 0;
    box-shadow: -24px 0 60px rgba(0, 0, 0, .55), inset 1px 0 0 #3d2f5c;
    transform: translateX(102%);
  }
  .panel::backdrop { display: none; }
  .panel__grab { display: none; }
  .panel__head { padding: 22px 22px 14px; }
  .panel__body { padding: 18px 22px 30px; }
}

/* ---------- panel contents ---------- */
.ph, .ph-tag { border: 1.5px dashed #6c55a3; color: var(--ink-2); background: repeating-linear-gradient(135deg, #1b1427 0 9px, #181223 9px 18px); }
.ph { display: grid; place-items: center; padding: 8px; text-align: center; font-size: 12px; border-radius: 8px; }
.ph-tag { display: inline-block; padding: 0 7px; border-radius: 5px; font-size: 13px; }
.ph--clip { aspect-ratio: 9/14; }
.ph--print { aspect-ratio: 4/5; }
.ph--portrait { aspect-ratio: 5/2; margin-bottom: 14px; }

.clips { display: flex; gap: 12px; margin: 0 -16px; padding: 2px 16px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 16px; overscroll-behavior-x: contain; }
.clip { flex: 0 0 min(52vw, 190px); scroll-snap-align: start; }
.clip h3 { margin: 9px 0 2px; font-size: 15px; }
.clip p { margin: 0; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.clip strong { color: var(--violet-hot); font-size: 16px; }
@media (min-width: 760px) and (min-aspect-ratio: 5/4) {
  .clips { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0 0 8px; overflow: visible; }
}

.prints { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.print .pay { width: 100%; min-height: 44px; font-size: 13px; padding: 6px 8px; }

.pay {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 10px 18px;
  border-radius: 10px; background: var(--violet); color: #12091f; font-weight: 600; text-decoration: none; text-align: center; line-height: 1.2;
  transition: background .2s ease, transform .12s ease;
}
.pay:hover { background: var(--violet-hot); }
.pay:active { transform: scale(.98); }
/* Removed automatically by main.js as soon as a real link is set for this button. */
.pay.is-placeholder { background: repeating-linear-gradient(135deg, #2a1f40 0 9px, #241a38 9px 18px); color: var(--ink); border: 1.5px dashed #8468c6; }
.status { min-height: 0; margin: 10px 0 0 !important; font-size: 13.5px; color: var(--violet-hot); }
.status:empty { display: none; }

.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.amounts .pay { padding: 8px 2px; font-size: 17px; }

.perks { margin: 0 0 16px; padding: 0; list-style: none; }
.perks li { padding: 9px 0 9px 22px; border-bottom: 1px solid #241b35; position: relative; }
.perks li::before { content: ""; position: absolute; left: 3px; top: 1.05em; width: 7px; height: 7px; border-radius: 50%; background: var(--violet); }

.links { margin: 0; padding: 0; list-style: none; }
.links a, .links__todo { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 58px; padding: 8px 2px; border-bottom: 1px solid #241b35; color: var(--ink); text-decoration: none; }
.links a span { color: var(--ink-2); overflow-wrap: anywhere; text-align: right; }
.links a:hover b { color: var(--violet-hot); }

.signup label { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 5px; }
.signup__row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input { flex: 1 1 180px; min-width: 0; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #0b0812; color: var(--ink); font: inherit; font-size: 16px; }
.signup input::placeholder { color: #84799a; }
.signup button { flex: 1 1 auto; min-height: 48px; padding: 0 16px; border: 1px solid #8468c6; border-radius: 10px; background: var(--panel-2); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.signup button:hover { background: #2a1f40; }

.panel--ai h2 { font: 400 42px/.9 var(--hand); letter-spacing: 0; }
.panel--ai { background: #17120f; box-shadow: 0 -18px 50px rgba(0, 0, 0, .55), inset 0 1px 0 #5a5230; }
.panel--ai .eyebrow { color: var(--note); }

/* ---------- no JS: the panels are just the page ---------- */
html:not(.js) body { overflow: auto; }
html:not(.js) .panel { display: block; position: static; transform: none; width: auto; height: auto; max-height: none; border-radius: 0; margin: 0 auto; max-width: 640px; box-shadow: none; border-top: 1px solid var(--line); }
html:not(.js) .panel__body { overflow: visible; }
html:not(.js) .close, html:not(.js) .panel__grab, html:not(.js) .hint, html:not(.js) #scene, html:not(.js) .pins, html:not(.js) .grade, html:not(.js) .loading { display: none; }
html:not(.js) .room { height: auto; min-height: 0; padding: 96px 0 8px; }
html:not(.js) .objects { position: static; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .pin::before { opacity: .9; }
}

/* Live content: photos, prints, clip, signup spam trap (Nov 6) */
.media { display: block; width: 100%; border-radius: 8px; object-fit: cover; background: #120d1c; }
.media--clip { aspect-ratio: 9/14; }
.media--print { aspect-ratio: 4/5; }
.media--portrait { aspect-ratio: 1/1; max-width: 240px; margin: 0 auto 14px; }
.signup__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
