/*
Theme Name: Motivo Advisory
Theme URI: https://motivoadvisory.com
Author: Motivo Advisory
Description: Custom theme for Motivo Advisory — nonprofit strategy & organizational development consulting.
Version: 1.0
Requires at least: 5.9
Requires PHP: 7.4
Text Domain: motivo-advisory
*/

:root {
  --ink: #2E3238;
  --slate: #48597A;
  --slate-dark: #33445F;
  --slate-mid: #7C9CB5;
  --slate-light: #BFD1DE;
  --slate-pale: #EEF2F5;
  --paper: #FAF9F6;
  --line: #E2E2DC;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.65;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 32px; }

a { color: inherit; }
.sans { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(250,249,246,0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.site-nav .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

.site-nav .brand {
  font-size: 1.15rem;
  color: var(--slate);
  text-decoration: none;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav .brand svg { width: 26px; height: auto; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.site-nav a { color: var(--ink); text-decoration: none; opacity: 0.7; }
.site-nav a:hover, .site-nav a.active { opacity: 1; color: var(--slate); }
.site-nav li.current-menu-item > a { opacity: 1; color: var(--slate); }

/* ---------- Hero (dark band) ---------- */
.hero-dark {
  background: linear-gradient(180deg, var(--slate-dark) 0%, var(--slate) 100%);
  color: #F5F7F9;
  padding: 88px 0 0;
  overflow: hidden;
  position: relative;
}

.hero-dark .hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-bottom: 64px; }

.hero-dark .eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2.5px;
  color: var(--slate-light);
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero-dark h1 { font-weight: normal; font-size: 2.6rem; line-height: 1.25; margin: 0 0 20px; color: #FFFFFF; }
.hero-dark p.lede { font-size: 1.1rem; color: #DCE4EA; max-width: 46ch; margin: 0 0 28px; }

.wp-block-button__link {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.4px;
  padding: 13px 26px;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-solid,
.btn-solid .wp-block-button__link { background: var(--slate-light); color: var(--slate-dark); border-color: var(--slate-light); }
.btn-solid:hover,
.btn-solid .wp-block-button__link:hover { background: #fff; color: var(--slate-dark); border-color: #fff; }

.is-style-outline .wp-block-button__link {
  background: transparent;
  color: #fff;
  border: 1px solid var(--slate-light);
}
.is-style-outline .wp-block-button__link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: #fff;
}

.cta-band .wp-block-buttons { justify-content: center; }

.hero-photo { position: relative; }
.hero-photo img { width: 100%; height: auto; display: block; border-radius: 4px; box-shadow: 0 24px 48px rgba(20,28,40,0.35); }

.hero-graphic { display: flex; align-items: center; justify-content: center; padding: 20px; }
.hero-graphic svg { width: 100%; max-width: 380px; height: auto; }

.hero-mountain-strip { height: 64px; }
.hero-mountain-strip svg { display: block; width: 100%; height: 64px; }

/* ---------- Stats band (available if needed) ---------- */
.stats { background: var(--slate-pale); border-bottom: 1px solid var(--line); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 40px 32px; text-align: center; }
.stat-num { font-size: 2rem; color: var(--slate); margin: 0 0 4px; }
.stat-label { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 0.78rem; letter-spacing: 0.5px; color: var(--ink); opacity: 0.7; text-transform: uppercase; }

/* ---------- Sections ---------- */
.pad { padding: 76px 0; }
.pad-sm { padding: 48px 0; }

h2.section-title { font-size: 1.7rem; font-weight: normal; color: var(--slate); margin: 0 0 8px; }

p.section-kicker {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 2px;
  color: var(--slate-mid);
  text-transform: uppercase;
  margin: 0 0 12px;
}

p.section-intro { max-width: 62ch; font-size: 1.08rem; color: var(--ink); margin: 0 0 36px; }

/* ---------- Service cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 30px 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.service-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(72,89,122,0.12); }
.service-icon { width: 42px; height: 42px; margin-bottom: 18px; }
.service-card h3 { font-size: 1.15rem; color: var(--slate); font-weight: normal; margin: 0 0 10px; }
.service-card p { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 0.92rem; color: var(--ink); opacity: 0.85; margin: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 28px; border-left: 2px solid var(--slate-light); }
.timeline-item { position: relative; padding-bottom: 40px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-divider {
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--slate-mid);
  font-weight: normal;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 0 0 28px;
  padding-top: 6px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--slate);
  border: 3px solid var(--paper);
}

.timeline-item .year {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--slate-mid);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.timeline-item h4 { margin: 0 0 6px; font-size: 1.1rem; color: var(--slate); font-weight: normal; }
.timeline-item h4 a { color: inherit; text-decoration: underline; text-decoration-color: var(--slate-light); text-underline-offset: 3px; }
.timeline-item h4 a:hover { text-decoration-color: var(--slate); }

/* Thumbnail layout for news items that include a photo */
.timeline-item.wp-block-media-text {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: start;
}
.timeline-item.wp-block-media-text .wp-block-media-text__media {
  margin: 3px 0 0;
}
.timeline-item.wp-block-media-text .wp-block-media-text__media img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.timeline-item.wp-block-media-text .wp-block-media-text__content {
  padding: 0;
}
@media (max-width: 560px) {
  .timeline-item.wp-block-media-text {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }
  .timeline-item.wp-block-media-text .wp-block-media-text__media img {
    width: 64px;
    height: 64px;
  }
}
.timeline-item p { margin: 0; font-size: 1rem; }

/* ---------- News list (divided list, no timeline line/dots) ---------- */
.news-list { }

.news-item {
  position: relative;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.news-item:first-child { padding-top: 0; border-top: none; }
.news-item:last-child { padding-bottom: 0; }

.news-divider {
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--slate-mid);
  font-weight: normal;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  margin: 40px 0 8px;
}
.news-divider:first-child { margin-top: 0; }

.news-item .year {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--slate-mid);
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.news-item h4 { margin: 0 0 6px; font-size: 1.1rem; color: var(--slate); font-weight: normal; }
.news-item h4 a { color: inherit; text-decoration: underline; text-decoration-color: var(--slate-light); text-underline-offset: 3px; }
.news-item h4 a:hover { text-decoration-color: var(--slate); }
.news-item p { margin: 0; font-size: 1rem; }
.news-item p a { color: var(--slate); }

/* Thumbnail layout for news items that include a photo */
.news-item.wp-block-media-text {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 18px;
  align-items: start;
}
.news-item.wp-block-media-text .wp-block-media-text__media {
  margin: 3px 0 0;
}
.news-item.wp-block-media-text .wp-block-media-text__media img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.news-item.wp-block-media-text .wp-block-media-text__content {
  padding: 0;
}
@media (max-width: 560px) {
  .news-item.wp-block-media-text {
    grid-template-columns: 64px 1fr;
    gap: 12px;
  }
  .news-item.wp-block-media-text .wp-block-media-text__media img {
    width: 64px;
    height: 64px;
  }
}

/* ---------- Testimonial cards ---------- */
.testimonial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.t-stack { display: flex; flex-direction: column; justify-content: space-between; }
.t-card { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 34px 30px; position: relative; margin-bottom: 28px; }
.t-card:last-child { margin-bottom: 0; }

.t-card .mark-quote {
  font-family: Georgia, serif;
  font-size: 3.2rem;
  color: var(--slate-light);
  line-height: 1;
  margin-bottom: 6px;
  display: block;
}

.t-card p.quote { font-style: italic; color: var(--ink); font-size: 1.02rem; margin: 0 0 16px; }
.t-card p.attribution { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 0.85rem; color: var(--slate); margin: 0; }
.t-card.wide { grid-column: 1 / -1; }

/* ---------- Split section ---------- */
.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: center; }
.split img { width: 100%; border-radius: 6px; box-shadow: 0 18px 36px rgba(46,50,56,0.12); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--slate); color: #fff; text-align: center; padding: 64px 0; }
.cta-band h2 { font-weight: normal; font-size: 1.7rem; margin: 0 0 12px; color: #fff; }
.cta-band p { color: var(--slate-light); margin: 0 0 26px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--slate-dark);
  color: var(--slate-light);
  padding: 44px 0;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
}

.site-footer a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--slate-mid); }
.site-footer .foot-links { margin-top: 14px; }
.site-footer .foot-links a { margin: 0 10px; opacity: 0.85; border-bottom: none; }
.site-footer .foot-links a:hover { opacity: 1; }

/* ---------- Simple page hero ---------- */
.hero-simple { background: var(--slate-pale); border-bottom: 1px solid var(--line); padding: 56px 0; text-align: center; }
.hero-simple h1 { font-weight: normal; font-size: 2rem; color: var(--slate); margin: 0 0 8px; }

.hero-simple p {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  color: var(--slate-mid);
  text-transform: uppercase;
  margin: 0;
}

/* ---------- Contact ---------- */
.contact-line { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 1rem; margin-bottom: 10px; }
.contact-line a { color: var(--slate); text-decoration: none; border-bottom: 1px solid var(--slate-light); }

/* ---------- Mobile nav toggle (hidden on desktop) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--slate);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-dark .hero-inner { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .stats .wrap { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }

  .nav-toggle { display: flex; }

  .nav-menu-wrap {
    display: none;
    width: 100%;
    order: 3;
  }
  .site-nav.nav-open .nav-menu-wrap { display: block; }

  .site-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 14px 0 4px;
    text-transform: none;
    letter-spacing: normal;
  }
  .site-nav ul li { border-top: 1px solid var(--line); }
  .site-nav ul li:first-child { border-top: none; }
  .site-nav ul a { display: block; padding: 12px 4px; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .hero-dark h1 { font-size: 2rem; }
}

/* ---------- Footer widget area ---------- */
/* Ensures blocks added via Appearance > Widgets inherit footer styling */
.site-footer .widget,
.site-footer .wp-block-group,
.site-footer .wp-block-paragraph { margin: 0; }

.site-footer p { margin: 0 0 6px; }
.site-footer .wp-block-navigation,
.site-footer .wp-block-page-list {
  justify-content: center;
  gap: 20px;
  margin-top: 14px;
}

.site-footer .wp-block-navigation a,
.site-footer .wp-block-page-list a {
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
  border-bottom: none;
}

.site-footer .wp-block-navigation a:hover,
.site-footer .wp-block-page-list a:hover { opacity: 1; }
