/* rowfi.app (ADR-028 §3): the menu's look (ADR-021) on the web. */

@font-face {
	font-family: "Fraunces";
	src: url("fonts/Fraunces.ttf") format("truetype");
	font-weight: 100 900;
	font-display: swap;
}
@font-face {
	font-family: "Nunito";
	src: url("fonts/Nunito.ttf") format("truetype");
	font-weight: 200 1000;
	font-display: swap;
}

:root {
	--cream: #FFF5E6;
	--ink: #3B2A3F;
	--dusk: #33203D;
	--apricot: #F6B26B;

	--page: var(--cream);
	--text: var(--ink);
	--text-soft: rgb(59 42 63 / 0.72);
	--card: #FFFBF4;
	--card-edge: rgb(59 42 63 / 0.08);
	--link: #9A4F1C;
	--shadow: 0 6px 22px rgb(51 32 61 / 0.12), 0 1px 3px rgb(51 32 61 / 0.10);
	--rule: rgb(59 42 63 / 0.14);

	--title: "Fraunces", Georgia, serif;
	--body: "Nunito", system-ui, sans-serif;
	--wrap: 46rem;
	--wide: 68rem;
	--gutter: clamp(16px, 4vw, 32px);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--page: #241829;
		--text: var(--cream);
		--text-soft: rgb(255 245 230 / 0.72);
		--card: #33233A;
		--card-edge: rgb(255 245 230 / 0.08);
		--link: var(--apricot);
		--shadow: 0 6px 22px rgb(0 0 0 / 0.28);
		--rule: rgb(255 245 230 / 0.14);
	}
}
:root[data-theme="dark"] {
	--page: #241829;
	--text: var(--cream);
	--text-soft: rgb(255 245 230 / 0.72);
	--card: #33233A;
	--card-edge: rgb(255 245 230 / 0.08);
	--link: var(--apricot);
	--shadow: 0 6px 22px rgb(0 0 0 / 0.28);
	--rule: rgb(255 245 230 / 0.14);
}

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

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

body {
	margin: 0;
	background: var(--page);
	color: var(--text);
	font-family: var(--body);
	font-weight: 500;
	font-size: 1.0625rem;
	line-height: 1.6;
	overflow-x: hidden;
}

h1, h2, h3 {
	font-family: var(--title);
	font-variation-settings: "SOFT" 100, "WONK" 0;
	font-weight: 620;
	line-height: 1.15;
	margin: 0 0 0.5em;
	text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--apricot); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding-top: 2.5rem; padding-bottom: 1rem; }
.section > h2:first-child { margin-top: 0; }
.lede { font-size: 1.2rem; color: var(--text-soft); }

.visually-hidden, .skip:not(:focus) {
	position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip:focus { position: absolute; top: 8px; left: 8px; z-index: 10; background: var(--cream); color: var(--ink); padding: 8px 14px; border-radius: 999px; }

/* The header: a quiet line of cream text over the painting on the home page, ink on the rest. */

.site-header { position: relative; z-index: 2; }
.nav {
	max-width: var(--wide);
	margin: 0 auto;
	padding: 18px var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(14px, 4vw, 28px); }
.nav a { color: var(--text); text-decoration: none; font-weight: 750; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--apricot); text-decoration-thickness: 2px; }
.wordmark {
	font-family: var(--title);
	font-variation-settings: "SOFT" 100, "WONK" 0;
	font-weight: 620;
	font-size: 1.5rem;
}

.home .site-header { position: absolute; inset: 0 0 auto; }
.home .nav a { color: var(--cream); text-shadow: 0 2px 3px rgb(51 32 61 / 0.55), 0 0 18px rgb(51 32 61 / 0.35); }

/* The hero: the painted course, the title in its sky, the words on the dusk veil at its foot. */

.hero {
	position: relative;
	min-height: min(92svh, 860px);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	color: var(--cream);
	background:
		linear-gradient(to bottom, rgb(51 32 61 / 0) 20%, rgb(51 32 61 / 0.36) 60%, rgb(51 32 61 / 0.78) 100%),
		url("images/course.jpg") center 30% / cover no-repeat,
		var(--dusk);
	text-shadow: 0 2px 3px rgb(51 32 61 / 0.55), 0 0 22px rgb(51 32 61 / 0.30);
}
.hero-sky { padding: clamp(84px, 14vh, 140px) var(--gutter) 0; text-align: center; }
.hero-title { font-size: clamp(3.6rem, 13vw, 6.5rem); margin: 0; letter-spacing: -0.01em; }
.hero-line { font-size: clamp(1.15rem, 3.4vw, 1.5rem); font-weight: 650; margin: 0.4em auto 0; max-width: 28ch; }
.hero-ground {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 2rem var(--gutter) clamp(32px, 7vh, 64px);
	font-size: clamp(1.05rem, 2.6vw, 1.25rem);
	font-weight: 600;
	text-align: center;
}
.hero-quiet { color: var(--apricot); font-weight: 750; margin: 0; }

/* The video: its picture with a play button, YouTube's player once pressed. */

.video { margin: 0; }
.video-play, .video iframe {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: var(--shadow);
	background: var(--dusk);
}
.video-play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease-out; }
.video-play:hover img { transform: scale(1.02); }
.play {
	position: absolute;
	inset: 50% auto auto 50%;
	width: 78px;
	height: 78px;
	translate: -50% -50%;
	border-radius: 50%;
	background: rgb(255 245 230 / 0.9);
	box-shadow: 0 6px 24px rgb(51 32 61 / 0.4);
	transition: background 0.2s;
}
.play::after {
	content: "";
	position: absolute;
	inset: 50% auto auto 54%;
	translate: -50% -50%;
	border-style: solid;
	border-width: 14px 0 14px 23px;
	border-color: transparent transparent transparent var(--ink);
}
.video-play:hover .play { background: var(--apricot); }
.video figcaption { font-size: 0.9rem; color: var(--text-soft); margin-top: 0.7rem; text-align: center; }

/* Cards: cream, rounded, floating on a soft dusk shadow. */

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
	gap: 16px;
}
.card {
	background: var(--card);
	border: 1px solid var(--card-edge);
	border-radius: 22px;
	padding: 1.3rem 1.4rem 0.4rem;
	box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.4em; }
.card p { font-size: 1rem; color: var(--text-soft); }

.status { padding-bottom: 2rem; }

.button {
	display: inline-block;
	background: var(--apricot);
	color: var(--ink);
	font-weight: 800;
	text-decoration: none;
	padding: 0.75em 1.5em;
	border-radius: 999px;
	box-shadow: var(--shadow);
}
.button:hover { background: #F9C385; }

/* The blog. */

.post-list { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 12px; }
.post-item a {
	display: grid;
	gap: 2px;
	padding: 1rem 1.3rem;
	background: var(--card);
	border: 1px solid var(--card-edge);
	border-radius: 18px;
	box-shadow: var(--shadow);
	text-decoration: none;
	color: var(--text);
}
.post-item a:hover { border-color: var(--apricot); }
.post-date { font-size: 0.85rem; font-weight: 750; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.06em; }
.post-title { font-family: var(--title); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 620; font-size: 1.3rem; }
.post-desc { color: var(--text-soft); }

.prose { padding-top: 2.5rem; padding-bottom: 2rem; }
.prose img { border-radius: 16px; margin: 1.5rem 0; box-shadow: var(--shadow); }
.prose blockquote { margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1.2rem; border-left: 4px solid var(--apricot); color: var(--text-soft); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose code { font-size: 0.92em; background: var(--card); border: 1px solid var(--card-edge); padding: 0.05em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
.kicker { font-size: 0.85rem; font-weight: 750; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-soft); }
.kicker a { color: inherit; }
.post-foot { margin-top: 2.5rem; }
.draft-note { background: var(--apricot); color: var(--ink); padding: 0.5rem 1rem; border-radius: 12px; font-weight: 700; }

/* Contribute: one card per gift. */

.donations {
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 1rem;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
	gap: 14px;
}
.donation {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	height: 100%;
	padding: 1.2rem 0.9rem 1.1rem;
	background: var(--card);
	border: 1px solid var(--card-edge);
	border-radius: 22px;
	box-shadow: var(--shadow);
	color: var(--text);
	text-align: center;
	text-decoration: none;
	transition: transform 0.15s ease-out, border-color 0.15s;
}
a.donation:hover { transform: translateY(-2px); border-color: var(--apricot); }
.donation.is-soon { opacity: 0.55; }
.donation-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 0.4rem; }
.donation-amount { font-family: var(--title); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 620; font-size: 1.6rem; line-height: 1.1; }
.donation-name { font-weight: 800; }
.donation-note { font-size: 0.88rem; line-height: 1.4; color: var(--text-soft); }

/* Any amount: the whole row, the icon beside the words. */
.donation-free { grid-column: 1 / -1; }
.donation-free .donation { flex-direction: row; justify-content: center; gap: 16px; text-align: left; }
.donation-free .donation-icon { margin: 0; }
.donation-free .donation-words { display: flex; flex-direction: column; }
.soon { color: var(--text-soft); font-style: italic; }

.lost { text-align: center; padding-top: 5rem; padding-bottom: 5rem; }

/* The footer: the credits, small. */

.site-footer {
	margin-top: 3rem;
	padding: 2rem 0 2.5rem;
	border-top: 1px solid var(--rule);
	font-size: 0.88rem;
	color: var(--text-soft);
}
.site-footer a { color: inherit; }
.footer-links { font-weight: 750; }
.credits { font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}
