/**
 * Preview gate placeholder page (placeholder.php).
 *
 * The only stylesheet on the page: the gate removes the theme's and
 * WordPress's front-end styles while it's shown (see cyra_preview_gate_isolate()).
 */

/* Fonts */

@font-face {
	font-family: "Vollkorn";
	src: url("fonts/Vollkorn-VariableFont_wght.ttf") format("truetype-variations");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Charis";
	src: url("fonts/CharisSIL-Regular.ttf") format("truetype");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* Tokens */

:root {
	--gate-text: #fff;
	--gate-muted: rgba(255, 255, 255, 0.72);
	--gate-faint: rgba(255, 255, 255, 0.5);
	--gate-line: rgba(255, 255, 255, 0.42);
	--gate-surface: rgba(10, 12, 14, 0.55);
	--gate-error: #ffb4a8;
	--gate-font-display: "Vollkorn", Georgia, serif;
	--gate-font-body: "Charis", Georgia, serif;
	--gate-radius: 6px;
	--gate-gutter: clamp(1.25rem, 5vw, 3rem);
}

/* Base */

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

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

body.gate {
	display: grid;
	grid-template-rows: 1fr auto;
	min-height: 100vh;
	min-height: 100svh;
	margin: 0;
	padding: var(--gate-gutter);
	background:
		linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 55%, rgba(0, 0, 0, 0.85) 100%),
		#111 url("cyra-bg.jpg") center / cover no-repeat;
	color: var(--gate-text);
	font-family: var(--gate-font-body);
	font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
	outline: 2px solid var(--gate-text);
	outline-offset: 3px;
}

/* Message */

.gate__main {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: clamp(1.25rem, 3vw, 2rem);
	width: 100%;
	max-width: 40rem;
	margin: 0 auto;
	padding-block: clamp(2rem, 8vh, 6rem);
	text-align: center;
}

/* The Cyra emblem (cyra-logo.svg, inline), drawn in the text colour. */
.gate__logo {
	display: block;
	width: auto;
	height: clamp(4.5rem, 12vw, 6.5rem);
	color: var(--gate-text);
}

.gate__title {
	margin: 0;
	font-family: var(--gate-font-display);
	font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.gate__lead {
	max-width: 34rem;
	margin: 0;
	color: var(--gate-muted);
	text-wrap: pretty;
}

.gate__lead a {
	color: var(--gate-text);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.gate__lead a:hover {
	text-decoration-thickness: 2px;
}

.gate__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.gate__button {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.8em 1.4em;
	border-radius: var(--gate-radius);
	background: var(--gate-text);
	color: #111;
	line-height: 1;
	text-decoration: none;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.gate__button svg {
	width: 1.15em;
	height: auto;
}

.gate__button:hover {
	opacity: 0.88;
	transform: translateY(-1px);
}

/* Footer: member access and copyright */

.gate__footer {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	font-size: 0.875rem;
	text-align: center;
}

.gate__access {
	width: 100%;
	max-width: 22rem;
}

.gate__access summary {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	color: var(--gate-muted);
	list-style: none;
	cursor: pointer;
}

.gate__access summary::-webkit-details-marker {
	display: none;
}

.gate__access summary::after {
	content: "";
	width: 0.4em;
	height: 0.4em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform 0.15s ease;
}

.gate__access[open] summary::after {
	transform: translateY(0.1em) rotate(-135deg);
}

.gate__access summary:hover {
	color: var(--gate-text);
}

.gate__form {
	margin-top: 0.75rem;
	padding: 1rem;
	border: 1px solid var(--gate-line);
	border-radius: var(--gate-radius);
	background: var(--gate-surface);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	text-align: start;
}

.gate__label {
	display: block;
	margin-bottom: 0.4rem;
	color: var(--gate-muted);
}

.gate__field {
	display: flex;
	gap: 0.5rem;
}

.gate__field input {
	flex: 1;
	min-width: 0;
	padding: 0.6em 0.75em;
	border: 1px solid var(--gate-line);
	border-radius: var(--gate-radius);
	background: rgba(255, 255, 255, 0.08);
	color: var(--gate-text);
	font: inherit;
}

.gate__field input[aria-invalid="true"] {
	border-color: var(--gate-error);
}

.gate__field button {
	padding: 0.6em 1.1em;
	border: 0;
	border-radius: var(--gate-radius);
	background: var(--gate-text);
	color: #111;
	font: inherit;
	cursor: pointer;
}

.gate__field button:hover {
	opacity: 0.88;
}

.gate__error {
	margin: 0.6rem 0 0;
	color: var(--gate-error);
}

.gate__copyright {
	margin: 0;
	color: var(--gate-faint);
}

@media (prefers-reduced-motion: reduce) {

	.gate__button,
	.gate__access summary::after {
		transition: none;
	}

	.gate__button:hover {
		transform: none;
	}
}
