/* ==========================================================================
   Capstone Financial Services — site stylesheet
   Design tokens reconstructed from the Claude Design reference
   (Capstone Website.dc.html). See README.md for source notes.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=IBM+Plex+Serif:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* Trajan Pro — self-hosted from the firm's licensed desktop font files.
   Only Regular + Bold weights were provided (no italic). */
@font-face {
  font-family: 'Trajan Pro';
  src: url('../assets/fonts/TrajanPro-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Trajan Pro';
  src: url('../assets/fonts/TrajanPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Color tokens */
  --navy-900: #1a2456;
  --navy-800: #212d63;
  --navy-700: #2a3773;
  --navy-600: #3a4a90;
  --navy-500: #4a5591;
  --gold-400: #d9b672;
  --gold-500: #c49a4a;
  --gold-600: #a67c2e;
  --paper-50: #f8f5ec;
  --paper-100: #f0ebde;
  --surface-page: #f5f6fa;
  --text-heading: #1c2333;
  --text-body: #454b5f;
  --text-muted: #7a8099;
  --on-navy-muted: #c9cee0;
  --on-navy-faint: #8b93b8;
  --border-default: #e1e2ea;
  --success-100: #e2f5e9;
  --success-600: #1f7a4d;

  /* Shape / elevation */
  --radius-sm: 3px;
  --radius-md: 4px;
  --shadow-sm: 0 1px 3px rgba(26, 36, 86, 0.10);
  --shadow-md: 0 10px 28px rgba(26, 36, 86, 0.16);

  /* Type */
  --font-display: 'Trajan Pro', 'Cinzel', Georgia, serif;
  --font-serif: 'IBM Plex Serif', Georgia, 'Times New Roman', serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tracking-wide: 0.12em;
}

/* Note: Trajan Pro is self-hosted above from the firm's own desktop font
   files (assets/fonts/). Cinzel remains as the fallback in case those font
   files are ever removed. IMPORTANT: confirm the purchased Trajan Pro
   license permits web embedding before this goes live — desktop font
   licenses often exclude it by default. See README.md. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  font-family: var(--font-sans);
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-800); text-decoration: none; }
a:hover { color: var(--gold-600); text-decoration: underline; }
h1, h2, h3, p { margin: 0; }

.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;
}

/* Disclosure bar */
.disclosure-bar {
  background: var(--navy-900);
  padding: 6px 24px;
  text-align: right;
}
.disclosure-bar a {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--on-navy-muted);
  letter-spacing: 0.03em;
}
.disclosure-bar a:hover { color: var(--gold-400); }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px 48px 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--border-default);
}
.logo-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding-bottom: 14px;
}
.logo-link img { height: 108px; }

.nav-desktop {
  display: flex;
  gap: 28px;
  align-items: center;
  padding-bottom: 22px;
}
.nav-desktop a {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  text-decoration: none;
}
.nav-desktop a:hover { color: var(--navy-800); text-decoration: none; }
.nav-desktop a.active {
  color: var(--navy-800);
  border-bottom: 2px solid var(--gold-500);
}

.nav-mobile { position: relative; padding-bottom: 18px; display: none; }
.nav-mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
}
.nav-mobile-toggle span { width: 18px; height: 2px; background: var(--navy-800); }
.nav-mobile-menu {
  position: absolute;
  top: 48px;
  right: 0;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  min-width: 220px;
  padding: 8px;
  z-index: 30;
}
.nav-mobile-menu.is-open { display: flex; }
.nav-mobile-menu a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 12px;
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-mobile-menu a:hover { background: var(--surface-page); }
.nav-mobile-menu a.active { color: var(--navy-800); }

@media screen and (max-width: 820px) {
  .logo-link img { height: 84px; }
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
}

/* Hero sections */
.hero {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: luminosity;
}
.hero-overlay { position: absolute; inset: 0; pointer-events: none; }
.hero-content { position: relative; }

.hero-home {
  background: var(--navy-900);
  color: #fff;
  padding: 56px 48px;
}
.hero-home .hero-img { opacity: 0.55; }
.hero-home .hero-overlay {
  background: linear-gradient(90deg, var(--navy-900) 0%, rgba(26,36,86,0.75) 45%, rgba(26,36,86,0.35) 100%);
}
.hero-home .hero-content { max-width: 640px; }
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: var(--tracking-wide);
  color: var(--gold-400);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero-home h1 {
  font-family: var(--font-serif);
  font-size: 44px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 24px;
}
.hero-home h1 .hero-sub { font-size: 0.55em; font-weight: 500; }
.hero-home p {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-navy-muted);
  margin: 0 0 32px;
}
@media screen and (max-width: 820px) {
  .hero-eyebrow { font-size: 18px; }
  .hero-home h1 { font-size: 32px; }
}

.hero-centered {
  background: var(--navy-900);
  color: #fff;
  padding: 72px 48px 56px;
  min-height: 368px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-centered .hero-eyebrow { text-align: center; }
.hero-centered h1 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  margin: 0 0 16px;
}
.hero-centered p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--on-navy-muted);
  line-height: 1.6;
}

.hero-process .hero-img { right: 0; top: 0; left: auto; width: 46%; object-position: center 30%; opacity: 0.3; }
.hero-process .hero-overlay {
  background: linear-gradient(90deg, var(--navy-900) 0%, var(--navy-900) 52%, rgba(26,36,86,0.4) 78%, rgba(26,36,86,0.15) 100%);
}

.hero-medical .hero-img-left { position: absolute; left: 0; top: 0; width: 50%; height: 100%; object-fit: cover; object-position: center 15%; opacity: 0.32; mix-blend-mode: luminosity; }
.hero-medical .hero-img-right { position: absolute; right: 0; top: 0; width: 50%; height: 100%; object-fit: cover; opacity: 0.32; mix-blend-mode: luminosity; }
.hero-medical .hero-overlay {
  background: linear-gradient(90deg, var(--navy-900) 0%, rgba(26,36,86,0.3) 30%, rgba(26,36,86,0.3) 70%, var(--navy-900) 100%);
}
.hero-medical .logo-pill {
  display: inline-block;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 6px 32px;
  margin-bottom: 24px;
}
.hero-medical .logo-pill img { height: 190px; }
.hero-medical .hero-tagline {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--on-navy-muted);
  max-width: 640px;
  margin: 0 auto;
}
@media screen and (max-width: 820px) {
  .hero-medical .logo-pill img { height: 120px; }
}

.hero-tax {
  background: var(--paper-100);
  color: var(--text-heading);
}
.hero-tax .hero-img { left: 0; top: 0; width: 88%; object-position: center 50%; opacity: 0.28; filter: contrast(1.02); }
.hero-tax .hero-overlay {
  background:
    linear-gradient(90deg, var(--paper-100) 0%, rgba(240,235,222,0.25) 22%, rgba(240,235,222,0.25) 55%, var(--paper-100) 92%),
    radial-gradient(ellipse 34% 60% at 50% 48%, var(--paper-100) 0%, var(--paper-100) 55%, transparent 100%);
}
.hero-tax img.tax-logo { position: relative; height: 200px; margin: 0 auto 24px; }
.hero-tax .hero-tagline {
  position: relative;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-body);
  max-width: 640px;
  margin: 0 auto;
}
@media screen and (max-width: 820px) {
  .hero-tax .hero-img { width: 100%; opacity: 0.18; }
  .hero-tax .hero-overlay {
    background:
      linear-gradient(180deg, rgba(240,235,222,0.15) 0%, var(--paper-100) 78%),
      radial-gradient(ellipse 60% 45% at 50% 45%, var(--paper-100) 0%, var(--paper-100) 55%, transparent 100%);
  }
  .hero-tax img.tax-logo { height: 130px; }
}

/* Section layout helpers */
.section { padding: 64px 48px; }
.section-narrow { max-width: 980px; margin: 0 auto; }
.section-copy { max-width: 760px; margin: 0 auto; }
.section-surface { background: var(--surface-page); }
.section-navy { background: var(--navy-900); color: #fff; text-align: center; }
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: var(--tracking-wide);
  color: var(--gold-600);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-heading {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--text-heading);
  margin: 0 0 40px;
  font-weight: 600;
}

/* Pillars (home, 3-up) */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.pillar-icon {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1.5px solid var(--gold-600);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  color: var(--navy-800);
  margin-bottom: 20px;
  transition: border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.pillar:hover .pillar-icon {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(58, 74, 144, 0.35), var(--shadow-md);
  color: var(--navy-600);
}
.pillar-icon svg { width: 44px; height: 44px; }
.pillar-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 17px;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.pillar-desc { font-size: 14px; line-height: 1.6; color: var(--text-body); }
@media screen and (max-width: 820px) { .pillars-grid { grid-template-columns: 1fr; } }

/* Cards / services grid */
.card {
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.how-we-help-grid .card,
.what-we-do-grid .card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}
.how-we-help-grid .card:hover,
.what-we-do-grid .card:hover {
  transform: scale(1.035);
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(58, 74, 144, 0.35), var(--shadow-md);
}
.services-grid .card h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--text-heading);
  margin: 0 0 10px;
}
.services-grid .card p { font-family: var(--font-sans); font-size: 14px; color: var(--text-body); line-height: 1.6; margin: 0; }
@media screen and (max-width: 820px) { .services-grid { grid-template-columns: 1fr; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 240px;
  height: 52px;
  padding: 0 28px;
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, transform 80ms ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-600); color: var(--navy-900); }
.btn-primary { background: var(--navy-800); color: #fff; min-width: 120px; height: 42px; padding: 0 20px; }
.btn-primary:hover { background: var(--navy-700); color: #fff; }
.btn-navy600 { background: var(--navy-600); color: #fff; }
.btn-navy600:hover { background: var(--navy-500); color: #fff; }
.btn-navy800 { background: var(--navy-800); color: #fff; }
.btn-navy800:hover { background: var(--navy-700); color: #fff; }

/* Planning process page */
.worksheet-box {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.worksheet-box-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-heading);
  margin-bottom: 4px;
}
.worksheet-box-desc { font-size: 13px; color: var(--text-muted); }
.worksheet-box .btn { flex-shrink: 0; min-width: 0; height: auto; padding: 12px 20px; }
@media screen and (max-width: 820px) {
  .worksheet-box { flex-direction: column; align-items: flex-start; }
  .worksheet-box-desc { display: none; }
}

.steps-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.step { display: flex; gap: 20px; }
.step-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
}
.step-title { font-family: var(--font-serif); font-weight: 600; font-size: 18px; color: var(--text-heading); margin-bottom: 6px; }
.step-desc { font-size: 14px; line-height: 1.65; color: var(--text-body); }

.pull-quote {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text-heading);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
  text-align: center;
}

/* Long-form body copy (Medical / Tax pages) */
.prose p { font-family: var(--font-serif); font-size: 17px; line-height: 1.7; color: var(--text-body); margin: 0 0 20px; }
.prose p:last-child { margin-bottom: 0; }
.prose p.sans { font-family: var(--font-sans); font-size: 15px; }
.prose h3 { font-family: var(--font-serif); font-size: 19px; color: var(--text-heading); margin: 28px 0 12px; }
.prose p.pull { font-family: var(--font-serif); font-size: 16px; font-style: italic; color: var(--text-heading); }

.focus-list { display: flex; flex-direction: column; gap: 10px; }
.focus-item { display: flex; gap: 12px; align-items: baseline; }
.focus-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); flex-shrink: 0; transform: translateY(-2px); }
.focus-item span.focus-text { font-family: var(--font-sans); font-size: 15px; line-height: 1.6; color: var(--text-body); }

.disclosure-note { font-family: var(--font-sans); font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 0 0 24px; text-align: center; }

/* Leadership */
.advisors-grid {
  padding: 56px 48px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: start;
  justify-items: center;
}
.advisor-card { width: 100%; max-width: none; margin: 0 auto; position: relative; }

@media screen and (min-width: 821px) {
  .advisor-card {
    transition: transform 380ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 380ms ease;
    z-index: 1;
  }
  /* Triggered by JS (main.js) only when the cursor enters from the top
     edge of the card — not on hover from the sides/bottom. */
  .advisor-card.spotlight-active {
    z-index: 5;
    box-shadow: 0 24px 48px rgba(26, 36, 86, 0.28);
  }
  .advisor-card:nth-of-type(1).spotlight-active {
    transform: scale(1.15) translateX(52%);
  }
  .advisor-card:nth-of-type(2).spotlight-active {
    transform: scale(1.15) translateX(-52%);
  }
}
.advisor-header { text-align: center; margin-bottom: 12px; cursor: default; }
.advisor-photo {
  width: 320px;
  height: 320px;
  max-width: 100%;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: var(--surface-page);
  margin: 0 auto 14px;
}
.advisor-name { font-family: var(--font-serif); font-weight: 600; font-size: 19px; color: var(--text-heading); margin-bottom: 4px; }
.advisor-title { font-size: 13px; color: var(--text-muted); }
.advisor-toggle-dot { display: none; font-size: 20px; letter-spacing: 3px; color: var(--text-muted); margin-top: 8px; line-height: 1; }
.advisor-bio p { font-family: var(--font-sans); font-size: 14px; line-height: 1.7; color: var(--text-body); margin: 0 0 14px; }
.advisor-bio p:last-child { margin-bottom: 0; }

@media screen and (max-width: 820px) {
  .advisors-grid { padding: 56px 20px; grid-template-columns: 1fr; }
  .advisor-card { max-width: 300px; }
  .advisor-photo { width: 220px; height: 220px; }
  .advisor-header { cursor: pointer; }
  .advisor-toggle-dot { display: block; }
  .advisor-bio { display: none; }
  .advisor-card.is-expanded .advisor-bio { display: block; }
}

/* Contact */
.contact-section { padding: 80px 48px; background: #fff; display: flex; justify-content: center; }
.contact-form-wrap { max-width: 480px; width: 100%; }
.contact-heading { font-family: var(--font-serif); font-size: 28px; color: var(--text-heading); margin: 0 0 24px; font-weight: 600; }
.form-fields { display: flex; flex-direction: column; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--text-heading); }
.form-field input {
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-heading);
}
.form-field input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(58, 74, 144, 0.15);
}
.form-success {
  background: var(--success-100);
  color: var(--success-600);
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
}
.form-error {
  background: #fbeaea;
  color: #a3342a;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 13px;
  margin-top: 12px;
  display: none;
}
.form-error.is-visible { display: block; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { background: var(--navy-900); color: var(--on-navy-muted); padding: 48px; font-family: var(--font-sans); font-size: 13px; }
.footer-logos { display: flex; gap: 16px; margin-bottom: 24px; align-items: stretch; }
.footer-logos img { height: 32px; background: #fff; border-radius: 2px; padding: 2px; }
.footer-logos img.faded { opacity: 0.9; }
.footer-divider { width: 1px; align-self: stretch; background: var(--navy-500); }
.footer-firm { margin-bottom: 16px; line-height: 1.7; }
.footer-firm-name { font-weight: 600; color: #fff; margin-bottom: 2px; }
.footer-legal { max-width: 760px; line-height: 1.6; margin: 0 0 8px; }
.footer-legal.muted { color: var(--on-navy-faint); }
.footer-copyright { margin: 0; color: var(--on-navy-faint); }

@media screen and (max-width: 820px) {
  .site-header { padding: 12px 20px 0; }
  .section, .hero-home, .hero-centered, .contact-section { padding-left: 20px; padding-right: 20px; }
  .site-footer { padding: 32px 20px; }
}
