/* Round 3: spacing scale, type scale, hero graphic, layout fixes.
   Fonts are unchanged (Montserrat + existing accent faces). */

:root {
  --eo-space-1: 8px;
  --eo-space-2: 16px;
  --eo-space-3: 24px;
  --eo-space-4: 32px;
  --eo-space-5: 40px;
  --eo-space-6: 48px;
  --eo-space-7: 64px;
  --eo-space-8: 80px;
  --eo-gutter: 64px;
  --eo-gutter-m: 24px;
  --eo-section: 80px;
  --eo-section-m: 64px;
  --eo-black: #1A1A1A;
  --eo-crimson: #B8413F;
  --eo-cream: #F5F0EB;
  --eo-rule: #E0D6CC;
  --eo-measure: 40rem;
  --eo-lh-display: 1.12;
  --eo-lh-body: 1.7;
}

/* ── Type scale (display and section headings only; labels stay as they are) ── */
.hero h1 {
  font-size: 48px;
  line-height: var(--eo-lh-display);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 var(--eo-space-3);
  text-transform: none;
}
.page-hero h1,
.article-page h1,
.article-wrap h1,
.blog-index-hero h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 var(--eo-space-2);
  text-transform: none;
}
.features h2,
.process-content h2,
.services h2,
.words h2,
.results-strip-head h2,
.brands h2,
.cta-section h2,
.about-text h2,
.contact-inner h2,
.contact-content h2,
.roi h2,
.audit-feature h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 var(--eo-space-3);
  text-transform: none;
}
.cta-section h2 { font-size: 36px; }
.hero p:not(.hero-kicker) {
  font-size: 17px;
  line-height: var(--eo-lh-body);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0 0 var(--eo-space-5);
  max-width: 38em;
}
.page-hero p,
.hero-kicker,
.results-strip-head p,
.brands-inner > p,
.words-inner > p {
  margin-bottom: 0;
}
.hero-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 var(--eo-space-3);
}

/* Case study titles were still forced uppercase; sentence case matches the rest of the site */
.case-card-body h3 { text-transform: none; letter-spacing: -0.02em; font-weight: 800; line-height: 1.25; }

/* ── Shared section rhythm ── */
.features,
.process,
.services,
.testimonials,
.cta-section,
.about-content,
.contact-content,
.service-detail,
.roi {
  padding: var(--eo-section) var(--eo-gutter);
}
.results-strip { padding: var(--eo-section) var(--eo-gutter); }
.brands { padding: var(--eo-section) 0; }
.words { padding: var(--eo-section) 0; }
.audit-feature { padding: var(--eo-section) var(--eo-gutter); }
.hero { padding: var(--eo-space-6) var(--eo-gutter) var(--eo-space-5); }
.page-hero { padding: var(--eo-space-7) var(--eo-gutter) var(--eo-space-6); text-align: center; }
.stats-bar { padding: var(--eo-space-3) var(--eo-gutter) var(--eo-space-4); }
.words-inner,
.brands-inner { padding: 0 var(--eo-gutter); margin-bottom: var(--eo-space-5); }
.article-wrap,
.blog-index,
.audit-page { padding: 0 var(--eo-gutter) var(--eo-section); }
.crumbs { margin: 0 auto var(--eo-space-3); padding: var(--eo-space-3) var(--eo-gutter) 0; max-width: none; }
.page-hero + .blog-index,
.page-hero + .audit-page,
.page-hero + .article-wrap { padding-top: 0; }

/* Contact and ROI stacked a second hero-sized heading under the page hero */
.contact-content { padding-top: var(--eo-space-5); }
.contact-content h2 { margin-bottom: var(--eo-space-2); }
.contact-content > .contact-inner > p,
.contact-inner > p:first-of-type { margin-bottom: var(--eo-space-5); }
.roi { padding-top: var(--eo-space-5); }
.roi h2 { text-transform: none; }

/* 404 used 140px padding even on small screens */
.error-page .cta-section,
body.page-404 .cta-section,
.not-found { padding: var(--eo-section) var(--eo-gutter); }

@media (max-width: 800px) {
  .hero h1 { font-size: 36px; }
  .page-hero h1,
  .article-page h1,
  .article-wrap h1,
  .blog-index-hero h1 { font-size: 32px; }
  .features h2,
  .process-content h2,
  .services h2,
  .words h2,
  .results-strip-head h2,
  .brands h2,
  .about-text h2,
  .contact-content h2,
  .roi h2,
  .audit-feature h2 { font-size: 28px; }
  .cta-section h2 { font-size: 30px; }
  .features,
  .process,
  .services,
  .testimonials,
  .cta-section,
  .about-content,
  .contact-content,
  .service-detail,
  .roi,
  .results-strip,
  .audit-feature { padding: var(--eo-section-m) var(--eo-gutter-m); }
  .hero { padding: var(--eo-space-5) var(--eo-gutter-m) var(--eo-space-4); }
  .page-hero { padding: var(--eo-space-6) var(--eo-gutter-m) var(--eo-space-5); }
  .stats-bar { padding: var(--eo-space-3) var(--eo-gutter-m); }
  .brands,
  .words { padding: var(--eo-section-m) 0; }
  .words-inner,
  .brands-inner { padding: 0 var(--eo-gutter-m); margin-bottom: var(--eo-space-4); }
  .article-wrap,
  .blog-index,
  .audit-page { padding: 0 var(--eo-gutter-m) var(--eo-section-m); }
  .crumbs { padding: var(--eo-space-3) var(--eo-gutter-m) 0; }
}

/* ── Header: keep Home from colliding with the wordmark ── */
.header,
header.header {
  display: flex;
  align-items: center;
  gap: var(--eo-space-3);
}
.header .logo { margin-right: var(--eo-space-2); flex-shrink: 0; }
.nav { gap: 4px 22px; }
.nav > a { white-space: nowrap; }

/* ── Homepage hero graphic (replaces the portrait) ── */
.hero-grid { align-items: center; }
.hero-visual {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #e2dbcf;
  min-height: 0;
  aspect-ratio: 4 / 5;
}
.hero-visual svg {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-content { padding: var(--eo-space-3) 0; }
@media (max-width: 900px) {
  .hero-grid { display: flex; flex-direction: column; }
  .hero-content { order: 1; }
  .hero-visual { order: 2; aspect-ratio: 5 / 4; max-height: 320px; width: 100%; margin-top: var(--eo-space-5); }
}

/* ── Process / about images: fill the rounded frame ── */
.process-image,
.about-image {
  position: relative;
  overflow: hidden;
}
.process-image.has-photo { aspect-ratio: 4 / 5; background: #EDE6DE; }
.process-image picture,
.about-image picture,
.process-image img,
.about-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* ── Equal-height cards, buttons sit on one baseline ── */
.services-grid,
.blog-grid,
.audit-list,
.contact-grid,
.contact-cards,
.contact-methods { align-items: stretch; }
.service-card,
.blog-card,
.audit-item,
.contact-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.service-card .btn-outline-sm,
.contact-card .btn-book-inline { margin-top: auto; align-self: stretch; }
.blog-card p:last-child { margin-bottom: 0; }

/* ── Logo wall: consistent tile sizes ── */
.brands-grid,
.logo-grid,
.brands-logos {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--eo-space-3) var(--eo-space-4);
  align-items: center;
  justify-items: center;
}
.brands-grid img,
.logo-grid img,
.brands-logos img,
.brands img {
  max-height: 48px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
}
@media (max-width: 700px) {
  .brands-grid,
  .logo-grid,
  .brands-logos { grid-template-columns: repeat(2, 1fr); }
}

/* ── Founder quote: tighten the oversized gap ── */
.founder-quote,
.signature-quote,
.quote-script { margin: 0 auto var(--eo-space-7); padding: 0 var(--eo-gutter); }
@media (max-width: 800px) {
  .founder-quote,
  .signature-quote,
  .quote-script { margin-bottom: var(--eo-space-6); padding: 0 var(--eo-gutter-m); }
}

/* ── Testimonials ── */
.quote-featured { margin: 0 auto var(--eo-space-4); padding: var(--eo-space-4) var(--eo-space-5); }
.jannes-pull { margin: 0 auto var(--eo-space-5); max-width: 40em; }
.words h2 { margin-bottom: var(--eo-space-2); }

/* ── Blog / article / audit typography ── */
.article-inner { max-width: 720px; }
.article-body p,
.article-body li {
  font-size: 17px;
  line-height: 1.75;
}
.article-body p { margin: 0 0 var(--eo-space-2); }
.article-body h2 { margin: var(--eo-space-6) 0 var(--eo-space-2); }
.article-body h3 { margin: var(--eo-space-4) 0 var(--eo-space-2); }
.article-body ul,
.article-body ol { margin: 0 0 var(--eo-space-3); padding-left: 1.4em; }
.article-body li { margin: 0 0 10px; padding-left: 0.2em; }
.article-body a,
.article-meta a,
.blog-index a,
.audit-inner a,
.crumbs a {
  color: #B8413F;
  text-decoration: none;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.article-body a:hover,
.article-meta a:hover,
.blog-index a:hover,
.audit-inner a:hover,
.crumbs a:hover { text-decoration: underline; }
.article-meta { margin: 0 0 var(--eo-space-5); }
.article-cta { margin-top: var(--eo-space-6); }
.blog-grid { gap: var(--eo-space-3); margin: 0 0 var(--eo-space-5); }

/* Audit: hero holds price and timing; body starts cleanly */
.page-hero .audit-hero-price { margin-top: var(--eo-space-3); }
.page-hero .audit-hero-timing {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #4A4A4A;
  margin: var(--eo-space-2) auto 0;
  max-width: 32em;
}
.audit-inner { max-width: 960px; }
.audit-inner > p { margin: 0 0 var(--eo-space-3); max-width: none; }
.audit-list { margin: var(--eo-space-4) 0 var(--eo-space-5); gap: var(--eo-space-3); }
.audit-item { height: 100%; }
.audit-actions { margin: var(--eo-space-4) 0 var(--eo-space-3); }
.audit-meta-row { display: none; } /* moved into the hero */

/* ── Features heading gap was 50px ── */
.features h2 { margin-bottom: var(--eo-space-5); }
.services h2 { margin-bottom: var(--eo-space-5); text-align: center; }

/* Service-detail blocks on the services page */
.service-detail-block { padding: var(--eo-space-7) 0; gap: var(--eo-space-6); }
.services-audit-callout { margin: 0 auto var(--eo-space-6); }

@media (prefers-reduced-motion: reduce) {
  .hero-visual svg .hero-motion { animation: none !important; }
}

/* Founder pull-quote sits inside Features; keep it from opening a large hole */
.features .pull-quote { margin: 48px auto 0; max-width: 760px; }

/* Logo wall: even tile rhythm on the static wrapped grid */
.brand-track { gap: 32px 40px !important; }
.brand-logo { height: 56px; }
.brand-logo img { max-height: 44px; }

/* 404 used an inline 140px pad; keep it on the shared section scale, including mobile */
@media (max-width: 800px) {
  .cta-section { padding: var(--eo-section-m) var(--eo-gutter-m); }
}

/* With Blog in the bar, keep the wordmark and Home from colliding at 1280 */
@media (min-width: 1025px) {
  .header { padding: 16px 40px; }
  .nav { gap: 16px; }
  .nav > a,
  .nav .nav-link-with-caret { font-size: 12px; letter-spacing: 0.08em; }
}

/* ── Headings: Montserrat at loaded weights, r3 type scale ── */
h1, h2, h3,
.hero h1,
.page-hero h1,
.page-article-h1,
.section-title,
.features h2,
.process-content h2,
.services h2,
.words h2,
.results-strip-head h2,
.brands h2,
.cta-section h2,
.about-text h2,
.contact-content h2,
.contact-inner h2,
.roi h2,
.audit-feature h2,
.services-audit-callout h2,
.article-body h2,
.article-body h3,
.article-cta h2,
.article-wrap h1,
.blog-card h2,
.service-card h3,
.case-card-body h3,
.audit-item h3,
.result-num,
.result-num .count-up,
.case-headline-stat,
.case-headline-stat .count-up,
.audit-hero-price,
.audit-price,
.roi-out-num,
.roi-split-num,
.roi-out-hero .roi-out-num {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-synthesis: none;
}

h3,
.service-card h3,
.audit-item h3,
.blog-card h2,
.article-body h3,
.case-card-body h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-hero h1,
.article-page h1,
.article-wrap h1,
.blog-index-hero h1,
.page-article-h1 {
  line-height: 1.15;
}

.features h2,
.process-content h2,
.services h2,
.words h2,
.results-strip-head h2,
.brands h2,
.cta-section h2,
.about-text h2,
.contact-content h2,
.contact-inner h2,
.roi h2,
.audit-feature h2 {
  line-height: 1.15;
}

.result-num,
.case-headline-stat,
.audit-price,
.audit-hero-price,
.roi-out-num,
.roi-split-num {
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3,
.hero h1,
.page-hero h1,
.page-article-h1,
.blog-card h2,
.case-card-body h3 {
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

/* Labels, nav, buttons and the wordmark: Montserrat, not heading tracking */
.about-subhead,
.hero-kicker,
.eyebrow,
.results-eyebrow,
.brands-eyebrow,
.service-num,
.case-industry,
.case-subtitle,
.case-stat-label,
.case-mini-stat span,
.result-label,
.result-context,
.footer-col-title,
.stat-item,
.nav,
.nav a,
.logo,
.logo-wordmark,
.btn,
.btn-dark,
.btn-red,
.btn-red-lg,
.btn-outline,
.btn-outline-sm,
.btn-ghost-light,
.btn-nav-primary,
.mm-cta,
.mm-cta-secondary,
.form-submit,
.contact-card .btn-book-inline,
.roi-cta,
.glance-btn,
label,
.roi-field label,
.roi-panel-label,
.roi-out-label,
.roi-out-panel-label,
.cite-kicker,
.article-meta,
.blog-card .blog-date,
.crumbs {
  font-family: "Montserrat", sans-serif;
}

/* Featured testimonial body stays Montserrat at text, not display, settings */
.quote-featured blockquote,
.quote-featured figcaption,
.jannes-pull {
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0;
  font-weight: 500;
  line-height: 1.6;
}
.quote-featured figcaption,
.quote-featured figcaption strong {
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.4;
}
.jannes-pull { font-weight: 500; }

/* ── Branded logo-mark backgrounds (replaces peach/cream template gradients) ── */
.hero,
.page-hero,
.features,
.services,
.about-content,
.contact-content,
.service-detail,
.blog-index,
.article-wrap,
.audit-page,
.results-strip,
.words,
.brands {
  position: relative;
  isolation: isolate;
}
.hero,
.page-hero,
.features,
.services,
.about-content,
.contact-content,
.service-detail,
.blog-index,
.article-wrap,
.audit-page {
  background-color: #F5F0EB;
}

/* Drop the peach/salmon gradients and corner glows that read as a generic AI template.
   Inners stay transparent so the section ::before mark can show in the cream field. */
.words,
.results-strip {
  background: #F5F0EB !important;
}
.results-strip-inner,
.features-inner,
.words-inner,
.services-inner,
.about-text,
.page-hero-inner {
  background: transparent !important;
}
.result-stat::after { display: none !important; }

.hero { overflow: hidden; }
.hero-mark {
  position: absolute;
  right: -2%;
  top: 4%;
  width: min(78vw, 680px);
  aspect-ratio: 1;
  background: url("/assets/images/logo-mark-brand.svg") no-repeat center / contain;
  opacity: 0.13;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
.hero-grid { position: relative; z-index: 1; }

/* Inner page heroes: cropped mark on the right, in-frame so it reads as the logo */
.page-hero::before,
.article-wrap::before,
.blog-index::before {
  content: "";
  pointer-events: none;
  position: absolute;
  right: -6%;
  top: 8%;
  width: min(68vw, 540px);
  aspect-ratio: 1;
  background: url("/assets/images/logo-mark.svg") no-repeat center / contain;
  opacity: 0.09;
  z-index: 0;
}
.page-hero > *,
.article-wrap > *,
.blog-index > * { position: relative; z-index: 1; }

/* Mid-page cream bands: oversized, cropped mark sitting in the heading field */
.features::before,
.services::before,
.results-strip::before,
.words::before,
.about-content::before,
.contact-content::before,
.service-detail::before {
  content: "";
  pointer-events: none;
  position: absolute;
  right: -8%;
  top: -8%;
  width: min(70vw, 600px);
  aspect-ratio: 1;
  background: url("/assets/images/logo-mark.svg") no-repeat center / contain;
  opacity: 0.09;
  z-index: 0;
}
.features > *,
.services > *,
.results-strip > *,
.words > *,
.about-content > *,
.contact-content > *,
.service-detail > * { position: relative; z-index: 1; }

/* Dark bands: cream mark, still the real logo */
.audit-feature,
.cta-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.audit-feature::before,
.cta-section::before {
  content: "";
  position: absolute;
  left: -10%;
  bottom: -18%;
  width: min(68vw, 540px);
  aspect-ratio: 1;
  background: url("/assets/images/logo-mark-cream.svg") no-repeat center / contain;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}
.audit-feature > *,
.cta-section > * { position: relative; z-index: 1; }


/* Articles: keep the mark in the right margin, clear of the text column */
.article-wrap::before {
  right: -22%;
  top: 4%;
  width: min(48vw, 400px);
  opacity: 0.08;
}

/* Narrow screens: a small corner peek only; hide marks that would cross full-width copy */
@media (max-width: 800px) {
  .hero-mark {
    right: -58%;
    top: -22%;
    width: 70vw;
    opacity: 0.12;
  }
  .page-hero::before,
  .blog-index::before,
  .features::before,
  .services::before,
  .results-strip::before,
  .words::before,
  .about-content::before,
  .contact-content::before,
  .service-detail::before {
    right: -68%;
    top: -8%;
    width: 70vw;
    opacity: 0.09;
  }
  .article-wrap::before { display: none; }
}

/* ── Motion: reveal + parallax (transform/opacity only) ── */
@media (prefers-reduced-motion: no-preference) {
  html.js-motion .eo-reveal {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1);
  }
  html.js-motion .eo-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  html.js-motion .services-grid .eo-reveal:nth-child(2),
  html.js-motion .blog-grid .eo-reveal:nth-child(2),
  html.js-motion .audit-list .eo-reveal:nth-child(2),
  html.js-motion .results-strip-grid .eo-reveal:nth-child(2) { transition-delay: 0.06s; }
  html.js-motion .services-grid .eo-reveal:nth-child(3),
  html.js-motion .blog-grid .eo-reveal:nth-child(3),
  html.js-motion .audit-list .eo-reveal:nth-child(3),
  html.js-motion .results-strip-grid .eo-reveal:nth-child(3) { transition-delay: 0.12s; }
  html.js-motion .services-grid .eo-reveal:nth-child(4),
  html.js-motion .blog-grid .eo-reveal:nth-child(4),
  html.js-motion .results-strip-grid .eo-reveal:nth-child(4) { transition-delay: 0.18s; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark,
  [data-parallax] { transform: none !important; }
  .eo-reveal,
  .reveal,
  .reveal-stagger > *,
  .scroll-fade-x,
  .scroll-zoom {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Blog images: featured cards, article heroes, in-article figures ── */
.blog-card { padding: 0; overflow: hidden; }
.blog-card-media {
  display: block;
  margin: 0;
  background: #e2dbcf;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
}
.blog-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card-body {
  display: block;
  padding: 24px 26px 28px;
}
.article-hero-fig,
.article-figure {
  margin: 28px 0 36px;
  max-width: 100%;
}
.article-hero-fig { margin-top: 24px; }
.article-hero-fig img,
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: #e2dbcf;
}
.article-figure figcaption,
.article-hero-fig figcaption {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #5c564e;
  padding: 10px 4px 0;
  letter-spacing: 0;
  font-weight: 500;
}

/* Footer Start a Project CTA, and nav spacing after removing Home */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--eo-space-3);
  flex-wrap: wrap;
  text-align: left;
}
.footer-copy { margin: 0; }
.footer-cta {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #16110f !important;
  background: #e2dbcf;
  border: 2px solid #e2dbcf;
  padding: 12px 20px;
  text-decoration: none !important;
  white-space: nowrap;
}
.footer-cta:hover { background: #ffffff; border-color: #ffffff; color: #16110f !important; }

@media (min-width: 1025px) {
  .nav { gap: 22px; }
}
