/* ReSim Studio – site design. Self-hosted fonts, no external resources. */
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('/assets/e9ad38d13f20-xMQ9uFFYT72X5wkB_18qmnndmSdSnh2BAfO5mnuyOo1lfiQwV6-xo6eeIw.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('/assets/30c073f90a4f-xMQ9uFFYT72X5wkB_18qmnndmSdSnh2BAfO5mnuyOo1lfiQwWa-xo6eeI7fM.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/b6206db2d486--nFnOHM81r4j6k0gjAW3mujVU2B2G_Bx0vrx52g.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Serif Display'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/assets/1f99754283fd--nFnOHM81r4j6k0gjAW3mujVU2B2G_5x0vrx52jJ3Q.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* light theme in the colours of the original site: warm paper, ink #242833, rust accent #c84a26 */
  --ink: #fffaf8; --ink-2: #ffffff; --ink-3: #f6ede7; --ink-4: #e9ddd5;
  --line: #ece2db; --line-strong: #dccdc2;
  --text: #242833; --muted: #5b5f6d; --faint: #80838f;
  --gold: #c84a26; --gold-2: #a93b1b; --gold-ink: #ffffff; --ember: #e0703f;
  --paper: #f7eee8; --paper-2: #f1e5dc; --paper-ink: #242833; --paper-muted: #5b5f6d; --paper-line: #e3d6cc;
  --wash: 255,250,248; --card: #ffffff; --ghost: rgba(255,255,255,.7); --chip: rgba(255,255,255,.9); --lede: #3b3f4b; --hover: rgba(36,40,51,.06);
  --fan-1: #fbe9df; --fan-2: #f1e2d8;
  --serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sans: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px; --radius-sm: 10px;
  --shadow: 0 22px 50px -28px rgba(60,35,20,.35);
  --header-h: 68px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 1rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.005em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.2vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); }
p { margin: 0 0 1em; text-wrap: pretty; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--gold-ink); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.icon-sm { width: 1em; height: 1em; }
.wrap { width: min(1240px, 100%); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.narrow { width: min(820px, 100%); }
.eyebrow { display: inline-flex; align-items: center; gap: .6em; font: 600 .74rem/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 0 1.1rem; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: color-mix(in srgb, var(--text) 82%, transparent); max-width: 40em; }
.muted { color: var(--muted); }
.subtle { color: var(--muted); font-size: .9rem; }
.note { font-size: .82rem; color: var(--faint); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .9em 1.35em; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font: 600 .95rem/1 var(--sans); text-decoration: none; border: 1px solid transparent; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; box-shadow: 0 10px 26px -14px rgba(200,74,38,.8); }
.btn:hover { background: var(--gold-2); transform: translateY(-1px); }
.btn-ghost { background: var(--ghost); color: var(--text); border-color: var(--line-strong); box-shadow: none; backdrop-filter: blur(6px); }
.btn-ghost:hover { background: var(--card); border-color: var(--gold); }
.btn-small { padding: .62em 1em; font-size: .82rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.text-link { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; color: var(--gold-2); text-decoration: none; }
.text-link:hover .icon { transform: translateX(3px); }
.text-link .icon { transition: transform .2s; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(var(--wash),.86); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.page-home .site-header:not(.scrolled), .has-hero .site-header:not(.scrolled) { background: rgba(var(--wash),.55); border-color: transparent; }
.page-home .site-main, .has-hero .site-main { margin-top: calc(-1 * var(--header-h)); }
.bar { height: 100%; display: flex; align-items: center; gap: 1.5rem; width: min(1400px, 100%); margin-inline: auto; padding-inline: clamp(16px, 3vw, 32px); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font: 400 1.3rem/1 var(--serif); color: var(--text); flex: none; }
.brand img { width: 40px; height: 40px; }
.brand b { font-weight: 400; color: var(--gold); margin-left: .25em; }
.nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: .35rem; margin: 0; padding: 0; }
.nav ul a { display: block; padding: .5rem .8rem; border-radius: 999px; text-decoration: none; font-size: .92rem; color: color-mix(in srgb, var(--text) 86%, transparent); }
.nav ul a:hover, .nav ul a[aria-current] { color: var(--text); background: var(--hover); }
.nav ul a[aria-current] { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 999px 999px 999px 999px; }
.nav-tools { display: flex; align-items: center; gap: .5rem; }
.tool, .lang { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-width: 40px; height: 40px; padding: 0 .7rem; border-radius: 999px; text-decoration: none; border: 1px solid var(--line-strong); font: 600 .78rem/1 var(--sans); letter-spacing: .08em; }
.tool:hover, .lang:hover { background: var(--card); border-color: var(--gold); }
.tool-label { display: none; }
.menu-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); color: inherit; align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .js .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 1rem; padding: 1rem clamp(16px,4vw,32px) 1.5rem; background: var(--ink); border-bottom: 1px solid var(--line); max-height: calc(100svh - var(--header-h)); overflow: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: .2s ease; }
  .js .site-header.open .nav { transform: none; opacity: 1; visibility: visible; }
  .js .site-header.open { background: var(--ink) !important; }
  .nav ul { flex-direction: column; }
  .nav ul a { font-size: 1.15rem; padding: .8rem .4rem; border-radius: 8px; border-bottom: 1px solid var(--line); }
  .nav ul a[aria-current] { box-shadow: none; color: var(--gold-2); }
  .nav-tools { flex-wrap: wrap; }
  .tool-label { display: inline; }
  .no-js .nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--ink); padding: 1rem; flex-direction: column; align-items: stretch; }
  .no-js .menu-toggle { display: none; }
}

/* sections */
.section { padding-block: clamp(72px, 10vw, 140px); position: relative; }
.section-tight { padding-block: clamp(48px, 7vw, 90px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head > div { max-width: 46rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .9rem 0 0; color: var(--muted); }
.paper { background: var(--paper); color: var(--paper-ink); color-scheme: light; }
.paper .eyebrow { color: var(--gold-2); }
.paper .muted, .paper .section-head p { color: var(--paper-muted); }
.paper .lede { color: color-mix(in srgb, var(--paper-ink) 80%, transparent); }
.paper .text-link { color: var(--gold-2); }
.paper .btn-ghost { color: var(--paper-ink); border-color: var(--paper-line); background: var(--ghost); }
.glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 80% 0%, rgba(200,74,38,.07), transparent 70%), radial-gradient(50% 50% at 0% 100%, rgba(224,112,63,.06), transparent 70%); }

/* hero */
.hero { position: relative; min-height: min(100svh, 980px); display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero-media, .hero-media video, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(var(--wash),.97) 0%, rgba(var(--wash),.93) 42%, rgba(var(--wash),.55) 62%, rgba(var(--wash),0) 80%), linear-gradient(180deg, rgba(var(--wash),.6) 0%, rgba(var(--wash),0) 18%, rgba(var(--wash),0) 80%, var(--ink) 100%); }
.hero-inner { padding-block: calc(var(--header-h) + 60px) clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 13ch; margin-bottom: .35em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede { margin-bottom: 2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-top: 2.4rem; color: var(--muted); font-size: .85rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .5rem; }
.hero-meta span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding-block: calc(var(--header-h) + clamp(64px, 10vw, 130px)) clamp(48px, 7vw, 90px); }
.page-hero .hero-media { z-index: -2; }
.page-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(var(--wash),.97) 0%, rgba(var(--wash),.88) 40%, rgba(var(--wash),.35) 70%, rgba(var(--wash),.1) 100%), linear-gradient(180deg, rgba(var(--wash),0) 70%, var(--ink) 100%); }
.page-hero h1 { max-width: 16ch; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1.2rem; }
.crumbs a { color: inherit; }

/* three worlds */
.worlds3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 1.6vw, 22px); }
.world { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; isolation: isolate; text-decoration: none; color: var(--text); background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .3s ease, box-shadow .3s ease; }
.world:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(60,35,20,.45); }
.world > .media, .world > video, .world > img, .world > .covers-fan { position: relative; flex: 1 1 auto; width: 100%; min-height: clamp(220px, 22vw, 290px); height: auto; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.world:hover > .media, .world:hover > video, .world:hover > img { transform: scale(1.05); }
.world-body { padding: clamp(20px, 2.4vw, 32px); }
.world-body { position: relative; z-index: 1; background: var(--card); }
.world-kicker { display: inline-block; padding: .35em .75em; border-radius: 999px; background: rgba(200,74,38,.08); color: var(--gold-2); border: 1px solid rgba(200,74,38,.2); font: 600 .7rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.world h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-bottom: .35em; }
.world p { color: var(--muted); margin-bottom: 1.1rem; font-size: .95rem; }
.world .text-link { color: var(--gold); }
.covers-fan { display: flex; align-items: center; justify-content: center; padding: 1.5rem 0; background: radial-gradient(80% 70% at 50% 40%, var(--fan-1), var(--fan-2) 80%); }
.covers-fan img { width: 30%; border-radius: 6px; box-shadow: 0 18px 34px -10px rgba(40,20,10,.5); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.covers-fan img:nth-child(1) { transform: rotate(-11deg) translate(34%, 6%); }
.covers-fan img:nth-child(2) { transform: translateY(-4%); z-index: 2; }
.covers-fan img:nth-child(3) { transform: rotate(11deg) translate(-34%, 6%); }
.world:hover .covers-fan img:nth-child(1) { transform: rotate(-15deg) translate(30%, 4%); }
.world:hover .covers-fan img:nth-child(3) { transform: rotate(15deg) translate(-30%, 4%); }
.world:hover .covers-fan img:nth-child(2) { transform: translateY(-8%); }

/* split feature */
.split { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.split.flip { grid-template-columns: 1fr 1.15fr; }
.split.flip > .split-media { order: 2; }
.split-media { position: relative; }
.frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #1d212d; }
.frame video, .frame img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.frame-tag { position: absolute; left: 14px; top: 14px; padding: .35em .7em; border-radius: 999px; background: var(--chip); color: var(--text); font: 600 .68rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; backdrop-filter: blur(6px); }
.float-card { position: absolute; right: -18px; bottom: -28px; width: 42%; border-radius: 14px; overflow: hidden; border: 4px solid var(--card); box-shadow: 0 26px 50px -20px rgba(60,35,20,.55); }
.float-card img { aspect-ratio: 16/10; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 1.8rem 0; }
.facts div { background: var(--card); padding: .9rem 1.1rem; }
.facts dt { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.facts dd { margin: 0; font-weight: 600; font-size: .95rem; }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: .8rem; }
.ticks li { display: grid; grid-template-columns: 28px 1fr; gap: .7rem; align-items: start; }
.ticks li::before { content: ''; width: 22px; height: 22px; margin-top: .15rem; border-radius: 50%; background: rgba(200,74,38,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12 4 4 8-8' fill='none' stroke='%23c84a26' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.ticks strong { display: block; }
.ticks span { color: var(--muted); font-size: .93rem; }
.paper .ticks span { color: var(--paper-muted); }

/* shorts */
.shorts { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 22vw, 260px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin-inline: -4px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.short { margin: 0; scroll-snap-align: start; }
.short-frame { position: relative; aspect-ratio: 9/16; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: var(--shadow); }
.short-frame video { width: 100%; height: 100%; object-fit: cover; }
.short-play { position: absolute; inset: 0; display: grid; place-items: end; padding: 14px; border: 0; background: linear-gradient(180deg, transparent 62%, rgba(0,0,0,.6)); color: #fff; cursor: pointer; }
.short-play .icon { width: 52px; height: 52px; padding: 15px; border-radius: 50%; background: rgba(15,17,23,.55); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(6px); transition: transform .2s, background .2s; }
.short-play:hover .icon { transform: scale(1.08); background: var(--gold); color: #fff; border-color: var(--gold); }
.short.playing .short-play { opacity: 0; }
.short figcaption { margin-top: .7rem; font-size: .9rem; font-weight: 600; }
.shorts-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; color: var(--muted); font-size: .9rem; }

/* social */
.social { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .social { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .social { grid-template-columns: 1fr; } }
.social-link { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: 14px; text-decoration: none; background: var(--card); border: 1px solid var(--line); transition: .2s; }
.social-link:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--shadow); }
.social-link .icon { width: 28px; height: 28px; color: var(--gold); }
.social-link span { display: grid; line-height: 1.25; }
.social-link small { color: var(--muted); font-size: .78rem; }
.paper .social-link { background: var(--card); border-color: var(--paper-line); }
.paper .social-link .icon { color: var(--gold); }
.paper .social-link small { color: var(--paper-muted); }

/* books */
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(18px, 2.4vw, 36px); }
.book { text-decoration: none; color: inherit; display: block; perspective: 900px; }
.book-cover { border-radius: 4px 10px 10px 4px; overflow: hidden; box-shadow: -10px 18px 36px -12px rgba(30,20,8,.55), inset 3px 0 0 rgba(255,255,255,.15); transform: rotateY(-8deg); transform-origin: left center; transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .45s; position: relative; }
.book-cover::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 10px; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.12), transparent); z-index: 1; }
.book-cover img { aspect-ratio: 2/3; object-fit: cover; width: 100%; }
.book:hover .book-cover { transform: rotateY(0) translateY(-6px); box-shadow: 0 30px 50px -18px rgba(30,20,8,.6); }
.book h3 { font-size: 1.35rem; margin: .45rem 0 .2rem; }
.book p { margin: 0; font-size: .88rem; color: var(--paper-muted); }
.book .series-tag { display: block; margin-top: 1.4rem; line-height: 1.35; }
.series-tag { display: inline-block; font: 600 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.book-feature { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.book-feature + .book-feature { margin-top: clamp(64px, 9vw, 120px); }
.book-feature.flip { grid-template-columns: 1fr minmax(220px, 360px); }
.book-feature.flip .book-art { order: 2; }
.book-art { position: relative; }
.book-art .book-cover { transform: rotateY(-14deg) rotateZ(-1deg); box-shadow: -24px 30px 60px -20px rgba(30,20,8,.65); }
.book-art:hover .book-cover { transform: rotateY(-4deg); }
.blurb { font-size: 1.04rem; }
.blurb p:first-child::first-letter { font-family: var(--serif); float: left; font-size: 3.6em; line-height: .82; margin: .06em .1em 0 0; color: var(--gold); }
.lang-note { display: inline-flex; gap: .5rem; align-items: center; padding: .45em .85em; border-radius: 999px; font-size: .8rem; background: rgba(200,74,38,.08); color: var(--gold-2); border: 1px solid rgba(200,74,38,.22); margin-bottom: 1.2rem; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; grid-auto-flow: dense; }
.gallery a { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); grid-column: span 4; }
.gallery a:nth-child(6n+1) { grid-column: span 8; grid-row: span 2; }
.gallery a:nth-child(12n+7) { grid-column: 5 / span 8; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption, .gallery .cap { position: absolute; left: 10px; bottom: 10px; padding: .3em .65em; border-radius: 999px; background: var(--chip); color: var(--text); font-size: .76rem; font-weight: 600; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: min(96vw, 1600px); max-height: 92vh; }
dialog.lightbox::backdrop { background: rgba(5,6,9,.9); backdrop-filter: blur(4px); }
dialog.lightbox img { max-height: 88vh; width: auto; border-radius: 10px; margin: auto; }
dialog.lightbox button { position: fixed; right: 18px; top: 18px; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(15,17,23,.8); color: #fff; cursor: pointer; display: grid; place-items: center; }
dialog.lightbox p { text-align: center; color: #ddd; margin: .8rem 0 0; }

/* feature cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { padding: 1.6rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 14px 30px -24px rgba(60,35,20,.35); }
.card h3 { font-size: 1.35rem; margin-bottom: .45rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }
.card-num { font: 600 .72rem/1 var(--sans); letter-spacing: .16em; color: var(--gold); display: block; margin-bottom: 1.1rem; }
.paper .card { background: var(--card); border-color: var(--paper-line); }
.paper .card p { color: var(--paper-muted); }

/* steps */
.steps { display: grid; gap: clamp(64px, 9vw, 120px); }
.step-num { font: 400 clamp(3rem, 6vw, 5rem)/1 var(--serif); color: transparent; -webkit-text-stroke: 1px rgba(200,74,38,.55); display: block; margin-bottom: .6rem; }

/* cta band */
.cta { position: relative; border-radius: calc(var(--radius) + 6px); overflow: hidden; isolation: isolate; padding: clamp(36px, 6vw, 80px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cta > img, .cta > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(90deg, rgba(var(--wash),.97) 0%, rgba(var(--wash),.88) 45%, rgba(var(--wash),.15) 80%); }
.cta h2 { max-width: 15ch; }
.cta p { max-width: 34em; color: var(--muted); }

/* library teaser */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tile { position: relative; display: flex; flex-direction: column; padding: 0 2rem 2rem; border-radius: var(--radius); overflow: hidden; text-decoration: none; isolation: isolate; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.tile > img { width: calc(100% + 4rem); max-width: none; margin: 0 -2rem 1.6rem; aspect-ratio: 16/7; object-fit: cover; transition: transform .8s; }
.tile:hover > img { transform: scale(1.03); }
.tile h3 { margin-bottom: .3rem; }
.tile p { color: var(--muted); margin-bottom: 1rem; max-width: 32em; }
.tile .text-link { color: var(--gold); }
.tile-plain { padding-top: 2rem; background: radial-gradient(90% 80% at 100% 0%, rgba(200,74,38,.08), transparent 60%), var(--card); }

/* prose (legal, newsletter, blog) */
.prose { font-size: 1.02rem; }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-top: 2.2em; }
.prose h3 { font-size: 1.3rem; margin-top: 1.8em; }
.prose h4 { font: 600 1rem/1.4 var(--sans); margin-top: 1.5em; }
.prose a:not(.btn) { color: var(--gold-2); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.legal-note { padding: 1rem 1.2rem; border-left: 3px solid var(--gold); background: rgba(200,74,38,.06); border-radius: 0 10px 10px 0; margin: 0 0 2rem; }
.address { font-style: normal; line-height: 1.8; }

/* search */
.search-form { display: flex; gap: .6rem; margin: 2rem 0 1rem; flex-wrap: wrap; }
.search-form input { flex: 1 1 260px; min-height: 52px; padding: 0 1.1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: inherit; font: inherit; }
.search-form button { min-height: 52px; padding: 0 1.4rem; border-radius: 999px; border: 0; background: var(--gold); color: var(--gold-ink); font: 600 .95rem var(--sans); cursor: pointer; }
.search-results { list-style: none; padding: 0; display: grid; gap: 12px; }
.search-results li { padding: 1.1rem 1.3rem; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.search-results a { font: 400 1.35rem var(--serif); color: var(--gold-2); text-decoration: none; }
.search-results p { margin: .3rem 0 0; color: var(--muted); font-size: .9rem; }

/* footer */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 90px); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand img { width: 56px; height: 56px; margin-bottom: 1rem; }
.footer-name { font: 400 1.6rem/1 var(--serif); margin-bottom: .6rem; }
.footer-brand p:last-child { color: var(--muted); max-width: 26em; }
.site-footer h2 { font: 600 .72rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: .4rem 0 1.2rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.site-footer ul a { text-decoration: none; color: color-mix(in srgb, var(--text) 80%, transparent); }
.site-footer ul a:hover { color: var(--gold-2); }
.footer-social a { display: inline-flex; align-items: center; gap: .6rem; }
.footer-social .icon { color: var(--gold); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-block: 1.6rem; border-top: 1px solid var(--line-strong); color: var(--muted); font-size: .82rem; }
.footer-base p { margin: 0; }

/* reveal on scroll (only with JS) */
.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="2"] { transition-delay: .1s; } .js [data-reveal="3"] { transition-delay: .2s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* responsive */
@media (max-width: 1020px) {
  .worlds3 { grid-template-columns: 1fr; }
  .world { min-height: 420px; }
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip > .split-media { order: 0; }
  .float-card { right: 10px; bottom: -22px; width: 40%; }
  .shelf { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .duo { grid-template-columns: 1fr; }
  .book-feature, .book-feature.flip { grid-template-columns: 1fr; }
  .book-feature.flip .book-art { order: 0; }
  .book-art { max-width: 300px; }
  .gallery a, .gallery a:nth-child(6n+1), .gallery a:nth-child(12n+7) { grid-column: span 12; grid-row: auto; }
}
@media (min-width: 640px) and (max-width: 1020px) { .gallery a, .gallery a:nth-child(12n+7) { grid-column: span 6; } .gallery a:nth-child(6n+1) { grid-column: span 12; grid-row: auto; } }
@media (max-width: 560px) {
  .facts { grid-template-columns: 1fr; }
  .hero-inner .btn-row .btn { width: 100%; justify-content: center; }
  .brand span { font-size: 1.15rem; }
}

/* blog (templates rendered by the Go server) */
.worlds { width: min(1240px, 100%); margin-inline: auto; padding: calc(clamp(48px, 7vw, 90px)) clamp(16px, 4vw, 40px) clamp(64px, 9vw, 120px); }
.worlds-intro { margin-bottom: 2.5rem; max-width: 50rem; }
.worlds-intro h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.worlds-search { margin-bottom: 1.5rem; }
.worlds-search label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.worlds-search div { display: flex; gap: .6rem; flex-wrap: wrap; }
.worlds-search input { flex: 1 1 260px; min-height: 48px; padding: 0 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: inherit; font: inherit; }
.worlds-search button { min-height: 48px; padding: 0 1.3rem; border-radius: 999px; border: 0; background: var(--gold); color: var(--gold-ink); font: 600 .9rem var(--sans); cursor: pointer; }
.worlds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.worlds-card { padding: 1.6rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.worlds-card h2 { font-size: 1.5rem; }
.worlds-card h2 a { text-decoration: none; }
.worlds-card a:last-child { color: var(--gold-2); font-weight: 600; text-decoration: none; }
.worlds-pager { display: flex; justify-content: space-between; margin-top: 2rem; }
.worlds-pager a, .worlds-back a { color: var(--gold-2); }
.worlds-empty { padding: 3rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.worlds-breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.worlds-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: start; }
.worlds-prose { font-size: 1.05rem; max-width: 46rem; }
.worlds-prose a { color: var(--gold-2); }
.worlds-prose img { border-radius: 12px; }
.worlds-infobox { position: sticky; top: calc(var(--header-h) + 20px); padding: 1.2rem; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: .9rem; }
.worlds-infobox img { border-radius: 10px; }
.worlds-infobox h2 { font-size: 1.2rem; }
.worlds-infobox dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.worlds-infobox dd { margin: 0 0 .8rem; }
@media (max-width: 900px) { .worlds-article-layout { grid-template-columns: 1fr; } .worlds-infobox { position: static; } }
.paper-alt { background: var(--paper-2); }
.gallery.maps a, .gallery.maps a:nth-child(6n+1), .gallery.maps a:nth-child(12n+7) { grid-column: span 6; grid-row: auto; }
.gallery.maps img { aspect-ratio: 16/10; }
@media (max-width: 1020px) { .gallery.maps a, .gallery.maps a:nth-child(6n+1), .gallery.maps a:nth-child(12n+7) { grid-column: span 12; } }
.kenburns img { animation: kenburns 40s ease-in-out infinite alternate; transform-origin: 40% 40%; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.16) translate(-2%, 1%); } }
.nav ul a[aria-current] { box-shadow: none; color: var(--gold-2); background: rgba(200,74,38,.09); }
.page-hero.plain::after { content: none; }
.page-hero.plain { background: radial-gradient(70% 120% at 85% 0%, rgba(200,74,38,.07), transparent 60%); }
.page-hero.plain { padding-top: clamp(56px, 8vw, 110px); }

/* hero pause switch and spacing */
.loop-toggle { position: absolute; right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 36px); z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(15,17,23,.5); color: #fff; cursor: pointer; backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.loop-toggle:hover { background: var(--gold); border-color: var(--gold); }
.loop-toggle .icon { width: 18px; height: 18px; }
.loop-toggle .when-paused, .loop-toggle[data-paused="true"] .when-playing { display: none; }
.loop-toggle[data-paused="true"] .when-paused { display: contents; }
.no-js .loop-toggle { display: none; }
@media (prefers-reduced-motion: reduce) { .loop-toggle { display: none; } }
.section-after-hero { padding-top: clamp(40px, 6vw, 80px); }

/* light theme: hero picture sits on the right; on phones it is shown as a picture above the text */
.hero { min-height: min(92svh, 900px); }
.hero h1, .page-hero h1 { color: var(--text); }
.hero .lede, .page-hero .lede { color: var(--lede); }
.loop-toggle { z-index: 3; }
@media (max-width: 760px) {
  .page-home .site-main, .has-hero .site-main { margin-top: 0; }
  .hero { min-height: 0; display: block; }
  .hero::after { content: none; }
  .hero-media { position: relative; inset: auto; height: auto; aspect-ratio: 16/10; z-index: 0; margin: 0; }
  .hero-media video, .hero-media img { z-index: 0; }
  .hero-inner { padding-block: 28px 48px; }
  .loop-toggle { top: calc(62.5vw - 58px); bottom: auto; right: 14px; }
  .page-hero::after { background: linear-gradient(180deg, rgba(var(--wash),.82), rgba(var(--wash),.92) 60%, var(--ink) 100%); }
}

/* Dark mode is the default; the header switch remembers an explicit choice. */
:root[data-theme="dark"] {
  --ink: #0f1117; --ink-2: #151821; --ink-3: #1d212d; --ink-4: #272c3a;
  --line: rgba(255,255,255,.1); --line-strong: rgba(255,255,255,.18);
  --text: #eee8de; --muted: #aaa397; --faint: #7c776e;
  --gold: #e2693f; --gold-2: #f29a72; --gold-ink: #1a0f0a;
  --paper: #151821; --paper-2: #12141b; --paper-ink: #eee8de; --paper-muted: #aaa397; --paper-line: rgba(255,255,255,.12);
  --wash: 15,17,23; --card: #181b24; --ghost: rgba(255,255,255,.05); --chip: rgba(15,17,23,.82); --lede: #d2cbbf; --hover: rgba(255,255,255,.08);
  --fan-1: #3a2e1f; --fan-2: #1a1c24;
  --shadow: 0 24px 60px -24px rgba(0,0,0,.7);
  color-scheme: dark;
}
:root[data-theme="dark"] .brand img { filter: invert(1); }
:root[data-theme="dark"] .btn { box-shadow: 0 10px 26px -14px rgba(226,105,63,.7); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: inherit; cursor: pointer; }
.theme-toggle:hover { background: var(--card); border-color: var(--gold); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .to-light, :root[data-theme="dark"] .theme-toggle .to-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .to-light { display: inline-flex; }
.no-js .theme-toggle { display: none; }
.theme-toggle .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.theme-toggle > span { align-items: center; gap: .45rem; }
.theme-toggle .to-dark { display: inline-flex; }
@media (max-width: 1020px) { .theme-toggle { width: auto; padding: 0 .9rem; font: 600 .78rem/1 var(--sans); letter-spacing: .08em; } .theme-toggle .theme-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; } }
