/* =========================================================
   RESOURCES ("The WAH Toolbox!") and the panel notes page (/extra/)
   Sewn like the rest of the site: stitched cards, woven number labels like the map's tags,
   the WAH colours, and both light and dark mode.
   ========================================================= */

.wah-res {
	--res-ink: #13233a;
	--res-soft: #3d5068;
	--res-card: #ffffff;
	--res-tint: #f3f9fd;
	--res-line: rgba(23, 45, 74, 0.10);
	--res-teal: #17787e;
	--res-orange: #ad5300;
	--res-stitch: rgba(31, 143, 150, 0.45);
	--res-shadow: 0 14px 34px rgba(23, 45, 74, 0.10);
	width: min(100%, 1100px);
	margin: 0 auto;
	padding: 30px 0 70px;
	color: var(--res-ink);
	box-sizing: border-box;
}
html[data-theme="dark"] .wah-res {
	--res-ink: #e6f0fa;
	--res-soft: rgba(230, 240, 250, 0.8);
	--res-card: #142b44;
	--res-tint: #172f4b;
	--res-line: rgba(160, 205, 240, 0.16);
	--res-teal: #7de1d4;
	--res-orange: #f89d32;
	--res-stitch: rgba(255, 225, 106, 0.45);
	--res-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}
.wah-res *,
.wah-res *::before,
.wah-res *::after { box-sizing: border-box; }

/* These pages have their own big title, like the other pages: no extra page title above it. */
.page-id-resources .wp-block-post-title,
.page-id-extra .wp-block-post-title { display: none !important; }

.wah-res :is(h1, h2, h3, h4) { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.wah-res p,
.wah-res li { color: var(--res-soft); line-height: 1.75; }
.wah-res strong { color: var(--res-ink); }

/* Links in the text */
.wah-res-text a,
.wah-res-card p a,
.wah-res-quote cite a {
	color: var(--res-teal);
	font-style: normal;
	font-weight: 800;
	text-decoration: underline;
	text-decoration-color: #f89d32;
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
.wah-res-text a:hover,
.wah-res-card p a:hover,
.wah-res-quote cite a:hover { color: var(--res-orange); }

/* A stitched seam just inside a box, like the map's frame and the patches. */
.wah-res-sewn { position: relative; }
.wah-res-sewn::before {
	content: "";
	position: absolute;
	inset: 8px;
	border: 1.5px dashed var(--res-stitch);
	border-radius: inherit;
	pointer-events: none;
}

/* ---------- Hero ---------- */

.wah-res-hero {
	position: relative;
	overflow: hidden;
	padding: clamp(54px, 7vw, 80px) clamp(22px, 5vw, 60px);
	border-radius: 34px;
	text-align: center;
	color: #13233a;
	background:
		radial-gradient(700px 400px at 6% 0%, rgba(125, 225, 212, 0.6), transparent 68%),
		radial-gradient(640px 400px at 100% 100%, rgba(248, 157, 50, 0.32), transparent 68%),
		radial-gradient(420px 260px at 94% 4%, rgba(255, 225, 106, 0.45), transparent 70%),
		linear-gradient(150deg, #d4f3f1 0%, #e9f6ff 50%, #fff0dc 100%);
	border: 1px solid rgba(31, 143, 150, 0.22);
	box-shadow: 0 18px 44px rgba(31, 143, 150, 0.16);
}
html[data-theme="dark"] .wah-res-hero {
	color: #fff;
	background:
		radial-gradient(720px 420px at 8% 0%, rgba(125, 225, 212, 0.42), transparent 65%),
		radial-gradient(640px 420px at 100% 100%, rgba(248, 157, 50, 0.32), transparent 65%),
		radial-gradient(500px 300px at 92% 6%, rgba(255, 225, 106, 0.16), transparent 70%),
		linear-gradient(155deg, #2584b8 0%, #1d6597 45%, #1a4c7c 100%);
	border-color: rgba(255, 255, 255, 0.22);
	box-shadow: 0 18px 50px rgba(31, 111, 165, 0.35);
}
.wah-res-hero::after {
	content: "✦";
	position: absolute;
	top: 34px;
	left: 7%;
	font-size: 30px;
	color: #f89d32;
	opacity: 0.85;
	pointer-events: none;
}
.wah-res-hero > * { position: relative; z-index: 1; }

.wah-res-hero h1 {
	margin: 18px 0 16px;
	color: inherit !important;
	font-size: clamp(46px, 8vw, 92px);
	font-weight: 900;
	line-height: 0.98;
	letter-spacing: -0.03em;
}
.wah-res-hero h1 span { color: #17787e; }
html[data-theme="dark"] .wah-res-hero h1 span { color: #ffe16a; }
.wah-res-hero .wah-res-subtitle {
	margin: 0 auto;
	color: #ad5300 !important;
	font-size: clamp(17px, 2.4vw, 22px);
	font-weight: 800;
	line-height: 1.45;
}
html[data-theme="dark"] .wah-res-hero .wah-res-subtitle { color: #ffd59a !important; }

/* A short stitched seam with a needle, between the title and the welcome. */
.wah-res-seam {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin: 30px auto;
	color: #f89d32;
	font-size: 20px;
}
.wah-res-seam::before,
.wah-res-seam::after {
	content: "";
	width: min(120px, 25vw);
	border-top: 2.5px dashed currentColor;
	opacity: 0.8;
}

.wah-res-welcome { max-width: 720px; margin: 0 auto; }
.wah-res-welcome p {
	margin: 0 0 14px !important;
	color: #3d5068 !important;
	font-size: 17px;
	text-align: center;
}
html[data-theme="dark"] .wah-res-welcome p { color: rgba(255, 255, 255, 0.9) !important; }
.wah-res-welcome .wah-res-greeting {
	color: #17787e !important;
	font-size: 22px !important;
	font-weight: 900;
}
html[data-theme="dark"] .wah-res-welcome .wah-res-greeting { color: #ffe16a !important; }

/* ---------- Resource cards (01–04) ---------- */

.wah-res-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin: 44px 0 0;
}

.wah-res-card {
	--res-accent: #7de1d4;
	display: flex;
	flex-direction: column;
	padding: 34px 30px 30px;
	border-radius: 26px;
	background: var(--res-card);
	border: 1px solid var(--res-line);
	border-top: 6px solid var(--res-accent);
	box-shadow: var(--res-shadow);
	transition: transform 0.3s var(--wah-spring, ease), box-shadow 0.3s ease;
}
.wah-res-card:nth-child(4n + 2) { --res-accent: #79afd1; }
.wah-res-card:nth-child(4n + 3) { --res-accent: #ffe16a; }
.wah-res-card:nth-child(4n + 4) { --res-accent: #f89d32; }
.wah-res-card:hover { transform: translateY(-5px); }
.wah-res-card.wah-res-sewn::before { inset: 9px; border-radius: 19px; }

/* The woven number label, like a country tag on the map. */
.wah-res-num {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px !important;
	padding: 7px 12px !important;
	border-radius: 6px;
	background: #ffe16a;
	color: #13233a !important;
	font-size: 11px !important;
	font-weight: 900;
	letter-spacing: 2px;
	line-height: 1 !important;
	text-transform: uppercase;
	outline: 1.5px dashed rgba(19, 35, 58, 0.5);
	outline-offset: -4px;
	box-shadow: 0 2px 0 rgba(9, 25, 48, 0.18), 0 6px 12px rgba(9, 25, 48, 0.16);
}
.wah-res-card h2 {
	margin: 0 0 14px;
	color: var(--res-teal) !important;
	font-size: clamp(26px, 3.2vw, 34px);
	font-weight: 900;
	line-height: 1.15;
}
.wah-res-card p { margin: 0 0 14px !important; font-size: 16px; }
.wah-res-card p:last-child { margin-bottom: 0 !important; }

/* ---------- Ending, quote ---------- */

.wah-res-ending {
	max-width: 680px;
	margin: 64px auto 0;
	text-align: center;
}
.wah-res-ending p { margin: 0 0 12px !important; font-size: 17px; }
.wah-res-ending .wah-res-motto {
	margin-top: 22px !important;
	color: var(--res-orange) !important;
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 900;
	line-height: 1.3;
}
.wah-res-ending .wah-res-signature {
	color: var(--res-teal) !important;
	font-size: 15px;
	font-style: italic;
	font-weight: 700;
}

.wah-res-quote {
	max-width: 820px;
	margin: 48px auto 0 !important;
	padding: 46px clamp(22px, 5vw, 52px) 40px !important;
	border-radius: 30px;
	background: var(--res-tint);
	border: 1px solid var(--res-line) !important;
	box-shadow: var(--res-shadow);
	text-align: center;
	font-style: normal !important;
}
.wah-res-quote.wah-res-sewn::before { border-radius: 22px; }
.wah-res-quote-mark {
	display: block;
	height: 50px;
	color: #f89d32;
	font-family: Georgia, serif;
	font-size: 88px;
	line-height: 1;
}
.wah-res-quote p {
	margin: 12px auto 22px !important;
	color: var(--res-ink) !important;
	font-family: Georgia, serif;
	font-size: clamp(18px, 2.4vw, 23px);
	font-style: italic;
	line-height: 1.7;
}
.wah-res-quote cite {
	display: block;
	color: var(--res-teal);
	font-size: 14px;
	font-style: normal;
	font-weight: 800;
}

/* ---------- Bonus: merch production ---------- */

.wah-res-merch {
	margin-top: 90px;
	padding-top: 70px;
	border-top: 2.5px dashed rgba(248, 157, 50, 0.45);
}
.wah-res-merch-head {
	max-width: 760px;
	margin: 0 auto 44px;
	text-align: center;
}
.wah-res-merch-head h2 {
	margin: 18px 0 22px;
	color: var(--res-ink) !important;
	font-size: clamp(44px, 7vw, 76px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.03em;
}
.wah-res-merch-head h2 span { color: var(--res-orange); }
.wah-res-merch-head p { margin: 0 auto 14px !important; font-size: 16px; }
.wah-res-merch-head .wah-res-lead {
	color: var(--res-teal) !important;
	font-size: 21px !important;
	font-weight: 800;
	line-height: 1.5;
}
.wah-res-note {
	position: relative;
	margin: 24px auto 0 !important;
	padding: 18px 22px 18px 54px !important;
	border-radius: 16px;
	border: 1.5px dashed rgba(248, 157, 50, 0.6);
	background: rgba(248, 157, 50, 0.08);
	color: var(--res-ink) !important;
	font-size: 14.5px !important;
	text-align: left;
}
.wah-res-note::before {
	content: "!";
	position: absolute;
	left: 18px;
	top: 18px;
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #f89d32;
	color: #13233a;
	font-weight: 900;
	line-height: 1;
}

/* Product cards: as many per row as fit, the last row centred. */
.wah-res-shops {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 24px;
}
.wah-res-shop {
	display: flex;
	flex-direction: column;
	flex: 1 1 300px;
	max-width: 350px;
	overflow: hidden;
	border-radius: 26px;
	background: var(--res-card);
	border: 1px solid var(--res-line);
	box-shadow: var(--res-shadow);
	transition: transform 0.3s var(--wah-spring, ease), box-shadow 0.3s ease;
}
.wah-res-shop:hover { transform: translateY(-5px) rotate(-0.4deg); }
.wah-res-shop-pic {
	padding: 12px 12px 0;
}
.wah-res-shop-pic img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 18px;
	background: var(--res-tint);
}
.wah-res-shop-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	align-items: flex-start;
	padding: 20px 24px 26px;
}
.wah-res-shop-body .wah-res-num { margin-bottom: 14px !important; }
.wah-res-shop h3 {
	margin: 0 0 10px;
	color: var(--res-ink) !important;
	font-size: 24px;
	font-weight: 900;
	line-height: 1.2;
}
.wah-res-shop p { margin: 0 0 14px !important; font-size: 15px; line-height: 1.65; }
.wah-res-shop .wah-res-tip {
	padding: 12px 14px !important;
	border-radius: 12px;
	background: var(--res-tint);
	border: 1px dashed var(--res-stitch);
	color: var(--res-ink) !important;
	font-size: 13.5px;
	font-style: italic;
}

/* The shop button: the site's gradient button, a little smaller. */
.wah-res-go {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding: 12px 20px;
	border-radius: 999px;
	background: linear-gradient(90deg, #7de1d4, #ffe16a 55%, #f89d32);
	background-size: 200% 100%;
	color: #13233a !important;
	font-size: 14px;
	font-style: normal;
	font-weight: 900;
	line-height: 1.3;
	text-decoration: none !important;
	box-shadow: 0 8px 20px rgba(248, 157, 50, 0.22);
	transition: transform 0.25s var(--wah-spring, ease), background-position 0.5s ease;
}
.wah-res-go::after { content: "↗"; }
.wah-res-go:hover { transform: translateY(-2px); background-position: 100% 50%; }
.wah-res-go:focus-visible,
.wah-res a:focus-visible { outline: 2px solid #f89d32; outline-offset: 3px; }
.wah-res-card .wah-res-go { margin-top: 6px; }

.wah-res-outro {
	max-width: 700px;
	margin: 54px auto 0;
	padding: 34px 28px;
	border-radius: 26px;
	background: var(--res-tint);
	border: 1px solid var(--res-line);
	text-align: center;
}
.wah-res-outro.wah-res-sewn::before { border-radius: 19px; }
.wah-res-outro p { margin: 0 0 12px !important; font-size: 16px; }
.wah-res-outro .wah-res-motto {
	margin: 0 !important;
	color: var(--res-orange) !important;
	font-size: 20px;
	font-weight: 900;
	line-height: 1.45;
}

/* ---------- Panel notes page (/extra/) ---------- */

.wah-res-section { margin-top: 60px; }
.wah-res-section > h2 {
	margin: 0 0 10px;
	color: var(--res-teal) !important;
	font-size: clamp(30px, 4.4vw, 46px);
	font-weight: 900;
	line-height: 1.1;
	text-align: center;
}
.wah-res-section > .wah-res-intro {
	max-width: 680px;
	margin: 0 auto 10px !important;
	font-size: 17px;
	text-align: center;
}
.wah-res-section > h3 {
	margin: 26px 0 0;
	color: var(--res-orange) !important;
	font-size: 14px;
	font-weight: 900;
	letter-spacing: 2px;
	text-align: center;
	text-transform: uppercase;
}
/* Three to a row on a computer, the last row centred. */
.wah-res-mats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 18px;
	margin-top: 22px;
}
.wah-res-mat {
	flex: 1 1 290px;
	max-width: 360px;
	padding: 26px 24px 22px;
	border-radius: 22px;
	background: var(--res-card);
	border: 1px solid var(--res-line);
	border-top: 5px solid #7de1d4;
	box-shadow: var(--res-shadow);
}
.wah-res-mat:nth-child(4n + 2) { border-top-color: #79afd1; }
.wah-res-mat:nth-child(4n + 3) { border-top-color: #ffe16a; }
.wah-res-mat:nth-child(4n + 4) { border-top-color: #f89d32; }
.wah-res-mat.wah-res-sewn::before { inset: 7px; border-radius: 16px; }
.wah-res-mat h4 {
	margin: 0 0 10px;
	color: var(--res-ink) !important;
	font-size: 20px;
	font-weight: 900;
	line-height: 1.25;
}
.wah-res-mat p { margin: 0 0 8px !important; font-size: 15px; }
.wah-res-mat .wah-res-size {
	display: inline-block;
	margin-bottom: 10px !important;
	padding: 4px 10px;
	border-radius: 6px;
	background: #ffe16a;
	color: #13233a !important;
	font-size: 13px;
	font-weight: 900;
}
.wah-res-mat ul,
.wah-res-tips ul { margin: 0; padding: 0; list-style: none; }
.wah-res-mat li,
.wah-res-tips li {
	position: relative;
	margin: 0 0 6px;
	padding-left: 20px;
	font-size: 15px;
	line-height: 1.55;
}
.wah-res-mat li::before,
.wah-res-tips li::before {
	content: "★";
	position: absolute;
	left: 0;
	top: 1px;
	color: #f89d32;
	font-size: 12px;
}
.wah-res-tips {
	margin: 24px 0 0;
	padding: 28px 30px;
	border-radius: 22px;
	background: var(--res-tint);
	border: 1.5px dashed rgba(248, 157, 50, 0.6);
}
.wah-res-tips h3 {
	margin: 0 0 14px;
	color: var(--res-orange) !important;
	font-size: 22px;
	font-weight: 900;
}
.wah-res-back { margin: 60px 0 0; text-align: center; }
.wah-res-back .wah-res-go::after { content: none; }

/* ---------- Phones ---------- */

@media (max-width: 760px) {
	.wah-res-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.wah-res { padding-top: 16px; }
	.wah-res-hero { border-radius: 26px; }
	.wah-res-hero::after { top: 18px; font-size: 22px; }
	.wah-res-welcome p { font-size: 15.5px; }
	.wah-res-grid { grid-template-columns: 1fr; gap: 18px; margin-top: 32px; }
	.wah-res-card { padding: 30px 22px 24px; }
	.wah-res-shop { max-width: none; }
	.wah-res-merch { margin-top: 64px; padding-top: 50px; }
	.wah-res-tips { padding: 24px 20px; }
	.wah-res-mat { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
	.wah-res-card,
	.wah-res-shop,
	.wah-res-go { transition: none; }
}
