/* PMR Digital Marketing Agency — main stylesheet (mobile-first, no build step).
   Colours live in :root so they are easy to replace when an official brand palette is confirmed. */
:root {
    --teal: #006B68;
    --teal-deep: #052E2D;
    --orange: #FF7900;
    --red: #E5231B;
    --ink: #14201F;
    --muted: #4A5857;
    --page: #FFFFFF;
    --surface: #F8F8F6;
    --border: #DADFDD;
    --success-bg: #E6F4EC; --success: #0B5D2E;
    --warning: #8A5A00;
    --error-bg: #FDECEA; --error: #A4160F;

    --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-sm: .9375rem; --fs-base: 1.0625rem; --fs-lg: 1.25rem;
    --fs-h3: 1.25rem; --fs-h2: clamp(1.6rem, 1.2rem + 1.8vw, 2.25rem); --fs-h1: clamp(2rem, 1.3rem + 3.2vw, 3.5rem);

    --sp-1: .5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2.5rem; --sp-5: 4rem; --sp-6: 6rem;
    --radius-s: .375rem; --radius: .75rem; --radius-l: 1.25rem;
    --shadow: 0 10px 30px rgba(5, 46, 45, .12);
    --container: 72rem; --narrow: 46rem;
    --t: .18s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.65; color: var(--ink); background: var(--page); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--sp-2); letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -.01em; }
p { margin: 0 0 var(--sp-2); }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
main:focus { outline: none; }
code { background: var(--surface); padding: .1em .35em; border-radius: var(--radius-s); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.narrow { max-width: calc(var(--narrow) + 2.5rem); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: var(--radius-s); }
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: .65rem 1.25rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: var(--fs-sm); line-height: 1.2; text-decoration: none; cursor: pointer; text-align: center; transition: background var(--t), color var(--t), border-color var(--t), transform var(--t); }
.btn-lg { min-height: 3.25rem; padding: .8rem 1.75rem; font-size: 1rem; }
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: #FF8F2B; color: var(--ink); transform: translateY(-1px); }
.btn-secondary { background: var(--teal); color: #fff; }
.btn-secondary:hover { background: var(--teal-deep); color: #fff; }
.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.14); color: inherit; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--border); }
.header-bar { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: var(--sp-2); }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; background: var(--teal); color: #fff; font-weight: 900; letter-spacing: .02em; border-radius: .6rem; padding: .35rem .6rem; line-height: 1; border-bottom: 4px solid var(--orange); }
.brand-text { font-weight: 700; font-size: .85rem; line-height: 1.15; max-width: 7rem; }
.brand-light { color: #fff; }
.brand-light .brand-mark { background: #fff; color: var(--teal); }

.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.9rem; height: 2.9rem; border: 2px solid var(--ink); border-radius: var(--radius-s); background: #fff; cursor: pointer; color: var(--ink); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1.25rem; height: 2px; background: currentColor; transition: transform var(--t), opacity var(--t); content: ""; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* mobile menu = stacked panel under the header bar */
.site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); max-height: calc(100vh - 4rem); max-height: calc(100dvh - 4rem); overflow-y: auto; padding: var(--sp-2) 1.25rem var(--sp-3); box-shadow: var(--shadow); }
.site-nav.is-open { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-link { display: block; padding: .85rem 0; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border); }
.nav-link:hover { color: var(--teal); }
.nav-link[aria-current="page"] { color: var(--teal); box-shadow: inset 3px 0 0 var(--orange); padding-left: .75rem; }
.nav-split { display: flex; align-items: stretch; }
.nav-split .nav-link { flex: 1; }
.mega-toggle { flex: none; width: 3rem; display: inline-flex; align-items: center; justify-content: center; border: 0; border-bottom: 1px solid var(--border); background: none; color: var(--ink); cursor: pointer; }
.mega-toggle .chev { transition: transform var(--t); }
.mega-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-cta { width: 100%; margin-top: var(--sp-2); }

/* mega menu — mobile accordion */
.mega { padding: var(--sp-2) 0; }
.mega .container { padding-inline: 0; }
.mega-grid { display: grid; gap: var(--sp-2); }
.mega-group { border-left: 5px solid var(--teal); padding: .25rem 0 .25rem var(--sp-2); }
.mega-orange { border-left-color: var(--orange); }
.mega-red { border-left-color: var(--red); }
.mega-ink { border-left-color: var(--ink); }
.mega-title { font-size: 1.05rem; margin: 0 0 .25rem; letter-spacing: 0; }
.mega-title a { color: var(--ink); text-decoration: none; }
.mega-title a:hover { text-decoration: underline; }
.mega-desc { font-size: var(--fs-sm); color: var(--muted); margin-bottom: .5rem; }
.sub-toggle { min-height: 2.75rem; padding: .4rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink); cursor: pointer; }
.sub-toggle[aria-expanded="true"] { background: #fff; border-color: var(--ink); }
.mega-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.mega-list.is-collapsed { display: none; }
.mega-list a { display: block; padding: .6rem 0; min-height: 2.75rem; color: var(--ink); text-decoration: none; font-size: var(--fs-sm); border-bottom: 1px solid var(--border); }
.mega-list a:hover { color: var(--teal); text-decoration: underline; }
.mega-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-top: var(--sp-2); }
.mega-all { font-weight: 700; }

@media (min-width: 60em) {
    .nav-toggle { display: none; }
    .site-nav { display: flex; position: static; align-items: center; gap: var(--sp-2); padding: 0; border: 0; box-shadow: none; max-height: none; overflow: visible; background: none; }
    .nav-list { display: flex; align-items: center; gap: .25rem; }
    .nav-link { border: 0; padding: .6rem .8rem; border-radius: var(--radius-s); }
    .nav-link[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--orange); padding-left: .8rem; border-radius: 0; }
    .nav-split .nav-link { flex: none; padding-right: .25rem; }
    .mega-toggle { width: 2.5rem; border: 0; border-radius: var(--radius-s); }
    .mega-toggle:hover { background: var(--surface); }
    .nav-cta { width: auto; margin: 0; }

    .mega { position: absolute; top: 100%; left: 0; right: 0; z-index: 110; background: #fff; border-top: 1px solid var(--border); border-bottom: 4px solid var(--teal); box-shadow: var(--shadow); padding: var(--sp-3) 0 var(--sp-3); max-height: calc(100vh - 5rem); overflow-y: auto; }
    .mega .container { padding-inline: 1.25rem; max-width: 84rem; }
    .mega-grid { grid-template-columns: repeat(4, 1fr); gap: var(--sp-3); }
    .mega-desc { font-size: .875rem; line-height: 1.45; }
    .sub-toggle { display: none; }
    .mega-list, .mega-list.is-collapsed { display: block; }
    .mega-list a { padding: .22rem 0; min-height: 0; border: 0; font-size: .9rem; line-height: 1.35; }
    .mega-foot { margin-top: var(--sp-3); padding-top: var(--sp-2); border-top: 1px solid var(--border); }
}
@media (max-width: 22em) { .brand-text { display: none; } }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { background: var(--surface); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.breadcrumbs ol { list-style: none; margin: 0; padding: .65rem 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--muted); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs [aria-current] { font-weight: 700; }

/* ---------- Hero ---------- */
.hero, .page-hero { color: #fff; background: radial-gradient(60rem 30rem at 95% -10%, rgba(255,121,0,.35), transparent 60%), radial-gradient(40rem 25rem at -10% 110%, rgba(229,35,27,.28), transparent 60%), linear-gradient(135deg, var(--teal-deep), var(--teal)); }
.hero { padding: var(--sp-5) 0; }
.hero-grid { display: grid; gap: var(--sp-4); align-items: center; }
.hero h1 { max-width: 16em; }
.lead { font-size: var(--fs-lg); max-width: 38rem; opacity: .96; }
.hero-index { display: grid; gap: .75rem; }
.hero-band { display: block; background: #fff; color: var(--ink); text-decoration: none; padding: 1rem 1.25rem; border-radius: var(--radius); border-left: 10px solid var(--teal); transition: transform var(--t), box-shadow var(--t); }
.hero-band:hover { transform: translateX(4px); box-shadow: var(--shadow); color: var(--ink); }
.band-orange { border-left-color: var(--orange); }
.band-red { border-left-color: var(--red); }
.band-ink { border-left-color: var(--ink); }
.band-name { display: block; font-weight: 800; font-size: 1.1rem; }
.band-text { display: block; font-size: var(--fs-sm); color: var(--muted); }
@media (min-width: 60em) { .hero { padding: var(--sp-6) 0; } .hero-grid { grid-template-columns: 1.15fr 1fr; gap: var(--sp-5); } }

.page-hero { padding: var(--sp-5) 0 var(--sp-4); border-bottom: 6px solid var(--orange); }
.page-hero-orange { border-bottom-color: var(--orange); }
.page-hero-red { border-bottom-color: var(--red); }
.page-hero-teal { border-bottom-color: #4FD1C5; }
.page-hero-ink { border-bottom-color: #fff; }
.page-hero h1 { max-width: 20em; }

/* ---------- Sections & content ---------- */
.section { padding: var(--sp-5) 0; }
.section-tint { background: var(--surface); }
.section-head { max-width: var(--narrow); margin-bottom: var(--sp-4); }
.section-head p { color: var(--muted); font-size: var(--fs-lg); }
.split { display: grid; gap: var(--sp-3); }
@media (min-width: 60em) { .split { grid-template-columns: 1fr 1.4fr; gap: var(--sp-5); } .split-even { grid-template-columns: 1fr 1fr; } }
.prose h2 { margin-top: var(--sp-4); font-size: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.note { background: #FFF6E8; border-left: 5px solid var(--orange); padding: var(--sp-2); border-radius: var(--radius-s); font-size: var(--fs-sm); }
.faq-title { margin-top: var(--sp-5); }

.card-grid { display: grid; gap: var(--sp-3); }
@media (min-width: 48em) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
.card { background: #fff; border: 1px solid var(--border); border-top: 8px solid var(--teal); border-radius: var(--radius); padding: var(--sp-3); display: flex; flex-direction: column; }
.card-orange { border-top-color: var(--orange); }
.card-red { border-top-color: var(--red); }
.card-ink { border-top-color: var(--ink); }
.card h2, .card h3 { font-size: 1.4rem; }
.card h2 a, .card h3 a { color: var(--ink); text-decoration: none; }
.card h2 a:hover, .card h3 a:hover { text-decoration: underline; }
.card > p { color: var(--muted); }
.text-link { margin-top: auto; padding-top: var(--sp-1); font-weight: 700; }

.tick-list, .problem-list, .plain-list { list-style: none; margin: 0 0 var(--sp-2); padding: 0; }
.tick-list li { position: relative; padding: .25rem 0 .25rem 1.75rem; }
.tick-list li::before { content: ""; position: absolute; left: 0; top: .75em; width: .9rem; height: .5rem; border-left: 3px solid var(--teal); border-bottom: 3px solid var(--teal); transform: translateY(-50%) rotate(-45deg); }
.problem-list li { padding: .85rem 0; border-bottom: 1px solid var(--border); }
.problem-list li:first-child { padding-top: 0; }

.area-grid { display: grid; gap: var(--sp-2); }
@media (min-width: 48em) { .area-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .area-grid { grid-template-columns: repeat(3, 1fr); } }
.area { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-2) var(--sp-3); scroll-margin-top: 6rem; }
.area h3 { font-size: 1.1rem; }
.area p { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.area:target { outline: 3px solid var(--orange); }

/* process: a real sequence, so numbers are meaningful */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.steps li { counter-increment: step; position: relative; padding-left: 3.5rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; font-weight: 800; }
.steps h3 { margin-bottom: .25rem; font-size: 1.15rem; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 60em) { .steps:not(.steps-compact) { grid-template-columns: repeat(4, 1fr); } .steps:not(.steps-compact) li { padding: 3.5rem 0 0; } }

.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; background: #fff; }
.compare th, .compare td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare thead th { background: var(--teal); color: #fff; }
.compare tbody th { font-weight: 600; }

/* FAQ — native details/summary: works without JavaScript */
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 1rem 2rem 1rem 0; font-weight: 700; position: relative; list-style: none; min-height: 2.75rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .8rem; font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); padding-right: 2rem; }

.cta-band { background: var(--ink); color: #fff; padding: var(--sp-4) 0; border-top: 6px solid var(--orange); }
.cta-inner { display: grid; gap: var(--sp-3); align-items: center; }
.cta-band h2 { font-size: 1.6rem; margin-bottom: .5rem; }
.cta-band p { margin: 0; max-width: 40rem; opacity: .92; }
@media (min-width: 48em) { .cta-inner { grid-template-columns: 1fr auto; } }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 60em) { .contact-grid { grid-template-columns: 1.5fr 1fr; gap: var(--sp-5); } }
.form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: var(--sp-3); }
.field { margin-bottom: var(--sp-2); }
.field-row { display: grid; gap: 0 var(--sp-2); }
@media (min-width: 40em) { .field-row { grid-template-columns: 1fr 1fr; } }
.form label { display: block; font-weight: 700; margin-bottom: .35rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form select, .form textarea { width: 100%; min-height: 2.9rem; padding: .65rem .8rem; font: inherit; color: var(--ink); background: #fff; border: 2px solid #7B8886; border-radius: var(--radius-s); }
.form textarea { min-height: 9rem; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--orange); outline-offset: 1px; border-color: var(--ink); }
.form [aria-invalid="true"] { border-color: var(--error); background: var(--error-bg); }
.field-check { display: grid; grid-template-columns: auto 1fr; gap: 0 .75rem; align-items: start; }
.field-check input { width: 1.4rem; height: 1.4rem; margin-top: .2rem; accent-color: var(--teal); }
.field-check label { font-weight: 400; margin: 0; }
.field-check .field-error { grid-column: 1 / -1; }
.hint, .form-note { font-size: var(--fs-sm); color: var(--muted); margin: .35rem 0 0; }
.field-error { color: var(--error); font-weight: 700; font-size: var(--fs-sm); margin: .35rem 0 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: var(--sp-2) var(--sp-3); border-radius: var(--radius); margin-bottom: var(--sp-3); border-left: 6px solid; }
.alert:focus { outline: 3px solid var(--orange); }
.alert p { margin: 0; font-weight: 700; }
.alert ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.alert-success { background: var(--success-bg); border-color: var(--success); color: #073D1E; }
.alert-error { background: var(--error-bg); border-color: var(--error); color: #6E0E09; }
.alert-error a { color: inherit; }
.contact-side { background: var(--surface); border-radius: var(--radius); padding: var(--sp-3); align-self: start; }
.contact-side h2 { font-size: 1.25rem; }
.plain-steps { padding-left: 1.2rem; margin: 0 0 var(--sp-3); }
.plain-list li { margin-bottom: .5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-deep); color: #E6EFEE; padding: var(--sp-5) 0 var(--sp-2); }
.footer-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-footer h2 { font-size: 1.05rem; color: #fff; margin-bottom: var(--sp-1); letter-spacing: 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--orange); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-brand p { max-width: 24rem; margin-top: var(--sp-2); }
.footer-base { margin-top: var(--sp-4); padding-top: var(--sp-2); border-top: 1px solid rgba(255,255,255,.2); font-size: var(--fs-sm); }
.footer-base p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; scroll-behavior: auto !important; }
    .btn-primary:hover, .hero-band:hover { transform: none; }
}

/* ---------- Resources (blog) ---------- */
.post-item { padding: var(--sp-3) 0; border-bottom: 1px solid var(--border); }
.post-item:first-child { padding-top: 0; }
.post-item h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.post-item h2 a { color: var(--ink); text-decoration: none; }
.post-item h2 a:hover { text-decoration: underline; }
.post-meta { color: var(--muted); font-size: var(--fs-sm); margin-bottom: .5rem; }
.post-meta-hero { color: #fff; opacity: .9; margin-top: var(--sp-2); }
.article-body { font-size: 1.125rem; }
.article-body h2 { margin-top: var(--sp-4); font-size: 1.6rem; }
.article-body h3 { margin-top: var(--sp-3); }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin: 0 0 var(--sp-2); }
.article-body li { margin-bottom: .35rem; }
.article-body blockquote { margin: var(--sp-3) 0; padding: .25rem var(--sp-3); border-left: 5px solid var(--orange); background: var(--surface); }
.article-body code { font-size: .95em; }
.article-body a { overflow-wrap: anywhere; }
.preview-banner { background: #FFF6E8; border-bottom: 3px solid var(--orange); padding: .75rem 0; }
.post-grid { margin-bottom: var(--sp-2); }
.pager { display: flex; gap: var(--sp-2); align-items: center; margin-top: var(--sp-3); }

/* ---------- Cookie consent (only rendered when analytics is configured) ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 150; background: #fff; border-top: 4px solid var(--teal); box-shadow: 0 -8px 30px rgba(5, 46, 45, .18); max-height: 60vh; overflow-y: auto; padding: var(--sp-2) 0; }
.consent[hidden] { display: none; }
.consent-inner { display: grid; gap: var(--sp-2); align-items: center; }
.consent h2 { font-size: 1.05rem; margin-bottom: .25rem; letter-spacing: 0; }
.consent p { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
.consent-actions { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.consent-actions .btn { flex: 1 1 10rem; }
@media (min-width: 48em) { .consent-inner { grid-template-columns: 1fr auto; gap: var(--sp-3); } .consent-actions .btn { flex: none; width: 12rem; } }
.link-button { background: none; border: 0; padding: .25rem .1rem; margin-left: .75rem; font: inherit; color: #fff; text-decoration: underline; cursor: pointer; min-height: 2.75rem; }
.link-button:hover { color: var(--orange); }
