/* Synergy Roleplay homepage, 2026 ("A · Hyperspace"): the loading screen's look as the front door. */

@font-face {
	font-family: "Exo 2";
	src: url("Exo2-Medium.ttf") format("truetype");
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: "Exo 2";
	src: url("Exo2-Bold.ttf") format("truetype");
	font-weight: 700;
	font-display: swap;
}

:root {
	--ink: #06090d;
	--text: #f2efe8;
	--text-80: rgba(242, 239, 232, 0.8);
	--text-60: rgba(242, 239, 232, 0.6);
	--text-45: rgba(242, 239, 232, 0.45);
	--line: rgba(242, 239, 232, 0.2);
	--gold: #e9c98f;
	--wide: 0.32em;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
	min-height: 100vh;
	min-height: 100svh;
	background: var(--ink);
	color: var(--text);
	font-family: "Exo 2", "Segoe UI", system-ui, sans-serif;
	font-weight: 500;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

.backdrop {
	position: fixed;
	inset: 0;
	background: var(--ink) url("background.jpg") center / cover no-repeat;
}
.streaks {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

a, button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

/* ---- sound toggle ---------------------------------------------------------------------------- */
.sound {
	position: fixed;
	top: clamp(18px, 4vh, 52px);
	right: clamp(18px, 3.4vw, 66px);
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 14px;
	letter-spacing: var(--wide);
	text-transform: uppercase;
	color: var(--text-60);
	transition: color 0.2s;
}
.sound:hover { color: var(--text); }
.sound-icon { display: flex; align-items: flex-end; gap: 3px; height: 14px; }
.sound-icon i { display: block; width: 3px; background: currentColor; height: 4px; transition: height 0.2s; }
.sound[aria-pressed="true"] { color: var(--gold); }
.sound[aria-pressed="true"] .sound-icon i { animation: eq 0.9s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] .sound-icon i:nth-child(2) { animation-delay: -0.3s; }
.sound[aria-pressed="true"] .sound-icon i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* ---- the hub --------------------------------------------------------------------------------- */
.hub {
	position: relative;
	z-index: 2;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: clamp(80px, 12vh, 150px) 24px clamp(90px, 12vh, 140px);
	text-align: center;
}

.brand { margin: 0; font-size: inherit; font-weight: inherit; }
.brand img { display: block; width: clamp(240px, 21.7vw, 416px); height: auto; margin: 0 auto; }
.tagline {
	display: block;
	margin-top: clamp(22px, 3.4vh, 38px);
	font-size: clamp(13px, 0.85vw, 16px);
	letter-spacing: var(--wide);
	text-transform: uppercase;
	color: var(--text-60);
}

.links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px clamp(36px, 3.75vw, 72px);
	margin-top: clamp(36px, 6vh, 64px);
}
.links a {
	position: relative;
	padding: 6px 0 12px;
	font-size: clamp(17px, 1.15vw, 22px);
	font-weight: 700;
	letter-spacing: var(--wide);
	margin-right: calc(var(--wide) * -1); /* letter-spacing leaves a gap after the last letter */
	text-transform: uppercase;
	text-decoration: none;
	color: var(--text-80);
	transition: color 0.2s;
}
.links a::after {
	content: "";
	position: absolute;
	left: 0;
	right: var(--wide);
	bottom: 0;
	height: 2px;
	background: var(--gold);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s ease;
}
.links a:hover, .links a:focus-visible { color: var(--text); }
.links a:hover::after, .links a:focus-visible::after { transform: scaleX(1); }

.servers {
	display: flex;
	justify-content: center;
	gap: 40px;
	width: 100%;
	margin-top: clamp(48px, 10vh, 110px);
}
.server {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 500px;
	max-width: 100%;
	padding: 34px 36px 30px;
	border: 1px solid var(--line);
	background: rgba(8, 11, 16, 0.6);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	text-align: left;
	transition: border-color 0.3s;
}
.server:hover { border-color: rgba(242, 239, 232, 0.4); }
.server::before {
	/* a gold edge that draws in on hover, like the in-game rail's selection mark */
	content: "";
	position: absolute;
	left: -1px;
	top: -1px;
	bottom: -1px;
	width: 3px;
	background: var(--gold);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 0.35s ease;
}
.server:hover::before, .server:focus-within::before { transform: scaleY(1); }

.label {
	margin: 0;
	font-size: 13px;
	letter-spacing: var(--wide);
	text-transform: uppercase;
	color: var(--gold);
}
.server h2 { margin: 6px 0 10px; font-size: clamp(30px, 2.1vw, 40px); font-weight: 700; line-height: 1.15; }
.about { margin: 0 0 28px; font-size: 17px; line-height: 1.5; color: var(--text-60); }

.button {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 52px;
	padding: 0 34px;
	border: 1px solid rgba(242, 239, 232, 0.3);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.34em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.button:hover { border-color: var(--text); background: rgba(242, 239, 232, 0.08); }
.button.primary { background: var(--text); color: var(--ink); border-color: var(--text); }
.button.primary:hover { background: #fff; border-color: #fff; }

.footer {
	position: absolute;
	z-index: 2;
	left: clamp(18px, 3.4vw, 66px);
	bottom: clamp(18px, 3.4vh, 44px);
	font-size: 14px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--text-45);
}

/* ---- smaller screens ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.servers { gap: 24px; }
}
@media (max-width: 760px) {
	.hub { justify-content: flex-start; padding-top: 96px; padding-bottom: 40px; }
	.links { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; width: 100%; max-width: 360px; }
	.links a { padding: 14px 0 14px var(--wide); margin-right: 0; border-bottom: 1px solid rgba(242, 239, 232, 0.1); }
	.links a::after { right: 0; }
	.servers { flex-direction: column; align-items: center; gap: 18px; margin-top: 40px; }
	.server { padding: 26px 24px 24px; }
	.button { align-self: stretch; }
	.footer { position: relative; left: auto; bottom: auto; display: block; padding: 0 24px 28px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
	.streaks { display: none; }
}
