/*
Theme Name: GIVEAWAY
Description: A single-page, mobile-first landing page theme for a limited THRESHING DAY ebook giveaway. One configurable call-to-action, transparent giveaway terms, and a settings page under Giveaway in the WordPress dashboard.
Author: Independent Developer
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: threshing-day-giveaway
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--tdg-navy: #0b1426;
	--tdg-navy-2: #111d36;
	--tdg-charcoal: #14161b;
	--tdg-ink: #080b13;
	--tdg-ember: #e8662a;
	--tdg-ember-hot: #ff8a3d;
	--tdg-bronze: #a9783f;
	--tdg-gold: #c9a45c;
	--tdg-ivory: #f3ead7;
	--tdg-ivory-dim: #cfc6b3;
	--tdg-line: rgba(169, 120, 63, 0.4);
	--tdg-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
	--tdg-sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

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

body {
	margin: 0;
	background: var(--tdg-ink);
	color: var(--tdg-ivory);
	font-family: var(--tdg-serif);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3 {
	font-family: var(--tdg-serif);
	font-weight: 700;
	overflow-wrap: break-word;
}

p {
	margin: 0 0 1rem;
}

a {
	color: var(--tdg-gold);
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	background: var(--tdg-ivory);
	clip: auto;
	clip-path: none;
	color: var(--tdg-ink);
	font-family: var(--tdg-sans);
	font-weight: 700;
	height: auto;
	left: 0.75rem;
	padding: 0.75rem 1rem;
	text-decoration: none;
	top: 0.75rem;
	width: auto;
	z-index: 100000;
}

/* ==========================================================================
   Header
   ========================================================================== */

.tdg-header {
	background: var(--tdg-ink);
	border-bottom: 1px solid var(--tdg-line);
}

.tdg-header__inner {
	align-items: center;
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin: 0 auto;
	max-width: 1180px;
	padding: 0.9rem 1.25rem;
}

.tdg-brand {
	color: var(--tdg-gold);
	font-size: 0.95rem;
	letter-spacing: 0.16em;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.tdg-badge {
	border: 1px solid var(--tdg-bronze);
	border-radius: 999px;
	color: var(--tdg-ivory-dim);
	flex: none;
	font-family: var(--tdg-sans);
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	margin: 0;
	padding: 0.3rem 0.8rem;
	text-transform: uppercase;
	white-space: nowrap;
}

@media (max-width: 399px) {
	.tdg-badge {
		display: none;
	}
}

/* ==========================================================================
   Hero
   ========================================================================== */

.tdg-hero {
	background:
		radial-gradient(ellipse 60% 70% at 76% 42%, rgba(232, 102, 42, 0.22), transparent 70%),
		radial-gradient(ellipse 70% 50% at 8% 0%, rgba(201, 164, 92, 0.09), transparent 65%),
		linear-gradient(180deg, var(--tdg-navy) 0%, #0a1020 100%);
	isolation: isolate;
	overflow: hidden;
	position: relative;
}

/* Dragon-scale lattice, faded toward the edges. */
.tdg-hero::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40' fill='none' stroke='%23c9a45c' stroke-opacity='.17'%3E%3Ccircle cx='0' cy='0' r='20'/%3E%3Ccircle cx='40' cy='0' r='20'/%3E%3Ccircle cx='0' cy='40' r='20'/%3E%3Ccircle cx='40' cy='40' r='20'/%3E%3Ccircle cx='20' cy='20' r='20'/%3E%3C/svg%3E");
	content: "";
	inset: 0;
	-webkit-mask-image: radial-gradient(ellipse 80% 80% at 72% 40%, #000 0%, transparent 72%);
	mask-image: radial-gradient(ellipse 80% 80% at 72% 40%, #000 0%, transparent 72%);
	position: absolute;
	z-index: -1;
}

.tdg-hero__inner {
	display: grid;
	gap: 1.75rem;
	grid-template-areas:
		"head"
		"art"
		"body";
	grid-template-columns: minmax(0, 1fr);
	margin: 0 auto;
	max-width: 1180px;
	padding: 2.25rem 1.25rem 3.25rem;
}

.tdg-hero__head {
	grid-area: head;
	min-width: 0;
}

.tdg-hero__art {
	grid-area: art;
	min-width: 0;
}

.tdg-hero__body {
	grid-area: body;
	min-width: 0;
}

@media (min-width: 900px) {
	.tdg-hero__inner {
		align-items: start;
		column-gap: 4rem;
		grid-template-areas:
			"head art"
			"body art";
		grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
		padding: 5rem 2rem 5.5rem;
		row-gap: 1.5rem;
	}

	.tdg-hero__head {
		align-self: end;
	}

	.tdg-hero__body {
		align-self: start;
	}

	.tdg-hero__art {
		align-self: center;
	}
}

.tdg-eyebrow {
	align-items: center;
	color: var(--tdg-ember-hot);
	display: flex;
	font-family: var(--tdg-sans);
	font-size: 0.78rem;
	font-weight: 700;
	gap: 0.75rem;
	letter-spacing: 0.26em;
	margin: 0 0 1rem;
	text-transform: uppercase;
}

.tdg-eyebrow::before {
	background: var(--tdg-ember);
	content: "";
	flex: none;
	height: 1px;
	width: 2rem;
}

.tdg-title {
	color: var(--tdg-ivory);
	font-size: clamp(1.85rem, 7.4vw, 3.6rem);
	letter-spacing: -0.012em;
	line-height: 1.08;
	margin: 0;
	text-wrap: balance;
}

.tdg-lede {
	color: var(--tdg-ivory);
	font-size: clamp(1.05rem, 2.6vw, 1.25rem);
	line-height: 1.6;
	margin: 0;
	max-width: 34rem;
	opacity: 0.92;
}

.tdg-limit {
	background: rgba(232, 102, 42, 0.09);
	border: 1px solid var(--tdg-bronze);
	border-left: 4px solid var(--tdg-ember);
	color: var(--tdg-ivory);
	font-family: var(--tdg-sans);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.4;
	margin: 1.5rem 0;
	max-width: 100%;
	padding: 0.75rem 1rem;
	text-transform: uppercase;
	width: fit-content;
}

.tdg-cta {
	align-items: center;
	background: linear-gradient(180deg, var(--tdg-ember-hot) 0%, var(--tdg-ember) 55%, #c24a14 100%);
	border: 1px solid #ffc58a;
	border-radius: 4px;
	box-shadow: 0 10px 30px rgba(232, 102, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
	color: #1b0c04;
	display: flex;
	font-family: var(--tdg-sans);
	font-size: clamp(1rem, 4.2vw, 1.2rem);
	font-weight: 800;
	justify-content: center;
	letter-spacing: 0.09em;
	line-height: 1.2;
	max-width: 26rem;
	min-height: 3.75rem;
	padding: 1rem 1.75rem;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: filter 0.15s ease, transform 0.15s ease;
	width: 100%;
}

a.tdg-cta:hover {
	filter: brightness(1.07);
	transform: translateY(-1px);
}

a.tdg-cta:active {
	transform: translateY(0);
}

.tdg-cta:focus-visible {
	outline: 3px solid var(--tdg-ivory);
	outline-offset: 3px;
}

.tdg-cta.is-disabled {
	background: #2a2f3a;
	border-color: #3a4150;
	box-shadow: none;
	color: #b4b8c3;
	cursor: not-allowed;
}

.tdg-fineprint {
	color: var(--tdg-ivory-dim);
	font-size: 0.9rem;
	line-height: 1.55;
	margin: 1rem 0 0;
	max-width: 30rem;
}

/* Book artwork -------------------------------------------------------- */

.tdg-book {
	animation: tdg-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
	margin: 0 auto;
	position: relative;
	width: min(100%, 18rem);
}

.tdg-book::before {
	animation: tdg-glow 1.6s ease-out both;
	background: radial-gradient(closest-side, rgba(255, 138, 61, 0.38), rgba(232, 102, 42, 0.12) 55%, transparent 76%);
	content: "";
	inset: -14% -22%;
	position: absolute;
	z-index: -1;
}

@media (min-width: 600px) {
	.tdg-book {
		width: min(100%, 21rem);
	}
}

@media (min-width: 900px) {
	.tdg-book {
		width: min(100%, 24rem);
	}
}

.tdg-book__frame {
	background: var(--tdg-charcoal);
	border-radius: 3px 7px 7px 3px;
	box-shadow: 0 0 0 1px rgba(201, 164, 92, 0.45), 0 28px 60px rgba(0, 0, 0, 0.65), 0 0 70px rgba(232, 102, 42, 0.22);
	overflow: hidden;
	position: relative;
}

/* Spine highlight and soft sheen over the artwork. */
.tdg-book__frame::after {
	background:
		linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0, rgba(255, 255, 255, 0.14) 2.2%, rgba(0, 0, 0, 0.18) 4.5%, transparent 9%),
		linear-gradient(115deg, rgba(255, 255, 255, 0.1) 0, transparent 35%);
	content: "";
	inset: 0;
	pointer-events: none;
	position: absolute;
}

.tdg-book__frame img,
.tdg-book__frame svg {
	display: block;
	height: auto;
	width: 100%;
}

.tdg-book__caption {
	color: var(--tdg-ivory-dim);
	font-family: var(--tdg-sans);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	margin: 1rem 0 0;
	text-align: center;
}

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

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

@keyframes tdg-glow {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

/* ==========================================================================
   Sections
   ========================================================================== */

.tdg-section {
	border-top: 1px solid var(--tdg-line);
	padding: 4rem 1.25rem;
}

.tdg-section__inner {
	margin: 0 auto;
	max-width: 1100px;
}

.tdg-h2 {
	color: var(--tdg-ivory);
	font-size: clamp(1.6rem, 4.6vw, 2.4rem);
	line-height: 1.15;
	margin: 0 0 0.75rem;
}

.tdg-section__intro {
	color: var(--tdg-ivory-dim);
	margin: 0;
	max-width: 30rem;
}

/* About ---------------------------------------------------------------- */

.tdg-about {
	background: var(--tdg-navy);
}

.tdg-about__text {
	color: var(--tdg-ivory-dim);
	max-width: 46rem;
}

/* Steps ---------------------------------------------------------------- */

.tdg-steps {
	background: linear-gradient(180deg, var(--tdg-navy) 0%, var(--tdg-charcoal) 100%);
}

.tdg-steps__list {
	display: grid;
	gap: 1rem;
	grid-template-columns: minmax(0, 1fr);
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
}

@media (min-width: 800px) {
	.tdg-steps__list {
		gap: 1.5rem;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.tdg-step {
	background: rgba(8, 11, 19, 0.55);
	border: 1px solid var(--tdg-line);
	border-top: 3px solid var(--tdg-ember);
	padding: 1.5rem 1.5rem 1.75rem;
}

.tdg-step__num {
	color: var(--tdg-gold);
	display: block;
	font-size: 2.75rem;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 0.9rem;
}

.tdg-step__title {
	color: var(--tdg-ivory);
	font-size: 1.3rem;
	line-height: 1.25;
	margin: 0 0 0.5rem;
}

.tdg-step__text {
	color: var(--tdg-ivory-dim);
	margin: 0;
}

/* Transparency --------------------------------------------------------- */

.tdg-trust {
	background: var(--tdg-navy-2);
}

.tdg-trust__grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
	.tdg-trust__grid {
		align-items: start;
		gap: 4rem;
		grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
	}
}

.tdg-trust__list {
	display: grid;
	gap: 0.9rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tdg-trust__list li {
	padding-left: 1.75rem;
	position: relative;
}

.tdg-trust__list li::before {
	background: var(--tdg-ember);
	content: "";
	height: 0.5rem;
	left: 0.15rem;
	position: absolute;
	top: 0.65em;
	transform: rotate(45deg);
	width: 0.5rem;
}

.tdg-note {
	background: rgba(8, 11, 19, 0.45);
	border-left: 3px solid var(--tdg-gold);
	color: var(--tdg-ivory);
	margin: 1.75rem 0 0;
	padding: 1rem 1.25rem;
}

/* FAQ ------------------------------------------------------------------ */

.tdg-faq {
	background: var(--tdg-ink);
}

.tdg-faq__list {
	margin: 2rem 0 0;
	max-width: 52rem;
}

.tdg-faq details {
	border-top: 1px solid var(--tdg-line);
}

.tdg-faq details:last-child {
	border-bottom: 1px solid var(--tdg-line);
}

.tdg-faq summary {
	align-items: center;
	color: var(--tdg-ivory);
	cursor: pointer;
	display: flex;
	font-size: 1.12rem;
	font-weight: 700;
	gap: 1rem;
	justify-content: space-between;
	line-height: 1.35;
	list-style: none;
	min-height: 3.5rem;
	padding: 0.9rem 0;
}

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

.tdg-faq summary::after {
	color: var(--tdg-ember-hot);
	content: "+";
	flex: none;
	font-family: var(--tdg-sans);
	font-size: 1.6rem;
	font-weight: 400;
	line-height: 1;
}

.tdg-faq details[open] summary::after {
	content: "\2013";
}

.tdg-faq summary:focus-visible {
	outline: 3px solid var(--tdg-gold);
	outline-offset: 2px;
}

.tdg-faq__answer {
	color: var(--tdg-ivory-dim);
	margin: 0;
	padding: 0 2.5rem 1.25rem 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.tdg-footer {
	background: var(--tdg-charcoal);
	border-top: 1px solid var(--tdg-line);
	color: var(--tdg-ivory-dim);
	font-size: 0.9rem;
	padding: 2.5rem 1.25rem 3rem;
}

.tdg-footer__inner {
	margin: 0 auto;
	max-width: 1100px;
}

.tdg-footer__disclaimer {
	line-height: 1.6;
	margin: 0;
	max-width: 46rem;
}

.tdg-footer__nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	list-style: none;
	margin: 1.25rem 0 0;
	padding: 0;
}

.tdg-footer__nav a {
	align-items: center;
	display: inline-flex;
	min-height: 2.75rem;
}

.tdg-footer__copy {
	font-size: 0.8rem;
	margin: 1rem 0 0;
	opacity: 0.8;
}

/* ==========================================================================
   Generic pages (privacy, terms, 404)
   ========================================================================== */

.tdg-generic__section {
	background: var(--tdg-navy);
	border-top: 0;
	min-height: 60vh;
}

.tdg-generic__inner {
	margin: 0 auto;
	max-width: 46rem;
}

.tdg-entry__title {
	font-size: clamp(1.8rem, 5vw, 2.6rem);
	line-height: 1.15;
	margin: 0 0 1.5rem;
}

.tdg-entry__content {
	color: var(--tdg-ivory-dim);
	overflow-wrap: break-word;
}

.tdg-entry__content h2,
.tdg-entry__content h3 {
	color: var(--tdg-ivory);
	margin: 2rem 0 0.75rem;
}

/* ==========================================================================
   Motion preferences
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.tdg-book,
	.tdg-book::before {
		animation: none;
	}

	.tdg-cta {
		transition: none;
	}

	a.tdg-cta:hover {
		transform: none;
	}
}
