/*
Theme Name: Edward Savio
Theme URI: https://edwardsavio.com
Author: Edward Savio
Description: A clean, lightweight block theme for edwardsavio.com. Everything is editable in Appearance › Editor — no page builder needed.
Version: 1.3.12
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edward-savio
*/

/* ---------- Basics ---------- */
body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a:hover { color: #08505b; }

/* ---------- Header ---------- */
.es-header {
	background: #0f1115;
	border-bottom: 1px solid #262a33;
	padding-top: 18px;
	padding-bottom: 18px;
}
.es-header .wp-block-site-title { margin: 0; }
.es-header .wp-block-site-title a {
	color: #f4f2ee;
	text-decoration: none;
	font-weight: 800;
	font-size: 24px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.es-nav { gap: 4px 24px; }
.es-nav a,
.es-nav .wp-block-navigation-item__content {
	color: #c9c6bf;
	text-decoration: none;
	font-weight: 500;
	font-size: 15px;
	padding: 10px 0;
}
.es-nav a:hover { color: #ffffff; }
/* WordPress's own menu styles make links inherit their color from the menu, so set it there */
.wp-block-navigation.es-nav { color: #c9c6bf; }
.wp-block-navigation.es-nav .wp-block-navigation-item__content:hover { color: #ffffff; }
.wp-block-navigation.es-nav .wp-block-navigation__responsive-container.is-menu-open { color: #f4f2ee; }
.es-nav .wp-block-navigation__responsive-container-open,
.es-nav .wp-block-navigation__responsive-container-close { color: #f4f2ee; }
.es-nav .wp-block-navigation__responsive-container.is-menu-open {
	background: #0f1115;
	color: #f4f2ee;
	padding: 32px 24px;
}
.es-nav .wp-block-navigation__responsive-container.is-menu-open a { font-size: 22px; }

/* ---------- Sections ---------- */
.es-section { padding-top: 88px; padding-bottom: 88px; margin-top: 0 !important; }
.es-main > * { margin-top: 0 !important; margin-bottom: 0 !important; }
.es-alt {
	background: #ece7df;
	border-top: 1px solid #ddd5c9;
	border-bottom: 1px solid #ddd5c9;
}
.es-dark { background: #0f1115; color: #e8e6e1; }
.es-dark h1, .es-dark h2, .es-dark h3 { color: #f4f2ee; }
.es-dark p { color: #c9c6bf; }

.es-eyebrow {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	margin-bottom: 0;
}
.es-dark .es-eyebrow { color: #a9a59d; }
.es-eyebrow + .wp-block-heading { margin-top: 12px; }

.es-section h2 { font-size: clamp(32px, 4vw, 40px); }
.es-lede { font-size: 19px; color: #3f3d39; }
.es-dark .es-lede { color: #c9c6bf; }
.es-small { font-size: 14px; color: #9a968e; }

.es-split { align-items: center !important; gap: 56px !important; }

/* ---------- Hero ---------- */
.es-hero h1,
.es-hero .es-split h2 {
	font-size: clamp(38px, 5vw, 56px);
	line-height: 1.04;
	letter-spacing: -0.01em;
	margin-top: 16px;
}

/* ---------- Mission (Story Intro) ---------- */
.es-intro h1 {
	font-size: clamp(36px, 4.6vw, 54px);
	line-height: 1.06;
	letter-spacing: -0.015em;
	margin: 0 0 28px;
}
.es-intro-line { margin: 0 !important; font-size: 20px; line-height: 1.45; color: #3f3d39; }
.es-collage { margin: 0 !important; }

.es-collage img { display: block; width: 100%; height: auto; border-radius: 10px; }
.wp-block-image.es-collage img[src=""],
.wp-block-image.es-collage img:not([src]) { aspect-ratio: 4 / 5; border-radius: 10px; }

/* ---------- Free reads sign-up ---------- */
.es-signup-title { font-size: clamp(28px, 3.4vw, 38px) !important; line-height: 1.15; margin: 0 0 18px; }
.es-signup-copy { font-size: 18px; line-height: 1.55; color: #3f3d39; margin: 0; }
.es-covers { gap: 16px; align-items: flex-end; }
.es-covers .wp-block-image { margin: 0; flex: 0 1 150px; }
.es-covers .wp-block-image:nth-child(2) { flex-basis: 176px; }
.es-covers img,
.es-book img,
.es-feature-cover img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 12px 30px rgba(15, 17, 21, 0.28);
}
/* An image block with no picture yet shows as a quiet box until you choose one */
.wp-block-image img:not([src]),
.wp-block-image img[src=""] {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 3;
	background: #ddd5c9;
	box-shadow: none;
}

/* ---------- Buttons ---------- */
.wp-block-button__link {
	min-height: 48px;
	display: inline-flex;
	align-items: center;
	padding: 0 24px;
	text-decoration: none;
}
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid #b9b0a2;
	color: #1b1d22;
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: #1b1d22; }
.es-dark .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: #3a3f4a;
	color: #f4f2ee;
}
.es-dark .wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: #f4f2ee; }

/* ---------- Stats strip ---------- */
.es-stats {
	background: #ece7df;
	border-bottom: 1px solid #ddd5c9;
	padding-top: 22px;
	padding-bottom: 22px;
	margin-top: 0 !important;
}
.es-stats-row { justify-content: space-around; gap: 16px 40px; }
.es-stat { margin: 0; text-align: center; font-size: 15px; color: #4a4741; }
.es-stat strong { display: block; font-size: 24px; font-weight: 800; color: #1b1d22; }
/* Stats and reviews inside the dark Battle For Forever section */
.es-dark .es-stats-row {
	margin-top: 64px !important;
	padding: 28px 0;
	border-top: 1px solid #262a33;
	border-bottom: 1px solid #262a33;
}
.es-dark .es-stat { color: #a9a59d; }
.es-dark .es-stat strong { color: #f4f2ee; }
.es-dark .es-reviews { margin-top: 48px !important; }

/* ---------- Bloodborn sign-up form (AWeber) ---------- */
.es-form {
	box-sizing: border-box;
	max-width: 440px;
	margin-left: auto;
	background: #ffffff;
	border: 1px solid #ddd5c9;
	border-radius: 10px;
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.es-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
	color: #3f3d39;
}
.es-form input[type="text"],
.es-form input[type="email"],
.es-form select {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	border: 1px solid #c9c0b2;
	border-radius: 6px;
	background: #ffffff;
	color: #1b1d22;
	font: inherit;
}
.es-form input:focus,
.es-form select:focus { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 1px; }
.es-form button {
	min-height: 50px;
	border: 0;
	border-radius: 6px;
	background: var(--wp--preset--color--accent);
	color: #ffffff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.es-form button:hover { background: #08505b; }
.es-form .es-form-note { margin: 0; font-size: 13px; color: #5d5a54; text-align: center; }
.es-form .es-form-note a { color: #5d5a54; }

/* ---------- Podcast video ---------- */
.es-video {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 10px;
	overflow: hidden;
	background: #0b0d10;
}
.es-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.es-video-fallback a { color: #f4f2ee; }
.es-video-editor { display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; border: 1px dashed #3a3f4a; }
.es-video-editor span { color: #a9a59d; font-size: 15px; text-align: center; }

/* ---------- Books ---------- */
.es-heading-row { justify-content: space-between; align-items: baseline; margin-bottom: 36px; }
.es-books { gap: 32px 24px; }
.es-book { gap: 0; }
.es-book .wp-block-image { margin: 0; }
.es-book-title { margin: 12px 0 0; font-weight: 600; }
.es-book-title a { color: #1b1d22; text-decoration: none; }
.es-book-meta { margin: 0; font-size: 14px; color: var(--wp--preset--color--muted); }

/* ---------- Feature (Velvet) ---------- */
.es-feature-cover { max-width: 280px; margin: 0 auto !important; }

/* ---------- About ---------- */
.es-photo img { border-radius: 10px; width: 100%; height: auto; display: block; }

/* ---------- Reviews: real quotation marks, reading-size text, no rule line ---------- */
.wp-block-quote.es-review {
	border: 0;
	padding: 0;
	margin: 28px 0;
}
.wp-block-quote.es-review::before {
	content: "\201C";
	display: block;
	height: 34px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 64px;
	line-height: 1;
	color: var(--wp--preset--color--accent);
}
.wp-block-quote.es-review p {
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 17px;
	line-height: 1.6;
	color: #26282d;
	margin: 0 0 10px;
}
.wp-block-quote.es-review p:last-of-type::after { content: "\201D"; }
.wp-block-quote.es-review cite {
	display: block;
	margin-top: 6px;
	font-style: normal;
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}
.wp-block-quote.es-review cite::before { content: "— "; }
.es-dark .wp-block-quote.es-review::before { color: #a9a59d; }
.es-dark .wp-block-quote.es-review p { color: #e8e6e1; }
.es-dark .wp-block-quote.es-review cite { color: #a9a59d; }
.es-reviews { gap: 32px; }
.es-reviews .wp-block-quote.es-review { margin: 0; }

/* ---------- What's New ---------- */
.es-news { margin-top: 32px; }
.es-news .wp-block-post-template { gap: 32px 28px; }
.es-news .wp-block-post-featured-image { margin: 0 0 14px; border-radius: 8px; overflow: hidden; }
.es-news .wp-block-post-featured-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.es-news .wp-block-post-title { font-size: 21px; margin: 0 0 4px; }
.es-news .wp-block-post-title a { color: #1b1d22; text-decoration: none; }
.es-news .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }
.es-news .wp-block-post-date { font-size: 14px; color: var(--wp--preset--color--muted); }
.es-news .wp-block-post-excerpt { font-size: 16px; color: #3f3d39; }

/* ---------- Footer ---------- */
.es-footer { background: #0f1115; padding-top: 48px; padding-bottom: 48px; margin-top: 0 !important; }
.es-footer-row { justify-content: space-between; align-items: center; gap: 24px; }
.es-footer p { margin: 0; color: #9a968e; font-size: 14px; }
.es-footer .es-footer-name {
	color: #f4f2ee;
	font-weight: 800;
	font-size: 18px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
.es-footer .es-footer-social { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.es-footer a { color: #c9c6bf; text-decoration: none; padding: 10px 0; }
.es-footer a:hover { color: #ffffff; }

/* ---------- Signature ---------- */
.es-signature { margin: 8px 0 0 !important; }
.es-signature img { display: block; width: 190px; max-width: 100%; height: auto; }
.es-footer .es-signature { margin: 0 !important; }
.es-footer .es-signature a { padding: 0; }
.es-footer .es-signature img { width: 150px; }
/* On dark backgrounds the black signature turns white automatically */
.es-dark .es-signature img,
.es-footer .es-signature img { filter: brightness(0) invert(1); opacity: 0.92; }

/* ---------- Share buttons ---------- */
.es-share {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px !important;
	padding-top: 24px;
	border-top: 1px solid #ddd5c9;
}
.es-share-btn {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid #c9c0b2;
	border-radius: 6px;
	background: transparent;
	color: #1b1d22;
	font: inherit;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
}
.es-share-btn:hover { border-color: #1b1d22; color: #1b1d22; }
.es-share-label { flex: 1 1 100%; margin: 0 0 6px; font-weight: 600; color: #3f3d39; }

/* ---------- Older / Newer ---------- */
.es-series-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
	margin-top: 32px !important;
}
.es-series-link {
	flex: 1 1 240px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
	border: 1px solid #ddd5c9;
	border-radius: 8px;
	background: #ffffff;
	color: #1b1d22;
	text-decoration: none;
}
.es-series-link:hover { border-color: var(--wp--preset--color--accent); color: #1b1d22; }
.es-series-newer { text-align: right; }
.es-series-label {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
.es-series-link strong { font-weight: 600; line-height: 1.35; }

/* ---------- Posts & pages ---------- */
.es-content { padding-top: 64px; padding-bottom: 88px; }
.es-content .wp-block-post-title { font-size: clamp(32px, 4vw, 44px); }
.es-content .wp-block-post-date { color: var(--wp--preset--color--muted); font-size: 14px; }
.es-post-list .wp-block-post { padding: 28px 0; border-bottom: 1px solid #ddd5c9; }
.es-post-list .wp-block-post-title { font-size: 26px; margin: 0 0 4px; }
.es-post-list .wp-block-post-title a { color: #1b1d22; text-decoration: none; }

/* ---------- Ourmaggedon cartoon grid ---------- */
.es-cartoons { margin-top: 40px; }
.es-cartoons .wp-block-post-template { gap: 40px 28px; }
.es-cartoons .wp-block-post-featured-image {
	margin: 0 0 14px;
	aspect-ratio: 4 / 3;
	background: #ece7df;
	border-radius: 8px;
	overflow: hidden;
}
.es-cartoons .wp-block-post-featured-image a { display: block; width: 100%; height: 100%; }
.es-cartoons .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}
.es-cartoons .wp-block-post-title { font-size: 20px; margin: 0 0 2px; }
.es-cartoons .wp-block-post-title a { color: #1b1d22; text-decoration: none; }
.es-cartoons .wp-block-post-title a:hover { color: var(--wp--preset--color--accent); }

/* ---------- Phones ---------- */
@media (max-width: 781px) {
	.es-section { padding-top: 56px; padding-bottom: 56px; }
	.es-split { gap: 40px !important; }
	.es-form { margin-left: 0; max-width: none; }
	.es-covers .wp-block-image { flex-basis: 30%; }
	.es-dark .es-stats-row { margin-top: 40px !important; }
}

/* Small phones: books two to a row, smaller feature cover */
@media (max-width: 600px) {
	.es-books { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 24px 16px !important; }
	.es-book-title { font-size: 15px; }
	.es-feature-cover { max-width: 200px; }
	.es-intro-line { font-size: 18px; }
}

/* ---------- Laurels under the podcast player ---------- */
.es-laurels { margin: 24px 0 0; }
.es-laurels img { display: block; width: 100%; height: auto; }
.es-laurels-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 0 16px;
	border: 1px dashed #3a3f4a;
	border-radius: 8px;
	color: #9a968e;
	font-size: 14px;
	text-align: center;
}

/* Signature under the mission lines: about 70% of the headline-to-lines gap */
.es-intro .wp-block-image.es-intro-signature { margin-top: 28px !important; margin-left: auto !important; margin-right: 20% !important; width: fit-content; }
.es-intro .wp-block-image.es-intro-signature img { margin-left: auto; }

/* Wheaton/Porter line: same size as the paragraph above it, softer color */
.es-hero .es-performers { font-size: 19px; line-height: 1.5; color: #a9a59d; }

/* Vertical videos (YouTube Shorts etc.): fit on screen instead of filling the column */
.wp-block-embed.wp-embed-aspect-9-16,
.wp-block-embed.wp-embed-aspect-1-2 {
	width: min(100%, 400px, calc(80vh * 9 / 16));
	margin-left: auto !important;
	margin-right: auto !important;
}
