/* ============================================================
   MMH Consulting — Global Reset & Base Typography
   v0.1.33
   ============================================================ */

/* ── Reset ───────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  line-height: 1.75;
}

img,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

/* ── Base Typography ──────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-charcoal);
}

p {
  margin-bottom: 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--color-charcoal);
}

blockquote {
  font-style: italic;
}

/* ── Reusable Type Classes ────────────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.display-heading {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--color-charcoal);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-charcoal);
}

.sub-heading {
  font-family: var(--font-serif);
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-charcoal);
}

.lead-text {
  font-size: var(--text-lg);
  line-height: 1.8;
  color: var(--color-charcoal-light);
  max-width: 64ch;
}

.body-text {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--color-charcoal-light);
}

.gold-text {
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Dividers ─────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: rgba(171, 128, 60, 0.2);
  border: none;
  margin: var(--space-2xl) 0;
}

.divider--short {
  width: 56px;
  height: 2px;
  background: var(--color-gold);
  border: none;
  margin: var(--space-md) 0;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.9rem 2.5rem;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.button--primary {
  background: var(--gradient-gold);
  color: var(--color-white);
  border-color: transparent;
}

.button--primary:hover {
  opacity: 0.88;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.button--outline {
  background: transparent;
  color: var(--color-charcoal);
  border-color: var(--color-gold);
}

.button--outline:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.button--outline-light {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(171, 128, 60, 0.45);
}

.button--outline-light:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

/* ── Accessibility ────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* ── Additional Type Classes ──────────────────────────────────── */

/* Section kicker: uppercase label with letter-spacing, sits above headings.
   Functionally equivalent to .eyebrow — separate name for template flexibility. */
.section-kicker {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

/* Slightly larger body copy for intros and pull-quotes */
.body-large {
  font-size: clamp(var(--text-lg), 1.6vw, var(--text-xl));
  line-height: 1.85;
  color: var(--color-charcoal-light);
}

/* Gold gradient applied via background-clip — explicit descriptive name */
.gold-gradient-text {
  background: var(--gradient-gold-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── Scroll-to-top floater ──────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 95;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-white);
  border: 1px solid rgba(171, 128, 60, 0.45);
  color: var(--color-gold);
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(75, 74, 68, 0.12);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity   0.3s ease,
    transform 0.3s ease,
    background var(--transition-fast),
    color      var(--transition-fast),
    box-shadow var(--transition-fast);
}

.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-top:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
  box-shadow: 0 6px 24px rgba(171, 128, 60, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top {
    transition: opacity 0.3s ease, background var(--transition-fast), color var(--transition-fast);
    transform: none;
  }
}


/* ── Scroll Reveal ──────────────────────────────────────────────
   Initial state: invisible + slightly displaced downward.
   IntersectionObserver adds .is-visible → element transitions in.
   Delay utilities create subtle stagger across sibling groups.
   prefers-reduced-motion: skip all animation, show content at once. */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity   0.6s ease,
    transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide-from-right variant — used for the why-mmh rows.
   Triggered as a batch when the section enters view so all rows
   cascade in together rather than staggering on individual scroll. */
.reveal-right {
  opacity: 0;
  transform: translateX(52px);
  transition:
    opacity   0.55s ease,
    transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ── Anchor-nav page transition ───────────────────────────────────
   .page-content fades out when body.is-transitioning is active.
   After the instant scroll jump, is-transitioning is removed and the
   CSS transition reverses back to opacity:1.
   .section-focus-in is added to the target <section> for a subtle
   slide-up entrance once the viewport has landed. */

.page-content {
  opacity: 1;
  transition: opacity 220ms ease;
}

body.is-transitioning .page-content {
  opacity: 0;
  pointer-events: none;
}

@keyframes sectionFocusIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-focus-in {
  animation: sectionFocusIn 420ms ease both;
}

@media (prefers-reduced-motion: reduce) {
  .page-content {
    transition: none;
  }
  .section-focus-in {
    animation: none;
  }
}
