/* Velvet Roulette / one physical scene, one continuous camera, readable HTML. */
:root {
  color-scheme: dark;
  --night: #141310;
  --ink: #f8f7f2;
  --muted: #c4c0b6;
  --gold: #ffac00;
  --line: #ffce7928;
  --gutter: clamp(1.5rem, 6vw, 7rem);
  font: 400 16px/1.7 'Bricolage Grotesque', Arial, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--night);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--night); }
a { color: inherit; text-underline-offset: .35em; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: #ffac0020; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.container { width: calc(100% - var(--gutter) * 2); max-width: 104rem; margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 30; top: 1rem; left: 1rem; padding: .8rem 1.2rem; background: var(--ink); color: var(--night); transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
/* The amber dial and charcoal room share the original logo's palette. */
.loading-screen { display: none; position: fixed; z-index: 100; inset: 0; place-items: center; padding: max(2rem, env(safe-area-inset-top)) 1.5rem max(2rem, env(safe-area-inset-bottom)); background: radial-gradient(ellipse at 50% 42%, #302a1c 0, var(--night) 65%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s ease, visibility .45s; }
[data-loading] .loading-screen { display: grid !important; opacity: 1; visibility: visible; pointer-events: auto; }
[data-loading="done"] .loading-screen { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-content { display: grid; justify-items: center; width: min(100%, 24rem); }
.loading-brand { position: relative; width: min(100%, 17rem); aspect-ratio: 4.25; overflow: hidden; margin-bottom: clamp(2rem, 8svh, 5rem); }
.loading-brand img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.loading-meter { --load-progress: 0; position: relative; width: clamp(6.5rem, 18svh, 9rem); aspect-ratio: 1; }
.loading-meter svg { width: 100%; height: 100%; fill: none; transform: rotate(-90deg); }
.loading-track { stroke: #ffac0024; stroke-width: 1; }
.loading-inner { stroke: #ffac0012; stroke-width: .5; }
.loading-arc { stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--load-progress)); transition: stroke-dashoffset .3s ease; }
.loading-value { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .2rem; color: var(--ink); font: 500 2.8rem/1 'Cormorant Garamond', Georgia, serif; font-variant-numeric: tabular-nums; }
.loading-value small { align-self: center; color: var(--gold); font: 400 .7rem/1 Arial, sans-serif; margin-top: 1rem; }
.loading-caption { margin-top: 1.65rem; color: var(--muted); font-size: .72rem; letter-spacing: .1em; }
.loading-skip { display: flex; align-items: center; gap: 1rem; min-height: 44px; margin-top: clamp(1.5rem, 7svh, 4rem); padding: .4rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--muted); font-size: .7rem; }
.loading-skip span { color: var(--gold); }
.loading-skip:hover { color: var(--ink); border-color: var(--gold); }
.site-header { position: relative; z-index: 20; }
.velvet-page .site-header { position: absolute; inset: 0 0 auto; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 98px; border-bottom: 1px solid var(--line); }
.brand, .footer-brand { display: block; position: relative; aspect-ratio: 4.25; overflow: hidden; min-height: 44px; text-decoration: none; }
.brand { flex: 0 1 20rem; width: 20rem; min-width: 0; }
/* Preserve the supplied mark; only its transparent top/bottom margin is clipped. */
.brand img, .footer-brand img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.site-nav { display: flex; align-items: center; gap: 2.6rem; }
.site-nav a { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .76rem; text-decoration: none; transition: color .2s; }
.site-nav a:hover { color: var(--ink); }
.menu-toggle { min-height: 44px; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 0; background: transparent; font-size: .8rem; }
h1, h2 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 500; letter-spacing: -.047em; line-height: .99; text-wrap: balance; }
h1 em, h2 em { color: var(--gold); font-weight: 500; }

/* The canvas belongs to the whole story. Sections have no separate backdrops or clipping. */
.velvet-world { position: relative; isolation: isolate; --wheel-angle: 18deg; --ball-angle: -46deg; --ball-radius: 41.5%; --story-progress: 0; --left-veil: 1; --right-veil: 0; }
.world-stage { position: sticky; top: 0; height: 100svh; min-height: 32rem; overflow: hidden; pointer-events: none; background: var(--night); }
.world-canvas, .world-fallback, .world-shade, .world-grain { position: absolute; inset: 0; width: 100%; height: 100%; }
.world-canvas { display: block; opacity: 0; }
[data-renderer="webgl"] .world-canvas { opacity: 1; transition: opacity .24s ease; }
.world-fallback { background: radial-gradient(ellipse at 73% 55%, #3c3423, transparent 65%), var(--night); transition: opacity .24s ease; }
[data-renderer="webgl"] .world-fallback { opacity: 0; }
/* A working WebGL scene is the first wheel shown. The rescue illustration only
   appears if rendering fails (or JavaScript is off), already at an inclined angle. */
.fallback-wheel { visibility: hidden; position: absolute; width: min(var(--fallback-size, 58vw), 65rem); aspect-ratio: 1; left: var(--fallback-x, 76%); top: var(--fallback-y, 60%); transform: translate(-50%, -50%) perspective(1400px) rotateX(var(--fallback-tilt, 46deg)); filter: drop-shadow(0 25px 30px #0009); }
[data-renderer="fallback"] .fallback-wheel { visibility: visible; }
.fallback-frame { position: absolute; inset: 0; width: 100%; }
.fallback-rotor { position: absolute; inset: 14%; width: 72%; max-width: none; transform: rotate(var(--wheel-angle)); }
.fallback-ball-orbit { position: absolute; inset: 0; transform: rotate(var(--ball-angle)); }
.fallback-ball-orbit i { position: absolute; width: 2.1%; aspect-ratio: 1; border-radius: 50%; left: 48.95%; top: calc(48.95% - var(--ball-radius)); background: radial-gradient(circle at 30% 20%, #ffffff, #d2caba); box-shadow: 2px 3px 3px #0008; }
.world-shade::before, .world-shade::after { content: ''; position: absolute; inset: 0; }
.world-shade::before { background: linear-gradient(90deg, #1413108c 0, #14131040 32%, transparent 61%); opacity: var(--left-veil); }
.world-shade::after { background: linear-gradient(270deg, #141310bb 0, #1413104a 31%, transparent 61%); opacity: var(--right-veil); }
.world-grain { opacity: .04; background: repeating-linear-gradient(17deg, transparent 0 2px, #f3e7cb 3px, transparent 4px); mix-blend-mode: soft-light; }
.story-flow { position: relative; z-index: 2; margin-top: calc(-1 * max(32rem, 100svh)); pointer-events: none; }
.scene { position: relative; min-height: max(48rem, 100svh); }
.scene-content { position: relative; display: flex; align-items: center; min-height: inherit; padding-block: 9rem 7rem; }
.hero-copy, .scene-copy, .closing-copy { position: relative; pointer-events: auto; }
.hero-copy { width: 44%; max-width: 36rem; }
.eyebrow, .chapter-mark { display: block; color: var(--gold); font-size: .61rem; letter-spacing: .19em; font-weight: 500; text-transform: uppercase; }
.eyebrow { margin-bottom: 1.9rem; }
h1 { font-size: clamp(4.65rem, 7.7vw, 8.4rem); margin-bottom: 1.8rem; }
.lead, .scene-copy > p { max-width: 28rem; color: var(--muted); font-size: .97rem; line-height: 1.82; }
.hero-copy .lead { max-width: 25rem; }
.text-link { display: inline-flex; align-items: center; gap: 2.2rem; min-height: 44px; margin-top: 1.6rem; color: var(--muted); font-size: .73rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.text-link span { color: var(--gold); font-size: 1.15rem; }
.text-link:hover { color: var(--ink); border-color: var(--gold); }
.scene-baseline { position: absolute; inset: auto 0 2.5rem; display: flex; align-items: center; gap: 1.4rem; color: #c4c0b670; font-size: .6rem; letter-spacing: .1em; }
.scroll-stroke { width: 3.3rem; height: 1px; background: var(--line); }
.wheel-drag-area { position: absolute; z-index: 1; top: 15%; bottom: 9%; left: 45%; right: 0; pointer-events: auto; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
[data-enhanced] .wheel-drag-area { cursor: grab; }
[data-enhanced] .wheel-drag-area.is-dragging { cursor: grabbing; }
[data-spinning] .wheel-drag-area { cursor: progress; }
.hero-copy { z-index: 2; }

/* A tactile, compact control stays next to the introduction. */
.wheel-controls { display: flex; align-items: flex-start; gap: 1.25rem; margin-top: 2.1rem; width: min(100%, 19.2rem); }
.spin-actions { flex: 1; min-width: 0; }
.spin-button { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 52px; width: 100%; padding: .8rem 1.1rem; border: 1px solid #ffd16b; border-radius: 1px; color: #1c1609; background: var(--gold); box-shadow: inset 0 1px #fff0c4, 0 3px #8c5c00; font-size: .8rem; font-weight: 600; transition: background .2s, border-color .2s; }
.spin-button svg { width: 21px; height: 21px; flex: none; }
.spin-button:hover { background: #ffc13b; }
.spin-button[aria-disabled="true"] { cursor: progress; background: #b98724; border-color: #d3a34f; }
.spin-hint { display: block; color: var(--muted); margin-top: .65rem; font-size: .59rem; letter-spacing: .03em; }
.wheel-result { display: grid; justify-items: center; flex: none; min-width: 3.3rem; }
.result-number { display: grid; place-items: center; width: 3.3rem; height: 3.3rem; border: 1px solid #e5b95566; background: #24221c; color: var(--ink); font: 500 2rem/1 'Cormorant Garamond', Georgia, serif; }
.result-label { margin-top: .45rem; color: var(--muted); font-size: .59rem; }
/* Red, black and green identify roulette outcomes, independently of branding. */
[data-colour="red"] .result-number { background: #762832; border-color: #af6d66; }
[data-colour="green"] .result-number { background: #284e38; border-color: #6b8c68; }
[data-colour="black"] .result-number { background: #141414; border-color: #9c8a63; }

.scene--track, .scene--classics { min-height: max(49rem, 105svh); }
.scene-copy { width: 36%; max-width: 32rem; margin-left: auto; }
.chapter-mark { margin-bottom: 2.1rem; color: #e5b955; }
.scene-copy h2 { font-size: clamp(3.7rem, 5.1vw, 5.7rem); max-width: 14ch; margin-bottom: 1.9rem; }
.scene--classics .scene-copy { width: 39%; }
.scene--classics h2 { max-width: 13ch; }
.reading-contrasts { margin: 2.2rem 0 0; }
.reading-contrasts > div { border-top: 1px solid var(--line); padding-block: 1.4rem 1.25rem; }
.reading-contrasts dt { display: flex; align-items: center; gap: .9rem; font-size: .92rem; font-weight: 500; }
.reading-contrasts dd { margin: .8rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.8; }
.colour-studies { display: flex; width: 31px; flex: none; }
.colour-studies i { width: 14px; height: 14px; border: 1px solid #e5b95566; border-radius: 50%; background: #8e2934; }
.colour-studies i + i { margin-left: -5px; background: #171715; }
.colour-studies i:last-child { background: #36513c; }
.pause-study { width: 31px; height: 16px; border: 1px solid #e5b95555; border-radius: 50%; position: relative; flex: none; }
.pause-study i { position: absolute; width: 6px; height: 6px; top: -2px; right: 5px; border-radius: 50%; background: var(--ink); }
.scene--closing { min-height: 100svh; }
.scene--closing .scene-content { align-items: flex-start; justify-content: center; padding-top: clamp(6rem, 13svh, 10rem); padding-bottom: 24rem; }
.closing-copy { text-align: center; max-width: 47rem; }
.closing-copy .chapter-mark { margin-bottom: 2rem; }
.closing-copy h2 { font-size: clamp(4rem, 6.4vw, 7.2rem); max-width: 15ch; margin-inline: auto; }
.closing-copy p { max-width: 28rem; color: var(--muted); margin: 1.7rem auto 0; font-size: .94rem; }
.scene-nav { position: fixed; z-index: 10; top: 50%; right: 1rem; transform: translateY(-50%); display: grid; gap: .25rem; }
.scene-nav a { display: flex; align-items: center; justify-content: end; gap: .6rem; width: 44px; height: 44px; text-decoration: none; }
.scene-nav a::after { content: ''; width: 8px; height: 1px; background: #e5b95566; }
.scene-nav span { font-size: .56rem; color: var(--gold); opacity: 0; }
.scene-nav a[aria-current] span, .scene-nav a:focus-visible span { opacity: 1; }
.scene-nav a[aria-current]::after { width: 18px; background: var(--gold); }

.site-footer { position: relative; z-index: 3; border-top: 1px solid var(--line); background: var(--night); }
.footer-inner { display: flex; align-items: start; justify-content: space-between; gap: 3rem; padding-block: 2.4rem max(2.4rem, env(safe-area-inset-bottom)); color: var(--muted); font-size: .73rem; }
.footer-identity { min-width: 0; max-width: 100%; }
.footer-brand { width: min(100%, 22.5rem); margin-bottom: 1rem; }
.footer-meta { font-size: .73rem; color: var(--muted); }
.audience-note { margin-top: .65rem; max-width: 30rem; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.legal-nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.legal-nav a:hover, .legal-nav a[aria-current] { text-decoration: underline; color: var(--ink); }
.legal-page { max-width: 51rem; padding-block: 3rem 6rem; }
.legal-page > p:first-child a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold); font-size: .85rem; }
.legal-page h1 { font-size: clamp(3.1rem, 5.8vw, 5rem); margin-block: 3rem 1.8rem; overflow-wrap: anywhere; }
.legal-page p { color: var(--muted); }
.draft-notice { margin-top: 1.5rem; padding: .8rem 1.2rem; border-left: 2px solid var(--gold); background: #ffac000a; font-size: .85rem; }
.legal-section { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.legal-section h2 { font-size: 2.15rem; margin-bottom: 1rem; }

@media (max-width: 75rem) {
  :root { --gutter: 3rem; }
  .hero-copy { width: 47%; }
  h1 { font-size: clamp(4.4rem, 7.7vw, 7rem); }
  .scene-copy { width: 38%; }
  .scene--classics .scene-copy { width: 43%; }
  .scene-copy h2 { font-size: 3.8rem; }
  .scene-nav { right: .25rem; }
}
/* At tablet width the camera and the text both change to a vertical composition. */
@media (max-width: 49.999rem) {
  :root { --gutter: clamp(1.25rem, 5.5vw, 2.5rem); }
  .scene-nav { display: none; }
  .world-stage { min-height: 40rem; }
  .world-stage::after { content: ''; position: absolute; inset: auto 0 0; height: 5rem; background: linear-gradient(0deg, var(--night), transparent); }
  .story-flow { margin-top: calc(-1 * max(40rem, 100svh)); }
  .scene { min-height: max(44rem, 100svh); }
  .scene-content { min-height: inherit; padding-block: 4rem; align-items: flex-start; }
  .scene--opening .scene-content { padding-top: 7.5rem; }
  .hero-copy { width: 100%; max-width: 32rem; }
  /* Reading layers travel with their copy. The stationary table and scrolling
     wheel disappear softly behind them, including between camera keyframes. */
  .hero-copy, .scene-copy, .closing-copy, .wheel-controls { isolation: isolate; }
  .hero-copy::before, .scene-copy::before, .closing-copy::before, .wheel-controls::before {
    content: '';
    position: absolute;
    z-index: -1;
    pointer-events: none;
    top: -4rem;
    bottom: -4rem;
    left: calc(-1 * var(--gutter));
    width: 100vw;
    background: linear-gradient(180deg, transparent, var(--night) 3.5rem, var(--night) calc(100% - 3.5rem), transparent);
  }
  .eyebrow { font-size: .58rem; letter-spacing: .14em; margin-bottom: 1.25rem; }
  h1 { font-size: clamp(3.25rem, 10.9vw, 5.2rem); max-width: 12ch; margin-bottom: 1.2rem; }
  .hero-copy .lead { max-width: 31rem; font-size: .9rem; line-height: 1.7; }
  .text-link { margin-top: 1rem; font-size: .71rem; }
  .wheel-controls { position: absolute; z-index: 4; width: min(22rem, calc(100vw - var(--gutter) * 2)); left: 0; margin: 0; top: calc(max(44rem, 100svh) - 14rem); }
  .wheel-controls::before { top: -1.5rem; bottom: -1.5rem; background: linear-gradient(180deg, transparent, var(--night) 1.25rem, var(--night) calc(100% - 1.25rem), transparent); }
  .spin-button { min-height: 50px; }
  .wheel-drag-area { left: 0; top: 43%; bottom: 13%; }
  .scene-baseline { display: none; }
  .world-shade::before { background: linear-gradient(180deg, #141310cc, #14131066 25%, transparent 56%); }
  .world-shade::after { background: linear-gradient(0deg, #141310e6, #14131077 40%, transparent 70%); }
  .fallback-wheel { left: var(--fallback-x, 50%); top: var(--fallback-y, 66%); width: min(var(--fallback-size, 90vw), 36rem); transform: translate(-50%, -50%) perspective(1400px) rotateX(var(--fallback-tilt, 58deg)); }
  .scene--track .scene-content, .scene--classics .scene-content { padding-top: max(26rem, 54svh); padding-bottom: 5rem; }
  .scene-copy, .scene--classics .scene-copy { width: 100%; max-width: 36rem; margin: 0; }
  .scene-copy h2 { font-size: clamp(3.1rem, 9.1vw, 4.5rem); max-width: 15ch; margin-bottom: 1.5rem; }
  .chapter-mark { margin-bottom: 1.4rem; }
  .scene-copy > p { max-width: 32rem; font-size: .94rem; }
  .reading-contrasts { margin-top: 1.8rem; }
  .reading-contrasts dd { font-size: .9rem; }
  .scene--closing .scene-content { padding-top: 5rem; padding-bottom: 26rem; min-height: 100svh; }
  .closing-copy { width: 100%; }
  .closing-copy h2 { font-size: clamp(3.4rem, 10.6vw, 5.6rem); max-width: 13ch; }
  .closing-copy p { font-size: .9rem; max-width: 25rem; }
  .footer-inner { flex-direction: column; gap: 1.2rem; }
}
@media (max-width: 47.999rem) {
  .velvet-world { --opening-min-height: 44rem; }
  .velvet-page .site-header { position: relative; }
  .header-inner { flex-wrap: wrap; gap: .5rem; min-height: 74px; padding-block: .7rem; }
  .brand { flex: 0 1 auto; width: clamp(11.25rem, 56vw, 13.125rem); max-width: calc(100% - 5rem); }
  .menu-toggle { margin-left: auto; }
  .site-nav { width: 100%; flex-direction: column; align-items: stretch; gap: .25rem; padding-block: .5rem; border-top: 1px solid var(--line); }
  .site-nav a { font-size: .83rem; }
  .scene--opening { min-height: max(var(--opening-min-height), calc(100svh - 74px)); }
  .scene--opening .scene-content { padding-top: 1.9rem; }
  .wheel-controls { top: calc(max(var(--opening-min-height), 100svh - 74px) - 8.1rem); }
  .hero-copy .lead { max-width: 28rem; }
  .legal-page { padding-block: 2rem 4rem; }
  .legal-page h1 { margin-top: 2rem; font-size: clamp(2.9rem, 10vw, 4rem); }
  .legal-page p { font-size: .93rem; }
  .legal-section h2 { font-size: 1.9rem; }
}
/* A compact viewport scrolls through the opening instead of squeezing the
   roulette and its controls into the introduction's reading space. */
@media (max-width: 47.999rem) and (max-height: 42rem) {
  .velvet-world { --opening-min-height: 48rem; }
}
@media (max-width: 23rem) {
  h1 { font-size: 3rem; }
  .hero-copy .lead { font-size: .87rem; }
  .scene-copy h2 { font-size: 2.9rem; }
  .closing-copy h2 { font-size: 3.15rem; }
  .wheel-controls { gap: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .world-stage, .scene-nav { display: none; }
  .story-flow { margin-top: 0; }
  .spin-button, .result-number, .text-link, .menu-toggle { border: 1px solid ButtonText; }
  .lead, .scene-copy > p, .closing-copy p { color: CanvasText; }
}
