/*
Theme Name: Michael Lee Sr – Deranged
Theme URI: https://michaellee.creativewebdevelopments.com/
Author: Creative Web Developments
Description: Comic-style author website for cartoonist Michael Lee Sr and his cartoon humor book "Deranged". Includes one-click setup, a comics gallery, fan mail inbox, fan club signups and Customizer settings for book links and homepage text.
Version: 1.0.1
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: michael-lee
*/

/* ------------------------------------------------------------------
   Tokens
------------------------------------------------------------------ */
:root {
	--navy: #0c1b47;
	--navy-2: #132a66;
	--navy-3: #1b3a85;
	--blue: #1d63e0;
	--blue-2: #3d8bff;
	--sky: #cfe3ff;
	--yellow: #ffd23f;
	--yellow-2: #ffbf00;
	--red: #ff4f5a;
	--ink: #121212;
	--paper: #fffdf5;
	--white: #ffffff;
	--muted: #5a6587;
	--line: 3px solid var(--ink);
	--shadow: 6px 6px 0 var(--ink);
	--shadow-sm: 4px 4px 0 var(--ink);
	--radius: 14px;
	--wrap: 1180px;
	--f-display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
	--f-sfx: "Bangers", "Impact", system-ui, sans-serif;
	--f-hand: "Patrick Hand", "Comic Sans MS", cursive;
	--f-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--f-body);
	font-size: 18px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--paper);
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.1; margin: 0 0 .5em; letter-spacing: .5px; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: 1.55rem; }
p { margin: 0 0 1.1em; }
:focus-visible { outline: 3px dashed var(--blue); outline-offset: 3px; }
.screen-reader-text, .sr-only {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000; top: 10px; left: 10px;
	background: var(--yellow); color: var(--ink); padding: 10px 16px; border: var(--line);
}
[id] { scroll-margin-top: 110px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 110px) 0; position: relative; }
.center { text-align: center; }

/* Halftone + backgrounds */
.bg-navy { background: var(--navy); color: var(--white); }
.bg-blue { background: var(--blue); color: var(--white); }
.bg-yellow { background: var(--yellow); }
.bg-sky { background: var(--sky); }
.halftone { position: relative; isolation: isolate; }
.halftone::before {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background-image: radial-gradient(rgba(255,255,255,.13) 1.6px, transparent 1.8px);
	background-size: 14px 14px;
}
.halftone--dark::before { background-image: radial-gradient(rgba(12,27,71,.12) 1.6px, transparent 1.8px); }
.bg-navy a:not(.btn) { color: var(--yellow); }

/* ------------------------------------------------------------------
   Logo (recreates the lettering on the book cover)
------------------------------------------------------------------ */
/* The element's own text is invisible and only sets the size; ::before draws
   the white outline and ::after the blue gradient letters on top. */
.logo-text {
	position: relative; display: inline-block;
	font-family: var(--f-display); line-height: 1; letter-spacing: 1px;
	color: transparent; white-space: nowrap;
}
.logo-text::before, .logo-text::after {
	content: attr(data-text); position: absolute; left: 0; top: 0; white-space: nowrap;
}
.logo-text::before {
	color: #fff; -webkit-text-stroke: .2em #fff; paint-order: stroke fill;
	text-shadow: 0 .14em 0 rgba(0,0,0,.4);
}
.logo-text::after {
	background: linear-gradient(180deg, #6fb0ff 0%, #2368e6 50%, #0b3aa6 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-logo { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1; transform: rotate(-2deg); }
.site-logo .logo-text { font-size: 30px; }
.site-logo small {
	font-family: var(--f-hand); color: var(--sky); font-size: 15px; margin-top: 6px; letter-spacing: .5px;
	transform: rotate(1deg);
}
.custom-logo { max-height: 64px; width: auto; }

/* Big "DERANGED" wordmark */
.wordmark { font-size: clamp(3.4rem, 10vw, 7.2rem); transform: rotate(-3deg); margin: 6px 0 14px; }

/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------ */
.btn {
	--bg: var(--yellow); --fg: var(--ink);
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	font-family: var(--f-display); font-size: 1.15rem; letter-spacing: .6px;
	padding: 14px 26px; border: var(--line); border-radius: 999px;
	background: var(--bg); color: var(--fg); text-decoration: none; cursor: pointer;
	box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease, background .15s;
	position: relative; line-height: 1.1;
}
.btn:hover { transform: translate(-2px, -2px) rotate(-1deg); box-shadow: 6px 6px 0 var(--ink); color: var(--fg); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--blue { --bg: var(--blue); --fg: #fff; }
.btn--white { --bg: #fff; --fg: var(--ink); }
.btn--navy { --bg: var(--navy); --fg: #fff; }
.btn--small { font-size: 1rem; padding: 10px 18px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Comic sound-effect burst spawned on click (main.js) */
.pow {
	position: fixed; z-index: 9999; pointer-events: none;
	font-family: var(--f-sfx); font-size: 34px; color: var(--yellow);
	-webkit-text-stroke: 1.5px var(--ink); text-shadow: 3px 3px 0 var(--ink);
	animation: pow .7s ease-out forwards;
}
@keyframes pow {
	0% { transform: translate(-50%, -50%) scale(.3) rotate(-12deg); opacity: 1; }
	60% { transform: translate(-50%, -110%) scale(1.15) rotate(6deg); opacity: 1; }
	100% { transform: translate(-50%, -150%) scale(1) rotate(2deg); opacity: 0; }
}

/* ------------------------------------------------------------------
   Comic primitives
------------------------------------------------------------------ */
.kicker {
	display: inline-block; font-family: var(--f-sfx); letter-spacing: 1.5px; font-size: 1.15rem;
	background: var(--yellow); color: var(--ink); padding: 4px 14px; border: var(--line);
	transform: rotate(-2deg); box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.kicker--blue { background: var(--blue-2); color: #fff; }
.section-head { margin-bottom: 48px; }
.section-head.center p { max-width: 640px; margin-inline: auto; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.bg-navy .section-head p, .bg-blue .section-head p { color: var(--sky); }

.bubble {
	position: relative; display: inline-block; background: #fff; color: var(--ink);
	font-family: var(--f-hand); font-size: 1.35rem; line-height: 1.3;
	padding: 14px 22px; border: var(--line); border-radius: 30px;
	box-shadow: var(--shadow-sm);
}
.bubble::after {
	content: ""; position: absolute; left: 34px; bottom: -19px; width: 26px; height: 22px;
	background: #fff; border-right: var(--line); border-bottom: var(--line);
	transform: skewX(35deg) rotate(8deg);
}
.bubble--right::after { left: auto; right: 40px; transform: skewX(-35deg) rotate(-8deg); border-right: 0; border-left: var(--line); }

.panel {
	background: #fff; border: 4px solid var(--ink); box-shadow: var(--shadow);
	border-radius: 6px; overflow: hidden;
}
.burst {
	position: absolute; display: grid; place-items: center; text-align: center;
	width: 120px; height: 120px; font-family: var(--f-sfx); font-size: 1.5rem; line-height: .95;
	color: var(--ink); background: var(--yellow); z-index: 3;
	clip-path: polygon(50% 0%, 61% 18%, 82% 7%, 79% 30%, 100% 33%, 85% 50%, 100% 67%, 79% 70%, 82% 93%, 61% 82%, 50% 100%, 39% 82%, 18% 93%, 21% 70%, 0% 67%, 15% 50%, 0% 33%, 21% 30%, 18% 7%, 39% 18%);
	filter: drop-shadow(3px 3px 0 var(--ink));
	animation: wobble 3.2s ease-in-out infinite;
}
.burst span { transform: rotate(-10deg); padding: 0 18px; }
@keyframes wobble { 0%,100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(6deg) scale(1.06); } }

/* Torn comic edge between sections */
.zigzag { height: 22px; background: var(--paper);
	-webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 90deg, #0000 91deg) 50% / 32px 100%;
	mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 90deg, #0000 91deg) 50% / 32px 100%;
	margin-top: -22px; position: relative; z-index: 2; }
.zigzag--navy { background: var(--navy); }
.zigzag--yellow { background: var(--yellow); }
.zigzag--sky { background: var(--sky); }
.zigzag--blue { background: var(--blue); }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.site-header {
	position: sticky; top: 0; z-index: 100; background: var(--navy); color: #fff;
	border-bottom: 4px solid var(--ink); transition: box-shadow .2s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header.is-scrolled { box-shadow: 0 6px 0 rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.main-nav { display: flex; align-items: center; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.main-nav a {
	display: block; color: #fff; text-decoration: none; font-family: var(--f-display); font-size: 1.05rem;
	letter-spacing: .5px; padding: 8px 12px; white-space: nowrap; border-radius: 999px; border: 2px solid transparent;
	transition: background .15s, border-color .15s, transform .15s;
}
.main-nav a:hover { border-color: var(--yellow); color: var(--yellow); transform: rotate(-2deg); }
.main-nav .current-menu-item > a, .main-nav .current_page_item > a, .main-nav .current-page-ancestor > a { background: var(--blue); border-color: var(--ink); }
.header-cta { margin-left: 10px; }
.menu-toggle {
	display: none; background: var(--yellow); border: var(--line); border-radius: 12px; width: 52px; height: 48px;
	cursor: pointer; box-shadow: 3px 3px 0 var(--ink); padding: 0;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
	display: block; width: 24px; height: 3px; background: var(--ink); margin: 0 auto; border-radius: 3px; position: relative; transition: transform .2s, background .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -8px; }
.menu-toggle span::after { top: 8px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { transform: translateY(8px) rotate(45deg); }
.nav-open .menu-toggle span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1140px) {
	.menu-toggle { display: block; }
	.main-nav {
		position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-2);
		border-bottom: 4px solid var(--ink); padding: 14px 16px 22px; display: none;
		flex-direction: column; align-items: stretch;
	}
	.nav-open .main-nav { display: flex; animation: drop .2s ease-out; }
	.main-nav ul { flex-direction: column; align-items: stretch; }
	.main-nav a { font-size: 1.3rem; padding: 12px 16px; }
	.header-cta { margin: 10px 0 0; }
	.header-cta .btn { width: 100%; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------
   Hero (home)
------------------------------------------------------------------ */
.hero { background: radial-gradient(1200px 600px at 75% 40%, var(--navy-3), var(--navy) 60%); color: #fff; overflow: hidden; padding: clamp(48px, 7vw, 90px) 0 clamp(80px, 10vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero .bubble { transform: rotate(-2deg); margin-bottom: 18px; max-width: 460px; min-height: 2.6em; transition: opacity .25s; }
.hero-lead { font-size: 1.25rem; color: var(--sky); max-width: 560px; margin-bottom: 26px; }
.hero-lead strong { color: #fff; }
.price-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding: 0; list-style: none; }
.price-chips li { font-family: var(--f-hand); font-size: 1.15rem; background: rgba(255,255,255,.1); border: 2px dashed rgba(255,255,255,.45); border-radius: 999px; padding: 3px 14px; }
.price-chips b { color: var(--yellow); font-family: var(--f-body); }
.hero-art { position: relative; justify-self: center; width: min(420px, 100%); }
.hero-cover { position: relative; z-index: 2; transform: rotate(4deg); transition: transform .4s ease; }
.hero-cover img { border: 4px solid var(--ink); border-radius: 6px 12px 12px 6px; box-shadow: 14px 14px 0 rgba(0,0,0,.45); }
.hero-cover::before { /* book spine highlight */
	content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 10px; z-index: 3;
	background: linear-gradient(90deg, rgba(255,255,255,.25), rgba(0,0,0,.15)); border-radius: 4px;
}
.hero-art:hover .hero-cover { transform: rotate(0deg) scale(1.02); }
.hero-art .burst { top: -30px; right: -26px; }
.hero-copy { position: relative; z-index: 3; }
.hero-peek { position: absolute; z-index: 1; width: 52%; left: -30%; bottom: -10%; transform: rotate(-9deg); }
.hero-peek img { background: #fff; }
.hero-peek-2 { position: absolute; z-index: 1; width: 55%; right: -34%; top: 12%; transform: rotate(10deg); }
.hero-peek-2 img { background: #fff; }
@media (max-width: 900px) {
	.hero-grid { grid-template-columns: 1fr; text-align: center; }
	.hero .bubble, .hero-lead { margin-inline: auto; }
	.hero .btn-row, .price-chips { justify-content: center; }
	.hero-art { width: min(320px, 78%); margin-top: 30px; }
	.hero-peek, .hero-peek-2 { display: none; }
	.hero-art .burst { width: 100px; height: 100px; font-size: 1.25rem; right: -18px; }
}

/* Ticker strip */
.ticker { background: var(--yellow); border-block: 4px solid var(--ink); overflow: hidden; transform: rotate(-1.5deg); margin: -26px -20px 0; position: relative; z-index: 4; }
.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
.ticker span { font-family: var(--f-sfx); font-size: 1.7rem; letter-spacing: 2px; padding: 10px 0; white-space: nowrap; }
.ticker span i { font-style: normal; color: var(--blue); padding: 0 18px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------
   Cast / comic cards
------------------------------------------------------------------ */
.cast-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.cast-card { margin: 0; transition: transform .25s ease; }
.cast-card:nth-child(odd) { transform: rotate(-2.5deg); }
.cast-card:nth-child(even) { transform: rotate(2deg) translateY(16px); }
.cast-card:hover { transform: rotate(0) translateY(-6px) scale(1.03); z-index: 2; }
.cast-card button { all: unset; display: block; cursor: zoom-in; width: 100%; }
.cast-card button:focus-visible { outline: 3px dashed var(--blue); outline-offset: 4px; }
.cast-card .panel { aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 10px; }
.cast-card .panel img { width: 100%; height: 100%; object-fit: contain; }
.cast-card figcaption { text-align: center; margin-top: 16px; }
.cast-card figcaption b { display: block; font-family: var(--f-display); font-size: 1.3rem; font-weight: 400; }
.cast-card figcaption span { font-family: var(--f-hand); font-size: 1.15rem; color: var(--muted); }
@media (max-width: 960px) { .cast-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cast-grid { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; } .cast-card:nth-child(even) { transform: rotate(2deg); } }

/* Feature cards */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature {
	background: #fff; border: var(--line); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow);
	transition: transform .2s;
}
.feature:hover { transform: translateY(-5px) rotate(-1deg); }
.feature-icon {
	width: 64px; height: 64px; display: grid; place-items: center; border: var(--line); border-radius: 50%;
	background: var(--yellow); margin-bottom: 18px; box-shadow: 3px 3px 0 var(--ink);
}
.feature:nth-child(2) .feature-icon { background: var(--blue-2); color: #fff; }
.feature:nth-child(3) .feature-icon { background: var(--red); color: #fff; }
.feature-icon svg { width: 32px; height: 32px; }
.feature p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }
.tilt-panel { transform: rotate(-2deg); }
.tilt-panel img { width: 100%; }
.tilt-panel--r { transform: rotate(2deg); }

/* Résumé (author jobs) */
.resume { list-style: none; padding: 0; margin: 24px 0 30px; display: flex; flex-wrap: wrap; gap: 10px; }
.resume li {
	font-family: var(--f-hand); font-size: 1.2rem; background: #fff; color: var(--ink); border: 2px solid var(--ink);
	border-radius: 10px; padding: 4px 14px; box-shadow: 3px 3px 0 var(--ink);
}
.resume li:nth-child(odd) { transform: rotate(-2deg); }
.resume li:nth-child(even) { transform: rotate(1.5deg); }
.resume li.is-now { background: var(--yellow); font-weight: 700; }

/* Format / buy cards */
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.format {
	background: #fff; color: var(--ink); border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow);
	padding: 32px 26px; text-align: center; display: flex; flex-direction: column; position: relative;
}
.format.is-featured { background: var(--yellow); transform: translateY(-12px); }
.format .tag { position: absolute; top: -18px; left: 50%; transform: translateX(-50%) rotate(-3deg); background: var(--red); color: #fff; font-family: var(--f-sfx); letter-spacing: 1px; padding: 3px 14px; border: var(--line); white-space: nowrap; }
.format h3 { font-size: 1.8rem; margin-bottom: 4px; }
.format .price { font-family: var(--f-display); font-size: 2.8rem; color: var(--blue); line-height: 1.1; margin: 8px 0; }
.format.is-featured .price { color: var(--navy); }
.format p { color: var(--muted); font-size: 1rem; flex: 1; }
.format.is-featured p { color: var(--ink); }
.format .btn { align-self: center; }
@media (max-width: 860px) { .formats { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } .format.is-featured { transform: none; } }

/* Testimonials (hidden until the author adds real ones) */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px 26px; }
.quote .bubble { display: block; font-size: 1.3rem; }
.quote cite { display: block; font-style: normal; font-family: var(--f-display); margin: 30px 0 0 20px; }

/* Review CTA */
.review-cta { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; background: #fff; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px 36px; }
.review-cta .stars { font-size: 2.2rem; color: var(--yellow-2); letter-spacing: 2px; -webkit-text-stroke: 1px var(--ink); white-space: nowrap; }
.review-cta h3 { margin: 0 0 4px; }
.review-cta p { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .review-cta { grid-template-columns: 1fr; text-align: center; } }

/* Post cards */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.post-card {
	background: #fff; border: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
	display: flex; flex-direction: column; transition: transform .2s;
}
.post-card:hover { transform: translateY(-5px) rotate(-.6deg); }
.post-card-img { aspect-ratio: 16 / 10; background: var(--sky); border-bottom: var(--line); display: block; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 10px; transition: transform .4s; }
.post-card:hover .post-card-img img { transform: scale(1.05); }
.post-card-img--empty { display: grid; place-items: center; font-family: var(--f-sfx); font-size: 3rem; color: var(--blue); }
.post-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-family: var(--f-hand); color: var(--muted); font-size: 1.05rem; margin-bottom: 6px; }
.post-card h3 { font-size: 1.4rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--blue); }
.post-card p { color: var(--muted); font-size: 1rem; flex: 1; }
.read-more { font-family: var(--f-display); text-decoration: none; letter-spacing: .4px; }
.read-more::after { content: " →"; transition: margin .15s; }
.read-more:hover::after { margin-left: 6px; }
@media (max-width: 960px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .posts-grid { grid-template-columns: 1fr; } }

/* Fan club / newsletter */
.fanclub { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.fanclub h2 { color: #fff; }
.fanclub p { color: var(--sky); }
@media (max-width: 860px) { .fanclub { grid-template-columns: 1fr; text-align: center; } }

/* ------------------------------------------------------------------
   Forms
------------------------------------------------------------------ */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--f-display); letter-spacing: .4px; margin-bottom: 6px; font-size: 1.05rem; }
.field input, .field select, .field textarea {
	width: 100%; font: inherit; font-size: 1.05rem; padding: 13px 16px; border: var(--line); border-radius: 12px;
	background: #fff; color: var(--ink); box-shadow: inset 3px 3px 0 rgba(0,0,0,.06);
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(29,99,224,.2); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: flex; gap: 10px; background: #fff; border: var(--line); border-radius: 999px; padding: 6px; box-shadow: var(--shadow); max-width: 520px; }
.inline-form input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; padding: 10px 18px; color: var(--ink); }
.inline-form input:focus { outline: none; }
.inline-form .btn { box-shadow: none; padding: 12px 22px; }
.inline-form .btn:hover { box-shadow: none; transform: rotate(-2deg); }
@media (max-width: 860px) { .inline-form { margin-inline: auto; } }
@media (max-width: 480px) { .inline-form { flex-direction: column; border-radius: 18px; } .inline-form input { text-align: center; } }
.form-note { font-size: .9rem; color: var(--sky); margin-top: 12px; }
.notice {
	border: var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; font-weight: 700; box-shadow: var(--shadow-sm);
	background: #e6ffe9; color: #0b4d17;
}
.notice--error { background: #ffe8ea; color: #7a0711; }
.bg-navy .notice { color: #0b4d17; }
.bg-navy .notice--error { color: #7a0711; }

/* ------------------------------------------------------------------
   Inner page hero
------------------------------------------------------------------ */
.page-hero { background: var(--navy); color: #fff; padding: clamp(56px, 8vw, 96px) 0 clamp(70px, 9vw, 110px); overflow: hidden; }
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero h1 .logo-text { font-size: inherit; }
.page-hero p { color: var(--sky); font-size: 1.2rem; max-width: 640px; margin: 0; }
.page-hero.center p { margin-inline: auto; }
.page-hero .crumbs { font-family: var(--f-hand); font-size: 1.1rem; color: var(--sky); margin-bottom: 10px; }
.page-hero .crumbs a { color: var(--yellow); }

/* Prose (page + post content) */
.prose { font-size: 1.12rem; }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: 2.1rem; margin-top: 1.4em; }
.prose h3 { font-size: 1.6rem; margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .35em; }
.prose blockquote, .prose .wp-block-quote {
	margin: 1.6em 0; padding: 22px 26px; background: #fff; border: var(--line); border-radius: 26px; box-shadow: var(--shadow-sm);
	font-family: var(--f-hand); font-size: 1.45rem; line-height: 1.35; position: relative;
}
.prose blockquote p:last-child { margin: 0; }
.prose blockquote cite { display: block; font-family: var(--f-display); font-style: normal; font-size: 1rem; margin-top: 8px; }
.prose img { border: var(--line); border-radius: 8px; }
.prose figure { margin: 1.6em 0; }
.prose figcaption { font-family: var(--f-hand); color: var(--muted); text-align: center; margin-top: 8px; }
.prose .alignwide { width: min(1100px, 100vw - 32px); margin-left: 50%; transform: translateX(-50%); }
.prose .alignfull { width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.prose .wp-block-button__link { font-family: var(--f-display); background: var(--yellow); color: var(--ink); border: var(--line); box-shadow: var(--shadow-sm); border-radius: 999px; }
.prose .aligncenter { margin-inline: auto; }
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; }

/* Book page */
.book-top { display: grid; grid-template-columns: 380px 1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.book-cover-wrap { position: sticky; top: 120px; }
.book-cover-wrap img { border: 4px solid var(--ink); border-radius: 6px; box-shadow: 14px 14px 0 var(--navy); transform: rotate(-2deg); }
.book-cover-wrap .burst { top: -34px; right: -30px; }
@media (max-width: 900px) { .book-top { grid-template-columns: 1fr; } .book-cover-wrap { position: relative; top: 0; max-width: 300px; margin: 0 auto 20px; } }
.details { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin: 26px 0; font-size: 1rem; }
.details th, .details td { text-align: left; padding: 12px 18px; border-bottom: 2px dashed #d5dbea; vertical-align: top; }
.details tr:last-child th, .details tr:last-child td { border-bottom: 0; }
.details th { font-family: var(--f-display); font-weight: 400; width: 40%; background: var(--sky); }

/* About page */
.fact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.fact { background: #fff; border: var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); }
.fact b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 2.4rem; color: var(--blue); line-height: 1.1; }
.fact span { font-family: var(--f-hand); font-size: 1.2rem; }
@media (max-width: 760px) { .fact-cards { grid-template-columns: 1fr; } }
.big-quote { font-family: var(--f-hand); font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.3; max-width: 860px; margin: 0 auto; text-align: center; }
.big-quote cite { display: block; font-family: var(--f-display); font-style: normal; font-size: 1.2rem; margin-top: 18px; color: var(--yellow); }

/* Gallery */
.gallery-grid { columns: 3 300px; column-gap: 28px; }
.gallery-item { break-inside: avoid; margin: 0 0 30px; display: block; }
.gallery-item button { all: unset; cursor: zoom-in; display: block; width: 100%; }
.gallery-item .panel { padding: 10px; transition: transform .25s; }
.gallery-item:nth-child(3n+1) .panel { transform: rotate(-1.5deg); }
.gallery-item:nth-child(3n+2) .panel { transform: rotate(1.2deg); }
.gallery-item button:hover .panel, .gallery-item button:focus-visible .panel { transform: rotate(0) scale(1.02); }
.gallery-item img { width: 100%; }
.gallery-item figcaption { font-family: var(--f-hand); font-size: 1.2rem; text-align: center; margin-top: 12px; }
.empty-state { text-align: center; padding: 40px 0; font-family: var(--f-hand); font-size: 1.4rem; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(8,16,44,.92); display: none; align-items: center; justify-content: center; padding: 60px 16px 30px; }
.lightbox.is-open { display: flex; animation: drop .2s ease-out; }
.lightbox figure { margin: 0; max-width: min(960px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-height: calc(100vh - 160px); width: auto; background: #fff; border: 4px solid var(--ink); border-radius: 6px; box-shadow: 10px 10px 0 rgba(0,0,0,.5); }
.lightbox figcaption { color: #fff; font-family: var(--f-hand); font-size: 1.4rem; margin-top: 14px; text-align: center; }
.lb-btn { position: absolute; background: var(--yellow); border: var(--line); border-radius: 50%; width: 52px; height: 52px; font-size: 26px; line-height: 1; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center; color: var(--ink); font-family: var(--f-display); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: #fff; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(24px, 4vw, 40px); }
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .ico { flex: none; width: 46px; height: 46px; border: var(--line); border-radius: 50%; background: var(--yellow); display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); }
.info-list .ico svg { width: 22px; height: 22px; }
.info-list b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.15rem; }
.info-list span, .info-list a { font-size: 1rem; word-break: break-word; }
.side-panel { margin-top: 30px; }

/* Posts / single */
.entry-meta { font-family: var(--f-hand); font-size: 1.2rem; color: var(--sky); }
.single-thumb { margin: -70px auto 40px; position: relative; z-index: 3; max-width: 900px; }
.single-thumb img { width: 100%; max-height: 520px; object-fit: contain; background: #fff; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; margin-top: 50px; padding-top: 30px; border-top: 3px dashed #cfd6e8; flex-wrap: wrap; }
.post-nav a { font-family: var(--f-display); text-decoration: none; }
.pagination { margin-top: 50px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 0 12px; border: var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; font-family: var(--f-display); box-shadow: 3px 3px 0 var(--ink); }
.pagination .current { background: var(--yellow); }
.tags { margin-top: 30px; display: flex; gap: 8px; flex-wrap: wrap; }
.tags a { font-family: var(--f-hand); font-size: 1.05rem; background: var(--sky); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; color: var(--ink); text-decoration: none; }

/* Comments */
.comments-area { margin-top: 60px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { margin-bottom: 20px; }
.comment-body { background: #fff; border: var(--line); border-radius: 18px; padding: 18px 22px; box-shadow: var(--shadow-sm); }
.comment-list .children { list-style: none; padding-left: 28px; margin-top: 18px; }
.comment-meta { font-size: .95rem; color: var(--muted); }
.comment-author .avatar { border-radius: 50%; border: 2px solid var(--ink); display: inline-block; vertical-align: middle; margin-right: 8px; }
.comment-form p { margin-bottom: 16px; }
.comment-form label { display: block; font-family: var(--f-display); margin-bottom: 4px; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; font: inherit; padding: 12px 14px; border: var(--line); border-radius: 12px; }
.comment-form .submit { font-family: var(--f-display); font-size: 1.1rem; padding: 12px 24px; background: var(--yellow); border: var(--line); border-radius: 999px; box-shadow: var(--shadow-sm); cursor: pointer; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-family: var(--f-body); }

/* 404 */
.notfound { text-align: center; }
.notfound .big { font-family: var(--f-sfx); font-size: clamp(6rem, 20vw, 12rem); line-height: 1; color: var(--yellow); -webkit-text-stroke: 3px var(--ink); text-shadow: 8px 8px 0 var(--ink); transform: rotate(-4deg); margin-bottom: 10px; }
.notfound .panel { max-width: 420px; margin: 30px auto; transform: rotate(2deg); padding: 10px; }

/* Search form */
.search-form { display: flex; gap: 10px; max-width: 520px; margin: 20px auto 0; }
.search-form input[type=search] { flex: 1; min-width: 0; font: inherit; padding: 12px 18px; border: var(--line); border-radius: 999px; }

/* ------------------------------------------------------------------
   CTA band + footer
------------------------------------------------------------------ */
.cta-band { background: var(--blue); color: #fff; text-align: center; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e4eeff; font-size: 1.2rem; max-width: 600px; margin: 0 auto 28px; }
.cta-band .btn-row { justify-content: center; }
.cta-band .burst { top: 30px; left: 6%; }
.cta-band .burst--2 { left: auto; right: 6%; top: auto; bottom: 30px; background: #fff; animation-delay: -1.4s; }
@media (max-width: 760px) { .cta-band .burst { display: none; } }

.site-footer { background: var(--navy); color: #c9d6f5; padding: 70px 0 0; font-size: 1rem; border-top: 4px solid var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1.3rem; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #c9d6f5; text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.footer-about p { margin-top: 18px; max-width: 320px; }
.footer-book { display: flex; gap: 14px; align-items: center; }
.footer-book img { width: 70px; border: 3px solid var(--ink); border-radius: 4px; transform: rotate(-4deg); }
.footer-bottom { margin-top: 50px; border-top: 2px dashed rgba(255,255,255,.18); padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .92rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.to-top {
	position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 50px; height: 50px; border-radius: 50%;
	background: var(--yellow); border: var(--line); box-shadow: 3px 3px 0 var(--ink); display: grid; place-items: center;
	cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; color: var(--ink);
}
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 22px; height: 22px; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .cast-card.reveal.is-in:nth-child(odd) { transform: rotate(-2.5deg); }
.js .cast-card.reveal.is-in:nth-child(even) { transform: rotate(2deg) translateY(16px); }
.js .cast-card.reveal.is-in:hover { transform: rotate(0) translateY(-6px) scale(1.03); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
	.js .reveal { opacity: 1; transform: none; }
}

/* WordPress core alignment helpers */
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-family: var(--f-hand); text-align: center; }
.sticky, .bypostauthor { }
