/*
Theme Name: DOW 2026
Theme URI: https://www.dentalofficewebsite.com/
Author: Search Engine Projects
Author URI: https://www.searchengineprojects.com/
Description: Custom theme for Dental Office Website with five switchable homepage layouts (Appearance → Customize → Homepage layout). Includes a page-content migration tool that replaces old WPBakery shortcode content with clean HTML while keeping page IDs, URLs and SEO data.
Version: 1.1.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dow2026
*/

/* =========================================================
   1. Design tokens — one set per layout
   ========================================================= */
body {
	--bg: #ffffff;
	--surface: #eef5f8;
	--surface-2: #f7fafc;
	--ink: #14263a;
	--muted: #4d6274;
	--line: #d6e2ea;
	--brand: #0b4f7c;
	--brand-ink: #ffffff;
	--brand-deep: #083a5c;
	--accent: #1fa89c;
	--accent-ink: #ffffff;
	--dark: #0b3350;
	--dark-ink: #e8f2f8;
	--radius: 14px;
	--radius-lg: 22px;
	--font-head: "Manrope", system-ui, sans-serif;
	--font-body: "Manrope", system-ui, sans-serif;
	--head-weight: 800;
	--head-track: -0.025em;
	--body-size: 1.0625rem;
	--body-lh: 1.65;
	--wrap: 1200px;
	--gutter: clamp(16px, 4vw, 40px);
	--section: clamp(64px, 9vw, 120px);
}

/* 2 — Operatory */
body.layout-2 {
	--bg: #f4f6f9;
	--surface: #ffffff;
	--surface-2: #e9eef4;
	--ink: #13233a;
	--muted: #4a5a70;
	--line: #d3dbe6;
	--brand: #f2b544;
	--brand-ink: #13233a;
	--brand-deep: #d99a22;
	--accent: #8fb8de;
	--accent-ink: #13233a;
	--dark: #13233a;
	--dark-ink: #dce8f2;
	--link: #1d5d99;
	--link-hover: #13233a;
	--radius: 6px;
	--radius-lg: 10px;
	--font-head: "Sora", system-ui, sans-serif;
	--font-body: "Source Sans 3", system-ui, sans-serif;
	--head-weight: 600;
	--head-track: -0.03em;
	--body-size: 1.125rem;
}

/* 3 — Practice Journal */
body.layout-3 {
	--bg: #f3f6f4;
	--surface: #ffffff;
	--surface-2: #e7ede9;
	--ink: #1c2b24;
	--muted: #52615a;
	--line: #c9d4cd;
	--brand: #1f4d3a;
	--brand-ink: #f3f6f4;
	--brand-deep: #163a2b;
	--accent: #9a7742;
	--accent-ink: #ffffff;
	--dark: #1f4d3a;
	--dark-ink: #e7ede9;
	--radius: 2px;
	--radius-lg: 2px;
	--font-head: "Newsreader", Georgia, serif;
	--font-body: "Public Sans", system-ui, sans-serif;
	--head-weight: 500;
	--head-track: -0.015em;
	--body-size: 1.0625rem;
	--body-lh: 1.7;
}

/* 4 — Bright Smile */
body.layout-4 {
	--bg: #ffffff;
	--surface: #eef0ff;
	--surface-2: #f6f7ff;
	--ink: #141b4d;
	--muted: #4b5280;
	--line: #d9ddf7;
	--brand: #2547f4;
	--brand-ink: #ffffff;
	--brand-deep: #1a35c4;
	--accent: #7fe0c2;
	--accent-ink: #0f2a3d;
	--dark: #2547f4;
	--dark-ink: #ffffff;
	--radius: 22px;
	--radius-lg: 36px;
	--font-head: "Bricolage Grotesque", system-ui, sans-serif;
	--font-body: "Bricolage Grotesque", system-ui, sans-serif;
	--head-weight: 800;
	--head-track: -0.035em;
}

/* 5 — Referral */
body.layout-5 {
	--bg: #fffbfc;
	--surface: #f7e9ee;
	--surface-2: #fbf2f5;
	--ink: #2a1426;
	--muted: #6a5163;
	--line: #ead3dc;
	--brand: #4a1d3f;
	--brand-ink: #ffffff;
	--brand-deep: #36142e;
	--accent: #127c8a;
	--accent-ink: #ffffff;
	--dark: #4a1d3f;
	--dark-ink: #f7e9ee;
	--radius: 10px;
	--radius-lg: 18px;
	--font-head: "DM Serif Display", Georgia, serif;
	--font-body: "DM Sans", system-ui, sans-serif;
	--head-weight: 400;
	--head-track: -0.01em;
}

/* =========================================================
   2. Base
   ========================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--body-size);
	line-height: var(--body-lh);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--link, var(--brand)); text-underline-offset: 3px; }
a:hover { color: var(--link-hover, var(--brand-deep)); }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: var(--head-weight);
	letter-spacing: var(--head-track);
	line-height: 1.15;
	margin: 0 0 0.5em;
	color: var(--ink);
	text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 5.2vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.3; }
body.layout-3 h3, body.layout-5 h3 { font-weight: 600; font-family: var(--font-body); letter-spacing: -0.01em; }
body.layout-3 h3 { font-family: var(--font-head); font-weight: 600; font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
body.layout-2 :focus-visible { outline-color: var(--brand); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.center { text-align: center; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 38em; }

.screen-reader-text, .dow-hp {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 12px; top: -60px; z-index: 1000;
	background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Buttons */
.btn, .dow-btn, .wp-block-button__link {
	display: inline-flex; align-items: center; gap: 0.5em; justify-content: center;
	padding: 0.85em 1.5em;
	border-radius: var(--radius);
	background: var(--brand); color: var(--brand-ink);
	border: 2px solid var(--brand);
	font: 700 1rem/1.2 var(--font-body);
	text-decoration: none; cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
body.layout-4 .btn, body.layout-4 .dow-btn { border-radius: 999px; }
.btn:hover, .dow-btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: var(--brand-ink); }
.btn--sm { padding: 0.6em 1.1em; font-size: 0.95rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn--light { background: #fff; color: var(--dark); border-color: #fff; }
.btn--light:hover { background: var(--surface); border-color: var(--surface); color: var(--dark); }
.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }
.btn--mint { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--mint:hover { background: #fff; border-color: #fff; color: var(--brand); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 1.75rem; }

.text-link { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }

.section-head { max-width: 44rem; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p { color: var(--muted); font-size: 1.125rem; margin: 0; }
.section-head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.section-head--row p { max-width: 40rem; }
.section-head--center { margin-inline: auto; text-align: center; }

/* =========================================================
   3. Header
   ========================================================= */
.topbar { background: var(--dark); color: var(--dark-ink); font-size: 0.875rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; }
.topbar__note { margin: 0; opacity: .85; }
.topbar__contact { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: #fff; text-decoration: underline; }
body.layout-4 .topbar { background: var(--ink); }

.masthead { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
body.admin-bar .masthead { top: 32px; }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { max-height: 54px; width: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark__mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); }
body.layout-3 .wordmark__mark { border-radius: 50%; }
body.layout-4 .wordmark__mark { border-radius: 50%; background: var(--accent); color: var(--brand); }
.wordmark__text { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.25rem; letter-spacing: var(--head-track); }
body.layout-3 .wordmark__text, body.layout-5 .wordmark__text { font-size: 1.45rem; }
.wordmark:hover { color: var(--ink); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a {
	display: block; padding: 10px 12px; color: var(--ink); text-decoration: none;
	font-weight: 600; font-size: 0.975rem; border-radius: 8px;
}
.site-nav .menu a:hover { background: var(--surface); color: var(--ink); }
.site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a, .site-nav .current_page_item > a { color: var(--brand); }
body.layout-2 .site-nav .current-menu-item > a { color: #1d5d99; }
.site-nav .menu-item-has-children > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); opacity: .6; }
.site-nav .sub-menu {
	list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%;
	min-width: 250px; background: var(--surface); background: var(--bg); border: 1px solid var(--line);
	border-radius: var(--radius); box-shadow: 0 18px 40px -18px rgba(20, 38, 58, .35);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s;
}
.site-nav .menu > li:hover > .sub-menu, .site-nav .menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.masthead__cta svg { flex: none; }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--ink); cursor: pointer; }
.nav-toggle__close { display: none; }

@media (max-width: 1080px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: fixed; inset: 116px 0 0 0; background: var(--bg); flex-direction: column; align-items: stretch;
		padding: 16px var(--gutter) 32px; gap: 16px; overflow-y: auto;
		transform: translateX(100%); visibility: hidden; transition: transform .2s, visibility .2s;
	}
	body.admin-bar .site-nav { inset-block-start: 148px; }
	body.nav-open .site-nav { transform: none; visibility: visible; }
	body.nav-open .nav-toggle__open { display: none; }
	body.nav-open .nav-toggle__close { display: inline; }
	.site-nav .menu { flex-direction: column; }
	.site-nav .menu a { padding: 14px 8px; font-size: 1.125rem; border-bottom: 1px solid var(--line); border-radius: 0; }
	.site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 16px; background: transparent; }
	.site-nav .menu-item-has-children > a::after { display: none; }
	.topbar__note { display: none; }
	.topbar__inner { justify-content: center; }
}
@media (max-width: 782px) { body.admin-bar .masthead { top: 0; } }
@media (max-width: 520px) {
	.topbar__contact li:last-child { display: none; }
	.wordmark__text { font-size: 1.05rem; }
}

/* =========================================================
   4. Shared content components (inner pages)
   ========================================================= */
.page-hero { background: var(--surface); padding: clamp(40px, 6vw, 80px) 0 clamp(32px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-hero .page-title { font-size: clamp(2rem, 4.4vw, 3.25rem); max-width: 22ch; margin: 0; }
.page-intro { color: var(--muted); font-size: 1.15rem; max-width: 40rem; margin: 1rem 0 0; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
body.layout-2 .page-hero { background: var(--dark); border: 0; }
body.layout-2 .page-hero .page-title, body.layout-2 .page-hero .crumbs, body.layout-2 .page-hero .crumbs a, body.layout-2 .page-hero .page-intro, body.layout-2 .page-hero .post-meta { color: var(--dark-ink); }
body.layout-4 .page-hero { background: var(--brand); border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
body.layout-4 .page-hero * , body.layout-4 .page-hero a { color: #fff; }
body.layout-3 .page-hero { background: transparent; border-bottom: 1px solid var(--ink); }
body.layout-3 .page-hero .page-title { font-size: clamp(2.4rem, 5.4vw, 4rem); }
body.layout-5 .page-hero { text-align: center; }
body.layout-5 .page-hero .page-title { margin-inline: auto; }
body.layout-5 .crumbs { justify-content: center; }

.page-body { padding: clamp(48px, 7vw, 96px) 0; }
.entry-content { }
.wrap.entry-content { max-width: calc(var(--wrap) + var(--gutter) * 2); }
.entry-content > p, .entry-content > ul, .entry-content > ol, .entry-content > h2, .entry-content > h3, .entry-content > dl, .entry-content > .dow-callout { max-width: 46rem; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content > :first-child { margin-top: 0; }
.entry-content li { margin-bottom: .4em; }

.dow-split {
	display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px);
	align-items: center; margin: 0 0 clamp(48px, 7vw, 88px);
}
.dow-split.is-reversed > figure { order: 2; }
.dow-split figure img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 500 / 336; object-fit: cover; background: var(--surface); }
body.layout-4 .dow-split figure img { border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 6px; }
.dow-split h2:first-child, .dow-split h3:first-child { margin-top: 0; }
@media (max-width: 860px) {
	.dow-split { grid-template-columns: 1fr; }
	.dow-split.is-reversed > figure { order: 0; }
}

.dow-checklist { list-style: none; padding: 0; margin: 0 0 1.5em; }
.dow-checklist li { position: relative; padding-left: 34px; margin-bottom: .7em; }
.dow-checklist li::before {
	content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%;
	background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat;
}
body.layout-2 .dow-checklist li::before { background-color: #1d5d99; }
body.layout-4 .dow-checklist li::before { background-color: var(--brand); }

.dow-cta { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 1.5em; }
.dow-phone { font-weight: 700; color: var(--ink); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.dow-phone::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a1 1 0 0 1-1 1A16 16 0 0 1 4 5a1 1 0 0 1 1-1z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M5 4h4l2 5-2.5 1.5a11 11 0 0 0 5 5L15 13l5 2v4a1 1 0 0 1-1 1A16 16 0 0 1 4 5a1 1 0 0 1 1-1z'/%3E%3C/svg%3E") center/contain no-repeat; }
.dow-phone:hover { text-decoration: underline; color: var(--ink); }

.dow-callout { background: var(--surface); border-left: 4px solid var(--accent); padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; }

.dow-steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 2em; display: grid; gap: 28px; }
.dow-steps > li { counter-increment: step; position: relative; padding-left: 72px; }
.dow-steps > li::before {
	content: counter(step); position: absolute; left: 0; top: -2px; width: 48px; height: 48px; display: grid; place-items: center;
	border-radius: 50%; background: var(--surface); color: var(--brand); font: var(--head-weight) 1.25rem/1 var(--font-head);
	border: 1px solid var(--line);
}
body.layout-2 .dow-steps > li::before { color: var(--ink); background: var(--brand); border-color: var(--brand); }
body.layout-3 .dow-steps > li::before { background: transparent; border: 0; font-size: 2.25rem; color: var(--accent); width: auto; }
.dow-steps h3 { margin: 0 0 .3em; }
.dow-steps p { color: var(--muted); }

.dow-defs dt { font-family: var(--font-head); font-weight: var(--head-weight); font-size: 1.2rem; margin-top: 1.5em; color: var(--ink); }
.dow-defs dd { margin: .4em 0 0; color: var(--muted); }

.dow-faq { max-width: 52rem; display: grid; gap: 12px; margin-top: 2rem; }
.dow-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
body.layout-3 .dow-faq details { background: transparent; border-width: 0 0 1px; border-radius: 0; }
.dow-faq summary {
	cursor: pointer; list-style: none; padding: 20px 56px 20px 24px; position: relative;
	font: var(--head-weight) 1.15rem/1.35 var(--font-head); letter-spacing: var(--head-track);
}
body.layout-3 .dow-faq summary, body.layout-5 .dow-faq summary { font-weight: 600; font-family: var(--font-body); letter-spacing: 0; }
body.layout-3 .dow-faq summary { padding-left: 0; }
.dow-faq summary::-webkit-details-marker { display: none; }
.dow-faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--brand); }
body.layout-2 .dow-faq summary::after { color: #1d5d99; }
.dow-faq details[open] summary::after { content: "–"; }
.dow-faq details > p { padding: 0 24px; color: var(--muted); }
body.layout-3 .dow-faq details > p { padding: 0; }
.dow-faq details > p:last-child { padding-bottom: 20px; }

.dow-gallery, .work-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 1.5rem; }
.dow-gallery img, .work-grid img { width: 100%; aspect-ratio: 500/336; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
@media (max-width: 860px) { .dow-gallery, .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Testimonials page */
.dow-testimonials { display: grid; gap: clamp(24px, 3vw, 40px); }
.dow-testimonial {
	display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: clamp(20px, 3vw, 40px);
	background: var(--surface); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 36px);
}
body.layout-3 .dow-testimonial { background: transparent; border-top: 1px solid var(--ink); border-radius: 0; padding-inline: 0; }
.dow-testimonial img { grid-row: 1 / span 2; width: 220px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.dow-testimonial blockquote { margin: 0; font-size: 1.15rem; }
.dow-testimonial figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 1rem; align-self: end; }
.dow-testimonial figcaption strong { font-family: var(--font-head); font-size: 1.15rem; font-weight: var(--head-weight); }
.dow-testimonial figcaption span { color: var(--muted); }
@media (max-width: 700px) {
	.dow-testimonial { grid-template-columns: 1fr; }
	.dow-testimonial img { grid-row: auto; width: 96px; margin-bottom: 1rem; border-radius: 50%; }
}

.dow-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-bottom: 2rem; }
.dow-team figure { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.dow-team figcaption { display: flex; flex-direction: column; }
.dow-team figcaption span { color: var(--muted); }

/* CTA band */
.cta-band { background: var(--dark); color: var(--dark-ink); padding: clamp(48px, 6vw, 80px) 0; }
.cta-band__inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { margin: 0; opacity: .85; max-width: 34rem; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
body.layout-2 .cta-band { background: var(--brand); color: var(--ink); }
body.layout-2 .cta-band h2 { color: var(--ink); }
body.layout-2 .cta-band .btn--light { background: var(--ink); color: #fff; border-color: var(--ink); }
body.layout-2 .cta-band .btn--ghost-light { color: var(--ink); border-color: rgba(19, 35, 58, .45); }
body.layout-3 .cta-band { background: var(--brand); }
body.layout-4 .cta-band .wrap { background: var(--brand); border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 64px); }
body.layout-4 .cta-band { background: transparent; padding-top: 0; }
body.layout-5 .cta-band__inner { flex-direction: column; text-align: center; }
body.layout-5 .cta-band p { margin-inline: auto; }

/* =========================================================
   5. Blog
   ========================================================= */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (max-width: 960px) { .blog-layout { grid-template-columns: 1fr; } }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
body.layout-3 .post-card { background: transparent; border: 0; border-top: 1px solid var(--ink); border-radius: 0; }
.post-card__media img, .post-card__placeholder { width: 100%; aspect-ratio: 3/2; object-fit: cover; display: grid; place-items: center; background: var(--surface); color: var(--brand); }
.post-card__body { padding: 20px 22px 24px; }
body.layout-3 .post-card__body { padding-inline: 0; }
.post-card__title { font-size: 1.3rem; margin: .3em 0 .5em; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { text-decoration: underline; }
.post-card p { color: var(--muted); margin: 0; font-size: 1rem; }
.post-meta { font-size: .9rem; color: var(--muted); margin: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.post-meta__cats::before { content: "·"; margin-right: 6px; }
.page-hero--post .post-meta { margin-top: 1rem; }
.entry-content--post { max-width: 46rem; }
.post-hero-img img { border-radius: var(--radius-lg); margin-bottom: 2rem; }
.post-nav { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.5rem; font-size: .95rem; color: var(--muted); }
.post-nav div:last-child { text-align: right; }
.post-nav a { font-weight: 700; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.pagination .current { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }

.blog-aside .widget { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.blog-aside .widget ul { list-style: none; padding: 0; margin: 0; }
.blog-aside .widget li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.blog-aside .widget li:last-child { border: 0; }
.blog-aside .widget-title { font-size: 1.15rem; }
.widget--call { background: var(--dark) !important; color: var(--dark-ink); }
.widget--call .widget-title { color: #fff; }
body.layout-2 .widget--call .btn { color: var(--ink); }

.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-field, .dow-form input, .dow-form select, .dow-form textarea, .comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea {
	width: 100%; font: inherit; color: var(--ink); background: var(--bg);
	border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
body.layout-4 .search-field, body.layout-4 .dow-form input, body.layout-4 .dow-form select, body.layout-4 .dow-form textarea { border-radius: 14px; }
.search-submit, .comment-form .submit { font: 700 1rem var(--font-body); background: var(--brand); color: var(--brand-ink); border: 0; border-radius: var(--radius); padding: 12px 18px; cursor: pointer; }
.empty { background: var(--surface); border-radius: var(--radius-lg); padding: 40px; }

/* =========================================================
   6. Contact page
   ========================================================= */
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
.contact__list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 20px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__list .dow-icon { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--surface); color: var(--brand); }
.contact__list span { display: flex; flex-direction: column; }
.contact__list strong { font-size: .95rem; }
.contact__form { background: var(--surface); padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg); }
body.layout-3 .contact__form { background: var(--surface); border: 1px solid var(--line); }
.contact__form h2 { font-size: 1.6rem; }
.contact__map { margin-top: clamp(40px, 6vw, 72px); }
.contact__map iframe { width: 100%; height: 380px; border: 0; border-radius: var(--radius-lg); background: var(--surface); }
.dow-form { display: grid; gap: 16px; }
.dow-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.dow-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .dow-form__row { grid-template-columns: 1fr; } }
.dow-form .btn { justify-self: start; }
.dow-form__notice { padding: 12px 16px; border-radius: var(--radius); margin: 0; }
.dow-form__notice.is-ok { background: #e3f6ee; color: #145c3e; }
.dow-form__notice.is-err { background: #fde8e8; color: #8a1c1c; }

/* =========================================================
   7. Footer
   ========================================================= */
.site-footer { background: var(--ink); color: color-mix(in srgb, #fff 78%, var(--ink)); padding: clamp(56px, 7vw, 88px) 0 0; font-size: .975rem; }
body.layout-3 .site-footer { background: #1c2b24; }
body.layout-5 .site-footer { background: var(--brand-deep); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1.2fr; gap: 40px; }
@media (max-width: 960px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer__name { font-family: var(--font-head); font-weight: var(--head-weight); color: #fff; font-size: 1.4rem; margin-bottom: .6em; letter-spacing: var(--head-track); }
.site-footer__heading { color: #fff; font-family: var(--font-body); font-size: 1rem; font-weight: 700; letter-spacing: 0; margin-bottom: 1em; }
.site-footer .menu { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer address { font-style: normal; line-height: 1.8; }
.social { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; gap: 16px; flex-wrap: wrap; }
.social a { text-decoration: underline; }
.badges { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badges img { height: 40px; width: auto; border-radius: 6px; background: #fff; }
.site-footer__legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .14); margin-top: 56px; padding-top: 22px; padding-bottom: 28px; font-size: .875rem; }
.site-footer__legal p { margin: 0; }

.call-fab { display: none; }
@media (max-width: 720px) {
	.call-fab {
		display: grid; place-items: center; position: fixed; right: 16px; bottom: 16px; z-index: 60;
		width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
		box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45);
	}
	body.layout-2 .call-fab { background: var(--brand); color: var(--ink); }
}

/* =========================================================
   8. HOMEPAGE — Layout 1 · Enamel
   ========================================================= */
.l1-hero { padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 104px); background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); }
.l1-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.l1-hero h1 { color: var(--brand-deep); }
.l1-hero .badges img { height: 36px; border: 1px solid var(--line); }
.l1-hero .badges { margin-top: 2.25rem; }
.l1-hero__media { position: relative; }
.l1-hero__media img { width: 100%; aspect-ratio: 5/4; object-fit: cover; border-radius: var(--radius-lg); background: var(--surface); }
.l1-hero__quote {
	position: absolute; left: -28px; bottom: 28px; max-width: 290px; background: var(--bg); border-radius: var(--radius);
	padding: 18px 20px; box-shadow: 0 24px 48px -20px rgba(11, 79, 124, .45); border: 1px solid var(--line);
}
.l1-hero__quote p { margin: 0 0 6px; font-weight: 700; line-height: 1.4; }
.l1-hero__quote span { font-size: .875rem; color: var(--muted); }
@media (max-width: 900px) {
	.l1-hero__grid { grid-template-columns: 1fr; }
	.l1-hero__quote { position: static; margin-top: -40px; margin-left: 16px; position: relative; }
}

.l1-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1000px) { .l1-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .l1-cards { grid-template-columns: 1fr; } }
.l1-card { display: flex; flex-direction: column; padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); transition: border-color .15s, background-color .15s; }
.l1-card:hover { border-color: var(--brand); background: var(--surface-2); color: var(--ink); }
.l1-card__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--surface); color: var(--accent); margin-bottom: 20px; }
.l1-card p { color: var(--muted); font-size: 1rem; flex: 1; }
.l1-card__more { font-weight: 700; color: var(--brand); }

.l1-story { background: var(--surface-2); border-block: 1px solid var(--line); }
.l1-story__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.l1-story__aside { position: sticky; top: 110px; display: grid; gap: 20px; }
.l1-story__aside img { border-radius: var(--radius-lg); width: 100%; background: var(--surface); }
.l1-story__card { background: var(--brand); color: var(--brand-ink); border-radius: var(--radius-lg); padding: 28px; }
.l1-story__card h3 { color: #fff; }
.l1-story__card .btn { background: #fff; color: var(--brand); border-color: #fff; }
@media (max-width: 900px) { .l1-story__grid { grid-template-columns: 1fr; } .l1-story__aside { position: static; } }

.l1-why__grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.l1-why__grid li { padding: 32px 32px 32px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
.l1-why__grid li:nth-child(odd) { border-right: 1px solid var(--line); }
.l1-why__grid li:nth-child(even) { padding-left: 32px; }
.l1-why__tick { grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; }
.l1-why__grid p { color: var(--muted); margin: 0; grid-column: 2; }
.l1-why__grid h3 { grid-column: 2; }
@media (max-width: 760px) {
	.l1-why__grid { grid-template-columns: 1fr; }
	.l1-why__grid li:nth-child(odd) { border-right: 0; }
	.l1-why__grid li:nth-child(even) { padding-left: 0; }
}
.l1-work { padding-top: 0; }

.l1-testimonials { background: var(--surface); }
.l1-quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
@media (max-width: 900px) { .l1-quotes { grid-template-columns: 1fr; } }
.l1-quote { background: var(--bg); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
.l1-quote blockquote { margin: 0 0 20px; font-size: 1.05rem; }
.l1-quote figcaption { display: flex; gap: 12px; align-items: center; font-size: .9rem; color: var(--muted); }
.l1-quote figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.l1-quote figcaption span { display: flex; flex-direction: column; }
.l1-quote strong { color: var(--ink); }

/* =========================================================
   9. HOMEPAGE — Layout 2 · Operatory
   ========================================================= */
.l2-hero {
	position: relative; color: var(--dark-ink); background: var(--dark);
	background-image: linear-gradient(90deg, rgba(19, 35, 58, .96) 0%, rgba(19, 35, 58, .82) 45%, rgba(19, 35, 58, .35) 100%), var(--hero-img);
	background-size: cover; background-position: center;
	padding-top: clamp(72px, 11vw, 160px);
}
.l2-hero h1 { color: #fff; max-width: 15ch; font-size: clamp(2.5rem, 6vw, 4.6rem); }
.l2-hero .lead { color: var(--dark-ink); }
.l2-hero__inner { padding-bottom: clamp(64px, 9vw, 128px); }
.l2-hero__strip { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(220, 232, 242, .25); }
.l2-hero__strip p { margin: 0; padding: 22px 24px 26px 0; font-size: .975rem; color: var(--dark-ink); }
.l2-hero__strip p + p { padding-left: 24px; border-left: 1px solid rgba(220, 232, 242, .25); }
@media (max-width: 760px) {
	.l2-hero__strip { grid-template-columns: 1fr; }
	.l2-hero__strip p + p { border-left: 0; padding-left: 0; border-top: 1px solid rgba(220, 232, 242, .2); }
	.l2-hero__strip p { padding: 14px 0; }
}

.l2-kicker-title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.2em; }
.l2-rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.l2-rows a {
	display: grid; grid-template-columns: 180px minmax(0, 1.1fr) minmax(0, 1.4fr) 48px; gap: clamp(16px, 3vw, 40px); align-items: center;
	padding: 28px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none;
}
.l2-rows img { width: 180px; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.l2-rows h3 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.75rem); }
.l2-rows p { margin: 0; color: var(--muted); }
.l2-rows__go { color: var(--ink); justify-self: end; transition: transform .15s; }
.l2-rows a:hover { color: var(--ink); }
.l2-rows a:hover .l2-rows__go { transform: translateX(6px); }
.l2-rows a:hover h3 { text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 3px; text-underline-offset: 6px; }
@media (max-width: 860px) {
	.l2-rows a { grid-template-columns: 96px 1fr; }
	.l2-rows img { width: 96px; grid-row: span 2; }
	.l2-rows__go { display: none; }
}

.l2-story { background: var(--surface); }
.l2-story__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.l2-story__img { position: sticky; top: 110px; }
.l2-story__img img { width: 100%; border-radius: var(--radius-lg); background: var(--surface-2); }
@media (max-width: 900px) { .l2-story__grid { grid-template-columns: 1fr; } .l2-story__img { position: static; } }

.l2-why { background: var(--dark); color: var(--dark-ink); }
.l2-why h2 { color: #fff; margin-bottom: 1.4em; }
.l2-why__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.l2-why__grid li { border-top: 3px solid var(--brand); padding-top: 24px; }
.l2-why__grid h3 { color: #fff; }
.l2-why__grid p { margin: 0; font-size: 1rem; opacity: .85; }
@media (max-width: 960px) { .l2-why__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .l2-why__grid { grid-template-columns: 1fr; } }

.l2-quote__inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); }
.l2-quote__inner > figure blockquote { margin: 0; font-family: var(--font-head); font-size: clamp(1.5rem, 2.8vw, 2.25rem); line-height: 1.3; letter-spacing: -0.02em; font-weight: 500; }
.l2-quote__inner > figure blockquote p::before { content: "“"; color: var(--brand-deep); }
.l2-quote__inner > figure blockquote p::after { content: "”"; color: var(--brand-deep); }
.l2-quote__inner > figure figcaption { display: flex; gap: 16px; align-items: center; margin-top: 28px; color: var(--muted); }
.l2-quote__inner > figure figcaption img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.l2-quote__inner > figure figcaption span { display: flex; flex-direction: column; }
.l2-quote__inner > figure figcaption strong { color: var(--ink); }
.l2-quote__more { display: grid; gap: 24px; align-content: start; }
.l2-quote__more figure { background: var(--surface); padding: 24px; border-radius: var(--radius-lg); border-left: 4px solid var(--brand); }
.l2-quote__more blockquote { margin: 0 0 12px; }
.l2-quote__more figcaption { font-size: .95rem; color: var(--muted); }
@media (max-width: 900px) { .l2-quote__inner { grid-template-columns: 1fr; } }
.l2-work { padding-top: 0; }

/* =========================================================
   10. HOMEPAGE — Layout 3 · Practice Journal
   ========================================================= */
body.layout-3 .masthead { background: var(--bg); }
.l3-hero { padding: clamp(48px, 7vw, 96px) 0 0; }
.l3-hero__top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end; padding-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--ink); }
.l3-hero h1 { font-size: clamp(2.75rem, 7vw, 5.6rem); line-height: .98; font-weight: 400; letter-spacing: -0.03em; margin: 0; }
.l3-hero .lead { color: var(--muted); font-size: 1.1rem; }
.l3-hero .actions { margin-top: 1.25rem; gap: 20px; }
.l3-hero__media { margin-top: clamp(28px, 4vw, 48px); }
.l3-hero__media img { width: 100%; aspect-ratio: 21/9; object-fit: cover; background: var(--surface-2); }
.l3-hero__media figcaption { font-size: .9rem; color: var(--muted); padding-top: 10px; font-style: italic; font-family: var(--font-head); font-size: 1.05rem; }
@media (max-width: 860px) { .l3-hero__top { grid-template-columns: 1fr; } .l3-hero__media img { aspect-ratio: 4/3; } }

.l3-services__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: clamp(24px, 5vw, 80px); }
.l3-services h2 { font-size: clamp(2rem, 3.6vw, 2.75rem); }
.l3-index { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.l3-index li { border-top: 1px solid var(--line); padding: 24px 0 28px; }
.l3-index li:nth-child(-n+2) { border-top-color: var(--ink); }
.l3-index h3 { font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 500; margin-bottom: .35em; }
.l3-index h3 a { color: var(--ink); text-decoration: none; }
.l3-index h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.l3-index p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .l3-services__grid, .l3-index { grid-template-columns: 1fr; } }

.l3-article { background: var(--surface); }
.l3-article__grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.l3-prose h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 400; }
.l3-prose > p:first-of-type::first-letter { font-family: var(--font-head); float: left; font-size: 4.2em; line-height: .82; padding: 6px 10px 0 0; color: var(--brand); }
.l3-article__aside { display: grid; gap: 32px; align-content: start; position: sticky; top: 110px; }
.l3-pull { margin: 0; border-top: 3px solid var(--accent); padding-top: 20px; }
.l3-pull p { font-family: var(--font-head); font-size: 1.6rem; line-height: 1.3; font-style: italic; margin-bottom: 14px; }
.l3-pull footer { color: var(--muted); font-size: .95rem; }
.l3-article__aside img { width: 100%; background: var(--surface-2); }
@media (max-width: 900px) { .l3-article__grid { grid-template-columns: 1fr; } .l3-article__aside { position: static; } }

.l3-why h2 { margin-bottom: 1em; }
.l3-why__list { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
.l3-why__list div { border-top: 1px solid var(--ink); padding-top: 18px; }
.l3-why__list dt { font-family: var(--font-head); font-size: 1.35rem; font-weight: 500; margin-bottom: .5em; line-height: 1.25; }
.l3-why__list dd { margin: 0; color: var(--muted); font-size: 1rem; }
@media (max-width: 960px) { .l3-why__list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .l3-why__list { grid-template-columns: 1fr; } }

.l3-work { padding-top: 0; }
.l3-work__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto; gap: 16px; margin-top: 1.5rem; }
.l3-work__grid figure.is-wide { grid-row: span 2; }
.l3-work__grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 500/336; background: var(--surface-2); }
.l3-work__grid figure.is-wide img { aspect-ratio: auto; }
@media (max-width: 760px) { .l3-work__grid { grid-template-columns: 1fr 1fr; } .l3-work__grid figure.is-wide { grid-column: span 2; grid-row: auto; } }

.l3-quotes { background: var(--brand); color: var(--brand-ink); }
.l3-quotes h2 { color: #fff; }
.l3-quotes a { color: #fff; }
.l3-quotes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); margin: 2rem 0; }
.l3-quotes blockquote { margin: 0 0 16px; }
.l3-quotes blockquote p { font-family: var(--font-head); font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.35; }
.l3-quotes figcaption { opacity: .8; }
@media (max-width: 760px) { .l3-quotes__grid { grid-template-columns: 1fr; } }
body.layout-3 .l3-quotes + .cta-band { border-top: 1px solid rgba(255,255,255,.18); }

/* =========================================================
   11. HOMEPAGE — Layout 4 · Bright Smile
   ========================================================= */
.l4-hero { position: relative; background: var(--brand); color: #fff; padding: clamp(48px, 7vw, 96px) 0 clamp(96px, 10vw, 140px); overflow: hidden; }
.l4-hero::before { content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: -220px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 30%, var(--brand)); }
.l4-hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.l4-hero h1 { color: #fff; font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: .98; }
.l4-hero .lead { color: rgba(255, 255, 255, .88); }
.l4-hero__arch img { width: 100%; aspect-ratio: 4/4.4; object-fit: cover; border-radius: 999px 999px var(--radius-lg) var(--radius-lg); background: var(--brand-deep); border: 8px solid var(--accent); }
.l4-hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; fill: var(--bg); }
@media (max-width: 860px) {
	.l4-hero__grid { grid-template-columns: 1fr; }
	.l4-hero__arch { max-width: 360px; }
	.l4-hero__arch img { aspect-ratio: 1; }
}

.l4-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.l4-tile { background: var(--surface); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 44px); text-decoration: none; color: var(--ink); display: grid; grid-template-columns: 72px 1fr; column-gap: 24px; transition: background-color .15s; }
.l4-tile:nth-child(2), .l4-tile:nth-child(3) { background: color-mix(in srgb, var(--accent) 28%, #fff); }
.l4-tile:hover { background: var(--brand); color: #fff; }
.l4-tile:hover h3 { color: #fff; }
.l4-tile__icon { grid-row: span 2; width: 72px; height: 72px; border-radius: 50%; background: #fff; color: var(--brand); display: grid; place-items: center; }
.l4-tile h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin: 8px 0 .3em; }
.l4-tile p { margin: 0; font-size: 1.05rem; }
@media (max-width: 760px) { .l4-tiles { grid-template-columns: 1fr; } .l4-tile { grid-template-columns: 1fr; } .l4-tile__icon { margin-bottom: 16px; grid-row: auto; } }

.l4-why { background: var(--ink); color: #dfe3ff; border-radius: var(--radius-lg); margin-inline: var(--gutter); }
.l4-why__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.l4-why h2 { color: #fff; font-size: clamp(2rem, 4vw, 3.25rem); }
.l4-why img { border-radius: var(--radius-lg); margin-top: 2rem; width: 100%; background: var(--brand-deep); }
.l4-why ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.l4-why li { display: flex; gap: 20px; }
.l4-why li > span { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--ink); display: grid; place-items: center; }
.l4-why h3 { color: #fff; }
.l4-why p { margin: 0; opacity: .85; }
@media (max-width: 860px) { .l4-why__grid { grid-template-columns: 1fr; } }

.l4-story__body { max-width: 860px; }
.l4-story__body h2 { color: var(--brand); }

.l4-quotes { background: var(--surface); }
.l4-quotes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.l4-quotes figure { background: #fff; border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.l4-quotes img { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2); }
.l4-quotes blockquote { margin: 0; padding: 24px 24px 12px; font-size: 1.05rem; flex: 1; }
.l4-quotes figcaption { padding: 0 24px 24px; display: flex; flex-direction: column; color: var(--muted); font-size: .95rem; }
.l4-quotes figcaption strong { color: var(--brand); font-size: 1.05rem; }
@media (max-width: 900px) { .l4-quotes__grid { grid-template-columns: 1fr; } }
body.layout-4 .work-grid img { border-radius: var(--radius); }

/* =========================================================
   12. HOMEPAGE — Layout 5 · Referral
   ========================================================= */
.l5-hero { background: var(--surface); padding: clamp(56px, 9vw, 128px) 0 clamp(56px, 8vw, 104px); text-align: center; }
.l5-hero__inner { max-width: 960px; }
.l5-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1.02; color: var(--brand); }
.l5-hero .lead { margin-inline: auto; }
.l5-hero .actions { justify-content: center; }
.l5-trust { display: inline-flex; align-items: center; gap: 16px; margin-top: 2.5rem; padding: 10px 22px 10px 12px; background: var(--bg); border-radius: 999px; border: 1px solid var(--line); text-align: left; }
.l5-trust p { margin: 0; font-size: .95rem; color: var(--muted); }
.l5-faces { list-style: none; display: flex; margin: 0; padding: 0; }
.l5-faces li + li { margin-left: -14px; }
.l5-faces img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 3px solid var(--bg); background: var(--surface); }
@media (max-width: 560px) { .l5-trust { flex-direction: column; border-radius: var(--radius-lg); text-align: center; padding: 16px; } }

.l5-featured__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.l5-featured__img img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius-lg); background: var(--surface); }
.l5-featured__quote blockquote { margin: 0; }
.l5-featured__quote blockquote p { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.22; color: var(--brand); }
.l5-featured__quote blockquote p::before { content: "“"; display: block; font-size: 4rem; line-height: .6; color: var(--accent); margin-bottom: 10px; }
.l5-featured__quote figcaption { display: flex; flex-direction: column; color: var(--muted); margin-top: 1.5rem; padding-left: 16px; border-left: 3px solid var(--accent); }
.l5-featured__quote figcaption strong { color: var(--ink); font-size: 1.1rem; }
@media (max-width: 860px) { .l5-featured__grid { grid-template-columns: 1fr; } .l5-featured__img img { aspect-ratio: 4/3; } }

.l5-services { background: var(--surface-2); }
.l5-services__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.l5-service { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.l5-service:hover { border-color: var(--accent); color: var(--ink); }
.l5-service:hover h3 { color: var(--accent); }
.l5-service img { width: 200px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--surface); }
.l5-service h3 { font-family: var(--font-head); font-weight: 400; font-size: 1.6rem; margin-bottom: .3em; }
.l5-service p { color: var(--muted); margin: 0; font-size: 1rem; }
@media (max-width: 960px) { .l5-services__grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .l5-service { grid-template-columns: 1fr; } .l5-service img { width: 100%; aspect-ratio: 3/2; } }

.l5-quotes h2 { margin-bottom: 1.2em; }
.l5-quotes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 980px; margin: 0 auto 2rem; }
.l5-quotes figure { background: var(--surface); border-radius: var(--radius-lg); padding: 32px; display: flex; flex-direction: column; justify-content: space-between; }
.l5-quotes blockquote { margin: 0 0 20px; font-size: 1.1rem; }
.l5-quotes figcaption { display: flex; gap: 12px; align-items: center; font-size: .9rem; color: var(--muted); }
.l5-quotes figcaption img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.l5-quotes figcaption span { display: flex; flex-direction: column; }
.l5-quotes figcaption strong { color: var(--ink); }
@media (max-width: 760px) { .l5-quotes__grid { grid-template-columns: 1fr; } }

.l5-story { background: var(--surface-2); }
.l5-story__grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.l5-story aside { background: var(--brand); color: var(--dark-ink); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 40px); position: sticky; top: 110px; }
.l5-story aside h2 { color: #fff; font-size: 1.9rem; }
.l5-why { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.l5-why li { border-top: 1px solid rgba(247, 233, 238, .25); padding-top: 18px; }
.l5-why h3 { color: #fff; font-size: 1.1rem; }
.l5-why p { margin: 0; font-size: .975rem; opacity: .85; }
@media (max-width: 900px) { .l5-story__grid { grid-template-columns: 1fr; } .l5-story aside { position: static; } }
.l5-work h2 { margin-bottom: 1rem; }

/* =========================================================
   13. WordPress core classes
   ========================================================= */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-inline: auto; }
.wp-caption-text, figcaption.wp-element-caption { font-size: .9rem; color: var(--muted); }
.entry-content img { border-radius: var(--radius); }
.entry-content blockquote:not([class]) { border-left: 4px solid var(--accent); margin: 1.5em 0; padding: .25em 0 .25em 1.25em; font-size: 1.15rem; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.sticky, .bypostauthor, .gallery-caption { }
.comments { margin-top: 3rem; }
.comment-list { padding-left: 0; list-style: none; }
.comment-list .children { list-style: none; }
