/* SHUMIRA Bespoke v2 · a cinematic walk through the sapphire atelier.
   The 3D room is a fixed canvas; chapters scroll over it, letters rise out of blur. */
body.bespoke {
  --night: #050816;
  --ice: #A9C1F5;
  --glow: #8FB0F0;
  --mist: rgba(226, 232, 246, 0.74);
  background: #050816;
  color: #EEF2FB;
  overflow-x: hidden;
}
body.bespoke.locked { overflow: hidden; height: 100svh; }
body.bespoke.has-cursor, body.bespoke.has-cursor a, body.bespoke.has-cursor button { cursor: none; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.bk-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 80% 75% at 50% 50%, rgba(5, 8, 22, 0) 45%, rgba(5, 8, 22, 0.7) 100%); }
/* film grain */
.bk-grain { position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }

/* custom cursor */
.bk-cursor { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(238, 242, 251, 0.6); border-radius: 50%; opacity: 0; transition: width 0.35s, height 0.35s, margin 0.35s, background 0.35s, opacity 0.4s, border-color 0.35s; }
.bk-cursor span { position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #fff; }
.has-cursor .bk-cursor { opacity: 1; }
.bk-cursor.hot { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(238, 242, 251, 0.08); border-color: #fff; }

/* ---------- loading + entry ---------- */
.bk-intro { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 46px;
  background: radial-gradient(ellipse 60% 55% at 50% 50%, #0F1C46 0%, #040612 78%); transition: opacity 1.6s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 1.6s; }
.bk-intro.gone { opacity: 0; visibility: hidden; }
.bk-intro .wordmark { color: #F2F5FC; }
.bk-intro .wm-name { font-size: clamp(2.4rem, 6vw, 4.2rem); animation: markIn 2.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.bk-intro .wm-name .i svg { color: var(--glow); filter: drop-shadow(0 0 10px rgba(143, 176, 240, 0.95)); animation: twinkle 3.2s ease-in-out infinite; }
@keyframes markIn { from { opacity: 0; filter: blur(16px); letter-spacing: 0.42em; } to { opacity: 1; filter: blur(0); } }
@keyframes twinkle { 0%, 100% { transform: translateX(-62%) scale(1); } 50% { transform: translateX(-62%) scale(1.35) rotate(45deg); } }
.bk-load { display: flex; flex-direction: column; align-items: center; gap: 12px; transition: opacity 0.6s; }
.bk-load-num { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0.1em; color: #DCE4F6; font-variant-numeric: lining-nums tabular-nums; }
.bk-load-bar { width: 160px; height: 1px; background: rgba(238, 242, 251, 0.15); position: relative; overflow: hidden; }
.bk-load-bar i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: #EEF2FB; transition: transform 0.3s; }
.bk-load-label { font-size: 0.6rem; letter-spacing: 0.34em; text-transform: uppercase; color: rgba(238, 242, 251, 0.5); }
.bk-doors { display: none; gap: 14px; flex-wrap: wrap; justify-content: center; }
.bk-intro.ready .bk-load { display: none; }
.bk-intro.ready .bk-doors { display: flex; animation: fadeUp 1.2s both; }
.bk-enter { background: none; border: 1px solid rgba(238, 242, 251, 0.5); color: #EEF2FB; font: inherit; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; padding: 17px 30px; cursor: pointer; display: inline-flex; gap: 12px; align-items: center; transition: background 0.4s, color 0.4s, border-color 0.4s; }
.bk-enter:hover { background: #EEF2FB; color: var(--night); }
.bk-enter.ghost { border-color: transparent; color: rgba(238, 242, 251, 0.6); }
.bk-enter.ghost:hover { background: none; color: #fff; border-color: rgba(238, 242, 251, 0.3); }
.bk-enter span { font-size: 1rem; line-height: 1; }
.bk-hint { position: absolute; bottom: 34px; padding: 0 20px; text-align: center; font-size: 0.6rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(238, 242, 251, 0.42); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- header ---------- */
.bk-head { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px 32px; }
.bk-head .wordmark { color: #F2F5FC; }
.bk-head .wm-name { font-size: 1.45rem; }
.bk-head .wm-name .i svg { color: var(--glow); }
.bk-head-right { justify-self: end; display: flex; align-items: center; gap: 14px; }
.bk-back, .bk-cta-mini { font-size: 0.64rem; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; color: var(--mist); transition: color 0.3s, background 0.3s; }
.bk-back:hover, .bk-cta-mini:hover { color: #fff; }
.bk-cta-mini { border: 1px solid rgba(238, 242, 251, 0.3); padding: 10px 16px; border-radius: 40px; }
.bk-sound { width: 58px; height: 34px; border-radius: 40px; border: 1px solid rgba(238, 242, 251, 0.3); background: none; display: grid; place-items: center; cursor: pointer; padding: 0; }
.bk-sound svg { width: 30px; height: 12px; fill: none; stroke: #EEF2FB; stroke-width: 1.2; overflow: visible; }

/* ---------- chapter rail ---------- */
.bk-progress { position: fixed; left: 30px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; gap: 16px; }
.bk-progress ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; order: 2; }
.bk-progress-line { width: 1px; background: rgba(238, 242, 251, 0.14); position: relative; order: 1; }
.bk-progress-line i { position: absolute; left: 0; right: 0; top: 0; height: 100%; transform-origin: top; transform: scaleY(0); background: linear-gradient(#fff, var(--glow)); }
.bk-progress li { font-size: 0.58rem; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(238, 242, 251, 0.32); cursor: pointer; transition: color 0.5s, transform 0.5s; line-height: 1; }
.bk-progress li b { font-weight: 400; font-family: var(--font-display); letter-spacing: 0.1em; margin-right: 10px; }
.bk-progress li span { display: inline-block; opacity: 0; transform: translateX(-6px); transition: opacity 0.5s, transform 0.5s; }
.bk-progress li.on { color: #F2F5FC; transform: translateX(4px); }
.bk-progress li.on span, .bk-progress:hover li span { opacity: 1; transform: none; }

/* ---------- chapters ---------- */
.bk-chapters { position: relative; z-index: 10; }
.bk-ch { min-height: 170svh; display: flex; align-items: flex-start; padding: 0 clamp(24px, 9vw, 160px) 0 clamp(24px, 16vw, 280px); }
.bk-ch:first-child { min-height: 150svh; }
.bk-ch.final { min-height: 140svh; }
.bk-text { position: sticky; top: 0; height: 100svh; max-width: 540px; display: flex; flex-direction: column; justify-content: center; gap: 22px; will-change: filter, opacity; }
.bk-text.center { margin-inline: auto; align-items: center; text-align: center; max-width: 820px; }
.bk-text.right { margin-left: auto; }
.bk-eyebrow { font-size: 0.66rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--ice); }
.bk-num { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.3em; color: var(--glow); display: flex; align-items: center; gap: 14px; }
.bk-num::after { content: ""; width: 40px; height: 1px; background: currentColor; opacity: 0.6; }
.bk-text.right .bk-num, .bk-text.center .bk-num { justify-content: flex-start; }
.bk-big { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.03em; line-height: 0.98; font-size: clamp(2.6rem, min(7.2vw, 12.5vh), 6.2rem); color: #F4F7FD; text-shadow: 0 0 50px rgba(143, 176, 240, 0.25); }
.bk-text.center .bk-big { font-size: clamp(2.8rem, min(9vw, 15vh), 7.6rem); }
.bk-ch.final .bk-big { font-size: clamp(2.4rem, min(6.4vw, 11vh), 5.6rem); }
/* letters rise out of blur when a chapter arrives */
.bk-big .ch { display: inline-block; opacity: 0; filter: blur(12px); transform: translateY(0.35em) scale(1.06); transition: opacity 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), filter 1.1s cubic-bezier(0.2, 0.7, 0.2, 1), transform 1.3s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: calc(var(--i) * 38ms); }
.bk-big .w { display: inline-block; white-space: nowrap; }
.bk-text.live .bk-big .ch { opacity: 1; filter: blur(0); transform: none; }
.bk-text .bk-sub, .bk-text .bk-num, .bk-text .bk-eyebrow, .bk-text .bk-chips, .bk-text .bk-metals, .bk-text .bk-actions, .bk-text .bk-scroll, .bk-text .bk-home { opacity: 0; transform: translateY(14px); transition: opacity 1.2s 0.35s, transform 1.2s 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bk-text.live .bk-sub, .bk-text.live .bk-num, .bk-text.live .bk-eyebrow, .bk-text.live .bk-chips, .bk-text.live .bk-metals, .bk-text.live .bk-actions, .bk-text.live .bk-scroll, .bk-text.live .bk-home { opacity: 1; transform: none; }
.bk-sub { font-size: 1.04rem; line-height: 1.8; color: var(--mist); max-width: 42ch; }
.bk-scroll { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 0.58rem; letter-spacing: 0.32em; text-transform: uppercase; color: rgba(238, 242, 251, 0.5); }
.bk-scroll span { width: 1px; height: 46px; background: linear-gradient(rgba(238, 242, 251, 0.8), rgba(238, 242, 251, 0)); animation: drip 2.2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.bk-chips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.bk-chips li, .bk-metals li { font-size: 0.64rem; letter-spacing: 0.2em; text-transform: uppercase; border: 1px solid rgba(238, 242, 251, 0.22); padding: 9px 14px; border-radius: 40px; color: var(--mist); backdrop-filter: blur(6px); background: rgba(10, 18, 44, 0.25); }
.bk-metals { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.bk-metals li { display: inline-flex; align-items: center; gap: 12px; transition: border-color 0.5s, color 0.5s, background 0.5s; }
.bk-metals i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.25); }
.bk-metals li.on { border-color: #EEF2FB; color: #fff; background: rgba(238, 242, 251, 0.1); }

.bk-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 10px; }
.bk-btn { font-size: 0.68rem; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; padding: 18px 32px; border: 1px solid rgba(238, 242, 251, 0.5); color: #EEF2FB; transition: background 0.4s, color 0.4s; backdrop-filter: blur(6px); }
.bk-btn:hover, .bk-btn.solid { background: #EEF2FB; color: var(--night); }
.bk-btn.solid:hover { background: transparent; color: #EEF2FB; }
.bk-home { margin-top: 18px; font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(238, 242, 251, 0.5); }

body.bespoke .wa-float { display: none; }

@media (max-width: 860px) {
  .bk-head { padding: 16px 18px; grid-template-columns: auto 1fr auto; gap: 10px; }
  .bk-head #head-mark { justify-self: center; }
  .bk-head .wm-name { font-size: 1.1rem; }
  .bk-back { font-size: 0.58rem; }
  .bk-cta-mini { display: none; }
  .bk-sound { width: 48px; height: 30px; }
  .bk-progress { display: none; }
  .bk-ch { padding: 0 22px; }
  .bk-text, .bk-text.right { margin: 0 auto; align-items: center; text-align: center; justify-content: flex-end; padding-bottom: 8svh; }
  .bk-text.center { justify-content: center; padding-bottom: 0; }
  .bk-text:not(.center) { margin-inline: -22px; padding-inline: 22px; background: linear-gradient(180deg, rgba(5, 8, 22, 0) 48%, rgba(5, 8, 22, 0.82) 72%, rgba(5, 8, 22, 0.92) 100%); }
  .bk-num { justify-content: center; }
  .bk-num::after { display: none; }
  .bk-chips, .bk-metals { justify-content: center; align-items: center; }
  .bk-metals { flex-direction: row; flex-wrap: wrap; }
  .bk-chips li, .bk-metals li { padding: 7px 11px; font-size: 0.56rem; }
  .bk-sub { font-size: 0.95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bk-grain, .bk-intro .wm-name, .bk-intro .wm-name .i svg, .bk-scroll span { animation: none; }
  .bk-big .ch { transition: none; }
}
