/* ==========================================================================
   Counsel Capital Group — Shared Stylesheet
   Palette: Ink Navy #0B1E3D | Deep Navy #142A4D | White #FFFFFF
            Ivory #F7F5F0 | Brass #A98B4C | Slate #5B6472
   Type: Playfair Display (display) / Inter (body & UI)
   ========================================================================== */

:root {
  --ink-navy: #0b1e3d;
  --deep-navy: #142a4d;
  --white: #ffffff;
  --ivory: #f7f5f0;
  --brass: #a98b4c;
  --brass-dark: #8a6f38;
  --slate: #5b6472;
  --slate-light: #8a92a0;
  --hairline: #d8dce3;
  --focus-ring: #1f5fd6;

  --font-display: "Playfair Display", "Iowan Old Style", "Georgia", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  --max-width: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink-navy);
}

h1 { font-size: clamp(2.25rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); }

p { margin: 0 0 1.1em; }

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

a:hover { color: var(--brass-dark); }

/* Visible focus state everywhere — WCAG 2.4.7 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 2px;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Skip link — WCAG 2.4.1 */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--ink-navy);
  color: var(--white);
  padding: 0.85em 1.25em;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
}

/* Eyebrow labels */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-dark);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.9em;
}

.rule {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

.rule--brass {
  border-top: 2px solid var(--brass);
  width: 64px;
  margin: 0 0 1.5em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 500;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink-navy);
}

.brand:hover { color: var(--ink-navy); }

.brand-mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-dark);
  margin-top: 0.25em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--deep-navy);
  padding: 0.4em 0.1em;
  border-bottom: 2px solid transparent;
}

.nav-links a[aria-current="page"] {
  border-bottom-color: var(--brass);
  color: var(--ink-navy);
  font-weight: 600;
}

.nav-links a:hover {
  border-bottom-color: var(--brass);
}

.nav-cta {
  background: var(--ink-navy);
  color: var(--white) !important;
  padding: 0.6em 1.3em;
  border-radius: 2px;
  font-weight: 600;
  border-bottom: none !important;
}

.nav-cta:hover {
  background: var(--brass-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 0.5em 0.7em;
  cursor: pointer;
}

.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--white);
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--hairline);
    border-bottom: 1px solid var(--hairline);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 1em var(--gutter);
    border-bottom: 1px solid var(--hairline);
    border-radius: 0;
  }
  .nav-cta { margin: 1em var(--gutter); display: inline-block; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--white) 100%);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--hairline);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero h1 { margin-bottom: 0.5em; }

.hero-lede {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 46ch;
  margin-bottom: 1.6em;
}

.button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.85em 1.7em;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 2px;
  border: 1.5px solid var(--ink-navy);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--ink-navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--brass-dark);
  border-color: var(--brass-dark);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--ink-navy);
}

.btn-secondary:hover {
  background: var(--ink-navy);
  color: var(--white);
}

/* ---------- Seal / crest graphic ---------- */
.hero-seal {
  justify-self: center;
}

.hero-seal svg { width: 100%; max-width: 320px; height: auto; }

/* ---------- Sections ---------- */
section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-alt {
  background: var(--ivory);
}

.section-navy {
  background: var(--ink-navy);
  color: var(--white);
}

.section-navy h2, .section-navy h3 { color: var(--white); }

.section-head {
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.section-head p { color: var(--slate); font-size: 1.05rem; }

.section-navy .section-head p { color: #c7cede; }

/* ---------- Cards / grids ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .card-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--hairline);
  padding: 2rem 1.75rem;
  border-radius: 3px;
}

.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--slate); margin-bottom: 0; font-size: 0.98rem; }

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 1.1rem;
  color: var(--brass-dark);
}

/* ---------- Offices ledger (About page) ---------- */
.offices-ledger {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--hairline);
}

@media (max-width: 760px) {
  .offices-ledger { grid-template-columns: 1fr; }
}

.office-row {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 1rem;
}

.office-row:nth-child(odd) {
  padding-right: clamp(1rem, 3vw, 2.5rem);
}
.office-row:nth-child(even) {
  padding-left: clamp(1rem, 3vw, 2.5rem);
}
@media (min-width: 761px) {
  .office-row:nth-child(odd) { border-right: 1px solid var(--hairline); }
}

.office-mark {
  font-family: var(--font-display);
  color: var(--brass-dark);
  font-size: 1.05rem;
  font-weight: 700;
}

.office-city {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.15em;
}

.office-focus {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0;
}

.office-region {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 0.3em;
}

/* ---------- Stats ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: left;
}

@media (max-width: 760px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  color: var(--brass);
  margin-bottom: 0.1em;
}

.stat-label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #c7cede;
}

/* ---------- Values / numbered principles ---------- */
.principle {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--hairline);
}

.principle:last-child { border-bottom: 1px solid var(--hairline); }

.principle-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass);
  font-weight: 700;
}

/* ---------- Quote / statement block ---------- */
.statement {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.4;
  max-width: 46ch;
  font-weight: 700;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
@media (max-width: 900px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .team-grid { grid-template-columns: 1fr; }
}

.team-photo {
  aspect-ratio: 4 / 5;
  background: var(--deep-navy);
  border-radius: 3px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brass);
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
}

.team-name { font-weight: 700; margin-bottom: 0.15em; }
.team-role { color: var(--brass-dark); font-size: 0.88rem; font-weight: 600; margin-bottom: 0.5em; }
.team-bio { color: var(--slate); font-size: 0.92rem; }

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; margin-bottom: 0; }
.field.full { grid-column: 1 / -1; }

.field label {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.45em;
  color: var(--ink-navy);
}

.field .hint {
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 0.35em;
}

.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75em 0.9em;
  border: 1.5px solid var(--hairline);
  border-radius: 3px;
  color: var(--ink-navy);
  background: var(--white);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--focus-ring);
}

.required-mark { color: var(--brass-dark); }

.form-note {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 1.5rem;
}

.form-status {
  margin-top: 1.5rem;
  padding: 1em 1.25em;
  border-radius: 3px;
  font-weight: 600;
  display: none;
}

.form-status.is-visible { display: block; }

.form-status.success {
  background: #e9f3ec;
  color: #1e5631;
  border: 1px solid #b6dbc0;
}

.form-status.error {
  background: #fbeaea;
  color: #8a1f1f;
  border: 1px solid #f0bcbc;
}

/* ---------- Contact info list ---------- */
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.info-list li {
  display: flex;
  gap: 0.9rem;
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
}
.info-list li:last-child { border-bottom: 1px solid var(--hairline); }
.info-list svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--brass-dark); margin-top: 0.15em; }
.info-list strong { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-light); margin-bottom: 0.2em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink-navy);
  color: #c7cede;
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.6em;
}

.footer-desc {
  font-size: 0.92rem;
  max-width: 34ch;
}

.footer-heading {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1em;
  font-weight: 600;
}

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.7em; }
.footer-links a {
  color: #c7cede;
  text-decoration: none;
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--brass); text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 1.75rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: #93a0bc;
}

.footer-bottom a { color: #93a0bc; }
.footer-bottom a:hover { color: var(--brass); }

/* ---------- Visually hidden (screen-reader only) ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Page intro band (interior pages) ---------- */
.page-intro {
  background: var(--ink-navy);
  color: var(--white);
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.page-intro .eyebrow { color: var(--brass); }
.page-intro h1 { color: var(--white); margin-bottom: 0.4em; }
.page-intro p { color: #c7cede; max-width: 56ch; font-size: 1.05rem; margin-bottom: 0; }

.breadcrumb {
  font-size: 0.85rem;
  color: #93a0bc;
  margin-bottom: 1.2rem;
}
.breadcrumb a { color: #93a0bc; }
.breadcrumb a:hover { color: var(--brass); }
