/* Vaz & Associates — design system
   Palette: deep navy + restrained brass accent. Serif headings (Source Serif 4), sans body (Inter).
   Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128 px */

@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --ink: #14213a;          /* headings */
  --text: #2b3445;         /* body */
  --muted: #5a6475;
  --line: #d9dde3;
  --accent: #8a6a36;       /* brass, AA on light surfaces */
  --accent-soft: #c9a86a;
  --navy: #0f1e33;
  --on-navy: #e9edf3;
  --focus: #2f6fdb;
  --shadow: 0 1px 2px rgba(15, 30, 51, .06), 0 8px 24px rgba(15, 30, 51, .06);

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --radius: 10px;
  --maxw: 1160px;
  --measure: 68ch;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1422;
    --surface: #111d30;
    --surface-2: #16243a;
    --ink: #eef1f6;
    --text: #cfd6e1;
    --muted: #97a2b4;
    --line: #25354d;
    --accent: #d2b47c;
    --accent-soft: #a88b55;
    --navy: #070e19;
    --on-navy: #e9edf3;
    --focus: #7fb0ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1422;
  --surface: #111d30;
  --surface-2: #16243a;
  --ink: #eef1f6;
  --text: #cfd6e1;
  --muted: #97a2b4;
  --line: #25354d;
  --accent: #d2b47c;
  --accent-soft: #a88b55;
  --navy: #070e19;
  --on-navy: #e9edf3;
  --focus: #7fb0ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s4);
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.35rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 var(--s4); max-width: var(--measure); }
ul, ol { padding-left: 1.2em; }
li + li { margin-top: var(--s2); }

.skip-link {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: var(--s2) var(--s4);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.skip-link:focus { top: var(--s4); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 720px) { .container { padding: 0 var(--s6); } }

.section { padding: var(--s8) 0; }
@media (min-width: 900px) { .section { padding: var(--s9) 0; } }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s3);
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: var(--s4);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--muted); }
.section-head { max-width: 720px; margin-bottom: var(--s7); }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  font: 600 1rem/1 var(--font-sans); text-decoration: none;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--accent); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--navy); color: var(--accent-soft); font: 600 1.05rem/1 var(--font-serif);
  border: 1px solid color-mix(in srgb, var(--accent-soft) 45%, transparent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font: 600 1.12rem/1.1 var(--font-serif); }
.brand-sub { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s1); }
.nav-list li + li { margin-top: 0; }
.nav-list a {
  display: block; padding: var(--s2) var(--s3); border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500;
}
.nav-list a:hover { color: var(--ink); background: var(--surface-2); }
.nav-list a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.header-actions { display: flex; align-items: center; gap: var(--s2); }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--s3) var(--s4) var(--s5);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; }
  .nav-list a { padding: var(--s3) var(--s2); font-size: 1.05rem; }
  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: var(--s4); }
  .no-js .site-nav { position: static; display: block; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: var(--s8) 0 var(--s8); }
@media (min-width: 900px) { .hero { padding: var(--s10) 0 var(--s9); } }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 55%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 80% 20%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 70% 70% at 80% 20%, #000 10%, transparent 70%);
}
.hero-grid { position: relative; display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.35fr 1fr; gap: var(--s8); } }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }

.page-hero { padding: var(--s8) 0 var(--s7); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .page-hero { padding: var(--s9) 0 var(--s8); } }
.page-hero h1 { max-width: 20ch; }

/* Firm details card */
.firm-card {
  background: var(--navy); color: var(--on-navy);
  border-radius: 16px; padding: var(--s6);
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--accent-soft) 30%, transparent);
}
.firm-card h2 { color: #fff; font-size: 1.3rem; margin-bottom: var(--s5); }
.firm-card dl { margin: 0; display: grid; gap: var(--s4); }
.firm-card dl div { display: flex; justify-content: space-between; gap: var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid rgba(255,255,255,.1); }
.firm-card dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.firm-card dt { color: #a9b4c6; font-size: .9rem; }
.firm-card dd { margin: 0; text-align: right; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }

/* ---------- Stat block (numbers right-aligned) ---------- */
.stats { display: grid; gap: var(--s4); grid-template-columns: 1fr; margin: 0; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat {
  display: flex; flex-direction: column; align-items: flex-end; text-align: right;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s5) var(--s5);
}
.stat dd { order: 1; margin: 0; font: 600 clamp(2rem, 1.6rem + 1.5vw, 2.8rem)/1 var(--font-serif); color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.stat dt { order: 2; margin-top: var(--s2); color: var(--muted); font-size: .92rem; }

/* ---------- Cards / services ---------- */
.grid { display: grid; gap: var(--s5); }
@media (min-width: 680px) { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: var(--s6); transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--s3); }
.card p { color: var(--muted); margin-bottom: var(--s4); }
.card .card-link { margin-top: auto; font-weight: 600; font-size: .95rem; text-decoration: none; }
.card .card-link:hover { text-decoration: underline; }
.card-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--accent); margin-bottom: var(--s5);
}
.card-icon svg { width: 24px; height: 24px; }
.card ul { margin: 0 0 var(--s4); color: var(--text); font-size: .96rem; }

.service-detail { scroll-margin-top: 96px; }
.service-detail .tag {
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: var(--s2);
}

/* ---------- Two column prose ---------- */
.split { display: grid; gap: var(--s7); }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.4fr; gap: var(--s9); } }
.prose p { max-width: var(--measure); }
.prose h2 { margin-top: var(--s7); }
.prose h2:first-child { margin-top: 0; }

.portrait {
  aspect-ratio: 4 / 5; border-radius: 16px; background: var(--navy);
  display: grid; place-items: center; position: relative; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent-soft) 30%, transparent);
}
.portrait span { font: 500 clamp(4rem, 3rem + 5vw, 7rem)/1 var(--font-serif); color: var(--accent-soft); letter-spacing: .02em; }
.portrait figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: var(--s4) var(--s5);
  background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fff; font-size: .9rem;
}
.sticky-col { align-self: start; }
@media (min-width: 900px) { .sticky-col { position: sticky; top: 104px; } }

/* Credentials table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .96rem; }
caption { text-align: left; padding: var(--s4) var(--s5) 0; font-weight: 600; color: var(--ink); }
th, td { padding: var(--s3) var(--s5); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 1fr; gap: var(--s2); padding: 0 0 var(--s7) var(--s6); position: relative; margin: 0; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 10px; bottom: -10px; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after {
  content: ""; position: absolute; left: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.timeline .when { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); font-size: .92rem; }
.timeline h3 { margin: 0 0 var(--s1); font-size: 1.2rem; }
.timeline .where { color: var(--muted); font-size: .95rem; margin-bottom: var(--s2); }
.timeline p { margin: 0; }
@media (min-width: 760px) {
  .timeline li { grid-template-columns: 150px 1fr; gap: var(--s6); padding-left: 0; }
  .timeline li::before { left: 181px; }
  .timeline li::after { left: 176px; }
  .timeline .when { text-align: right; padding-right: var(--s6); }
  .timeline .body { padding-left: var(--s6); }
}

/* Capability chips */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips li { margin: 0; padding: var(--s1) var(--s3); border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; background: var(--surface); }

.faq-links { list-style: none; padding: 0; margin: 0 0 var(--s5); border-top: 1px solid var(--line); }
.faq-links li { margin: 0; border-bottom: 1px solid var(--line); }
.faq-links a { display: block; padding: var(--s4) 0; color: var(--ink); text-decoration: none; font: 500 1.08rem/1.4 var(--font-serif); }
.faq-links a:hover { color: var(--accent); }

/* ---------- FAQ accordion ---------- */
.faq-group + .faq-group { margin-top: var(--s7); }
.faq-group h2 { font-size: 1.35rem; margin-bottom: var(--s4); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4);
  padding: var(--s5) 0; font: 600 1.1rem/1.4 var(--font-serif); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-top: 8px; margin-right: 4px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 12px; }
.faq summary:hover { color: var(--accent); }
.faq .answer { padding: 0 0 var(--s5); }
.faq .answer p { margin: 0; }
.note {
  margin-top: var(--s7); padding: var(--s4) var(--s5); border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; font-size: .95rem; color: var(--muted);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--s7); }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.25fr; gap: var(--s8); } }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); margin: 0; }
.contact-list svg { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 3px; }
.contact-list .label { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact-list a, .contact-list .value { color: var(--ink); font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }
.contact-list a:hover { color: var(--accent); text-decoration: underline; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: var(--s6); }
.field { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s5); }
.field-row { display: grid; gap: 0 var(--s4); }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
label { font-weight: 600; font-size: .95rem; color: var(--ink); }
.req { color: var(--accent); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: var(--s3) var(--s4); min-height: 48px;
}
textarea { min-height: 150px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.hint { font-size: .85rem; color: var(--muted); }
.check { display: flex; gap: var(--s3); align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--text); }
.check input { width: 20px; min-height: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.form-status { margin-top: var(--s4); font-size: .95rem; }
.form-status[data-state="error"] { color: #b3261e; }
:root[data-theme="dark"] .form-status[data-state="error"] { color: #ffb4ab; }
.hp { position: absolute; left: -9999px; }

/* ---------- CTA band ---------- */
.band { background: var(--navy); color: var(--on-navy); padding: var(--s8) 0; }
.band h2 { color: #fff; }
.band p { color: #b8c2d2; }
.band .btn--primary { background: var(--accent-soft); color: #0f1e33; }
.band .btn--primary:hover { background: #fff; color: #0f1e33; }
.band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.band .btn--ghost:hover { border-color: var(--accent-soft); color: var(--accent-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b8c2d2; padding: var(--s8) 0 var(--s6); font-size: .94rem; }
.site-footer a { color: #e3e8ef; }
.footer-grid { display: grid; gap: var(--s6); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: 1rem; font-family: var(--font-sans); letter-spacing: .08em; text-transform: uppercase; margin-bottom: var(--s4); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: var(--s2); }
.footer-brand { font: 600 1.25rem/1.2 var(--font-serif); color: #fff; margin-bottom: var(--s2); }
.disclaimer {
  margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid rgba(255,255,255,.12);
  font-size: .85rem; color: #9aa6b8; max-width: none;
}
.disclaimer p { max-width: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); margin-top: var(--s4); font-size: .85rem; color: #8894a8; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal[data-delay="1"] { transition-delay: .08s; }
.js .reveal[data-delay="2"] { transition-delay: .16s; }
.js .reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .band, .form, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Last lone card in a 3-column grid spans the row */
@media (min-width: 1024px) {
  .grid--3 > .card:last-child:nth-child(3n+1) { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; column-gap: var(--s6); align-items: start; }
  .grid--3 > .card:last-child:nth-child(3n+1) .card-icon { margin-bottom: 0; }
  .grid--3 > .card:last-child:nth-child(3n+1) .card-link { align-self: center; margin-top: 0; white-space: nowrap; }
  .grid--3 > .card:last-child:nth-child(3n+1) h3 { grid-column: 2; }
  .grid--3 > .card:last-child:nth-child(3n+1) p { grid-column: 2; margin-bottom: 0; }
  .grid--3 > .card:last-child:nth-child(3n+1) .card-icon { grid-row: 1 / span 2; }
  .grid--3 > .card:last-child:nth-child(3n+1) .card-link { grid-column: 3; grid-row: 1 / span 2; }
}
.band + .site-footer { border-top: 1px solid rgba(255,255,255,.08); }
.faq details, section[id] { scroll-margin-top: 96px; }

/* CA India logo: shown unaltered on its white background, per ICAI usage guidelines */
.brand-logo, .footer-logo {
  display: inline-flex; flex: none; background: #fff; border-radius: 6px; line-height: 0;
  border: 1px solid var(--line);
}
.brand-logo img { height: 44px; width: auto; }
.footer-logo { margin-bottom: var(--s4); border-color: transparent; }
.footer-logo img { height: 64px; width: auto; }
@media (max-width: 420px) {
  .brand-sub { font-size: .62rem; letter-spacing: .06em; white-space: nowrap; }
  .brand-name { font-size: 1.02rem; }
  .brand-logo img { height: 40px; }
}

/* Round logo badge (logo itself unaltered, centred on its white background) */
.brand-logo, .footer-logo { border-radius: 50%; align-items: center; justify-content: center; overflow: hidden; }
.brand-logo { width: 52px; height: 52px; }
.brand-logo img { height: 33px; width: auto; }
.footer-logo { width: 84px; height: 84px; }
.footer-logo img { height: 54px; width: auto; }
@media (max-width: 420px) {
  .brand-logo { width: 46px; height: 46px; }
  .brand-logo img { height: 29px; }
}

/* Principal photograph */
.portrait-photo { margin: 0; max-width: 320px; }
.portrait-photo img {
  width: 100%; height: auto; border-radius: 16px; background: #dde2e9;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.portrait-photo figcaption { margin-top: var(--s4); display: flex; flex-direction: column; gap: 2px; }
.pp-name { font: 600 1.15rem/1.3 var(--font-serif); color: var(--ink); }
.pp-role { font-size: .9rem; color: var(--muted); }
@media (max-width: 899px) { .portrait-photo { max-width: 260px; } }

/* Technology section (navy band) */
.section--tech { background: var(--navy); color: #c9d2df; position: relative; overflow: hidden; }
.section--tech::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 90% 0%, rgba(201,168,106,.14), transparent 60%);
}
.section--tech .container { position: relative; }
.section--tech h2, .section--tech h3 { color: #fff; }
.section--tech .eyebrow { color: var(--accent-soft); }
.section--tech .lead, .section--tech .card p { color: #b3bfcf; }
.section--tech .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); }
.section--tech .card:hover { border-color: rgba(201,168,106,.55); box-shadow: 0 8px 28px rgba(0,0,0,.35); }
.section--tech .card-icon { background: rgba(201,168,106,.14); color: #d8bb85; }
.section--tech .card ul { color: #d6dde7; }
.section--tech .card .tag { color: #93a0b3; }
.section--tech .card-link { color: #d8bb85; }
.section--tech .card p[style] { color: #e3e8ef !important; }

/* ---------- 3D features (CSS only; motion disabled under prefers-reduced-motion) ---------- */

/* Pointer tilt: JS adds .tilt and sets --rx / --ry / --gx / --gy */
.js .tilt:not(.reveal), .js .tilt.reveal.is-visible {
  transform: perspective(1000px)
             rotateX(calc(var(--bx, 0deg) + var(--rx, 0deg)))
             rotateY(calc(var(--by, 0deg) + var(--ry, 0deg)));
  transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .7s, border-color .25s, box-shadow .25s;
  will-change: transform;
}
.js .tilt.is-tilting { transition: transform .08s linear, opacity .7s, border-color .25s, box-shadow .25s; }
.card.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.22), transparent 55%);
  opacity: 0; transition: opacity .3s;
}
.card.tilt.is-tilting::after { opacity: 1; }
:root[data-theme="dark"] .card.tilt::after,
.section--tech .card.tilt::after { background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(201,168,106,.16), transparent 55%); }

/* Hero firm card: angled in 3D, stacked sheets behind, gentle float */
@media (min-width: 960px) {
  .firm-card { --bx: 4deg; --by: -10deg; }
  .firm-card {
    box-shadow:
      16px 16px 0 -2px color-mix(in srgb, var(--navy) 55%, transparent),
      32px 32px 0 -4px color-mix(in srgb, var(--navy) 25%, transparent),
      0 30px 60px -20px rgba(15,30,51,.45);
    animation: float3d 7s ease-in-out infinite;
  }
}
@keyframes float3d { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Rotating 3D cube in the technology section */
.tech-head { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) { .tech-head { grid-template-columns: 1fr 300px; } }
.cube-scene { --size: 150px; width: var(--size); height: calc(var(--size) + 70px); margin: 0 auto var(--s6); perspective: 900px; position: relative; }
@media (min-width: 900px) { .cube-scene { --size: 170px; margin-bottom: var(--s7); } }
.cube {
  width: var(--size); height: var(--size); position: relative; transform-style: preserve-3d;
  transform: rotateX(-22deg) rotateY(-35deg);
  animation: spin3d 22s linear infinite;
}
.face {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 10px;
  font: 600 1.1rem/1.2 var(--font-serif); color: #e7cf9f; letter-spacing: .02em;
  background: linear-gradient(145deg, rgba(201,168,106,.20), rgba(201,168,106,.04));
  border: 1px solid rgba(201,168,106,.55);
  box-shadow: inset 0 0 30px rgba(201,168,106,.12);
  backface-visibility: visible;
}
.f-front  { transform: translateZ(calc(var(--size) / 2)); font-size: 2.2rem; }
.f-back   { transform: rotateY(180deg) translateZ(calc(var(--size) / 2)); }
.f-right  { transform: rotateY(90deg)  translateZ(calc(var(--size) / 2)); }
.f-left   { transform: rotateY(-90deg) translateZ(calc(var(--size) / 2)); }
.f-top    { transform: rotateX(90deg)  translateZ(calc(var(--size) / 2)); }
.f-bottom { transform: rotateX(-90deg) translateZ(calc(var(--size) / 2)); }
.cube-shadow {
  position: absolute; left: 50%; bottom: 0; width: calc(var(--size) * 1.1); height: 22px; translate: -50% 0;
  background: radial-gradient(ellipse at center, rgba(201,168,106,.35), transparent 70%); filter: blur(4px);
  animation: shadow3d 22s linear infinite;
}
@keyframes spin3d {
  0%   { transform: rotateX(-22deg) rotateY(0deg); }
  50%  { transform: rotateX(-8deg)  rotateY(180deg); }
  100% { transform: rotateX(-22deg) rotateY(360deg); }
}
@keyframes shadow3d { 0%, 100% { opacity: .9; } 50% { opacity: .6; } }

/* Portrait: slight depth frame */
.portrait-photo img.tilt { transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  .cube, .cube-shadow, .firm-card { animation: none !important; }
  .cube { transform: rotateX(-22deg) rotateY(-35deg); }
}
/* Solid cube faces so only the faces towards the viewer show */
.face {
  backface-visibility: hidden;
  background: linear-gradient(145deg, #243650 0%, #14233a 60%, #0f1e33 100%);
  box-shadow: inset 0 0 0 1px rgba(201,168,106,.25), inset 0 0 40px rgba(201,168,106,.10);
}
.f-front { background: linear-gradient(145deg, #2b3f5c 0%, #172840 70%); }

/* ---------- Glass (frosted translucent panels over soft colour light) ---------- */
/* Colour light for the glass to diffuse */
.hero::after {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
  right: -6%; top: 8%; width: 560px; height: 520px; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 35%, rgba(201,168,106,.55), transparent 58%),
    radial-gradient(circle at 70% 70%, rgba(47,111,219,.35), transparent 60%);
  filter: blur(40px); opacity: .75;
}
.hero-grid { z-index: 1; }
.section--tech::after {
  content: ""; position: absolute; pointer-events: none;
  left: -10%; bottom: -20%; width: 620px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,111,219,.30), transparent 65%);
  filter: blur(30px);
}

/* Frosted panels */
.firm-card {
  background: linear-gradient(145deg, rgba(20,36,60,.82), rgba(15,30,51,.70));
  -webkit-backdrop-filter: blur(18px) saturate(150%);
          backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,.16);
}
.firm-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.14), transparent 38%);
}
.firm-card { position: relative; }

.section--tech .card {
  background: linear-gradient(160deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  -webkit-backdrop-filter: blur(14px) saturate(140%);
          backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 30px rgba(0,0,0,.25);
}

/* Browsers without backdrop-filter get a solid fallback */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .firm-card { background: var(--navy); }
  .section--tech .card { background: #16263e; }
}
/* Keep text contrast on the glass card over light backgrounds */
.firm-card { background: linear-gradient(145deg, rgba(22,38,62,.93), rgba(15,30,51,.86)); }
.firm-card dt { color: #b4bfd0; }

/* Local map embed */
.map-embed{position:relative;width:100%;aspect-ratio:16/9;min-height:280px;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--surface-2);margin-top:var(--s4)}
.map-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.local-list{columns:2;column-gap:var(--s6);padding-left:1.1em}
@media (max-width:600px){.local-list{columns:1}}
