/* ==========================================================================
   ImpACT Consulting — Site Stylesheet
   No framework. Plain CSS with custom properties.
   Tokens below match Brand Guidelines v1.0 (July 2026) exactly — same
   variable names as the guidelines doc so future handoff stays 1:1.
   ========================================================================== */

:root {
  /* Neutrals */
  --cream: #e6dbd0;
  --cream-dark: #d7cfc6;
  --white: #ffffff;

  /* Dark teal — ink & dark sections */
  --navy: #264653;
  --navy-light: #566f79;
  --navy-muted: #47626d;   /* secondary/caption text on cream */
  --navy-faint: #8899a0;   /* large display/decorative only — never body copy */

  /* Teal — primary accent (CTAs, links) */
  --teal: #2a9d8f;
  --teal-ink: #276468;     /* accessible text/hover on teal */
  --teal-light: #9fd3cd;
  --teal-pale: #cad2c6;

  /* Sage — supporting */
  --sage: #81b29a;
  --sage-light: #bad5c7;
  --sage-pale: #d2d3c5;

  /* Rose / Gold exist for Stage Ready only — intentionally NOT defined here.
     Never introduce --rose or --gold on the ImpACT Consulting marketing site. */

  /* Semantic aliases used throughout this file.
     NOTE on --color-primary: the guidelines define raw --teal as the CTA/
     link "tone" but explicitly call --teal-ink "accessible text/hover" —
     measured contrast confirms why: white-on-teal is 3.32:1 and teal-on-cream
     is 2.44:1, both fail WCAG AA. teal-ink passes comfortably (6.75:1 / 4.96:1)
     with the exact same visual "teal" identity, so it's the default here;
     raw --teal is reserved for large decorative surfaces / icon fills only. */
  --color-bg: var(--cream);
  --color-bg-alt: var(--cream-dark);
  --color-bg-card: var(--white);
  --color-text: var(--navy);
  --color-text-soft: var(--navy-muted);
  --color-primary: var(--teal-ink);
  --color-primary-dark: var(--navy);
  --color-accent: var(--navy);
  --color-accent-soft: var(--sage-pale);
  --color-line: var(--cream-dark);

  /* Typography — Playfair Display (display serif) + Gilroy (body/UI sans).
     Gilroy is licensed and self-hosted as .woff2 below (see @font-face).
     Poppins remains as a web-safe fallback while fonts load / for any
     environment where the local files aren't available. */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Gilroy", "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1120px;
  --radius: 10px;
  --shadow-card: 0 1px 2px rgba(38,70,83,0.08), 0 6px 20px rgba(38,70,83,0.07);
  --focus-ring: 0 0 0 3px rgba(42,157,143,0.45);
}

/* Gilroy — licensed, self-hosted */
@font-face {
  font-family: "Gilroy";
  src: url("/assets/fonts/Gilroy-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("/assets/fonts/Gilroy-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("/assets/fonts/Gilroy-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("/assets/fonts/Gilroy-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Gilroy";
  src: url("/assets/fonts/Gilroy-Heavy.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.25em; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-primary); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Accessibility baseline (Brand Guidelines v1.0): visible teal focus ring on
   every interactive element; never rely on color alone. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--color-line);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 24px;
}
/* Wordmark lockup: real logo file (assets/images/logo-black.png). */
.logo {
  display: inline-flex;
  align-items: center;
}
.logo img {
  height: 56px;
  width: auto;
  display: block;
}
.site-footer .logo img { height: 68px; }
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--navy);
}
.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.98rem;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--color-primary); text-decoration: none; }
.has-dropdown { position: relative; }
/* Selector is scoped to .has-dropdown (not just .dropdown) so this beats
   .primary-nav ul's `display: flex` on specificity — .dropdown is itself a
   <ul> nested inside .primary-nav ul, so it matches that rule too, and
   without the extra class here .primary-nav ul used to win and force the
   dropdown visible at all times regardless of hover state. */
.has-dropdown .dropdown {
  list-style: none;
  position: absolute;
  /* top:100% with zero margin means the dropdown's box (including its
     padding) starts flush against the nav link — no gap in between for
     the mouse to fall out of on the way down. The 8px visual gap that
     used to be a margin (a dead zone outside both hoverable elements) is
     now top padding instead (still part of the hoverable .dropdown box). */
  top: 100%;
  left: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  min-width: 260px;
  padding: 16px 8px 8px;
  margin: 0;
  display: none;
  gap: 0;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 500;
}
.dropdown li a:hover { background: var(--color-bg-alt); text-decoration: none; }
.nav-cta {
  background: var(--color-primary);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
}
.nav-cta:hover { background: var(--color-primary-dark); }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-line);
    display: none;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
  }
  .primary-nav li { border-top: 1px solid var(--color-line); }
  .primary-nav li:first-child { border-top: none; }
  .primary-nav a { display: block; padding: 14px 4px; }
  .dropdown {
    position: static; display: block; border: none; box-shadow: none;
    padding: 0 0 0 12px; margin: 0;
  }
  .has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { display: block; }
  .nav-cta { display: inline-block; margin-top: 10px; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  text-align: center;
}
.hero .eyebrow {
  display: inline-block;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 { max-width: 900px; margin-left: auto; margin-right: auto; }
.hero .lede {
  max-width: 640px;
  margin: 18px auto 30px;
  font-size: 1.15rem;
  color: var(--color-text-soft);
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero.align-left { text-align: left; }
.hero.align-left .lede { margin-left: 0; }
.hero.align-left .hero-actions { justify-content: flex-start; }
.hero.align-left h1 { margin-left: 0; }

/* ---------- Icons (Lucide, via CDN, currentColor-driven) ---------- */
.icon-well {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--sage-pale);
  color: var(--teal-ink);
  margin-bottom: 16px;
}
.icon-well [data-lucide] { width: 26px; height: 26px; stroke-width: 1.9; }
.icon-inline { width: 17px; height: 17px; stroke-width: 1.9; vertical-align: -3px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.footer-social [data-lucide] { width: 20px; height: 20px; stroke-width: 1.9; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); text-decoration: none; color: #fff; }
.btn-outline { border-color: var(--color-text); color: var(--color-text); background: transparent; }
.btn-outline:hover { background: var(--color-text); color: var(--color-bg); text-decoration: none; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head.align-left { margin-left: 0; text-align: left; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 24px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-card);
}
.card h3 { margin-bottom: 10px; }
/* Bold accent variant: dark navy card for calling out a block against the
   otherwise cream/white page (e.g. contact page sidebar). Matches the
   dark navy full-bleed sections from the original brand design instead of
   defaulting every card to white. */
.card-accent {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--cream);
}
.card-accent h3 { color: #fff; }
.card-accent a { color: var(--teal-light); }
.card-accent a:hover { color: #fff; }
.card-accent .small { color: var(--teal-light); }

/* ---------- Full-bleed color sections ---------- */
/* Bold navy and sage sections, matching the original brand design's
   color-blocking (not every section needs to be cream/white). Cards placed
   inside use .card-on-navy rather than the plain .card so text stays
   legible against the darker background. */
.section-navy {
  background: var(--navy);
  color: var(--cream);
}
.section-navy h2 { color: #fff; }
.section-navy .section-head p { color: var(--teal-light); }
.section-navy .lede { color: var(--teal-light); }

.section-sage {
  background: var(--sage);
  color: var(--navy);
}
.section-sage h2 { color: var(--navy); }
.section-sage .section-head p { color: var(--navy); }

.card-on-navy {
  background: var(--sage-pale);
  border: none;
  color: var(--navy);
}
.card-on-navy .tag { background: var(--navy); color: #fff; }
.card-on-navy .icon-well { background: var(--navy); color: var(--sage-light); }

/* ---------- Photo grid (mosaic-style, used in full-bleed sage section) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 140px);
  gap: 12px;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.photo-grid .ph-1 { grid-column: 1 / 3; grid-row: 1 / 3; }
.photo-grid .ph-2 { grid-column: 3 / 5; grid-row: 1 / 2; }
.photo-grid .ph-3 { grid-column: 5 / 7; grid-row: 1 / 2; }
.photo-grid .ph-4 { grid-column: 3 / 5; grid-row: 2 / 3; }
.photo-grid .ph-5 { grid-column: 5 / 7; grid-row: 2 / 3; }
@media (max-width: 720px) {
  /* ph-1 and ph-5 are portrait source photos — keep ph-1 spanning 2 rows
     (tall slot) on mobile too, instead of squashing it into a wide short
     tile, which is what was cropping it awkwardly (cutting off faces)
     on small screens. */
  .photo-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 130px); }
  .photo-grid .ph-1 { grid-column: 1 / 2; grid-row: 1 / 3; }
  .photo-grid .ph-2 { grid-column: 2 / 3; grid-row: 1 / 2; }
  .photo-grid .ph-3 { grid-column: 2 / 3; grid-row: 2 / 3; }
  .photo-grid .ph-4 { grid-column: 1 / 2; grid-row: 3 / 4; }
  .photo-grid .ph-5 { grid-column: 2 / 3; grid-row: 3 / 4; }
}

/* Single feature photo alongside text (About hero, service page intros).
   aspect-ratio keeps the same crop framing at every viewport width —
   a fixed max-height in px instead would change the effective crop
   ratio as the box's width changes (very wide+short on desktop, way too
   narrow+tall on mobile), which is what was cropping faces out on small
   screens. Default is portrait-friendly for single-person hero photos;
   .photo-feature-wide is for banner-style shots with more than one
   person, where the important content is a wider horizontal band. */
.photo-feature {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  object-fit: cover;
}
.photo-feature-wide { aspect-ratio: 16 / 10; }
.card .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.card-link { font-weight: 700; }

/* ---------- Logos / trust strip ---------- */
.trust-strip {
  padding: 28px 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}
.trust-strip p {
  text-align: center;
  color: var(--color-text-soft);
  font-size: 0.95rem;
  margin: 0;
}
.trust-strip .label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--color-text-soft);
  margin-bottom: 10px;
}

/* ---------- Testimonials ---------- */
.testimonial {
  border-left: 3px solid var(--color-primary);
  padding-left: 20px;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-text);
}
.testimonial cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--color-text-soft);
}

/* ---------- FAQ ---------- */
details.faq {
  border-bottom: 1px solid var(--color-line);
  padding: 18px 0;
}
details.faq summary {
  font-weight: 700;
  cursor: pointer;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-left: 12px;
}
details.faq[open] summary::after { content: "\2212"; }
details.faq p { margin-top: 12px; color: var(--color-text-soft); }

/* ---------- Forms ---------- */
form.stacked-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}
form.stacked-form label {
  font-weight: 700;
  font-size: 0.92rem;
  display: block;
  margin-bottom: 6px;
}
form.stacked-form input,
form.stacked-form select,
form.stacked-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
}
form.stacked-form textarea { min-height: 140px; resize: vertical; }

/* HoneyBook embedded contact form. The card itself is site styling; the
   fields inside are rendered by HoneyBook's widget script and follow
   HoneyBook's own theme settings, not this stylesheet. min-height keeps
   the card from collapsing to nothing before the widget script loads. */
.hb-embed { min-height: 420px; }

/* ---------- Articles ---------- */
.article-card { display: flex; flex-direction: column; height: 100%; }
.article-card .meta {
  font-size: 0.82rem;
  color: var(--color-text-soft);
  margin-bottom: 8px;
}
.article-body {
  max-width: 720px;
  margin: 0 auto;
}
.article-body h2 { margin-top: 1.6em; }
.article-body p { font-size: 1.08rem; }
.byline {
  color: var(--color-text-soft);
  font-size: 0.92rem;
  margin-bottom: 2.2em;
}
#substack-feed .card { min-height: 100%; }
.feed-status { color: var(--color-text-soft); font-size: 0.92rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-line);
  background: var(--color-bg-alt);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  color: var(--color-text-soft);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--color-text); }
.footer-social { display: flex; gap: 14px; margin-top: 14px; }
.footer-bottom {
  border-top: 1px solid var(--color-line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.9rem; color: var(--color-text-soft); }
