:root {
    --bg: #f6f1e7;
    --bg-raised: #e4ebe4;
    --surface: #fffdf8;
    --fg: #172d27;
    --fg-muted: #425a52;
    --fg-faint: #60756d;
    --gold: #a36212;
    --gold-soft: rgba(163, 98, 18, 0.12);
    --gold-line: rgba(163, 98, 18, 0.42);
    --green: #173c32;
    --sage: #dce8df;
    --sand: #efe0c6;
    --clay: #ead6ca;
    --line: rgba(23, 45, 39, 0.16);
    --font-serif: "Cormorant Garamond", "Big Caslon", Georgia, serif;
    --font-sans: "Inter Tight", "Graphik", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-color: var(--gold) var(--bg); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.7;
}

a { color: inherit; }
p { color: var(--fg-muted); max-width: 70ch; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

h1, h2, h3 {
    margin: 0 0 18px;
    color: var(--fg);
    font-family: var(--font-serif);
    font-weight: 500;
}

h1 { font-size: clamp(48px, 8vw, 92px); line-height: 1.02; font-weight: 600; }
h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 600; }
h3 { font-size: 24px; }

a:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(163, 98, 18, 0.42);
    outline-offset: 5px;
}

::selection { background: #e3c48f; color: var(--fg); }

.eyebrow { color: #7b4408; }
h1, h2, h3 { color: var(--fg); }
h2 { line-height: 1.08; }
h3 { color: #713d08; }

.ticker-wrap {
    background: var(--green);
    border-bottom-color: rgba(255, 255, 255, 0.16);
}

.ticker-wrap::before { background: linear-gradient(90deg, var(--green), transparent); }
.ticker-wrap::after { background: linear-gradient(270deg, var(--green), transparent); }
.ticker-track { animation-duration: 48s; }
.ticker-track span { color: #dce7e2; border-right-color: rgba(255, 255, 255, 0.16); }
.ticker-track span b { color: #fffdf8; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }

header.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 241, 231, 0.92);
    border-bottom-color: var(--line);
    box-shadow: 0 8px 24px rgba(23, 45, 39, 0.05);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

nav.links {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
}

nav.links a {
    position: relative;
    color: var(--fg-muted);
    font-size: 14px;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: color 180ms ease, transform 180ms ease;
}

nav.links a:hover { color: var(--gold); transform: translateY(-1px); }

nav.links > a,
.nav-dropdown > summary {
    display: flex;
    align-items: center;
    min-height: 62px;
    padding: 0 18px;
    color: var(--fg);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.035em;
    list-style: none;
    transition: color 180ms ease, background-color 180ms ease;
}

nav.links > a:hover,
.nav-dropdown > summary:hover,
.nav-dropdown[open] > summary {
    background: rgba(82, 101, 154, 0.09);
    color: #44558c;
    transform: none;
}

nav.links > a:last-child {
    margin: 10px 0 10px 10px;
    min-height: 42px;
    background: #58699f;
    color: #fffdf8;
}

nav.links > a:last-child:hover { background: #465889; color: #fffdf8; }

.nav-dropdown { position: relative; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin: -4px 0 0 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 180ms ease;
}
.nav-dropdown[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }

.nav-submenu {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    z-index: 100;
    display: grid;
    min-width: 290px;
    padding: 10px;
    border: 1px solid rgba(69, 83, 137, 0.18);
    background: #fffdf8;
    box-shadow: 0 18px 44px rgba(33, 41, 76, 0.16);
}

.nav-submenu a {
    padding: 11px 13px;
    color: var(--fg-muted);
    font-size: 14px;
    letter-spacing: 0.01em;
    text-transform: none;
}

.nav-submenu a:hover { background: #eceefa; color: #44558c; transform: translateX(3px); }

.hero {
    background:
        radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.72), transparent 30%),
        linear-gradient(135deg, #e1e5f4 0%, #eceefa 52%, #f2edf4 100%);
    border-bottom-color: rgba(69, 83, 137, 0.2);
    min-height: auto;
    display: grid;
    align-items: center;
    padding: 84px 0 94px;
}

.hero::before { background: radial-gradient(circle, rgba(82, 101, 154, 0.11), transparent 65%); }

.hero-badge {
    border-color: var(--gold-line);
    background: var(--gold);
    color: #fffdf8;
    box-shadow: 0 8px 24px rgba(110, 64, 8, 0.15);
}

.hero-layout { position: relative; }
.hero-title { text-align: center; }
.hero-title h1 { max-width: 820px; margin-right: auto; margin-left: auto; font-size: clamp(40px, 6vw, 68px); }
.hero h1 .thin { color: var(--fg-muted); font-size: clamp(15px, 1.55vw, 19px); line-height: 1.45; }

.service-map {
    position: relative;
    max-width: 970px;
    margin: 58px auto 0;
    padding-top: 54px;
}

.service-map-stem {
    position: absolute;
    top: 0;
    left: 50%;
    height: 55px;
    border-left: 2px solid rgba(82, 101, 154, 0.48);
}

.service-map-branches {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-top: 26px;
    border-top: 2px solid rgba(82, 101, 154, 0.48);
}

.service-map-branches a {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 112px;
    padding: 20px;
    border: 1px solid rgba(69, 83, 137, 0.2);
    background: rgba(255, 253, 248, 0.72);
    box-shadow: 0 12px 28px rgba(49, 58, 103, 0.09);
    color: #243a35;
    font-family: var(--font-serif);
    font-size: clamp(20px, 2.2vw, 27px);
    font-weight: 600;
    line-height: 1.08;
    text-align: center;
    text-decoration: none;
    transition: transform 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}

.service-map-branches a::before {
    content: "";
    position: absolute;
    top: -28px;
    left: 50%;
    height: 27px;
    border-left: 2px solid rgba(82, 101, 154, 0.48);
}

.service-map-note {
    display: block;
    margin-top: 10px;
    color: #4a5a56;
    font-family: var(--font-sans);
    font-size: 10pt;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
}

.service-map-branches a:hover {
    background: #fffdf8;
    box-shadow: 0 18px 38px rgba(49, 58, 103, 0.14);
    transform: translateY(-4px);
}

#accounting,
#financial,
#resources,
#cra-news { scroll-margin-top: 92px; }

#capabilities {
    padding: 92px 0 108px;
    background: #f9f6ef;
}

.section-head { margin-bottom: 46px; }

.pillar {
    grid-template-columns: minmax(260px, 330px) 1fr;
    gap: 50px;
    margin: 0 0 26px;
    padding: 46px;
    border: 1px solid rgba(23, 45, 39, 0.13);
    box-shadow: 0 14px 36px rgba(23, 45, 39, 0.07);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.pillar:last-child { border-bottom: 1px solid rgba(23, 45, 39, 0.13); }
.pillar:hover { transform: translateY(-4px); box-shadow: 0 20px 44px rgba(23, 45, 39, 0.11); }
.pillar.tone-sage { background: var(--sage); }
.pillar.tone-sand { background: #e5edeb; }
.pillar.tone-clay { background: #eee9e2; }

.pillar-media img {
    height: 300px;
    border-color: rgba(23, 45, 39, 0.16);
    filter: saturate(0.82) contrast(0.98);
    transition: filter 200ms ease, transform 200ms ease;
}

.pillar:hover .pillar-media img { filter: saturate(1) contrast(1); transform: scale(1.012); }

.pillar-num {
    color: #fffdf8;
    background: var(--gold);
    box-shadow: 0 8px 22px rgba(110, 64, 8, 0.18);
}

.pillar-tagline { color: #713d08; }
.service-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service-list li {
    min-height: 100%;
    padding: 12px 14px;
    border-left-color: var(--gold-line);
    background: rgba(255, 253, 248, 0.48);
    transition: background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.service-list li:hover {
    background: rgba(255, 253, 248, 0.82);
    border-left-color: var(--gold);
    transform: translateY(-2px);
}

.service-list li .t { color: var(--fg); }
.service-list li .d { color: var(--fg-muted); font-size: 14px; line-height: 1.45; }

#consultation {
    padding: 104px 0;
    background: linear-gradient(135deg, #dbe7df 0%, #edf0e4 100%);
}

.consult-grid { grid-template-columns: 300px 1fr; gap: 70px; }
.consult-photo-wrap { position: sticky; top: 122px; }
.consult-photo-wrap img { border-color: var(--gold-line); filter: saturate(0.88) contrast(0.98); }
.consult-copy h2 { max-width: 18ch; }
.consult-prose { columns: 2; column-gap: 42px; column-rule: 1px solid var(--line); }
.consult-prose p { break-inside: avoid; margin-top: 0; }

.contact-card {
    margin-top: 32px;
    background: var(--surface);
    border-color: var(--gold-line);
    box-shadow: 0 14px 34px rgba(23, 45, 39, 0.09);
}

.contact-card a { border-bottom-color: var(--gold-line); }

footer {
    background: #e9eff8;
    border-top: 1px solid #d4deec;
    padding: 34px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
    gap: 18px;
    align-items: stretch;
    padding-bottom: 28px;
    border-bottom: 1px solid #ccd7e6;
}

footer h3 { color: #1b3564; font-family: var(--font-serif); font-size: 26px; font-weight: 600; letter-spacing: 0; text-transform: none; }
footer p, footer a { color: #334966; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 7px; font-size: 13px; line-height: 1.45; }
footer a { text-decoration: none; }
footer a:hover { color: #173f8f; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 17px 0; color: #66778e; font-size: 12px; }
.footer-bottom a { margin-left: 18px; color: #596d87; }

.footer-consultation {
    height: 100%;
    padding: 22px 24px;
    border: 1px solid #d3ddeb;
    background: #f7f9fc;
}

.footer-consultation p {
    max-width: none;
    margin: 0;
    color: #263d5d;
    font-size: 18px;
    line-height: 1.52;
}

.consultation-disclaimer {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
}

.footer-contact {
    position: relative;
    height: 100%;
    padding: 22px 24px;
    border: 1px solid #c5d3f1;
    background: #dfe8ff;
}

.footer-contact::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: #6d88c8;
    content: "";
}

.footer-contact h3 { margin-bottom: 14px; }
.footer-contact li { color: #2c4268; }

.footer-contact li:first-child {
    color: #172c53;
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 600;
}

.footer-contact a {
    color: #234a98;
    border-bottom-color: rgba(35, 74, 152, 0.32);
}

.footer-contact a:hover { color: #102d69; }

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 560ms ease, transform 560ms ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Inner pages */
.inner-page {
    min-height: 100vh;
    background: #f9f6ef;
}

.inner-page main { min-height: 58vh; }
.page-hero { padding: 88px 0 58px; border-bottom: 1px solid var(--line); }
.education-page .page-hero { background: linear-gradient(135deg, var(--sage), #f2ead9); }
.resources-page .page-hero { background: linear-gradient(135deg, var(--sand), #f4e9dc); }
.consultation-page .page-hero { background: linear-gradient(135deg, #dce8df, #f2ead9); }
.page-hero h1 { max-width: 900px; font-size: clamp(44px, 7vw, 76px); }

.consultation-section {
    padding: 82px 0 100px;
    background: linear-gradient(135deg, #edf2ec, #f8f3e9);
}

.consultation-page .consult-prose { columns: 2; }
.consultation-page .contact-card { background: #fffdf8; }

.legal-page { background: #e8eaf6; }
.legal-page .legal-hero {
    background: linear-gradient(135deg, #dfe4f5 0%, #eceefa 56%, #f3edf4 100%);
    border-bottom-color: rgba(69, 83, 137, 0.2);
}

.legal-hero-grid {
    display: grid;
    grid-template-columns: 1fr minmax(300px, 430px);
    gap: 70px;
    align-items: center;
}

.legal-hero img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border: 1px solid rgba(69, 83, 137, 0.28);
    box-shadow: 0 18px 42px rgba(49, 58, 103, 0.14);
    filter: saturate(0.82) contrast(0.98);
}

.page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 24px;
    background: #58699f;
    color: #fffdf8;
    font-family: var(--font-serif);
    font-size: 38px;
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(49, 58, 103, 0.18);
}

.legal-section {
    padding: 82px 0 104px;
    background: linear-gradient(180deg, #eceefa 0%, #e5e8f5 100%);
}

.legal-content {
    padding: 44px;
    border: 1px solid rgba(69, 83, 137, 0.18);
    background: rgba(255, 253, 248, 0.68);
    box-shadow: 0 18px 44px rgba(49, 58, 103, 0.09);
}

.legal-notes {
    columns: 2;
    column-gap: 48px;
    column-rule: 1px solid rgba(69, 83, 137, 0.18);
    margin-bottom: 30px;
}

.legal-notes p { break-inside: avoid; margin-top: 0; }
.legal-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 42px 0 0;
    padding: 0;
    border-top: 1px solid rgba(69, 83, 137, 0.28);
    border-bottom: 1px solid rgba(69, 83, 137, 0.28);
    list-style: none;
}

.legal-list li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(0, 1.25fr);
    gap: 24px;
    align-items: center;
    min-height: 124px;
    padding: 26px 30px;
    overflow: hidden;
    border-bottom: 1px solid rgba(69, 83, 137, 0.18);
    border-left: 0;
    background: transparent;
    transition: background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.legal-list li:nth-child(odd) { border-right: 1px solid rgba(69, 83, 137, 0.22); }
.legal-list li:nth-last-child(-n + 2) { border-bottom: 0; }

.legal-list li::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: #52659a;
    content: "";
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 180ms ease;
}

.legal-list li:hover {
    border-left-color: transparent;
    background: rgba(255, 255, 255, 0.58);
    transform: translateY(-2px);
}

.legal-list li:hover::before { transform: scaleY(1); }

.legal-list li .t {
    color: #273a70;
    font-family: var(--font-serif);
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 600;
    line-height: 1.02;
}

.legal-list li .d {
    padding-left: 22px;
    border-left: 1px solid rgba(69, 83, 137, 0.22);
    color: #4c5778;
    font-size: 14px;
    line-height: 1.5;
}

.credentials-section { padding: 74px 0 96px; background: #f9f6ef; }
details.creds { border-color: var(--line); }
details.creds { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.creds summary { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; color: #713d08; cursor: pointer; font-size: 14px; letter-spacing: 0.1em; list-style: none; text-transform: uppercase; transition: color 180ms ease, padding-left 180ms ease; }
details.creds summary::-webkit-details-marker { display: none; }
details.creds summary::after { content: "+"; font-family: var(--font-serif); font-size: 24px; transition: transform 200ms ease; }
details.creds[open] summary::after { transform: rotate(45deg); }
details.creds summary:hover { color: var(--gold); padding-left: 8px; }
.cred-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 8px 0 40px; }
.cred-card {
    min-height: 170px;
    padding: 24px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--gold);
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(23, 45, 39, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease;
}
.cred-card:nth-child(3n + 1) { background: var(--sage); }
.cred-card:nth-child(3n + 2) { background: var(--sand); }
.cred-card:nth-child(3n) { background: var(--clay); }
.cred-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(23, 45, 39, 0.1); }
.cred-card .name { display: block; margin-bottom: 6px; color: var(--fg); font-family: var(--font-serif); font-size: 20px; }
.cred-card .org { color: var(--fg-muted); font-size: 13px; letter-spacing: 0.05em; text-transform: uppercase; }
.cred-card .date { display: block; margin-top: 5px; color: var(--fg-muted); font-size: 13px; }

.resources-section { padding: 74px 0 96px; }
.resource-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.resource-panel { padding: 36px; border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(23, 45, 39, 0.07); }
.resource-panel:first-child { background: var(--sage); }
.resource-panel:last-child { background: var(--sand); }
.resource-panel h2 { color: var(--fg); }
.resource-panel ul { list-style: none; margin: 0; padding: 0; }
.resource-panel li { border-top: 1px solid var(--line); }
.resource-panel a {
    display: block;
    padding: 16px 0;
    color: var(--fg);
    text-decoration: none;
    transition: color 180ms ease, transform 180ms ease;
}
.resource-panel a:hover { color: var(--gold); transform: translateX(5px); }


@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    nav.links a, .nav-dropdown summary, .service-map-branches a, .pillar, .pillar-media img, .service-list li, .cred-card, .resource-panel a { transition: none; }
    nav.links a:hover, .service-map-branches a:hover, .pillar:hover, .pillar:hover .pillar-media img, .service-list li:hover, .cred-card:hover, .resource-panel a:hover { transform: none; }
    .legal-list li::before { transition: none; }
}

@media (max-width: 1080px) {
    nav.links { display: flex; }
    nav.links > a,
    .nav-dropdown > summary { min-height: 52px; padding-right: 12px; padding-left: 12px; font-size: 13px; }
    nav.links > a:last-child { min-height: 38px; }
}

@media (max-width: 1020px) {
    .service-list { grid-template-columns: 1fr 1fr; }
    .legal-list li { grid-template-columns: 1fr; gap: 12px; }
    .legal-list li .d { padding-left: 0; border-left: 0; }
    .cred-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .hero { min-height: auto; }
    .pillar { grid-template-columns: 1fr; padding: 34px; }
    .consult-grid { grid-template-columns: 1fr; }
    .consult-photo-wrap { position: static; max-width: 360px; }
    .consult-prose { columns: 1; }
    .resource-grid { grid-template-columns: 1fr; }
    .legal-hero-grid { grid-template-columns: 1fr; }
    .legal-hero img { height: 270px; }
    .legal-notes { columns: 1; }
    .legal-list { grid-template-columns: 1fr; }
    .legal-list li:nth-child(odd) { border-right: 0; }
    .legal-list li:nth-last-child(2) { border-bottom: 1px solid rgba(69, 83, 137, 0.18); }
    .service-map-branches { grid-template-columns: 1fr; border-top: 0; gap: 14px; padding-top: 0; }
    .service-map, .service-map-branches { padding-top: 0; }
    .service-map-stem, .service-map-branches a::before { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    body { font-size: 17px; }
    .nav-inner { padding: 6px 12px; }
    nav.links { justify-content: flex-start; }
    nav.links > a,
    .nav-dropdown > summary { min-height: 44px; padding: 0 10px; font-size: 12px; }
    nav.links > a:last-child { margin: 3px 0 3px 4px; min-height: 38px; }
    .nav-submenu { position: absolute; top: 100%; right: auto; left: 0; width: min(290px, calc(100vw - 24px)); min-width: 0; }
    .nav-dropdown:last-of-type .nav-submenu { right: 0; left: auto; }
    .ticker-track { animation: none; transform: none; }
    .ticker-track span:nth-child(n + 4) { display: none; }
    #capabilities, #consultation, .consultation-section, .legal-section, .credentials-section, .resources-section { padding: 68px 0; }
    .pillar { padding: 26px 22px; margin-bottom: 18px; }
    .pillar-num { left: -8px; }
    .service-list, .cred-grid { grid-template-columns: 1fr; }
    .resource-panel { padding: 26px 22px; }
    .legal-content { padding: 28px 22px; }
    .legal-list { margin-top: 32px; }
    .legal-list li { min-height: 0; padding: 24px 18px; }
    .footer-grid { grid-template-columns: 1fr; }
    footer { padding-top: 26px; }
    .footer-grid { gap: 12px; padding-bottom: 22px; }
    .footer-consultation, .footer-contact { padding: 19px 18px; }
    .footer-consultation p { font-size: 17px; }
    .container, .nav-inner { padding-left: 22px; padding-right: 22px; }
    .footer-bottom a { margin-left: 0; margin-right: 18px; }
}

/* Founder attribution under the hero title */
.hero-principal {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 4px 12px;
    max-width: 820px;
    margin: 18px auto 0;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
    text-align: center;
    color: var(--gold);
}

/* Trims the trailing letter-space so each line sits optically centred */
.hero-principal > span { margin-right: -0.16em; }
.hero-principal-sep { color: rgba(163, 98, 18, 0.45); }
