/*
Theme Name: Precision Labs
Description: Lightweight custom theme for precisionlabtesting.com. No page builders.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: precisionlabs
*/

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin-var.woff2") format("woff2");
}

:root {
  --red: #c6151d;
  --red-700: #a11118;
  --red-50: #fdf1f1;
  --red-100: #fbe2e3;
  --ink: #14161b;
  --ink-2: #363a43;
  --muted: #5b616d;
  --line: #e8e3dd;
  --bg: #ffffff;
  --bg-soft: #f6f3ef;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(20 22 27 / 5%), 0 10px 30px rgb(20 22 27 / 7%);
  --shadow-lg: 0 2px 4px rgb(20 22 27 / 6%), 0 24px 60px rgb(20 22 27 / 14%);
  --container: 1200px;
  --prose: 720px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: var(--font);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 17px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip; /* the off-canvas mobile nav must not widen the page */
}
img, svg, video { max-width: 100%; height: auto; }
a { color: var(--red); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--red-700); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; margin: 1.6em 0 0.5em; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; font-optical-sizing: auto; }
h1 { font-size: clamp(2.3rem, 1.5rem + 3vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.6rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
p, ul, ol { margin: 0 0 1.1em; }
p { text-wrap: pretty; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--ink); color: #fff; border-radius: var(--radius-sm); }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn, .wp-block-button__link, .wp-element-button, button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 22px; border: 2px solid var(--red); border-radius: 999px;
  background: var(--red); color: #fff; font: 700 0.98rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover, .wp-block-button__link:hover, button[type="submit"]:hover { background: var(--red-700); border-color: var(--red-700); color: #fff; }
.btn--ghost, .is-style-outline .wp-block-button__link { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover, .is-style-outline .wp-block-button__link:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--ink-2); }
.on-dark .btn--ghost, .on-dark .is-style-outline .wp-block-button__link { color: #fff; border-color: rgb(255 255 255 / 40%); }
.on-dark .btn--ghost:hover, .on-dark .is-style-outline .wp-block-button__link:hover { background: rgb(255 255 255 / 10%); border-color: #fff; color: #fff; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0; }
.wp-block-button { margin: 0; }

/* ---------- Header ---------- */
.utility { background: var(--ink); color: #d9dbe0; font-size: 0.86rem; }
.utility .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; flex-wrap: wrap; }
.utility a { color: #fff; text-decoration: none; font-weight: 600; }
.utility a:hover { text-decoration: underline; color: #fff; }
.utility__links { display: flex; gap: 20px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .utility__tagline { display: none; }
  .utility .container { justify-content: center; }
  .utility__links { gap: 16px; justify-content: center; }
}
@media (max-width: 440px) { .utility__links a:nth-child(2) { display: none; } }

/* No backdrop-filter here: it would make the fixed mobile nav position against the header instead of the viewport. */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand img { display: block; width: 176px; height: auto; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__menu, .nav__menu ul { list-style: none; margin: 0; padding: 0; }
.nav__menu { display: flex; align-items: center; gap: 2px; }
.nav__menu > li { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.nav__menu .submenu-toggle--icon { padding: 10px 8px; margin-left: -10px; }
.nav__menu .submenu-toggle--icon:hover { background: none; }
.nav__menu a, .nav__menu .submenu-toggle {
  display: flex; align-items: center; gap: 6px; padding: 10px 12px; border: 0; background: none; border-radius: var(--radius-sm);
  color: var(--ink); font: 650 0.95rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.nav__menu a:hover, .nav__menu .submenu-toggle:hover, .nav__menu .current-menu-item > a, .nav__menu .current-menu-ancestor > a { color: var(--red); background: var(--red-50); }
.submenu-toggle svg { transition: transform 0.15s; }
.submenu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__menu .sub-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 280px; padding: 8px; display: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.nav__menu .sub-menu a { white-space: normal; font-weight: 600; padding: 10px 12px; }
.nav__menu li.is-open > .sub-menu { display: block; }
.nav__cta { margin-left: 8px; white-space: nowrap; }
.nav-toggle { display: none; }

@media (max-width: 1200px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line);
    border-radius: 999px; background: #fff; color: var(--ink); font: 700 0.95rem var(--font); cursor: pointer;
  }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(400px, 100%); flex-direction: column; align-items: stretch; gap: 16px;
    padding: 20px var(--gutter) 32px; background: #fff; box-shadow: var(--shadow); overflow-y: auto; transform: translateX(100%);
    visibility: hidden; transition: transform 0.2s, visibility 0.2s; z-index: 60; }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__close { align-self: flex-end; }
  .nav__menu { flex-direction: column; align-items: stretch; }
  .nav__menu > li { flex-wrap: wrap; }
  .nav__menu > li > a { flex: 1; }
  .nav__menu a, .nav__menu .submenu-toggle { justify-content: space-between; padding: 14px 12px; font-size: 1.05rem; white-space: normal; }
  .nav__menu > li > .submenu-toggle:not(.submenu-toggle--icon) { width: 100%; }
  .nav__menu .submenu-toggle--icon { margin-left: 0; padding: 14px; }
  .nav__menu .sub-menu { flex-basis: 100%; }
  .nav__menu .sub-menu { position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; }
  .nav__cta { margin: 8px 0 0; }
  /* Below .site-header (z 50), which contains the drawer, and above the page. */
  .nav-backdrop { position: fixed; inset: 0; background: rgb(21 23 28 / 40%); z-index: 45; }
}
@media (min-width: 1201px) { .nav__close, .nav-backdrop { display: none !important; } }

/* ---------- Page hero ---------- */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 5vw, 56px); }
.page-hero h1 { margin: 0; max-width: 22ch; }
.page-hero__lead { max-width: 60ch; margin: 14px 0 0; font-size: 1.12rem; color: var(--muted); }
.breadcrumbs { margin: 0 0 14px; font-size: 0.88rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.eyebrow, .wp-block-paragraph.eyebrow, p.eyebrow {
  display: inline-block; margin: 0 0 12px; color: var(--red); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}

/* ---------- Content sections (used by page block content) ---------- */
.site-main { display: block; }
.entry { padding: clamp(40px, 6vw, 72px) 0; }
.entry > .container > :first-child, .entry-content > :first-child { margin-top: 0; }
.entry-content { width: min(100% - 2 * var(--gutter), var(--prose)); margin-inline: auto; }
.entry-content.is-wide { width: auto; margin: 0; }
.is-wide > .section:first-child { padding-top: 0; }

.section { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; padding: clamp(36px, 5vw, 64px) 0; }
.section--soft, .section--dark, .section--red { width: 100%; padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2)); }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--ink); color: #c9ccd3; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark a:not(.wp-block-button__link) { color: #fff; }
.section--dark .eyebrow { color: #ff9ea2; }
.section--dark .cards { margin-top: 0; }
.section--red { background: var(--red); color: #fff; }
.section--red h2, .section--red h3 { color: #fff; }
.section--red a:not(.wp-block-button__link) { color: #fff; }
.section--red .wp-block-button__link { background: #fff; color: var(--red); border-color: #fff; }
.section--red .wp-block-button__link:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.section > h2:first-child, .section > .eyebrow + h2 { margin-top: 0; }
.section-intro { max-width: 62ch; color: var(--muted); font-size: 1.08rem; }
.section--dark .section-intro { color: #aeb2bb; }

.prose-narrow { max-width: var(--prose); }
.lead { font-size: 1.15rem; color: var(--ink-2); }

/* Cards */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 28px 0 0; }
.cards.wp-block-columns { display: grid; flex-wrap: initial; }
/* 3, 6 or 9 cards: three columns instead of an orphaned fourth-column row. */
.cards:has(> :nth-child(3):last-child), .cards:has(> :nth-child(6):last-child), .cards:has(> :nth-child(9):last-child) { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (min-width: 1000px) { .cards:has(> :nth-child(5):last-child) { grid-template-columns: repeat(3, 1fr); } }
.cards > .wp-block-column { flex-basis: auto !important; }
.card {
  position: relative; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:has(a.card__link):hover { border-color: #d9b8b9; box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card p + p { margin-top: 12px; }
.card .card__link { font-weight: 700; text-decoration: none; }
.card .card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card .wp-block-image, .card figure { margin: 0 0 14px; }
.card .wp-block-image img { width: 44px; height: 44px; object-fit: contain; }
.section--soft .card { background: #fff; }
.card--accent::before { content: ""; display: block; width: 36px; height: 4px; margin-bottom: 18px; border-radius: 2px; background: var(--red); }

/* Split layout: text + media */
.split.wp-block-columns { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin: 0; }
.split.is-reversed > :first-child { order: 2; }
.split > .wp-block-column { min-width: 0; }
.split .wp-block-image img, .media-rounded img { border-radius: var(--radius); display: block; width: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .split.wp-block-columns { grid-template-columns: 1fr; }
  .split.is-reversed > :first-child { order: 0; }
}

/* Check list */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 32px; margin: 0 0 10px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 20px; height: 20px; border-radius: 50%;
  background: var(--red-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23c6151d' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; }
.pill-list li { padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 650; color: var(--ink); }

/* Hours */
.hours-list { list-style: none; padding: 0; margin: 0; }
.hours-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours-list strong { color: var(--ink); }
.section--dark .hours-list li { border-color: rgb(255 255 255 / 12%); }
.section--dark .hours-list strong { color: #fff; }

/* Notices */
.notice { padding: 16px 18px; border-radius: var(--radius-sm); background: var(--red-50); border-left: 4px solid var(--red); color: var(--ink-2); }
.notice p:last-child { margin: 0; }
.notice--neutral { background: var(--bg-soft); border-left-color: var(--ink-2); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 750; color: var(--ink); font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; font-size: 1.5rem; line-height: 1; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details > :not(summary) { margin-top: 0; }

/* ---------- Prose (posts, simple pages) ---------- */
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 1.8em; }
.prose img { border-radius: var(--radius-sm); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.3em 0; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--red); color: var(--ink); font-size: 1.12rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 0.96rem; }
.prose th, .prose td { padding: 10px; border: 1px solid var(--line); text-align: left; }
.prose .alignleft { float: left; margin: 0.3em 1.5em 1em 0; }
.prose .alignright { float: right; margin: 0.3em 0 1em 1.5em; }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose figure { margin: 1.6em 0; }
.prose figcaption, .wp-caption-text { font-size: 0.88rem; color: var(--muted); }
.wp-caption { max-width: 100%; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; color: var(--muted); font-size: 0.92rem; }
.post-meta a { color: var(--muted); }
.post-cover { margin: -8px 0 32px; }
.post-cover img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); display: block; }

/* ---------- Blog list ---------- */
.post-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; position: relative; transition: box-shadow 0.15s, transform 0.15s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card__media { aspect-ratio: 16 / 9; background: var(--bg-soft); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card__meta { font-size: 0.85rem; color: var(--muted); }
.post-card h2 { font-size: 1.15rem; margin: 0; line-height: 1.35; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a::after { content: ""; position: absolute; inset: 0; }
.post-card p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 48px 0 0; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 700; }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--ink-2); }
.search-form { display: flex; gap: 8px; max-width: 520px; }
.search-form input[type="search"] { flex: 1; }
.related { margin-top: 56px; }

/* ---------- Forms ---------- */
.pl-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin: 8px 0 0; padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.pl-form .field { display: flex; flex-direction: column; gap: 6px; grid-column: span 2; }
.pl-form .field--half { grid-column: span 1; }
.pl-form label, .pl-form legend { font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.pl-form .req { color: var(--red); }
.pl-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.pl-form .choices { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; }
.pl-form .choices label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #cfcac4; border-radius: var(--radius-sm); background: #fff;
  color: var(--ink); font: 400 1rem/1.4 var(--font);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgb(198 21 29 / 25%); border-color: var(--red); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--red); }
.pl-form .field-error { color: var(--red-700); font-size: 0.88rem; font-weight: 600; }
.pl-form [aria-invalid="true"] { border-color: var(--red); }
.pl-form .form-note { grid-column: span 2; }
.pl-form .form-actions { grid-column: span 2; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pl-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 18px 20px; border-radius: var(--radius-sm); margin: 0 0 20px; font-weight: 650; }
.form-status--ok { background: #eef7ef; border-left: 4px solid #2e7d32; color: #1d4d20; }
.form-status--err { background: var(--red-50); border-left: 4px solid var(--red); color: var(--red-700); }
@media (max-width: 640px) {
  .pl-form { grid-template-columns: 1fr; }
  .pl-form .field, .pl-form .field--half, .pl-form .form-note, .pl-form .form-actions { grid-column: span 1; }
}

/* ---------- Footer ---------- */
.cta-band { background: var(--red); color: #fff; }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 44px 0; }
.cta-band h2 { color: #fff; margin: 0 0 4px; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); }
.cta-band p { margin: 0; color: #ffe1e2; }
.cta-band .btn { background: #fff; color: var(--red); border-color: #fff; }
.cta-band .btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.cta-band .btn--ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / 50%); }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.site-footer { background: var(--ink); color: #aeb2bb; font-size: 0.95rem; }
.site-footer a { color: #e3e5ea; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding: 64px 0 40px; }
.footer-grid h2 { color: #fff; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 0 0 9px; }
.footer-brand img { width: 170px; height: auto; display: block; margin-bottom: 16px; }
.footer-nap { font-style: normal; margin: 0 0 12px; line-height: 1.7; }
.footer-nap strong { color: #fff; }
.post-cta { margin: 48px 0 0; padding: 26px 28px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.post-cta h2 { margin: 0 0 8px; font-size: 1.25rem; }
.post-cta p { margin: 0 0 14px; color: var(--muted); }
.post-cta .wp-block-buttons { margin: 0; }
.footer-phone { display: inline-block; margin-top: 6px; font-size: 1.25rem; font-weight: 800; color: #fff !important; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid rgb(255 255 255 / 10%); font-size: 0.86rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: span 2; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } .footer-brand { grid-column: span 1; } }

/* ---------- 404 / misc ---------- */
.not-found { text-align: center; padding: 96px 0; }
.not-found .search-form { margin: 24px auto 0; }

/* ---------- Polish layer ---------- */

/* Icon tiles on cards: add "has-icon icon-<name>" to a card. */
.card.has-icon::before {
  content: ""; display: block; width: 50px; height: 50px; margin-bottom: 18px; border-radius: 14px;
  background: var(--red-50) var(--icon-red) center / 26px no-repeat;
}
.card { box-shadow: 0 1px 2px rgb(20 22 27 / 4%); }
.section--dark .card { background: rgb(255 255 255 / 4%); border-color: rgb(255 255 255 / 10%); box-shadow: none; }

/* Photos */
.split .wp-block-image img, .media-rounded img { aspect-ratio: 4 / 3; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.split .wp-block-image { position: relative; margin: 0; }
.split .wp-block-image::after { content: ""; position: absolute; inset: auto -14px -14px auto; width: 38%; height: 46%; border-radius: var(--radius); background: var(--red-100); z-index: -1; }
.split.is-reversed .wp-block-image::after { inset: auto auto -14px -14px; }
.split { isolation: isolate; }

/* Page header */
.page-hero { position: relative; overflow: hidden; background: var(--bg-soft); }
.page-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgb(198 21 29 / 9%) 1.5px, transparent 1.6px) 0 0 / 18px 18px;
  -webkit-mask: radial-gradient(circle, #000 40%, transparent 70%); mask: radial-gradient(circle, #000 40%, transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { max-width: 20ch; }

/* Section headings */
.section-head { max-width: 680px; margin: 0 0 8px; }
.section-head.is-centered, .is-centered { text-align: center; margin-inline: auto; }
.lead { font-size: 1.14rem; line-height: 1.7; }

/* Home hero */
.hero2 { position: relative; background: var(--bg-soft); overflow: hidden; }
.hero2::before { content: ""; position: absolute; left: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgb(198 21 29 / 10%) 1.5px, transparent 1.6px) 0 0 / 20px 20px; -webkit-mask: radial-gradient(circle, #000 35%, transparent 70%); mask: radial-gradient(circle, #000 35%, transparent 70%); }
.hero2 .container { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px); }
.hero2 h1 { margin: 0 0 20px; max-width: 15ch; }
.hero2 h1 em { font-style: normal; color: var(--red); }
.hero2__lead { font-size: 1.18rem; max-width: 52ch; margin: 0; color: var(--ink-2); }
.announcement { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 8px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.announcement span { padding: 3px 10px; border-radius: 999px; background: var(--red); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.hero2 .announcement { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgb(20 22 27 / 6%); border: 1px solid var(--line); }
.hero2 .announcement:hover { background: #fff; color: var(--red); }
.hero2__media { position: relative; }
.hero2__media img { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 24px; box-shadow: var(--shadow-lg); }
.quick { position: absolute; left: -36px; bottom: -36px; width: min(320px, 80%); padding: 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-lg); }
.quick__title { margin: 0 0 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.quick ul { list-style: none; margin: 0; padding: 0; }
.quick a { display: flex; align-items: center; gap: 12px; padding: 10px 8px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.quick a:hover { background: var(--bg-soft); color: var(--red); }
.quick a .icon { color: var(--red); }
.quick a .icon-arrow { margin-left: auto; color: var(--muted); width: 1em; height: 1em; }
.hero2 .wp-block-buttons { margin: 30px 0 0; }
@media (max-width: 900px) {
  .hero2 .container { grid-template-columns: 1fr; }
  .quick { position: static; width: auto; margin: 16px 0 0; box-shadow: var(--shadow); }
}

/* Trust bar */
.trustbar { border-block: 1px solid var(--line); background: #fff; }
.trustbar ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0 auto; padding: 0; }
.trustbar li { display: flex; align-items: center; gap: 14px; padding: 22px 20px; border-left: 1px solid var(--line); }
.trustbar li:first-child { border-left: 0; }
.trustbar .icon { width: 28px; height: 28px; color: var(--red); }
.trustbar strong { display: block; color: var(--ink); font-size: 0.98rem; }
.trustbar span { display: block; color: var(--muted); font-size: 0.86rem; line-height: 1.4; }
@media (max-width: 900px) { .trustbar ul { grid-template-columns: 1fr 1fr; } .trustbar li:nth-child(3) { border-left: 0; } .trustbar li { border-top: 1px solid var(--line); } .trustbar li:nth-child(-n+2) { border-top: 0; } }
@media (max-width: 520px) { .trustbar ul { grid-template-columns: 1fr; } .trustbar li { border-left: 0; border-top: 1px solid var(--line); } .trustbar li:first-child { border-top: 0; } }

/* Steps */
.steps { counter-reset: step; }
.steps .card { padding-top: 22px; }
.steps .card h3::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; margin-bottom: 10px; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; color: var(--red); }

/* Latest posts on the homepage */
.latest .post-grid { margin-top: 28px; }
.section-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.section-link .icon { width: 1em; height: 1em; }

/* Blog extras */
.post-card__meta { display: flex; gap: 10px; align-items: center; }
.post-card__cat { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.cat-chips a { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.cat-chips a:hover, .cat-chips a[aria-current="page"] { border-color: var(--red); color: var(--red); }
.toc { margin: 0 0 32px; padding: 20px 24px; border-radius: var(--radius-sm); background: var(--bg-soft); border: 1px solid var(--line); }
.toc strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 0.92rem; }
.toc ol { margin: 0; padding-left: 1.2em; font-size: 0.96rem; }
.toc li { margin: 4px 0; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--red); text-decoration: underline; }

/* Mobile call bar */
.callbar { display: none; }
@media (max-width: 720px) {
  .callbar { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgb(255 255 255 / 97%); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(20 22 27 / 8%); }
  .callbar .btn { min-height: 44px; padding: 8px 12px; font-size: 0.95rem; }
  body { padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
