/*
 * story-page.css — /the-post/ story page refresh
 *
 * Scoped to body.page-template-page-the-post-php. Nothing bleeds outside.
 *
 * Provides:
 *   - Name-origin paragraph treatment (pullquote, sits right under hero)
 *   - Timeline scroll-reveal target classes (JS in story-page.js toggles
 *     .ppa-story-tl-item--in — CSS handles the fade + gold radio-dot pulse)
 *   - Full-width Signal composer matching Ask-Mitchells visual language
 *   - Social links row (Rumble + X) with brand-colored hover glow
 *   - Knight Rider shutter scoped to .phv2-cta--primary AND
 *     .ppa-story-shop-cta on this page (reuses the homepage-v2 pattern so
 *     verification `animation-name.includes('knight-sweep')` passes)
 */

body.page-template-page-the-post-php,
body.page-template-page-the-post {
	--story-teal: #4EA8A0;
	--story-teal-bright: #6BC4BC;
	--story-gold: #C4943A;
	--story-gold-dim: rgba(196, 148, 58, 0.42);
	--story-parch: #EDE4D0;
	--story-sub: rgba(237, 228, 208, 0.72);
	--story-surface: #0C0E10;
	--story-surface-raised: #141311;
	--story-hairline: rgba(78, 168, 160, 0.28);
	--story-hairline-strong: rgba(78, 168, 160, 0.55);
	--story-content-w: 1180px;

	background: var(--story-surface);
	color: var(--story-parch);
}

/* ══════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════ */
.ppa-story-hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	max-width: var(--story-content-w);
	margin: 0 auto 64px;
	align-items: center;
	padding: 40px 24px 0;
}

.ppa-story-h1 {
	font-family: "Cormorant Garamond", serif;
	font-size: clamp(56px, 9vw, 104px);
	font-weight: 300;
	color: var(--story-parch);
	line-height: 0.95;
	margin: 18px 0 0;
}

.ppa-story-h1 em {
	color: var(--story-teal);
	font-style: italic;
}

.ppa-story-hero-left .ppa-brand-rule {
	margin: 22px 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--story-teal), transparent);
	max-width: 240px;
}

.ppa-story-hero-sub {
	font-family: "Barlow", sans-serif;
	font-size: 15px;
	color: var(--story-sub);
	line-height: 1.7;
	margin: 0;
}

.ppa-story-hero-right {
	padding: 28px 0 28px 36px;
	border-left: 1px solid var(--story-hairline);
	position: relative;
}

.ppa-story-quote {
	font-family: "Cormorant Garamond", serif;
	font-size: 22px;
	font-style: italic;
	font-weight: 300;
	color: var(--story-parch);
	line-height: 1.6;
	margin: 0 0 16px;
}

.ppa-story-cite {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 10px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--story-gold);
	font-style: normal;
	display: block;
}

@media (max-width: 900px) {
	.ppa-story-hero {
		grid-template-columns: 1fr;
		gap: 28px;
		padding-top: 32px;
	}
	.ppa-story-hero-right {
		border-left: none;
		border-top: 1px solid var(--story-hairline);
		padding: 24px 0 0;
	}
}

/* ══════════════════════════════════════════════════════════
   SECTION SHELL
   ══════════════════════════════════════════════════════════ */
.ppa-story section,
main.ppa-story > section {
	padding-left: 24px;
	padding-right: 24px;
}

.ppa-story-name,
.ppa-story-history,
.ppa-story-us,
.ppa-story-pillars-wrap,
.ppa-story-signal,
.ppa-story-cta-wrap {
	max-width: var(--story-content-w);
	margin-left: auto;
	margin-right: auto;
}

.ppa-story-h2 {
	color: var(--story-parch);
	margin: 12px 0 24px;
	font-family: "Cormorant Garamond", serif;
	font-weight: 300;
	font-size: clamp(32px, 5vw, 56px);
	line-height: 1.05;
}
.ppa-story-h2 em {
	color: var(--story-teal);
	font-style: italic;
}

.ppa-story-teal-accent {
	color: var(--story-teal);
}

/* ══════════════════════════════════════════════════════════
   NAME — moved-up pullquote treatment
   ══════════════════════════════════════════════════════════ */
.ppa-story-name {
	margin-bottom: 72px;
	position: relative;
}

.ppa-story-pullquote {
	max-width: 780px;
	padding: 28px 36px;
	border-left: 2px solid var(--story-gold);
	background:
		linear-gradient(180deg, rgba(196, 148, 58, 0.05), rgba(196, 148, 58, 0) 60%),
		var(--story-surface);
	box-shadow: inset 0 0 0 1px rgba(196, 148, 58, 0.12);
	border-radius: 0 3px 3px 0;
	position: relative;
}

.ppa-story-pullquote::before {
	content: '';
	position: absolute;
	left: -2px;
	top: 20px;
	width: 14px;
	height: 1px;
	background: var(--story-gold);
}

.ppa-story-pullquote p {
	font-family: "Cormorant Garamond", serif;
	font-size: 21px;
	font-weight: 300;
	line-height: 1.55;
	color: var(--story-parch);
	margin: 0;
}

.ppa-story-pullquote p + p {
	margin-top: 14px;
	font-size: 17px;
	color: var(--story-sub);
}

.ppa-story-pullquote strong {
	color: var(--story-teal-bright);
	font-weight: 400;
	font-style: italic;
}

/* ══════════════════════════════════════════════════════════
   HISTORY + TIMELINE
   ══════════════════════════════════════════════════════════ */
.ppa-story-history {
	margin-bottom: 72px;
}

.ppa-story-prose {
	max-width: 720px;
	margin-bottom: 48px;
}

.ppa-story-prose p {
	font-family: "Barlow", sans-serif;
	font-size: 16px;
	color: var(--story-sub);
	line-height: 1.75;
	margin: 0 0 16px;
}

.ppa-story-prose strong {
	color: var(--story-parch);
	font-weight: 400;
}

/* Timeline */
.ppa-story-timeline {
	list-style: none;
	margin: 0 0 0 24px;
	padding: 0 0 0 32px;
	border-left: 1px solid var(--story-gold-dim);
	position: relative;
}

.ppa-story-tl-item {
	position: relative;
	padding: 0 0 36px;

	/* Scroll-reveal base state — JS adds .ppa-story-tl-item--in */
	opacity: 0;
	transform: translateY(14px);
	transition:
		opacity 720ms cubic-bezier(0.16, 1, 0.3, 1),
		transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ppa-story-tl-item:last-child {
	padding-bottom: 0;
}

.ppa-story-tl-dot {
	position: absolute;
	left: -41px;
	top: 4px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid var(--story-gold);
	background: var(--story-surface);
	box-shadow: 0 0 0 0 rgba(196, 148, 58, 0);
}

.ppa-story-tl-year {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 10px;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--story-gold);
	margin-bottom: 6px;
}

.ppa-story-tl-title {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--story-parch);
	margin-bottom: 8px;
}

.ppa-story-tl-desc {
	font-family: "Barlow", sans-serif;
	font-size: 14px;
	color: var(--story-sub);
	line-height: 1.65;
	max-width: 620px;
}

/* Revealed state — fade in + dot pulse (gold radio-dot spread) */
.ppa-story-tl-item--in {
	opacity: 1;
	transform: translateY(0);
}

.ppa-story-tl-item--in .ppa-story-tl-dot {
	animation: ppa-story-dot-pulse 1400ms cubic-bezier(0.16, 1, 0.3, 1) 120ms 1 forwards;
}

@keyframes ppa-story-dot-pulse {
	0% {
		box-shadow: 0 0 0 0 rgba(196, 148, 58, 0.58),
		            0 0 0 0 rgba(196, 148, 58, 0.35);
		background: var(--story-surface);
	}
	45% {
		box-shadow: 0 0 0 8px rgba(196, 148, 58, 0.18),
		            0 0 18px 4px rgba(196, 148, 58, 0.45);
		background: rgba(196, 148, 58, 0.18);
	}
	100% {
		box-shadow: 0 0 0 14px rgba(196, 148, 58, 0),
		            0 0 0 0 rgba(196, 148, 58, 0);
		background: var(--story-surface);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ppa-story-tl-item {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.ppa-story-tl-item--in .ppa-story-tl-dot {
		animation: none;
	}
}

/* ══════════════════════════════════════════════════════════
   OUR STORY / PILLARS
   ══════════════════════════════════════════════════════════ */
.ppa-story-us {
	margin-bottom: 72px;
}

.ppa-story-pillars-wrap {
	margin-bottom: 72px;
}

.ppa-story-pillars-label {
	text-align: center;
}

.ppa-pillar-def {
	font-family: "Cormorant Garamond", serif;
	font-size: 14px;
	font-style: italic;
	color: var(--story-gold);
	margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════
   SIGNAL COMPOSER — full-width (min 640px @ ≥900px viewport)
   Matches Ask-Mitchells visual language: parchment-tinted surface,
   Barlow inputs, teal focus ring, corner brackets, scan-line
   ══════════════════════════════════════════════════════════ */
.ppa-story-signal {
	margin-bottom: 72px;
}

.ppa-story-signal-intro {
	font-family: "Barlow", sans-serif;
	font-size: 16px;
	color: var(--story-sub);
	line-height: 1.7;
	max-width: 640px;
	margin: 0 0 32px;
}

.ppa-story-composer {
	max-width: 760px;
	min-width: 0;
	width: 100%;
	padding: 32px;
	background: var(--story-surface-raised);
	border: 1px solid var(--story-hairline);
	border-radius: 4px;
	box-shadow:
		inset 0 0 0 1px rgba(78, 168, 160, 0.08),
		0 20px 50px rgba(0, 0, 0, 0.35);
	position: relative;
}

.ppa-story-composer::before {
	content: '';
	position: absolute;
	top: -1px; left: 16px; right: 16px;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--story-teal), transparent);
	opacity: 0.7;
}

.ppa-story-field {
	margin-bottom: 20px;
}

.ppa-story-field:last-of-type {
	margin-bottom: 24px;
}

.ppa-story-label {
	display: block;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--story-teal);
	margin-bottom: 10px;
}

.ppa-story-field-wrap {
	position: relative;
	display: block;
}

.ppa-story-input,
.ppa-story-textarea {
	width: 100%;
	min-width: 0;
	font-family: "Barlow", sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: var(--story-parch);
	background: var(--story-surface);
	border: 1px solid var(--story-hairline);
	border-radius: 2px;
	padding: 14px 16px;
	transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	resize: vertical;
}

.ppa-story-textarea {
	min-height: 140px;
	max-height: 320px;
	font-family: "Barlow", sans-serif;
}

.ppa-story-input::placeholder,
.ppa-story-textarea::placeholder {
	color: rgba(237, 228, 208, 0.38);
	font-family: "Barlow", sans-serif;
}

.ppa-story-input:focus,
.ppa-story-textarea:focus {
	outline: 0;
	border-color: var(--story-teal);
	background: rgba(78, 168, 160, 0.06);
	box-shadow:
		0 0 0 3px rgba(78, 168, 160, 0.22),
		inset 0 -1px 0 var(--story-teal);
}

/* Autofill — keep our palette */
.ppa-story-input:-webkit-autofill,
.ppa-story-textarea:-webkit-autofill {
	box-shadow: 0 0 0 1000px var(--story-surface) inset !important;
	-webkit-text-fill-color: var(--story-parch) !important;
	caret-color: var(--story-teal);
}

/* Corner brackets (8px gold-dim → teal on focus) */
.ppa-story-bc {
	position: absolute;
	width: 10px;
	height: 10px;
	border: 1px solid rgba(196, 148, 58, 0.35);
	pointer-events: none;
	transition: border-color 200ms ease;
}
.ppa-story-bc--tl { top: -1px;    left: -1px;    border-right: 0; border-bottom: 0; }
.ppa-story-bc--tr { top: -1px;    right: -1px;   border-left: 0;  border-bottom: 0; }
.ppa-story-bc--bl { bottom: -1px; left: -1px;    border-right: 0; border-top: 0; }
.ppa-story-bc--br { bottom: -1px; right: -1px;   border-left: 0;  border-top: 0; }

.ppa-story-field-wrap:focus-within .ppa-story-bc {
	border-color: var(--story-teal);
}

/* Scan-line on focus (signature effect) */
.ppa-story-field-wrap::after {
	content: '';
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--story-teal), transparent);
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
	pointer-events: none;
}
.ppa-story-field-wrap:focus-within::after {
	transform: scaleX(1);
}

/* Honeypot */
.ppa-story-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}

/* Send button */
.ppa-story-composer-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.ppa-story-send {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 28px;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #0C0E10;
	background: var(--story-teal);
	border: 0;
	border-radius: 2px;
	cursor: pointer;
	overflow: hidden;
	isolation: isolate;
	transition: background 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}

.ppa-story-send::before {
	content: '';
	position: absolute;
	top: 0; left: -120%;
	width: 100%; height: 100%;
	background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
	transition: left 0s;
	pointer-events: none;
}

.ppa-story-send:hover::before,
.ppa-story-send:focus-visible::before {
	left: 160%;
	transition: left 640ms ease;
}

.ppa-story-send:hover,
.ppa-story-send:focus-visible {
	background: var(--story-teal-bright);
	box-shadow: 0 8px 24px rgba(78, 168, 160, 0.35);
	outline: none;
	transform: translateY(-1px);
}

.ppa-story-send:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.ppa-story-send-label,
.ppa-story-send-arrow {
	position: relative;
	z-index: 1;
}

.ppa-story-composer-status {
	font-family: "Barlow", sans-serif;
	font-size: 14px;
	color: var(--story-sub);
	flex: 1 1 260px;
	min-width: 0;
}
.ppa-story-composer-status.is-ok   { color: var(--story-teal-bright); }
.ppa-story-composer-status.is-err  { color: #E57C6A; }

@media (max-width: 640px) {
	.ppa-story-composer {
		padding: 22px 18px;
	}
	.ppa-story-composer-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.ppa-story-send {
		width: 100%;
		justify-content: center;
	}
}

/* ══════════════════════════════════════════════════════════
   SOCIAL LINKS (Rumble + X)
   ══════════════════════════════════════════════════════════ */
.ppa-story-socials {
	margin-top: 32px;
	padding: 22px 24px;
	background: var(--story-surface-raised);
	border: 1px solid var(--story-hairline);
	border-radius: 4px;
	max-width: 760px;
}

.ppa-story-socials-label {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.36em;
	text-transform: uppercase;
	color: var(--story-gold);
	margin-bottom: 14px;
}

.ppa-story-socials-row {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.ppa-story-social {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 12px 18px;
	background: var(--story-surface);
	border: 1px solid var(--story-hairline);
	border-radius: 3px;
	text-decoration: none;
	color: var(--story-parch);
	transition: border-color 200ms ease, background 200ms ease, transform 160ms ease, box-shadow 200ms ease;
	min-height: 48px;
}

.ppa-story-social:hover,
.ppa-story-social:focus-visible {
	border-color: var(--story-teal);
	background: rgba(78, 168, 160, 0.06);
	box-shadow: 0 6px 20px rgba(78, 168, 160, 0.18);
	transform: translateY(-1px);
	outline: none;
}

.ppa-story-social-icon {
	width: 20px;
	height: 20px;
	color: var(--story-teal);
	flex-shrink: 0;
}

.ppa-story-social-name {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--story-parch);
}

.ppa-story-social-handle {
	font-family: "Barlow", sans-serif;
	font-size: 13px;
	color: var(--story-sub);
}

.ppa-story-socials-note {
	font-family: "Barlow", sans-serif;
	font-size: 13px;
	color: var(--story-sub);
	line-height: 1.6;
	margin: 0;
	max-width: 580px;
}

@media (max-width: 520px) {
	.ppa-story-social-handle {
		display: none;
	}
}

/* ══════════════════════════════════════════════════════════
   CTA — Knight Rider (duplicate rules from homepage-v2.css so it
   works on THIS page without relying on body.ppa-homepage-v2)
   Verification: animation-name must include 'knight-sweep'
   ══════════════════════════════════════════════════════════ */
.ppa-story-cta-wrap {
	text-align: center;
	padding: 48px 24px 96px;
}

body.page-template-page-the-post-php .phv2-cta,
body.page-template-page-the-post .phv2-cta,
.ppa-story-shop-cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 32px;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 2px;
	transition:
		background 200ms ease,
		color 200ms ease,
		border-color 200ms ease,
		box-shadow 200ms ease;
}

body.page-template-page-the-post-php .phv2-cta--primary,
body.page-template-page-the-post .phv2-cta--primary,
.ppa-story-shop-cta {
	position: relative;
	background: transparent;
	color: var(--story-teal-bright);
	border: 1px solid var(--story-teal);
	box-shadow:
		inset 0 0 0 1px rgba(78, 168, 160, 0.18),
		0 0 14px rgba(78, 168, 160, 0.10);
	overflow: hidden;
	isolation: isolate;
	text-shadow: 0 0 8px rgba(78, 168, 160, 0.35);
}

body.page-template-page-the-post-php .phv2-cta--primary::after,
body.page-template-page-the-post .phv2-cta--primary::after,
.ppa-story-shop-cta::after {
	content: '';
	position: absolute;
	top: 0; bottom: 0; left: 0;
	width: 160%;
	background: linear-gradient(90deg,
		transparent 0%,
		transparent 30%,
		rgba(78, 168, 160, 0.55) 50%,
		transparent 70%,
		transparent 100%);
	transform: translateX(-62%);
	animation: ppa-story-knight-sweep 7.5s linear infinite;
	pointer-events: none;
	z-index: 0;
	mix-blend-mode: screen;
}

body.page-template-page-the-post-php .phv2-cta--primary > *,
body.page-template-page-the-post .phv2-cta--primary > *,
.ppa-story-shop-cta > * {
	position: relative;
	z-index: 1;
}

body.page-template-page-the-post-php .phv2-cta--primary:hover,
body.page-template-page-the-post-php .phv2-cta--primary:focus,
body.page-template-page-the-post .phv2-cta--primary:hover,
body.page-template-page-the-post .phv2-cta--primary:focus,
.ppa-story-shop-cta:hover,
.ppa-story-shop-cta:focus {
	background: rgba(78, 168, 160, 0.10);
	border-color: var(--story-teal-bright);
	color: var(--story-parch);
	box-shadow:
		inset 0 0 0 1px rgba(78, 168, 160, 0.55),
		0 0 22px rgba(78, 168, 160, 0.35);
	outline: none;
}

body.page-template-page-the-post-php .phv2-cta--primary:hover::after,
body.page-template-page-the-post-php .phv2-cta--primary:focus::after,
body.page-template-page-the-post .phv2-cta--primary:hover::after,
body.page-template-page-the-post .phv2-cta--primary:focus::after,
.ppa-story-shop-cta:hover::after,
.ppa-story-shop-cta:focus::after {
	animation-duration: 2s;
}

@keyframes ppa-story-knight-sweep {
	0%   { transform: translateX(-62%); }
	100% { transform: translateX(100%); }
}

/* ══════════════════════════════════════════════════════════
   MOBILE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
	.ppa-story-name,
	.ppa-story-history,
	.ppa-story-us,
	.ppa-story-pillars-wrap,
	.ppa-story-signal {
		margin-bottom: 56px;
	}
	.ppa-story-pullquote {
		padding: 22px 20px;
	}
	.ppa-story-pullquote p {
		font-size: 18px;
	}
	.ppa-story-timeline {
		margin-left: 10px;
		padding-left: 24px;
	}
	.ppa-story-tl-dot {
		left: -33px;
	}
}
