/*
Theme Name: StressDecks
Theme URI: https://stressdecks.com
Author: StrongerKinder.com
Author URI: https://strongerkinder.com
Description: Brochure site theme for StressDecks. Card styles are shared with the tool itself.
Version: 1.2.1
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: stressdecks

Fonts bundled in assets/fonts: Fraunces and Atkinson Hyperlegible, both SIL Open Font License 1.1.
*/

@font-face {
	font-family: "Fraunces";
	src: url("assets/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Atkinson Hyperlegible";
	src: url("assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Atkinson Hyperlegible";
	src: url("assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

:root {
	--sd-green: #256B43;
	--sd-orange: #FF4D00;
	--sd-blush: #FFC4B8;
	--sd-mint: #5EEA9A;
	--sd-ink: #222222;
	--sd-ground: #F2F2F2;
	--sd-white: #FFFFFF;
	--sd-display: "Fraunces", Georgia, serif;
	--sd-body: "Atkinson Hyperlegible", Verdana, sans-serif;
	--sd-stroke: 1.5px solid var(--sd-ink);
	--sd-shadow: 0 3px 8px rgba(34, 34, 34, 0.28);
}

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

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

body {
	margin: 0;
	background: var(--sd-ground);
	color: var(--sd-ink);
	font-family: var(--sd-body);
	font-size: 18px;
	line-height: 1.5;
}

h1, h2, h3 {
	margin: 0;
	font-family: var(--sd-display);
	font-weight: 600;
	line-height: 1.04;
	letter-spacing: -0.015em;
	text-wrap: balance;
}
h1 { font-size: clamp(3rem, 9vw, 7.75rem); line-height: 0.98; letter-spacing: -0.02em; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: 2.25rem; }
p { margin: 0; }

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed;
	left: 16px;
	top: 16px;
	z-index: 10;
	width: auto;
	height: auto;
	clip: auto;
	padding: 12px 18px;
	background: var(--sd-white);
	border: var(--sd-stroke);
	border-radius: 999px;
}

.wrap { max-width: 1248px; margin: 0 auto; padding: 0 24px; }

/* Buttons: mint or black, always with a stroke */
.btn {
	display: inline-flex;
	align-items: center;
	min-height: 56px;
	padding: 0 30px;
	border: var(--sd-stroke);
	border-radius: 999px;
	background: var(--sd-mint);
	color: var(--sd-ink);
	font-size: 19px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { background: var(--sd-white); color: var(--sd-ink); transform: translateY(-2px); }
.btn--black { background: var(--sd-ink); color: var(--sd-white); }
.btn--white { background: var(--sd-white); }
.btn--white:hover { background: var(--sd-mint); }
.btn--small { min-height: 44px; padding: 0 20px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

/* Header */
.site-header .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 32px;
	padding-top: 20px;
	padding-bottom: 20px;
}
.brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	font-family: var(--sd-display);
	font-weight: 600;
	font-size: 30px;
	line-height: 1;
	text-decoration: none;
}
.brand svg { display: block; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; }
.site-nav a:not(.btn) {
	display: flex;
	align-items: center;
	min-height: 44px;
	font-size: 17px;
	text-decoration: none;
}
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* Cards: copy only, no outer stroke, small drop shadow */
.card {
	position: relative;
	flex: none;
	width: 250px;
	height: 350px;
	padding: 12px;
	border-radius: 14px;
	box-shadow: var(--sd-shadow);
}
.card--stressor { background: var(--sd-green); color: var(--sd-white); }
.card--strategy { background: var(--sd-orange); color: var(--sd-ink); }
.card--setting { background: var(--sd-blush); color: var(--sd-ink); }
.card__inner {
	display: flex;
	flex-direction: column;
	gap: 14px;
	height: 100%;
	padding: 18px 16px;
	border: 1.5px solid currentColor;
	border-radius: 8px;
}
.card__type { font-size: 12px; line-height: 1.2; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.card__title { font-family: var(--sd-display); font-weight: 600; font-size: 27px; line-height: 1.12; }
.card__text { flex-grow: 1; font-size: 15px; line-height: 1.4; }
.card__foot { padding-top: 10px; border-top: 1.5px solid currentColor; font-size: 12px; line-height: 1.3; }

/* The label on a stressor card: white with 0 until it has a strategy */
.ribbon {
	position: absolute;
	top: 0;
	right: 12px;
	width: 22px;
	height: 32px;
	padding-top: 5px;
	background: var(--sd-white);
	color: var(--sd-ink);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 81%, 0 100%);
	font-family: var(--sd-display);
	font-weight: 600;
	font-size: 13px;
	line-height: 1;
	text-align: center;
}
.ribbon--on { background: var(--sd-orange); }
.ribbon--lg { right: 24px; width: 36px; height: 52px; padding-top: 9px; font-size: 20px; }
.ribbon.is-pop { animation: sd-drop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3); }
@keyframes sd-drop { from { transform: translateY(-100%); } to { transform: none; } }

/* A matched pair: the strategy sits on top, lower down */
.pair { position: relative; flex: none; width: 250px; height: 496px; }
.pair .card--strategy { position: absolute; left: 0; top: 146px; }

/* Small cards for overview grids: colour, title and label only */
.mini-card {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 5 / 7;
	margin: 0;
	padding: 7px;
	overflow: hidden;
	border: 0;
	border-radius: 9px;
	box-shadow: 0 2px 6px rgba(34, 34, 34, 0.28);
	background: var(--sd-green);
	color: var(--sd-white);
	font: inherit;
	text-align: left;
	container-type: inline-size;
}
button.mini-card { cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
button.mini-card:hover { transform: translateY(-4px); box-shadow: 0 8px 14px rgba(34, 34, 34, 0.28); }
button.mini-card:focus-visible { outline-color: var(--sd-ink); }
.mini-card__title {
	display: block;
	height: 100%;
	padding: 36px 10px 10px;
	border: 1px solid currentColor;
	border-radius: 5px;
	font-family: var(--sd-display);
	font-weight: 600;
	font-size: 14px;
	font-size: clamp(11px, 12.5cqi, 19px);
	line-height: 1.15;
}
.mini-card--sm { width: 84px; flex: none; padding: 5px; border-radius: 6px; }
.mini-card--sm .mini-card__title { padding: 26px 6px 6px; border-radius: 3px; }
.mini-card--sm .ribbon { right: 8px; width: 16px; height: 23px; padding-top: 3px; font-size: 10px; }

/* A small card that flips from its stressor to its strategy */
.flip {
	display: block;
	width: 100%;
	aspect-ratio: 5 / 7;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
	perspective: 900px;
	transition: transform 0.15s ease;
}
.flip:hover { transform: translateY(-4px); }
.flip:focus-visible { outline-color: var(--sd-ink); }
.flip__inner {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: transform 0.55s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.flip.is-flipped .flip__inner { transform: rotateY(180deg); }
.flip__face {
	position: absolute;
	inset: 0;
	width: auto;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.flip__face--back { transform: rotateY(180deg); }
.mini-card--strategy { background: var(--sd-orange); color: var(--sd-ink); }
.mini-card--strategy .mini-card__title { padding-top: 12px; }

/* Home: hero */
.hero { padding: 40px 0 0; }
.hero__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 28px 56px;
	margin-top: 40px;
}
.lead { flex: 1 1 420px; max-width: 580px; font-size: 24px; line-height: 1.4; }

.wall-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 32px;
	margin-top: 72px;
	padding-top: 20px;
	border-top: var(--sd-stroke);
}
.wall-head__hint { font-weight: 700; }
.meter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.meter__text { font-family: var(--sd-display); font-weight: 600; font-size: 24px; line-height: 1.1; }
.meter__bar { width: 200px; height: 16px; border: var(--sd-stroke); border-radius: 999px; background: var(--sd-white); overflow: hidden; }
.meter__fill { display: block; width: 0; height: 100%; background: var(--sd-mint); transition: width 0.35s ease; }

.wall {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 16px;
	max-width: 1720px;
	margin: 0 auto;
	padding: 28px 24px 96px;
	list-style: none;
}

/* Home: the small stuff */
.small-stuff { padding: 112px 0; background: var(--sd-green); color: var(--sd-white); }
.small-stuff__big {
	margin-top: 28px;
	font-family: var(--sd-display);
	font-weight: 600;
	font-size: clamp(2.5rem, 7vw, 6.25rem);
	line-height: 1;
	letter-spacing: -0.02em;
}
.small-stuff__big span { display: block; }
.small-stuff__row { display: flex; flex-wrap: wrap; gap: 20px 64px; margin-top: 56px; font-size: 24px; line-height: 1.4; }
.small-stuff__row p { flex: 1 1 340px; max-width: 520px; }

/* Home: how it works */
.section { padding: 112px 0; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 56px 0 48px; }
.step { display: flex; flex-direction: column; gap: 12px; }
.step__tray {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	height: 260px;
	margin-bottom: 16px;
	border-radius: 14px;
	background: var(--sd-white);
}
.step__tray .is-aside { opacity: 0.4; transform: translate(6px, 22px) rotate(9deg); }
.step__pair { width: 105px; height: 208px; }
.step__pair .pair { transform: scale(0.42); transform-origin: top left; }
.tally { width: 68%; display: flex; flex-direction: column; gap: 14px; }
.tally__text { font-family: var(--sd-display); font-weight: 600; font-size: 34px; line-height: 1.05; }
.tally .meter__bar { width: 100%; }
.more { font-size: 19px; font-weight: 700; text-underline-offset: 5px; }

/* Home: all three kinds of card together */
.trio { background: var(--sd-white); }
.trio .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 56px 88px; }
.trio__cards { display: flex; align-items: flex-end; gap: 32px; }
.trio__text { flex: 0 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.trio__text p { font-size: 22px; line-height: 1.45; }

/* Home: straight with you */
.honest { background: var(--sd-blush); }
.honest .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px 80px; align-items: end; }
.honest h2 { margin-top: 24px; font-size: clamp(2.3rem, 5.4vw, 4.75rem); }
.honest__text { display: flex; flex-direction: column; gap: 16px; font-size: 20px; }
.honest__text a { font-weight: 700; text-underline-offset: 5px; }

/* Closing band, on every page but Privacy */
.closer { padding: 128px 0; background: var(--sd-ink); color: var(--sd-white); text-align: center; }
.closer .wrap { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.closer h2 { font-size: clamp(2.8rem, 9vw, 7.75rem); line-height: 0.98; letter-spacing: -0.02em; }

/* Inner pages */
.page-head { padding: 72px 0 96px; background: var(--sd-ink); color: var(--sd-white); }
.page-head--about { background: var(--sd-green); }
.page-head--further-reading { background: var(--sd-orange); color: var(--sd-ink); }
.page-head--privacy { background: var(--sd-blush); color: var(--sd-ink); }
.page-head--how-it-works { padding-bottom: 300px; }
.page-head__strap { margin-top: 24px; font-size: 26px; line-height: 1.3; }

.page-body { padding: 8px 0 112px; background: var(--sd-white); }

.card-row {
	display: flex;
	gap: 32px;
	margin: -228px -24px 0;
	padding: 12px 24px 32px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
}
.card-row > * { scroll-snap-align: center; }
.card-row > :first-child { margin-left: auto; }
.card-row > :last-child { margin-right: auto; }

.page-lead {
	max-width: 22em;
	padding: 64px 0 56px;
	font-family: var(--sd-display);
	font-weight: 500;
	font-size: clamp(1.7rem, 3.4vw, 2.75rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
}
.page-lead > * + * { margin-top: 0.5em; }

.chunks { counter-reset: chunk; }
.chunk {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
	gap: 16px 72px;
	padding: 36px 0 56px;
	border-top: var(--sd-stroke);
	counter-increment: chunk;
}
.chunk__head::before {
	content: counter(chunk);
	display: block;
	width: 36px;
	height: 52px;
	margin: -36px 0 20px;
	padding-top: 9px;
	background: var(--sd-orange);
	color: var(--sd-ink);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 81%, 0 100%);
	font-family: var(--sd-display);
	font-weight: 600;
	font-size: 20px;
	line-height: 1;
	text-align: center;
}
.chunk h2 { font-size: clamp(1.8rem, 3.2vw, 2.75rem); line-height: 1.06; }
.chunk__body { max-width: 36em; font-size: 20px; }
.chunk__body > * { margin: 0 0 18px; }
.chunk__body > :last-child { margin-bottom: 0; }
.chunk__body a { font-weight: 700; text-underline-offset: 5px; }
.chunk__body ul { padding: 0; list-style: none; }
.chunk__body li { padding: 18px 0; border-top: 1px solid rgba(34, 34, 34, 0.2); }
.chunk__body li:first-child { padding-top: 0; border-top: 0; }
.chunk__body p > strong:first-child { margin-right: 2px; }
.chunk__body li > strong:first-child { display: block; margin-bottom: 4px; }
.chunk__body li > strong:first-child,
.chunk__body p > strong:first-child {
	font-family: var(--sd-display);
	font-weight: 600;
	font-size: 26px;
	line-height: 1.15;
}
/* Further reading: each book is a tile */
.chunk__body p:has(> strong:first-child) { padding: 24px 28px; border-radius: 14px; background: var(--sd-ground); }
.chunk__body p:has(> strong:first-child) br { display: block; content: ""; margin-top: 8px; }

/* Footer */
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 32px;
	padding-top: 28px;
	padding-bottom: 28px;
	font-size: 16px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.site-footer nav a { display: flex; align-items: center; min-height: 44px; }

@media (max-width: 1099px) {
	.wall { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.wall li:nth-child(n+13) { display: none; }
}

@media (max-width: 899px) {
	.steps { grid-template-columns: minmax(0, 1fr); gap: 48px; }
	.honest .wrap, .chunk { grid-template-columns: minmax(0, 1fr); }
	.trio__cards .card--setting { display: none; }
}

@media (max-width: 699px) {
	.wall { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 64px; }
	.wall li:nth-child(n+10) { display: none; }
	.wall-head { margin-top: 48px; }
	.section, .small-stuff { padding: 72px 0; }
	.closer { padding: 88px 0; }
	.hero { padding-top: 16px; }
	.lead, .small-stuff__row, .trio__text p { font-size: 20px; }
	.brand { font-size: 26px; }
	.site-nav { gap: 4px 20px; }
	.page-head { padding: 40px 0 64px; }
	.page-head--how-it-works { padding-bottom: 280px; }
	.page-lead { padding: 40px 0; }
	.chunk { padding: 28px 0 40px; }
	.chunk__head::before { margin-top: -28px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
