/**
 * Edmonton City Homes, SEO Landing Page styles
 * assets/css/seo-landing.css
 *
 * Scoped editorial styling for the "SEO Landing Page" template
 * (page-seo-landing.php). Every selector in this file starts with
 * .seo-landing or .seo-landing__content so nothing leaks into other
 * templates. Loaded conditionally from functions.php via
 * is_page_template('page-seo-landing.php').
 *
 * Design tokens consumed from assets/css/tokens.css:
 *   --color-ink, --color-ink-soft, --color-surface, --color-border,
 *   --color-accent, --color-accent-hover, --color-accent-soft,
 *   --font-display, --font-body, --weight-medium..--weight-bold,
 *   --leading-tight..--leading-relaxed, --radius-sm, --shadow-focus.
 *
 * The container is fixed at 800px (per template spec), not the
 * theme's --container-narrow (820px). Hero images with .alignwide
 * break out to 1200px; .alignfull breaks out to the full viewport.
 */


/* ============================================================
   1. CONTAINER
   ============================================================
   Constrained reading column. All descendants inherit the 800px
   width by default. The alignwide / alignfull breakout rules in
   section 3 are the only escape hatch.
   ============================================================ */

.seo-landing {
	max-width: 800px;
	margin-inline: auto;
	padding-inline: clamp(20px, 5vw, 32px);
	padding-block: clamp(40px, 6vw, 80px);
	color: var(--color-ink);
	font-family: var(--font-body);
	background-color: var(--color-surface);
}


/* ============================================================
   2. TITLE (H1)
   ============================================================
   Left-aligned, Fraunces medium, fluid size. Overrides any inline
   text-align: center on H1s authored inside .seo-landing__content
   (current SEO automation output uses inline center styles).
   ============================================================ */

.seo-landing__header {
	margin-bottom: clamp(28px, 4vw, 48px);
}

.seo-landing__title,
.seo-landing__content h1 {
	font-family: var(--font-display);
	font-weight: var(--weight-medium);
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.15;
	color: var(--color-ink-strong);
	margin: 0;
	text-align: left;
	text-transform: none;
	letter-spacing: -0.01em;
}

.seo-landing__content h1 {
	text-align: left !important; /* defeats inline style="text-align: center;" */
	margin-bottom: clamp(28px, 4vw, 48px);
}


/* ============================================================
   3. IMAGES: default, alignwide, alignfull
   ============================================================
   Two markup patterns must work identically:
     A. <figure class="wp-block-image"><img></figure>      (block editor)
     B. <p><img class="aligncenter|alignnone size-full ..."> (classic editor)
   Defaults keep images inside the 800px container. The .alignwide
   and .alignfull modifiers break out via negative margins computed
   relative to the parent column.
   ============================================================ */

.seo-landing__content figure.wp-block-image,
.seo-landing__content p > img {
	display: block;
	margin-inline: auto;
	margin-block: 32px;
	max-width: 100%;
	height: auto;
}

.seo-landing__content figure.wp-block-image img,
.seo-landing__content p > img {
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-sm);
	display: block;
	margin-inline: auto;
}

.seo-landing__content figure.wp-block-image {
	margin-block: 32px;
}

.seo-landing__content figure.wp-block-image figcaption {
	font-family: var(--font-body);
	font-size: 0.875rem;
	color: var(--color-ink-soft);
	text-align: center;
	margin-top: 12px;
	line-height: 1.5;
}

/* Wide breakout, up to 1200px, centred, escapes the 800px column. */
.seo-landing__content figure.wp-block-image.alignwide,
.seo-landing__content figure.wp-block-image:has(> img.alignwide),
.seo-landing__content p > img.alignwide {
	width: min(1200px, calc(100vw - 40px));
	max-width: none;
	margin-left: calc(50% - min(600px, calc(50vw - 20px)));
	margin-right: calc(50% - min(600px, calc(50vw - 20px)));
}

.seo-landing__content figure.wp-block-image.alignwide img,
.seo-landing__content p > img.alignwide {
	width: 100%;
}

/* Full breakout, edge to edge of the viewport. */
.seo-landing__content figure.wp-block-image.alignfull,
.seo-landing__content figure.wp-block-image:has(> img.alignfull),
.seo-landing__content p > img.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	border-radius: 0;
}

.seo-landing__content figure.wp-block-image.alignfull img,
.seo-landing__content p > img.alignfull {
	width: 100%;
	border-radius: 0;
}

/* Classic-editor alignment classes inside the constrained column. */
.seo-landing__content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.seo-landing__content .alignnone {
	margin-left: 0;
	margin-right: auto;
}


/* ============================================================
   4. BLOCKQUOTE: "Key Takeaways" callout
   ============================================================
   Targets the default core Quote block. Handles both the current
   <p><strong>Key takeaways</strong></p> markup and the future-state
   <h3>/<h4> heading markup so the visual stays identical when the
   SEO skill switches to real headings. Also handles real <ul>/<ol>
   when the skill emits them instead of pseudo-bullet paragraphs.
   ============================================================ */

.seo-landing__content blockquote.wp-block-quote {
	background-color: var(--color-accent-soft);
	border-left: 4px solid var(--color-accent);
	padding: clamp(24px, 3vw, 36px);
	border-top-right-radius: 6px;
	border-bottom-right-radius: 6px;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	margin-block: 40px;
	font-style: normal;
	quotes: none;
}

.seo-landing__content blockquote.wp-block-quote::before,
.seo-landing__content blockquote.wp-block-quote::after {
	content: none;
}

/* Label: first <p><strong>, OR an <h3>/<h4> heading (future markup). */
.seo-landing__content blockquote.wp-block-quote > p:first-child > strong:only-child,
.seo-landing__content blockquote.wp-block-quote > h3,
.seo-landing__content blockquote.wp-block-quote > h4 {
	display: block;
	font-family: var(--font-body);
	font-weight: var(--weight-bold);
	font-size: 0.875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-accent);
	margin: 0 0 16px;
	line-height: 1.3;
}

/* When the label is a heading, hide its default heading typography. */
.seo-landing__content blockquote.wp-block-quote > h3,
.seo-landing__content blockquote.wp-block-quote > h4 {
	border: 0;
	padding: 0;
}

/* When the label is <p><strong>, collapse the wrapping <p>'s own margin
   and rely on the strong's pseudo-heading styling. */
.seo-landing__content blockquote.wp-block-quote > p:first-child:has(> strong:only-child) {
	margin: 0 0 16px;
	font-family: var(--font-body);
	font-size: 0.875rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-accent);
	line-height: 1.3;
}

.seo-landing__content blockquote.wp-block-quote > p {
	font-size: 1rem;
	line-height: 1.55;
	margin-block: 8px;
	color: var(--color-ink);
}

.seo-landing__content blockquote.wp-block-quote > p:last-child {
	margin-bottom: 0;
}

/* Future-state real lists inside the callout. */
.seo-landing__content blockquote.wp-block-quote ul,
.seo-landing__content blockquote.wp-block-quote ol {
	padding-left: 24px;
	margin-block: 12px;
}

.seo-landing__content blockquote.wp-block-quote li {
	line-height: 1.55;
	margin-block: 6px;
	color: var(--color-ink);
}

.seo-landing__content blockquote.wp-block-quote ul li::marker {
	color: var(--color-accent);
}

.seo-landing__content blockquote.wp-block-quote cite {
	display: block;
	font-style: normal;
	font-size: 0.875rem;
	color: var(--color-ink-soft);
	margin-top: 16px;
}


/* ============================================================
   5. H2: quiet section breaks
   ============================================================
   No rules, no borders, no underlines. White space carries the
   hierarchy. Generous top margin separates sections; short bottom
   margin keeps the heading tied to the following paragraph.
   ============================================================ */

.seo-landing__content h2 {
	font-family: var(--font-display);
	font-weight: var(--weight-medium);
	font-size: clamp(1.5rem, 2.5vw, 1.875rem);
	line-height: 1.25;
	color: var(--color-ink-strong);
	margin-top: clamp(48px, 5vw, 72px);
	margin-bottom: 16px;
	text-align: left;
	letter-spacing: -0.005em;
}


/* ============================================================
   6. H3 and H4: sub-sections
   ============================================================ */

.seo-landing__content h3 {
	font-family: var(--font-display);
	font-weight: var(--weight-semibold);
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	line-height: 1.3;
	color: var(--color-ink-strong);
	margin-top: 32px;
	margin-bottom: 12px;
}

.seo-landing__content h4 {
	font-family: var(--font-body);
	font-weight: var(--weight-semibold);
	font-size: 1.125rem;
	line-height: 1.35;
	color: var(--color-ink-strong);
	margin-top: 24px;
	margin-bottom: 8px;
}


/* ============================================================
   7. BODY PARAGRAPHS
   ============================================================ */

.seo-landing__content p {
	font-family: var(--font-body);
	font-size: 1.0625rem; /* 17px */
	line-height: 1.7;
	color: var(--color-ink);
	margin-block: 1em;
}

.seo-landing__content p:first-child {
	margin-top: 0;
}


/* ============================================================
   8. LINKS
   ============================================================
   Underline by default for accessibility. Hover thickens the
   underline rather than changing colour (quieter, more editorial).
   Focus-visible uses the accent ring for keyboard users.
   ============================================================ */

.seo-landing__content a {
	color: var(--color-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: text-decoration-thickness var(--duration-fast) var(--ease-snappy);
}

.seo-landing__content a:hover {
	color: var(--color-accent);
	text-decoration-thickness: 2px;
}

.seo-landing__content a:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: 2px;
}


/* ============================================================
   9. INLINE EMPHASIS
   ============================================================ */

.seo-landing__content strong {
	font-weight: var(--weight-semibold);
}

.seo-landing__content em {
	font-style: italic;
}


/* ============================================================
   10. LISTS: real <ul> and <ol> in body content
   ============================================================ */

.seo-landing__content ul,
.seo-landing__content ol {
	padding-left: 24px;
	margin-block: 1em;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	color: var(--color-ink);
}

.seo-landing__content li {
	line-height: 1.65;
	margin-block: 6px;
}

.seo-landing__content ul li::marker {
	color: var(--color-accent);
}

.seo-landing__content ul ul,
.seo-landing__content ul ol,
.seo-landing__content ol ul,
.seo-landing__content ol ol {
	margin-block: 0.5em;
}


/* ============================================================
   11. TABLES
   ============================================================ */

.seo-landing__content table {
	width: 100%;
	border-collapse: collapse;
	margin-block: 32px;
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--color-ink);
}

.seo-landing__content th,
.seo-landing__content td {
	padding: 12px 16px;
	border: 1px solid var(--color-border);
	text-align: left;
	vertical-align: top;
}

.seo-landing__content thead th {
	font-weight: var(--weight-semibold);
	background-color: var(--color-accent-soft);
	color: var(--color-ink-strong);
}


/* ============================================================
   12. RESPONSIVE: mobile refinements
   ============================================================ */

@media (max-width: 640px) {

	.seo-landing {
		padding-inline: 18px;
		padding-block: 40px;
	}

	.seo-landing__title,
	.seo-landing__content h1 {
		font-size: 2rem; /* clamp base */
	}

	.seo-landing__content h2 {
		font-size: 1.5rem; /* clamp base */
		margin-top: 40px;
	}

	.seo-landing__content figure.wp-block-image,
	.seo-landing__content p > img {
		margin-block: 24px;
	}

	/* Cap alignwide / alignfull breakouts so they cannot overflow the viewport
	   horizontally and trigger horizontal scroll on small screens. */
	.seo-landing__content figure.wp-block-image.alignwide,
	.seo-landing__content figure.wp-block-image:has(> img.alignwide),
	.seo-landing__content p > img.alignwide,
	.seo-landing__content figure.wp-block-image.alignfull,
	.seo-landing__content figure.wp-block-image:has(> img.alignfull),
	.seo-landing__content p > img.alignfull {
		width: 100%;
		margin-left: 0;
		margin-right: 0;
	}

	.seo-landing__content a {
		padding-block: 2px; /* slightly larger tap target without disrupting flow */
	}
}
