/* ==========================================================================
   Jason Smith & Co — Chartered Certified Accountants, Derby
   Theme stylesheet. Design direction: classic, trust-first professional.
   Palette: deep navy + brass on warm paper. Type: Fraunces (display) / Inter.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
    --ink: #182530;
    --ink-soft: #47565f;
    --ink-faint: #5c6870;      /* ≥4.9:1 on paper and paper-deep */
    --paper: #faf8f3;
    --paper-deep: #f2ede2;
    --surface: #ffffff;
    --line: #e6dfd1;
    --line-strong: #d5cbb8;

    --navy: #16324b;
    --navy-deep: #0e2233;
    --brass: #b08a3e;
    --brass-ink: #7a5e23;      /* brass tuned for 4.5:1 text on paper */
    --brass-deep: #8f6d2a;     /* brass button background, white text  */
    --cream: #ece6d8;
    --danger: #b3372b;
    --danger-bg: #fbeeec;
    --success: #2e6b4f;
    --success-bg: #ecf5f0;

    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Inter", "Segoe UI", -apple-system, Arial, sans-serif;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 16px;
    --space-4: 24px;
    --space-5: 32px;
    --space-6: 48px;
    --space-7: 64px;
    --space-8: 96px;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;

    --shadow-1: 0 1px 2px rgba(14, 34, 51, 0.06), 0 2px 8px rgba(14, 34, 51, 0.05);
    --shadow-2: 0 2px 4px rgba(14, 34, 51, 0.07), 0 12px 32px rgba(14, 34, 51, 0.1);

    --header-h: 76px;

    --z-header: 1000;
    --z-nav: 999;
    --z-skip: 2000;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    color: var(--navy-deep);
    margin: 0 0 var(--space-3);
    text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.25rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 var(--space-3); }

a {
    color: var(--navy);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover { color: var(--navy-deep); }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul { padding-left: 1.2em; }

/* Anchor targets clear the sticky header. */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

main:focus { outline: none; }

:focus-visible {
    outline: 3px solid var(--brass);
    outline-offset: 2px;
    border-radius: 2px;
}

::selection {
    background: rgba(176, 138, 62, 0.3);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: var(--z-skip);
    background: var(--navy-deep);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top 150ms ease;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

.container {
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* --------------------------------------------------------------------------
   3. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 48px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: 600 1rem/1.2 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease,
        color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.btn:active { transform: translateY(1px); }

.btn[disabled],
.btn[aria-busy="true"] {
    opacity: 0.6;
    cursor: progress;
    transform: none;
}

/* Side-by-side buttons wrap with consistent spacing. */
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.btn .icon { width: 18px; height: 18px; }

.btn--primary {
    background: var(--navy);
    color: #fff;
}

.btn--primary:hover {
    background: var(--navy-deep);
    color: #fff;
}

.btn--brass {
    background: var(--brass-deep);
    color: #fff;
}

.btn--brass:hover {
    background: var(--brass-ink);
    color: #fff;
}

.btn--ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn--ghost:hover {
    border-color: var(--navy);
    color: var(--navy);
}

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: rgba(250, 248, 243, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--ink);
}

.brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
    background: var(--navy);
    color: var(--brass);
}

.brand__icon { width: 24px; height: 24px; }

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand__text strong {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--navy-deep);
}

.brand__text span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.site-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav ul a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease;
}

.site-nav ul a:hover {
    color: var(--navy-deep);
    background: var(--paper-deep);
}

.site-nav ul a.is-active {
    color: var(--navy-deep);
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--brass);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 48px;
    height: 48px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.nav-toggle__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 200ms ease, opacity 200ms ease;
}

body.nav-open .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle__bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Sections & shared patterns
   -------------------------------------------------------------------------- */
.section {
    padding-block: var(--space-8);
}

.section--alt {
    background: var(--paper-deep);
    border-block: 1px solid var(--line);
}

.section--tight {
    padding-block: var(--space-6);
}

.section-head {
    max-width: 640px;
    margin-bottom: var(--space-6);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.kicker {
    display: inline-block;
    margin-bottom: var(--space-2);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brass-ink);
}

.lead {
    font-size: 1.125rem;
    color: var(--ink-soft);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-1);
}

/* Whole-card link: the card__link's ::after covers the card, so the full
   surface is clickable while the accessible name stays the link text. */
.card--link {
    position: relative;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.card--link:hover,
.card--link:focus-within {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: var(--line-strong);
}

.card__link {
    font-weight: 600;
}

.card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.card__link:focus-visible {
    outline: none;
}

.card__link:focus-visible::after {
    outline: 3px solid var(--brass);
    outline-offset: 2px;
}

.icon-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-sm);
    background: var(--navy);
    color: var(--brass);
}

.icon-chip .icon { width: 24px; height: 24px; }

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.checklist {
    list-style: none;
    margin: 0 0 var(--space-4);
    padding: 0;
}

.checklist li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
}

.checklist .icon {
    width: 18px;
    height: 18px;
    margin-top: 4px;
    color: var(--success);
}

.figure-frame {
    position: relative;
    display: block;
    margin: 0;
    isolation: isolate;
}

.figure-frame img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.figure-frame::after {
    content: "";
    position: absolute;
    inset: 16px -16px -16px 16px;
    z-index: -1;
    border: 2px solid var(--brass);
    border-radius: var(--radius-lg);
}

.figure-frame figcaption {
    margin-top: var(--space-3);
    font-size: 0.875rem;
    color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   6. Page hero (home)
   -------------------------------------------------------------------------- */
.hero {
    padding-block: var(--space-8) var(--space-7);
    background:
        linear-gradient(180deg, rgba(22, 50, 75, 0.045), rgba(22, 50, 75, 0) 60%),
        var(--paper);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-7);
    align-items: center;
}

.hero h1 {
    margin-bottom: var(--space-4);
}

.hero h1 em {
    font-style: italic;
    color: var(--brass-ink);
}

.hero__lede {
    font-size: 1.1875rem;
    color: var(--ink-soft);
    max-width: 34em;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.hero__trust {
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--line);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink-faint);
}

.hero__trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero__trust .icon {
    width: 16px;
    height: 16px;
    color: var(--brass-ink);
}

/* --------------------------------------------------------------------------
   7. Home content blocks
   -------------------------------------------------------------------------- */
.stats {
    list-style: none;
    margin: 0;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    padding-block: var(--space-6);
    border-bottom: 1px solid var(--line);
}

.stat {
    text-align: center;
    padding: var(--space-3);
}

.stat__value,
.stat__label {
    display: block;
}

.stat__value {
    font-variant-numeric: lining-nums tabular-nums;
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.5vw, 2.6rem);
    font-weight: 600;
    color: var(--navy);
    line-height: 1.1;
}

.stat__label {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--ink-faint);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.badges--spaced {
    margin-top: var(--space-4);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper-deep);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.process {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.process__step {
    position: relative;
    padding: var(--space-5);
    padding-top: var(--space-6);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.process__num {
    counter-increment: step;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-3);
    border-radius: 50%;
    background: var(--paper-deep);
    border: 1px solid var(--line-strong);
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--brass-ink);
}

.process__num::before {
    content: counter(step);
}

.process__step p {
    margin: 0;
    color: var(--ink-soft);
}

.testimonial {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.testimonial__stars {
    display: flex;
    gap: 2px;
    color: var(--brass);
}

.testimonial__stars .icon { width: 16px; height: 16px; fill: currentColor; }

.testimonial blockquote {
    margin: 0;
    font-size: 1rem;
    color: var(--ink);
}

.testimonial figcaption {
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.testimonial figcaption strong {
    color: var(--ink);
}

/* --------------------------------------------------------------------------
   8. Sub-page hero
   -------------------------------------------------------------------------- */
.page-head {
    padding: var(--space-7) 0 var(--space-6);
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(22, 50, 75, 0.045), rgba(22, 50, 75, 0) 70%),
        var(--paper);
}

.page-head .lead {
    max-width: 44em;
}

/* In-page service index (services.php). */
.jump-nav {
    margin-top: var(--space-4);
}

.jump-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.jump-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.jump-nav a:hover {
    border-color: var(--navy);
    color: var(--navy-deep);
}

/* Centred closing call-to-action block. */
.cta-block {
    text-align: center;
}

.cta-block .lead {
    max-width: 36em;
    margin-inline: auto;
}

/* --------------------------------------------------------------------------
   9. Services
   The two-column layout lives on .container.grid-2; the section itself is a
   simple padded band (alternating sections use .service-detail--flip).
   -------------------------------------------------------------------------- */
.service-detail {
    padding-block: var(--space-7);
}

.service-detail--flip {
    background: var(--paper-deep);
}

@media (min-width: 961px) {
    .service-detail--flip .service-detail__media {
        order: 2;
    }
}

.service-detail .figure-frame img {
    aspect-ratio: 3 / 2;
}

.service-detail p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   10. Pricing
   -------------------------------------------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    align-items: stretch;
}

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--space-5);
}

.pricing-card.is-featured {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--cream);
    box-shadow: var(--shadow-2);
}

.pricing-card.is-featured h3,
.pricing-card.is-featured .price__amount {
    color: #fff;
}

.pricing-card.is-featured .price__note,
.pricing-card.is-featured li {
    color: rgba(236, 230, 216, 0.85);
}

.pricing-card.is-featured .price__amount small {
    color: rgba(236, 230, 216, 0.8);
}

.pricing-card.is-featured .checklist .icon {
    color: var(--brass);
}

.pricing-card__flag {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--brass-deep);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.price__amount {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1;
}

.price__amount small {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--ink-faint);
}

.price__note {
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.pricing-card .checklist {
    flex: 1;
}

.pricing-card .btn {
    width: 100%;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-1);
}

table.pricing-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.pricing-table th,
.pricing-table td {
    text-align: left;
    vertical-align: top;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.pricing-table thead th {
    background: var(--paper-deep);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.pricing-table tbody th {
    font-weight: 600;
    color: var(--ink);
}

.pricing-table tbody tr:last-child > * {
    border-bottom: 0;
}

.pricing-table td:last-child,
.pricing-table thead th:last-child {
    text-align: right;
    white-space: nowrap;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--navy);
}

.table-note {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.more-link {
    margin-top: var(--space-4);
}

.more-link a {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   11. FAQ
   -------------------------------------------------------------------------- */
.faq-group {
    max-width: 760px;
}

.faq-section + .faq-section {
    margin-top: var(--space-6);
}

.faq {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: var(--space-3);
    overflow: hidden;
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 44px;
    padding: 16px 20px;
    font-weight: 600;
    color: var(--navy-deep);
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary:hover {
    background: var(--paper);
}

.faq summary::after {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-right: 6px;
    border-right: 2px solid var(--brass-ink);
    border-bottom: 2px solid var(--brass-ink);
    transform: translateY(-2px) rotate(45deg);
    transition: transform 200ms ease;
}

.faq[open] summary::after {
    transform: translateY(2px) rotate(-135deg);
}

.faq summary:focus-visible {
    outline-offset: -3px;
}

.faq__body {
    padding: 0 20px 20px;
    color: var(--ink-soft);
}

.faq__body p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   12. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--space-6);
    align-items: start;
}

.contact-form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.field {
    margin-bottom: var(--space-4);
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
}

.field .req {
    color: var(--brass-ink);
}

.label-optional {
    font-weight: 400;
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font: inherit;
    color: var(--ink);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field textarea {
    min-height: 140px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(176, 138, 62, 0.45);
    outline: none;
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: var(--danger);
}

.field-hint {
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--ink-faint);
}

.field-error {
    margin: 6px 0 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--danger);
}

.field--consent {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
    padding: var(--space-3);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.field--consent input[type="checkbox"] {
    width: 24px;
    height: 24px;
    margin: 2px 0 0;
    accent-color: var(--navy);
}

.field--consent label {
    margin: 0;
    font-weight: 400;
    font-size: 0.9375rem;
}

.field--consent label a {
    font-weight: 600;
}

.field--consent .field-error {
    grid-column: 2;
}

.form-footnote {
    margin: 12px 0 0;
}

/* Honeypot: present in markup, hidden from humans. */
.hp-field {
    position: absolute !important;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.banner {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: var(--space-4);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
}

.banner .icon {
    width: 22px;
    height: 22px;
    margin-top: 2px;
}

.banner--success {
    background: var(--success-bg);
    border-color: rgba(46, 107, 79, 0.35);
    color: var(--success);
}

.banner--success h2,
.banner--success strong {
    color: var(--success);
}

.banner--error {
    background: var(--danger-bg);
    border-color: rgba(179, 55, 43, 0.35);
    color: var(--danger);
}

.banner--error strong {
    color: var(--danger);
}

.contact-aside {
    display: grid;
    gap: var(--space-4);
}

.contact-aside__card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: var(--space-5);
    box-shadow: var(--shadow-1);
}

.contact-aside__card h2 {
    font-size: 1.25rem;
}

.contact-line {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    margin: 0;
}

.contact-line:last-child {
    border-bottom: 0;
}

.contact-line .icon {
    margin-top: 4px;
    color: var(--brass-ink);
}

.contact-line a {
    text-decoration: none;
    font-weight: 600;
}

.contact-line a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   13. Legal pages (prose)
   -------------------------------------------------------------------------- */
.prose {
    max-width: 70ch;
}

.prose h2 {
    margin-top: var(--space-6);
    font-size: 1.5rem;
}

.prose h3 {
    margin-top: var(--space-5);
    font-size: 1.125rem;
}

.prose ul {
    color: var(--ink-soft);
}

.prose li {
    margin-bottom: 6px;
}

.prose address {
    font-style: normal;
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: var(--space-4);
}

/* --------------------------------------------------------------------------
   14. CTA band + footer
   -------------------------------------------------------------------------- */
.cta-band {
    background: var(--navy-deep);
    color: var(--cream);
    padding-block: var(--space-6);
}

.cta-band__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    flex-wrap: wrap;
}

.cta-band h2 {
    color: #fff;
    margin-bottom: 4px;
}

.cta-band p {
    margin: 0;
    color: rgba(236, 230, 216, 0.85);
}

.site-footer {
    background: #0a1a27;
    color: var(--cream);
    padding: var(--space-7) 0 var(--space-4);
    font-size: 0.9375rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1fr 1.1fr;
    gap: var(--space-6);
    padding-bottom: var(--space-6);
}

.site-footer h3 {
    color: #fff;
    font-size: 0.9375rem;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
}

.site-footer a {
    color: var(--cream);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--brass);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li {
    margin-bottom: 8px;
}

.site-footer__brand p {
    margin-top: var(--space-3);
    color: rgba(236, 230, 216, 0.75);
    max-width: 30em;
}

.brand--light .brand__text strong { color: #fff; }
.brand--light .brand__text span { color: rgba(236, 230, 216, 0.7); }

.site-footer address {
    font-style: normal;
}

.site-footer address p {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
    color: rgba(236, 230, 216, 0.85);
}

.site-footer address .icon {
    margin-top: 4px;
    color: var(--brass);
}

.site-footer__legal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(236, 230, 216, 0.15);
    font-size: 0.8125rem;
    color: rgba(236, 230, 216, 0.65);
}

.site-footer__legal p {
    margin: 0;
}

.site-footer__legal ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* --------------------------------------------------------------------------
   15. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1020px) {
    .hero__inner { gap: var(--space-6); }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
    .nav-toggle { display: flex; }

    .site-nav {
        position: fixed;
        top: calc(var(--header-h) + 8px);
        left: 16px;
        right: 16px;
        z-index: var(--z-nav);
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-2);
        padding: var(--space-4);
        background: var(--paper);
        border: 1px solid var(--line-strong);
        border-radius: var(--radius);
        box-shadow: var(--shadow-2);
    }

    body.nav-open .site-nav { display: flex; }

    .site-nav ul {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav ul a {
        min-height: 48px;
        padding: 12px 14px;
    }

    .site-nav ul a.is-active {
        border-radius: var(--radius-sm);
        box-shadow: inset 3px 0 0 var(--brass);
        background: var(--paper-deep);
    }

    .btn--nav { width: 100%; }

    .hero { padding-block: var(--space-6); }
    .hero__inner { grid-template-columns: 1fr; }
    .hero__figure { order: -1; }

    .grid-2,
    .grid-3 { grid-template-columns: 1fr; }

    .stats { grid-template-columns: repeat(2, 1fr); }
    .process { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
    .service-detail--flip .service-detail__media { order: 0; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .container { padding-inline: 16px; }
    .figure-frame::after { inset: 10px -10px -10px 10px; }

    /* One-off fees: stack each row as a card instead of scrolling sideways. */
    .table-wrap { overflow: visible; }
    table.pricing-table { min-width: 0; }
    .pricing-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .pricing-table tr { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); }
    .pricing-table tbody tr:last-child { border-bottom: 0; }
    .pricing-table th,
    .pricing-table td { display: block; padding: 2px 0; border: 0; text-align: left; }
    .pricing-table td:last-child { text-align: left; }
    .pricing-table td::before {
        content: attr(data-label) ": ";
        font-size: 0.8125rem;
        font-weight: 600;
        color: var(--ink-faint);
    }
    .section { padding-block: var(--space-7); }
    .form-row { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-5); }
    /* Long email addresses must never force the page wider than the phone. */
    .site-footer address p,
    .site-footer li { overflow-wrap: anywhere; }
    .cta-band__inner { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   16. Landing page — software-support.php (PPC)
   -------------------------------------------------------------------------- */
.lp-hero {
    background:
        radial-gradient(120% 90% at 85% 0%, rgba(176, 138, 62, 0.18), rgba(176, 138, 62, 0) 55%),
        var(--navy-deep);
    color: var(--cream);
    padding-block: var(--space-7);
}

.lp-hero__inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--space-7);
    align-items: center;
}

.lp-hero h1 {
    color: #fff;
    margin-bottom: var(--space-4);
}

.lp-hero .kicker {
    color: var(--brass);
}

/* Ghost button needs light text on the dark hero. */
.lp-hero .btn--ghost {
    border-color: rgba(236, 230, 216, 0.45);
    color: var(--cream);
}

.lp-hero .btn--ghost:hover {
    border-color: #fff;
    color: #fff;
}

.lp-hero__lede {
    font-size: 1.125rem;
    color: rgba(236, 230, 216, 0.88);
    max-width: 36em;
}

.lp-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
}

.lp-hero__assurances {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    list-style: none;
    margin: var(--space-5) 0 0;
    padding: var(--space-4) 0 0;
    border-top: 1px solid rgba(236, 230, 216, 0.18);
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(236, 230, 216, 0.85);
}

.lp-hero__assurances li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lp-hero__assurances .icon {
    width: 16px;
    height: 16px;
    color: var(--brass);
}

.lp-hero__media img {
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
}

.lp-platforms .lp-platform h3 {
    margin-bottom: var(--space-2);
}

.lp-platforms .lp-platform p {
    margin-bottom: 0;
    color: var(--ink-soft);
}

.lp-pains { align-items: stretch; }

.lp-pain {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--brass);
    border-radius: var(--radius);
    padding: var(--space-4);
}

.lp-pain h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.0625rem;
    margin-bottom: var(--space-2);
}

.lp-pain h3 .icon {
    width: 20px;
    height: 20px;
    color: var(--brass-ink);
    flex: 0 0 auto;
}

.lp-pain p {
    margin: 0;
    color: var(--ink-soft);
}

.lp-included { align-items: center; }

.lp-price-line {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--paper-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 1.0625rem;
}

.lp-price-line strong {
    color: var(--navy);
    font-size: 1.25rem;
}

.btn--lg {
    min-height: 56px;
    padding: 14px 28px;
    font-size: 1.0625rem;
}

@media (max-width: 960px) {
    .lp-hero { padding-block: var(--space-6); }
    .lp-hero__inner { grid-template-columns: 1fr; }
    .lp-hero__actions .btn { flex: 1 1 auto; }
}

@media (max-width: 640px) {
    .lp-hero__assurances { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   17. Landing page — quickbooks.php
   -------------------------------------------------------------------------- */
.source-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    list-style: none;
    margin: 0;
    padding: 0;
}

.source-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--navy-deep);
}

.source-list .icon {
    width: 18px;
    height: 18px;
    color: var(--brass-ink);
}

.qb-migrate { align-items: start; }

.checklist--columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--space-4);
    margin: 0;
}

.process--5 {
    grid-template-columns: repeat(5, 1fr);
}

.process--5 .process__step {
    padding: var(--space-4);
}

.process--5 h3 {
    font-size: 1.0625rem;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
}

.compare-table th,
.compare-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.compare-table thead th {
    background: var(--paper-deep);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.compare-table thead th:last-child {
    background: var(--navy);
    color: #fff;
}

.compare-table tbody th {
    font-weight: 500;
    color: var(--ink);
}

.compare-table tbody td:last-child {
    background: rgba(22, 50, 75, 0.04);
}

.compare-table tbody tr:last-child > * {
    border-bottom: 0;
}

/* Yes/No carries an icon and a word, never colour alone. */
.mark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.mark .icon {
    width: 18px;
    height: 18px;
}

.mark--yes { color: var(--success); }
.mark--no { color: var(--danger); }

/* quickbooks-services.php */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

.grid-4 .card {
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
}

.grid-4 .card h3 {
    font-size: 1.125rem;
}

.grid-4 .card p {
    color: var(--ink-soft);
    font-size: 0.9375rem;
}

.card__more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-top: auto;
    font-weight: 600;
}

.card__more .icon {
    width: 16px;
    height: 16px;
}

@media (max-width: 1020px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .process--5 { grid-template-columns: repeat(3, 1fr); }
    .source-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
    .process--5 { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .checklist--columns { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .source-list { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
    .source-list li { min-height: 48px; padding: 10px 12px; font-size: 0.9375rem; }
    .compare-table th,
    .compare-table td { padding: 12px 10px; font-size: 0.9375rem; }
    .compare-table thead th { font-size: 0.6875rem; letter-spacing: 0.04em; }
}

/* --------------------------------------------------------------------------
   18. Motion preferences
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
