:root {
	--ink: #0d0c09;
	--panel: #201d14;
	--paper: #d7cbae;
	--base: #62573c;

	--paper-dim: rgba(215, 203, 174, 0.66);
	--paper-faint: rgba(215, 203, 174, 0.34);
	--base-soft: rgba(98, 87, 60, 0.55);
	--veil: rgba(13, 12, 9, 0.58);
	--well: rgba(13, 12, 9, 0.55);

	--font-display: "Cinzel", "Georgia", "Times New Roman", serif;
	--font-body: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

	--tear-h: 74px;
	--tear-clear: calc(var(--tear-h) * 0.55);
	--band-pad: clamp(14px, 2vw, 28px);
	--gutter: clamp(20px, 5vw, 48px);
	--radius: 14px;
	--radius-sm: 10px;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--ink);
	color: var(--paper);
	font-family: var(--font-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

body.is-locked {
	overflow: hidden;
}

img {
	display: block;
	max-width: 100%;
}

.band {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.band__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.band__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--veil);
}

/* Overscan so blur doesn't sample past the edges and fade them out. */
.band__bg--blur {
	inset: -40px;
	filter: blur(18px);
}

.band__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 0% 100%;
	z-index: 0;
}

.band__inner {
	position: relative;
	z-index: 2;
	max-width: 1100px;
	margin: 0 auto;
	padding: calc(var(--band-pad) + var(--tear-clear)) var(--gutter);
	text-align: center;
}

.tear-bottom {
	-webkit-mask-image: url("../img/tear-bottom.png"), linear-gradient(#000, #000);
	mask-image: url("../img/tear-bottom.png"), linear-gradient(#000, #000);
	-webkit-mask-repeat: repeat-x, no-repeat;
	mask-repeat: repeat-x, no-repeat;
	-webkit-mask-position: bottom center, top center;
	mask-position: bottom center, top center;
	-webkit-mask-size: auto var(--tear-h), 100% calc(100% - var(--tear-h) + 1px);
	mask-size: auto var(--tear-h), 100% calc(100% - var(--tear-h) + 1px);
}

.tear-top {
	-webkit-mask-image: url("../img/tear-top.png"), linear-gradient(#000, #000);
	mask-image: url("../img/tear-top.png"), linear-gradient(#000, #000);
	-webkit-mask-repeat: repeat-x, no-repeat;
	mask-repeat: repeat-x, no-repeat;
	-webkit-mask-position: top center, bottom center;
	mask-position: top center, bottom center;
	-webkit-mask-size: auto var(--tear-h), 100% calc(100% - var(--tear-h) + 1px);
	mask-size: auto var(--tear-h), 100% calc(100% - var(--tear-h) + 1px);
}

.tear-both {
	-webkit-mask-image: url("../img/tear-top.png"), url("../img/tear-bottom.png"), linear-gradient(#000, #000);
	mask-image: url("../img/tear-top.png"), url("../img/tear-bottom.png"), linear-gradient(#000, #000);
	-webkit-mask-repeat: repeat-x, repeat-x, no-repeat;
	mask-repeat: repeat-x, repeat-x, no-repeat;
	-webkit-mask-position: top center, bottom center, center;
	mask-position: top center, bottom center, center;
	-webkit-mask-size: auto var(--tear-h), auto var(--tear-h), 100% calc(100% - var(--tear-h) * 2 + 2px);
	mask-size: auto var(--tear-h), auto var(--tear-h), 100% calc(100% - var(--tear-h) * 2 + 2px);
}

.hero {
	min-height: clamp(520px, 88svh, 900px);
	display: flex;
	align-items: center;
}

.hero .band__inner {
	width: 100%;
}

.hero__logo {
	max-width: min(680px, 82vw);
	height: auto;
	margin: 0 auto clamp(32px, 5vw, 54px);
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 8px 32px rgba(0, 0, 0, 0.65));
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 15px 42px;
	border: 1px solid var(--base);
	border-radius: var(--radius);
	color: var(--paper);
	font-family: var(--font-display);
	font-size: clamp(0.95rem, 1.7vw, 1.35rem);
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	background: var(--well);
	transition: border-color 0.25s, background 0.25s, color 0.25s;
}

.btn:hover,
.btn:focus-visible {
	border-color: var(--paper);
	background: rgba(13, 12, 9, 0.78);
}

.btn--big {
	gap: 22px;
	padding: 24px 64px;
	border: 4px solid #fff;
	color: #fff;
	font-size: clamp(1.79rem, 3.15vw, 2.54rem);
	background: transparent;
	filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.85));
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.btn--dead {
	cursor: default;
}

.btn--dead:hover {
	border-color: #fff;
	color: #fff;
	background: transparent;
}

.btn--play {
	cursor: pointer;
}

/* .btn:hover would swap the white border for paper; hold the white. */
.btn--play:hover,
.btn--play:focus-visible {
	border-color: #fff;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
}

.btn__play {
	width: 1.6em;
	height: 1.6em;
	fill: currentColor;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
}

.btn__note {
	font-size: 0.62em;
	letter-spacing: 0.22em;
	opacity: 0.85;
}

.steam-cta {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	color: var(--paper);
	text-decoration: none;
	opacity: 0.82;
	transition: opacity 0.25s, filter 0.25s;
}

.steam-cta:hover,
.steam-cta:focus-visible {
	opacity: 1;
	filter: brightness(1.25);
}

.steam-cta svg {
	width: clamp(84px, 9.2vw, 108px);
	height: auto;
	fill: currentColor;
}

.steam-cta span {
	font-family: var(--font-display);
	font-size: clamp(1.8rem, 3vw, 2.2rem);
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.steam-cta__today {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	font-size: clamp(1.1rem, 1.8vw, 1.35rem);
	letter-spacing: 0.26em;
}

.steam-cta__today::after {
	content: "→";
	letter-spacing: 0;
	transition: transform 0.25s;
}

.steam-cta:hover .steam-cta__today::after,
.steam-cta:focus-visible .steam-cta__today::after {
	transform: translateX(6px);
}

@media (prefers-reduced-motion: reduce) {
	.steam-cta__today::after {
		transition: none;
	}
}

.intro {
	max-width: 720px;
	margin: 0 auto;
	padding: clamp(26px, 3.2vw, 40px) var(--gutter);
	text-align: center;
}

.intro p {
	margin: 0 0 8px;
	font-size: clamp(1.2rem, 1.8vw, 1.34rem);
	line-height: 1.45;
	color: var(--paper-dim);
}

.intro p:last-of-type {
	margin-bottom: clamp(18px, 2.4vw, 26px);
}

.gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(12px, 1.6vw, 20px);
}

.shot {
	position: relative;
	display: block;
	padding: 0;
	border: 1px solid var(--base);
	border-radius: var(--radius);
	background: var(--well);
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.25s, transform 0.25s;
}

.shot img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.shot:hover,
.shot:focus-visible {
	border-color: var(--paper);
	transform: translateY(-3px);
}

.section-title {
	margin: 0 0 clamp(16px, 2.2vw, 24px);
	font-family: var(--font-display);
	font-size: clamp(2.1rem, 4.2vw, 3rem);
	font-weight: 400;
	letter-spacing: 0.06em;
	color: var(--paper);
}

.more-devlogs {
	display: inline-block;
	margin-top: clamp(18px, 2.4vw, 28px);
	color: var(--paper);
	font-family: var(--font-display);
	font-size: clamp(1.3rem, 2.4vw, 1.75rem);
	letter-spacing: 0.1em;
	text-decoration: none;
	opacity: 0.75;
	transition: opacity 0.25s, transform 0.25s;
}

.more-devlogs:hover,
.more-devlogs:focus-visible {
	opacity: 1;
	transform: translateX(4px);
}

.devlogs {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: clamp(14px, 1.8vw, 24px);
}

.devlog {
	display: block;
	padding: 0;
	border: 1px solid var(--base);
	border-radius: var(--radius);
	background: var(--well);
	color: var(--paper);
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.25s, transform 0.25s;
}

.devlog:hover,
.devlog:focus-visible {
	border-color: var(--paper);
	transform: translateY(-3px);
}

.devlog__thumb {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: var(--panel);
	overflow: hidden;
}

.devlog__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.devlog__play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(13, 12, 9, 0.25);
	transition: background 0.25s;
}

.devlog:hover .devlog__play {
	background: rgba(13, 12, 9, 0.05);
}

.devlog__play svg {
	width: 54px;
	height: 54px;
	fill: #fff;
	filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.7));
}

.devlog__title {
	display: block;
	padding: 11px 15px 13px;
	font-size: 0.92rem;
	line-height: 1.4;
	color: var(--paper);
}

.devlogs__empty {
	margin: 0;
	color: var(--paper-dim);
}

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 4vw, 60px);
	background: rgba(13, 12, 9, 0.95);
}

.lightbox[hidden] {
	display: none;
}

.lightbox__img {
	max-width: min(1400px, 100%);
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border: 1px solid var(--base);
	border-radius: var(--radius);
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
}

.lightbox__img[hidden],
.lightbox__frame[hidden],
.lightbox__btn[hidden],
.lightbox__counter[hidden] {
	display: none;
}

.lightbox__frame {
	width: min(1200px, 100%);
	aspect-ratio: 16 / 9;
	border: 1px solid var(--base);
	border-radius: var(--radius);
	background: #000;
	overflow: hidden;
}

.lightbox__frame iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

.lightbox__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	padding: 0;
	border: 1px solid var(--base);
	border-radius: 50%;
	background: var(--well);
	color: var(--paper);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s, background 0.2s;
}

.lightbox__btn:hover,
.lightbox__btn:focus-visible {
	border-color: var(--paper);
	background: rgba(13, 12, 9, 0.85);
}

.lightbox__prev {
	left: clamp(10px, 3vw, 40px);
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__next {
	right: clamp(10px, 3vw, 40px);
	top: 50%;
	transform: translateY(-50%);
}

.lightbox__close {
	top: clamp(10px, 3vw, 34px);
	right: clamp(10px, 3vw, 40px);
}

.lightbox__counter {
	position: absolute;
	bottom: clamp(14px, 3vw, 34px);
	left: 50%;
	transform: translateX(-50%);
	font-size: 0.85rem;
	letter-spacing: 0.16em;
	color: var(--paper-dim);
}

.connect {
	max-width: 900px;
	margin: 0 auto;
	padding: clamp(28px, 3.4vw, 44px) var(--gutter);
	text-align: center;
}

.connect__label {
	margin: 0 0 14px;
	font-size: clamp(0.95rem, 1.4vw, 1.05rem);
	color: var(--paper-dim);
}

.signup {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
	max-width: 620px;
	margin: 0 auto clamp(20px, 2.6vw, 30px);
}

.signup__email {
	flex: 1 1 300px;
	min-width: 0;
	padding: 12px 18px;
	border: 1px solid var(--base);
	border-radius: var(--radius-sm);
	background: var(--well);
	color: var(--paper);
	font-family: inherit;
	font-size: 1rem;
	transition: border-color 0.25s;
}

.signup__email::placeholder {
	color: var(--paper-faint);
}

.signup__email:focus {
	border-color: var(--paper);
	outline: none;
}

.signup__submit {
	padding: 12px 30px;
	border: 1px solid var(--base);
	border-radius: var(--radius-sm);
	background: rgba(98, 87, 60, 0.28);
	color: var(--paper);
	font-family: var(--font-display);
	font-size: 0.92rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.25s, background 0.25s;
}

.signup__submit:hover,
.signup__submit:focus-visible {
	border-color: var(--paper);
	background: rgba(98, 87, 60, 0.48);
}

.signup__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.signup[hidden] {
	display: none;
}

.signup__status {
	max-width: 620px;
	margin: 0 auto clamp(20px, 2.6vw, 30px);
	font-size: clamp(0.95rem, 1.4vw, 1.05rem);
	line-height: 1.4;
}

.signup__status[hidden] {
	display: none;
}

.signup__status.is-ok {
	color: var(--paper);
}

.signup__status strong {
	font-weight: 600;
	color: var(--paper);
}

.signup__status.is-error {
	color: #d98a6a;
}

.discord {
	display: inline-flex;
	align-items: center;
	gap: 13px;
	margin-bottom: clamp(16px, 2.2vw, 26px);
	color: var(--paper);
	text-decoration: none;
	opacity: 0.82;
	transition: opacity 0.25s, transform 0.25s;
}

.discord:hover,
.discord:focus-visible {
	opacity: 1;
	transform: translateY(-2px);
}

.discord svg {
	width: clamp(32px, 4vw, 40px);
	height: auto;
	fill: currentColor;
}

.discord span {
	font-family: var(--font-display);
	font-size: clamp(1.3rem, 2.8vw, 1.85rem);
	letter-spacing: 0.02em;
}

.socials {
	display: flex;
	gap: clamp(10px, 1.6vw, 22px);
	justify-content: center;
	align-items: flex-start;
	flex-wrap: nowrap;
}

.footer {
	padding: clamp(28px, 3.4vw, 44px) var(--gutter) clamp(24px, 3vw, 36px);
	text-align: center;
}

.footer__copy {
	margin: clamp(18px, 2.4vw, 26px) 0 0;
	font-size: 0.85rem;
	letter-spacing: 0.08em;
	color: var(--paper-faint);
}

.contact {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 30px;
	border: 1px solid var(--base);
	border-radius: var(--radius-sm);
	background: var(--well);
	color: var(--paper);
	font-family: var(--font-display);
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	opacity: 0.82;
	transition: opacity 0.25s, border-color 0.25s, transform 0.25s;
}

.contact:hover,
.contact:focus-visible {
	opacity: 1;
	border-color: var(--paper);
	transform: translateY(-2px);
}

.contact svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.social {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	padding: 0 4px;
	color: var(--paper);
	text-decoration: none;
	opacity: 0.62;
	transition: opacity 0.25s, transform 0.25s;
}

.social:hover,
.social:focus-visible {
	opacity: 1;
	transform: translateY(-3px);
}

.social svg {
	width: 26px;
	height: 26px;
	fill: currentColor;
}

.social span {
	font-size: clamp(0.6rem, 1.05vw, 0.76rem);
	letter-spacing: 0.05em;
	line-height: 1.3;
	white-space: nowrap;
}

:focus-visible {
	outline: 2px solid var(--paper);
	outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	* {
		transition-duration: 0.01ms !important;
	}
}

@media (max-width: 900px) {
	.socials {
		flex-wrap: wrap;
		gap: 22px 26px;
	}

	.gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	:root {
		--tear-h: 46px;
	}

	.gallery,
	.devlogs {
		grid-template-columns: repeat(2, 1fr);
	}

	.btn {
		padding: 13px 26px;
		letter-spacing: 0.14em;
	}

	.lightbox__btn {
		width: 44px;
		height: 44px;
	}

	.band__video {
		object-position: 15% 100%;
	}

	.hero {
		align-items: flex-start;
	}

	.hero .band__inner {
		padding-top: 14svh;
	}

	.hero__logo {
		max-width: 74vw;
		margin-bottom: 28px;
		/* Soft shadow gets clipped by the section's overflow: hidden. */
		filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.85)) drop-shadow(0 4px 14px rgba(0, 0, 0, 0.7));
	}

	.btn--big {
		gap: 12px;
		padding: 12px 24px;
		border-width: 2px;
		font-size: 1.15rem;
		filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.85));
	}
}


/* Prototype footage page (private, /prototypes/) */
.proto {
	padding: 0 0 clamp(32px, 5vh, 64px);
}

.proto__note {
	max-width: 46rem;
	margin: 0 auto clamp(40px, 7vh, 72px);
	text-align: center;
	color: var(--paper-dim);
}

.proto__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(16px, 2.5vw, 28px);
}

@media (max-width: 900px) {
	.proto__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.proto__footer {
	margin: clamp(48px, 8vh, 88px) 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--base-soft);
	text-align: center;
	font-size: 0.8rem;
	color: var(--paper-faint);
}

@media (max-width: 640px) {
	.proto__grid {
		grid-template-columns: 1fr;
	}
}

.proto-hero {
	min-height: clamp(364px, 62svh, 630px);
}

.proto-hero .hero__logo {
	max-width: min(476px, 58vw);
	margin-bottom: 0;
}

@media (max-width: 640px) {
	.proto-hero .hero__logo {
		max-width: 52vw;
	}
}