/* ===================================================================
   Mend Advisory — natural blue & green consulting site
   Palette leans on river blues and soft greens (stream / sage / moss),
   with a quiet ochre "ember" kept only as a subtle warm accent.
   =================================================================== */

:root {
  /* Neutrals — soft warm paper & sand */
  --paper:        #f4f2ec;   /* page background */
  --paper-soft:   #faf9f4;   /* cards / alternating background */
  --mist:         #ece6d8;   /* warm sand band (section bands) */
  --mist-deep:    #d6cdb9;   /* borders on light */

  /* Blues — warm teal-river (PRIMARY accents) */
  --river:        #2b7c92;   /* PRIMARY accent (buttons, links, marks) */
  --river-deep:   #1d6076;
  --stream:       #3f8ba1;   /* secondary blue accent */
  --stream-deep:  #2a6e85;
  --stream-soft:  #93c1cd;

  /* Warm accents — terracotta & tan (for pop) */
  --clay:         #c66a3b;
  --clay-deep:    #a5532a;
  --ember:        #d99a5c;   /* lighter amber/tan for tints */

  /* Greens — natural accent note */
  --sage:         #6f9182;
  --sage-deep:    #4e7163;
  --moss:         #5e8050;
  --moss-deep:    #456237;

  /* Deep naturals & text (deep teal-blue) */
  --heading:      #1d3a44;   /* headings + dark "Services" section bg */
  --heading-soft: #3b4f56;
  --spruce:       #20525a;   /* contact section bg (deep teal) */
  --ink:          #262e2d;   /* body text */
  --muted:        #6c7069;
  --line:         rgba(40, 50, 50, 0.13);

  --maxw: 1140px;
  --r:    16px;
  --r-sm: 10px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --shadow-sm: 0 1px 2px rgba(40,45,40,.06), 0 4px 14px rgba(40,45,40,.06);
  --shadow-md: 0 8px 26px rgba(40,45,40,.12), 0 2px 6px rgba(40,45,40,.07);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.01em; color: var(--heading); }
em { font-style: italic; }
a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 0.98rem;
  padding: 14px 26px; border-radius: 999px;
  cursor: pointer; border: 1.5px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--river); color: var(--paper-soft); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--river-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--mist-deep); }
.btn-ghost:hover { border-color: var(--clay); color: var(--clay-deep); transform: translateY(-2px); }
.btn-ghost-light { background: transparent; color: var(--paper-soft); border-color: rgba(242,244,239,.4); }
.btn-ghost-light:hover { border-color: var(--paper-soft); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 241, 231, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(31,53,64,.05); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--river); }
.brand-mark { width: 46px; height: auto; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.32rem; color: var(--heading); letter-spacing: -0.01em; }
.brand-name-light { color: var(--muted); font-weight: 400; }

.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { font-size: 0.96rem; font-weight: 500; color: var(--heading-soft); transition: color .15s ease; }
.site-nav a:hover { color: var(--river-deep); }
.site-nav .nav-cta {
  background: var(--heading); color: var(--paper-soft);
  padding: 10px 20px; border-radius: 999px; font-weight: 600;
}
.site-nav .nav-cta:hover { background: var(--river); color: var(--paper-soft); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--heading); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { display: none; flex-direction: column; padding: 0 28px; background: var(--paper-soft); border-bottom: 1px solid var(--line); overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.mobile-nav.open { max-height: 460px; }
.mobile-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); font-weight: 500; color: var(--heading-soft); }
.mobile-nav a:last-child { border-bottom: 0; color: var(--river-deep); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(72px, 12vw, 150px) 0 clamp(64px, 9vw, 120px);
  background:
    radial-gradient(120% 90% at 88% -12%, rgba(198,106,59,0.12), transparent 58%),
    radial-gradient(95% 85% at 22% 120%, rgba(43,124,146,0.18), transparent 58%),
    radial-gradient(110% 85% at 0% 112%, rgba(94,128,80,0.10), transparent 55%),
    var(--paper);
}
.hero-line { position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.hero-line svg { width: 100%; height: 100%; }
.hero-inner { position: relative; max-width: 880px; }

.eyebrow {
  display: inline-block; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--clay-deep); margin-bottom: 22px;
  padding: 7px 15px; border: 1px solid rgba(198,106,59,.45); border-radius: 999px; background: rgba(217,154,92,.12);
}
.hero-title { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 500; letter-spacing: -0.02em; }
.hero-title em { color: var(--river); }
.hero-sub { margin-top: 26px; font-size: clamp(1.08rem, 1.7vw, 1.32rem); color: var(--heading-soft); max-width: 660px; }
.hero-actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(64px, 9vw, 116px) 0; }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-kicker {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--clay-deep); margin-bottom: 16px;
}
.section-kicker.light { color: var(--ember); }
.approach .section-kicker { color: var(--moss-deep); }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.section-intro, .section-head .section-intro { margin-top: 18px; font-size: 1.1rem; color: var(--heading-soft); }

/* ---------- Situation ---------- */
.situation { background: var(--paper-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.situation-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.lede { font-family: var(--serif); font-size: clamp(1.25rem, 2.3vw, 1.7rem); line-height: 1.4; color: var(--heading); font-weight: 400; }
.pain-list { list-style: none; display: grid; gap: 22px; }
.pain-list li { padding-left: 22px; border-left: 3px solid var(--clay); }
.pain-list h3 { font-size: 1.18rem; font-family: var(--serif); margin-bottom: 5px; }
.pain-list p { color: var(--muted); font-size: 1rem; }

/* ---------- Approach ---------- */
.approach { background:
  radial-gradient(100% 80% at 100% 0%, rgba(118,138,111,0.10), transparent 55%), var(--paper); }
.approach-inner { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(40px, 6vw, 84px); align-items: start; }
.approach-story { position: sticky; top: 104px; }
.approach-story h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 22px; }
.approach-story p { color: var(--heading-soft); margin-bottom: 18px; }
.approach-story em { color: var(--river-deep); font-style: italic; }
.approach-mark { display: block; width: clamp(140px, 22vw, 200px); height: auto; margin-top: 36px; opacity: .9; }

.approach-principles { display: grid; gap: 20px; }
.principle {
  position: relative; background: var(--paper-soft); border: 1px solid var(--line);
  border-radius: var(--r); padding: 28px 30px 28px 30px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.principle:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.principle-num { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--clay); letter-spacing: .04em; }
.principle h3 { font-size: 1.28rem; margin: 8px 0 8px; }
.principle p { color: var(--muted); font-size: 1.01rem; }

/* ---------- Services ---------- */
.services { background: var(--heading); color: var(--paper); }
.services .section-kicker { color: var(--ember); }
.services .section-head h2 { color: var(--paper); }
.services .section-intro { color: rgba(242,244,239,.78); }
.service-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  max-width: 920px;
  margin: 0 auto;
}
.service-card {
  background: rgba(242,244,239,0.045); border: 1px solid rgba(242,244,239,0.12);
  border-radius: var(--r); padding: 32px 28px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-4px); background: rgba(242,244,239,0.075); border-color: rgba(138,170,187,.55); }
.service-icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px;
  background: rgba(63,139,161,.22); color: #8fcad9; font-size: 1.4rem; margin-bottom: 20px;
}
/* Rotate icon accent colors across the cards for visual interest */
.service-card:nth-child(3n+2) .service-icon { background: rgba(198,106,59,.22); color: #e6a06b; }
.service-card:nth-child(3n+3) .service-icon { background: rgba(94,128,80,.26); color: #a3c78d; }
.service-card h3 { color: var(--paper); font-size: 1.26rem; margin-bottom: 10px; }
.service-card p { color: rgba(242,244,239,.74); font-size: 1rem; }

/* "A note on fit" — quieter sub-block inside Services */
.note-on-fit {
  margin: clamp(56px, 8vw, 88px) auto 0;
  max-width: 760px;
  border-top: 1px solid rgba(242,244,239,0.18);
  padding-top: clamp(36px, 5vw, 52px);
}
.note-on-fit h3 {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 16px;
}
.note-on-fit p {
  color: rgba(242,244,239,0.86);
  font-size: 1.04rem;
  line-height: 1.6;
  margin-bottom: 16px;
}
.note-on-fit p:last-child { margin-bottom: 0; }

/* ---------- Work ---------- */
.work { background: var(--mist); }
.work .section-kicker { color: var(--stream-deep); }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.work-card {
  background: var(--paper-soft); border-radius: var(--r); padding: 40px;
  border: 1px solid rgba(31,53,64,.08); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.work-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--clay), var(--river), var(--moss)); }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.work-tag { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-deep); margin-bottom: 16px; }
.work-card h3 { font-size: 1.42rem; margin-bottom: 14px; }
.work-card p { color: var(--heading-soft); }

/* ---------- About ---------- */
.about { background: var(--paper); }
.about-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 6vw, 80px); align-items: start; }
.about-intro h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 22px; }
.about-intro p { color: var(--heading-soft); margin-bottom: 18px; }
.about-intro strong { color: var(--heading); font-weight: 600; }
.about-cta { margin-top: 12px; }

.about-credentials { display: grid; gap: 28px; background: var(--paper-soft); border: 1px solid var(--line); border-radius: var(--r); padding: 36px 34px; box-shadow: var(--shadow-sm); }
.cred-block h3 { font-size: 0.82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sage-deep); font-family: var(--sans); font-weight: 600; margin-bottom: 14px; }
.cred-block ul { list-style: none; display: grid; gap: 14px; }
.cred-block li { display: flex; flex-direction: column; }
.cred-block li strong { font-family: var(--serif); font-weight: 500; color: var(--heading); font-size: 1.05rem; }
.cred-block li span { color: var(--muted); font-size: 0.92rem; }
.cred-tags { gap: 9px !important; }
.cred-tags li { color: var(--heading-soft); font-size: 0.96rem; padding-left: 18px; position: relative; }
.cred-tags li::before { content: "—"; position: absolute; left: 0; color: var(--ember); }

/* ---------- Contact ---------- */
.contact {
  position: relative; overflow: hidden; text-align: center;
  background:
    radial-gradient(120% 100% at 50% -5%, rgba(198,106,59,0.20), transparent 58%),
    radial-gradient(110% 120% at 10% 112%, rgba(43,124,146,0.55), transparent 58%),
    radial-gradient(95% 110% at 92% 0%, rgba(63,139,161,0.45), transparent 55%),
    var(--spruce);
  color: var(--paper);
}
.contact-line { position: absolute; inset: 0; opacity: .8; pointer-events: none; }
.contact-line svg { width: 100%; height: 100%; }
.contact-inner { position: relative; max-width: 760px; margin: 0 auto; }
.contact h2 { color: var(--paper); font-size: clamp(1.8rem, 3.5vw, 2.7rem); }
.contact p { color: rgba(242,244,239,.84); margin-top: 18px; font-size: 1.12rem; }
.contact-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.contact-loc { margin-top: 30px !important; font-size: 0.92rem; color: rgba(242,244,239,.6) !important; letter-spacing: .04em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--heading); color: rgba(242,244,239,.72); padding: 48px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sage); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.footer-brand .brand-mark { width: 42px; }
.footer-note { color: rgba(242,244,239,.6); font-size: 0.96rem; }
.footer-copy { color: rgba(242,244,239,.42); font-size: 0.85rem; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--paper-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.testimonials .section-kicker { color: var(--stream-deep); }
.quote-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
/* A single testimonial centers and reads as a feature pull-quote */
.quote-grid[data-count="1"] { max-width: 820px; margin: 0 auto; }
.quote-card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 40px 38px 32px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
}
.quote-card::before {
  content: "\201C"; font-family: var(--serif); color: var(--clay);
  font-size: 4.6rem; line-height: .6; opacity: .5; margin-bottom: 10px;
}
.quote-card blockquote { font-family: var(--serif); font-size: 1.18rem; line-height: 1.5; color: var(--heading); font-weight: 400; }
.quote-grid[data-count="1"] .quote-card blockquote { font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.45; }
.quote-cite { margin-top: 22px; display: flex; flex-direction: column; gap: 2px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote-cite .q-name { font-weight: 600; color: var(--heading); }
.quote-cite .q-title { color: var(--muted); font-size: 0.95rem; }

/* ---------- Thought leadership / Writing ---------- */
.writing { background: var(--paper); }
.writing .section-kicker { color: var(--moss-deep); }
.writing-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 44px; }
.writing-head .section-head { margin-bottom: 0; }
.article-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.article-card {
  display: flex; flex-direction: column; background: var(--paper-soft);
  border: 1px solid var(--line); border-radius: var(--r); padding: 30px 28px;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--stream-soft); }
.article-source { font-size: 0.76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--stream-deep); margin-bottom: 14px; display: inline-flex; align-items: center; gap: 8px; }
.article-source::before { content: ""; width: 18px; height: 2px; background: var(--stream); border-radius: 2px; }
.article-card h3 { font-size: 1.22rem; line-height: 1.25; margin-bottom: 10px; }
.article-card p { color: var(--muted); font-size: 0.98rem; flex: 1; }
.article-link { margin-top: 18px; font-weight: 600; font-size: 0.95rem; color: var(--clay-deep); display: inline-flex; align-items: center; gap: 6px; }
.article-card:hover .article-link { gap: 10px; }
.writing-note { margin-top: 32px; font-size: 0.95rem; color: var(--muted); }
.writing-note a { color: var(--stream-deep); font-weight: 600; border-bottom: 1px solid var(--stream-soft); }

/* ---------- About portrait & side column ---------- */
.about-side { display: grid; gap: 28px; align-content: start; }
.about-portrait { margin: 0; }
.about-portrait img {
  width: 100%; height: auto; display: block; border-radius: var(--r);
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.about-portrait figcaption {
  margin-top: 14px; font-family: var(--serif); color: var(--heading); font-size: 1.05rem;
  display: flex; flex-direction: column;
}
.about-portrait figcaption span { font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.about-portrait .portrait-accent { display: block; width: 46px; height: 3px; background: linear-gradient(90deg, var(--river), var(--clay)); border-radius: 3px; margin-bottom: 12px; }

/* Earlier-career list inside credentials */
.cred-block .cred-sub { color: var(--muted); font-size: 0.85rem; margin-top: -6px; }

/* ===================================================================
   PHOTO HERO  —  toggled by `body.hero-photo` (see <body> in index.html).
   Full-bleed autumn-river photo with a legibility scrim + light text,
   and a transparent header that turns solid on scroll.
   Remove the body class to return to the gradient hero.
   =================================================================== */
body.hero-photo .hero {
  min-height: min(86vh, 760px);
  display: flex; align-items: center;
  background:
    linear-gradient(90deg, rgba(16,28,30,0.80) 0%, rgba(16,28,30,0.44) 40%, rgba(16,28,30,0.12) 66%, rgba(16,28,30,0.32) 100%),
    linear-gradient(to bottom, rgba(16,28,30,0.45) 0%, rgba(16,28,30,0) 16%, rgba(16,28,30,0) 58%, rgba(16,28,30,0.55) 100%),
    url("assets/hero-river.jpg") center 40% / cover no-repeat;
}
body.hero-photo .hero-line { display: none; }
body.hero-photo .eyebrow {
  color: #fff; border-color: rgba(217,154,92,0.9); background: rgba(16,28,30,0.32);
}
body.hero-photo .hero-title { color: #fff; text-shadow: 0 2px 22px rgba(0,0,0,0.5); }
body.hero-photo .hero-title em { color: #ffd6a6; }
body.hero-photo .hero-sub { color: rgba(255,255,255,0.94); text-shadow: 0 1px 12px rgba(0,0,0,0.55); }
body.hero-photo .hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.55); }
body.hero-photo .hero .btn-ghost:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.10); }

/* Keep the normal solid header visible at all times over the photo
   (so the logo + menu are always present, not just after scrolling). */
body.hero-photo .site-header {
  background: rgba(244,242,236,0.92);
  border-bottom: 1px solid var(--line);
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .situation-grid, .approach-inner, .about-inner { grid-template-columns: 1fr; }
  .approach-story { position: static; }
  .service-cards { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav { display: flex; }
}
@media (max-width: 720px) {
  .service-cards { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

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