/* ============================================================
   Marcus Druen — Change Catalyst
   Mobile-first editorial redesign
   Display: Marcellus · Body: PT Serif · UI: system sans
   ============================================================ */

:root {
  /* palette — warm, chosen neutrals */
  --ground:     #faf7f2;   /* warm ivory */
  --sand:       #f2ede4;   /* warm sand band */
  --espresso:   #241f1c;   /* warm near-black */
  --espresso-2: #322b26;   /* raised dark surface */
  --ink:        #2b2521;   /* body text on light */
  --muted:      #6b625b;   /* warm grey-brown */
  --muted-dk:   #b3a89c;   /* muted on dark */
  --accent:     #e4472d;   /* brand vermilion */
  --accent-dk:  #c5361f;
  --hairline:   #e6ddcf;   /* warm rule */
  --hairline-dk:#463d37;

  /* type */
  --f-display: "Marcellus", "Times New Roman", serif;
  --f-body:    "PT Serif", Georgia, serif;
  --f-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* fluid type scale */
  --t-cap:  .78rem;
  --t-body: 1.0625rem;
  --t-lead: clamp(1.12rem, 1.02rem + .5vw, 1.32rem);
  --t-h3:   clamp(1.3rem, 1.05rem + 1.1vw, 1.7rem);
  --t-h2:   clamp(1.9rem, 1.4rem + 2.4vw, 2.9rem);
  --t-h1:   clamp(2.4rem, 1.7rem + 3.4vw, 3.9rem);

  /* rhythm */
  --pad-block: clamp(60px, 10vw, 128px);
  --pad-inline: clamp(22px, 6vw, 44px);
  --max: 1120px;
  --measure: 66ch;
  --radius: 4px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.72;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: .2px;
  text-wrap: balance;
  margin: 0 0 .5em;
  color: var(--espresso);
}
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

p { margin: 0 0 1.1em; max-width: var(--measure); }
a { color: var(--accent); text-decoration: none; transition: color .18s; }
a:hover { color: var(--accent-dk); }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }

.eyebrow {
  font-family: var(--f-ui);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: var(--t-cap);
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 1rem;
}
.lead { font-size: var(--t-lead); line-height: 1.6; color: var(--ink); }
.muted { color: var(--muted); }
.divider { width: 54px; height: 2px; background: var(--accent); border: 0; margin: 1.4rem 0; }

/* ---------- layout primitives ---------- */
.section { padding: var(--pad-block) var(--pad-inline); }
.wrap { max-width: var(--max); margin-inline: auto; }
.narrow { max-width: 720px; margin-inline: auto; }

.band-ivory { background: var(--ground); }
.band-sand  { background: var(--sand); }
.band-dark  { background: var(--espresso); color: #efe7dd; }
.band-dark h1, .band-dark h2, .band-dark h3, .band-dark h4 { color: #fff; }
.band-dark .lead { color: #e7ddd2; }
.band-dark .muted { color: var(--muted-dk); }
.band-dark p { color: #ded4c9; }

/* ---------- buttons ---------- */
.btn {
  font-family: var(--f-ui);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, transform .12s;
}
.btn:hover { background: var(--accent-dk); border-color: var(--accent-dk); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent); color: #fff; }
.band-dark .btn.ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.band-dark .btn.ghost:hover { background: #fff; color: var(--espresso); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6rem; }
.btn-row.center { justify-content: center; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s, padding .25s;
}
.site-header.scrolled { border-bottom-color: var(--hairline); }
.nav {
  max-width: 1240px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px var(--pad-inline);
}
.brand {
  font-family: var(--f-display);
  font-size: 1.05rem; letter-spacing: .3px; line-height: 1.2;
  color: var(--espresso); max-width: 60vw;
}
.brand:hover { color: var(--espresso); }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; }
.nav-cta { display: none; }
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 46px; height: 46px; padding: 11px; margin: -4px;
  background: none; border: 0; cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--espresso); border-radius: 2px; transition: transform .3s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile overlay menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 150;
  background: var(--ground);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad-inline);
  visibility: hidden;
}
.nav-open .mobile-menu { transform: translateX(0); visibility: visible; }
.mobile-menu ul { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mobile-menu a {
  font-family: var(--f-display); font-size: clamp(1.7rem, 8vw, 2.4rem);
  color: var(--espresso); display: block; padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 9vw, 92px) var(--pad-inline) var(--pad-block); }
.hero-grid { max-width: 1200px; margin-inline: auto; display: grid; gap: clamp(28px, 6vw, 64px); }
.hero-photo {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 5; box-shadow: 0 30px 60px -24px rgba(36,31,28,.5);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { margin-top: .3rem; }
.hero .kicker { font-family: var(--f-display); font-size: var(--t-lead); font-style: italic; color: var(--muted); max-width: 30ch; }

/* ---------- media rows ---------- */
.media { display: grid; gap: clamp(28px, 6vw, 60px); align-items: center; }
.media-photo { border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 48px -26px rgba(36,31,28,.45); }
.media-photo img { width: 100%; display: block; }
.pull {
  font-family: var(--f-display); font-size: clamp(1.3rem, 1rem + 1.4vw, 1.7rem);
  line-height: 1.42; color: var(--espresso);
  border-left: 3px solid var(--accent); padding-left: 22px; margin: 0 0 1.6rem;
  max-width: 26ch;
}
.band-dark .pull { color: #fff; }

/* ---------- accordion (pillars) ---------- */
.accordion { border-top: 1px solid var(--hairline); margin-top: 1.8rem; }
.acc-item { border-bottom: 1px solid var(--hairline); }
.acc-head {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 20px 2px; min-height: 56px;
  font-family: var(--f-display); font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); color: var(--espresso);
}
.acc-head:hover { color: var(--accent); }
.acc-icon { position: relative; flex: 0 0 auto; width: 22px; height: 22px; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; transition: transform .3s, opacity .3s; }
.acc-icon::before { top: 10px; left: 0; width: 22px; height: 2px; }
.acc-icon::after  { left: 10px; top: 0; width: 2px; height: 22px; }
.acc-item.open .acc-icon::after { transform: rotate(90deg); opacity: 0; }
.acc-panel { overflow: hidden; height: 0; transition: height .38s ease; }
.acc-inner { padding: 2px 2px 24px; }
.acc-inner h4 { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .14em; font-size: .74rem; color: var(--accent); margin: 1.3rem 0 .45rem; }
.acc-inner h4:first-child { margin-top: 0; }
.acc-inner p { margin-bottom: 0; }

/* ---------- services (+ expanders) ---------- */
.services { display: grid; gap: 18px; margin-top: 2.2rem; }
.service {
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .25s, border-color .25s;
}
.service.open { box-shadow: 0 22px 44px -28px rgba(36,31,28,.5); border-color: #ddd0bd; }
.service-head {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  display: flex; align-items: flex-start; gap: 18px; padding: clamp(20px, 4vw, 30px);
}
.service-transition { font-family: var(--f-ui); color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 600; margin-bottom: 9px; line-height: 1.4; }
.service-title { font-family: var(--f-display); font-size: clamp(1.35rem, 1.1rem + 1.2vw, 1.85rem); color: var(--espresso); margin: 0; line-height: 1.15; }
.service-sub { font-family: var(--f-body); color: var(--muted); font-style: italic; margin: 7px 0 0; font-size: .98rem; max-width: none; }
.service-plus {
  margin-left: auto; flex: 0 0 auto; position: relative;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--accent); transition: background .22s, transform .3s;
}
.service-plus::before, .service-plus::after { content: ""; position: absolute; top: 50%; left: 50%; background: var(--accent); transition: background .22s, transform .3s; }
.service-plus::before { width: 15px; height: 2px; transform: translate(-50%,-50%); }
.service-plus::after  { width: 2px; height: 15px; transform: translate(-50%,-50%); }
.service:hover .service-plus { background: var(--accent); }
.service:hover .service-plus::before, .service:hover .service-plus::after { background: #fff; }
.service.open .service-plus { background: var(--accent); transform: rotate(135deg); }
.service.open .service-plus::before, .service.open .service-plus::after { background: #fff; }
.service-body { overflow: hidden; height: 0; transition: height .42s ease; }
.service-inner { padding: 0 clamp(20px, 4vw, 30px) clamp(26px, 4vw, 34px); }
.service-inner > .frame { border-top: 1px solid var(--hairline); padding-top: 22px; }
.service-inner img { border-radius: var(--radius); margin: 4px 0 6px; box-shadow: 0 16px 32px -20px rgba(36,31,28,.5); }
.service-inner h4 { font-family: var(--f-ui); text-transform: uppercase; letter-spacing: .13em; font-size: .74rem; color: var(--accent); margin: 1.5rem 0 .5rem; }
.service-inner ul { margin: .2rem 0 1rem; padding-left: 1.15em; }
.service-inner li { margin-bottom: .5em; max-width: var(--measure); }
.service-inner li::marker { color: var(--accent); }

/* ---------- upward spiral ---------- */
.spiral { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: 2px; }
.spiral li { display: flex; gap: 14px; align-items: baseline; padding: 15px 0; border-bottom: 1px solid var(--hairline-dk); font-size: var(--t-lead); }
.spiral li::before { content: "\2191"; color: var(--accent); font-family: var(--f-display); font-size: 1.3em; }

/* ---------- testimonials ---------- */
.tcarousel { position: relative; max-width: 780px; margin: 2.4rem auto 0; }
.tslides { position: relative; }
.tslide { display: none; }
.tslide.active { display: block; animation: fade .5s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tquote { font-size: clamp(1.05rem, 1rem + .5vw, 1.2rem); line-height: 1.72; font-style: italic; color: #e9e0d5; margin: 0 auto 1.6rem; max-width: 60ch; }
.tquote::before { content: "\201C"; font-family: var(--f-display); color: var(--accent); font-size: 2.4em; line-height: 0; vertical-align: -.35em; margin-right: .06em; }
.tperson { display: flex; align-items: center; gap: 16px; justify-content: center; }
.tavatar { width: 66px; height: 66px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; box-shadow: 0 8px 20px -8px rgba(0,0,0,.6); background: var(--espresso-2); }
.tavatar.ph { display: grid; place-items: center; font-family: var(--f-display); font-size: 1.4rem; color: var(--muted-dk); border: 1px solid var(--hairline-dk); }
.tperson .who { font-family: var(--f-display); font-size: 1.15rem; color: #fff; line-height: 1.2; }
.tperson .role { font-family: var(--f-ui); color: var(--accent); font-size: .82rem; letter-spacing: .02em; margin-top: 3px; }
.tperson .topic { font-size: .8rem; font-style: italic; color: var(--muted-dk); margin-top: 4px; }
.tperson .meta { text-align: left; }
.tnav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 28px; }
.tbtn { width: 46px; height: 46px; border-radius: 50%; background: transparent; border: 1.5px solid var(--hairline-dk); color: #efe7dd; font-size: 1.2rem; cursor: pointer; display: grid; place-items: center; transition: background .2s, border-color .2s, color .2s; }
.tbtn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.tdots { display: flex; gap: 9px; }
.tdot { width: 9px; height: 9px; border-radius: 50%; background: var(--hairline-dk); border: 0; padding: 0; cursor: pointer; transition: background .2s, transform .2s; }
.tdot.active { background: var(--accent); transform: scale(1.25); }

/* ---------- framework list ---------- */
.framework { list-style: none; counter-reset: fw; padding: 0; margin: 1.6rem 0; }
.framework li { position: relative; padding: 15px 0 15px 52px; border-bottom: 1px solid var(--hairline); max-width: var(--measure); }
.framework li::before {
  counter-increment: fw; content: counter(fw);
  position: absolute; left: 0; top: 13px; width: 34px; height: 34px; border-radius: 50%;
  background: transparent; border: 1.5px solid var(--accent); color: var(--accent);
  font-family: var(--f-display); display: grid; place-items: center; font-size: .95rem;
}
.framework strong { font-family: var(--f-display); font-weight: 400; }

/* ---------- footer ---------- */
.footer { background: var(--espresso); color: #cfc5ba; padding: var(--pad-block) var(--pad-inline) 40px; }
.footer h3 { color: #fff; }
.footer a { color: #e7ded4; }
.footer a:hover { color: var(--accent); }
.footer-grid { max-width: var(--max); margin-inline: auto; display: grid; gap: 36px; }
.footer-grid h4 { font-family: var(--f-ui); color: var(--accent); text-transform: uppercase; letter-spacing: .13em; font-size: .74rem; margin: 0 0 .9rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-legal { max-width: var(--max); margin: 42px auto 0; padding-top: 24px; border-top: 1px solid var(--hairline-dk); font-size: .8rem; color: #948b81; line-height: 1.7; }

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

/* ============================================================
   RESPONSIVE — progressive enhancement upward
   ============================================================ */
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; }
  .hero-text { order: 1; }
  .hero-photo { order: 2; }
  .media { grid-template-columns: 1fr 1fr; }
  .media.reverse .media-text { order: 2; }
  .media.reverse .media-photo { order: 1; }
  .services { gap: 20px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1.2fr; }

  /* desktop nav */
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
  .nav-links { display: flex; align-items: center; gap: 30px; }
  .nav-links a { font-family: var(--f-ui); font-size: .9rem; letter-spacing: .02em; color: var(--muted); font-weight: 500; }
  .nav-links a:hover { color: var(--accent); }
  .nav-cta { display: inline-flex; }
  .nav-right { display: flex; align-items: center; gap: 26px; }
}

@media (min-width: 1040px) {
  .hero-grid { gap: 72px; }
}

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