/* Herndon and Cox — site-wide styles. Shared across every page; this is
   firm branding, not per-page content, so change these tokens deliberately.
   See CLAUDE.md for the reasoning behind the palette and font. */

:root {
    --ink: #1F2328;
    --forest: #3C4A3F;
    --sage: #A9B7A6;
    --cream: #E7E2D9;
    --terracotta: #C97C5D;
    --white: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: "Public Sans", "Helvetica", "Arial", sans-serif;
    color: var(--ink);
    line-height: 1.65;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 28px; }

/* ---------- NAV ---------- */
header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(6px);
    border-top: 4px solid var(--forest);
    border-bottom: 1px solid #EAE6DD;
}
.nav-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 28px; }
.brand { display: flex; align-items: center; }
.brand img { height: 48px; width: auto; }
nav ul { list-style: none; display: flex; gap: 28px; }
nav { position: relative; }
.mega-menu {
    display: none; position: absolute; top: 100%; right: 0; max-width: 90vw;
    background: var(--white); border: 1px solid #EAE6DD; border-top: 3px solid var(--forest);
    box-shadow: 0 12px 28px rgba(31,35,40,0.12);
    padding: 24px 30px; gap: 36px; z-index: 60;
}
.has-dropdown:hover .mega-menu, .has-dropdown:focus-within .mega-menu { display: flex; }
.mega-col { min-width: 190px; }
.mega-col-title {
    font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
    color: #6B7268; margin-bottom: 12px; white-space: nowrap;
}
.mega-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.mega-col a { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.mega-col a:hover { color: var(--terracotta); text-decoration: none; }
nav a { font-size: 14.5px; font-weight: 600; color: var(--forest); }
nav a:hover { color: var(--terracotta); text-decoration: none; }
nav a.active { color: var(--terracotta); }

.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--forest); }

/* ---------- PAGE BODY (rendered markdown) ---------- */
.page-body { padding: 56px 28px 90px; }
.page-body h1 { font-size: 36px; font-weight: 800; color: var(--ink); letter-spacing: -0.4px; margin-bottom: 22px; }
.page-body h2 { font-size: 26px; font-weight: 700; color: var(--ink); margin: 40px 0 16px; }
.page-body h3 { font-size: 20px; font-weight: 700; color: var(--forest); margin: 30px 0 12px; }
.page-body p { font-size: 16.5px; color: #33372F; margin-bottom: 18px; max-width: 720px; }
.page-body ul, .page-body ol { margin: 0 0 18px 22px; max-width: 700px; }
.page-body li { font-size: 16px; color: #33372F; margin-bottom: 8px; }
.page-body blockquote {
    background: var(--cream); border-left: 4px solid var(--terracotta);
    padding: 16px 20px; margin: 20px 0; font-style: italic; color: #3A3F3B;
    max-width: 700px;
}
.page-body img { border-radius: 6px; margin: 20px 0; }
.page-body table { border-collapse: collapse; margin: 20px 0; max-width: 100%; }
.page-body th, .page-body td { border: 1px solid #DCD6C7; padding: 10px 14px; font-size: 15px; text-align: left; }
.page-body th { background: var(--cream); font-weight: 700; }

/* ---------- HOME: HERO ---------- */
.hero {
    display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
    padding: 8px 0 16px;
}
.hero-visual img { border-radius: 8px; margin: 0; }
.page-body h1.hero-statement {
    font-size: 30px; font-weight: 700; line-height: 1.4; color: var(--ink);
    letter-spacing: -0.3px; max-width: 480px; margin: 0;
}

/* ---------- HOME: SECTION HEADS ---------- */
.section-head {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    margin: 56px 0 0; max-width: none; scroll-margin-top: 90px;
}
.section-head h2 { margin: 0; }
.section-eyebrow { color: #6B7268; font-size: 14.5px; white-space: nowrap; }

/* ---------- HOME: SERVICE TILES ---------- */
.tile-list { border-top: 1px solid #EAE6DD; margin: 16px 0 8px; max-width: none; }
.tile-row {
    display: flex; align-items: flex-start; gap: 24px; padding: 22px 4px;
    border-bottom: 1px solid #EAE6DD; text-decoration: none; color: inherit;
}
.tile-row:hover { background: var(--cream); text-decoration: none; }
.tile-title { font-weight: 700; color: var(--ink); font-size: 17px; width: 230px; flex-shrink: 0; }
.tile-desc { color: #55594F; font-size: 15px; flex: 1; }
.tile-chevron { color: var(--forest); font-size: 18px; }

/* ---------- HOME: WORK GRID ---------- */
.work-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
    margin: 20px 0 8px; max-width: none;
}
.work-card { display: block; text-decoration: none; color: inherit; }
.work-card:hover .work-photo { filter: brightness(0.96); }
.page-body img.work-photo {
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px;
    margin: 0 0 10px; display: block;
}
.work-photo-placeholder {
    aspect-ratio: 4 / 3; border-radius: 6px; margin-bottom: 10px; background: var(--sage);
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; color: var(--ink);
}
.work-tags {
    font-size: 12px; color: var(--forest); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 4px;
}
.work-title { font-weight: 700; color: var(--ink); font-size: 15.5px; }

@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; }
    .hero-visual { order: -1; }
    .tile-row { flex-wrap: wrap; gap: 6px; }
    .tile-title { min-width: 100%; }
    .work-grid { grid-template-columns: 1fr 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (max-width: 480px) {
    .work-grid { grid-template-columns: 1fr; }
}

/* ---------- ABOUT: SPLIT ROW (label left, content right) ---------- */
.split-row { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: start; margin: 48px 0; }
.split-row:first-of-type { margin-top: 8px; }
.page-body .split-label {
    font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -0.3px; margin: 0;
}
.split-body p:last-child { margin-bottom: 0; }

/* ---------- ABOUT: TEAM LIST (compact — nested inside "The Team" split-row's
   body, so the section label stays to the left of the whole list; each row
   links out to that person's full profile page) ---------- */
.team-row {
    display: flex; gap: 24px; align-items: flex-start;
    padding: 24px 0; border-top: 1px solid #EAE6DD;
}
.team-row:first-of-type { border-top: none; padding-top: 0; }
.team-row-photo-col {
    flex-shrink: 0; width: 110px; height: 110px; border-radius: 50%;
    background: var(--sage) no-repeat center center; background-size: cover;
}
.team-row-bio { font-size: 16.5px; color: #33372F; margin: 0; }
.team-row-name { font-weight: 700; color: var(--ink); }
.team-row-name:hover { color: var(--terracotta); }

/* ---------- TEAM PROFILE (full page per person) ---------- */
.profile-header { display: flex; align-items: center; gap: 32px; margin-bottom: 32px; }
.avatar-circle-lg {
    display: block; width: 200px; height: 200px; border-radius: 50%;
    background: var(--sage) no-repeat center center; background-size: cover; flex-shrink: 0;
}
.page-body .profile-name { font-size: 34px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.profile-role {
    font-size: 14px; font-weight: 700; color: var(--terracotta); text-transform: uppercase;
    letter-spacing: 0.4px;
}
.profile-body { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: start; }

/* ---------- CONTACT CARD (used on team profile pages) ---------- */
.contact-card {
    border: 1px solid #EAE6DD; border-radius: 8px; padding: 14px; display: flex;
    flex-direction: column; gap: 12px; max-width: 340px;
}
.contact-row { display: flex; flex-direction: column; gap: 2px; }
.contact-label {
    font-size: 11px; font-weight: 700; color: #6B7268; text-transform: uppercase;
    letter-spacing: 0.4px;
}
.contact-row a, .contact-row span.contact-value {
    font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.contact-row a { color: var(--forest); }
.contact-row a:hover { color: var(--terracotta); }
.contact-row span.contact-value { color: var(--ink); }

/* ---------- PORTFOLIO: CASE STUDY DETAIL PAGE ---------- */
.page-body img.portfolio-image { width: 100%; height: 340px; object-fit: cover; border-radius: 8px; margin: 4px 0 8px; }
.portfolio-image-placeholder {
    width: 100%; height: 340px; border-radius: 8px; margin: 4px 0 24px; background: var(--sage);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--ink);
}
.page-body p.photo-credit { font-size: 12px; color: #6B7268; margin: 0 0 18px; }
.photo-credit a { color: #6B7268; text-decoration: underline; }
.photo-credit a:hover { color: var(--terracotta); }
.portfolio-meta {
    font-size: 13px; font-weight: 700; color: var(--terracotta); text-transform: uppercase;
    letter-spacing: 0.4px; margin-bottom: 18px;
}
.report-link { margin-top: 24px; }
.report-link a { font-weight: 600; }

@media (max-width: 760px) {
    .page-body img.portfolio-image, .portfolio-image-placeholder { height: 220px; }
}

@media (max-width: 760px) {
    .split-row { grid-template-columns: 1fr; gap: 10px; margin: 32px 0; }
    .profile-body { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .team-row { flex-direction: column; align-items: flex-start; }
    .team-row-photo-col { flex-direction: row; }
    .profile-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .avatar-circle-lg { width: 140px; height: 140px; }
}

/* ---------- FOOTER ---------- */
footer { background: var(--ink); color: #9AA097; padding: 36px 0; font-size: 13.5px; margin-top: 40px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
footer .brand-mark { display: flex; align-items: center; gap: 10px; color: #D9DAD5; font-weight: 700; }
footer .brand-mark img { height: 20px; }
footer a { color: #9AA097; }
footer a:hover { color: var(--white); }

@media (max-width: 760px) {
    .page-body h1 { font-size: 28px; }
    .nav-toggle { display: flex; }
    nav { display: none; width: 100%; }
    header.nav-open nav { display: block; }
    header.nav-open .nav-row { flex-wrap: wrap; }
    nav ul { flex-direction: column; gap: 2px; width: 100%; padding: 12px 0 4px; }
    nav li { width: 100%; }
    nav a { display: block; padding: 10px 0; }
    .has-dropdown { position: relative; }
    .mega-menu {
        position: static; max-width: none; border: none; box-shadow: none;
        padding: 4px 0 12px 16px; background: transparent; flex-direction: column; gap: 18px;
    }
    .has-dropdown.mega-open .mega-menu { display: flex; }
    .mega-col ul { gap: 8px; }
}
