/*
Theme Name: Flatlands Yule Ball
Theme URI: https://flatlandsyuleball.org
Author: Eric Metze
Description: Single-page invitation for the Inaugural Flatlands Yule Ball, a West Texas charity night for Toys for Tots. Tooled leather, brass and evergreen, taken from the event's own invitation.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: flatlands-yule-ball
*/

:root {
	--leather-deep: #26120a;
	--leather: #371c10;
	--leather-lit: #4a2817;
	--cream: #f7ecd6;
	--cream-soft: #e6d5b5;
	--brass: #d6b06a;
	--brass-dim: #9c7a42;
	--pine: #4f8a5b;
	--berry: #c5342e;
	--display: "Rye", "Zilla Slab", Georgia, serif;
	--body: "Zilla Slab", Georgia, "Times New Roman", serif;
}

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

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

body {
	margin: 0;
	padding: 10px;
	color: var(--cream);
	font-family: var(--body);
	font-size: 1.125rem;
	line-height: 1.55;
	background-color: var(--leather-deep);
	/* Leather: a soft worn highlight in the middle, darker toward the edges, with fine grain on top. */
	background-image:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E"),
		radial-gradient(ellipse at 50% 20%, var(--leather-lit) 0%, var(--leather) 45%, var(--leather-deep) 100%);
	background-attachment: fixed;
}

/* The stitched border that runs round the whole invitation. */
.frame {
	max-width: 46rem;
	margin: 0 auto;
	padding: 28px 18px 24px;
	border: 2px solid var(--brass-dim);
	border-radius: 6px;
	outline: 2px dashed var(--brass-dim);
	outline-offset: -9px;
}

h1,
h2 {
	font-family: var(--display);
	font-weight: 400;
	color: var(--brass);
	line-height: 1.15;
	margin: 0;
	text-wrap: balance;
}

h1 { font-size: clamp(2rem, 8.5vw, 3.5rem); }
h2 { font-size: clamp(1.35rem, 5vw, 1.75rem); margin-bottom: 10px; }

p { margin: 0 0 14px; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
a:focus-visible,
.button:focus-visible {
	outline: 3px solid var(--cream);
	outline-offset: 3px;
	border-radius: 3px;
}

/* Hero */
.hero { text-align: center; padding: 0 4px 22px; }
.hero__mark { width: 132px; height: auto; display: block; margin: 0 auto 8px; }
.hero__howdy { font-size: 1.2rem; font-style: italic; color: var(--cream-soft); margin-bottom: 6px; }
.hero__lede { max-width: 32rem; margin: 12px auto 0; font-size: 1.2rem; text-wrap: balance; }

/* A brass rule with a star in the middle, between sections. */
.rule {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 22px 0;
	color: var(--brass-dim);
}
.rule::before,
.rule::after { content: ""; flex: 1; height: 1px; background: currentColor; }
.rule svg { width: 16px; height: 16px; fill: var(--brass); flex: none; }

section { padding: 0 6px; }

/* The facts: when, where, what it costs. */
.details {
	background: rgba(20, 9, 4, 0.45);
	border: 1px solid var(--brass-dim);
	border-radius: 6px;
	padding: 18px 16px;
}
.details dl { margin: 0; display: grid; gap: 14px; }
.details dt {
	font-family: var(--display);
	color: var(--brass);
	font-size: 1.05rem;
	margin-bottom: 2px;
}
.details dd { margin: 0; font-size: 1.2rem; }
.details address { font-style: normal; }
.details .small { font-size: 1rem; color: var(--cream-soft); }

.button {
	display: inline-block;
	margin-top: 10px;
	padding: 10px 18px;
	background: var(--brass);
	color: var(--leather-deep);
	font-family: var(--body);
	font-weight: 700;
	font-size: 1.05rem;
	text-decoration: none;
	border-radius: 4px;
	border: 2px solid var(--brass);
}
.button:hover { background: var(--cream); border-color: var(--cream); color: var(--leather-deep); }

.expect { margin: 0; padding-left: 1.2em; }
.expect li { margin-bottom: 6px; }
.expect li::marker { color: var(--berry); }

.signoff { text-align: center; font-style: italic; color: var(--cream-soft); }
.signoff strong { display: block; font-style: normal; color: var(--cream); }

footer {
	margin-top: 22px;
	padding: 14px 6px 0;
	border-top: 1px solid var(--brass-dim);
	text-align: center;
	font-size: 0.95rem;
	color: var(--cream-soft);
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (min-width: 640px) {
	body { padding: 24px; font-size: 1.2rem; }
	.frame { padding: 40px 44px 30px; outline-offset: -11px; }
	.details { padding: 24px 28px; }
	.details dl { grid-template-columns: 1fr 1fr; column-gap: 28px; }
	.details .wide { grid-column: 1 / -1; }
}

@media print {
	body { background: #fff; color: #000; padding: 0; }
	.frame { border-color: #000; outline-color: #000; }
	h1, h2, .details dt, a { color: #000; }
	.button { display: none; }
}
