/* ============================================================
   SPARK Advisory Services — Design System
   Editorial · warm neutral base · single ember accent
   ============================================================ */

:root {
  /* Warm neutral base */
  --paper:        #faf7f2;   /* off-white / warm paper   */
  --paper-2:      #f2ece3;   /* subtle raised surface    */
  --sand:         #e7ded1;   /* hairlines / borders      */
  --charcoal:     #23201c;   /* warm charcoal (ink)      */
  --charcoal-2:   #35302a;
  --slate:        #6a635a;   /* muted body / captions    */
  --slate-2:      #8a8177;

  /* Ember accent (amber / copper / gold) */
  --ember:        #c56a1e;   /* primary accent           */
  --ember-deep:   #a4531a;   /* hover / pressed          */
  --ember-soft:   #e6a25a;   /* light detail             */
  --ember-tint:   rgba(197,106,30,0.10);

  /* Dark band (charcoal sections) */
  --ink-bg:       #211d19;
  --ink-fg:       #f5efe6;

  /* Type */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);
  --radius: 4px;

  --shadow-sm: 0 1px 2px rgba(35,32,28,0.05);
  --shadow-md: 0 18px 48px -24px rgba(35,32,28,0.28);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--charcoal);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

::selection { background: var(--ember); color: #fff; }

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

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--charcoal);
}
h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.35rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
p  { color: var(--charcoal-2); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ember);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--ember);
  opacity: 0.7;
}

.lead {
  font-size: clamp(1.12rem, 1.7vw, 1.4rem);
  line-height: 1.55;
  color: var(--slate);
  max-width: 46ch;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-2); }
.section--ink { background: var(--ink-bg); color: var(--ink-fg); }
.section--ink h1, .section--ink h2, .section--ink h3 { color: var(--ink-fg); }
.section--ink p { color: rgba(245,239,230,0.72); }

.stack > * + * { margin-top: 1.2rem; }
.measure { max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--ember); color: #fff; }
.btn--primary:hover { background: var(--ember-deep); }
.btn--ghost { background: transparent; color: var(--charcoal); border-color: var(--sand); }
.btn--ghost:hover { border-color: var(--ember); color: var(--ember-deep); }
.btn--on-dark { background: transparent; color: var(--ink-fg); border-color: rgba(245,239,230,0.35); }
.btn--on-dark:hover { background: var(--ember); border-color: var(--ember); color:#fff; }
.btn--light { background: var(--ink-fg); color: var(--charcoal); }
.btn--light:hover { background:#fff; }
.btn .arw { transition: transform .2s ease; }
.btn:hover .arw { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Text link */
.link-more {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ember-deep);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.link-more .arw { transition: transform .2s ease; }
.link-more:hover .arw { transform: translateX(4px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,247,242,0.82);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--sand);
}
.site-header__inner {
  display: flex; align-items: center; gap: 2rem;
  height: 68px;
}
.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  display: inline-flex; align-items: baseline; gap: 0.12em;
}
.wordmark .dot { color: var(--ember); }
.wordmark .sub {
  font-family: var(--sans);
  font-size: 0.6rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--slate-2);
  align-self: center;
}
.primary-nav { display: flex; align-items: center; gap: 1.7rem; margin-left: 0.5rem; }
.primary-nav a {
  font-size: 0.94rem; font-weight: 500; color: var(--charcoal-2);
  position: relative; padding-block: 0.2rem;
}
.primary-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1.5px; background: var(--ember);
  transition: width .22s ease;
}
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after { width: 100%; }
.primary-nav a[aria-current="page"] { color: var(--charcoal); }
/* Client Login lives on the right; hide the in-menu copy on desktop
   (it reappears inside the mobile dropdown menu — see responsive rules). */
.primary-nav .client-login { display: none; }

.header-right { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.client-login {
  font-size: 0.9rem; font-weight: 600;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  color: var(--charcoal);
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.client-login:hover { border-color: var(--ember); color: var(--ember-deep); background: var(--ember-tint); }

.nav-toggle { display: none; background: none; border: 0; padding: 0.4rem; }
.nav-toggle span { display:block; width:22px; height:2px; background: var(--charcoal); margin: 4px 0; transition: .25s; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: min(88vh, 760px);
  display: flex; align-items: flex-end;
  color: var(--ink-fg);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,16,12,0.15) 0%, rgba(20,16,12,0.55) 55%, rgba(20,16,12,0.86) 100%),
    radial-gradient(120% 90% at 80% 10%, rgba(197,106,30,0.35), transparent 55%);
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(3rem, 8vw, 6rem); }
.hero h1 { color: #fff; max-width: 14ch; }
.hero .eyebrow { color: var(--ember-soft); }
.hero .eyebrow::before { background: var(--ember-soft); }
.hero__sub {
  color: rgba(245,239,230,0.86);
  font-size: clamp(1.08rem, 1.7vw, 1.35rem);
  line-height: 1.5;
  max-width: 52ch;
  margin-top: 1.6rem;
}
.hero .btn-row { margin-top: 2.2rem; }

/* Page hero (interior pages, no photo) */
.page-hero { padding-top: clamp(3.5rem, 7vw, 6rem); padding-bottom: clamp(2rem,4vw,3rem); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-top: 1.6rem; max-width: 62ch; }

/* ============================================================
   Section header
   ============================================================ */
.sec-head { max-width: 62ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head p { margin-top: 1.1rem; color: var(--slate); font-size: 1.1rem; }

/* ============================================================
   Discipline cards (Home "What we do", Expertise)
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
}
.card {
  grid-column: span 2;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: 2rem 1.9rem 1.8rem;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.section--tint .card { background: #fffdf9; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--ember-soft); }
/* bottom row: two cards centered on 6-col grid */
.card--offset-1 { grid-column: 2 / span 2; }
.card--offset-2 { grid-column: 4 / span 2; }

.card__num {
  font-family: var(--serif);
  font-size: 1.05rem; font-weight: 600;
  color: var(--ember);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: 0.7rem; }
.card p { color: var(--slate); font-size: 0.98rem; line-height: 1.6; flex: 1; }
.card .link-more { margin-top: 1.4rem; }

/* ============================================================
   Numbered principles / values
   ============================================================ */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.6rem 3rem;
}
.principle { display: flex; gap: 1.3rem; align-items: flex-start; }
.principle__num {
  font-family: var(--serif);
  font-size: 1.6rem; font-weight: 600;
  color: var(--ember);
  line-height: 1; min-width: 2.4ch;
  padding-top: 0.2rem;
}
.principle h3 { font-size: 1.28rem; margin-bottom: 0.4rem; }
.principle p { color: var(--slate); font-size: 0.98rem; }

/* ============================================================
   Trusted-by strip
   ============================================================ */
.trusted { text-align: center; }
.trusted p { color: var(--slate); font-size: 1.05rem; margin-bottom: 2rem; }
.logos {
  display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: clamp(1.5rem, 5vw, 3.5rem);
}
.logos li {
  font-family: var(--serif);
  font-size: 1.15rem; font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--slate-2);
  opacity: 0.85;
  transition: color .2s ease, opacity .2s ease;
}
.logos li:hover { color: var(--ember-deep); opacity: 1; }

/* ============================================================
   Feature band (image + text)
   ============================================================ */
.feature {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.feature--rev .feature__text { order: 2; }
.feature__media img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius);
  aspect-ratio: 5 / 4;
}
.feature__text h2 { margin-bottom: 1.2rem; }
.feature__text p { color: var(--slate); }
.feature__text .btn { margin-top: 1.8rem; }

/* ============================================================
   Closing band (ember image)
   ============================================================ */
.closing {
  position: relative;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.closing__media { position: absolute; inset: 0; z-index: 0; }
.closing__media img { width:100%; height:100%; object-fit: cover; }
.closing__media::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(20,12,6,0.55), rgba(20,12,6,0.72)),
              radial-gradient(90% 120% at 50% 0%, rgba(197,106,30,0.45), transparent 60%);
}
.closing__inner { position: relative; z-index: 1; padding-block: clamp(5rem, 11vw, 9rem); }
.closing h2 { color: #fff; font-size: clamp(2.2rem, 5.2vw, 4rem); max-width: 18ch; margin-inline: auto; }
.closing .btn { margin-top: 2.2rem; }

/* ============================================================
   Expertise practice rows
   ============================================================ */
.practice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.6rem, 5vw, 4rem);
  border-top: 1px solid var(--sand);
}
.practice:last-of-type { border-bottom: 1px solid var(--sand); }
.practice__num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600; color: var(--ember);
  line-height: 0.9;
}
.practice h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.practice p { color: var(--slate); max-width: 62ch; }
.focus { margin-top: 1.6rem; }
.focus__label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--slate-2);
  margin-bottom: 0.7rem;
}
.focus ul { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; }
.focus li {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: 0.95rem; font-weight: 500; color: var(--charcoal-2);
  background: var(--paper-2);
  border: 1px solid var(--sand);
  padding: 0.5rem 0.95rem; border-radius: 999px;
}
.focus li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }

/* ============================================================
   Careers roles
   ============================================================ */
.roles { display: grid; gap: 1.4rem; }
.role {
  background: #fffdf9;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3.5vw, 2.6rem);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.role__head h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.role__loc {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ember-deep); background: var(--ember-tint);
  padding: 0.35rem 0.8rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.role__head p { color: var(--slate); font-size: 1rem; }
.role__head .btn { margin-top: 1.6rem; }
.role__list .focus__label { margin-bottom: 1rem; }
.role__list ul { display: grid; gap: 0.8rem; }
.role__list li {
  position: relative; padding-left: 1.6rem;
  font-size: 0.96rem; color: var(--charcoal-2); line-height: 1.5;
}
.role__list li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ember); box-shadow: 0 0 0 3px var(--ember-tint);
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); }
.contact-block + .contact-block { margin-top: 2.4rem; }
.contact-block .focus__label { margin-bottom: 0.6rem; }
.contact-block a.big, .contact-block .big {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--charcoal); line-height: 1.3;
}
.contact-block a.big:hover { color: var(--ember-deep); }
.contact-block address { font-style: normal; color: var(--slate); font-size: 1.05rem; line-height: 1.6; }
.map-embed {
  width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--sand);
  border-radius: var(--radius); overflow: hidden; min-height: 320px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============================================================
   Auth (login)
   ============================================================ */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding-block: 4rem; background: var(--paper-2); }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--paper);
  border: 1px solid var(--sand);
  border-radius: 8px;
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: var(--shadow-md);
}
.auth-card .wordmark { font-size: 1.5rem; justify-content: center; margin-bottom: 1.4rem; }
.auth-card h1 { font-size: 1.9rem; text-align: center; margin-bottom: 0.4rem; }
.auth-card .sub-line { text-align: center; color: var(--slate); font-size: 0.98rem; margin-bottom: 1.8rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.45rem; color: var(--charcoal-2); }
.field input {
  width: 100%; font: inherit; font-size: 0.98rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--sand); border-radius: var(--radius);
  background: #fff; color: var(--charcoal);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px var(--ember-tint); }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 0.4rem; }
.auth-error {
  display: none;
  background: #fbeae0; border: 1px solid #e8b998;
  color: #9a3d12; font-size: 0.9rem; font-weight: 500;
  padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1.2rem;
}
.auth-error.show { display: block; }

/* ============================================================
   Legal (privacy / terms)
   ============================================================ */
.legal { max-width: 74ch; }
.legal .updated { color: var(--slate-2); font-size: 0.9rem; margin-bottom: 2.5rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2.6rem; margin-bottom: 0.9rem; }
.legal h3 { font-size: 1.15rem; margin-top: 1.6rem; margin-bottom: 0.5rem; }
.legal p { color: var(--slate); margin-bottom: 1rem; }
.legal ul { margin: 0 0 1rem 1.2rem; list-style: disc; color: var(--slate); }
.legal li { margin-bottom: 0.4rem; padding-left: 0.3rem; }
.legal a { color: var(--ember-deep); text-decoration: underline; text-underline-offset: 2px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--ink-bg); color: var(--ink-fg); padding-top: clamp(3.5rem,7vw,5.5rem); }
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: clamp(2rem,5vw,4rem); padding-bottom: 3.5rem; }
.footer-brand .wordmark { color: var(--ink-fg); font-size: 1.5rem; margin-bottom: 1.2rem; }
.footer-brand p { color: rgba(245,239,230,0.62); font-size: 0.95rem; max-width: 40ch; }
.footer-col h4 {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ember-soft); margin-bottom: 1.2rem;
}
.footer-col ul { display: grid; gap: 0.7rem; }
.footer-col a, .footer-col address {
  color: rgba(245,239,230,0.75); font-size: 0.95rem; font-style: normal; line-height: 1.6;
  transition: color .2s ease;
}
.footer-col a:hover { color: var(--ember-soft); }
.footer-bottom {
  border-top: 1px solid rgba(245,239,230,0.12);
  padding-block: 1.6rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
}
.footer-bottom p { color: rgba(245,239,230,0.55); font-size: 0.85rem; }
.footer-bottom .legal-links { display: flex; gap: 1.5rem; }
.footer-bottom a { color: rgba(245,239,230,0.6); font-size: 0.85rem; transition: color .2s ease; }
.footer-bottom a:hover { color: var(--ember-soft); }

/* ============================================================
   Scroll reveal
   ============================================================ */
/* Visible by default; only hidden (for animation) when JS is running */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .btn:hover { transform: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .primary-nav, .header-right .client-login { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-header.open .primary-nav {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--sand);
    padding: 1.2rem var(--gutter) 1.6rem; gap: 1.1rem;
  }
  .site-header.open .primary-nav .client-login,
  .site-header.open .primary-nav a { display: block; }

  /* Tablet: two columns, last (5th) card centered across both */
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .card, .card--offset-1, .card--offset-2 { grid-column: auto; }
  .card:nth-child(5) { grid-column: 1 / -1; max-width: 50%; margin-inline: auto; }

  .feature { grid-template-columns: 1fr; }
  .feature--rev .feature__text { order: 0; }
  .feature__media { order: -1; }
  .role { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
  .card, .card--offset-1, .card--offset-2 {
    grid-column: auto; max-width: none; margin-inline: 0; display: flex;
  }
  .card:nth-child(5) { max-width: none; }
  .principles { grid-template-columns: 1fr; gap: 2rem; }
  .practice { grid-template-columns: 1fr; gap: 0.8rem; }
  .hero { min-height: 78vh; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
