/*
Theme Name: Irene Precious
Theme URI: https://ireneprecious.com
Author: ADAN WEB
Author URI: https://adanweb.com
Description: Custom author theme for ireneprecious.com: anonymous letters to exes (instant publishing with approve / reject / remove), books with buy links, free guide pop-up with email sign-ups, contact form and blog. Activating it creates all pages, the menu, the four books, eight blog posts and the first letters.
Version: 1.5.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: irene-precious
*/

/* ---------- Tokens ---------- */
:root {
	--night: #0a1430;
	--navy: #13224a;
	--navy-2: #1d3266;
	--blue-glow: #3b5aa8;
	--gold: #d9b064;
	--gold-2: #c49442;
	--gold-soft: #f3e3bf;
	--paper: #faf6ef;
	--paper-2: #f2eadb;
	--card: #fffdf8;
	--ink: #1c2135;
	--muted: #5a6077;
	--line: #e7dcc8;
	--white: #fff;
	--danger: #a23535;
	--ok: #1f6b3a;

	--serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
	--sans: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--radius: 14px;
	--radius-lg: 22px;
	--shadow: 0 1px 2px rgba(10, 20, 48, .06), 0 8px 24px rgba(10, 20, 48, .08);
	--shadow-lg: 0 30px 60px -20px rgba(5, 10, 30, .55);
	--wrap: 1160px;
	--gutter: clamp(16px, 4vw, 32px);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--gold-2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; color: inherit; letter-spacing: -.005em; text-wrap: balance; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 1000; background: var(--gold); color: var(--night); padding: 10px 16px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 780px; }
.center { text-align: center; }

.ip-icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }

/* ---------- Type helpers ---------- */
.eyebrow {
	font-family: var(--sans);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--gold-2);
	margin: 0 0 .9em;
}
.eyebrow--light { color: var(--gold); }
.section-title { font-size: clamp(30px, 4.2vw, 46px); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 5vw, 52px); }
.section-head--light { color: var(--white); }

/* ---------- Buttons ---------- */
.ip-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 50px;
	padding: 13px 26px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font-family: var(--sans);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1.2;
	cursor: pointer;
	transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.ip-btn:hover { transform: translateY(-1px); }
.ip-btn--gold { background: linear-gradient(180deg, #e4bd73, var(--gold-2)); color: var(--night); box-shadow: 0 8px 22px -8px rgba(217, 176, 100, .7); }
.ip-btn--gold:hover { color: var(--night); box-shadow: 0 12px 28px -8px rgba(217, 176, 100, .85); }
.ip-btn--navy { background: var(--navy); color: var(--white); }
.ip-btn--navy:hover { background: var(--navy-2); color: var(--white); }
.ip-btn--ghost-light { border-color: rgba(255, 255, 255, .45); color: var(--white); background: rgba(255, 255, 255, .04); }
.ip-btn--ghost-light:hover { border-color: var(--gold); color: var(--gold); }
.ip-btn--block { width: 100%; }
.ip-btn--sm { min-height: 42px; padding: 9px 18px; font-size: 12.5px; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.btn-row--center { justify-content: center; }
.text-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); text-decoration: none; border-bottom: 1.5px solid var(--gold); padding-bottom: 3px; }
.text-link:hover { color: var(--gold-2); }
.text-link .ip-icon { transition: transform .2s; }
.text-link:hover .ip-icon { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(10, 20, 48, .92);
	-webkit-backdrop-filter: saturate(140%) blur(10px);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, .07);
	color: var(--white);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); }
.brand:hover { color: var(--white); }
.brand__mark { color: var(--gold); display: inline-flex; }
.brand__mark .ip-icon, .brand__moon { width: 26px; height: 26px; }
.brand__name { font-family: var(--serif); font-size: 27px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.brand__logo { max-height: 52px; width: auto; }
.brand__img { display: block; height: 46px; width: auto; }
.brand__img--footer { height: 52px; }
@media (max-width: 420px) { .brand__img { height: 38px; } }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav__list a {
	display: block;
	padding: 10px 12px;
	color: rgba(255, 255, 255, .82);
	text-decoration: none;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: .06em;
	border-radius: 8px;
	position: relative;
	white-space: nowrap;
}
.site-nav__list a:hover { color: var(--white); }
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a,
.site-nav__list .current_page_parent > a { color: var(--gold); }
.site-nav__list .current-menu-item > a::after,
.site-nav__list .current_page_item > a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1.5px; background: var(--gold); }

.nav-toggle { display: none; background: none; border: 1px solid rgba(255, 255, 255, .25); color: var(--white); border-radius: 10px; width: 46px; height: 46px; align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__close { display: inline-flex; }
.nav-open .nav-toggle__open { display: none; }

@media (max-width: 1020px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: fixed;
		inset: 74px 0 auto 0;
		background: var(--night);
		border-bottom: 1px solid rgba(255, 255, 255, .08);
		padding: 8px var(--gutter) 24px;
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity .2s, transform .2s, visibility .2s;
		max-height: calc(100vh - 74px);
		overflow-y: auto;
	}
	.admin-bar .site-nav { top: 106px; }
	.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
	.site-nav__list { flex-direction: column; gap: 0; }
	.site-nav__list a { padding: 15px 4px; font-size: 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); border-radius: 0; }
	.site-nav__list .current-menu-item > a::after, .site-nav__list .current_page_item > a::after { display: none; }
}
@media (max-width: 420px) { .brand__name { font-size: 23px; } }

/* ---------- Night sky backgrounds ---------- */
.hero, .page-hero, .about-hero, .letter-single, .section--night, .cta-band, .site-footer {
	position: relative;
	color: var(--white);
	background:
		radial-gradient(120% 80% at 75% 0%, rgba(59, 90, 168, .45) 0%, rgba(59, 90, 168, 0) 60%),
		radial-gradient(80% 60% at 0% 100%, rgba(29, 50, 102, .8) 0%, rgba(29, 50, 102, 0) 70%),
		linear-gradient(180deg, var(--night) 0%, var(--navy) 100%);
	overflow: hidden;
	isolation: isolate;
}
.hero__sky, .page-hero__sky, .site-footer__stars, .section--night::before, .cta-band::before {
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	background-image:
		radial-gradient(1.2px 1.2px at 12% 18%, rgba(255, 255, 255, .9), transparent 60%),
		radial-gradient(1px 1px at 28% 62%, rgba(255, 255, 255, .7), transparent 60%),
		radial-gradient(1.4px 1.4px at 44% 12%, rgba(255, 255, 255, .85), transparent 60%),
		radial-gradient(1px 1px at 57% 78%, rgba(255, 255, 255, .6), transparent 60%),
		radial-gradient(1.6px 1.6px at 66% 34%, rgba(255, 236, 200, .9), transparent 60%),
		radial-gradient(1px 1px at 82% 54%, rgba(255, 255, 255, .7), transparent 60%),
		radial-gradient(1.3px 1.3px at 91% 14%, rgba(255, 255, 255, .8), transparent 60%),
		radial-gradient(1px 1px at 6% 84%, rgba(255, 255, 255, .6), transparent 60%),
		radial-gradient(1.2px 1.2px at 36% 40%, rgba(255, 255, 255, .55), transparent 60%),
		radial-gradient(1px 1px at 74% 90%, rgba(255, 255, 255, .55), transparent 60%);
	background-size: 520px 420px;
	animation: twinkle 7s ease-in-out infinite alternate;
}
.section--night::before, .cta-band::before { content: ""; }
@keyframes twinkle { from { opacity: .65; } to { opacity: 1; } }

/* ---------- Hero ---------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(150px, 19vw, 260px); }
.hero__moon {
	position: absolute;
	top: 9%;
	right: 8%;
	width: clamp(46px, 6vw, 80px);
	aspect-ratio: 1;
	border-radius: 50%;
	box-shadow: inset -14px 6px 0 0 #f6e7c3;
	filter: drop-shadow(0 0 22px rgba(246, 231, 195, .55));
	transform: rotate(-18deg);
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero__title { font-size: clamp(46px, 7.4vw, 92px); font-weight: 600; margin-bottom: .3em; color: var(--white); }
.hero__lead { font-size: clamp(18px, 1.9vw, 21px); color: rgba(255, 255, 255, .82); max-width: 34em; margin-bottom: 2em; }
.hero__book { display: flex; justify-content: center; }
.hero-stack { position: relative; width: 100%; max-width: 330px; }
.hero-stack__front { position: relative; z-index: 4; }
.hero .book-3d { max-width: 330px; transform: none; }
.hero-stack__back { position: absolute; top: 0; left: 0; width: 100%; border-radius: 3px 8px 8px 3px; overflow: hidden; box-shadow: var(--shadow-lg); opacity: .9; transform-origin: bottom center; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.hero-stack__back img { width: 100%; filter: brightness(.7) saturate(.9); }
.hero-stack__back--1 { transform: translate(-34%, 5%) rotate(-11deg) scale(.86); z-index: 1; }
.hero-stack__back--2 { transform: translate(34%, 5%) rotate(11deg) scale(.86); z-index: 2; }
.hero-stack__back--3 { transform: translate(0, -4%) scale(.8); z-index: 0; opacity: 0; }
.hero-stack:hover .hero-stack__back--1 { transform: translate(-40%, 4%) rotate(-14deg) scale(.86); }
.hero-stack:hover .hero-stack__back--2 { transform: translate(40%, 4%) rotate(14deg) scale(.86); }
@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; text-align: center; }
	.hero__lead { margin-left: auto; margin-right: auto; }
	.hero .btn-row { justify-content: center; }
	.hero__book { order: -1; }
	.hero .book-3d, .hero-stack { max-width: 170px; }
	.hero-stack__back--1 { transform: translate(-46%, 6%) rotate(-10deg) scale(.82); }
	.hero-stack__back--2 { transform: translate(46%, 6%) rotate(10deg) scale(.82); }
	.hero__moon { right: 6%; top: 4%; }
}

/* ---------- Book covers ---------- */
.book-3d {
	display: block;
	position: relative;
	width: 100%;
	border-radius: 3px 8px 8px 3px;
	box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .06);
	transform: perspective(1200px) rotateY(-12deg);
	transform-origin: left center;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.book-3d img { width: 100%; border-radius: inherit; }
.book-3d::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(90deg, rgba(0, 0, 0, .28) 0, rgba(255, 255, 255, .18) 2.5%, rgba(255, 255, 255, 0) 6%, rgba(0, 0, 0, 0) 94%, rgba(0, 0, 0, .12) 100%);
	pointer-events: none;
}
.book-3d:hover { transform: perspective(1200px) rotateY(-4deg); }
.book-3d--lg { max-width: 380px; margin: 0 auto; }
.book-3d--sm { max-width: 150px; transform: perspective(900px) rotateY(-10deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section--tight { padding: clamp(40px, 6vw, 64px) 0; }
.section--tight-top { padding-top: clamp(40px, 6vw, 64px); }
.section--paper { background: var(--paper); }
.section + .section:not(.section--paper):not(.section--night) { background: var(--white); }
.section--night { color: var(--white); }

/* ---------- Path cards ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: calc(-1 * clamp(100px, 13vw, 170px)); position: relative; z-index: 2; }
.path-card {
	display: flex;
	flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 34px 30px 30px;
	box-shadow: var(--shadow);
}
.path-card p { color: var(--muted); }
.path-card .ip-btn { margin-top: auto; align-self: flex-start; }
.path-card__icon { display: inline-flex; width: 54px; height: 54px; align-items: center; justify-content: center; border-radius: 50%; background: var(--paper-2); color: var(--gold-2); margin-bottom: 20px; }
.path-card__icon .ip-icon { width: 26px; height: 26px; }
.path-card__title { font-size: 29px; }
.path-card--feature { background: linear-gradient(170deg, var(--navy-2), var(--night)); border-color: transparent; color: var(--white); box-shadow: var(--shadow-lg); }
.path-card--feature p { color: rgba(255, 255, 255, .75); }
.path-card--feature .path-card__icon { background: rgba(255, 255, 255, .08); color: var(--gold); }
.path-card--feature .ticks li { color: rgba(255, 255, 255, .92); }
.ticks { list-style: none; margin: 0 0 1.1em; padding: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: .55em; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.4; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(217, 176, 100, .18); }
@media (max-width: 960px) {
	.cards-3 { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; }
}

/* ---------- Featured book ---------- */
.featured { background: var(--white); }
.featured__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 7vw, 96px); align-items: center; }
.featured__title { font-size: clamp(38px, 5vw, 58px); margin-bottom: .2em; }
.featured__subtitle { font-family: var(--serif); font-style: italic; font-size: 23px; line-height: 1.35; color: var(--navy-2); margin-bottom: .6em; }
.featured__author { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; color: var(--muted); }
.featured__desc { font-size: 18px; color: var(--muted); margin-bottom: 1.8em; }
@media (max-width: 860px) {
	.featured__grid { grid-template-columns: 1fr; text-align: center; }
	.featured .btn-row { justify-content: center; }
	.book-3d--lg { max-width: 260px; }
}

/* ---------- Letters ---------- */
.letters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; align-items: start; }
.letters-grid > .book-promo { grid-column: 1 / -1; }
.letters-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin-bottom: 36px; }
.letter-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--card);
	color: var(--ink);
	border-radius: var(--radius);
	padding: 26px 26px 18px;
	box-shadow: var(--shadow);
	border: 1px solid var(--line);
}
.letter-card::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.letter-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.letter-card__to { font-size: 12.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.letter-card__to strong { color: var(--navy); }
.tag { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-2); background: rgba(217, 176, 100, .14); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.letter-card__body { font-family: var(--serif); font-size: 21px; line-height: 1.52; color: #232842; }
.letter-card__body p { margin-bottom: .6em; }
.letter-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px dashed var(--line); padding-top: 14px; margin-top: 8px; }
.letter-card__link { display: flex; flex-direction: column; text-decoration: none; color: var(--muted); font-size: 13px; line-height: 1.4; }
.letter-card__sign { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--navy); }
.letter-card__link:hover .letter-card__sign { color: var(--gold-2); }

.letters-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 36px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs--center { justify-content: center; margin-bottom: 40px; }
.tab { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; transition: all .2s; }
.tab:hover { border-color: var(--gold); color: var(--ink); }
.tab.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
@media (max-width: 640px) {
	.letters-bar { flex-direction: column; align-items: stretch; }
	.letters-bar { display: grid; grid-template-columns: minmax(0, 1fr); }
	.tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; min-width: 0; }
	.tab { white-space: nowrap; }
}

.book-promo {
	display: grid;
	grid-template-columns: 92px minmax(0, 46ch) auto;
	justify-content: center;
	gap: 20px;
	align-items: center;
	background: linear-gradient(160deg, var(--navy-2), var(--night));
	color: var(--white);
	border-radius: var(--radius);
	padding: 22px;
	box-shadow: var(--shadow-lg);
}
.book-promo__cover img { border-radius: 3px 6px 6px 3px; box-shadow: 0 12px 24px -8px rgba(0, 0, 0, .6); }
.book-promo p { font-family: var(--serif); font-size: 22px; line-height: 1.35; margin: 0; }
.book-promo__text { display: contents; }
.book-promo .ip-btn { white-space: nowrap; }
@media (max-width: 700px) {
	.book-promo { grid-template-columns: 80px 1fr; }
	.book-promo .ip-btn { grid-column: 1 / -1; }
}
.book-promo em { color: var(--gold); }

.pagination { display: flex; justify-content: center; margin-top: 30px; }
.pagination .page-numbers, .nav-links .page-numbers { display: inline-flex; min-width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0 14px; margin: 0 3px; border-radius: 99px; border: 1px solid var(--line); background: var(--white); text-decoration: none; color: var(--ink); font-weight: 700; }
.pagination .current, .nav-links .current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.navigation.pagination { margin-top: 40px; }
.empty { text-align: center; font-family: var(--serif); font-size: 24px; color: var(--muted); padding: 40px 0; }

/* Share */
.ip-share { position: relative; }
.ip-share__toggle { display: inline-flex; align-items: center; gap: 7px; background: none; border: 1px solid var(--line); border-radius: 99px; padding: 8px 15px; color: var(--navy); font-weight: 800; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: all .2s; min-height: 40px; }
.ip-share__toggle .ip-icon { width: 16px; height: 16px; }
.ip-share__toggle:hover, .ip-share__toggle[aria-expanded="true"] { border-color: var(--gold); background: var(--gold-soft); }
.ip-share__menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 190px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(10, 20, 48, .35); padding: 6px; }
.ip-share__item { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; border: 0; background: none; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 600; cursor: pointer; text-align: left; }
.ip-share__item:hover { background: var(--paper-2); color: var(--ink); }
.ip-share__item .ip-icon { width: 18px; height: 18px; color: var(--navy-2); }
.ip-share__item[hidden] { display: none; }
.ip-share__copied { color: var(--ok); }

/* ---------- Forms ---------- */
.paper-form {
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(24px, 5vw, 48px);
	box-shadow: var(--shadow);
}
.paper-form__title { font-size: clamp(26px, 3.4vw, 34px); text-align: center; margin-bottom: 1em; }
.field-label { display: block; font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.field {
	display: block;
	width: 100%;
	padding: 14px 16px;
	border: 1.5px solid var(--line);
	border-radius: 12px;
	background: var(--white);
	color: var(--ink);
	font: inherit;
	font-size: 17px;
	transition: border-color .2s, box-shadow .2s;
}
.field:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 176, 100, .2); }
.field::placeholder { color: #9a9db0; }
.field--line { font-family: var(--serif); font-size: 22px; }
.field--letter {
	font-family: var(--serif);
	font-size: 21px;
	line-height: 32px;
	min-height: 320px;
	resize: vertical;
	background-color: #fffdf7;
	background-image: repeating-linear-gradient(180deg, transparent 0, transparent 31px, rgba(196, 148, 66, .14) 31px, rgba(196, 148, 66, .14) 32px);
	background-attachment: local;
	background-position: 0 14px;
	padding-top: 14px;
}
.counter { text-align: right; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.disclaimer { font-size: 14.5px; color: var(--muted); background: var(--paper-2); border-radius: 10px; padding: 12px 14px; margin: 18px 0; }
.fine-print { font-size: 13px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.form-error { color: var(--danger); font-weight: 700; font-size: 15px; margin: 8px 0 12px; }
.form-ok { color: var(--ok); font-weight: 700; font-size: 15px; margin: 8px 0 12px; }
.ip-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.topic-pick { border: 0; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pick legend { width: 100%; margin: 0; padding: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 9px 16px; border-radius: 99px; border: 1.5px solid var(--line); font-weight: 700; font-size: 14.5px; background: var(--white); transition: all .2s; }
.chip input:checked + span { background: var(--navy); color: var(--white); border-color: var(--navy); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.after-form { text-align: center; margin-top: 44px; }
.after-form p { font-family: var(--serif); font-size: 24px; font-style: italic; }
.letter-done { text-align: center; padding: 20px 0; }
.letter-done__icon { display: inline-flex; width: 64px; height: 64px; border-radius: 50%; align-items: center; justify-content: center; background: var(--night); color: var(--gold); margin-bottom: 16px; }
.letter-done__icon .ip-icon { width: 30px; height: 30px; }
.ip-notice { border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; font-weight: 700; }
.ip-notice--ok { background: #e4f3e8; color: var(--ok); }
.ip-notice--err { background: #f9e3e3; color: var(--danger); }
.ip-notice--glow { background: rgba(217, 176, 100, .16); color: var(--gold-soft); border: 1px solid rgba(217, 176, 100, .4); text-align: center; font-family: var(--serif); font-size: 22px; font-weight: 600; }

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(52px, 7vw, 84px); text-align: center; }
.page-hero__inner { max-width: 820px; }
.page-hero__title { font-size: clamp(40px, 6vw, 68px); color: var(--white); margin-bottom: .3em; }
.page-hero__lead { font-size: clamp(17px, 1.8vw, 20px); color: rgba(255, 255, 255, .8); max-width: 40em; margin: 0 auto; }

/* About */
.about-hero { padding: clamp(56px, 8vw, 96px) 0; }
.about-hero__grid { display: grid; grid-template-columns: 380px 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about-hero__img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: center top; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid rgba(217, 176, 100, .45); }
.about-hero .page-hero__lead { margin: 0; }
@media (max-width: 820px) {
	.about-hero__grid { grid-template-columns: 1fr; text-align: center; }
	.about-hero__photo { max-width: 300px; margin: 0 auto; }
	.about-hero .page-hero__lead { margin: 0 auto; }
}
.prose { font-size: 18.5px; }
.prose h2 { font-size: clamp(28px, 3.4vw, 36px); margin-top: 1.4em; }
.prose h3 { font-size: 26px; margin-top: 1.2em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .7em; }
.prose li::marker { color: var(--gold-2); }
.prose blockquote { margin: 1.5em 0; padding: 0 0 0 22px; border-left: 3px solid var(--gold); font-family: var(--serif); font-style: italic; font-size: 24px; }
.prose a { color: var(--navy-2); }
.prose--story > p:first-child { font-family: var(--serif); font-size: clamp(25px, 3vw, 30px); line-height: 1.4; color: var(--navy); }
.prose--story > p:first-child::first-letter { float: left; font-size: 3.2em; line-height: .8; padding: 6px 10px 0 0; color: var(--gold-2); }
.prose--article > p:first-of-type { font-size: 21px; color: var(--navy); }
.prose .ip-post-cta { margin-top: 2em; padding: 20px 24px; border-radius: var(--radius); background: var(--paper-2); font-family: var(--serif); font-size: 22px; line-height: 1.45; }
.prose .ip-book-link { color: var(--navy); text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.prose__media img { border-radius: var(--radius); }
.mini-shelf { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: clamp(16px, 4vw, 44px); flex-wrap: wrap; }
.mini-shelf li { width: clamp(110px, 18vw, 150px); }

/* Meet */
.meet { display: grid; grid-template-columns: 320px 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; max-width: 1000px; }
.meet__img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 20%; border-radius: 50%; border: 6px solid var(--white); box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.meet__text p { color: var(--muted); font-size: 18px; }
@media (max-width: 760px) {
	.meet { grid-template-columns: 1fr; text-align: center; }
	.meet__photo { max-width: 230px; margin: 0 auto; }
}

/* Books page */
.books-list { display: grid; gap: clamp(56px, 8vw, 96px); }
.book-row { display: grid; grid-template-columns: 340px 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; scroll-margin-top: 100px; }
.book-row--flip { grid-template-columns: 1fr 340px; }
.book-row--flip .book-row__cover { order: 2; }
.book-row--flip .book-3d { transform: perspective(1200px) rotateY(12deg); transform-origin: right center; }
.book-row__cover .book-3d { max-width: 320px; margin: 0 auto; }
.book-row__title { font-size: clamp(34px, 4.4vw, 50px); margin-bottom: .2em; }
.book-row__subtitle { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.35; color: var(--navy-2); }
.book-row__text > p:not(.eyebrow):not(.book-row__subtitle) { color: var(--muted); font-size: 18px; margin-bottom: 1.6em; }
@media (max-width: 820px) {
	.book-row, .book-row--flip { grid-template-columns: 1fr; text-align: center; }
	.book-row--flip .book-row__cover { order: 0; }
	.book-row__cover .book-3d { max-width: 230px; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-intro > p:first-child { font-family: var(--serif); font-size: 26px; line-height: 1.4; color: var(--navy); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

/* Blog cards */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-bottom: 36px; }
.post-card__link { display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .25s, box-shadow .25s; }
.post-card__link:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.post-card__media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 28px; position: relative; }
.post-card__title { font-size: 26px; line-height: 1.18; }
.post-card__excerpt { color: var(--muted); font-size: 16px; }
.post-card__more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }

/* Single post */
.book-callout { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: center; margin: 48px 0 32px; padding: 28px; border-radius: var(--radius-lg); background: linear-gradient(160deg, var(--navy-2), var(--night)); color: var(--white); }
.book-callout__cover img { border-radius: 3px 6px 6px 3px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .6); }
.book-callout__title { font-size: 30px; color: var(--white); margin-bottom: .2em; }
.book-callout p:not(.eyebrow) { color: rgba(255, 255, 255, .78); font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; }
@media (max-width: 560px) { .book-callout { grid-template-columns: 1fr; text-align: center; } .book-callout__cover { max-width: 130px; margin: 0 auto; } }
.post-share { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--serif); font-size: 20px; font-style: italic; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 28px; }
.post-nav a { display: block; text-decoration: none; font-family: var(--serif); font-size: 20px; line-height: 1.3; color: var(--navy); }
.post-nav a span { display: block; font-family: var(--sans); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 4px; }
.post-nav div:last-child { text-align: right; }

/* Single letter */
.letter-single { padding: clamp(44px, 7vw, 84px) 0; }
.letter-sheet { margin: 0 auto 32px; }
.letter-sheet .letter-card { padding: clamp(26px, 5vw, 48px); }
.letter-sheet .letter-card__body { font-size: clamp(22px, 2.6vw, 27px); }

/* CTA band */
.cta-band { padding: clamp(56px, 8vw, 90px) 0; text-align: center; }
.cta-band__title { font-size: clamp(32px, 4.6vw, 52px); color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, .8); }
.cta-band .ip-btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 28px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer p { color: rgba(255, 255, 255, .7); font-size: 15.5px; }
.site-footer .brand { margin-bottom: 16px; }
.site-footer__heading { font-family: var(--sans); font-size: 12.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.site-footer__list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.site-footer__list li { margin-bottom: 10px; }
.site-footer__list a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 15px; }
.site-footer__list a:hover { color: var(--gold); }
.site-footer__base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); }
.site-footer__base p { font-size: 13.5px; margin: 0; }
.site-footer__base a { color: rgba(255, 255, 255, .7); }
.site-footer__credit strong, .site-footer__credit a[target] { color: var(--gold); font-weight: 800; letter-spacing: .08em; text-decoration: none; }
.site-footer__credit a[target]:hover { color: var(--white); }
.social { list-style: none; display: flex; gap: 10px; padding: 0; margin: 18px 0 0; }
.social a { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); color: var(--white); }
.social a:hover { border-color: var(--gold); color: var(--gold); }
.social--dark a { border-color: var(--line); color: var(--navy); }
.site-nav { display: flex; align-items: center; gap: 18px; }
.social--header { margin: 0; gap: 8px; padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .15); }
.social--header a { width: 34px; height: 34px; border-color: rgba(255, 255, 255, .18); }
.social--header .ip-icon { width: 16px; height: 16px; }
@media (min-width: 1021px) and (max-width: 1180px) { .social--header { display: none; } }
@media (max-width: 1020px) {
	.site-nav { display: block; }
	.social--header { border-left: 0; padding: 18px 4px 0; gap: 12px; }
	.social--header a { width: 42px; height: 42px; }
}
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5, 10, 26, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade .25s ease; }
.modal__panel {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background:
		radial-gradient(90% 60% at 80% 0%, rgba(59, 90, 168, .5), transparent 70%),
		linear-gradient(180deg, var(--night), var(--navy));
	color: var(--white);
	border: 1px solid rgba(217, 176, 100, .35);
	border-radius: var(--radius-lg);
	padding: 44px clamp(22px, 5vw, 40px) 32px;
	text-align: center;
	box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .6);
	animation: rise .3s cubic-bezier(.2, .7, .2, 1);
}
.modal__close { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .08); color: var(--white); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.modal__close:hover { background: rgba(255, 255, 255, .16); }
.modal__moon { color: var(--gold); margin-bottom: 10px; }
.modal__moon .ip-icon { width: 34px; height: 34px; }
.modal__title { font-size: clamp(30px, 5vw, 38px); color: var(--white); }
.modal__lead { color: rgba(255, 255, 255, .8); }
.guide-form .field { margin-bottom: 12px; background: rgba(255, 255, 255, .96); }
.modal .fine-print { color: rgba(255, 255, 255, .55); }
.modal .form-error { color: #ffb4b4; }
body.modal-open { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

/* Busy state */
form.is-busy button[type="submit"] { opacity: .6; pointer-events: none; }

/* WP core alignment helpers */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { font-size: 14px; color: var(--muted); text-align: center; }
