/*
 * Sections — block styles that the patterns (patterns/*.php) are built from.
 * Hero (Cover), CTA band, Steps, Stat, Price row, Logo strip (Group), Testimonial (Quote), Lead (Paragraph),
 * Plain (Image), Framed (Gallery). Each one can also be used on its own: select the block → Styles.
 * Hero tokens: --sc-scrim-hero in tokens.css.
 */

/* ---- Hero: big photo, left-to-right blue scrim, title + pitch + buttons on the left. Cover → Styles → Hero ---- */
.wp-block-cover.is-style-hero {
	min-height: clamp(30rem, 82vh, 52rem);
	padding: clamp(1.5rem, 5vw, 4rem);
	align-items: center;
	justify-content: flex-start;
	border-radius: var(--sc-radius);
	box-shadow: var(--sc-shadow-card);
	color: var(--sc-text);
	text-align: start;
}

.wp-block-cover.is-style-hero.alignfull {
	border-radius: 0;
	box-shadow: none;
	/* the text lines up with the page content, not with the screen edge */
	padding-inline: max(var(--sc-gutter, 1rem), calc((100% - var(--sc-wide, 1200px)) / 2));
}

/* ::before, not ::after: core gives the inner container z-index 1 with a selector we can't outrank, and a ::before
   at the same level is painted first, so the text stays on top of the scrim. */
.wp-block-cover.is-style-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	/* TEMPORARY, for comparing in the inspector: each line overrides the one above it, so untick the checkbox of the
	   bottom line to see the one above. Delete all but the winner afterwards. */
	background: linear-gradient(rgba(33, 33, 33, 0.55), rgba(33, 33, 33, 0.55));   /* A  even dim */
	background: linear-gradient(90deg, rgba(33, 33, 33, 0.95) 0%, rgba(33, 33, 33, 0.8) 35%, transparent 65%);   /* B  strong left column */
	background: linear-gradient(to top, rgba(33, 33, 33, 0.95) 0%, rgba(33, 33, 33, 0.6) 40%, rgba(33, 33, 33, 0.15) 75%);   /* C  bottom-up */
	background: radial-gradient(ellipse at 60% 40%, transparent 30%, rgba(33, 33, 33, 0.85) 100%), linear-gradient(to top, rgba(33, 33, 33, 0.8) 0%, transparent 35%);   /* D  vignette */
	background: linear-gradient(100deg, rgba(10, 24, 36, 0.94) 0%, rgba(14, 40, 60, 0.6) 45%, transparent 80%), linear-gradient(to top, rgba(33, 33, 33, 0.7) 0%, transparent 40%);   /* E  near-black, faint blue */
	background: var(--sc-scrim-hero);   /* current */
	pointer-events: none;
}

.wp-block-cover.is-style-hero .wp-block-cover__inner-container {
	width: 100%;
	max-width: 36rem;
	margin: 0;
}

.wp-block-cover.is-style-hero .wp-block-cover__inner-container > * {
	max-width: none;
	margin-inline: 0;
}

.wp-block-cover.is-style-hero .wp-block-cover__inner-container > * + * {
	margin-block-start: 1rem;
}

.wp-block-cover.is-style-hero :is(h1, h2, h3) {
	color: var(--sc-text);
	font-weight: 800;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.wp-block-cover.is-style-hero p {
	color: var(--sc-text);   /* text over the photo stays near-white, not the muted body gray */
}

.wp-block-cover.is-style-hero .is-style-eyebrow {
	color: var(--sc-text);
	opacity: 0.85;
}

.wp-block-cover.is-style-hero p:not([class*="is-style-"]) {
	color: rgba(238, 238, 238, 0.92);
}

/* ---- Lead: larger intro paragraph. Paragraph → Styles → Lead ---- */
p.is-style-lead {
	font-size: 1.1875rem;
	line-height: 1.55;
	color: var(--sc-text-muted);
}

/* ---- CTA band: tinted card with a centred title, line and button. Group → Styles → CTA band ---- */
.wp-block-group.is-style-band {
	padding: clamp(1.75rem, 4vw, 3rem) var(--sc-card-pad);
	border: 1px solid rgba(108, 181, 228, 0.25);
	border-radius: var(--sc-radius);
	background: var(--sc-gradient-band);
	box-shadow: var(--sc-shadow-card);
	text-align: center;
}

/* Full-width bands run to the screen edge: no rounded corners or side border there. */
.wp-block-group.is-style-band.alignfull {
	border-radius: 0;
	border-inline-width: 0;
	box-shadow: none;
	padding-inline: var(--sc-gutter, 1rem);
}

.wp-block-group.is-style-band > * {
	max-width: 40rem;
	margin-inline: auto;
}

.wp-block-group.is-style-band > * + * {
	margin-block-start: 0.75rem;
}

.wp-block-group.is-style-band > :first-child { margin-block-start: 0; }

/* ---- Steps: calm numbered list. Group (Grid layout) → Styles → Steps; each child Group becomes a step.
   Mobile: one compact row per step (small outlined number, title + text, hairline between). Desktop: three columns. ---- */
.wp-block-group.is-style-steps {
	counter-reset: sc-step;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0;
}

.wp-block-group.is-style-steps > .wp-block-group {
	counter-increment: sc-step;
	display: grid;
	grid-template-columns: 1.75rem 1fr;
	column-gap: 0.875rem;
	padding-block: 0.875rem;
	border-block-start: 1px solid var(--sc-hairline);
}

.wp-block-group.is-style-steps > .wp-block-group:first-child { border-block-start: 0; }

.wp-block-group.is-style-steps > .wp-block-group::before {
	content: counter(sc-step);
	grid-row: 1 / span 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	border: 1px solid var(--sc-hairline);
	border-radius: 50%;
	color: var(--sc-accent);
	font-size: 0.8125rem;
	font-weight: 700;
}

.wp-block-group.is-style-steps > .wp-block-group > * {
	grid-column: 2;
	max-width: none;
	margin-inline: 0;
	text-align: left;
}

.wp-block-group.is-style-steps > .wp-block-group > :is(h3, h4) {
	margin-block: 0.125rem 0.125rem;
	font-size: 1rem;
}

.wp-block-group.is-style-steps > .wp-block-group > p {
	margin-block: 0;
	text-align: center;
	color: var(--sc-text-muted);
	font-size: 0.875rem;
	line-height: 1.5;
}

@media (min-width: 782px) {
	.wp-block-group.is-style-steps {
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem;
	}

	.wp-block-group.is-style-steps > .wp-block-group,
	.wp-block-group.is-style-steps > .wp-block-group:first-child {
		padding-block: 1rem 0;
		border-block-start: 1px solid var(--sc-hairline);
	}
}

/* ---- Stat: one big number with a label. Group → Styles → Stat (two paragraphs: number, label) ---- */
.wp-block-group.is-style-stat {
	padding: 1.25rem 1rem;
	border-radius: var(--sc-radius);
	background: var(--sc-surface);
	box-shadow: var(--sc-shadow-card);
	text-align: center;
}

.wp-block-group.is-style-stat > * {
	margin: 0;
	max-width: none;
}

.wp-block-group.is-style-stat > :first-child {
	color: var(--sc-accent);
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 500;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.wp-block-group.is-style-stat > :nth-child(2) {
	margin-block-start: 0.35rem;
	color: var(--sc-text-muted);
	font-size: var(--wp--preset--font-size--label);
}

/* ---- Price row: label · dotted leader · price. Group → Styles → Price row (two paragraphs) ---- */
/* app: final-cards §3 key–value rows with dotted leaders */
.wp-block-group.is-style-price-row,
.wp-block-group.is-style-price-row-plain {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	padding-block: 0.6rem;
	border-bottom: 1px solid var(--sc-hairline);
}

.wp-block-group.is-style-price-row-plain {
	padding-block: 0.25rem;
	border-bottom: 0;
}

/* Rows of one section sit tight together: no layout gap between them */
.wp-block-group.is-style-price-row-plain + .wp-block-group.is-style-price-row-plain {
	margin-block-start: 0;
}

/* A Separator (style Wide, full width) between two groups of rows (e.g. days / fees) in a card */
.wp-block-group.is-style-card > .wp-block-separator {
	margin-block: 0.5rem;
}

.wp-block-group.is-style-price-row > *,
.wp-block-group.is-style-price-row-plain > * {
	margin: 0;
	max-width: none;
}

.wp-block-group.is-style-price-row > :first-child,
.wp-block-group.is-style-price-row-plain > :first-child {
	display: flex;
	flex: 1;
	align-items: baseline;
	gap: 0.5rem;
}

.wp-block-group.is-style-price-row > :first-child::after,
.wp-block-group.is-style-price-row-plain > :first-child::after {
	content: "";
	flex: 1;
	border-bottom: 2px dotted var(--sc-hairline);
	transform: translateY(-3px);
}

.wp-block-group.is-style-price-row > :last-child,
.wp-block-group.is-style-price-row-plain > :last-child {
	font-weight: 700;
	white-space: nowrap;
}

/* ---- Logo strip: logos in one row, greyed until hovered. Group (Row) → Styles → Logo strip ---- */
.wp-block-group.is-style-logo-strip {
	align-items: center;
	justify-content: center;
	gap: 1.5rem 2.5rem;
}

.wp-block-group.is-style-logo-strip .wp-block-image {
	margin: 0;
}

.wp-block-group.is-style-logo-strip .wp-block-image img {
	width: auto;
	max-width: 11rem;
	height: 4rem;
	border-radius: 0;
	object-fit: contain;
	filter: grayscale(1);
	opacity: 0.75;
	transition: opacity var(--sc-transition), filter var(--sc-transition);
}

.wp-block-group.is-style-logo-strip .wp-block-image img:hover {
	filter: none;
	opacity: 1;
}

/* ---- Testimonial: quote as a card. Quote → Styles → Testimonial ---- */
.wp-block-quote.is-style-testimonial {
	margin: 0;
	padding: var(--sc-card-pad);
	border: 0;
	border-radius: var(--sc-radius);
	background: var(--sc-surface);
	box-shadow: var(--sc-shadow-card);
}

.wp-block-quote.is-style-testimonial p {
	font-size: 1.125rem;
	font-style: italic;
	line-height: 1.55;
}

.wp-block-quote.is-style-testimonial::before {
	content: "\201C";
	display: block;
	color: var(--sc-accent);
	font-size: 3rem;
	font-weight: 800;
	line-height: 0.8;
}

.wp-block-quote.is-style-testimonial cite {
	display: block;
	margin-block-start: 0.75rem;
	color: var(--sc-text-muted);
	font-size: var(--wp--preset--font-size--label);
	font-style: normal;
	font-weight: 600;
}

/* ---- Plain image: no radius, border or shadow — for transparent PNGs such as the app mockup. Image → Styles → Plain ---- */
.wp-block-image.is-style-plain img {
	border-radius: 0;
	box-shadow: none;
}

/* ---- Framed gallery: square tiles, rounded, shadow. Gallery → Styles → Framed. Other shapes: class sc-ratio-4-3 / sc-ratio-16-9 ---- */
.wp-block-gallery.is-style-framed .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	border: 1px solid var(--sc-hairline);
	border-radius: var(--sc-radius);
	box-shadow: var(--sc-shadow-card);
	object-fit: cover;
}

.wp-block-gallery.is-style-framed.sc-ratio-4-3 .wp-block-image img { aspect-ratio: 4 / 3; }
.wp-block-gallery.is-style-framed.sc-ratio-16-9 .wp-block-image img { aspect-ratio: 16 / 9; }

/* ---- Cards that sit side by side in a grid should be equally tall ---- */
.wp-block-group.is-layout-grid > .wp-block-group.is-style-card,
.wp-block-group.is-layout-grid > .wp-block-group.is-style-card-tinted {
	height: 100%;
}

/* ---- Showcase: full-width looping video with the copy on a frosted panel. Cover (Video) → Styles → Showcase ---- */
/* site-only; glass panel = app: card-showcase §11 .ev-glass */
.wp-block-cover.is-style-showcase {
	min-height: clamp(32rem, 78vh, 46rem);
	padding: clamp(1.5rem, 5vw, 4rem);
	padding-inline: max(var(--sc-gutter, 1rem), calc((100% - var(--sc-wide, 1200px)) / 2));
	align-items: center;
	justify-content: flex-start;
	isolation: isolate;
	color: var(--sc-text);
	text-align: start;
}

/* darkens the left (where the panel sits) and the edges so the footage reads as a lit window */
.wp-block-cover.is-style-showcase::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background:
		linear-gradient(100deg, rgba(33, 33, 33, 0.85) 0%, rgba(33, 33, 33, 0.35) 50%, transparent 85%),
		linear-gradient(to bottom, var(--sc-page) 0%, transparent 14%, transparent 86%, var(--sc-page) 100%);
	pointer-events: none;
}

/* .entry-content prefix: outranks Astra's `.entry-content[data-ast-blocks-layout] > .wp-block-cover .wp-block-cover__inner-container { margin-inline: auto }`, which centred the panel */
.entry-content .wp-block-cover.is-style-showcase > .wp-block-cover__inner-container.wp-block-cover__inner-container {
	width: min(33rem, 100%);
	max-width: min(33rem, 100%);
	margin: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	border: var(--sc-glass-border);
	border-radius: var(--sc-radius);
	background: var(--sc-glass-bg);
	box-shadow: var(--sc-shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.12);
	-webkit-backdrop-filter: var(--sc-glass-blur);
	backdrop-filter: var(--sc-glass-blur);
}

.wp-block-cover.is-style-showcase .wp-block-cover__inner-container > * {
	max-width: none;
	margin-block: 0;
	margin-inline: 0;
}

.wp-block-cover.is-style-showcase .wp-block-cover__inner-container > * + * {
	margin-block-start: 1rem;
}

.wp-block-cover.is-style-showcase .wp-block-cover__inner-container > .is-style-eyebrow {
	margin-block-start: 1.25rem;
}

.wp-block-cover.is-style-showcase .wp-block-cover__inner-container > .is-style-eyebrow + * {
	margin-block-start: 0.35rem;
}

.wp-block-cover.is-style-showcase :is(h2, h3) {
	-webkit-hyphens: manual;   /* Safari before 17 */
	hyphens: manual;
	text-wrap: balance;
	color: var(--sc-text);
	font-weight: 800;
}

.wp-block-cover.is-style-showcase p.is-style-lead {
	color: rgba(238, 238, 238, 0.88);
}

/* ---- Badge – REC: red pill with a pulsing dot. Paragraph → Styles → Badge – REC ---- */
p.is-style-rec {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	width: fit-content;
	margin-block: 0;
	padding: 5px 12px 5px 10px;
	border-radius: var(--sc-radius-pill);
	background: rgba(0, 0, 0, 0.45);
	color: var(--sc-text);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	text-transform: uppercase;
}

p.is-style-rec::before {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #e5484d;
	box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6);
	animation: sc-rec-pulse 1.6s ease-out infinite;
}

@keyframes sc-rec-pulse {
	70%, 100% { box-shadow: 0 0 0 8px rgba(229, 72, 77, 0); }
}

@media (max-width: 781px) {
	.wp-block-cover.is-style-showcase {
		align-items: flex-end;
		min-height: 36rem;
	}

	.wp-block-cover.is-style-showcase::before {
		background:
			linear-gradient(to top, rgba(33, 33, 33, 0.9) 0%, rgba(33, 33, 33, 0.2) 70%),
			linear-gradient(to bottom, var(--sc-page) 0%, transparent 10%);
	}
}

@media (prefers-reduced-motion: reduce) {
	p.is-style-rec::before { animation: none; }
}
