/* =========================================================
   INTELLEXIS — design tokens
   Palette: ink navy, warm paper, brass accent (registry/seal motif)
   Type: Fraunces (display serif) + Inter (body) + IBM Plex Mono (reference/utility)
   ========================================================= */

:root {
  --ink: #3a3a3a;
  --ink-soft: #58554f;
  --paper: #ffffff;
  --paper-raised: #f1f0ee;
  --charcoal: #333333;
  --brass: #b76767;
  --brass-deep: #834a4a;
  --line: #e2ded4;
  --line-soft: #ece8e0;
  --white: #ffffff;

  --font-display: "Cormorant Garamond", "Iowan Old Style", serif;
  --font-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --max-w: 1180px;
  --edge: clamp(24px, 5vw, 72px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--edge);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--brass-deep);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-top {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 22px var(--edge);
  background: #ffffff;
}
.header-nav-row {
  position: relative;
  background: rgba(246, 242, 234, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.nav-row-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 62px;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  height: 69px;
  width: auto;
  display: block;
}

nav.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}
nav.main-nav a {
  font-size: 15px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
nav.main-nav a:hover { color: var(--brass-deep); }
nav.main-nav a.active { color: var(--ink); font-weight: 500; }
nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--brass);
}
.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  padding: 9px 18px;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px; height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); width: 100%; }

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 4.6vw, 58px);
  line-height: 1.08;
  margin: 22px 0 26px;
}
.hero h1 em {
  font-style: italic;
  color: var(--brass-deep);
}
.hero p.lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 26px;
  border-radius: 2px;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.btn-primary:hover { background: var(--brass-deep); border-color: var(--brass-deep); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

/* seal illustration */
.hero-seal {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-seal svg { width: min(100%, 340px); height: auto; }
.badge-img { width: min(100%, 231px); height: auto; display: block; margin: 0 auto; border-radius: 3px; }

/* ---------- registry / practice area cards ---------- */
.section { padding: 96px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}
.section-head h2 {
  font-size: clamp(28px, 3.2vw, 38px);
  margin: 16px 0 0;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-top: 16px;
}

.registry {
  border-top: 1px solid var(--line);
}
.registry-row {
  display: grid;
  grid-template-columns: 130px 1fr 1.15fr auto;
  gap: 32px;
  align-items: start;
  padding: 34px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.registry-row:hover { background: var(--paper-raised); }
.registry-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brass-deep);
  letter-spacing: 0.06em;
  padding-top: 6px;
}
.registry-title h3 { font-size: 23px; }
.registry-scope {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  line-height: 1.8;
  padding-top: 4px;
}
.registry-desc { color: var(--ink-soft); font-size: 15.5px; padding-top: 4px; }
.registry-link {
  align-self: center;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}
.registry-link:hover { color: var(--brass-deep); }

/* ---------- stat / trust strip ---------- */
.strip {
  background: var(--ink);
  color: var(--paper);
  padding: 56px 0;
}
.strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.strip-item .num {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--white);
}
.strip-item .label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c9b18a;
  margin-top: 6px;
}

/* ---------- prose / content pages ---------- */
.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(32px, 4vw, 46px); margin-top: 16px; }
.page-hero .lede { color: var(--ink-soft); font-size: 18px; max-width: 62ch; margin-top: 18px; }

.prose {
  max-width: 720px;
}
.prose p { margin: 0 0 22px; color: var(--charcoal); }
.prose h2 { font-size: 24px; margin: 40px 0 16px; }
.prose ul { padding-left: 22px; margin: 0 0 22px; }
.prose li { margin-bottom: 8px; color: var(--charcoal); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 72px;
  align-items: start;
}
.side-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 28px;
}
.side-card .eyebrow { margin-bottom: 14px; }
.side-card ul { list-style: none; padding: 0; margin: 0; }
.side-card li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
  display: flex;
  justify-content: space-between;
}
.side-card li:last-child { border-bottom: none; }
.side-card .contact-cta {
  margin-top: 20px;
  display: block;
  text-align: center;
}

/* ---------- team ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.value-card {
  background: var(--paper);
  padding: 36px 30px;
}
.value-card .index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brass-deep);
  letter-spacing: 0.08em;
}
.value-card h3 { font-size: 19px; margin: 14px 0 10px; }
.value-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { font-size: clamp(26px, 3vw, 34px); }
.cta-band p { color: var(--ink-soft); margin: 16px 0 30px; }
.cta-band .hero-actions { justify-content: center; }

/* ---------- footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: #cfd8e0;
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid #2e4459;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fa2b3;
  margin: 0 0 18px;
}
.footer-grid a, .footer-grid p { color: #cfd8e0; font-size: 14.5px; }
.footer-address { font-size: 12px; line-height: 1.6; color: #b7c2cc; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid li a:hover { color: var(--brass); }
.footer-brand .wordmark-text { color: var(--white); }
.footer-brand p { color: #91a3b2; margin: 14px 0 0; max-width: 34ch; font-size: 14px; }
.footer-social { display: flex; gap: 14px; margin-top: 18px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid #3a516a;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { border-color: var(--brass); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 26px;
  font-size: 13px;
  color: #7f92a2;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom .legal-links { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--brass); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-seal { order: -1; max-width: 180px; margin: 0 auto; }
  .strip .wrap { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .registry-row { grid-template-columns: 1fr; gap: 8px; }
  .registry-link { justify-self: start; }
  .two-col { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.main-nav { position: absolute; top: 100%; left: 0; right: 0; background: #f4efe4; flex-direction: column; align-items: flex-start; padding: 24px var(--edge); border-bottom: 1px solid var(--line); gap: 18px; display: none; justify-content: flex-start; }
  nav.main-nav.open { display: flex; }
  .nav-row-inner { justify-content: flex-end; }
  .nav-toggle { display: flex; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
