/* ==========================================================
   Arper Associates — site styles
   Brand colors and fonts are set once here in :root.
   ========================================================== */
:root {
    --navy: #233a6c;
    --navy-dark: #16264a;
    --accent: #c9a54a;
    --bg: #ffffff;
    --bg-alt: #ededed;
    --text: #233a6c;
    --muted: #55617d;
    --border: #d5d9e2;
    --radius: 6px;
    --font-body: 'Karla', system-ui, sans-serif;
    --font-head: 'Work Sans', system-ui, sans-serif;
    --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 300; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.brand { text-decoration: none; display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; color: var(--navy); }
.brand-tagline { font-size: .85rem; color: var(--muted); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.main-nav a { text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px; font: inherit; color: var(--navy); cursor: pointer; }

@media (max-width: 760px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
    .main-nav a { display: block; padding: 10px 0; }
}

/* ---------- Heroes ---------- */
.hero, .page-hero, .cta { position: relative; background-size: cover; background-position: center; color: #fff; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,38,74,.55), rgba(22,38,74,.75)); }
.hero-content, .page-hero .container, .cta-content { position: relative; }
.hero { min-height: 78vh; display: flex; align-items: center; }
.hero-content { max-width: 860px; padding-top: 80px; padding-bottom: 80px; }
.page-hero { padding: 110px 0 90px; }
.hero a:not(.btn), .page-hero a:not(.btn), .cta a:not(.btn) { color: #fff; }
.lead { font-size: 1.2rem; max-width: 680px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.page-header { background: var(--bg-alt); padding: 70px 0 50px; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; background: var(--accent); color: var(--navy-dark); text-decoration: none; font-weight: 700; padding: 12px 26px; border-radius: var(--radius); border: 2px solid var(--accent); cursor: pointer; font: inherit; font-weight: 700; }
.btn:hover { background: #d8b866; border-color: #d8b866; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.text-link { font-weight: 700; text-decoration: none; }
.text-link::after { content: " \2192"; }

/* ---------- Sections & cards ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 50px 0 80px; }
.section-title { text-align: center; margin-bottom: 40px; }
.cards { display: grid; gap: 28px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .cards-2 { grid-template-columns: 1fr; } }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.card-image { padding: 0; overflow: hidden; }
.card-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { padding: 26px 28px 30px; }
.checklist { padding-left: 1.2em; margin: 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.gallery figure { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery img { aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.gallery figcaption { padding: 12px 16px; font-weight: 700; }

/* ---------- CTA band ---------- */
.cta { padding: 90px 0; text-align: center; }
.cta-content p { font-size: 1.15rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 48px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
address { font-style: normal; margin-bottom: 1em; }
.map iframe { width: 100%; height: 300px; border: 0; border-radius: var(--radius); margin-top: 12px; }
.contact-form label { display: block; font-weight: 700; margin-bottom: 16px; }
.contact-form input, .contact-form textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font: inherit; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; }
.notice p { margin: 0; }
.notice-ok { background: #e7f4ea; color: #1d5e2e; }
.notice-error { background: #fbeaea; color: #8a1f1f; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #d7dceb; padding: 56px 0 24px; }
.site-footer a { color: #fff; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-brand { font-family: var(--font-head); font-weight: 600; color: #fff; font-size: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.copyright { border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 18px; font-size: .9rem; }

/* ---------- Recertification page ---------- */
.narrow { max-width: 820px; }
.section-alt { background: var(--bg-alt); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.steps li { counter-increment: step; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.steps li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps h3 { font-size: 1.15rem; }
.steps p { margin: 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.08rem; }
.faq details p { margin: 12px 0 0; }
.small { font-size: .92rem; color: var(--muted); margin-top: 24px; }

/* ---------- Home: problem cards, proof bar ---------- */
.card-link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.card-link:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(22,38,74,.08); }
.steps-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.proof { background: var(--navy); color: #fff; padding: 28px 0; }
.proof ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; font-weight: 700; }
.proof li::before { content: "\2713"; color: var(--accent); margin-right: 8px; }

/* ---------- Services page ---------- */
.jump { background: #fff; border-bottom: 1px solid var(--border); }
.jump .container { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 14px; padding-bottom: 14px; }
.jump a { font-weight: 700; text-decoration: none; }
.jump a:hover { text-decoration: underline; }
.service { scroll-margin-top: 80px; }
.service-grid { display: grid; gap: 48px; grid-template-columns: 1fr 1.2fr; align-items: start; }
.service-grid img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.service-flip img { order: 2; }
.when { background: #fff; border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.section-alt .when { background: #fff; }
.section:not(.section-alt) .when { background: var(--bg-alt); }
@media (max-width: 800px) {
    .service-grid { grid-template-columns: 1fr; gap: 24px; }
    .service-flip img { order: 0; }
}
.situations li { margin-bottom: 10px; }
.send-title { margin-top: 28px; font-size: 1.1rem; }
.entrance { border-radius: var(--radius); margin: 8px 0 20px; width: 100%; }

/* ---------- Home: How it works with photo ---------- */
.how-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.how-grid img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.steps-stack { grid-template-columns: 1fr; gap: 16px; }
.steps-stack li { display: grid; grid-template-columns: 36px 1fr; column-gap: 16px; align-items: start; padding: 20px 22px; }
.steps-stack li::before { margin-bottom: 0; grid-row: span 2; }
.steps-stack h3 { margin-bottom: 4px; }
@media (max-width: 800px) { .how-grid { grid-template-columns: 1fr; gap: 28px; } .how-grid img { aspect-ratio: 4 / 3; } }

/* ---------- Projects: featured cards ---------- */
.projects { display: grid; gap: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.project img { width: 100%; height: 100%; object-fit: cover; min-height: 320px; }
.project-body { padding: 26px 28px; }
.project-text { grid-template-columns: 1fr; background: var(--navy); border-color: var(--navy); color: #fff; }
.project-text h3, .project-text a { color: #fff; }
.project-text .project-meta { color: var(--accent); }
.project-text .project-scope { background: rgba(255,255,255,.12); color: #fff; }
.project-meta { font-size: .9rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.project-scope { display: inline-block; font-size: .88rem; font-weight: 700; background: var(--bg-alt); padding: 4px 10px; border-radius: 99px; }
@media (max-width: 1000px) { .projects { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .project { grid-template-columns: 1fr; } .project img { min-height: 0; aspect-ratio: 4 / 3; } }

/* ---------- Design review fixes ---------- */
/* 1. Hero aligned with the logo/container */
.hero-content { max-width: var(--max); }
.hero-content > * { max-width: 760px; }
.hero h1, .page-hero h1 { font-weight: 400; }
/* 2. CTA band: solid brand color */
.cta { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); }
.cta-content p { max-width: 620px; margin-left: auto; margin-right: auto; }
.actions-center { justify-content: center; }
/* 3. Header phone */
.header-phone { font-weight: 700; text-decoration: none; white-space: nowrap; border: 2px solid var(--accent); border-radius: var(--radius); padding: 6px 14px; }
.header-phone:hover { background: var(--accent); }
.main-nav { margin-left: auto; }
@media (max-width: 760px) { .header-phone { display: none; } }
/* 4. Home recent work */
.center-link { text-align: center; margin-top: 28px; }
/* 5. Lone last card in a 3-column grid spans the row */
@media (min-width: 900px) { .cards-3 > :last-child:nth-child(3n+1) { grid-column: 1 / -1; } }
/* footer columns */
.site-footer nav ul li { margin-bottom: 8px; }
/* proof strip light, so it doesn't merge with the navy CTA band */
.proof { background: var(--bg-alt); color: var(--navy); border-top: 1px solid var(--border); }
.proof li::before { color: var(--navy); }
