/* ============================================================
   GRANITE ADVISORY — Shared Stylesheet
   Design tokens:
   Color:  ink #1C1C1C · paper #FAF9F7 · blue #1C6DD0 ·
           stone #6B6862 · stone-light #9A958C ·
           stone-pale #EDEAE4 · blue-pale #EAF1FC
   Type:   Display — "Source Serif 4" (institutional serif)
           Body/UI — "Inter" (clean grotesk)
           Mono/eyebrow — "JetBrains Mono" (technical labels)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ink: #1C1C1C;
  --ink-soft: #2E2C29;
  --paper: #FAF9F7;
  --paper-dim: #F2F0EC;
  --blue: #1C6DD0;
  --blue-deep: #14509C;
  --blue-pale: #EAF1FC;
  --stone: #6B6862;
  --stone-light: #9A958C;
  --stone-pale: #EDEAE4;
  --rule: #DEDAD1;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;

  --max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Granite fleck texture ----------
   A quiet, tiled speckle field standing in for the brand's stone surface.
   Several radial-gradient layers at staggered tile sizes avoid visible
   repetition, the way real flecked granite never quite repeats. Sits behind
   all content via z-index, so it only ever shows through bare paper, never
   competing with text or cards. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(28,28,28,0.13) 0 1.4px, transparent 1.8px),
    radial-gradient(circle, rgba(28,28,28,0.11) 0 1.2px, transparent 1.6px),
    radial-gradient(circle, rgba(20,80,156,0.12) 0 1.3px, transparent 1.7px),
    radial-gradient(circle, rgba(28,28,28,0.085) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(28,28,28,0.1) 0 1.5px, transparent 1.9px),
    radial-gradient(circle, rgba(107,104,98,0.14) 0 2px, transparent 2.5px);
  background-size: 173px 173px, 131px 131px, 211px 211px, 97px 97px, 157px 157px, 251px 251px;
  background-position: 11px 24px, 88px 6px, 40px 110px, 150px 70px, 5px 90px, 60px 150px;
}

a { color: inherit; text-decoration: none; }

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

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

/* ---------- Brand strata bar ----------
   A thin, hard-edged stripe in the four core tones, echoing the hero's
   layered "strata" mark. Sits at the very top of every page as a recurring
   signature rather than a one-off hero flourish. */
.page-strata {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg,
    var(--blue) 0%, var(--blue) 18%,
    var(--ink) 18%, var(--ink) 38%,
    var(--stone-light) 38%, var(--stone-light) 52%,
    var(--ink) 52%, var(--ink) 74%,
    var(--blue-deep) 74%, var(--blue-deep) 100%);
}

/* ---------- Section tint ----------
   Alternates a section off the bare paper tone to break up long stretches
   of unbroken white/cream between hairline-ruled sections. */
.section-tint { background: var(--paper-dim); }

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

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.nav-mark {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 24px;
}
.nav-bars span {
  display: block;
  height: 4px;
  border-radius: 1px;
}
.nav-bars span:nth-child(1) { background: var(--blue); width: 100%; }
.nav-bars span:nth-child(2) { background: var(--stone-light); width: 100%; }
.nav-bars span:nth-child(3) { background: var(--ink); width: 100%; }
.nav-bars span:nth-child(4) { background: var(--stone-light); width: 100%; }
.nav-bars span:nth-child(5) { background: var(--ink); width: 100%; }
.nav-wordmark {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.nav-wordmark small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--stone-light);
  margin-top: 2px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a {
  color: var(--stone);
  transition: color 0.15s ease;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -27px;
  height: 2px;
  background: var(--blue);
}
.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 10px 20px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--blue-deep); }

.nav-toggle { display: none; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 200;
  padding: 24px 24px 40px;
  overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
}
.mobile-menu-close {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
}
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-links a {
  font-family: var(--serif);
  font-size: 32px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.mobile-menu-links a.active { color: var(--blue); }
.mobile-menu-cta {
  margin-top: 32px;
  display: block;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
  padding: 16px;
  border-radius: 3px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--rule);
    border-radius: 3px;
    padding: 8px 12px;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--ink);
    cursor: pointer;
  }
}

/* ============================================================
   TYPE SCALE
   ============================================================ */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--blue);
}

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

h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.005em;
}
h3 {
  font-size: 22px;
  line-height: 1.3;
}
.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--stone);
  line-height: 1.65;
  max-width: 58ch;
}
.fine {
  font-size: 14px;
  color: var(--stone-light);
}

/* ============================================================
   SECTIONS / RHYTHM
   ============================================================ */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.section-rule {
  border-top: 1px solid var(--rule);
}
.section-head {
  margin-bottom: 56px;
  max-width: 640px;
}
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 16px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 84px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero h1 { margin: 22px 0 26px; }
.hero .lede { margin-bottom: 36px; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  padding: 15px 28px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 15px;
  display: inline-block;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-secondary {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-secondary:hover { color: var(--blue); border-color: var(--blue); }

/* --- Hero strata signature mark --- */
.strata-mark {
  position: relative;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.strata-bar {
  position: absolute;
  left: 50%;
  height: 30px;
  border-radius: 3px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  animation: strata-grow 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.strata-bar:nth-child(1) { width: 360px; top: 38px;  background: var(--blue);        animation-delay: 0.55s; }
.strata-bar:nth-child(2) { width: 300px; top: 88px;  background: var(--stone-light); animation-delay: 0.42s; }
.strata-bar:nth-child(3) { width: 340px; top: 138px; background: var(--ink);        animation-delay: 0.30s; }
.strata-bar:nth-child(4) { width: 280px; top: 188px; background: var(--stone-light); animation-delay: 0.18s; }
.strata-bar:nth-child(5) { width: 380px; top: 238px; background: var(--ink);        animation-delay: 0.06s; }

@keyframes strata-grow {
  to { transform: translateX(-50%) scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .strata-bar { transform: translateX(-50%) scaleX(1); animation: none; }
}

.hero-caption {
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--stone-light);
  margin-top: 18px;
  text-transform: uppercase;
}

/* ============================================================
   STAT STRIP
   ============================================================ */
.stat-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-dim);
}
.stat-strip .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 36px 28px;
  border-left: 1px solid var(--rule);
}
.stat:first-child { border-left: none; }
.stat .num {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--ink);
  font-weight: 500;
}
.stat .label {
  font-size: 13.5px;
  color: var(--stone);
  margin-top: 6px;
  line-height: 1.4;
}

@media (max-width: 760px) {
  .stat-strip .wrap { grid-template-columns: 1fr 1fr; }
  .stat { border-left: none; border-top: 1px solid var(--rule); }
  .stat:nth-child(odd) { border-right: 1px solid var(--rule); }
}

/* ============================================================
   SERVICE CARDS (used on Home — abbreviated; full detail on Services page)
   ============================================================ */
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.service-card {
  background: var(--paper);
  padding: 40px 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 0 rgba(28,28,28,0.02) inset;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.service-card:hover {
  box-shadow: 0 18px 36px -24px rgba(28,28,28,0.28);
  transform: translateY(-2px);
}
.service-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.service-card h3 { margin: 0; }
.service-card p { color: var(--stone); font-size: 15px; line-height: 1.6; }
.service-fee {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
}
.service-fee span { color: var(--stone-light); display: block; font-size: 11px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.08em; }

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

/* ============================================================
   FIT TABLE (too small / too big framing)
   ============================================================ */
.fit-block {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0;
}
.fit-block .eyebrow { color: var(--stone-light); }
.fit-block .eyebrow::before { background: var(--stone-light); }
.fit-block h2 { color: var(--paper); }
.fit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.14);
  margin-top: 48px;
  border: 1px solid rgba(255,255,255,0.14);
}
.fit-col {
  background: var(--ink);
  padding: 36px 38px;
}
.fit-col .fit-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}
.fit-col p { color: rgba(250,249,247,0.78); font-size: 15.5px; line-height: 1.6; }
@media (max-width: 760px) {
  .fit-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   PROCESS LIST
   ============================================================ */
.process-list {
  display: flex;
  flex-direction: column;
}
.process-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.process-item:last-child { border-bottom: 1px solid var(--rule); }
.process-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--stone-light);
  padding-top: 4px;
}
.process-item h3 { margin-bottom: 8px; }
.process-item p { color: var(--stone); font-size: 15.5px; max-width: 62ch; }

/* ============================================================
   CREDENTIAL STRIP (About teaser on home)
   ============================================================ */
.cred-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.cred-pill {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  padding: 9px 16px;
  border-radius: 3px;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background: var(--blue-pale);
  padding: 72px 0;
  text-align: center;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band .lede { margin: 0 auto 32px; text-align: center; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--rule);
  padding: 52px 0 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--stone);
}
.footer-links a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--stone-light);
}

/* ============================================================
   PAGE HEADER (interior pages)
   ============================================================ */
.page-header {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--rule);
}
.page-header .eyebrow { margin-bottom: 18px; }
.page-header h1 { font-size: clamp(34px, 4.2vw, 48px); margin-bottom: 16px; }
.page-header .lede { margin: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .strata-mark { height: 220px; margin-top: 12px; }
  .strata-bar { height: 22px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 24px; }
  section { padding: 64px 0; }
  .nav .wrap { height: 64px; }
}
