:root {
  --font-body: Arial, Helvetica, sans-serif;
  --font-heading: Arial, Helvetica, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-mono: Arial, Helvetica, sans-serif;
  --bg-body: #f2f0e9;
  --bg-surface: #fbfaf6;
  --bg-surface-elevated: #e8e5dc;
  --bg-glass: #fbfaf6;
  --accent-gold: #16634a;
  --accent-gold-hover: #0e4936;
  --accent-gold-glow: rgba(22, 99, 74, 0.08);
  --accent-cyan: #16634a;
  --accent-purple: #16634a;
  --accent-red: #9a3f2f;
  --text-main: #171916;
  --text-muted: #4e514b;
  --text-subtle: #686b64;
  --border-subtle: #d8d4ca;
  --border-medium: #b9b4a8;
  --border-accent: #16634a;
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-full: 3px;
  --shadow-sm: none;
  --shadow-lg: 0 18px 48px rgba(23, 25, 22, 0.1);
  --shadow-gold: none;

  /* Fluid scale.
     Each value interpolates linearly between 320px and 1440px viewports and
     lands on the previous fixed desktop size at 1440px, so wide screens render
     exactly as before while small screens finally scale down instead of being
     pinned at a desktop-sized clamp minimum.
     Form: clamp(min, <intercept>rem + <slope>vw, max) — the rem term keeps the
     value responsive to user font-size settings, so browser zoom still works. */
  --type-hero-title: clamp(2.25rem, 1.48rem + 3.86vw, 5.8rem);   /* 36px -> 79px */
  --type-page-title: clamp(2.125rem, 1.19rem + 4.68vw, 6.25rem); /* 34px -> 86px */
  --type-h2:         clamp(1.75rem, 1.22rem + 2.64vw, 4rem);     /* 28px -> 58px */
  --type-blog-title: clamp(2.125rem, .93rem + 5.96vw, 6.5rem);   /* 34px -> 101px */
  --type-micro:      .75rem;                                      /* 12px legibility floor */
  --space-section:   clamp(2.75rem, 1.48rem + 6.34vw, 7.5rem);   /* 44px -> 115px */
}

html { scroll-behavior: smooth; }
body, body.bg-slate-50 { background: var(--bg-body) !important; color: var(--text-main); font-family: var(--font-body); }
::selection { background: #bed7cc; color: #111; }
a { transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease; }
:focus-visible { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
.container, .site-shell { max-width: 1180px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 3.5rem); }

.site-nav, .site-header {
  position: sticky !important;
  top: 0;
  padding: 0 !important;
  background: #fbfaf6 !important;
  border-bottom: 1px solid #252823 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 1000;
}
.site-nav .nav-wrapper, .site-header .nav-wrapper { min-height: 72px; }
.brand-logo { gap: .65rem !important; color: var(--text-main) !important; font-family: var(--font-body) !important; font-size: 1rem !important; font-weight: 800 !important; letter-spacing: -.02em !important; }
.brand-avatar { width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; border: 1px solid var(--text-main) !important; border-radius: 50% !important; box-shadow: none !important; }
.brand-accent { color: var(--accent-gold); }
.nav-menu { display: flex; align-items: center; gap: 1.75rem; margin: 0; padding: 0; list-style: none; }
.nav-link { color: var(--text-main) !important; font-family: var(--font-body) !important; font-size: .82rem !important; font-weight: 700 !important; letter-spacing: .01em; }
.nav-link::after { display: none !important; }
.nav-link:hover, .nav-link.active { color: var(--accent-gold) !important; }

/* Hamburger. Defined here rather than in includes/header.php so the blog,
   which ships its own header markup, gets it too. */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: .6rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
}
.mobile-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--text-main);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), opacity .2s ease;
}
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-cta, .btn, .btn-gradient, #load-more-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--text-main) !important;
  border-radius: 2px !important;
  background: var(--text-main) !important;
  box-shadow: none !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  transform: none !important;
}
.nav-cta { padding: .55rem 1.15rem !important; }
.btn:hover, .btn-gradient:hover, #load-more-btn:hover { background: var(--accent-gold) !important; border-color: var(--accent-gold) !important; }
.btn-secondary { background: transparent !important; color: var(--text-main) !important; }
.btn-secondary:hover { background: #e3dfd5 !important; border-color: var(--text-main) !important; }

.page-hero, #home-hero, main > section[style*="linear-gradient"] { background: var(--bg-surface) !important; }
#home-hero { min-height: auto; padding: clamp(3rem, 5vw, 4.5rem) 0 !important; border-bottom: 1px solid var(--text-main); }
#home-hero .hero-grid,
.consult-hero { grid-template-columns: minmax(0, 1fr) minmax(390px, 500px); gap: clamp(3rem, 7vw, 6.5rem); align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; }
.hero-kicker { margin-bottom: -.5rem; color: var(--text-muted); font-size: var(--type-micro); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.page-title { max-width: 760px; font-family: var(--font-display) !important; font-size: var(--type-page-title) !important; font-weight: 400 !important; letter-spacing: -.055em !important; line-height: .94 !important; }
.hero-copy .page-title { font-size: var(--type-hero-title) !important; }
.hero-summary { max-width: 620px; margin-top: .35rem; color: var(--text-muted); font-size: clamp(1.05rem, 1.45vw, 1.2rem); line-height: 1.65; }
.hero-identity { display: grid; grid-template-columns: auto 1fr; gap: .15rem 1rem; width: 100%; max-width: 620px; padding-top: 1rem; border-top: 1px solid var(--border-medium); font-size: .82rem; }
.hero-identity strong { color: var(--text-main); }
.hero-identity span { color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .25rem; }
.hero-media { position: relative; }
.page-subtitle { max-width: 660px; }
#home-hero .hero-photo-frame { position: relative; width: min(100%, 500px) !important; margin-left: auto; aspect-ratio: 4 / 5 !important; border: 1px solid var(--text-main) !important; border-radius: 2px !important; background: #d9d4c9 !important; box-shadow: none !important; }
#home-hero .hero-photo-frame img { filter: saturate(.78) contrast(1.02); }

/* Consultation hero: same copy-plus-portrait split as the home hero, so the
   contact page reads as part of the same set rather than a new pattern. */
.consult-hero { display: grid; }
.consult-hero-copy { display: flex; flex-direction: column; align-items: flex-start; }
.consult-hero-copy .page-subtitle { margin: 0; }
.consult-hero-media { width: 100%; margin: 0 0 0 auto; }
.consult-hero-media img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border: 1px solid var(--text-main); border-radius: 2px; filter: saturate(.78) contrast(1.02); }
@media (max-width: 768px) {
  .consult-hero { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .consult-hero-media { width: min(100%, 330px); margin-inline: auto; }
}

/* Editorial figure used for in-page supporting photography. */
.section-figure { width: min(100%, 820px); margin: 0 auto 3.25rem auto; }
.section-figure img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--text-main); border-radius: 2px; filter: saturate(.78) contrast(1.02); }
.section-figure figcaption { margin-top: .6rem; color: var(--text-subtle); font-size: var(--type-micro); letter-spacing: .04em; text-transform: uppercase; }

.tag-badge, .cat-card { border: 0 !important; border-bottom: 1px solid currentColor !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding: .2rem 0 !important; color: var(--accent-gold) !important; font-size: var(--type-micro) !important; letter-spacing: .07em !important; }
.glass-card, .card-hover, .blog-home-card { border: 1px solid var(--border-medium) !important; border-radius: 3px !important; background: var(--bg-surface) !important; box-shadow: none !important; transform: none !important; }
.glass-card:hover, .card-hover:hover, .blog-home-card:hover { border-color: var(--text-main) !important; box-shadow: none !important; transform: none !important; }

main > section { border-radius: 0; }
main > section:not(#home-hero) { padding-block: var(--space-section) !important; }
main > section:nth-of-type(even) { background: #e9e6dd; }
main h2, .blog-title { font-family: var(--font-display) !important; font-size: var(--type-h2) !important; font-weight: 400 !important; letter-spacing: -.045em !important; line-height: 1 !important; }
main h3 { letter-spacing: -.02em; }
.figures-avatar { border: 1px solid var(--text-main); box-shadow: none !important; filter: saturate(.75); }
.figures-arrow { border-radius: 2px !important; box-shadow: none !important; }
.media-list { border-top: 1px solid var(--text-main); }
.media-feature {
  display: grid;
  grid-template-columns: minmax(210px, 300px) minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-medium);
  color: var(--text-main);
}
.media-list .media-feature:last-child { border-bottom-color: var(--text-main); }
.media-feature:hover .media-feature-outlet, .media-feature:hover .media-feature-link { color: var(--accent-gold); }
.media-feature-outlet { font-family: var(--font-display); font-size: clamp(1.15rem, 1.7vw, 1.5rem); line-height: 1.15; transition: color 160ms ease; }
.media-feature-wire { display: block; margin-top: .35rem; color: var(--text-subtle); font-size: var(--type-micro); letter-spacing: .02em; }
.media-feature-headline { color: var(--text-muted); font-size: .95rem; line-height: 1.55; }
.media-feature-link { font-size: .78rem; font-weight: 700; white-space: nowrap; transition: color 160ms ease; }

main > section#services { padding-block: 4rem !important; }
.services-heading {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, 1.1fr);
  gap: 1rem 4rem;
  align-items: end;
  max-width: none !important;
  margin-bottom: 2.5rem !important;
  text-align: left !important;
}
.services-heading > span { grid-column: 1 / -1; justify-self: start; }
.services-heading > h2 { margin: 0 !important; }
.services-heading > p { margin: 0 !important; padding-bottom: .25rem; }
.services-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  border: 1px solid var(--text-main);
}
.service-item {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem !important;
  border: 0 !important;
  border-right: 1px solid var(--border-medium) !important;
  border-radius: 0 !important;
  background: var(--bg-surface) !important;
}
.service-item:last-child { border-right: 0 !important; }
.service-item > div:first-child { display: block !important; margin-bottom: 1.5rem !important; }
.service-item > div:first-child > div:first-child {
  width: auto !important;
  height: auto !important;
  margin-bottom: 1.5rem;
  justify-content: flex-start !important;
  background: transparent !important;
  font-size: .75rem;
}
.service-item h3 { margin-bottom: .5rem !important; font-size: 1.2rem !important; line-height: 1.2; }
.service-item > p { flex: 1; }
.service-item > div:last-child { margin-top: .5rem; }

#home-hero ~ section.testimonials-section { width: min(calc(100% - 3rem), 1180px); margin-inline: auto; padding-block: 2.5rem !important; }
.testimonials-section .container > div:first-child { margin-bottom: 2rem !important; }
.testimonials-container { max-width: 1120px !important; }
.testi-wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.testi-slide, .testi-slide.active { display: block !important; animation: none !important; }
.testi-card { height: 100%; padding: 1.5rem !important; border-color: var(--text-main) !important; }
.testi-layout { display: grid !important; grid-template-columns: 1fr; gap: 1.25rem !important; }
.testi-avatar-img, .testi-avatar-initial { width: 56px !important; height: 56px !important; border: 1px solid var(--text-main) !important; }
.testi-avatar-initial { border-radius: 50% !important; background: var(--accent-gold) !important; }
.testi-quote { max-width: none; margin-bottom: 1.25rem !important; color: var(--text-main) !important; font-family: var(--font-display); font-size: 1.18rem !important; font-style: normal !important; line-height: 1.4 !important; }
.testi-meta { padding-top: 1.1rem; border-top: 1px solid var(--border-medium); }
.testi-title, .testi-company { color: var(--text-muted) !important; }
.testi-star.filled { color: #9a6c18 !important; }
.testi-dot::before { border-radius: 0 !important; }
.testi-arrows button { border-radius: 2px !important; }

.faq-list { border-top: 1px solid var(--text-main); }
.faq-item { border-bottom: 1px solid var(--border-medium); }
.faq-item summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; padding: 1.4rem 0; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent-gold); font-size: 1.5rem; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-category { display: block; margin-bottom: .35rem; color: var(--accent-gold); font-size: var(--type-micro); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.faq-question { margin: 0; font-family: var(--font-body) !important; font-size: 1.05rem !important; font-weight: 700; }
.faq-answer { max-width: 720px; padding: 0 3rem 1.5rem 0; color: var(--text-muted); line-height: 1.7; }

main > section#consultation-faq { padding-block: 4rem !important; }
.consultation-faq-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; max-width: 1080px !important; }
.consultation-faq-heading { position: sticky; top: 110px; margin: 0 !important; text-align: left !important; }
.consultation-faq-heading h2 { margin-top: .75rem !important; }
.consultation-faq-list { width: 100%; }

main > section#timeline { padding-block: 4rem !important; }
.journey-container { max-width: 1120px !important; }
.journey-heading { margin-bottom: 2rem !important; text-align: left !important; }
.journey-heading > div { margin-left: 0 !important; width: 48px !important; height: 2px !important; border-radius: 0 !important; }
.journey-list { border-top: 1px solid var(--text-main); }
.journey-item {
  display: grid;
  grid-template-columns: 150px 220px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border-medium) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.journey-item > div:first-child { display: contents !important; }
.journey-item > div:first-child > div { grid-column: 2; }
.journey-item > div:first-child > .tag-badge { grid-column: 1; grid-row: 1; justify-self: start; }
.journey-item > p { grid-column: 3; margin: 0 !important; line-height: 1.6 !important; }
.journey-item h3 { font-size: 1.1rem !important; }

.search-input, .search-box { border: 1px solid var(--border-medium) !important; border-radius: 2px !important; background: var(--bg-surface) !important; box-shadow: none !important; }
.search-btn { border-radius: 2px !important; }
.blog-hero { padding: clamp(4.5rem, 8vw, 7rem) 0 !important; background: var(--bg-surface) !important; border-bottom: 1px solid var(--text-main) !important; }
.blog-hero-inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 7vw, 7rem); align-items: end; }
.blog-hero-copy { text-align: left !important; margin: 0 !important; }
.blog-hero-tools { align-self: end; }
.blog-categories { justify-content: flex-start !important; margin-bottom: 2rem !important; }
.blog-title { font-size: var(--type-blog-title) !important; }
#posts-grid { gap: 1.5rem !important; background: transparent; border: 0; }
#posts-grid > div { border: 1px solid var(--border-medium) !important; border-radius: 3px !important; background: var(--bg-surface) !important; }
.card-hover > a > img:first-child { display: block; width: 100% !important; height: auto !important; max-height: none !important; aspect-ratio: auto !important; object-fit: contain !important; background: #d9d4c9; }
#posts-grid img { filter: saturate(.78); }
#posts-grid h2 { font-family: var(--font-body) !important; font-size: 1.2rem !important; font-weight: 700 !important; letter-spacing: -.025em !important; line-height: 1.25 !important; }
.blog-categories { gap: .65rem 1rem !important; }
.site-footer-wrapper, footer[style*="background: #0f172a"] { margin-top: 0 !important; border-top: 1px solid #fbfaf6 !important; background: #171916 !important; }
.site-footer-wrapper .brand-logo,
footer[style*="background: #0f172a"] .brand-logo { color: #fff !important; }

/* The blog hero is a two-column grid; stack it before the columns get too narrow to read. */
@media (max-width: 900px) {
  .blog-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; align-items: start; }
  .blog-hero-copy, .blog-hero-tools { min-width: 0; }
  .blog-hero-tools { align-self: start; width: 100%; }
}

@media (max-width: 1050px) and (min-width: 769px) {
  .services-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .service-item:nth-child(2) { border-right: 0 !important; }
  .service-item:nth-child(-n + 2) { border-bottom: 1px solid var(--border-medium) !important; }
}

@media (max-width: 768px) {
  #posts-grid { gap: 1rem !important; }
  .media-feature { grid-template-columns: 1fr; gap: .55rem; }
  .site-nav .nav-wrapper, .site-header .nav-wrapper { min-height: 62px; }
  /* margin-left keeps the toggle hard right whether or not the menu sits in a
     <nav> wrapper, which differs between the main header and the blog header. */
  .mobile-menu-toggle { display: flex !important; border-radius: 2px !important; margin-left: auto; }
  .nav-menu { position: absolute; top: calc(100% + 1px) !important; left: 0; right: 0; display: flex !important; flex-direction: column; align-items: stretch; gap: 0; padding: .75rem 1.25rem 1.25rem; border-bottom: 1px solid var(--text-main) !important; background: #fbfaf6 !important; box-shadow: none !important; opacity: 0; visibility: hidden; transform: translateY(-6px); }
  .nav-menu.active { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-menu .nav-link { display: block; padding: .7rem 0; }
  .nav-menu .nav-cta { margin-top: .5rem; }
  #home-hero { min-height: auto; padding-top: 3rem !important; }
  #home-hero .grid-2 { grid-template-columns: 1fr; gap: 2.5rem; }
  #home-hero .grid-2 > div:nth-child(2) { order: 0 !important; }
  /* Once the hero stacks, centre the portrait: the desktop margin-left:auto
     would otherwise strand it against the right edge. */
  #home-hero .hero-photo-frame { width: min(100%, 330px) !important; margin-inline: auto !important; aspect-ratio: 4 / 5 !important; overflow: hidden !important; display: block !important; border: 1px solid var(--text-main) !important; }
  #home-hero .hero-photo-frame img { width: 100% !important; height: 100% !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  #home-hero .hero-mobile-stats { display: none !important; }
  .testi-wrap { grid-template-columns: 1fr; }
  .testi-layout { grid-template-columns: 1fr; }
  #home-hero ~ section.testimonials-section { width: 100%; padding-block: 2.25rem !important; }
  .testimonials-container { max-width: 360px !important; }
  .testi-card { padding: 1.4rem !important; }
  .testi-avatar-img, .testi-avatar-initial { width: 64px !important; height: 64px !important; }
  .testi-controls { align-items: flex-start !important; }
  /* The chip strip scrolls sideways, so its track must not size to min-content. */
  .blog-categories { overflow-x: auto; flex-wrap: nowrap !important; justify-content: flex-start !important; padding-bottom: .75rem; min-width: 0; }
  .cat-card { flex: 0 0 auto; }
  main > section#services { padding-block: 3rem !important; }
  .services-heading { grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2rem !important; }
  .services-heading > span { grid-column: 1; }
  .services-grid { grid-template-columns: 1fr !important; }
  .service-item { border-right: 0 !important; border-bottom: 1px solid var(--border-medium) !important; }
  .service-item:last-child { border-bottom: 0 !important; }
  .service-item > div:first-child { margin-bottom: 1rem !important; }
  .service-item > div:first-child > div:first-child { margin-bottom: 1rem; }
  main > section#timeline { padding-block: 3rem !important; }
  .journey-item { grid-template-columns: 1fr; gap: .75rem; padding-block: 1.25rem !important; }
  .journey-item > div:first-child > .tag-badge { grid-column: 1; grid-row: 1; }
  .journey-item > div:first-child > div { grid-column: 1; grid-row: 2; }
  .journey-item > p { grid-column: 1; grid-row: 3; }
  main > section#consultation-faq { padding-block: 3rem !important; }
  .consultation-faq-layout { display: block; }
  .consultation-faq-heading { position: static; margin-bottom: 2rem !important; text-align: center !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
