/*
Theme Name: The Love Spread
Theme URI: https://thelovespread.space
Description: Child of Kadence. The homepage is the yes-or-no sheet.
Author: The Love Spread
Template: kadence
Version: 1.0.0
Text Domain: lovespread
Requires at least: 6.3
Requires PHP: 8.0
*/

@font-face {
	font-family: "P052";
	src: url("assets/fonts/p052-roman.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "P052";
	src: url("assets/fonts/p052-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "P052";
	src: url("assets/fonts/p052-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Lato";
	src: url("assets/fonts/lato-medium.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Lato";
	src: url("assets/fonts/lato-bold.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--ink: #121016;
	--ink-soft: #15121a;
	--paper: #f4eee3;
	--paper-deep: #e7dccb;
	--line: #ddcfbb;
	--gold: #c8a45d;
	--gold-ink: #7a5e24;
	--rose: #b24a66;
	--burgundy: #4a1524;
	--blush: #f6e9e0;
	--love-gold: #d9a679;
	--measure: 38rem;
	--gutter: clamp(1.25rem, 4vw, 4.5rem);
}

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

html {
	color-scheme: light;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--paper);
	color: var(--ink-soft);
	font-family: "Lato", "Segoe UI", sans-serif;
	font-weight: 500;
	font-size: 1.125rem;
	line-height: 1.55;
}

main {
	flex: 1 0 auto;
}

::selection {
	background: var(--gold);
	color: var(--ink);
}

:focus-visible {
	outline: 3px solid var(--ink-soft);
	outline-offset: 3px;
}

.mast :focus-visible {
	outline-color: var(--paper);
}

.skip {
	position: absolute;
	left: 1rem;
	top: -4rem;
	z-index: 20;
	background: var(--paper);
	color: var(--ink-soft);
	padding: 0.5rem 0.75rem;
}

.skip:focus {
	top: 0.5rem;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mast {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem 2rem;
	padding: 0.9rem var(--gutter);
	background: var(--ink);
	color: var(--paper);
	position: sticky;
	top: 0;
	z-index: 5;
}

.brand {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	color: inherit;
	text-decoration: none;
	font-family: "P052", "Palatino Linotype", Palatino, serif;
	font-size: 1.45rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1;
}

.brand svg {
	width: 2.75rem;
	height: 2.2rem;
	display: block;
	color: var(--paper);
}

.mark-card {
	transform-box: fill-box;
	transform-origin: center 80%;
}

.mark-left {
	transform: rotate(-18deg);
}

.mark-right {
	transform: rotate(18deg);
}

.mark-center {
	transform: translateY(-3px);
}

.mast-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.35rem;
}

.mast-nav a {
	color: var(--paper);
	text-decoration: none;
	font-size: 1rem;
}

.mast-nav a:hover {
	color: var(--gold);
}

.sheet {
	display: grid;
	grid-template-columns: minmax(16rem, 0.72fr) minmax(18rem, 1.28fr);
	gap: 3rem 4rem;
	align-items: start;
	padding: 4.5rem var(--gutter) 5rem;
}

.sheet-intro {
	position: sticky;
	top: 6.5rem;
}

h1,
h2 {
	font-family: "P052", "Palatino Linotype", Palatino, serif;
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 0.95;
	text-wrap: balance;
}

.sheet h1 {
	margin: 0 0 1.25rem;
	font-size: clamp(3.5rem, 7vw, 6rem);
	color: var(--ink);
}

.lead {
	max-width: var(--measure);
	margin: 0;
}

.rule {
	display: block;
	width: 4.5rem;
	height: 2px;
	margin-top: 1.75rem;
	background: var(--gold);
}

.answers {
	width: 100%;
	border-collapse: collapse;
}

.answers td {
	padding: 0.95rem 0.4rem;
	border-bottom: 1px solid var(--line);
	vertical-align: baseline;
}

.answers td:first-child {
	font-family: "P052", "Palatino Linotype", Palatino, serif;
	font-size: clamp(1.35rem, 2vw, 1.85rem);
	letter-spacing: -0.02em;
	color: var(--ink);
}

.answers td:last-child {
	text-align: right;
	font-family: "P052", "Palatino Linotype", Palatino, serif;
	font-weight: 700;
	font-size: clamp(1.35rem, 2vw, 1.85rem);
	letter-spacing: -0.02em;
}

.answers .yes {
	color: var(--ink-soft);
}

.answers .maybe {
	color: var(--gold-ink);
}

.answers .no {
	color: var(--burgundy);
}

.answers tbody tr:hover td {
	background: var(--paper-deep);
}

.extent {
	margin: 1.25rem 0 0;
	max-width: var(--measure);
	color: var(--gold-ink);
}

.love {
	display: grid;
	grid-template-columns: minmax(16rem, 0.7fr) minmax(18rem, 1.3fr);
	gap: 2rem 4rem;
	align-items: start;
	padding: 5.5rem var(--gutter) 5rem;
	background: var(--burgundy);
	color: var(--blush);
}

.love h2 {
	margin: 0 0 1rem;
	font-size: clamp(2.6rem, 5vw, 4.5rem);
	color: var(--blush);
	border-bottom: 2px solid var(--rose);
	padding-bottom: 0.55rem;
	display: inline-block;
}

.love p {
	margin: 0;
	max-width: 28rem;
}

.positions {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: card;
}

.positions li {
	counter-increment: card;
	display: grid;
	grid-template-columns: 3.25rem 1fr;
	gap: 0.75rem;
	align-items: baseline;
	padding: 1.05rem 0;
	border-top: 1px solid rgba(246, 233, 224, 0.28);
	font-family: "P052", "Palatino Linotype", Palatino, serif;
	font-size: clamp(1.45rem, 2.4vw, 2.15rem);
	letter-spacing: -0.02em;
	line-height: 1.15;
	color: var(--blush);
}

.positions li::before {
	content: counter(card);
	color: var(--love-gold);
	font-variant-numeric: tabular-nums;
}

.journal {
	display: grid;
	grid-template-columns: minmax(16rem, 0.7fr) minmax(18rem, 1.3fr);
	gap: 2rem 4rem;
	align-items: start;
	padding: 5.5rem var(--gutter) 6rem;
}

.journal h2 {
	margin: 0 0 1rem;
	font-size: clamp(2.6rem, 5vw, 4.5rem);
	color: var(--ink);
}

.lines {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lines li {
	display: flex;
	align-items: baseline;
	gap: 1.25rem;
	padding: 1.5rem 0 0.2rem;
	font-family: "P052", "Palatino Linotype", Palatino, serif;
	font-style: italic;
	font-size: clamp(1.45rem, 2.4vw, 2rem);
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: var(--ink);
}

.lines li::after {
	content: "";
	flex: 1 0 4.5rem;
	border-bottom: 1px solid var(--ink-soft);
	transform: translateY(-0.28rem);
}

.colophon {
	padding: 2rem var(--gutter) 2.5rem;
	background: var(--ink);
	color: var(--paper);
}

.colophon p {
	margin: 0;
}

.colophon-name {
	font-family: "P052", "Palatino Linotype", Palatino, serif;
	font-weight: 700;
	font-size: 1.35rem;
	letter-spacing: -0.03em;
	margin-bottom: 0.35rem;
}

.reading {
	padding: 4.5rem var(--gutter) 6rem;
}

.reading article {
	max-width: 65ch;
}

.reading h1 {
	margin: 0 0 1.25rem;
	font-size: clamp(2.8rem, 6vw, 4.5rem);
	color: var(--ink);
}

.reading a {
	color: var(--gold-ink);
}

@media (prefers-reduced-motion: no-preference) {
	.mark-left {
		animation: fan-left 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
	}

	.mark-right {
		animation: fan-right 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
	}

	.mark-center {
		animation: fan-center 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
	}
}

@keyframes fan-left {
	from {
		transform: rotate(0deg) translateX(14px);
	}
	to {
		transform: rotate(-18deg);
	}
}

@keyframes fan-right {
	from {
		transform: rotate(0deg) translateX(-14px);
	}
	to {
		transform: rotate(18deg);
	}
}

@keyframes fan-center {
	from {
		transform: translateY(6px);
	}
	to {
		transform: translateY(-3px);
	}
}

@media (max-width: 800px) {
	.sheet,
	.love,
	.journal {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.sheet-intro {
		position: static;
	}

	.sheet h1,
	.love h2,
	.journal h2 {
		font-size: clamp(2.8rem, 14vw, 4rem);
	}

	.mast {
		align-items: flex-start;
		flex-direction: column;
		gap: 0.85rem;
	}

	.lines li {
		flex-direction: column;
		align-items: stretch;
		gap: 0.7rem;
	}

	.lines li::after {
		flex: none;
		width: 100%;
		transform: none;
	}
}

@media (max-width: 380px) {
	.answers td:first-child,
	.answers td:last-child {
		font-size: 1.15rem;
	}
}
