/* =====================================================================
   MMH layer (docs/DESIGN.md). Loads after Bootstrap, fonts.css and tokens.css.
   Colors only through tokens.css: no hex values in this file.
   ===================================================================== */

/* ---- Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--mmh-font);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--mmh-ink);
  background: var(--mmh-paper);
  overflow-x: hidden;
}
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--mmh-ink-75); }
img, video { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.mmh-container { width: 100%; max-width: 1750px; margin: 0 auto; padding: 0 var(--mmh-gutter); }
p { line-height: inherit; } /* Adina sets 1.12 on p */
.mmh-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.mmh-skip { position: absolute; left: -9999px; top: 0; z-index: 100; padding: 12px 16px; background: var(--mmh-ink); color: var(--mmh-paper); }
.mmh-skip:focus { left: 16px; color: var(--mmh-paper); }

/* ---- Type ramp (DESIGN.md §3). Display headlines lowercase via CSS -------- */
h1, h2, h3, h4 { font-family: var(--mmh-font-display); color: inherit; }
/* Titles that are not h1-h6 elements (display statements, big numbers, card and banner
   titles) are Surgena too; everything else is body copy in Capitana. */
h5, h6, .td-section-title, .td-breadcrumb-title, .mmh-banner__ghost, .td-hero-4-title, .td-hero-4-big-text,
.mmh-hero-m, .mmh-badge-m, .td-hero-4-nav-title, .td-video-title, .td-service-title, .td-service-6-title, .mmh-card-6__num,
.td-history-year, .td-history-title, .mmh-stages__nav, .mmh-stages__loop text, .td-postbox-title, .td-portfolio-title,
.td-error-title, .td-error-text, .mmh-statement__text, .mmh-stats__value, .td-counter-count, .td-contact-4-title,
.td-service-widget-title, .td-footer-widget-title, .td-footer-bottom-title, .td-footer-widget-content ul li a,
.mmh-marquee__item, .td-portfolio-details-title, .td-portfolio-case-title, .mmh-case-nav__title,
.mmh-h1, .mmh-h2, .mmh-h3 { font-family: var(--mmh-font-display); }
.mmh-display {
  font-size: clamp(56px, 7vw, 120px); font-weight: 600; line-height: .98;
  letter-spacing: -.02em; text-transform: lowercase; margin: 0;
}
.mmh-h1, h1 {
  font-size: clamp(44px, 5vw, 80px); font-weight: 600; line-height: 1.04;
  letter-spacing: -.015em; text-transform: lowercase; margin: 0 0 24px;
}
.mmh-h2, h2 {
  font-size: clamp(32px, 3.4vw, 56px); font-weight: 500; line-height: 1.1;
  letter-spacing: -.01em; text-transform: lowercase; margin: 0 0 24px;
}
.mmh-h3, h3 { font-size: 24px; font-weight: 500; line-height: 1.3; margin: 0 0 12px; }
.mmh-eyebrow {
  font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mmh-ink-75); margin: 0 0 16px;
}
.mmh-body, p { font-size: inherit; }
.mmh-lead { max-width: 52ch; font-size: 20px; color: var(--mmh-ink-75); }
.mmh-small { font-size: 14px; }
.mmh-num { font-weight: 300; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
  body { font-size: 16px; }
  .mmh-display { font-size: 44px; }
  .mmh-lead { font-size: 18px; }
}

/* SplitText line masks (app.js) */
[data-split] .mmh-line { display: block; }

/* ---- Buttons and links ---------------------------------------------- */
.mmh-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
  border: 1px solid var(--mmh-ink); border-radius: 0; /* matches Adina .td-btn */
  background: var(--mmh-ink); color: var(--mmh-paper);
  font: 500 16px/1.2 var(--mmh-font); text-decoration: none; cursor: pointer;
  transition: background-color .3s var(--mmh-ease), color .3s var(--mmh-ease);
}
.mmh-btn:hover { background: var(--mmh-ink-90); color: var(--mmh-paper); }
.mmh-btn:disabled { opacity: .5; cursor: not-allowed; }
.mmh-btn--ghost { background: transparent; color: var(--mmh-ink); }
.mmh-btn--ghost:hover { background: var(--mmh-ink-05); color: var(--mmh-ink); }
.mmh-btn--light { background: var(--mmh-paper); color: var(--mmh-ink); border-color: var(--mmh-paper); }
.mmh-btn--light:hover { background: var(--mmh-ink-10); color: var(--mmh-ink); }
.mmh-pill { padding: 6px 16px; border: 1px solid var(--mmh-ink-25); border-radius: 999px; text-decoration: none; font-size: 14px; }
.mmh-link-arrow { display: inline-flex; gap: 10px; align-items: center; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.mmh-link-arrow::after { content: "\2192"; transition: transform .3s var(--mmh-ease); }
.mmh-link-arrow:hover::after { transform: translateX(4px); }
.mmh-link-arrow--light, .mmh-link-arrow--light:hover { color: var(--mmh-paper); }

/* ---- Sections rhythm ------------------------------------------------ */
.mmh-section { padding: var(--mmh-section) 0; }
.mmh-section--tight { padding: calc(var(--mmh-section) / 2) 0; }
.mmh-section--alt { background: var(--mmh-ink-05); }
.mmh-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 40px; }
.mmh-section-head .mmh-h2 { margin: 0; }

/* Image slot: token tint until an image is supplied */
.mmh-media { display: block; position: relative; overflow: hidden; background: var(--mmh-ink-10); }
.mmh-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--mmh-ease); }
.mmh-media--tall   { aspect-ratio: 4 / 5; }
.mmh-media--square { aspect-ratio: 1 / 1; }
.mmh-media--wide   { aspect-ratio: 16 / 10; }
.mmh-media--card   { aspect-ratio: 3 / 2; }
a:hover .mmh-media img { transform: scale(1.04); }

/* ---- Adina header / offcanvas / footer adjustments ------------------ */
.td-main-menu-content li.active > a,
.td-main-menu-content a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.td-header-time span { color: var(--mmh-on-dark-muted); opacity: 1; } /* Adina also sets opacity .6: together they failed contrast */
.td-hero-4-nav-item .td-hero-4-nav-content span { color: var(--mmh-on-dark-muted); opacity: 1; } /* Adina: white at .3 = 2.7:1 on ink-90 */
.td-header-top .td-header-time { font-size: 12px; padding: 5px; }
.td-main-menu-content > ul { display: flex; flex-wrap: nowrap; justify-content: center; }
.td-main-menu-content > ul > li > a { white-space: nowrap; }
.td-header-right-2-btn .td-btn, .td-btn-4 { white-space: nowrap; }
.td-header-sticky + * { margin-top: 0; }
.td-main-menu-mobile li.has-dropdown > a { padding-right: 48px; }
.mmh-mm-toggle {
  position: absolute; right: 0; top: 8px; width: 32px; height: 32px;
  border: 1px solid var(--mmh-ink-10); background: transparent; color: var(--mmh-ink-50); cursor: pointer;
}
.mmh-mm-toggle[aria-expanded="true"] i { transform: rotate(90deg); }
.td-main-menu-mobile .td-submenu.is-open { display: block; }
.tdoffcanvas__contact-info p { margin: 12px 0 24px; }
body.mmh-locked { overflow: hidden; }

/* ---- hero-slider ---------------------------------------------------- */
.mmh-hero { position: relative; background: var(--mmh-ink-03); }
.mmh-hero__slide { position: relative; min-height: min(86vh, 900px); display: flex; align-items: center; overflow: hidden; }
.mmh-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mmh-hero__img + .mmh-hero__inner { color: var(--mmh-paper); }
.mmh-hero__inner { position: relative; padding-top: 96px; padding-bottom: 160px; }
.mmh-hero__inner .mmh-display { max-width: 12ch; margin-bottom: 40px; }
.mmh-hero__lead, .mmh-hero__tail { display: block; }
.mmh-hero__ghost { display: block; color: var(--mmh-ink-50); }
.mmh-hero__controls { position: absolute; left: 0; right: 0; bottom: 48px; z-index: 2; display: flex; align-items: center; gap: 16px; }
.mmh-hero__prev, .mmh-hero__next {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--mmh-ink-25);
  background: var(--mmh-paper); color: var(--mmh-ink); cursor: pointer;
}
.mmh-hero__prev:hover, .mmh-hero__next:hover { background: var(--mmh-ink); color: var(--mmh-paper); }
.mmh-hero .swiper-pagination.mmh-hero__pagination { position: static; width: auto; display: flex; gap: 8px; }
.mmh-hero .swiper-pagination-bullet { width: 32px; height: 2px; border-radius: 0; background: var(--mmh-ink-25); opacity: 1; margin: 0 !important; }
.mmh-hero .swiper-pagination-bullet-active { background: var(--mmh-ink); }

/* ---- intro-stats ---------------------------------------------------- */
.mmh-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin: clamp(56px, 7vw, 112px) 0 0; padding-top: 40px; border-top: 1px solid var(--mmh-ink-10);
}
.mmh-stats__item { display: flex; flex-direction: column-reverse; }
.mmh-stats__value {
  margin: 0; font-size: clamp(56px, 6vw, 96px); font-weight: 300; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mmh-stats__label { margin-top: 12px; font-weight: 400; font-size: 14px; color: var(--mmh-ink-75); }
@media (max-width: 991px) { .mmh-stats { grid-template-columns: repeat(2, 1fr); row-gap: 40px; } }

/* ---- pillar-strip --------------------------------------------------- */
.mmh-pillars { border-top: 1px solid var(--mmh-ink-10); border-bottom: 1px solid var(--mmh-ink-10); }
.mmh-pillars__list { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 0; }
.mmh-pillars__item a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 24px; text-decoration: none; border-left: 1px solid var(--mmh-ink-10); transition: background-color .3s var(--mmh-ease); }
.mmh-pillars__item:first-child a { border-left: 0; }
.mmh-pillars__item a:hover { background: var(--mmh-ink-03); color: var(--mmh-ink); }
.mmh-pillars__num { font-size: 13px; color: var(--mmh-ink-60); }
.mmh-pillars__title { font-size: 24px; font-weight: 500; text-transform: lowercase; }
.mmh-pillars__text { color: var(--mmh-ink-75); }
@media (max-width: 991px) {
  .mmh-pillars__list { grid-template-columns: 1fr 1fr; }
  .mmh-pillars__item a { border-left: 0; border-top: 1px solid var(--mmh-ink-10); }
}
@media (max-width: 575px) { .mmh-pillars__list { grid-template-columns: 1fr; } }

/* ---- video-band / statement-band (dark) ------------------------------ */
.mmh-video-band, .mmh-statement { position: relative; background: var(--mmh-ink); color: var(--mmh-paper); overflow: hidden; }
.mmh-video-band { min-height: 70vh; display: flex; align-items: center; }
.mmh-video-band__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.mmh-video-band__inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding-top: 96px; padding-bottom: 96px; }
.mmh-video-band__inner .mmh-h2 { max-width: 18ch; margin: 0; }
.mmh-video-band__play {
  display: grid; place-items: center; width: 120px; height: 120px; border-radius: 50%;
  border: 1px solid var(--mmh-on-dark-muted); color: var(--mmh-paper); text-decoration: none; font-size: 28px;
  transition: background-color .3s var(--mmh-ease), color .3s var(--mmh-ease);
}
.mmh-video-band__play:hover { background: var(--mmh-paper); color: var(--mmh-ink); }
.mmh-video-popup { max-width: 1100px; margin: 0 auto; }
.mmh-video-popup video { width: 100%; background: var(--mmh-ink); }
.mmh-statement__text { max-width: 22ch; font-size: clamp(40px, 5vw, 88px); font-weight: 500; line-height: 1.05; letter-spacing: -.015em; text-transform: lowercase; margin: 0 0 40px; }
.mmh-statement .mmh-eyebrow, .mmh-video-band .mmh-eyebrow { color: var(--mmh-on-dark-muted); }

/* ---- method-stages loop diagram (Phase 9: the stages, teaser, discipline cards,
   deliverables, proof grid and article cards are Adina blocks in css/inner.css) ---- */
.mmh-stages__loop { margin: 0; padding-top: 32px; border-top: 1px solid var(--mmh-ink-10); }
.mmh-stages__loop svg { width: 100%; max-width: 520px; height: auto; overflow: visible; }
.mmh-stages__loop-path { stroke: var(--mmh-ink-25); stroke-width: 1.5; }
.mmh-stages__loop-path--back { stroke: var(--mmh-ink); }
.mmh-stages__loop-head { fill: var(--mmh-ink); stroke: none; }
.mmh-stages__loop text { fill: var(--mmh-ink); font: 500 18px var(--mmh-font-display); text-transform: lowercase; }

/* ---- text-marquee (outline, the only loop) --------------------------- */
.mmh-marquee { overflow: hidden; padding: 40px 0; border-top: 1px solid var(--mmh-ink-10); border-bottom: 1px solid var(--mmh-ink-10); }
.mmh-marquee__track { display: flex; width: max-content; animation: mmh-marquee 40s linear infinite; }
.mmh-marquee__run { display: flex; flex: none; }
.mmh-marquee__item {
  padding-right: .6em; font-size: clamp(56px, 8vw, 140px); font-weight: 600; line-height: 1;
  text-transform: lowercase; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px var(--mmh-ink-25);
}
.mmh-marquee__item::after { content: "."; }
.mmh-marquee:hover .mmh-marquee__track { animation-play-state: paused; }
@keyframes mmh-marquee { to { transform: translateX(-50%); } }

/* ---- cta-band ------------------------------------------------------- */
.mmh-cta-band { padding: 96px 0; background: var(--mmh-ink); color: var(--mmh-paper); }
.mmh-cta-band .mmh-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.mmh-cta-band__title { margin: 0; }

/* ---- forms (Adina form styles, rebuilt on tokens) ------------------- */
.mmh-form { max-width: 1100px; }
.mmh-field { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.mmh-field > label, .mmh-field > legend { font-size: 14px; font-weight: 500; color: var(--mmh-ink-75); margin: 0; float: none; width: auto; padding: 0; }
fieldset.mmh-field { border: 0; padding: 0; min-width: 0; }
.mmh-optional { font-weight: 400; color: var(--mmh-ink-60); }
.mmh-form input[type="text"], .mmh-form input[type="email"], .mmh-form input[type="url"], .mmh-form textarea, .mmh-form select {
  width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--mmh-ink-25); border-radius: 0;
  background: transparent; color: var(--mmh-ink); font: 400 18px/1.4 var(--mmh-font);
}
.mmh-form textarea { resize: vertical; min-height: 140px; }
.mmh-form input:focus, .mmh-form textarea:focus, .mmh-form select:focus { outline: none; border-bottom-color: var(--mmh-ink); box-shadow: 0 1px 0 0 var(--mmh-ink); }
.mmh-form [aria-invalid="true"] { border-bottom-color: var(--mmh-ink); border-bottom-width: 2px; }
.mmh-field__error { margin: 0; font-size: 14px; font-weight: 500; color: var(--mmh-ink); }
.mmh-field__error::before { content: "! "; }
.mmh-checks { flex-direction: row; flex-wrap: wrap; gap: 12px; }
.mmh-checks > legend { width: 100%; margin-bottom: 4px; }
.mmh-check { display: inline-flex; cursor: pointer; }
.mmh-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mmh-check span { padding: 10px 18px; border: 1px solid var(--mmh-ink-25); border-radius: 999px; font-size: 15px; transition: background-color .2s var(--mmh-ease), color .2s var(--mmh-ease); }
.mmh-check input:checked + span { background: var(--mmh-ink); color: var(--mmh-paper); border-color: var(--mmh-ink); }
.mmh-check input:focus-visible + span { outline: 2px solid var(--mmh-ink); outline-offset: 2px; }
.mmh-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
/* nice-select restyled to the field look */
.mmh-form .nice-select {
  float: none; width: 100%; height: auto; padding: 14px 24px 14px 0; border: 0; border-bottom: 1px solid var(--mmh-ink-25);
  border-radius: 0; background: transparent; font: 400 18px/1.4 var(--mmh-font); color: var(--mmh-ink);
}
.mmh-form .nice-select:after { right: 4px; border-color: var(--mmh-ink); }
.mmh-form .nice-select .list { width: 100%; border-radius: 0; box-shadow: 0 8px 24px rgba(2, 6, 23, .12); }
.mmh-form .nice-select .option { font-size: 16px; }
.mmh-form .nice-select .option.selected { font-weight: 500; }
.mmh-form .nice-select .option:hover, .mmh-form .nice-select .option.focus { background: var(--mmh-ink-05); }

/* ---- legal-body ----------------------------------------------------- */
.mmh-legal__updated { color: var(--mmh-ink-60); font-size: 14px; }
.mmh-prose { max-width: 72ch; margin-top: 40px; }
.mmh-prose h2 { font-size: 32px; margin: 48px 0 16px; }
.mmh-prose h3 { margin: 32px 0 12px; }
.mmh-prose ul, .mmh-prose ol { padding-left: 1.2em; }

/* ---- Phase 2 stub + error pages -------------------------------------- */
.mmh-stub, .mmh-error { padding: 120px 0; }
.mmh-error__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.mmh-error__trace { margin-top: 48px; padding: 24px; overflow-x: auto; background: var(--mmh-ink-05); font-size: 13px; white-space: pre-wrap; }

/* ---- /_kit labels (dev only) ------------------------------------------ */
.mmh-kit-label code { color: var(--mmh-ink-75); }
.mmh-kit-label { margin: 0; padding: 8px var(--mmh-gutter); background: var(--mmh-ink-05); border-top: 1px solid var(--mmh-ink-10); font-size: 13px; }

/* ---- Reduced motion: end states, no loops ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  .mmh-marquee__track { animation: none; transform: none; }
}

/* ---- Draft content banner (development only) ---------------------------- */
.mmh-draft-banner {
  margin: 0; padding: 8px var(--mmh-gutter); background: var(--mmh-ink-10); color: var(--mmh-ink);
  font-size: 13px; font-weight: 500; letter-spacing: .04em; text-align: center;
}

/* ---- Form notice (errors, rejected submissions) -------------------------- */
.mmh-form__notice {
  margin-bottom: 32px; padding: 16px 20px; border-left: 3px solid var(--mmh-ink);
  background: var(--mmh-paper); font-weight: 500;
}
.mmh-form .row { row-gap: 32px; }
.mmh-form__notice, .mmh-form [aria-invalid="true"] { scroll-margin-top: 140px; }
.mmh-form select[data-nice] + .nice-select::after { margin-top: -4px; }
.mmh-form .nice-select .current { display: block; padding-right: 8px; }

/* ---- Insights list, article, case study (Phase 7) ------------------------- */
.mmh-article__meta { color: var(--mmh-ink-60); font-size: 15px; }
.mmh-article__body { margin: 0; font-size: 19px; }
.mmh-prose img { max-width: 100%; height: auto; }
.mmh-prose figure { margin: 32px 0; }
.mmh-prose figcaption, .mmh-case__gallery figcaption { font-size: 14px; color: var(--mmh-ink-60); margin-top: 8px; }
.mmh-prose blockquote { margin: 32px 0; padding-left: 24px; border-left: 2px solid var(--mmh-ink); font-size: 22px; }
.mmh-case__summary { margin-top: 24px; }
.mmh-case__metrics { margin-bottom: 56px; }
.mmh-case__metrics .mmh-stats { margin-top: 0; }
.mmh-case__part { margin-bottom: 56px; }
.mmh-case__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mmh-case__gallery figure { margin: 0; }
.mmh-case__gallery img { width: 100%; height: auto; display: block; }
@media (max-width: 767px) { .mmh-case__gallery { grid-template-columns: 1fr; } }

/* ---- Consent banner (Phase 8) -------------------------------------------- */
.mmh-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000; display: flex; justify-content: center; }
.mmh-consent[hidden] { display: none; }
.mmh-consent__inner {
  width: 100%; max-width: 720px; padding: 20px 24px; background: var(--mmh-paper); color: var(--mmh-ink);
  border: 1px solid var(--mmh-ink-10); box-shadow: 0 12px 40px rgba(2, 6, 23, .18); font-size: 15px;
}
.mmh-consent__text { margin: 0 0 16px; line-height: 1.5; }
.mmh-consent__settings { display: grid; gap: 8px; margin: 0 0 16px; }
.mmh-consent__settings[hidden] { display: none; }
.mmh-consent__option { display: flex; gap: 10px; align-items: center; }
.mmh-consent__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mmh-consent__actions .mmh-btn { padding: 10px 20px; font-size: 15px; }
.mmh-consent__actions [hidden] { display: none; }
.mmh-link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.mmh-link-button[hidden] { display: none; }
.mmh-gtm-ns { display: none; visibility: hidden; }
