/* =============================================================
   site.css — BPMR Associates corporate site
   Design language: "study margin" — quiet manuscript palette,
   serif headlines like typeset scripture, gold-leaf accent,
   marginal-note treatment for differentiators instead of
   generic numbered cards.
   ============================================================= */

:root {
    --ink: #1B2A41;
    --parchment: #FAF6EE;
    --gold: #9C7A3C;
    --charcoal: #2B2620;
    --rule: #D8D0C0;
    --white: #FFFFFF;
    --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--parchment);
    color: var(--charcoal);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: 'Source Serif 4', 'Lora', Georgia, 'Times New Roman', serif;
    color: var(--ink);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 0.5em 0;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; margin-bottom: 0.4em; }

p { margin: 0 0 1em 0; }

a {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease;
}
a:hover, a:focus { border-bottom-color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.wrap.narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
    background: var(--ink);
    border-bottom: 3px solid var(--gold);
    position: relative;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
}
.brand {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.3rem;
    color: var(--white);
    font-weight: 600;
    border-bottom: none;
}
.brand span { color: var(--gold); }
.brand:hover { border-bottom: none; }

.main-nav { display: flex; gap: 28px; }
.main-nav a {
    color: #E8E2D4;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}
.main-nav a:hover,
.main-nav a.active {
    color: var(--white);
    border-bottom-color: var(--gold);
}

/* ---------- Hamburger button ---------- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    padding: 88px 0 72px;
    border-bottom: 1px solid var(--rule);
}
.hero h1 { max-width: 760px; }
.hero .lead {
    font-size: 1.2rem;
    max-width: 620px;
    color: #4A4438;
}
.cta-row { display: flex; gap: 16px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 3px;
    font-size: 0.98rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-bottom: 1px solid transparent;
}
.btn-primary {
    background: var(--gold);
    color: var(--white);
}
.btn-primary:hover { background: #87692F; border-bottom-color: transparent; }

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--white); border-bottom-color: transparent; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: #F1ECDE; }
.section.cta-banner {
    background: var(--ink);
    text-align: center;
}
.section.cta-banner h2,
.section.cta-banner p { color: var(--white); }

/* ---------- Grids / Cards ---------- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 32px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    margin-top: 40px;
    border-top: 1px solid var(--rule);
}

/* Marginal-note treatment: each differentiator reads like an
   annotation beside a passage, not a numbered feature card. */
.grid-2 .card {
    padding: 26px 28px;
    border-bottom: 1px solid var(--rule);
    border-left: 3px solid var(--gold);
    background: transparent;
}
.grid-2 .card:nth-child(odd) { border-right: 1px solid var(--rule); }
.grid-2 .card.placeholder-card {
    border-left-color: var(--rule);
    opacity: 0.7;
}
.grid-2 .card.placeholder-card h3,
.grid-2 .card.placeholder-card p { color: #7A7263; }

.grid-3 .card {
    background: var(--white);
    border: 1px solid var(--rule);
    border-radius: 4px;
    padding: 24px;
}

.more-link { margin-top: 36px; }

/* ---------- Contact form ---------- */
.contact-form { margin-top: 32px; }
.form-row { margin-bottom: 20px; }
.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.92rem;
    color: var(--ink);
}
.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--rule);
    border-radius: 3px;
    background: var(--white);
    font-family: inherit;
    font-size: 1rem;
    color: var(--charcoal);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(156, 122, 60, 0.15);
}
.contact-form .btn { border: none; cursor: pointer; font-family: inherit; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--rule);
    padding: 28px 0;
    color: #6B6354;
    font-size: 0.88rem;
}
.site-footer .small { margin: 0; }

/* ---------- Scroll reveal (subtle, respects reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .section, .hero { animation: fadeUp 0.5s ease both; }
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-2 .card:nth-child(odd) { border-right: none; }
    .main-nav { gap: 16px; }
    .main-nav a { font-size: 0.88rem; }
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--ink);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 8px 0 16px;
        z-index: 100;
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        padding: 12px 24px;
        font-size: 1rem;
        border-bottom: none;
        letter-spacing: 0;
    }
    .main-nav a:hover,
    .main-nav a.active {
        border-bottom: none;
        border-left: 3px solid var(--gold);
        padding-left: 21px;
        background: rgba(255, 255, 255, 0.05);
    }
}
@media (max-width: 600px) {
    .hero { padding: 56px 0 48px; }
}
