/**
 * Psy Core — Guides & Help styling
 *
 * Loaded by GuidesModule when rendering `archive-psy_guide` / `single-psy_guide`.
 *
 * Layout: full-width outer wrapper with brand bg (handled by the theme/header)
 * and a 1440-capped inner `.psy-guides__wrap` with clamp(20,4vw,50)
 * horizontal padding. Every section sits inside that wrap so the boxed-1440
 * site rule (memory: feedback_section_layout_rule) is respected.
 *
 * Token reference (Figma frame "GUIDES & HELP"):
 *   - Card                 → padding 40, radius 24, bg #0C0548, stroke 1px #1A0F5C inside
 *   - H1                   → Yacote 42/46, tracking -11%, #FFF
 *   - Body/lede            → Open Sans 16-18, white
 *   - Pink CTA / accents   → #E54ADA / brand grad
 */

.psy-guides {
	--psy-card-bg:     #0C0548;
	--psy-card-stroke: #1A0F5C;
	--psy-pink:        #E54ADA;
	--psy-pink-2:      #FF43C8;
	--psy-yellow:      #DAFF00;
	--psy-text:        #FFFFFF;
	--psy-text-mute:   rgba(255, 255, 255, 0.65);
	--psy-radius:      24px;
	--psy-pad-card:    40px;

	color: var(--psy-text);
	font-family: 'Open Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	padding: 60px 0 80px;
}

@media (max-width: 768px) {
	.psy-guides { padding: 32px 0 60px; }
}

.psy-guides__wrap {
	/* Matches the theme's `.psy-home__inner` so the breadcrumb / title /
	   step panel line up with the header logo and footer columns at
	   every viewport (50 desktop, 20 mobile @720). Earlier clamp version
	   diverged from the theme padding on viewports between 500–720 px
	   and the title visibly slid left of the rest of the site. */
	max-width: 1440px;
	margin: 0 auto;
	padding-left: 50px;
	padding-right: 50px;
}

@media (max-width: 720px) {
	.psy-guides__wrap { padding-left: 20px; padding-right: 20px; }
}

/* Breadcrumb ------------------------------------------------------------ */

.psy-guides__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 14px;
	color: var(--psy-text-mute);
	margin-bottom: 18px;
}

.psy-guides__crumbs a {
	color: var(--psy-pink);
	text-decoration: none;
}

.psy-guides__crumbs a:hover {
	text-decoration: underline;
}

.psy-guides__crumbs span[aria-hidden] {
	color: rgba(255, 255, 255, 0.35);
}

/* Heading --------------------------------------------------------------- */

.psy-guides__head {
	margin-bottom: 36px;
}

.psy-guides__title {
	font-family: 'Yacota Display Sans', 'Yacote', 'Audiowide', sans-serif;
	font-size: clamp(34px, 4.5vw, 56px);
	line-height: 1.05;
	letter-spacing: -0.04em;
	font-weight: 400;
	color: var(--psy-text);
	margin: 0 0 12px;
	text-transform: uppercase;
}

.psy-guides__title--single {
	font-size: clamp(26px, 3.4vw, 42px);
	letter-spacing: -0.02em;
}

.psy-guides__lede {
	font-size: clamp(15px, 1.2vw, 18px);
	line-height: 1.5;
	color: var(--psy-text);
	margin: 0;
	max-width: 720px;
}

/* Single guide intro reads wider so the introductory paragraph doesn't
   wrap into a narrow column inside the much wider step panel. */
.psy-guides--single .psy-guides__lede { max-width: 960px; }

/* Card grid ------------------------------------------------------------- */

.psy-guides__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

@media (max-width: 980px) {
	.psy-guides__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
	.psy-guides__grid { grid-template-columns: 1fr; }
}

.psy-guides__card {
	margin: 0;
	display: flex;
}

.psy-guides__card-link {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 228px;
	flex: 1;
	padding: var(--psy-pad-card);
	background: var(--psy-card-bg);
	border: 1px solid var(--psy-card-stroke);
	border-radius: var(--psy-radius);
	color: var(--psy-text);
	text-decoration: none;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.psy-guides__card-link:hover {
	transform: translateY(-2px);
	border-color: rgba(229, 74, 218, 0.5);
	box-shadow: 0 12px 30px rgba(229, 74, 218, 0.18);
	outline: none;
}

.psy-guides__card-link:focus-visible {
	transform: translateY(-2px);
	border-color: rgba(229, 74, 218, 0.5);
	box-shadow: 0 12px 30px rgba(229, 74, 218, 0.18);
	outline: 2px solid var(--psy-pink, #E54ADA);
	outline-offset: 3px;
}

.psy-guides__card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: rgba(229, 74, 218, 0.10);
	color: var(--psy-pink);
}

.psy-guides__card-title {
	font-family: 'Open Sans', sans-serif;
	font-size: 20px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--psy-text);
	margin: 0;
}

.psy-guides__card-body {
	font-size: 14px;
	line-height: 1.5;
	color: var(--psy-text-mute);
	margin: 0;
	flex: 1;
}

.psy-guides__card-cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	color: var(--psy-pink);
	text-transform: none;
}

.psy-guides__empty {
	padding: 40px;
	background: var(--psy-card-bg);
	border: 1px solid var(--psy-card-stroke);
	border-radius: var(--psy-radius);
	color: var(--psy-text-mute);
	text-align: center;
}

/* Still need help CTA --------------------------------------------------- */

.psy-guides__help {
	margin-top: 28px;
	padding: var(--psy-pad-card);
	background: var(--psy-card-bg);
	border: 1px solid var(--psy-card-stroke);
	border-radius: var(--psy-radius);
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
	position: relative;
	overflow: hidden;
}

/* Diagonal hatched motif fades in from the copy area to the right edge —
   no hard 50% seam, no asset file. Mirrors the Figma frame. */
.psy-guides__help::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: repeating-linear-gradient(
		45deg,
		rgba(229, 74, 218, 0.12) 0,
		rgba(229, 74, 218, 0.12) 6px,
		transparent 6px,
		transparent 14px
	);
	-webkit-mask-image: linear-gradient(to right, transparent 0%, transparent 35%, #000 75%, #000 100%);
	        mask-image: linear-gradient(to right, transparent 0%, transparent 35%, #000 75%, #000 100%);
	pointer-events: none;
}

.psy-guides__help-copy {
	flex: 1 1 320px;
	position: relative;
	z-index: 1;
}

.psy-guides__help-title {
	font-family: 'Open Sans', sans-serif;
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 6px;
	color: var(--psy-text);
}

.psy-guides__help-body {
	font-size: 14px;
	line-height: 1.5;
	color: var(--psy-text-mute);
	margin: 0;
}

.psy-guides__help-cta {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 30px;
	background: var(--psy-pink);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border-radius: 999px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 14px;
	transition: filter .2s ease, transform .2s ease;
}

.psy-guides__help-cta:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
	outline: none;
}

.psy-guides__help-cta:focus-visible {
	filter: brightness(1.08);
	transform: translateY(-1px);
	outline: 2px solid var(--psy-pink, #E54ADA);
	outline-offset: 3px;
}

/* Single — steps -------------------------------------------------------- */

.psy-guides__back {
	margin: 8px 0 22px;
}

.psy-guides__back a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--psy-pink);
	font-weight: 700;
	text-decoration: none;
}

.psy-guides__back a:hover { text-decoration: underline; }

.psy-guides__steps {
	background: var(--psy-card-bg);
	border: 1px solid var(--psy-card-stroke);
	border-radius: var(--psy-radius);
	padding: clamp(28px, 3vw, 56px);
	display: grid;
	gap: 64px;
}

.psy-guides__step {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) minmax(0, 420px);
	gap: 28px;
	align-items: start;
}

/* Step with no screenshot: text spans full width, no empty placeholder column. */
.psy-guides__step--no-shot {
	grid-template-columns: 56px minmax(0, 1fr);
}

@media (max-width: 860px) {
	/* Two-row layout on phones: [num | title] on top, body + screenshot
	   span full width below — kills the empty gutter under the number
	   when the title wraps short. */
	.psy-guides__step,
	.psy-guides__step--no-shot {
		grid-template-columns: 40px 1fr;
		grid-template-areas:
			"num  title"
			"body body"
			"shot shot";
		gap: 10px 14px;
	}
	.psy-guides__step-num   { grid-area: num; }
	/* `display: contents` lets the title and body inside `.step-text` take
	   their own grid-area slots in the step grid above. */
	.psy-guides__step-text  { display: contents; }
	.psy-guides__step-title { grid-area: title; align-self: center; margin: 0; }
	.psy-guides__step-body  { grid-area: body; margin-top: 6px; }
	.psy-guides__step-shot  { grid-area: shot; margin-top: 6px; }
}

.psy-guides__step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(229, 74, 218, 0.15);
	color: var(--psy-pink);
	font-weight: 700;
	font-size: 18px;
	border: 1px solid rgba(229, 74, 218, 0.45);
}

.psy-guides__step-title {
	font-family: 'Open Sans', sans-serif;
	font-size: 18px;
	font-weight: 700;
	color: var(--psy-text);
	margin: 0 0 6px;
	line-height: 1.3;
}

.psy-guides__step-body {
	font-size: 15px;
	line-height: 1.55;
	color: var(--psy-text-mute);
	margin: 0;
}

.psy-guides__step-shot {
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 18px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.35);
}

.psy-guides__step-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.psy-guides__step-placeholder {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-style: normal;
}

.psy-guides__step-placeholder em {
	font-style: normal;
}

/* Prose (WP block editor fallback) */
.psy-guides__prose {
	margin-top: 28px;
	padding: clamp(24px, 3vw, 48px);
	background: var(--psy-card-bg);
	border: 1px solid var(--psy-card-stroke);
	border-radius: var(--psy-radius);
	font-size: 16px;
	line-height: 1.6;
}

.psy-guides__prose p,
.psy-guides__prose ul,
.psy-guides__prose ol { color: var(--psy-text); }
.psy-guides__prose a { color: var(--psy-pink); }
.psy-guides__prose h2,
.psy-guides__prose h3,
.psy-guides__prose h4 {
	color: var(--psy-text);
	font-family: 'Open Sans', sans-serif;
}

/* Tip callout ----------------------------------------------------------- */

.psy-guides__tip {
	margin-top: 22px;
	padding: 20px 24px;
	border-radius: 16px;
	border: 1px solid rgba(218, 255, 0, 0.45);
	background: linear-gradient(110deg, rgba(108, 43, 255, 0.18), rgba(229, 74, 218, 0.16));
}

.psy-guides__tip-label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--psy-yellow);
	margin-bottom: 4px;
}

.psy-guides__tip-body {
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
	color: var(--psy-text);
}

.psy-guides__tip-body a {
	color: var(--psy-yellow);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	transition: opacity 0.15s ease;
}

.psy-guides__tip-body a:hover,
.psy-guides__tip-body a:focus-visible {
	opacity: 0.75;
}
