/* Vesper and The Umbral Passage — EmberScope Studios
   The old site's night violet, gold dust and Cinzel labels, with the game's own look on top:
   journal pages with tape, Vesper's handwriting (drawn in pen order), steel-and-gold item cards
   and yellow comic captions with a purple offset. */

:root {
  --night-0: #06030b;
  --night-1: #0d0716;
  --night-2: #140a22;
  --violet-1: #1d0f33;
  --violet-2: #2a1748;
  --violet-3: #3d1f6b;
  --umbral: #9d4edd;
  --umbral-hi: #c38bff;
  --magenta: #e45bd7;
  --gold: #ffc857;
  --gold-hi: #ffe39a;
  --gold-deep: #e39a2f;
  --sand: #e6af68;
  --sand-deep: #b9612a;
  --ivory: #f6ead2;
  --tape: rgba(249, 241, 218, .42);
  --tape-edge: rgba(249, 241, 218, .75);
  /* the journal's paper and inks (AdventurePaper:: in the game, as its painter draws them in sRGB) */
  --paper-page: #220e2f;
  --paper-lifted: #452455;
  --ink-gold: #fada95;
  --cream: #fff7e5;
  --navy-1: #14203f;
  --navy-2: #0a1228;
  --text: #f1e9f8;
  --muted: #cbbede;
  --dim: #9786b3;
  --line: rgba(255, 255, 255, .09);
  --cap-yellow: #ffd23f;
  --cap-purple: #6d2bd0;

  --font-body: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cap: "Poppins", "Exo 2", system-ui, sans-serif;
  --font-kick: "Cinzel", Georgia, serif;
  --font-hand: "Gochi Hand", "Segoe Print", "Comic Sans MS", cursive;

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header: 68px;
  --radius: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night-1);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img, video, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; color: var(--muted); }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
h3 { font-size: 1.25rem; font-weight: 700; color: #fff; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; border-radius: 10px; background: var(--gold); color: #1d1006; font-weight: 700; text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

/* faint stars behind everything; gold dust drifts on the canvas above them */
.sky {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1px 1px at 72% 12%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 35% 64%, rgba(255,230,180,.45), transparent 60%),
    radial-gradient(1px 1px at 88% 52%, rgba(255,255,255,.35), transparent 60%),
    radial-gradient(1px 1px at 55% 84%, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1px 1px at 22% 92%, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(1200px 700px at 50% -10%, #1f1036 0%, transparent 70%),
    linear-gradient(180deg, #0b0614 0%, #0d0716 100%);
}
.dust { position: fixed; inset: 0; z-index: -1; pointer-events: none; width: 100%; height: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.sec { position: relative; padding-block: clamp(56px, 9vw, 116px); }
.sec-head { max-width: 780px; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head .lead { margin-top: .6em; }
.lead { font-size: clamp(1.06rem, 1.6vw, 1.2rem); color: var(--muted); line-height: 1.7; }

/* ---------- type voices ---------- */
.kicker {
  display: inline-flex; align-items: center; gap: .75em;
  margin: 0 0 .7em;
  font-family: var(--font-kick); font-weight: 700; font-size: .8rem;
  letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
}
.kicker::before, .kicker::after {
  content: ""; width: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.kicker::after { transform: scaleX(-1); }
.sec-head:not(.center) .kicker::before { display: none; }

/* Vesper's handwriting: real Fatherhand ink, uncovered stroke by stroke (see assets/js/site.js) */
.hand-h { font-size: clamp(2.5rem, 6.4vw, 4.4rem); color: var(--ivory); margin: 0 0 .1em; line-height: 1; font-weight: 400; }
.sec-head.center .hand-h .hand { margin-inline: auto; }
.hand { width: calc(var(--w) * 1em); max-width: 100%; height: auto; overflow: visible; }
.hand .ink { fill: currentColor; }
.hand-h .hand { filter: drop-shadow(0 2px 0 rgba(40, 14, 70, .9)) drop-shadow(0 10px 24px rgba(0, 0, 0, .35)); }
.js .hand .pens path { stroke-dasharray: 1 1; stroke-dashoffset: 1; opacity: 0; }
.hand.is-writing .pens path { animation: pen var(--t) linear var(--d) forwards; }
.hand.is-written .ink { mask: none; }
@keyframes pen { from { opacity: 1; stroke-dashoffset: 1; } to { opacity: 1; stroke-dashoffset: 0; } }

/* the game's caption style: yellow, bold oblique, with a purple copy offset behind */
.cap {
  font-family: var(--font-cap); font-weight: 800; font-style: italic;
  color: var(--cap-yellow); letter-spacing: -.005em; line-height: 1.08;
  text-shadow: .055em .065em 0 var(--cap-purple), 0 .1em .45em rgba(0, 0, 0, .35);
}
h2.cap { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
.cap-sub { font-size: clamp(1.25rem, 2.6vw, 1.7rem); margin: .35em 0 .9em; }
.note { font-family: var(--font-hand); color: var(--ivory); font-size: 1.35rem; line-height: 1.3; }

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: .85em 1.5em; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, border-color .25s;
}
.btn i, .btn svg { font-size: 1.2em; width: 1.2em; height: 1.2em; flex: none; }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn:hover::after { left: 140%; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn-gold {
  color: #2a1606;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-deep));
  box-shadow: 0 4px 0 #a1601c, 0 12px 28px rgba(255, 176, 60, .28);
}
.btn-gold:hover { box-shadow: 0 6px 0 #a1601c, 0 16px 36px rgba(255, 176, 60, .38); }
.btn-ghost {
  color: var(--text);
  background: rgba(157, 78, 221, .16);
  border-color: rgba(195, 139, 255, .45);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(157, 78, 221, .3); border-color: var(--umbral-hi); }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .9rem; border-radius: 11px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 1000; height: var(--header);
  display: flex; align-items: center;
  background: linear-gradient(180deg, rgba(6, 3, 11, .75), rgba(6, 3, 11, 0));
  transition: background-color .35s, box-shadow .35s;
}
.site-header.scrolled {
  background: rgba(10, 5, 18, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 200, 87, .14), 0 12px 30px rgba(0, 0, 0, .35);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 0 10px rgba(255, 200, 87, .25)); }
.brand span { font-family: var(--font-kick); font-weight: 700; font-size: 1.05rem; letter-spacing: .14em; color: var(--gold); text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); }
.nav-links a:not(.btn) {
  position: relative; padding: 6px 0; text-decoration: none;
  font-weight: 600; font-size: .84rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  transition: color .2s;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-links a:not(.btn):hover, .nav-links a.active { color: #fff; }
.nav-links a:not(.btn):hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-end { display: flex; align-items: center; gap: 10px; }
.menu-btn {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04); align-items: center; justify-content: center;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--gold); position: relative; transition: transform .3s var(--ease), background-color .2s;
}
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: fixed; inset: var(--header) 0 0; z-index: 999;
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0;
    padding: 18px var(--gutter) 40px; overflow-y: auto;
    background: rgba(10, 5, 18, .97);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .menu-open .nav-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-links a:not(.btn) {
    padding: 16px 4px; font-family: var(--font-kick); font-size: 1.15rem; letter-spacing: .14em;
    border-bottom: 1px solid var(--line); color: var(--text);
  }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin-top: 22px; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
}

/* ---------- hero ---------- */
/* The title sits low over the darkest part of the grade so the clip reads clearly above it. */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; align-items: end; justify-items: center; text-align: center;
  padding: calc(var(--header) + 24px) var(--gutter) clamp(112px, 15vh, 150px);
  overflow: hidden;
}
/* in the page's own layer below the gold dust, so the dust drifts over the montage */
.hero-media { position: absolute; inset: 0; z-index: -2; background: #120a1f; overflow: hidden; }
.hero-media picture, .hero-media img, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media video { opacity: 0; transition: opacity 1.2s ease; }
.hero-media video.playing { opacity: 1; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 7, 22, .5) 0%, rgba(13, 7, 22, .06) 20%, rgba(13, 7, 22, .06) 40%, rgba(13, 7, 22, .62) 64%, rgba(13, 7, 22, .86) 84%, var(--night-1) 100%);
}
.hero-inner { position: relative; width: min(640px, 100%); display: flex; flex-direction: column; align-items: center; }
.hero-logo { margin: 0; width: min(620px, 100%); }
.hero-logo img { width: 100%; filter: drop-shadow(0 0 34px rgba(157, 78, 221, .45)) drop-shadow(0 8px 18px rgba(0, 0, 0, .6)); animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero-tag { margin: clamp(14px, 2.4vh, 22px) 0 clamp(24px, 4vh, 34px); font-size: clamp(1rem, 1.5vw, 1.2rem); font-weight: 500; line-height: 1.5; color: var(--ivory); text-shadow: 0 2px 10px rgba(0, 0, 0, .9); text-wrap: balance; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
/* Wide screens: one column of title and buttons on the left over a soft shade, the clip's action in the middle and right. */
@media (min-width: 760px) and (min-aspect-ratio: 1/1) {
  .hero { align-items: center; justify-items: start; text-align: left; padding-inline: clamp(40px, 6vw, 120px); }
  .hero-inner { align-items: flex-start; width: min(520px, 37vw); margin-top: 6vh; }
  .hero-logo { width: 100%; }
  .hero-tag { text-wrap: pretty; }
  .hero-cta { justify-content: flex-start; }
  .hero-media::after {
    background:
      linear-gradient(90deg, rgba(13, 7, 22, .8) 0%, rgba(13, 7, 22, .52) 28%, rgba(13, 7, 22, .1) 50%, rgba(13, 7, 22, 0) 62%),
      linear-gradient(180deg, rgba(13, 7, 22, .45) 0%, rgba(13, 7, 22, 0) 16%, rgba(13, 7, 22, 0) 74%, var(--night-1) 100%);
  }
}
/* Tall screens (phones, upright tablets) get a poster: the title over the sky at the top, the buttons at the foot and
   the clip's action between them. */
@media (max-aspect-ratio: 4/5) {
  .hero { align-items: stretch; padding-top: calc(var(--header) + 14px); }
  .hero-media::after {
    background: linear-gradient(180deg, rgba(13, 7, 22, .72) 0%, rgba(13, 7, 22, .4) 26%, rgba(13, 7, 22, 0) 40%, rgba(13, 7, 22, 0) 70%, rgba(13, 7, 22, .7) 88%, var(--night-1) 100%);
  }
  .hero-tag { margin-bottom: auto; }
}
@media (max-width: 640px) {
  .hero { padding-bottom: 84px; }
  .hero-tag { font-size: 1rem; }
  .hero .hero-cta { display: grid; grid-template-columns: 1fr 1fr; width: 100%; max-width: 380px; gap: 10px; }
  .hero .hero-cta .btn { padding-inline: 10px; }
  .hero .wide-only { display: none; }
  .cta .hero-cta { flex-direction: column; align-items: stretch; width: 100%; max-width: 360px; }
}

/* dune ridge between sections (the old site's wave, now desert) */
.dunes { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(40px, 7vw, 96px); pointer-events: none; }
.dunes .far { fill: rgba(185, 97, 42, .16); }
.dunes .near { fill: var(--night-1); }

/* ---------- framed media ---------- */
.frame { position: relative; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 24px 50px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .06); }
.frame img, .frame video { width: 100%; height: 100%; object-fit: cover; }
.vid { aspect-ratio: 16 / 9; }
.vid video { position: absolute; inset: 0; }
.vid .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vid video { opacity: 0; transition: opacity .4s; }
.vid video.ready { opacity: 1; }
.vid-play {
  position: absolute; inset: 0; display: none; align-items: center; justify-content: center;
  background: rgba(10, 5, 18, .25); border: 0;
}
.vid-play::before {
  content: ""; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255, 200, 87, .95) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%232a1606'/%3E%3C/svg%3E") center/26px no-repeat;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}
.manual .vid-play, .vid.blocked .vid-play { display: flex; }
.vid.on .vid-play { display: none !important; }
.tag-live {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  padding: .2em .6em; border-radius: 6px; background: rgba(10, 5, 18, .72);
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- journal paper ----------
   The game's journal pages (AdventureLog's SAdventurePaperScrap): violet scrap paper torn at the edges, a near-black
   inked edge and a hard shadow; pages with a lighter margin, a pencilled gold rule and notebook squares; the selected
   scrap lifted and inked gold; translucent tape over the corners. The torn edges are border-images from paper.css
   (Marketing/Tools/Website/paper_svg.py), drawn one SVG pixel to one CSS pixel like the game's. */
.paper, .paper-list, .scrap, .mat { position: relative; border-style: solid; border-color: transparent; border-image-repeat: round; border-radius: 0; }
.paper {
  --bw: 28px; --sh: 7px; --tw: 76px; --th: 22px;
  border-width: var(--bw); border-image-source: var(--page); border-image-slice: 28; border-image-width: var(--bw);
  background:
    linear-gradient(90deg, rgba(255, 247, 229, .06) 1px, transparent 1px) 10px 10px / 88px 88px,
    linear-gradient(rgba(255, 247, 229, .06) 1px, transparent 1px) 10px 10px / 88px 88px,
    linear-gradient(90deg, rgba(255, 247, 229, .03) 1px, transparent 1px) 10px 10px / 22px 22px,
    linear-gradient(rgba(255, 247, 229, .03) 1px, transparent 1px) 10px 10px / 22px 22px,
    var(--paper-page);
  background-clip: padding-box;
}
.paper.alt { border-image-source: var(--page-b); }
.paper-list {
  --bw: 24px; --sh: 7px; --tw: 58px; --th: 18px;
  border-width: var(--bw); border-image-source: var(--page-list); border-image-slice: 24; border-image-width: var(--bw);
  background: var(--paper-page); background-clip: padding-box;
}
.scrap { --bw: 10px; --sh: 4px; --tw: 44px; --th: 14px; border-width: var(--bw); border-image-source: var(--scrap); border-image-slice: 10 fill; border-image-width: var(--bw); }
.scrap:nth-child(3n+2) { border-image-source: var(--scrap-b); }
.scrap:nth-child(3n) { border-image-source: var(--scrap-c); }
.scrap.tag { border-image-source: var(--scrap-tag); }
.scrap.faint { border-image-source: var(--scrap-faint); }
.scrap.lift { border-image-source: var(--scrap-lift); }
/* (no "fill": the mat's middle is its background, so a picture's colour can sit on the paper) */
.mat { --bw: 12px; --sh: 6px; --tw: 62px; --th: 18px; border-width: var(--bw); border-image-source: var(--mat); border-image-slice: 12; border-image-width: var(--bw); background: var(--paper-lifted); background-clip: padding-box; }
@media (max-width: 640px) {
  .paper { --bw: 21px; --sh: 5px; --tw: 60px; --th: 18px; }
  .paper-list { --bw: 19px; --sh: 5px; }
}

/* Tape: a crooked translucent strip with slanted (torn) ends and lighter long edges, over the corner it holds. */
.tape-tl::before, .tape-tr::after, .tape-b::before, .tape-b::after, .pin::before, .pin::after, .jrow.lift::before {
  content: ""; position: absolute; z-index: 6; pointer-events: none;
  width: var(--tw, 58px); height: var(--th, 18px);
  background:
    linear-gradient(var(--tape-edge), var(--tape-edge)) top / 100% 1px no-repeat,
    linear-gradient(var(--tape-edge), var(--tape-edge)) bottom / 100% 1px no-repeat,
    var(--tape);
  clip-path: polygon(3px 0, 100% 0, calc(100% - 2px) 100%, 0 100%);
}
.tape-tl::before, .jrow.lift::before { left: calc(var(--tw, 58px) * -.17 - var(--bw, 0px)); top: calc(var(--th, 18px) * -.23 - var(--bw, 0px)); transform: rotate(var(--tl, -36deg)); }
.tape-tr::after { right: calc(var(--tw, 58px) * -.17 - var(--bw, 0px) + var(--sh, 0px)); top: calc(var(--th, 18px) * -.23 - var(--bw, 0px)); transform: rotate(var(--tr, 33deg)); }
.tape-b { position: absolute; inset: calc(var(--bw, 0px) * -1); z-index: 6; pointer-events: none; }
.tape-b::before { left: calc(var(--tw, 58px) * -.14); bottom: calc(var(--th, 18px) * -.27 + var(--sh, 0px)); width: calc(var(--tw, 58px) * .94); transform: rotate(31deg); }
.tape-b::after { right: calc(var(--tw, 58px) * -.1 + var(--sh, 0px)); bottom: calc(var(--th, 18px) * -.23 + var(--sh, 0px)); width: calc(var(--tw, 58px) * .96); transform: rotate(-38deg); }
/* A picture taped onto the page: the tape sits on the wrapper so the frame's rounded clip never cuts it. */
.pin { position: relative; --tw: 64px; --th: 19px; }
.pin::before { left: calc(var(--tw) * -.2); top: calc(var(--th) * -.15); transform: rotate(-34deg); }
.pin::after { right: calc(var(--tw) * -.2); top: calc(var(--th) * -.15); transform: rotate(35deg); }
.paper .frame, .pin .frame { border-radius: 3px; }

/* Ink marks: the journal's gold pen underline and arrowhead bullet. */
.paper > h3::after, .ink-ul::after { content: ""; display: block; width: min(168px, 70%); height: 8px; margin-top: 4px; background: var(--ink-underline) left / 100% 100% no-repeat; }
.tag { display: inline-block; padding: 0 6px; font-size: .8rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-gold); line-height: 1.5; }

/* A journal list: a gold label and rule, then rows of scraps (diamond, name, line under it). */
.jlist-head { display: flex; align-items: center; gap: 10px; margin: 2px 2px 12px; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-gold); }
.jlist-head span::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 9px; vertical-align: middle; background: var(--ink-gold); transform: rotate(45deg) translateY(-1px); }
.jlist-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(250, 218, 149, .45), rgba(250, 218, 149, .06)); }
.jlist-head:not(:first-child) { margin-top: 18px; }
.jrows { display: grid; gap: 7px; }
.jrow { --tw: 42px; --th: 13px; display: grid; grid-template-columns: 14px 1fr; align-items: start; column-gap: 11px; padding: 3px 6px 5px 4px; text-align: left; color: inherit; background: none; width: 100%; font: inherit; }
.jrow .dia { width: 14px; height: 14px; margin-top: 5px; background: var(--ink-diamond) center / contain no-repeat; }
.jrow.faint .dia { background-image: var(--ink-diamond-open); }
.jrow b { display: block; color: var(--cream); font-weight: 700; line-height: 1.3; }
.jrow small { display: block; margin-top: 1px; font-size: .86rem; line-height: 1.4; color: var(--muted); }
.jrow.faint b, .jrow.faint small { color: var(--dim); }
.jrow.lift b { color: #fff; }

/* steel-and-gold item card (the game's cards) */
.gcard {
  position: relative; border-radius: 14px;
  border: 2px solid transparent;
  background:
    linear-gradient(180deg, var(--navy-1), var(--navy-2)) padding-box,
    linear-gradient(145deg, #dfe6f4, #6f7c99 32%, #c7d0e4 58%, #4c5876) border-box;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  transform-style: preserve-3d;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.gcard > .caps, .gcard > .caps::before, .gcard > .caps::after, .gcard::before, .gcard::after { pointer-events: none; }
.gcard > .caps { position: absolute; inset: 0; z-index: 4; }
.gcard::before, .gcard::after, .gcard > .caps::before, .gcard > .caps::after {
  content: ""; position: absolute; z-index: 4; width: 20px; height: 20px; border: 3px solid var(--gold);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}
.gcard::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.gcard::after { bottom: -4px; right: -4px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.gcard > .caps::before { top: -4px; right: -4px; border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
.gcard > .caps::after { bottom: -4px; left: -4px; border-right: 0; border-top: 0; border-bottom-left-radius: 10px; }
.gcard .shine {
  position: absolute; inset: 0; border-radius: 12px; pointer-events: none; z-index: 3; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .16), transparent 45%);
  transition: opacity .25s;
}
.gcard:hover .shine { opacity: 1; }

/* reveal on scroll */
.js .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s !important; }
.rv-d2 { transition-delay: .16s !important; }
.rv-d3 { transition-delay: .24s !important; }

/* ---------- trailer ---------- */
.sec-trailer { padding-top: clamp(40px, 6vw, 72px); }
.yt { position: relative; max-width: 980px; margin: 0 auto; aspect-ratio: 16 / 9; }
.yt-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; }
.yt-btn img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(1.1); transition: filter .3s, transform .6s var(--ease); }
.yt-btn:hover img { filter: brightness(.75) saturate(1.15); transform: scale(1.02); }
.yt-btn .play {
  position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-deep));
  box-shadow: 0 0 0 10px rgba(255, 200, 87, .18), 0 14px 40px rgba(0, 0, 0, .55);
  transition: transform .3s var(--ease);
}
.yt-btn:hover .play { transform: scale(1.07); }
.yt-btn .play svg { width: 38px; height: 38px; margin-left: 5px; fill: #2a1606; }
.yt-btn .yt-label { position: absolute; left: 0; right: 0; bottom: 18px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .8rem; color: #fff; text-shadow: 0 2px 8px #000; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* the journal's info strips: a gold label over the line, on a scrap taped at its corner */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 40px auto 0; max-width: 980px; }
.facts li { padding: 5px 10px 7px; font-size: .98rem; line-height: 1.35; color: var(--cream); }
.facts li:nth-child(2) { transform: rotate(.6deg); }
.facts li:nth-child(3) { transform: rotate(-.5deg); }
.facts b { display: block; margin-bottom: 2px; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-gold); }
@media (max-width: 820px) { .facts { grid-template-columns: 1fr 1fr; gap: 14px; } }

/* ---------- story ---------- */
.sec-story {
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(157, 78, 221, .16), transparent 70%),
    linear-gradient(180deg, transparent, rgba(22, 12, 38, .55) 50%, transparent);
}
.story-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.story-text p:not(.kicker):not(.cap):not(.note) { font-size: 1.08rem; }
.story-text .pull { color: var(--ivory); font-weight: 600; font-size: 1.15rem; }
.story-text .note { margin-top: 1.2em; transform: rotate(-1.5deg); color: var(--gold-hi); font-size: 1.5rem; }
.collage { position: relative; min-height: 520px; }
.clip { position: absolute; margin: 0; width: 70%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); transition: transform .4s var(--ease); }
.clip img { width: 100%; }
.clip figcaption { font-family: var(--font-hand); font-size: 1.15rem; color: var(--ivory); margin-top: 2px; padding-left: 8%; }
.clip:hover { transform: rotate(0deg) scale(1.03) !important; z-index: 5; }
.clip.c1 { top: 0; left: 0; transform: rotate(-4deg); }
.clip.c2 { top: 30%; right: 0; transform: rotate(3deg); z-index: 2; }
.clip.c3 { bottom: 0; left: 8%; transform: rotate(-1.5deg); z-index: 3; }
.collage .from { position: absolute; right: 0; bottom: -28px; margin: 0; font-size: .8rem; color: var(--dim); letter-spacing: .06em; }
.lamoria { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 4vw, 56px); align-items: center; margin-top: clamp(72px, 9vw, 120px); }
.lamoria figure { margin: 0; }
.lamoria figcaption { font-family: var(--font-hand); color: var(--ivory); font-size: 1.3rem; text-align: center; margin-top: 4px; }
.relics .kicker::before { display: none; }
.relics .jlist { margin-top: 22px; padding: 4px 2px 2px; }
.relics .jrows { grid-template-columns: 1fr 1fr; gap: 8px 10px; }
@media (max-width: 420px) { .relics .jrows { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .story-grid, .lamoria { grid-template-columns: 1fr; }
  .collage { min-height: 0; display: grid; gap: 26px; }
  .clip { position: relative; width: 92%; inset: auto !important; }
  .clip.c2 { justify-self: end; }
  .collage .from { position: static; text-align: right; }
}

/* ---------- cast ---------- */
.sec-cast { background: radial-gradient(1000px 600px at 50% 0%, rgba(157, 78, 221, .14), transparent 70%); }
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 28px); }
.cast-card { display: flex; flex-direction: column; padding: 4px 6px 8px; }
/* the character pinned to the page on a lifted mat, taped at its top corners, with the character's own colour behind */
.cast-art {
  height: 270px; display: flex; align-items: flex-end; justify-content: center; margin: 0 0 10px; padding: 10px 6px 0;
  background: radial-gradient(60% 46% at 50% 74%, var(--glow, rgba(157, 78, 221, .45)), transparent 70%), var(--paper-lifted);
  background-clip: padding-box;
}
.cast-art img { position: relative; z-index: 1; max-height: 100%; width: auto; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .45)); transform: rotate(var(--tilt, -2deg)); transition: transform .4s var(--ease); }
.cast-card:hover .cast-art img { transform: rotate(0deg) translateY(-6px) scale(1.03); }
.cast-name { font-size: clamp(2rem, 3vw, 2.4rem); color: var(--ivory); margin: 4px 0 2px; font-weight: 400; }
.cast-card > h3.cast-name::after { margin-top: 2px; }
.cast-role { margin: 0 0 .6em; font-family: var(--font-kick); font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.cast-card p { font-size: 1rem; }
.cast-card .note { margin: auto 0 0; padding-top: 6px; font-size: 1.2rem; color: var(--gold-hi); }
.cast-lost { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: .8fr 1fr 1fr; gap: clamp(18px, 2.4vw, 28px); align-items: stretch; }
.cast-lost .lost-intro { align-self: center; }
.cast-lost .lost-intro h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: .4em; }
@media (max-width: 980px) {
  .cast-lost { grid-template-columns: 1fr 1fr; }
  .cast-lost .lost-intro { grid-column: 1 / -1; }
  .cast { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 16px; margin-inline: calc(var(--gutter) * -1); padding: 22px var(--gutter) 18px; scrollbar-width: none; }
  .cast::-webkit-scrollbar { display: none; }
  .cast .cast-card { flex: 0 0 46%; scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .cast .cast-card { flex: 0 0 84%; scroll-snap-align: center; }
  .cast-lost { grid-template-columns: 1fr; }
  .cast-art { height: 240px; }
}

/* ---------- core move ---------- */
.sec-staff { background: radial-gradient(900px 520px at 20% 30%, rgba(228, 91, 215, .1), transparent 70%); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); counter-reset: step; }
.step .frame { margin-bottom: 16px; }
.step-n { font-family: var(--font-cap); font-style: italic; font-weight: 800; color: var(--cap-yellow); text-shadow: .06em .06em 0 var(--cap-purple); font-size: 1.1rem; margin-right: .4em; }
.step h3 { display: flex; align-items: baseline; font-size: 1.45rem; margin-bottom: .3em; }
.step p { font-size: 1rem; }
.tricks { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: clamp(28px, 4vw, 44px); }
.tricks li { font-family: var(--font-hand); font-size: 1.3rem; color: var(--ivory); display: flex; align-items: center; gap: .55em; }
.tricks li::before { content: ""; width: 16px; height: 16px; background: var(--ink-bullet) center / contain no-repeat; flex: none; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; } }

/* ---------- the Umbral Station ---------- */
.sec-station { padding-top: 0; background: linear-gradient(180deg, rgba(20, 9, 34, .9), rgba(16, 8, 28, .4) 60%, transparent); }
.station-banner, .town-banner { position: relative; min-height: clamp(380px, 52vw, 620px); display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; padding: 96px var(--gutter) 120px; }
.station-banner > img, .town-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.06); }
.station-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(20, 9, 34, .3), rgba(20, 9, 34, .78)),
    linear-gradient(180deg, var(--night-1) 0%, rgba(20, 9, 34, .1) 22%, rgba(20, 9, 34, .25) 70%, #140922 100%);
}
.station-banner .hand-h, .town-banner .hand-h { font-size: clamp(3rem, 8.4vw, 6rem); }
.station-banner .cap, .town-banner .cap { font-size: clamp(1.4rem, 3.2vw, 2.2rem); margin-top: .2em; }
.station-lead, .town-lead { position: relative; max-width: 760px; margin: -36px auto clamp(36px, 5vw, 56px); text-align: center; }
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 3.4vw, 44px) clamp(22px, 3vw, 40px); }
.st-card { padding: 6px 8px 10px; }
.st-card:nth-child(2) { transform: rotate(.5deg); }
.st-card:nth-child(3) { transform: rotate(-.4deg); }
.st-card .pin { margin-bottom: 16px; }
.st-card .frame { aspect-ratio: 16 / 9; }
.st-card h3 { font-size: 1.4rem; color: var(--cream); }
.st-card p { margin: 10px 0 0; font-size: 1rem; }
@media (max-width: 760px) { .st-grid { grid-template-columns: 1fr; } .st-card:nth-child(n) { transform: none; } }

/* leaving the station: the three steps after the offering, under the two pages */
.depart { margin-top: clamp(48px, 6vw, 76px); text-align: center; }
.depart .steps { margin-top: 8px; text-align: left; }
.steps .pin { --tw: 56px; --th: 17px; margin-bottom: 16px; }
.steps .pin .frame { border-radius: 3px; }

/* ---------- how a world plays: journal tabs over one big clip ---------- */
.loop { margin-top: clamp(40px, 5vw, 64px); text-align: center; }
.loop-tabs { display: flex; justify-content: center; gap: 10px; margin: 6px auto 0; padding: 6px 4px 14px; overflow-x: auto; scrollbar-width: none; }
.loop-tabs::-webkit-scrollbar { display: none; }
.loop-tab { flex: none; display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 8px; padding: 2px 14px 4px 10px;
  background: none; color: var(--muted); font-weight: 700; font-size: 1.02rem; cursor: pointer; transition: color .2s, transform .2s var(--ease); }
.loop-tab:hover { color: #fff; transform: translateY(-2px); }
.loop-tab.lift { color: #fff; }
.lt-n { font-family: var(--font-cap); font-style: italic; font-weight: 800; font-size: 1.15rem; line-height: 1; color: var(--cap-yellow); text-shadow: .06em .06em 0 var(--cap-purple); }
.jprog { grid-column: 1 / -1; display: block; height: 6px; margin-top: 3px; opacity: 0;
  background: var(--ink-underline) left / 100% 100% no-repeat; transform-origin: left; transform: scaleX(var(--p, 0)); }
.loop-tab.lift .jprog { opacity: 1; }
.loop-view { max-width: 980px; margin: 0 auto; padding: 6px 8px 8px; text-align: left; }
.loop-view .frame { aspect-ratio: 16 / 9; }
.loop-cap { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; }
.jv-n { font-family: var(--font-cap); font-style: italic; font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--cap-yellow); text-shadow: .06em .06em 0 var(--cap-purple); }
.loop-cap b { font-size: 1.3rem; color: var(--cream); }
.loop-cap [data-p-text] { color: var(--muted); }
@media (max-width: 640px) {
  .loop-tabs { justify-content: flex-start; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .loop-cap [data-p-text] { flex-basis: 100%; }
}

/* ---------- Velyxara ---------- */
.sec-town { padding-top: 0; padding-bottom: clamp(24px, 4vw, 48px); background: linear-gradient(180deg, rgba(26, 13, 20, .9) 0%, rgba(21, 10, 24, .6) 45%, transparent 100%); }
.town-banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(26, 13, 20, .35), rgba(26, 13, 20, .75)),
    linear-gradient(180deg, var(--night-1) 0%, rgba(26, 13, 20, .1) 22%, rgba(26, 13, 20, .2) 70%, #1a0d14 100%);
}
.town-lead { margin-bottom: 0; }

/* ---------- abilities: one big clip, picked from taped thumbnails by category ---------- */
.sec-abilities { background: radial-gradient(1000px 600px at 80% 10%, rgba(157, 78, 221, .16), transparent 70%); }
.book-tabs button { padding: 1px 10px 3px; background: none; font-weight: 700; font-size: .9rem; color: var(--muted); transition: color .2s, transform .2s var(--ease); }
.book-tabs button:hover { color: #fff; transform: translateY(-2px); }
.book-tabs button[aria-selected="true"] { border-image-source: var(--scrap-lift); color: var(--ink-gold); }
.skill-view { display: grid; grid-template-columns: 1.75fr 1fr; gap: clamp(18px, 2.6vw, 34px); align-items: center; margin: 0; padding: 6px 8px 8px; }
.skill-view .frame { aspect-ratio: 16 / 9; }
.skill-info h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); color: var(--cream); margin: 12px 0 8px; }
.skill-info p { font-size: 1.05rem; }
.skill-info .tag { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.vid-zoom { position: absolute; right: 10px; top: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(10, 5, 18, .55); display: grid; place-items: center; opacity: .85; transition: opacity .2s, background-color .2s; }
.vid-zoom:hover { opacity: 1; background: rgba(61, 31, 107, .85); }
.vid-zoom svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.skill-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 26px; margin-top: clamp(26px, 3.4vw, 40px); }
.skill-group .jlist-head { margin-bottom: 8px; }
.skill-thumbs { display: flex; gap: 12px; }
.thumb { --tw: 36px; --th: 12px; width: 156px; flex: none; padding: 3px 3px 5px; background: none; text-align: left; cursor: pointer;
  transition: transform .2s var(--ease); }
.thumb:nth-child(odd) { transform: rotate(-.8deg); }
.thumb:nth-child(even) { transform: rotate(.7deg); }
.thumb:hover, .thumb.lift { transform: translateY(-3px); }
.thumb .frame { display: block; aspect-ratio: 16 / 9; border-radius: 2px; box-shadow: none; }
.thumb .frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.85); transition: filter .2s; }
.thumb:hover .frame img, .thumb.lift .frame img { filter: none; }
.thumb-name { display: block; margin-top: 5px; font-weight: 700; font-size: .84rem; line-height: 1.25; color: var(--muted); }
.thumb.lift .thumb-name { color: var(--ink-gold); }
.vigil { display: grid; grid-template-columns: minmax(0, 520px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: clamp(44px, 6vw, 72px); }
.vigil .frame { aspect-ratio: 16 / 9; }
.vigil h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: .4em; }
@media (max-width: 900px) {
  .skill-view { grid-template-columns: 1fr; }
  .skill-strip { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 14px; scrollbar-width: none; }
  .skill-strip::-webkit-scrollbar { display: none; }
  .thumb { width: 138px; }
}
@media (max-width: 820px) { .vigil { grid-template-columns: 1fr; } }

/* the journal's Enemies page: each enemy on a scrap, portrait pinned on a mat, its kind and one tip */
.book-intro { max-width: 760px; margin: 2px 4px 18px; }
.en-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 18px; }
.en { --tw: 46px; --th: 14px; display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; padding: 4px 6px 8px 4px; }
.en .portrait { --tw: 40px; --th: 12px; padding: 0; }
.en .portrait .zoom, .en .portrait .frame { border-radius: 0; box-shadow: none; }
.en .portrait img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.en h3 { font-size: 1.1rem; color: var(--cream); margin: 2px 0 8px; }
.en-type { font-size: .72rem; }
.en .tip { display: grid; grid-template-columns: 16px 1fr; gap: 8px; margin: 10px 0 0; font-size: .95rem; line-height: 1.45; color: var(--text); }
.en .tip::before { content: ""; width: 16px; height: 16px; margin-top: 3px; background: var(--ink-bullet) center / contain no-repeat; }
.en.boss h3 { color: var(--ink-gold); }
@media (max-width: 1000px) { .en-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .en-grid { grid-template-columns: 1fr; } }

/* ---------- journal ---------- */
.sec-journal { background: radial-gradient(1000px 600px at 50% 0%, rgba(157, 78, 221, .18), transparent 70%); }
.book { padding: 4px 6px 8px; }
.book-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px 4px 16px; }
.book-tabs::-webkit-scrollbar { display: none; }
.book-tabs button { flex: none; white-space: nowrap; }
.book-view { display: grid; grid-template-columns: 1.55fr .45fr; gap: clamp(16px, 2.4vw, 28px); align-items: center; }
.book-view .frame { aspect-ratio: 16 / 9; background: #12081f; border-radius: 3px; }
.book-text .btn { margin-top: 4px; }
.book-view .frame img { object-fit: contain; }
.book-text h3 { font-family: var(--font-hand); font-weight: 400; font-size: 2rem; color: var(--ivory); margin-bottom: .2em; }
.book-text p { font-size: 1rem; }
.book-panel[hidden] { display: none; }
@media (max-width: 900px) { .book-view { grid-template-columns: 1fr; } }

/* the journal's Outfits page: the game's own item cards; each opens full size */
.fits { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 22px; }
.fit { padding: 8px 8px 12px; text-align: center; }
.fit .zoom { border-radius: 9px; }
.fit img { position: relative; z-index: 1; border-radius: 9px; width: 100%; aspect-ratio: 1; object-fit: cover; }
.fit > span:last-child { display: block; margin-top: 8px; font-weight: 700; font-size: .88rem; color: #fff; }
.worlds .pin { --tw: 76px; --th: 22px; }
@media (max-width: 900px) { .fits { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { .fits { grid-template-columns: repeat(2, 1fr); } }

/* ---------- worlds ---------- */
.sec-worlds { background: radial-gradient(900px 600px at 50% 40%, rgba(255, 200, 87, .07), transparent 70%); }
.worlds { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.worlds .frame { aspect-ratio: 16 / 9; }
.worlds .jlist { padding: 6px 4px 4px; }
.world-list .jrow { grid-template-columns: 30px 1fr; }
.world-list .wn { font-family: var(--font-cap); font-style: italic; font-weight: 800; font-size: 1.5rem; line-height: 1.1; color: var(--cap-yellow); text-shadow: .06em .06em 0 var(--cap-purple); text-align: center; }
.world-list .faint .wn { color: var(--dim); text-shadow: none; }
.world-list .state { display: inline-block; margin-top: 4px; font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.state.now { color: #9ef0b0; }
.state.next { color: var(--ink-gold); }
@media (max-width: 900px) { .worlds { grid-template-columns: 1fr; } }

/* pictures that open full size: a quiet enlarge mark that shows on hover (always on touch screens) */
.zoom { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: inherit; color: inherit; }
.zoom > .frame { display: block; }
.zoom-ico { position: absolute; right: 8px; bottom: 8px; z-index: 3; width: 32px; height: 32px; border-radius: 9px; pointer-events: none;
  background: rgba(10, 5, 18, .6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  opacity: 0; transition: opacity .2s; }
.zoom:hover .zoom-ico, .zoom:focus-visible .zoom-ico { opacity: 1; }
@media (hover: none) { .zoom-ico { opacity: .85; } }
.lb-fig video { max-width: 100%; max-height: calc(100dvh - 140px); width: min(1280px, 100%); border-radius: 10px; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-btn[hidden] { display: none; }

/* ---------- gallery ---------- */
.sec-media { background: linear-gradient(180deg, transparent, rgba(6, 3, 11, .6) 50%, transparent); }
.gallery { columns: 3 280px; column-gap: 16px; }
@media (max-width: 640px) { .gallery { columns: 2; column-gap: 10px; } .shot { margin-bottom: 12px; } .shot .cap-line { font-size: 1rem; line-height: 1.2; } }
.shot { break-inside: avoid; margin: 0 0 16px; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; }
.shot .frame { border-radius: 12px; }
.shot img { transition: transform .6s var(--ease), filter .3s; }
.shot:hover img { transform: scale(1.04); filter: brightness(1.08); }
.shot figcaption, .shot .cap-line { display: block; margin-top: 6px; font-family: var(--font-hand); font-size: 1.15rem; color: var(--ivory); }
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 3, 11, .94); color: #fff; }
.lightbox::backdrop { background: rgba(6, 3, 11, .7); }
.lightbox[open] { display: block; }
.lb-fig { margin: 0; padding: 70px 70px 24px; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; }
.lb-fig img { max-width: 100%; max-height: calc(100dvh - 140px); width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lb-cap { padding: 0 20px; font-family: var(--font-hand); font-size: 1.35rem; color: var(--ivory); text-align: center; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(20, 10, 34, .7); display: grid; place-items: center; }
.lb-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lb-btn:hover { background: var(--violet-3); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lb-next { right: 12px; top: 50%; margin-top: -24px; }
@media (max-width: 640px) { .lb-fig { padding: 64px 10px 84px; } .lb-prev, .lb-next { top: auto; bottom: 18px; } .lb-prev { left: 18px; } .lb-next { right: 18px; } .lb-cap { padding: 0 12px; } }

/* ---------- team (the old site's hex studio) ---------- */
.sec-team {
  background-color: #0b0710;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%231c1429' fill-opacity='0.45' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.sec-team::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 140px; pointer-events: none; background: linear-gradient(180deg, var(--night-1), rgba(11, 7, 16, 0)); }
.studio { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 4vw, 64px); align-items: center; margin-bottom: clamp(44px, 6vw, 72px); }
.studio-logo { width: 120px; margin-bottom: 14px; filter: drop-shadow(0 0 16px rgba(255, 200, 87, .35)); }
.studio figure { margin: 0; justify-self: center; width: min(420px, 100%); transform: rotate(2deg); }
.studio figure .frame { aspect-ratio: 1100 / 1467; border: 8px solid #f3ead8; border-bottom-width: 40px; border-radius: 4px; }
.studio figcaption { margin-top: -34px; position: relative; z-index: 2; text-align: center; font-family: var(--font-hand); font-size: 1.15rem; color: #3a2a4a; padding: 0 14px; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px 18px; }
.member {
  --tw: 42px; --th: 13px;
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 10px 12px;
  text-decoration: none; transition: transform .3s var(--ease);
}
.member:nth-child(even) { transform: rotate(.6deg); }
.member:hover { transform: translateY(-6px); border-image-source: var(--scrap-lift); }
.member img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(250, 218, 149, .35); margin-bottom: 14px; transition: border-color .3s, transform .3s; }
.member:hover img { border-color: var(--ink-gold); transform: scale(1.05); }
.member h3 { font-size: 1.08rem; color: var(--cream); margin-bottom: 4px; }
.member span { font-size: .88rem; color: var(--sand); font-style: italic; }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr 1fr; gap: 10px; } .member { padding: 14px 6px 10px; } .member img { width: 72px; height: 72px; } .member h3 { font-size: .98rem; } .member span { font-size: .8rem; } }

/* ---------- wishlist band ---------- */
.cta { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(64px, 9vw, 110px); background: linear-gradient(120deg, #2a1150 0%, #3b1a66 45%, #5b2a2a 100%); }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 300px at 80% 50%, rgba(255, 200, 87, .25), transparent 70%); }
.cta-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 60px); align-items: center; }
.cta-art { width: clamp(150px, 22vw, 260px); transform: rotate(-6deg); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .45)); }
.cta h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: .25em; }
.cta p { color: #eadff7; max-width: 560px; }
.cta .hero-cta { justify-content: flex-start; }
@media (max-width: 700px) {
  .cta-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .cta .hero-cta { justify-content: center; }
  .cta p { margin-inline: auto; }
}

/* ---------- footer ---------- */
.site-footer { background: #040207; padding: 56px 0 40px; border-top: 1px solid #1c1429; text-align: center; }
.foot-brand { font-family: var(--font-kick); font-weight: 700; letter-spacing: .18em; color: var(--gold); text-transform: uppercase; }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: 22px 0; }
.socials a {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: #120b1d; border: 1px solid #261a38; color: #fff; font-size: 1.2rem; text-decoration: none;
  transition: transform .3s var(--ease), background-color .3s, color .3s, box-shadow .3s;
}
.socials a svg { width: 18px; height: 18px; fill: currentColor; }
.socials a:hover { background: var(--gold); color: #1d1006; transform: translateY(-4px); box-shadow: 0 0 18px rgba(255, 200, 87, .4); }
.contact { font-size: .95rem; }
.contact a { color: var(--gold-hi); }
.legal { margin-top: 18px; font-size: .78rem; color: var(--dim); }
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 48px; height: 48px; border-radius: 50%; border: 0;
  display: grid; place-items: center; background: var(--gold); box-shadow: 0 6px 18px rgba(255, 200, 87, .3);
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; fill: none; stroke: #2a1606; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .rv { opacity: 1; transform: none; }
  .js .hand .pens path { opacity: 1; stroke-dashoffset: 0; animation: none; }
  .hand .ink { mask: none; }
  .hero-logo img { animation: none; }
}

/* carousels: mouse users get a thin scrollbar to drag; touch users swipe */
@media (hover: hover) and (pointer: fine) {
  .cast { scrollbar-width: thin; scrollbar-color: rgba(255, 200, 87, .55) transparent; }
  .cast::-webkit-scrollbar { display: block; height: 6px; }
  .cast::-webkit-scrollbar-thumb { background: rgba(255, 200, 87, .55); border-radius: 6px; }
}

/* ---------- the journal map (assets/js/map.js): the game's own map of Velyxara, charted by double-click ---------- */
.vmap-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 4px 12px; }
.vmap-title { margin: 0; font-family: var(--font-hand); font-size: 2rem; line-height: 1; color: var(--ivory); }
.vmap-stats { margin: 0; font-family: var(--font-hand); font-size: 1.05rem; color: var(--ivory); padding: 2px 12px 4px; }
.vmap-tools { display: flex; gap: 8px; margin-left: auto; }
.vmap-tools button { font: 700 .82rem/1 var(--font-body, inherit); letter-spacing: .06em; color: var(--muted); padding: 6px 12px 8px; background: none; cursor: pointer; transition: color .2s, transform .2s var(--ease); }
.vmap-tools button:hover, .vmap-tools button:focus-visible { color: var(--ink-gold); transform: translateY(-2px); }
.vmap-tools button[data-vmap-act="in"], .vmap-tools button[data-vmap-act="out"] { font-size: 1.1rem; min-width: 38px; }
.vmap-page { position: relative; height: clamp(320px, 44vw, 600px); background: #220e2f; border: 2px solid #0d0314; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(250, 218, 149, .08), inset 0 0 60px rgba(0, 0, 0, .45), 6px 7px 0 rgba(0, 0, 0, .55); overflow: hidden; }
.vmap-page canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: none; }
.vmap.is-dragging canvas { cursor: grabbing; }
.vmap-page canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--ink-gold); }
.vmap-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-2deg); margin: 0; pointer-events: none;
  font-family: var(--font-hand); font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--ink-gold); text-align: center; text-shadow: 0 2px 10px rgba(0, 0, 0, .8);
  opacity: 0; transition: opacity .6s; }
.vmap.is-ready .vmap-hint { opacity: .95; animation: vmap-breathe 2.6s ease-in-out infinite; }
.vmap.is-ready .vmap-hint.is-gone { opacity: 0; animation: none; }
@keyframes vmap-breathe { 50% { opacity: .55; } }
.vmap-fail { display: none; position: absolute; inset: auto 0 45% 0; text-align: center; color: var(--muted); }
.vmap.is-failed .vmap-fail { display: block; }
.vmap-help { margin: 10px 6px 0; font-family: var(--font-hand); font-size: 1.1rem; color: var(--ivory); opacity: .85; }
.on-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .on-touch { display: inline; } .on-mouse { display: none; } }
.vmap-text { margin-top: 18px; max-width: 760px; }
@media (max-width: 620px) {
  .vmap-tools { margin-left: 0; width: 100%; }
  .vmap-page { height: 72vw; min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) { .vmap.is-ready .vmap-hint { animation: none; } }
