/* alexbrookes.vip
 *
 * The page is dawn on the playa: the photograph is a woman in lilac against a
 * clear lavender sky, a band of pink on the horizon, pale dust underfoot. So
 * the page is light where dianamaye.love is dark — ink set straight onto the
 * sky, no veil — and the palette is sampled from the frame: sky #8fa5e3 to
 * #c3c6ec, horizon #e9bfc9, playa #b7b2ad, and the swimsuit's lilac #8d86d6
 * as the one accent.
 *
 * Composition, by viewport:
 *  - Phone (most of the traffic: a bio link opens an in-app browser). The
 *    photograph is full-bleed and the top third of it is empty sky, so the
 *    name sits there with nothing behind it to fight. The links sit in a
 *    frosted panel over the dust at the bottom. The subject, in the middle,
 *    is left uncovered.
 *  - Wide screen. A 9:16 portrait cropped to `cover` on a 16:9 window keeps
 *    only a thin horizontal band of it, which loses her. So the photograph
 *    becomes a full-height column on the left, and the writing sits on a
 *    gradient that continues the sky beside it.
 */

@font-face {
	font-family: 'Italiana';
	src: url('italiana-latin.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* Variable font, declared with a weight range and plain `format('woff2')` —
 * see dianamaye.love's style.css for why not 'woff2-variations'. */
@font-face {
	font-family: 'Outfit';
	src: url('outfit-latin.woff2') format('woff2');
	font-weight: 300 500;
	font-style: normal;
	font-display: swap;
}

:root {
	/* Deep dusk indigo. 6.8:1 on the brightest blue of the sky, more on the
	 * paler sky and on the panel. */
	--ink: #1d1840;
	--ink-soft: #3d3768;
	--lilac: #6d5fc4;
	--blush: #e9bfc9;
	--sky-top: #8fa5e3;
	--sky-mid: #b7c1ec;
	--horizon: #e4c6d6;
	--dust: #c9c4bf;

	--panel: rgba(247, 244, 252, 0.74);
	--panel-edge: rgba(255, 255, 255, 0.7);
	--rule: rgba(29, 24, 64, 0.14);

	/* A pale halo, not a shadow: it lifts dark type off the sky where a
	 * wisp of cloud or the horizon glow comes up under it. */
	--halo: 0 0 18px rgba(236, 238, 252, 0.75), 0 0 4px rgba(236, 238, 252, 0.6);

	--display: 'Italiana', 'Didot', 'Bodoni 72', Georgia, serif;
	--sans: 'Outfit', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

	--gutter: clamp(1rem, 5vw, 3rem);
}

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

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

body {
	margin: 0;
	min-height: 100svh;
	/* The sky, continued: what shows beside the photograph on a wide screen,
	 * and behind everything for the moment before the image arrives. */
	background: linear-gradient(
		180deg,
		var(--sky-top) 0%,
		var(--sky-mid) 42%,
		var(--horizon) 68%,
		var(--blush) 76%,
		var(--dust) 100%
	) fixed;
	background-color: var(--sky-mid);
	color: var(--ink);
	font-family: var(--sans);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
}

/* ── The photograph ──────────────────────────────────────────────────────── */

/* Fixed and full-bleed on a phone. A fixed element rather than
 * `background-attachment: fixed`, which iOS Safari has never honoured. */
.photo,
.photo img {
	position: fixed;
	inset: 0;
	z-index: -1;
	width: 100%;
	height: 100%;
}

.photo img {
	display: block;
	object-fit: cover;
	/* Hold her in frame when a narrow, tall phone crops the sides. */
	object-position: 52% 40%;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.page {
	min-height: 100svh;
	max-width: 30rem;
	margin-inline: auto;
	padding: clamp(2.25rem, 7svh, 4rem) var(--gutter) clamp(1rem, 3svh, 1.75rem);
	display: flex;
	flex-direction: column;
	/* Name at the top in the empty sky, links at the bottom over the dust,
	 * and the middle of the frame — her — left clear between them. */
	justify-content: space-between;
	gap: 2rem;
}

/* ── Titling ─────────────────────────────────────────────────────────────── */

.titling {
	text-align: center;
}

.name {
	margin: 0;
	font-family: var(--display);
	font-weight: 400;
	font-size: clamp(3rem, 14vw, 5.5rem);
	line-height: 0.95;
	letter-spacing: 0.02em;
	color: var(--ink);
	text-shadow: var(--halo);
	text-wrap: balance;
}

.epithet {
	margin: 0.9em 0 0;
	font-size: 0.78rem;
	font-weight: 400;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--ink-soft);
	text-shadow: var(--halo);
}

/* Her bio, as one line of small caps separated by sparks. Wraps cleanly at
 * 320px because each item is a single unbreakable phrase. */
.tags {
	margin: 1.1rem auto 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35rem 0;
	max-width: 22rem;
	font-size: 0.82rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	color: var(--ink);
	text-shadow: var(--halo);
}

.tags li {
	white-space: nowrap;
}

.tags li + li::before {
	content: '✦';
	margin: 0 0.6em;
	font-size: 0.7em;
	vertical-align: 0.12em;
	color: var(--lilac);
}

/* ── The panel ───────────────────────────────────────────────────────────── */

.panel {
	padding: 1.25rem 1.25rem 1rem;
	background: var(--panel);
	border: 1px solid var(--panel-edge);
	border-radius: 1.25rem;
	box-shadow: 0 10px 40px rgba(29, 24, 64, 0.16);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	backdrop-filter: blur(14px) saturate(1.2);
}

.what {
	margin: 0 0 1rem;
	font-size: 0.98rem;
	font-weight: 300;
	line-height: 1.55;
	text-align: center;
	color: var(--ink);
	text-wrap: pretty;
}

/* Grandma's line is the punchline, so it gets the display face. */
.what em {
	display: block;
	margin-top: 0.15rem;
	font-family: var(--display);
	font-style: normal;
	font-size: 1.45rem;
	line-height: 1.2;
	color: var(--lilac);
}

.links ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.6rem;
}

.links a {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.9rem 1.1rem;
	border-radius: 0.85rem;
	background: rgba(255, 255, 255, 0.62);
	border: 1px solid var(--rule);
	color: var(--ink);
	text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.where {
	font-family: var(--display);
	font-size: 1.45rem;
	line-height: 1.1;
}

.what-there {
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	color: var(--ink-soft);
	text-align: right;
}

@media (hover: hover) {
	.links a:hover {
		background: #ffffff;
		border-color: var(--lilac);
		transform: translateY(-1px);
	}

	.links a:hover .where {
		color: var(--lilac);
	}
}

.links a:focus-visible {
	outline: 2px solid var(--lilac);
	outline-offset: 3px;
}

/* ── The 18+ gate (landing) and the call to action (behind it) ──────────── */

/* The one filled control on each page: everything else is a quiet card, so
 * the eye goes here. White on the swimsuit lilac is 5:1. The gate is a form
 * button and the CTA is a link; they share a look. */
.gate {
	margin: 0 0 0.45rem;
}

.gate button,
.cta {
	display: block;
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
	width: 100%;
	padding: 1rem 1.1rem;
	border: 0;
	border-radius: 0.85rem;
	background: var(--lilac);
	color: #ffffff;
	font: inherit;
	font-family: var(--display);
	font-size: 1.5rem;
	line-height: 1.1;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(109, 95, 196, 0.35);
	transition: background-color 180ms ease, transform 180ms ease;
}

@media (hover: hover) {
	.gate button:hover,
	.cta:hover {
		background: #5a4cb3;
		transform: translateY(-1px);
	}
}

.gate button:focus-visible,
.cta:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

.cta {
	margin: 0 0 1rem;
}

.gate-note {
	margin: 0 0 1rem;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-align: center;
	color: var(--ink-soft);
}

.back {
	color: var(--ink-soft);
	text-underline-offset: 0.2em;
}

.terms {
	text-align: center;
}

.age {
	margin: 0.9rem 0 0;
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	color: var(--ink-soft);
}

/* ── Wide screens: the photograph becomes a column ───────────────────────── */

@media (min-width: 56rem) {
	.photo,
	.photo img {
		right: auto;
		width: min(46vw, calc(100svh * 0.5625 + 8vw));
	}

	.page {
		max-width: none;
		margin-left: min(46vw, calc(100svh * 0.5625 + 8vw));
		padding-inline: clamp(2rem, 6vw, 6rem);
		justify-content: center;
		align-items: center;
		gap: clamp(2rem, 6svh, 3.5rem);
	}

	.titling,
	.panel {
		width: 100%;
		max-width: 28rem;
	}

	/* On the gradient there is no photograph to frost over. */
	.panel {
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}

/* ── The one moment ──────────────────────────────────────────────────────── */

/* Light arriving: the name brightens in, the panel rises after it. Nothing
 * else on the page ever moves. */
@media (prefers-reduced-motion: no-preference) {
	.titling {
		animation: dawn 1400ms ease-out 100ms backwards;
	}

	.panel {
		animation: rise 900ms cubic-bezier(0.22, 0.61, 0.36, 1) 450ms backwards;
	}

	@keyframes dawn {
		from {
			opacity: 0;
			filter: blur(6px);
		}

		to {
			opacity: 1;
			filter: none;
		}
	}

	@keyframes rise {
		from {
			opacity: 0;
			transform: translateY(16px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}
}
