/*
Theme Name: Win Over Depression
Theme URI: https://winoverdepression.com/
Author: Win Over Depression
Description: Custom block theme for Win Over Depression. Calm, accessible, mobile-first. Crisis resources always visible. No ads, no page builder.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
Version: 0.1.0
License: GPL-2.0-or-later
Text Domain: win-over-depression
*/

/* Focus states: visible for keyboard users (WCAG 2.2 AA). */
:focus-visible {
	outline: 3px solid var(--wp--preset--color--primary);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Skip link: hidden until focused. */
.wod-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
}
.wod-skip-link:focus {
	left: 16px;
	top: 16px;
	z-index: 100;
	background: var(--wp--preset--color--surface);
	padding: 8px 12px;
	border-radius: 8px;
}

/* Respect reduced motion preference. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* Post content: readable measure. */
.wp-block-post-content > * {
	max-width: var(--wp--style--global--content-size);
}

/* ---------- Base type and rhythm ---------- */
body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
.wod-h2 {
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin-top: 0.25em;
}
.wod-eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	margin-bottom: 0.5rem;
}
.wod-small {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--text-muted);
}

/* ---------- Sticky glass header ---------- */
.wod-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(250, 251, 249, 0.88);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding-left: 24px !important;
	padding-right: 24px !important;
}

/* ---------- Hero ---------- */
.wod-hero {
	position: relative;
	overflow: hidden;
	border-radius: 24px;
	margin: 24px auto 0;
	max-width: 1140px;
	padding: clamp(40px, 7vw, 96px) clamp(24px, 5vw, 64px);
	background:
		radial-gradient(1200px 500px at 10% -10%, rgba(42, 157, 143, 0.35), transparent 60%),
		radial-gradient(900px 400px at 110% 110%, rgba(15, 94, 99, 0.45), transparent 60%),
		linear-gradient(135deg, #0F5E63 0%, #0B4A4E 100%);
	color: #FFFFFF;
	box-shadow: 0 30px 60px -30px rgba(11, 74, 78, 0.55);
}
.wod-hero .wod-eyebrow {
	color: #BFE9E3;
}
.wod-hero-title {
	font-size: clamp(2.25rem, 1.5rem + 2vw, 3rem);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: #FFFFFF;
	max-width: none;
	margin: 0 0 0.5em;
	text-wrap: balance;
}
.wod-hero-lede {
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
	line-height: 1.6;
	color: #E6F4F1;
	max-width: 56ch;
}
.wod-hero-actions {
	margin-top: 28px;
	gap: 12px;
}
.wod-trust {
	list-style: none;
	padding: 0;
	margin: 28px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	font-size: 0.9375rem;
	color: #D7EEEA;
}
.wod-trust li {
	padding-left: 22px;
	position: relative;
}
.wod-trust li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #7FD6C8;
}

/* ---------- Buttons ---------- */
.wod-btn .wp-block-button__link,
.wod-btn > a {
	border-radius: 999px !important;
	padding: 14px 26px !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
	display: inline-block;
}
.wod-btn-primary > a {
	background: #FFFFFF !important;
	color: #0F5E63 !important;
	box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45);
}
.wod-btn-ghost > a {
	background: transparent !important;
	color: #FFFFFF !important;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}
.wod-btn-crisis > a {
	background: #B42318 !important;
	color: #FFFFFF !important;
	box-shadow: 0 10px 24px -12px rgba(180, 35, 24, 0.6);
}
.wod-btn-crisis-outline > a {
	background: transparent !important;
	color: #B42318 !important;
	box-shadow: inset 0 0 0 2px #B42318;
}
.wod-btn > a:hover {
	transform: translateY(-1px);
}

/* ---------- Emergency band ---------- */
.wod-crisis-band {
	margin-top: 56px;
	max-width: 1140px;
	border-radius: 20px;
	padding: clamp(28px, 4vw, 44px);
	background: #FEF3F2;
	color: #7A271A;
	border: 1px solid #F6C9C2;
}
.wod-crisis-band .wod-h2 {
	color: #7A271A;
}
.wod-crisis-actions {
	gap: 12px;
	margin: 20px 0 12px;
}

/* ---------- Sections and grids ---------- */
.wod-section {
	max-width: 1140px;
	margin-top: 72px;
}
.wod-grid-3 {
	gap: 20px;
	margin-top: 28px;
}

/* ---------- Cards ---------- */
.wod-card {
	height: 100%;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	padding: 28px;
	box-shadow: 0 1px 2px rgba(15, 94, 99, 0.06), 0 12px 32px -20px rgba(15, 94, 99, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.wod-card:hover {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 2px 4px rgba(15, 94, 99, 0.08), 0 24px 40px -22px rgba(15, 94, 99, 0.35);
}
.wod-card h3 {
	font-size: 1.25rem;
	margin: 0.25em 0 0.5em;
}
.wod-card p {
	margin: 0 0 0.75em;
	color: var(--wp--preset--color--text-muted);
	font-size: 1rem;
}
.wod-card a {
	font-weight: 700;
	text-decoration: none;
}
.wod-card-index {
	font-size: 0.875rem;
	font-weight: 800;
	color: var(--wp--preset--color--accent);
	letter-spacing: 0.08em;
	margin: 0;
}
.wod-latest .wp-block-post-template {
	gap: 20px;
}
.wod-latest .wp-block-post-title {
	font-size: 1.25rem;
	margin: 0.25em 0 0.5em;
}

/* ---------- Principles ---------- */
.wod-pillar {
	height: 100%;
	padding: 8px 4px;
	border-left: 3px solid var(--wp--preset--color--accent);
	padding-left: 20px;
}
.wod-pillar h3 {
	font-size: 1.125rem;
	margin: 0 0 0.35em;
}
.wod-pillar p {
	margin: 0;
	color: var(--wp--preset--color--text-muted);
}

/* ---------- Final CTA ---------- */
.wod-cta {
	max-width: 1140px;
	margin: 80px auto 24px;
	border-radius: 24px;
	padding: clamp(32px, 5vw, 56px);
	text-align: center;
	background: var(--wp--preset--color--accent-soft);
	border: 1px solid #CFE7E2;
}
.wod-cta .wp-block-buttons {
	justify-content: center;
}
.wod-cta p {
	color: var(--wp--preset--color--text-muted);
	max-width: 52ch;
	margin: 0 auto 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.wod-hero {
		border-radius: 18px;
		margin-top: 12px;
	}
	.wod-hero-actions .wp-block-button,
	.wod-crisis-actions .wp-block-button {
		width: 100%;
	}
	.wod-hero-actions .wp-block-button__link,
	.wod-crisis-actions .wp-block-button__link {
		width: 100%;
		text-align: center;
	}
}

/* ---------- Wide homepage layout ----------
   Block theme "constrained" layout limits every child to 720px.
   Homepage sections use full wide width (1140px) and their children are not limited. */
/* Sections align to the header's left and right edge (24px gutter), not centered in a narrow column. */
.wod-hero,
.wod-section,
.wod-crisis-band,
.wod-cta {
	max-width: none !important;
	width: auto !important;
	margin-left: 24px !important;
	margin-right: 24px !important;
}
.wod-hero > *,
.wod-section > *,
.wod-crisis-band > *,
.wod-cta > * {
	max-width: none !important;
}
.wod-hero > .wod-hero-title {
	max-width: 18ch !important;
}
.wod-hero > .wod-hero-lede {
	max-width: 56ch !important;
}
.wod-crisis-band > p,
.wod-cta > p {
	max-width: 60ch !important;
}
.wod-section {
	margin-top: 96px;
}
.wod-section .wp-block-columns {
	max-width: none !important;
}
.wod-card {
	min-height: 100%;
}
.wod-h2 {
	font-size: clamp(2rem, 1.2rem + 2.4vw, 3rem);
	margin-bottom: 0.25em;
}
@media (max-width: 600px) {
	.wod-hero,
	.wod-section,
	.wod-crisis-band,
	.wod-cta {
		margin-left: 16px !important;
		margin-right: 16px !important;
	}
	.wod-section {
		margin-top: 64px;
	}
}

/* ---------- Hero: two columns, search, illustration ---------- */
.wod-hero {
	overflow: hidden;
	isolation: isolate;
}
.wod-hero::before {
	content: "";
	position: absolute;
	width: 420px;
	height: 420px;
	right: -120px;
	top: -140px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(127, 214, 200, 0.35), transparent 70%);
	z-index: -1;
}
.wod-hero-grid {
	gap: clamp(24px, 4vw, 56px);
	align-items: center;
}
.wod-hero-art img {
	border-radius: 20px;
	box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.45);
	max-width: 100%;
	height: auto;
}
.wod-ask-label {
	margin: 32px 0 10px !important;
	color: #FFFFFF;
	font-size: 1.0625rem;
}
.wod-light,
.wod-hero .wod-small {
	color: #D7EEEA !important;
}
.wod-hero .wod-small a {
	color: #FFFFFF;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.wod-search-hero .wp-block-search__inside-wrapper {
	background: #FFFFFF;
	border-radius: 999px;
	padding: 6px;
	border: none;
	box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.5);
}
.wod-search .wp-block-search__input {
	border: none;
	border-radius: 999px;
	padding: 14px 20px;
	font-size: 1rem;
	background: transparent;
	color: #1F2A2E;
	min-width: 0;
}
.wod-search .wp-block-search__button {
	border-radius: 999px;
	background: #0F5E63;
	color: #FFFFFF;
	font-weight: 700;
	padding: 14px 22px;
	border: none;
}
.wod-search .wp-block-search__button:hover {
	background: #0B4A4E;
}
.wod-search-hero .wp-block-search__input:focus-visible {
	outline: 3px solid #7FD6C8;
	outline-offset: 2px;
}

/* ---------- Bento grids ---------- */
.wod-bento {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin-top: 28px;
}
.wod-bento > .wod-card-feature {
	grid-column: span 2;
	background: linear-gradient(160deg, #FFFFFF 0%, #E6F4F1 100%);
}
.wod-bento-3 {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin-top: 28px;
}
.wod-crisis-note {
	margin-top: 20px !important;
	padding: 16px 20px;
	border-radius: 14px;
	background: #FEF3F2;
	color: #7A271A;
	border: 1px solid #F6C9C2;
}
.wod-crisis-note p {
	margin: 0;
}

@media (max-width: 782px) {
	.wod-bento,
	.wod-bento-3 {
		grid-template-columns: 1fr;
	}
	.wod-bento > .wod-card-feature {
		grid-column: span 1;
	}
}

/* ---------- Topic directory ---------- */
.wod-topic-grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
	margin-top: 28px;
}
.wod-topic {
	height: 100%;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	padding: 26px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 1px 2px rgba(15, 94, 99, 0.06);
}
.wod-topic:hover {
	transform: translateY(-3px);
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 24px 40px -22px rgba(15, 94, 99, 0.35);
}
.wod-topic h3 {
	font-size: 1.25rem;
	margin: 0.2em 0 0.4em;
}
.wod-topic h3 a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}
.wod-topic h3 a::after {
	content: " \2192";
	color: var(--wp--preset--color--accent);
}
.wod-topic h3 a:hover {
	color: var(--wp--preset--color--primary);
}
.wod-topic p {
	margin: 0;
	color: var(--wp--preset--color--text-muted);
}
.wod-topic-tag {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
	background: var(--wp--preset--color--accent-soft);
	padding: 4px 10px;
	border-radius: 999px;
	margin: 0;
}

/* ---------- Split text section (about depression) ---------- */
.wod-split {
	max-width: 820px !important;
}
.wod-split p {
	font-size: 1.125rem;
	color: var(--wp--preset--color--text-muted);
}

/* ---------- Resource link lists ---------- */
.wod-linklist {
	list-style: none;
	padding: 0;
	margin: 12px 0 0;
}
.wod-linklist li {
	padding: 8px 0;
	border-top: 1px solid var(--wp--preset--color--border);
}
.wod-linklist a {
	text-decoration: none;
	font-weight: 600;
}

@media (max-width: 782px) {
	.wod-topic-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Header ---------- */
.wod-header {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 14px !important;
	padding-bottom: 14px !important;
	padding-left: 24px !important;
	padding-right: 24px !important;
	min-height: 72px;
}
.wod-brand {
	display: flex !important;
	align-items: center;
	gap: 12px;
	margin: 0 !important;
}
.wod-logo-mark {
	margin: 0 !important;
	line-height: 0;
}
.wod-logo-mark img {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: block;
}
.wod-brand-name {
	margin: 0 !important;
	font-size: 1.0625rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	white-space: nowrap;
}
.wod-brand-name a {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}
.wod-header-right {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
}
.wod-nav .wp-block-navigation-item__content {
	padding: 8px 14px;
	border-radius: 999px;
	font-weight: 600;
	color: var(--wp--preset--color--text);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.wod-nav .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--accent-soft);
	color: var(--wp--preset--color--primary);
}
.wod-nav-cta-wrap {
	margin: 0 0 0 8px !important;
}
.wod-nav-cta .wp-block-button__link {
	padding: 10px 18px !important;
	font-size: 0.9375rem !important;
	white-space: nowrap;
	background: #0F5E63 !important;
	color: #FFFFFF !important;
	box-shadow: 0 8px 18px -10px rgba(15, 94, 99, 0.7);
}
.wod-nav-cta .wp-block-button__link:hover {
	background: #0B4A4E !important;
}
@media (max-width: 782px) {
	.wod-brand-name {
		display: none;
	}
	.wod-nav-cta .wp-block-button__link {
		padding: 9px 14px !important;
	}
}

/* Hover effects only where hover exists; respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.wod-card,
	.wod-btn > a {
		transition: none !important;
		transform: none !important;
	}
}

/* ---------- Engaging prompt block (homepage) ---------- */
.wod-prompt {
	text-align: left;
	padding: clamp(32px, 5vw, 56px);
	border-radius: 24px;
	background: linear-gradient(135deg, #E6F4F1 0%, #FFFFFF 100%);
	border: 1px solid #CFE7E2;
}
.wod-prompt-lede {
	font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
	color: var(--wp--preset--color--text-muted);
	max-width: 60ch;
	margin: 0 0 24px;
}
