:root {
	--ink: #060409;
	--night: #0c0712;
	--night-2: #140a1c;
	--crimson: #e0102c;
	--crimson-hot: #ff1f3a;
	--blood: #5c0613;
	--violet: #7c3cff;
	--violet-soft: #a46dff;
	--bone: #f2eef5;
	--muted: #9d8fae;
	--line: rgba(242, 238, 245, .12);
	--display: "Dela Gothic One", "Impact", sans-serif;
	--body: "Zen Kaku Gothic New", system-ui, sans-serif;
	--brush: "Yuji Syuku", serif;
	--mono: "JetBrains Mono", ui-monospace, monospace;
	--ease-cut: cubic-bezier(.8, 0, .1, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--night);
	color: var(--bone);
	font: 400 1.0625rem/1.7 var(--body);
	overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--violet-soft); outline-offset: 3px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* browser surfaces carry the palette too */
::selection { background: var(--crimson); color: var(--bone); }
html { scrollbar-color: var(--crimson) var(--ink); scrollbar-width: thin; caret-color: var(--crimson); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--blood); border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--crimson); }

/* katana cursor (pointer devices only) */
@media (hover: hover) and (pointer: fine) {
	html, body { cursor: url("/assets/cursor.svg") 2 2, auto; }
	a, button, [role="button"], .ep, .copy, .gallery { cursor: url("/assets/cursor-hot.svg") 2 2, pointer; }
	code { cursor: url("/assets/cursor.svg") 2 2, text; }
}

/* ================= intro title card ================= */
.intro { display: none; }
.js-intro .intro {
	display: grid; place-items: center;
	position: fixed; inset: 0; z-index: 100;
	cursor: pointer;
}
.intro .half {
	position: absolute; inset: 0;
	background: var(--ink);
}
.intro .half.a { clip-path: polygon(0 0, 100% 0, 100% 38%, 0 66%); }
.intro .half.b { clip-path: polygon(0 66%, 100% 38%, 100% 100%, 0 100%); }
.intro .card { position: relative; text-align: center; }
.intro .stroke { position: absolute; left: 50%; top: 50%; width: min(120vw, 1300px); transform: translate(-50%, -50%) rotate(-8deg); }
.intro .stroke path { fill: none; stroke: var(--crimson); stroke-width: 120; stroke-linecap: round; }
.intro .kanji {
	position: relative;
	font: 400 clamp(6rem, 22vw, 15rem)/1 var(--brush);
	color: var(--bone);
	text-shadow: 0 6px 0 var(--ink);
}
.intro .name {
	position: relative;
	margin-top: 10px;
	font: 400 clamp(1rem, 2.4vw, 1.4rem)/1 var(--display);
	letter-spacing: .4em;
	color: var(--bone);
}
.intro .cut {
	position: absolute; left: -10%; right: -10%; top: 52%;
	height: 3px; background: #fff;
	box-shadow: 0 0 20px 4px rgba(255,255,255,.8), 0 0 60px 14px rgba(227,19,47,.8);
	transform: rotate(-15.5deg) scaleX(0);
}
.intro .skip {
	position: absolute; right: 22px; bottom: 18px;
	font-size: .85rem; color: var(--muted);
}

/* ================= nav ================= */
.nav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 40;
	transition: background .3s, backdrop-filter .3s;
}
.nav.solid { background: rgba(7,5,11,.78); backdrop-filter: blur(10px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .logo { width: 40px; height: 40px; transform: rotate(-6deg); transition: transform .4s var(--ease-cut); }
.brand:hover .logo { transform: rotate(-6deg) scale(1.08); }
.brand b { font: 400 1.15rem/1 var(--display); letter-spacing: .02em; }
.nav ul { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; font-weight: 500; color: #d9cfe3; text-shadow: 0 1px 10px rgba(6,4,9,.9); }
.nav ul a:hover { color: var(--bone); }
.tab { position: relative; padding: 6px 0; }
.tab::after {
	content: ""; position: absolute; left: -4px; right: -4px; bottom: -2px; height: 3px;
	background: var(--crimson-hot);
	box-shadow: 0 0 10px rgba(255,31,58,.8);
	transform: scaleX(0) skewX(-30deg); transform-origin: left;
	transition: transform .35s var(--ease-cut);
}
.tab:hover::after { transform: scaleX(.35) skewX(-30deg); }
.nav ul a.tab[aria-current="page"] { color: var(--bone); }
.tab[aria-current="page"]::after { transform: scaleX(1) skewX(-30deg); }
.nav .btn[aria-current="page"] { background: var(--bone); color: var(--ink); }

/* katana wipe between tabs */
.wipe {
	position: fixed; top: -20%; bottom: -20%; left: -40%; width: 180%; z-index: 80;
	pointer-events: none;
	background: linear-gradient(90deg, var(--ink) 0 88%, var(--crimson) 88% 97%, #fff 97% 100%);
	transform: translateX(-110%) skewX(-18deg);
	visibility: hidden;
}

/* inner tabs: the hero shrinks to a banner */
.hero.compact { min-height: 46svh; }
.hero.compact .hero-inner { min-height: 46svh; padding-bottom: 54px; }
.hero.compact .lede, .hero.compact .cta, .hero.compact .tategaki, .hero.compact .scroll-hint { display: none; }
.hero.compact .wordmark { font-size: clamp(2.4rem, 7vw, 4.4rem); }
[data-page][hidden] { display: none; }
.btn {
	position: relative;
	display: inline-flex; align-items: center; gap: 10px;
	padding: 13px 24px;
	font: 400 1rem/1 var(--display);
	text-decoration: none;
	color: var(--bone);
	background: #c20b25;
	border: 0;
	cursor: pointer;
	clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
	overflow: hidden;
	isolation: isolate;
}
.btn::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: var(--ink);
	transform: translateX(-105%) skewX(-20deg);
	transition: transform .35s var(--ease-cut);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(0) skewX(-20deg) scaleX(1.3); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--bone); clip-path: none; }
.btn.ghost::before { background: var(--bone); }
.btn.ghost:hover, .btn.ghost:focus-visible { color: var(--ink); }
.btn.violet { background: var(--violet); }
.nav .btn { padding: 10px 18px; font-size: .9rem; }

/* ================= hero ================= */
.hero {
	position: relative;
	min-height: max(700px, 100svh);
	overflow: hidden;
	isolation: isolate;
	background:
		radial-gradient(ellipse 90% 45% at 50% 100%, rgba(92,30,120,.55), transparent 75%),
		linear-gradient(180deg, #040208 0%, #120818 55%, #1d0b26 100%);
}
#embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

/* painted blood-moon city, behind the wires */
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
.hero-bg::after {
	/* settle the bottom edge into the page so the next section doesn't start on a seam */
	content: ""; position: absolute; inset: auto 0 0; height: 22%;
	background: linear-gradient(180deg, transparent, var(--night));
}
@media (prefers-reduced-motion: no-preference) {
	.hero-bg img { animation: settle 2.4s cubic-bezier(.16, 1, .3, 1) both; }
}
@keyframes settle { from { transform: scale(1.07); filter: brightness(.55); } to { transform: none; filter: none; } }

/* crimson wires that cut across the night */
.wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.wires path {
	fill: none; stroke: var(--crimson-hot); stroke-width: 1.4; stroke-linecap: round;
	filter: drop-shadow(0 0 4px rgba(255,31,58,.9));
}
.wires .faint { stroke-width: .9; opacity: .55; }
.wires .glint { stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 12px var(--crimson-hot)); opacity: 0; }

.tategaki {
	position: absolute; z-index: 2;
	left: max(16px, calc((100% - 1180px) / 2));
	top: 120px;
	writing-mode: vertical-rl;
	font: 400 1.35rem/1.4 var(--brush);
	color: #ff5a6c;
	letter-spacing: .3em;
}
.hero-inner {
	position: relative; z-index: 3;
	display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
	text-align: center;
	min-height: max(700px, 100svh);
	/* text sits in the dark sky between the moon and the rooftops */
	padding: 140px 0 clamp(120px, 24svh, 260px);
}
.wordmark {
	position: relative;
	margin: 0;
	font: 400 clamp(3rem, 10vw, 6rem)/.9 var(--display);
	letter-spacing: -.02em;
	width: fit-content;
}
.wordmark .w { display: block; -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; text-shadow: 0 14px 40px rgba(6,4,9,.7); }
.wordmark .w.top { clip-path: polygon(0 0, 100% 0, 100% 34%, 0 70%); }
.wordmark .w.bot { position: absolute; inset: 0; color: var(--crimson); clip-path: polygon(0 70%, 100% 34%, 100% 100%, 0 100%); }
.wordmark .slash {
	position: absolute; left: -4%; right: -6%; top: 51%;
	height: 4px; background: #fff;
	box-shadow: 0 0 16px 3px rgba(255,255,255,.75), 0 0 46px 10px rgba(227,19,47,.85);
	transform: rotate(-11deg) scaleX(0); transform-origin: left center;
	opacity: 0;
}
.lede { max-width: 34ch; margin: 28px 0 0; font-size: 1.3rem; line-height: 1.55; color: var(--bone); text-shadow: 0 2px 18px rgba(6,4,9,.9); }
.lede span { color: #c9bdd6; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 36px; }
.scroll-hint {
	position: absolute; z-index: 3; left: 50%; bottom: 22px;
	transform: translateX(-50%);
	width: 2px; height: 46px;
	background: linear-gradient(var(--crimson), transparent);
}

/* ================= shared section bits ================= */
section { position: relative; padding: 120px 0; }
.sec-head { display: flex; align-items: flex-end; gap: 22px; margin-bottom: 54px; }
.sec-kanji { font: 400 clamp(3.4rem, 8vw, 5.6rem)/.9 var(--brush); color: var(--crimson); }
.sec-title { margin: 0; font: 400 clamp(2.2rem, 5.4vw, 3.8rem)/1 var(--display); }
.sec-sub { margin: 10px 0 0; color: var(--muted); max-width: 52ch; }

/* blade-wipe reveal on headings */
.reveal { position: relative; }
.js .reveal .sec-title, .js .reveal .sec-kanji, .js .reveal .sec-sub { clip-path: inset(0 100% 0 0); transition: clip-path .7s var(--ease-cut); }
.js .reveal .sec-kanji { transition-delay: .15s; }
.js .reveal .sec-sub { transition-delay: .3s; }
.js .reveal.in .sec-title, .js .reveal.in .sec-kanji, .js .reveal.in .sec-sub { clip-path: inset(0 0 0 0); }

/* slash divider */
.divider { position: relative; height: 90px; overflow: hidden; }
.divider i {
	position: absolute; left: -5%; right: -5%; top: 50%;
	height: 2px; background: var(--crimson);
	box-shadow: 0 0 18px 2px rgba(227,19,47,.6);
	transform: rotate(-2.5deg) scaleX(0); transform-origin: left;
	transition: transform .9s var(--ease-cut);
}
.divider.in i { transform: rotate(-2.5deg) scaleX(1); }

/* ================= works: episode list ================= */
.episodes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ep {
	position: relative;
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr) auto;
	gap: 28px; align-items: center;
	padding: 34px 20px;
	border-bottom: 1px solid var(--line);
	isolation: isolate;
	overflow: hidden;
}
.ep::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(100deg, var(--blood), var(--crimson) 60%, var(--blood));
	transform: translateX(-102%) skewX(-12deg);
	transition: transform .45s var(--ease-cut);
}
.ep:hover::before, .ep:focus-within::before { transform: translateX(0) skewX(-12deg) scaleX(1.15); }
.ep-no { font: 400 2.1rem/1 var(--brush); color: var(--crimson); transition: color .3s; }
.ep:hover .ep-no, .ep:focus-within .ep-no { color: var(--bone); }
.ep h3 { margin: 0; font: 400 clamp(1.6rem, 3.4vw, 2.4rem)/1.05 var(--display); transition: transform .45s var(--ease-cut); }
.ep:hover h3 { transform: translateX(10px); }
.ep p { margin: 8px 0 0; color: var(--muted); max-width: 60ch; transition: color .3s; }
.ep:hover p, .ep:focus-within p { color: var(--bone); }
.status { display: inline-block; margin-bottom: 10px; padding: 3px 10px; font-size: .8rem; font-weight: 700; background: var(--bone); color: var(--ink); }
.status.live { background: var(--violet); color: #fff; }
.redact { background: var(--bone); color: transparent; user-select: none; padding: 0 .1em; }
.ep:hover .redact { background: var(--ink); }
.ep .btn { white-space: nowrap; }
.ep:hover .btn { background: var(--ink); }

/* ================= blocks ui ================= */
.release { background: var(--night-2); overflow: hidden; }
.release::before {
	content: "壱"; position: absolute; right: -2vw; top: 40px;
	font: 400 min(38vw, 460px)/1 var(--brush); color: rgba(227,19,47,.07);
	pointer-events: none;
}
.release-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; }
.scroll-card {
	position: relative;
	background: var(--bone); color: var(--ink);
	padding: 34px 32px 30px;
	box-shadow: 0 24px 60px -18px rgba(224,16,44,.45), 0 8px 20px rgba(0,0,0,.5);
}
.scroll-card::before, .scroll-card::after {
	content: ""; position: absolute; left: -10px; right: -10px; height: 12px;
	background: var(--ink);
	border-radius: 6px;
}
.scroll-card::before { top: -6px; }
.scroll-card::after { bottom: -6px; }
.scroll-card h3 { margin: 0; font: 400 clamp(1.7rem, 3.6vw, 2.3rem)/1.05 var(--display); }
.scroll-card .sub { margin: 8px 0 20px; color: #4a3f52; font-weight: 500; }
.seal {
	position: absolute; right: 22px; top: 22px;
	display: grid; place-items: center;
	width: 62px; height: 62px;
	border: 3px solid var(--crimson); border-radius: 8px;
	color: var(--crimson);
	font: 400 1.25rem/1.05 var(--brush);
	text-align: center;
	transform: rotate(8deg);
}
.code { display: flex; background: var(--ink); }
.code code {
	flex: 1; min-width: 0;
	padding: 15px 16px;
	font: 500 .9rem/1.55 var(--mono);
	color: #f2e9df;
	overflow-x: auto;
	scrollbar-width: thin; scrollbar-color: var(--crimson) transparent;
}
#loader { overflow-wrap: anywhere; }
#starter { white-space: pre; }
.code .f { color: var(--violet-soft); }
.code .s { color: #ff4a5e; }
.copy {
	flex: none; border: 0; cursor: pointer;
	padding: 0 22px;
	font: 400 .95rem/1 var(--display);
	background: #c20b25; color: #fff;
}
.copy:hover { background: var(--crimson); }
.copy.done { background: var(--violet); }
.fine { margin: 14px 0 0; font-size: .92rem; color: #4a3f52; }
.gallery {
	display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 520px);
	gap: 18px;
	overflow-x: auto; scroll-snap-type: x mandatory;
	padding: 6px 4px 18px;
	margin-top: 60px;
	scrollbar-width: thin; scrollbar-color: var(--crimson) transparent;
}
.shot { margin: 0; scroll-snap-align: start; }
.shot img {
	width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
	border: 1px solid var(--line);
	box-shadow: 0 18px 40px -12px rgba(0,0,0,.7);
}
.shot figcaption { margin-top: 12px; font-size: .95rem; color: var(--muted); }
.feat { list-style: none; margin: 0; padding: 0; }
.feat li { position: relative; padding: 0 0 18px 34px; }
.feat li::before {
	content: ""; position: absolute; left: 0; top: .65em;
	width: 20px; height: 3px; background: var(--crimson);
	transform: rotate(-30deg);
	box-shadow: 0 0 10px rgba(227,19,47,.7);
}
.feat b { font-weight: 700; }
.feat span { color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.swatches li {
	width: 34px; height: 34px; background: var(--c);
	clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
}
.small { font-size: .92rem; color: var(--muted); }
.small code, .feat code { font: 500 .88em var(--mono); color: var(--violet-soft); }
.dl-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ================= about ================= */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 60px; align-items: center; }
.avatar { position: relative; max-width: 736px; isolation: isolate; }
.avatar img {
	width: 100%; aspect-ratio: 736 / 414; object-fit: cover; object-position: 70% 40%;
	/* cut corners echo the slash, instead of a soft rounded card */
	clip-path: polygon(0 0, calc(100% - 40px) 0, 100% 40px, 100% 100%, 40px 100%, 0 calc(100% - 40px));
}
.avatar::before {
	/* crimson bleed behind the panel, matching the art's own light */
	content: ""; position: absolute; inset: 10% -4% -8% 8%; z-index: -1;
	background: radial-gradient(ellipse at 70% 50%, rgba(224,16,44,.55), transparent 70%);
	filter: blur(40px);
}
.about-copy p { font-size: 1.2rem; max-width: 46ch; }
.about-copy p + p { color: var(--muted); font-size: 1.05rem; }

/* ================= community ================= */
.community {
	text-align: center;
	background:
		radial-gradient(ellipse 60% 70% at 50% 120%, rgba(227,19,47,.35), transparent 70%),
		var(--ink);
	overflow: hidden;
}
.community h2 { margin: 0; font: 400 clamp(2.6rem, 8vw, 6rem)/.95 var(--display); }
.community p { max-width: 44ch; margin: 22px auto 34px; color: var(--muted); font-size: 1.15rem; }
.community .cta { justify-content: center; }
.community .big-kanji {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	font: 400 min(60vw, 640px)/1 var(--brush); color: rgba(139,77,255,.07);
	pointer-events: none; z-index: 0;
}
.community .wrap { position: relative; z-index: 1; }

footer { padding: 40px 0; background: var(--ink); border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ================= responsive ================= */
@media (max-width: 900px) {
	.release-grid, .about-grid { grid-template-columns: minmax(0, 1fr); }
	.tategaki { font-size: 1.05rem; }
	.ep { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 28px 8px; }
	.ep .btn { justify-self: start; }
}
@media (max-width: 560px) {
	/* phones: tabs drop to their own swipeable row under the logo */
	.nav .wrap { flex-wrap: wrap; height: auto; padding: 10px 0 0; row-gap: 4px; }
	.nav ul.tabs { order: 3; width: 100%; gap: 22px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 10px; }
	.nav ul.tabs::-webkit-scrollbar { display: none; }
	.nav ul.tabs li.keep { margin-left: auto; }
	.nav ul a { white-space: nowrap; }
	.nav { background: rgba(6,4,9,.72); backdrop-filter: blur(10px); }
	.code { flex-direction: column; }
	.copy { padding: 12px; }
	.seal { display: none; }
	section { padding: 90px 0; }
	.sec-head { flex-direction: column; align-items: flex-start; gap: 6px; }
	.hero-inner { padding-left: 0; padding-right: 0; }
	.tategaki { display: none; }
	.lede { font-size: 1.12rem; }
	.wordmark { font-size: clamp(2.6rem, 14.5vw, 3.4rem); }
}
@media (prefers-reduced-motion: reduce) {
	.js .reveal .sec-title, .js .reveal .sec-kanji, .js .reveal .sec-sub { clip-path: none; transition: none; }
	.divider i { transform: rotate(-2.5deg) scaleX(1); transition: none; }
	.wordmark .slash { display: none; }
	html { scroll-behavior: auto; }
}

/* moved out of inline style attributes (CSP: no inline styles) */
#introStroke2 { stroke-width: 46; opacity: .85; }
.scroll-card + .scroll-card { margin-top: 44px; }
.dl-row .copy { padding: 12px 20px; }
.feat-note { margin-top: 34px; }
.about-copy .sec-head { margin-bottom: 26px; }
.swatches .sw-grass { --c: #5cac36; } .swatches .sw-dirt { --c: #966846; } .swatches .sw-stone { --c: #84848a; }
.swatches .sw-diamond { --c: #42cecc; } .swatches .sw-gold { --c: #f6c634; } .swatches .sw-redstone { --c: #d62c22; }
.swatches .sw-emerald { --c: #24c462; } .swatches .sw-lapis { --c: #345ccc; } .swatches .sw-amethyst { --c: #9866de; }

/* Discord contact */
.contact { font-size: 1.05rem; color: var(--muted); }
.contact b, .dm-note b { color: var(--bone); font-weight: 700; }
.copy-inline { display: inline-block; margin-left: 8px; padding: 5px 12px; font-size: .8rem; vertical-align: middle; }
.community .dm-note { margin: 22px auto 0; font-size: 1rem; }
footer a { color: var(--bone); text-underline-offset: 3px; text-decoration-color: var(--crimson); }
