/* ============================================================
   Chaudhry & Associates — design system
   Palette: midnight ink / warm paper / bronze gold
   Type: Fraunces (display serif) + Inter (text)
   Keep tokens in sync with tools/generate_assets.py
   ============================================================ */

:root {
  --ink: #0f2233;
  --ink-2: #16324a;
  --ink-3: #1d3d5a;
  --paper: #fcfaf6;
  --cream: #f3eee4;
  --line: #e6dfd0;
  --line-ink: rgba(252, 250, 246, 0.14);
  --gold: #b08d57;
  --gold-lt: #c9a96a;
  --gold-dark: #8f6f42;
  --text: #26323c;
  --muted: #5d6b76;
  --muted-ink: #a9b6c2;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1140px;
  --r: 3px;
  --shadow-1: 0 1px 2px rgba(15, 34, 51, 0.05), 0 4px 14px rgba(15, 34, 51, 0.04);
  --shadow-2: 0 2px 4px rgba(15, 34, 51, 0.07), 0 14px 34px rgba(15, 34, 51, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--ink); }

::selection { background: var(--gold); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 1px;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }

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

/* ---------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(252, 250, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-1); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 15px; min-width: 0; }
.brand img { width: 46px; height: 46px; flex: none; }
.brand .wm {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 550;
  letter-spacing: 0.015em;
  color: var(--ink);
  line-height: 1.25;
  white-space: nowrap;
}
.brand .wm em { font-style: italic; font-weight: 450; color: var(--gold); padding: 0 0.06em; }
.brand .wm-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.main-nav ul { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.main-nav a:not(.btn) {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 8px 0;
  position: relative;
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 2px;
  height: 1.5px;
  background: var(--gold);
  transition: right 0.25s ease;
}
.main-nav a:not(.btn):hover::after,
.main-nav a[aria-current="page"]:not(.btn)::after { right: 0; }
.main-nav a[aria-current="page"]:not(.btn) { color: var(--gold-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer; padding: 9px;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--ink); transition: transform 0.25s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------------------------------------------------------- buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--r);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); color: var(--ink); }

.btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ink:hover { background: var(--ink-2); border-color: var(--ink-2); color: var(--paper); }

.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(252, 250, 246, 0.45); }
.btn-ghost:hover { border-color: var(--gold-lt); color: var(--gold-lt); }

.btn-sm { padding: 11px 22px; }

/* ---------------------------------------------------------- eyebrow / heads */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 22px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold); flex: none; }
.on-ink .eyebrow { color: var(--gold-lt); }
.on-ink .eyebrow::before { background: var(--gold-lt); }

.section { padding: 108px 0; }
.section-cream { background: var(--cream); }
.section-head { max-width: 660px; margin-bottom: 60px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); line-height: 1.18; letter-spacing: -0.01em; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 18px 0 0; }

/* ---------------------------------------------------------- hero */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 106, 0.55), transparent);
}
.hero-art {
  position: absolute;
  top: 0; right: -60px;
  width: min(62vw, 860px);
  height: 100%;
  object-fit: cover;
  object-position: left top;
  pointer-events: none;
}
.hero .container { position: relative; padding-top: 122px; padding-bottom: 96px; max-width: var(--max); }
.hero-inner { max-width: 640px; }
.hero h1 {
  color: var(--paper);
  font-size: clamp(2.35rem, 5vw, 3.55rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 480;
  margin: 0 0 26px;
}
.hero h1 em { font-style: italic; color: var(--gold-lt); font-weight: 420; }
.hero p.lead { font-size: 1.13rem; line-height: 1.75; color: var(--muted-ink); max-width: 56ch; margin: 0 0 38px; }
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 0;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--line-ink);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-ink);
}
.trust-strip span { display: flex; align-items: center; }
.trust-strip span + span::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 22px;
  flex: none;
}

/* ---------------------------------------------------------- page header */
.page-header { position: relative; background: var(--ink); color: var(--paper); overflow: hidden; }
.page-header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 106, 0.55), transparent);
}
.page-header .hero-art { opacity: 0.75; }
.page-header .container { position: relative; padding-top: 84px; padding-bottom: 72px; }
.page-header h1 { color: var(--paper); font-size: clamp(2.1rem, 4vw, 3rem); font-weight: 480; letter-spacing: -0.01em; margin: 0 0 16px; }
.page-header p { margin: 0; color: var(--muted-ink); max-width: 58ch; font-size: 1.08rem; }

/* ---------------------------------------------------------- cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 42px 34px 36px;
  box-shadow: var(--shadow-1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.card:hover::before { transform: scaleX(1); }

.card .icon {
  width: 58px; height: 58px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 26px;
  color: var(--gold-dark);
  background: rgba(176, 141, 87, 0.07);
}
.card .icon svg { width: 26px; height: 26px; }

.card h3 { font-size: 1.32rem; font-weight: 520; margin-bottom: 13px; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

a.more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
a.more .arr { transition: transform 0.2s ease; }
a.more:hover { color: var(--ink); }
a.more:hover .arr { transform: translateX(5px); }

/* ---------------------------------------------------------- split / why */
.split { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 72px; align-items: center; }

.art-panel {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
.section-cream .art-panel { background: var(--paper); }
.art-panel img { width: min(66%, 270px); }
.art-panel figcaption {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.split h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.18; margin-bottom: 20px; }
.split .body-copy p { color: var(--muted); margin: 0 0 18px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 40px; }
.stat { border-top: 2px solid var(--gold); padding-top: 16px; }
.stat strong { display: block; font-family: var(--serif); font-size: 1.45rem; font-weight: 520; color: var(--ink); margin-bottom: 4px; }
.stat span { color: var(--muted); font-size: 0.86rem; }

/* ---------------------------------------------------------- CTA band */
.cta-band { position: relative; background: var(--ink); color: var(--paper); padding: 92px 0; text-align: center; overflow: hidden; }
.cta-band .hero-art { right: auto; left: -120px; transform: scaleX(-1); opacity: 0.55; }
.cta-band .container { position: relative; }
.cta-band h2 { color: var(--paper); font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 480; margin-bottom: 14px; }
.cta-band h2 em { font-style: italic; color: var(--gold-lt); }
.cta-band p { margin: 0 auto 36px; color: var(--muted-ink); max-width: 52ch; }

/* ---------------------------------------------------------- services page */
.svc { display: grid; grid-template-columns: 190px 1fr; gap: 48px; padding: 64px 0; border-top: 1px solid var(--line); }
.svc:first-child { border-top: 0; padding-top: 0; }
.svc-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.4rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
}
.svc-no small { display: block; font-family: var(--sans); font-style: normal; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); margin-top: 14px; }
.svc h2 { font-size: 1.75rem; font-weight: 520; margin-bottom: 16px; }
.svc p { color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.svc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 60ch; }
.svc li { position: relative; padding-left: 30px; color: var(--text); font-size: 0.98rem; }
.svc li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 16px; height: 1.5px;
  background: var(--gold);
}

/* ---------------------------------------------------------- about page */
.principal-card {
  display: flex;
  align-items: center;
  gap: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: 34px 38px;
  max-width: 560px;
}
.principal-card .medallion {
  flex: none;
  width: 92px; height: 92px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--ink);
  color: var(--gold-lt);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.principal-card .p-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 540; color: var(--ink); }
.principal-card .p-role { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-dark); margin: 6px 0 10px; }
.principal-card .p-links { font-size: 0.92rem; color: var(--muted); display: grid; gap: 2px; }

/* ---------------------------------------------------------- contact page */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }

.contact-panel {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  padding: 46px 42px;
  position: relative;
  overflow: hidden;
}
.contact-panel::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(201, 169, 106, 0.15));
}
.contact-panel .p-name { font-family: var(--serif); font-size: 1.42rem; font-weight: 500; color: var(--paper); }
.contact-panel .p-role { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-lt); margin: 8px 0 34px; }
.contact-panel dl { margin: 0; }
.contact-panel dt {
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted-ink);
  margin: 26px 0 7px;
  padding-top: 22px;
  border-top: 1px solid var(--line-ink);
}
.contact-panel dt:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.contact-panel dd { margin: 0; font-size: 1.04rem; }
.contact-panel dd a { color: var(--paper); }
.contact-panel dd a:hover { color: var(--gold-lt); }

.contact-form-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
  padding: 46px 42px;
}
.contact-form-wrap h2 { font-size: 1.5rem; font-weight: 520; margin-bottom: 8px; }
.contact-form-wrap > p { color: var(--muted); font-size: 0.95rem; margin: 0 0 30px; }

form.contact-form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 9px;
}
.field input, .field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: var(--paper);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.16);
}
.field textarea { min-height: 150px; resize: vertical; }

.hp-field { position: absolute; left: -9999px; top: -9999px; }

.form-status { margin: 0; padding: 13px 16px; border-radius: var(--r); font-size: 0.92rem; display: none; }
.form-status.success { display: block; background: #e9f2ea; color: #1e5c38; border: 1px solid #cfe3d3; }
.form-status.error { display: block; background: #f8e9e7; color: #953b30; border: 1px solid #ecd2cd; }

/* ---------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: var(--muted-ink); padding: 74px 0 34px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 48px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line-ink);
}
.footer-brand { display: flex; align-items: flex-start; gap: 16px; }
.footer-brand img { width: 44px; height: 44px; border: 1px solid rgba(201, 169, 106, 0.35); border-radius: 3px; }
.footer-brand .wm { font-family: var(--serif); font-size: 1.14rem; color: var(--paper); line-height: 1.3; }
.footer-brand .wm em { font-style: italic; color: var(--gold-lt); }
.footer-brand p { color: var(--muted-ink); font-size: 0.9rem; max-width: 30ch; margin: 10px 0 0; }

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-lt);
  margin: 4px 0 20px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: var(--muted-ink); font-size: 0.94rem; }
.footer-col a:hover { color: var(--paper); }

.footer-bottom {
  padding-top: 26px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(169, 182, 194, 0.75);
}

/* ---------------------------------------------------------- reveal on scroll */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal.revealed { opacity: 1; transform: none; }
html.js .reveal.d1 { transition-delay: 0.08s; }
html.js .reveal.d2 { transition-delay: 0.16s; }
html.js .reveal.d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .btn, a.more .arr { transition: none; }
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: 1fr; max-width: 560px; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .svc { grid-template-columns: 1fr; gap: 18px; padding: 48px 0; }
  .svc-no { font-size: 2.6rem; }
  .hero-art { opacity: 0.45; }
  .section { padding: 78px 0; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 88px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 10px 28px 26px; }
  .main-nav a:not(.btn) { display: block; padding: 15px 0; border-bottom: 1px solid var(--line); }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav .btn { margin-top: 18px; text-align: center; }

  .hero .container { padding-top: 84px; padding-bottom: 64px; }
  .trust-strip { flex-direction: column; gap: 12px; }
  .trust-strip span + span::before { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .brand .wm { font-size: 1.05rem; }
  .brand .wm-sub { letter-spacing: 0.26em; }
  .principal-card { flex-direction: column; align-items: flex-start; }
  .contact-panel, .contact-form-wrap { padding: 34px 26px; }
  .art-panel { padding: 38px; }
}
