/* Ember Vault landing page: volcanic glass and ember. */

@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
	--obsidian: #120f16;
	--obsidian-2: #1a161f;
	--obsidian-3: #241f2b;
	--glass-line: rgba(255, 255, 255, 0.1);
	--ash: #f7f3ee;
	--ash-2: #ede6dc;
	--ink: #1e1922;
	--muted: #6a6170;
	--muted-dark: #b9b0bf;
	--ember: #ff6a1f;
	--ember-deep: #e2480f;
	--ember-soft: #ffb259;
	--glow: rgba(255, 106, 31, 0.38);
	--max: 1180px;
	--serif: "Fraunces", Georgia, serif;
	--sans: "Figtree", ui-sans-serif, system-ui, sans-serif;
	color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--ash); color: var(--ink); font: 17px/1.62 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
.defs { position: absolute; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; position: relative; }
.wrap.narrow { max-width: 780px; }

code:not(.obs *) {
	font: 0.86em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: rgba(255, 106, 31, 0.1);
	color: #b8400c;
	padding: 0.14em 0.42em;
	border-radius: 6px;
	white-space: nowrap;
}

/* ---------- Type ---------- */
:is(h1, h2, h3):not(.obs *) {
	font-family: var(--serif);
	font-weight: 620;
	font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 120;
	letter-spacing: -0.022em;
	line-height: 1.04;
	margin: 0;
	text-wrap: balance;
}
h2:not(.obs *) { font-size: clamp(34px, 4.6vw, 54px); }
h3:not(.obs *) { font-size: 25px; font-weight: 600; letter-spacing: -0.012em; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 700 13px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ember-deep); }
.kicker::before { content: ""; width: 13px; height: 13px; background: url("d20.svg") center / contain no-repeat; }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 14px 26px;
	border-radius: 999px;
	font: 650 16px/1.1 var(--sans);
	text-decoration: none;
	border: 1px solid transparent;
	transition: transform .18s cubic-bezier(.2, .8, .2, 1), box-shadow .18s, background .18s, border-color .18s;
}
.btn-ember {
	color: #fff;
	background: linear-gradient(180deg, #ff8c42 0%, var(--ember) 45%, var(--ember-deep) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(120, 30, 0, 0.25), 0 10px 28px -8px var(--glow);
}
.btn-ember:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(120, 30, 0, 0.25), 0 16px 36px -8px rgba(255, 106, 31, 0.55); }
.btn-ember:active { transform: translateY(0); }
.btn-glass { color: #fff; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.32); }
.btn-quiet { color: var(--ink); background: #fff; border-color: var(--ash-2); box-shadow: 0 6px 18px -10px rgba(40, 20, 10, 0.3); }
.btn-quiet:hover { transform: translateY(-2px); border-color: #e0d4c5; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-left { justify-content: flex-start; margin-top: 30px; }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: transparent; border-bottom: 1px solid transparent; transition: background .4s ease, border-color .4s ease, backdrop-filter .4s ease; }
.nav.is-scrolled { background: rgba(18, 15, 22, 0.62); backdrop-filter: saturate(1.5) blur(18px); -webkit-backdrop-filter: saturate(1.5) blur(18px); border-bottom-color: rgba(255, 255, 255, 0.07); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 23px/1 var(--serif); font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -0.02em; }
.logo b { font-weight: 600; color: var(--ember-soft); }
.logo-mark { width: 30px; height: 30px; filter: drop-shadow(0 2px 8px rgba(255, 106, 31, 0.45)); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.08); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted-dark); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--obsidian); color: #fff; padding: 132px 0 72px; overflow: hidden; isolation: isolate; }
.hero-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background:
		radial-gradient(60% 40% at 50% 100%, rgba(255, 106, 31, 0.28), transparent 70%),
		radial-gradient(40% 35% at 15% 10%, rgba(255, 178, 89, 0.12), transparent 70%),
		radial-gradient(45% 40% at 88% 18%, rgba(132, 92, 200, 0.18), transparent 70%),
		linear-gradient(180deg, #120f16 0%, #17121b 60%, #1d1418 100%);
}
.hero-sky::after { content: ""; position: absolute; inset: 0; opacity: .35;
	background:
		linear-gradient(115deg, transparent 0 46%, rgba(255, 255, 255, 0.035) 46% 47%, transparent 47%),
		linear-gradient(62deg, transparent 0 63%, rgba(255, 255, 255, 0.03) 63% 64%, transparent 64%),
		linear-gradient(160deg, transparent 0 28%, rgba(255, 255, 255, 0.025) 28% 29%, transparent 29%);
}


.float-shard { position: absolute; z-index: -1; pointer-events: none; opacity: .9; animation: drift 10s ease-in-out infinite; filter: drop-shadow(0 8px 24px rgba(255, 106, 31, 0.35)); }
.float-shard.s1 { width: 54px; height: 54px; left: 8%; top: 150px; rotate: -18deg; }
.float-shard.s2 { width: 30px; height: 30px; right: 11%; top: 120px; rotate: 22deg; animation-delay: -3s; opacity: .7; }
.float-shard.s3 { width: 20px; height: 20px; right: 17%; top: 360px; rotate: -40deg; animation-delay: -6s; opacity: .55; }
@keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 -16px; } }

.hero-copy { text-align: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 26px; padding: 7px 16px 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--glass-line); color: #f1e9f3; font-size: 14px; font-weight: 600; backdrop-filter: blur(8px); }
.chip svg { width: 13px; height: 13px; color: var(--ember); }
.hero h1 { font-size: clamp(40px, 5.3vw, 68px); max-width: 21ch; margin: 0 auto 24px; }
.hero h1 em {
	font-style: italic; font-weight: 640;
	background: linear-gradient(100deg, var(--ember-soft) 0%, var(--ember) 40%, #ffd3a8 50%, var(--ember) 60%, var(--ember-deep) 100%);
	background-size: 250% 100%;
	-webkit-background-clip: text; background-clip: text; color: transparent;
	animation: glint 6s ease-in-out 1s infinite;
	padding-right: 0.05em;
}
@keyframes glint { 0%, 70% { background-position: 100% 0; } 85%, 100% { background-position: 0 0; } }
.lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted-dark); max-width: 38em; margin: 0 auto 32px; text-wrap: pretty; }
.hero-meta { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 26px; margin: 24px 0 0; padding: 0; color: var(--muted-dark); font-size: 14px; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 12px; height: 12px; background: url("d20.svg") center / contain no-repeat; }

.demo-wrap { margin-top: 36px; }

/* ---------- Sections ---------- */
.section { padding: 112px 0; position: relative; }
.ash { background: var(--ash); }
.obsidian { background: var(--obsidian); color: #fff; overflow: hidden; }
.obsidian p { color: var(--muted-dark); }
.obsidian .kicker { color: var(--ember-soft); }
.section-head { text-align: center; max-width: 740px; margin: 0 auto 76px; }
.section-head p:not(.kicker) { color: var(--muted); font-size: 19px; margin: 18px 0 0; }

/* Steps */
.steps { display: grid; gap: 112px; }
.step { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 68px; align-items: center; }
.step.flip { grid-template-columns: 1.15fr 0.85fr; }
.step.flip .step-copy { order: 2; }
.step-num { position: relative; display: inline-block; width: 64px; height: 64px; margin-bottom: 22px; isolation: isolate; }
.step-num::after { content: ""; position: absolute; inset: 0; z-index: 1; background: url("d20-flat.svg") center / contain no-repeat; filter: drop-shadow(0 6px 12px rgba(255, 106, 31, .25)); }
.step-num b { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding-top: 1px; font: 650 21px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: #fff; text-shadow: 0 1px 2px rgba(120, 30, 0, .55); }
.step h3 { font-size: clamp(30px, 3.2vw, 40px); margin-bottom: 14px; }
.step p { color: var(--muted); font-size: 18px; margin: 0; }

.pane { position: relative; margin: 0; padding: 8px; border-radius: 20px; background: linear-gradient(180deg, #fff, #fbf8f4); border: 1px solid rgba(30, 25, 34, 0.08); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 30px 60px -28px rgba(60, 30, 10, 0.35), 0 8px 20px -12px rgba(60, 30, 10, 0.2); transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.pane img { display: block; width: 100%; height: auto; border-radius: 13px; }
.pane:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 40px 70px -28px rgba(255, 106, 31, 0.35), 0 10px 24px -12px rgba(60, 30, 10, 0.25); }
.obsidian .pane { background: rgba(255, 255, 255, 0.05); border-color: var(--glass-line); box-shadow: 0 40px 80px -30px rgba(255, 106, 31, 0.3); }

/* Notes (plain Markdown) */
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 76px; align-items: center; }
.notes-grid h2 { margin-bottom: 20px; }
.notes-grid > div > p { font-size: 18px; }
.facets { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.facets li { position: relative; padding-left: 32px; color: #ece6ef; font-weight: 500; }
.facets li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; background: url("d20.svg") center / contain no-repeat; }

.code-card { position: relative; margin: 0; background: linear-gradient(180deg, #1f1a25, #18141d); border: 1px solid var(--glass-line); border-radius: 18px; box-shadow: 0 40px 90px -30px rgba(255, 106, 31, 0.35), 0 20px 40px -20px rgba(0, 0, 0, 0.6); }
.code-card::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--ember), transparent); }
.code-bar { display: flex; align-items: center; gap: 7px; padding: 13px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.code-bar span { width: 11px; height: 11px; border-radius: 50%; background: #3b3447; }
.code-bar b { margin-left: 10px; color: var(--muted-dark); font-weight: 500; font-size: 13px; }
.code-card pre { margin: 0; padding: 20px 22px 18px; overflow-x: auto; }
.code-card code { background: none; color: #ddd5e6; padding: 0; font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre; }
.c-mute { color: #7d7590; } .c-b { color: #fff; font-weight: 700; } .c-fence { color: var(--ember-soft); } .c-key { color: #c3a6ff; }
.code-card figcaption { display: flex; align-items: center; gap: 8px; padding: 12px 22px 16px; border-top: 1px dashed rgba(255, 255, 255, 0.1); color: var(--ember-soft); font-size: 14px; font-weight: 600; }
.code-card figcaption::before { content: ""; width: 14px; height: 14px; background: url("d20.svg") center / contain no-repeat; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile { position: relative; background: #fff; border: 1px solid rgba(30, 25, 34, 0.08); border-radius: 22px; padding: 28px; overflow: hidden; box-shadow: 0 24px 50px -30px rgba(60, 30, 10, 0.3); transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 34px 60px -30px rgba(255, 106, 31, 0.35); }
.tile h3 { font-size: 23px; margin: 0 0 8px; }
.tile p { color: var(--muted); margin: 0; font-size: 16px; }
.tile-wide { grid-column: span 2; }
.tile-img { padding: 0; display: flex; flex-direction: column; }
.tile-img .crop { aspect-ratio: 16 / 9; overflow: hidden; background: #fff; border-bottom: 1px solid rgba(30, 25, 34, 0.08); }
.tile-wide .crop { aspect-ratio: 16 / 7; }
.crop img { display: block; width: var(--zoom, 100%); max-width: none; height: auto; margin: var(--y, 0) 0 0 var(--x, 0); }
.tile-copy { padding: 22px 26px 26px; }
.tile-stat { background: radial-gradient(120% 90% at 100% 0%, rgba(255, 106, 31, 0.35), transparent 60%), var(--obsidian); color: #fff; border-color: transparent; }
.tile-stat h3 { font-size: 24px; }
.tile-stat .big { display: block; margin: 6px 0 12px; font: 640 104px/0.9 var(--serif); font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 144; letter-spacing: -0.04em; background: linear-gradient(170deg, #ffd3a8, var(--ember) 55%, var(--ember-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 22px rgba(255, 106, 31, 0.35)); }
.tile-stat p { color: rgba(255, 255, 255, 0.78); }
.tile-stat::after { content: ""; position: absolute; right: -26px; bottom: -30px; width: 150px; height: 150px; background: url("d20-line.svg") center / contain no-repeat; opacity: .12; rotate: -12deg; }
.tile-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 18px; border-radius: 14px; background: linear-gradient(160deg, #fff1e4, #ffe0c7); color: var(--ember-deep); }
.tile-icon svg { width: 25px; height: 25px; }
.tile-icon.slash { font: 600 italic 30px var(--serif); }
.tile-banner { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; background: linear-gradient(100deg, #fff, #fff6ee); }
.tile-banner .tile-icon { margin: 0; flex: none; }

/* Sample */
.sample { background: radial-gradient(60% 80% at 0% 50%, rgba(255, 106, 31, 0.22), transparent 70%), var(--obsidian); }
.sample b { color: #fff; }
.sample h2 { margin-bottom: 20px; }
.sample p { font-size: 18px; }
.sample-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 68px; align-items: center; }

/* Install */
.install-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 44px; display: grid; gap: 14px; }
.install-steps li { counter-increment: s; position: relative; background: #fff; border: 1px solid rgba(30, 25, 34, 0.08); border-radius: 18px; padding: 20px 24px 20px 84px; font-size: 18px; box-shadow: 0 18px 40px -28px rgba(60, 30, 10, 0.3); }
.install-steps li::before { content: counter(s); position: absolute; left: 20px; top: 50%; translate: 0 -50%; width: 46px; height: 46px; display: grid; place-items: center; padding-top: 1px; box-sizing: border-box; font: 650 17px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; color: #fff; text-shadow: 0 1px 2px rgba(120, 30, 0, .5); background: url("d20-flat.svg") center / contain no-repeat; }

/* Footer */
.foot { background: var(--obsidian); color: var(--muted-dark); padding: 68px 0 48px; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.foot .support { color: #e8e1ec; font-size: 16px; max-width: 34em; margin: 18px 0 0; }
.foot a { color: #fff; }
.foot-links { display: grid; gap: 10px; justify-items: end; }
.foot-links a { text-decoration: none; font-weight: 600; }
.foot-links a:hover { color: var(--ember-soft); }
.legal { margin-top: 42px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.legal p { margin: 0 0 8px; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .8s ease, translate .8s cubic-bezier(.2, .8, .2, 1), transform .55s cubic-bezier(.2, .8, .2, 1), box-shadow .55s ease, border-color .55s ease; }
.js .reveal.in { opacity: 1; translate: 0 0; }

@media (prefers-reduced-motion: reduce) {
	/* :is() counts its strongest argument, so this outranks every rule on the page without !important. */
	:is(*, #reduce#motion#everywhere), :is(*, #reduce#motion#everywhere)::before, :is(*, #reduce#motion#everywhere)::after { animation: none; transition: none; scroll-behavior: auto; }
	.js .reveal { opacity: 1; translate: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.nav-links { display: none; }
	.nav-inner .btn-sm { margin-left: auto; }
	.hero { padding: 52px 0 64px; }
	.section { padding: 84px 0; }
	.step, .step.flip, .notes-grid, .sample-grid, .foot-grid { grid-template-columns: 1fr; gap: 36px; }
	.step.flip .step-copy { order: 0; }
	.steps { gap: 88px; }
	.bento { grid-template-columns: 1fr; }
	.tile-wide { grid-column: auto; }
	.foot-links { justify-items: start; }
	.float-shard.s3 { display: none; }
	.float-shard.s1 { left: -8px; top: 60px; width: 40px; height: 40px; }
	.float-shard.s2 { right: 4px; top: 40px; }
}


/* =====================================================================
   Embers and torchlight
   ===================================================================== */
[data-embers] { position: relative; }
.ember-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.hero .ember-canvas { z-index: -1; }
[data-embers] > .wrap { position: relative; z-index: 1; }
.torchlight { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 30%), rgba(255, 140, 60, 0.13), transparent 70%); transition: opacity .4s; }

/* The torch: a body, a flame and a glow, stacked in one 64 x 128 box. */
.torch, .sconce { position: relative; display: block; width: 64px; height: 128px; }
.torch svg, .sconce svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.torch-flame { transform-origin: 50% 36%; filter: drop-shadow(0 0 10px rgba(255, 130, 40, .9)) drop-shadow(0 0 26px rgba(255, 90, 20, .6)); }
.torch-glow { position: absolute; left: 50%; top: 20%; width: 10px; height: 10px; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 170, 80, .55), rgba(255, 100, 30, .18) 40%, transparent 70%); pointer-events: none; }
@keyframes flicker {
	0%, 100% { transform: scale(1, 1) skewX(0deg); }
	20% { transform: scale(.96, 1.06) skewX(-2deg); }
	45% { transform: scale(1.04, .95) skewX(2.5deg); }
	70% { transform: scale(.98, 1.08) skewX(-1.5deg); }
}
@keyframes breathe { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }

/* Hero button */
.btn-torch .mini-flame { width: 18px; height: 15px; margin: -2px 0 0 -4px; filter: drop-shadow(0 0 6px rgba(255, 130, 40, .9)); animation: flicker 1.6s ease-in-out infinite; transform-origin: 50% 80%; }

/* ---------- The torchlit vault: steps light up as you reach them ---------- */
.vault { background: radial-gradient(70% 50% at 50% 0%, rgba(255, 106, 31, 0.10), transparent 70%), linear-gradient(180deg, #16121a, #120f16 40%, #140f14); color: #fff; padding-bottom: 140px; overflow: hidden; }
.vault::before { content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 140, 60, .45), transparent); }
.vault::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -1px; height: 48px; background: var(--ash); border-radius: 50% 50% 0 0 / 100% 100% 0 0; z-index: 1; }
.vault .section-head p:not(.kicker) { color: var(--muted-dark); }
.vault .kicker { color: var(--ember-soft); }
.vault .step { --lit: 0; }
.vault .step-copy { opacity: calc(0.38 + 0.62 * var(--lit)); }
.vault .step p { color: var(--muted-dark); }
.vault .pane { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, calc(0.06 + 0.1 * var(--lit)));
	box-shadow: 0 40px 120px -30px rgba(255, 106, 31, calc(0.55 * var(--lit))), 0 30px 60px -30px rgba(0, 0, 0, .8); }
.vault .pane img { filter: brightness(calc(0.26 + 0.74 * var(--lit))) saturate(calc(0.35 + 0.65 * var(--lit))) sepia(calc(0.35 - 0.35 * var(--lit))); }
.vault .pane:hover { transform: none; }
.step-copy { position: relative; }
.sconce { width: 40px; height: 80px; display: inline-block; vertical-align: bottom; margin: 0 14px 12px -4px; }
.sconce .torch-flame { transform: scale(calc(0.12 + 0.88 * var(--lit))); opacity: calc(0.35 + 0.65 * var(--lit)); }
.sconce .torch-glow { width: calc(30px + 420px * var(--lit)); height: calc(30px + 420px * var(--lit)); opacity: var(--lit); }
.vault .step-num { vertical-align: bottom; margin-bottom: 12px; }
.notes .facets li { color: var(--ink); }
.notes .notes-grid > div > p { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
	.ember-canvas, .torchlight { display: none; }
}
/* Flames flicker on their own layer so the scale above can still grow them. */
.torch-flame use { transform-box: view-box; transform-origin: 32px 40px; animation: flicker 1.7s ease-in-out infinite; }
.sconce:nth-of-type(odd) .torch-flame use { animation-duration: 2.1s; animation-delay: -.6s; }
@media (prefers-reduced-motion: reduce) { .torch-flame use { animation: none; } }


/* =====================================================================
   Hovers: cards and screenshots rise smoothly and catch the ember light
   ===================================================================== */
.pane, .tile, .install-steps li, .code-card { transition: transform .55s cubic-bezier(.2, .8, .2, 1), box-shadow .55s ease, border-color .55s ease; }
.pane { overflow: hidden; }
.pane img { transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .4s ease; }
.pane:hover, .vault .pane:hover { transform: translateY(-6px); border-color: rgba(255, 140, 60, .45); box-shadow: 0 0 0 1px rgba(255, 140, 60, .18), 0 30px 70px -24px rgba(255, 106, 31, .55), 0 10px 24px -12px rgba(60, 30, 10, .3); }
.pane:hover img { transform: scale(1.02); }
.tile:hover { transform: translateY(-6px); box-shadow: 0 0 0 1px rgba(255, 140, 60, .2), 0 34px 60px -26px rgba(255, 106, 31, .45); }
.install-steps li:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(255, 140, 60, .2), 0 22px 40px -24px rgba(255, 106, 31, .45); }
.code-card:hover { transform: translateY(-4px); box-shadow: 0 50px 100px -30px rgba(255, 106, 31, .5), 0 20px 40px -20px rgba(0, 0, 0, .6); }

/* =====================================================================
   Fiery d20s in the vault: each die catches fire as you reach it
   ===================================================================== */
/* The die warms up as you reach it: a soft ember glow and a few sparks drifting off it. */
.vault .step-num::after { filter: drop-shadow(0 4px 10px rgba(255, 110, 30, calc(0.12 + 0.2 * var(--lit, 0)))) brightness(calc(0.78 + 0.22 * var(--lit, 0))); }
.vault .step-num { animation: die-warm 3.2s ease-in-out infinite; }
@keyframes die-warm { 50% { translate: 0 -1px; } }
.die-embers { position: absolute; z-index: 3; left: 50%; top: 18%; width: 0; height: 0; opacity: calc(0.8 * var(--lit, 0)); pointer-events: none; }
.die-embers i { position: absolute; left: 0; top: 0; width: 3px; height: 3px; border-radius: 50%; background: #ffd29a; box-shadow: 0 0 6px 2px rgba(255, 120, 40, .8); opacity: 0; animation: die-spark 2.6s ease-out infinite; }
.die-embers i:nth-child(1) { --dx: -14px; animation-delay: 0s; }
.die-embers i:nth-child(2) { --dx: 9px; animation-delay: .45s; width: 2px; height: 2px; }
.die-embers i:nth-child(3) { --dx: -4px; animation-delay: .9s; }
.die-embers i:nth-child(4) { --dx: 16px; animation-delay: 1.35s; width: 2px; height: 2px; }
.die-embers i:nth-child(5) { --dx: -10px; animation-delay: 1.8s; width: 2px; height: 2px; }
.die-embers i:nth-child(6) { --dx: 4px; animation-delay: 2.2s; }
@keyframes die-spark {
	0% { transform: translate(0, 0); opacity: 0; }
	15% { opacity: 1; }
	100% { transform: translate(var(--dx), -58px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .die-embers { display: none; } }
.step-num .torch-glow { top: 50%; z-index: 0; width: calc(60px + 160px * var(--lit, 0)); height: calc(60px + 160px * var(--lit, 0)); opacity: calc(0.55 * var(--lit, 0)); background: radial-gradient(circle, rgba(255, 140, 60, .35), rgba(255, 100, 30, .12) 35%, transparent 68%); filter: blur(6px); }
.vault .step-num { margin-top: 10px; }

/* =====================================================================
   The opening scene: the GM narrates, you roll, the screen burns away
   ===================================================================== */
.site-gate { display: none; }
.js.gate-on body { overflow: hidden; }
.js.gate-on .site-gate { display: grid; }
.site-gate { position: fixed; inset: 0; z-index: 200; place-items: center; background: #0a080d; color: #fff; transition: opacity .45s ease; }
.site-gate.is-leaving { opacity: 0; }
.site-gate.is-burning { background: transparent; }
.site-gate.is-burning > :not(.gate-sky) { opacity: 0; transition: opacity .25s ease; }
.site-gate.is-burning .gate-sky, .site-gate.is-burning .ember-canvas { opacity: 0; }
.gate-burn { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 210; pointer-events: none; }
.js.gate-on .nimble-dice3d-overlay { z-index: 230; }
.gate-sky { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(45% 40% at 50% 45%, rgba(255, 106, 31, .07), transparent 70%), radial-gradient(70% 50% at 50% 115%, rgba(255, 90, 20, .12), transparent 70%); }
.gate-logo { position: fixed; top: 22px; left: 50%; translate: -50% 0; font-size: 24px; pointer-events: none; opacity: .85; }
.gate-inner { position: relative; z-index: 1; width: min(760px, 100%); padding: 24px; display: grid; justify-items: center; gap: 22px; text-align: center; }
.gm-tag { margin: 0; display: inline-flex; align-items: center; gap: 10px; font: 700 12px/1 var(--sans); letter-spacing: .24em; color: var(--ember-soft); }
.gm-tag::before, .gm-tag::after { content: ""; width: 40px; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 178, 89, .6)); }
.gm-tag::after { transform: scaleX(-1); }
.gm-lines { display: grid; gap: 18px; min-height: 9em; }
.gm-line { margin: 0; font: 400 italic clamp(21px, 2.4vw, 28px)/1.45 var(--serif); font-variation-settings: "SOFT" 100, "opsz" 36; color: #efe6ea; text-wrap: pretty; }
.gm-line:last-child::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -0.12em; background: var(--ember-soft); animation: caret 1s steps(1) infinite; }
.gm-line:last-child:not(:first-child) { font-style: normal; font-weight: 600; color: #fff; }
@keyframes caret { 50% { opacity: 0; } }
.gate-d20 { appearance: none; align-items: normal; width: auto; box-sizing: content-box; text-decoration: none; margin: 0; border: 0; background: none; box-shadow: none; outline: none; line-height: inherit; text-align: inherit; text-transform: inherit; justify-content: normal; height: auto; min-height: auto; cursor: pointer; display: grid; justify-items: center; gap: 12px; padding: 12px 22px 16px; border-radius: 24px; color: #f4e9e2; font: 600 15px var(--sans); letter-spacing: .02em;
	opacity: 0; translate: 0 12px; transition: opacity .6s ease, translate .6s cubic-bezier(.2, .8, .2, 1), background .3s; }
.gate-d20.is-ready { opacity: 1; translate: 0 0; }
.gate-d20 img { width: 110px; height: 110px; filter: drop-shadow(0 10px 30px rgba(255, 106, 31, .45)); animation: d20-idle 3.2s ease-in-out infinite; transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.gate-d20:hover img, .gate-d20:focus-visible img { transform: rotate(-14deg) scale(1.06); }
.gate-d20:hover, .gate-d20:focus-visible { background: rgba(255, 140, 60, .06); }
.gate-d20:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }
.gate-d20.is-rolling { opacity: 0; pointer-events: none; transition-duration: .25s; }
@keyframes d20-idle { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 -6px; rotate: 6deg; } }
.gm-result { margin: 0; font: 400 clamp(20px, 2.2vw, 26px)/1.4 var(--serif); color: #fff; opacity: 0; translate: 0 8px; transition: opacity .5s ease, translate .5s ease; }
.gm-result b { color: var(--ember-soft); font-weight: 650; }
.gm-result.is-shown { opacity: 1; translate: 0 0; }
.site-gate.is-rolling .gm-lines { opacity: .35; transition: opacity .5s ease; }
.gate-skip { appearance: none; display: inline; align-items: normal; gap: normal; width: auto; box-sizing: content-box; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; outline: none; letter-spacing: inherit; line-height: inherit; text-align: inherit; text-transform: inherit; justify-content: normal; height: auto; min-height: auto; cursor: pointer; position: fixed; bottom: 26px; left: 50%; translate: -50% 0; z-index: 2; color: #8e8497; font: 500 14px var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.gate-skip:hover, .gate-skip:focus-visible { color: #fff; }
@media (prefers-reduced-motion: reduce) { .gate-d20 img { animation: none; } .gm-line:last-child::after { animation: none; } }

/* Grid children may shrink below their content (wide code lines scroll inside the card instead). */
.notes-grid > *, .sample-grid > *, .step > *, .foot-grid > * { min-width: 0; }
