/* Stonewire Games */

@font-face { font-family: "Barlow Condensed"; src: url(../fonts/barlow-condensed-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(../fonts/barlow-condensed-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(../fonts/barlow-condensed-latin-800-italic.woff2) format("woff2"); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(../fonts/barlow-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
	--basalt: #111416;
	--basalt-2: #181c1f;
	--hero-bg: #15191b;
	--ink: #1b2a30;
	--stone: #6f7f86;
	--copper: #d98a3f;
	--copper-hi: #ffc57a;
	--cream: #ece2cc;
	--text: #cfc9bd;
	--muted: #8e979a;
	--line: rgba(236, 226, 204, .13);
	--display: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
	--body: "Barlow", system-ui, sans-serif;
	--gutter: clamp(16px, 4.5vw, 64px);
	--wire-x: clamp(16px, 3vw, 44px);
	--indent: calc(var(--wire-x) + clamp(36px, 6vw, 104px));
	--ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background-color: var(--basalt);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .045 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
	color: var(--text);
	font: 400 1.125rem/1.6 var(--body);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--copper-hi); outline-offset: 4px; }
::selection { background: var(--copper); color: var(--basalt); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 100; padding: 10px 14px; background: var(--cream); color: var(--basalt); font-weight: 500; }
.skip-link:focus { left: 12px; }

/* Labels and small caps type */
.section-label,
.hero__foot,
.platforms li,
.nav-list a {
	font-family: var(--display);
	font-weight: 600;
	letter-spacing: .18em;
	text-transform: uppercase;
}
.section-label { margin: 0; font-size: .95rem; font-weight: 800; letter-spacing: .3em; color: var(--copper); }

/* Header */
.site-header {
	position: absolute;
	inset: 0 0 auto;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 22px var(--gutter);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 42px; height: 42px; flex: none; transition: transform .5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg); }
.brand__name { font: 800 1.05rem/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--cream); white-space: nowrap; }
.brand__name span { margin-left: .55em; color: var(--copper); }
.home .site-header .brand__name { display: none; }

.nav-list { display: flex; flex-wrap: wrap; gap: 6px clamp(18px, 3vw, 40px); margin: 0; padding: 0; list-style: none; }
.nav-list a {
	display: inline-block;
	padding: 8px 0 6px;
	font-size: .98rem;
	color: var(--cream);
	text-decoration: none;
	background: linear-gradient(var(--copper), var(--copper)) 0 100% / 0 2px no-repeat;
	transition: background-size .35s var(--ease);
}
.nav-list a:hover,
.nav-list .current-menu-item > a,
.nav-list a[aria-current] { background-size: 100% 2px; }

/* Hero */
.hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	grid-template-rows: 1fr auto;
	padding: 100px var(--gutter) 26px;
	background: var(--hero-bg);
}
.hero__stage { display: grid; place-items: center; }
.hero__svg { width: min(1500px, 100%); height: auto; overflow: visible; }

.hw-type { font-family: var(--display); font-weight: 800; font-size: 330px; }
.hw-letters { fill: var(--cream); stroke: var(--hero-bg); stroke-width: 22px; stroke-linejoin: round; paint-order: stroke; }
.hw-copper { fill: none; stroke: var(--copper); stroke-width: 12; stroke-linecap: round; }
.hw-gap { fill: none; stroke: var(--hero-bg); stroke-width: 34; stroke-linecap: round; }
.hw-spark { fill: #fff1d6; }
.hw-games { font-family: var(--display); font-weight: 800; font-size: 54px; fill: var(--copper); }

.hw-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: wire-in 1.9s cubic-bezier(.65, 0, .25, 1) .2s forwards; }
.hw-spark { opacity: 0; animation: fade-in .5s 2s forwards; }
.hw-letters { opacity: 0; animation: fade-in .9s .05s forwards; }
.hw-games { opacity: 0; animation: fade-in .8s 1.3s forwards; }
@keyframes wire-in { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }

.hero__foot {
	display: flex;
	justify-content: space-between;
	align-items: end;
	gap: 16px 32px;
	flex-wrap: wrap;
	font-size: .92rem;
	color: var(--muted);
}
.hero__foot a { color: var(--cream); text-decoration: none; }
.hero__foot a span { display: inline-block; margin-left: .3em; color: var(--copper); transition: transform .3s var(--ease); }
.hero__foot a:hover span { transform: translateY(3px); }

/* The wire that runs down the page */
.wired { position: relative; }
.wired::before {
	content: "";
	position: absolute;
	z-index: 5;
	top: 0;
	bottom: var(--wire-end, 160px);
	left: var(--wire-x);
	width: 6px;
	border-radius: 3px;
	background: linear-gradient(90deg, #b8692a 0 30%, var(--copper) 30% 55%, var(--copper-hi) 55% 75%, var(--copper) 75%);
	box-shadow: 3px 0 6px rgba(0, 0, 0, .35);
	transform-origin: top;
	pointer-events: none;
}
.wired::after,
.node {
	position: absolute;
	z-index: 6;
	left: calc(var(--wire-x) - 6px);
	width: 18px;
	height: 18px;
	border: 3px solid var(--ink);
	border-radius: 50%;
	background: var(--copper-hi);
	box-shadow: 0 0 0 4px rgba(255, 197, 122, .12);
	pointer-events: none;
}
.wired::after { content: ""; top: -9px; }

@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.wired::before {
			animation: wire-grow linear both;
			animation-timeline: view();
			animation-range: entry 0% cover 62%;
		}
	}
}
@keyframes wire-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Games */
.games { position: relative; padding-top: clamp(72px, 10vw, 150px); }
.games > .section-label { padding: 0 var(--gutter) clamp(28px, 4vw, 48px) var(--indent); }

.band {
	position: relative;
	display: grid;
	align-items: end;
	min-height: min(88vh, 860px);
	margin-bottom: clamp(14px, 2vw, 28px);
	overflow: hidden;
}
.band__art { position: absolute; inset: 0; z-index: 0; display: block; overflow: hidden; background: var(--basalt-2); }
.band__art img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.001); transition: transform 1.6s var(--ease); }
.band:hover .band__art img { transform: scale(1.035); }
.band::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(17, 20, 22, .95) 0%, rgba(17, 20, 22, .82) 26%, rgba(17, 20, 22, .2) 58%, rgba(17, 20, 22, 0) 72%),
		linear-gradient(0deg, rgba(17, 20, 22, .7) 0%, rgba(17, 20, 22, 0) 45%);
}
.band--flip::after {
	background:
		linear-gradient(270deg, rgba(17, 20, 22, .95) 0%, rgba(17, 20, 22, .82) 26%, rgba(17, 20, 22, .2) 58%, rgba(17, 20, 22, 0) 72%),
		linear-gradient(0deg, rgba(17, 20, 22, .7) 0%, rgba(17, 20, 22, 0) 45%);
}
.band > .node { top: 50%; }

.band__body {
	position: relative;
	z-index: 2;
	width: min(100%, 640px);
	padding: clamp(40px, 6vw, 96px) var(--gutter) clamp(44px, 6vw, 96px) var(--indent);
}
.band--flip .band__body { justify-self: end; padding-left: var(--gutter); }
.band__title { margin: 0 0 28px; }
.band__title a { display: inline-block; text-decoration: none; }
.band .game-logo--image { width: min(460px, 82vw); filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .55)); transition: transform .5s var(--ease); }
.band__title a:hover .game-logo { transform: translateY(-3px) rotate(-1deg); }
.band__more {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	margin-top: 30px;
	font: 800 1.02rem/1 var(--display);
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--accent, var(--copper));
	text-decoration: none;
}
.band__more span { transition: transform .3s var(--ease); }
.band__more:hover span { transform: translateX(5px); }
.band--compact { min-height: min(62vh, 580px); }

/* Tags: status tape and platforms */
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.tape {
	display: inline-block;
	padding: .5em .85em .44em;
	font: 800 .92rem/1 var(--display);
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--basalt);
	background: var(--accent, var(--copper));
	border-radius: 2px;
}
.platforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.platforms li {
	padding: 7px 10px 6px;
	font-size: .82rem;
	line-height: 1;
	color: var(--cream);
	border: 1px solid rgba(236, 226, 204, .3);
	border-radius: 3px;
	background: rgba(17, 20, 22, .4);
}

/* Rift Rivals wordmark */
.game-logo--rift-rivals {
	display: inline-flex;
	align-items: center;
	gap: .06em;
	font: italic 800 clamp(4rem, 9vw, 7.6rem)/.9 var(--display);
	letter-spacing: .01em;
	text-transform: uppercase;
	color: #fde8b8;
	text-shadow: 0 6px 0 #0a1427;
	transition: transform .5s var(--ease);
}
.game-logo--rift-rivals svg { width: .47em; max-width: none; height: 1.05em; flex: none; margin: 0 -.04em; filter: drop-shadow(0 4px 0 #0a1427); }
.game-logo--type { font: 800 clamp(3.4rem, 8vw, 6.5rem)/.9 var(--display); text-transform: uppercase; color: var(--cream); }

/* Studio */
.studio {
	position: relative;
	padding: clamp(96px, 13vw, 200px) var(--gutter) clamp(96px, 11vw, 160px) var(--indent);
}
.studio > .node { top: auto; bottom: var(--wire-end, 160px); transform: translateY(50%); }
.wired { --wire-end: calc(clamp(96px, 11vw, 160px) + clamp(12px, 2.7vw, 35px)); }
.studio > .section-label { margin-bottom: 18px; }
.studio__mail {
	font: 800 clamp(1.3rem, 5vw, 4rem)/1.05 var(--display);
	overflow-wrap: anywhere;
	color: var(--cream);
	text-decoration: none;
	border-bottom: 3px solid var(--copper);
}
.studio__mail:hover { color: var(--copper-hi); }

/* Game page */
.game-hero {
	position: relative;
	isolation: isolate;
	display: grid;
	align-items: end;
	min-height: min(92vh, 900px);
}
.game-hero__art { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--basalt-2); }
.game-hero__art img { width: 100%; height: 100%; object-fit: cover; }
.game-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(17, 20, 22, .72) 0%, rgba(17, 20, 22, 0) 22%),
		linear-gradient(0deg, var(--basalt) 0%, rgba(17, 20, 22, .72) 24%, rgba(17, 20, 22, 0) 58%);
}
.game-hero__body { padding: 0 var(--gutter) clamp(28px, 5vw, 64px); }
.game-hero__title { margin: 0 0 26px; }
.game-hero .game-logo--image { width: min(580px, 88vw); filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .6)); }
.game-hero .game-logo--rift-rivals { font-size: clamp(4.4rem, 12vw, 10rem); }

.game-info { padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(56px, 7vw, 104px); }
.game-info__text p {
	max-width: 52ch;
	margin: 0 0 .9em;
	font-size: clamp(1.2rem, 1.65vw, 1.45rem);
	line-height: 1.5;
	color: var(--cream);
}
.game-info__text p + p { color: var(--text); }
.store-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.button {
	display: inline-block;
	padding: 14px 20px 12px;
	font: 800 1rem/1 var(--display);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--basalt);
	background: var(--accent, var(--copper));
	border-radius: 3px;
	text-decoration: none;
	box-shadow: 0 4px 0 rgba(0, 0, 0, .45);
	transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.button:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(0, 0, 0, .45); }

.shots { padding-bottom: clamp(72px, 9vw, 128px); }
.shots__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter) 22px; }
.shots__nav { display: flex; gap: 8px; }
.shots__nav button {
	width: 46px;
	height: 46px;
	font: 500 1.2rem/1 var(--body);
	color: var(--cream);
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 50%;
	cursor: pointer;
	transition: border-color .2s, color .2s;
}
.shots__nav button:hover { border-color: var(--copper); color: var(--copper-hi); }

.shots .wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: nowrap;
	gap: 16px;
	margin: 0;
	padding: 0 var(--gutter) 18px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--gutter);
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--copper) transparent;
}
.shots .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
	flex: 0 0 min(80vw, 1120px);
	width: auto;
	margin: 0;
	scroll-snap-align: start;
	border-radius: 4px;
	overflow: hidden;
	background: var(--basalt-2);
}
.shots .wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.more { padding-top: clamp(24px, 4vw, 48px); border-top: 1px solid var(--line); }
.more > .section-label { padding: clamp(40px, 5vw, 64px) var(--gutter) 28px; }
.more .band > .node { display: none; }
.more .band__body { padding-left: var(--gutter); }

/* Pages */
.page-wrap { max-width: 920px; padding: clamp(150px, 17vw, 220px) var(--gutter) clamp(88px, 10vw, 150px); }
.page-head { padding-bottom: 8px; }
.page-head--wide { padding: clamp(150px, 17vw, 220px) var(--gutter) clamp(48px, 6vw, 80px); }
.page-head h1 {
	margin: 0 0 22px;
	font: 800 clamp(3.4rem, 10vw, 7.5rem)/.88 var(--display);
	text-transform: uppercase;
	color: var(--cream);
}
.wire-rule { width: 200px; height: auto; margin-bottom: clamp(36px, 5vw, 56px); }
.wired--archive::after { display: none; }

.prose { max-width: 66ch; }
.prose > * { margin: 0 0 1.1em; }
.prose h2 {
	margin: 2.2em 0 .5em;
	font: 800 1.55rem/1.1 var(--display);
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--cream);
}
.prose a { color: var(--copper-hi); text-underline-offset: 4px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--cream); }
.prose .lead { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.45; color: var(--cream); }
.prose .small { font-size: .9rem; color: var(--muted); }
.prose .big-link { max-width: none; margin: .5em 0 .9em; font: 800 clamp(1.3rem, 5.4vw, 3.4rem)/1.05 var(--display); overflow-wrap: anywhere; }
.prose .big-link a { text-decoration: none; border-bottom: 3px solid var(--copper); }
.post-list { padding: 0; list-style: none; }
.post-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.post-list time { color: var(--muted); }

/* 404 */
.lost {
	display: grid;
	place-content: center;
	justify-items: center;
	gap: 12px;
	min-height: 100vh;
	min-height: 100svh;
	padding: 120px var(--gutter) 80px;
	text-align: center;
}
.lost__wire { width: min(640px, 100%); height: auto; margin-bottom: 20px; }
.lost__sparks { animation: flicker 1.4s steps(2) infinite; }
@keyframes flicker { 50% { opacity: .15; } }
.lost h1 { margin: 0; font: 800 clamp(2.6rem, 7vw, 5rem)/.95 var(--display); text-transform: uppercase; color: var(--cream); }
.lost a { color: var(--copper-hi); text-underline-offset: 5px; }

/* Footer */
.site-footer { padding: 40px var(--gutter) 46px; border-top: 1px solid var(--line); }
.site-footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; }
.brand--footer .brand__mark { width: 34px; height: 34px; }
.brand--footer .brand__name { font-size: .95rem; }
.footer-nav .nav-list a { font-size: .9rem; color: var(--text); }
.site-footer__legal { margin: 26px 0 0; font-size: .875rem; line-height: 1.5; color: var(--muted); }

/* Narrow screens */
@media (max-width: 780px) {
	.hero { min-height: 62svh; padding-top: 110px; }
	.hero__foot { font-size: .8rem; }

	.band, .band--compact { display: block; min-height: 0; }
	.band__art { position: relative; aspect-ratio: 16 / 10; }
	.band::after { display: none; }
	.band > .node { top: calc(62.5vw - 9px); }
	.band__body, .band--flip .band__body { width: auto; padding: 30px var(--gutter) 44px var(--indent); }
	.band .game-logo--image { width: min(340px, 100%); }
	.band .game-logo--rift-rivals { font-size: clamp(3.2rem, 15vw, 4.6rem); }
	.more .band__body { padding-left: var(--gutter); }

	.game-hero { min-height: 74svh; }
}

@media (max-width: 480px) {
	.site-header { padding-top: 16px; }
	.brand__name { display: none; }
	.brand__mark { width: 38px; height: 38px; }
	.hero__foot { justify-content: center; text-align: center; }
	.hero__foot > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.hw-spark { display: none; }
}
