/* ==========================================================================
   SPASH theme styles
   Ported from the SPASH website prototype. Colours and fonts live in
   theme.json; this file handles the layout and signature details.
   ========================================================================== */

:root {
	--spash-pink: var(--wp--preset--color--pink, #ff1687);
	--spash-ink: var(--wp--preset--color--ink, #111);
	--spash-paper: var(--wp--preset--color--paper, #f7f5f2);
	--spash-muted: var(--wp--preset--color--muted, #68645f);
	--spash-line: var(--wp--preset--color--line, #dedad5);
	--spash-serif: var(--wp--preset--font-family--serif, Georgia, serif);
	--spash-max: 1240px;
	--spash-pad: 28px;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* Sections sit flush against each other, like the prototype */
.wp-site-blocks > *,
.wp-site-blocks > * + * { margin-block: 0; }
.spash-main,
.spash-main > .wp-block-post-content > * { margin-block: 0; }
.spash-main > .wp-block-post-content > * + * { margin-block-start: 0; }

/* Anchor links land below the sticky header */
[id] { scroll-margin-top: 90px; }

/* ---------- Shared building blocks ---------- */

.wrap {
	max-width: var(--spash-max);
	margin-inline: auto !important;
	padding: 88px var(--spash-pad);
	box-sizing: border-box;
}

.eyebrow,
p.eyebrow {
	font-family: var(--wp--preset--font-family--sans);
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--spash-pink);
	margin-bottom: 0;
}

.intro { max-width: 760px; font-size: 18px; color: #4c4845; }
.subtle { color: var(--spash-muted); }
.muted { color: #b7b1ad; }

.tag {
	font-size: 10px;
	letter-spacing: .16em;
	text-transform: uppercase;
	border: 1px solid currentColor;
	padding: 6px 9px;
	display: inline-block;
	width: max-content;
	max-width: 100%;
}

hr.pink-rule,
.wp-block-separator.pink-rule {
	width: 68px;
	max-width: 68px;
	height: 5px;
	border: 0;
	background: var(--spash-pink);
	color: var(--spash-pink);
	opacity: 1;
	margin: 25px 0 !important;
	margin-inline: 0 !important;
}

.wp-block-button.is-style-dark .wp-block-button__link {
	background: var(--spash-ink);
	color: #fff;
}
.wp-block-button.is-style-dark .wp-block-button__link:hover { background: var(--spash-pink); }

.section-dark { background: var(--spash-ink); color: var(--spash-paper); }
.section-dark .intro { color: #b7b1ad; }

/* ---------- Header ---------- */

header.wp-block-template-part:has(.topbar) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
.topbar {
	background: rgba(247, 245, 242, .94);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--spash-line);
}
.topbar .nav {
	max-width: var(--spash-max);
	margin-inline: auto;
	padding: 14px var(--spash-pad);
	gap: 24px;
}
.brand { gap: 10px; flex-shrink: 0; }
.brand .brand-logo { margin: 0; }
.brand .brand-logo img { width: 48px; height: 42px; object-fit: contain; display: block; }
.brand-text { gap: 0; }
.brand-text p { margin: 0; line-height: 1.15; }
.brand-name { font-weight: 900; letter-spacing: .12em; font-size: 16px; }
.brand-sub { font-size: 12px; letter-spacing: .24em; color: var(--spash-muted); font-weight: 500; }
.topbar .navlinks {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .11em;
	gap: 24px;
}
.topbar .navlinks a:hover { color: var(--spash-pink); }
.topbar .wp-block-buttons { flex-shrink: 0; }

/* ---------- Hero ---------- */

.spash-hero .wp-block-columns {
	max-width: var(--spash-max);
	min-height: 660px;
	margin: 0 auto !important;
	padding: 68px var(--spash-pad) 82px;
	gap: 5vw;
	box-sizing: border-box;
}
.spash-hero h1 { max-width: 620px; margin: 20px 0 !important; }
.spash-hero h1 em { font-style: italic; color: var(--spash-pink); }
.spash-hero .lead {
	font-family: var(--spash-serif);
	font-size: clamp(19px, 2vw, 25px);
	line-height: 1.42;
	max-width: 550px;
}
.subnav {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
	margin-top: 28px !important;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.subnav a { border-bottom: 1px solid var(--spash-pink); padding-bottom: 5px; }

.hero-art { position: relative; margin: 0; }
.hero-art img {
	display: block;
	width: 100%;
	max-height: 670px;
	object-fit: cover;
	border-radius: 2px;
}
.hero-art::after {
	content: '';
	position: absolute;
	width: 150px;
	height: 10px;
	background: var(--spash-pink);
	right: -10px;
	bottom: 22px;
	transform: rotate(-5deg);
	box-shadow: -28px 15px 0 -3px var(--spash-pink);
	pointer-events: none;
}

/* ---------- Two-column sections ---------- */

.wp-block-columns.two-col { gap: 7vw; }
.bigquote {
	font-family: var(--spash-serif);
	font-size: clamp(26px, 3.2vw, 42px);
	line-height: 1.25;
}

/* ---------- Offerings ---------- */

.wp-block-columns.offer-grid { gap: 20px; margin-top: 42px !important; align-items: stretch !important; }
.offer-grid > .wp-block-column { display: flex; }
.offer-feature {
	background: var(--spash-ink);
	color: #fff;
	min-height: 410px;
	padding: 36px;
	display: flex !important;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	overflow: hidden;
	width: 100%;
	box-sizing: border-box;
}
.offer-feature::after {
	content: '01';
	font-family: var(--spash-serif);
	font-size: 240px;
	line-height: 1;
	color: rgba(255, 22, 135, .15);
	position: absolute;
	right: 0;
	bottom: -60px;
	pointer-events: none;
}
.offer-feature > * { position: relative; z-index: 1; }
.offer-side {
	border: 1px solid var(--spash-line);
	padding: 30px;
	display: flex !important;
	flex-direction: column;
	justify-content: space-between;
	width: 100%;
	box-sizing: border-box;
}

/* ---------- Vocabulary flip cards ---------- */

.vocab-grid {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 42px !important;
}
.vocab-grid > * { margin: 0 !important; }
.face {
	padding: 25px;
	display: flex !important;
	flex-direction: column;
	justify-content: space-between;
	border: 1px solid #d8d2cc;
	box-sizing: border-box;
	min-height: 255px;
}
.face > * { margin: 0 !important; }
.face.front { background: #171615; color: #fff; }
.face.front::after {
	content: '✳';
	font-size: 74px;
	color: var(--spash-pink);
	align-self: flex-end;
	line-height: .7;
}
.face.back { background: var(--spash-pink); color: #fff; border-color: var(--spash-pink); }
.term-number { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--spash-pink); }
.face.back .term-number { color: #fff; }
.term { font-family: var(--spash-serif); font-size: 27px; line-height: 1.05; }
.flip-hint { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; opacity: .7; }

/* In the editor (and if JavaScript is off) both sides show, one under the other,
   so each can be edited. On the live site the script turns them into flip cards. */
.flip-inner { display: flex !important; flex-direction: column; gap: 8px; }
.flip-inner > * { margin: 0 !important; }

.spash-flip .flip-card { perspective: 1000px; cursor: pointer; min-height: 255px; outline-offset: 4px; }
.spash-flip .flip-inner {
	display: block !important;
	height: 255px;
	position: relative;
	transform-style: preserve-3d;
	transition: transform .65s cubic-bezier(.2, .7, .2, 1);
}
.spash-flip .flip-card.flipped .flip-inner { transform: rotateY(180deg); }
.spash-flip .face {
	position: absolute;
	inset: 0;
	min-height: 0;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.spash-flip .face.back { transform: rotateY(180deg); }
.spash-flip .flip-card:focus-visible { outline: 2px solid var(--spash-pink); }

/* ---------- My Version of Events ---------- */

.wp-block-columns.product-hero {
	gap: 0;
	min-height: 620px;
	background: #171615;
	color: #fff;
	margin: 0 !important;
	align-items: stretch !important;
}
.product-copy {
	padding: 80px clamp(28px, 6vw, 90px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	box-sizing: border-box;
}
.product-copy h1 { font-size: clamp(42px, 6vw, 76px); }
.product-copy .excerpt {
	font-family: var(--spash-serif);
	font-size: clamp(20px, 2.1vw, 28px);
	line-height: 1.42;
}
.product-image { min-height: 620px; overflow: hidden; position: relative; }
.product-image .wp-block-image { margin: 0; height: 100%; }
.product-image img {
	width: 100%;
	height: 100%;
	min-height: 620px;
	object-fit: cover;
	display: block;
}

/* ---------- Trailer ---------- */

.media-placeholder {
	background: #1c1a19;
	color: #fff;
	min-height: 340px;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 32px;
	border: 1px solid #393431;
	box-sizing: border-box;
}
.media-placeholder > * { margin: 0 0 10px !important; }
.play {
	width: 62px;
	height: 62px;
	border: 1px solid var(--spash-pink);
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: var(--spash-pink);
	font-size: 22px;
	margin-bottom: 18px !important;
}
.trailer-video video,
.trailer-video iframe { width: 100%; }

/* ---------- Essays ---------- */

.essay-grid {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin-top: 35px !important;
}
.essay-grid > * { margin: 0 !important; }
.essay {
	padding: 28px;
	border-top: 4px solid var(--spash-pink);
	background: #fff;
	color: var(--spash-ink);
	min-height: 285px;
	display: flex !important;
	flex-direction: column;
	box-sizing: border-box;
}
.essay p { color: #5e5955; }
.essay p.eyebrow { color: var(--spash-pink); }
.essay h3 { margin-top: 12px !important; }
.essay .textlink {
	margin-top: auto !important;
	padding-top: 12px;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--spash-ink);
}
.essay .textlink a:hover { color: var(--spash-pink); }

/* ---------- Book launch ---------- */

.launch { background: var(--wp--preset--color--sand, #f0eae4); }
.launch-inner {
	max-width: 850px;
	margin: auto !important;
	text-align: center;
	padding: 82px var(--spash-pad);
	box-sizing: border-box;
}
.launch-inner h2 { max-width: 720px; margin: 18px auto !important; }
.launch-inner p { max-width: 620px; margin-inline: auto !important; color: #5b5550; }
.launch-inner p.eyebrow { color: var(--spash-pink); }
.launch-inner .wp-block-buttons { justify-content: center; margin-top: 28px !important; }
hr.launch-mark,
.wp-block-separator.launch-mark {
	width: 100px;
	max-width: 100px;
	height: 5px;
	border: 0;
	background: var(--spash-pink);
	opacity: 1;
	margin: 28px auto !important;
}

/* ---------- Footer ---------- */

.footer { background: var(--spash-ink); color: #fff; padding: 35px var(--spash-pad); }
.footer-inner {
	max-width: var(--spash-max);
	margin: auto;
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	gap: 24px;
}
.footer-inner p { margin: 0; }
.footer .brand-sub { color: #b7b1ad; }
.footer .pink, .footer .pink a { color: var(--spash-pink); }

/* ---------- Blog / essay pages ---------- */

.spash-article { padding: 72px var(--spash-pad) 96px; }
.spash-article .wp-block-post-title { margin-top: 14px; }
.spash-article .wp-block-post-featured-image { margin-block: 36px; }
.spash-article .wp-block-post-content { font-size: 18px; line-height: 1.7; }
.spash-article .wp-block-post-content > p:first-child::first-letter {
	font-family: var(--spash-serif);
	color: var(--spash-pink);
}
.spash-list .wp-block-post { border-top: 4px solid var(--spash-pink); background: #fff; padding: 28px; }
.spash-list .wp-block-post-title a:hover { color: var(--spash-pink); }

/* ---------- Mobile ---------- */

@media (max-width: 781px) {
	:root { --spash-pad: 20px; }
	.topbar .nav { padding: 12px 18px; gap: 12px; }
	.brand .brand-logo img { width: 38px; height: 34px; }
	.spash-hero .wp-block-columns { padding: 38px 20px 54px; gap: 30px; min-height: 0; }
	.spash-hero .wp-block-column.hero-col-art { order: -1; }
	.hero-art img { max-height: 400px; }
	.wrap { padding: 60px 20px; }
	.vocab-grid, .essay-grid { grid-template-columns: 1fr; }
	.offer-feature { min-height: 330px; }
	.spash-flip .flip-card, .spash-flip .flip-inner { min-height: 220px; height: 220px; }
	.face { min-height: 220px; }
	.product-copy { padding: 55px 24px; }
	.product-image, .product-image img { min-height: 380px; max-height: 500px; }
	.footer-inner { flex-direction: column; align-items: flex-start !important; }
	.bigquote { font-size: 29px; }
}

@media (max-width: 600px) {
	.topbar .wp-block-button__link { padding: 10px 12px; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.spash-flip .flip-inner { transition: none; }
}

/* Small headings (h3) use the bold sans style from the prototype */
h3.wp-block-heading {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 700;
	font-size: 23px;
	line-height: 1.15;
	letter-spacing: 0;
}
.essay h3.wp-block-heading { font-family: var(--spash-serif); font-weight: 400; font-size: 25px; }

/* Editor only: hide the decorative brush mark (it sits oddly while editing) */
.editor-styles-wrapper .hero-art::after { display: none; }
