/* ============================================================
   MERIDIAN HERO STYLES
   Companion to styles.css. Reuses existing CSS variables
   defined in :root inside styles.css.
   All selectors prefixed with mg- to avoid collisions.
   ============================================================ */


/* ----------------------------------------
   Screen reader only utility
   ---------------------------------------- */
.mg-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ----------------------------------------
   Hero section
   Top padding clears the fixed nav.
   min-height fills the viewport on first paint.
   ---------------------------------------- */
.mg-hero {
  background: var(--color-cream);
  padding: 120px 1.5rem 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.mg-hero__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

.mg-hero__content {
  min-width: 0;
}


/* Rotating verb */
.mg-hero__verbs {
  position: relative;
  height: clamp(56px, 9vw, 110px);
  margin-bottom: clamp(8px, 1vw, 14px);
}

.mg-verb {
  position: absolute;
  top: 0;
  left: 0;
  font-size: clamp(48px, 8vw, 110px);
  line-height: 1;
  font-weight: 700;
  color: var(--color-terracotta);
  letter-spacing: -0.025em;
  opacity: 0;
  transform: translateY(15px);
  animation-fill-mode: both;
  white-space: nowrap;
}

.mg-verb--1 { animation: mg-show-verb 20s ease-in-out infinite; animation-delay: 0s; }
.mg-verb--2 { animation: mg-show-verb 20s ease-in-out infinite; animation-delay: 4s; }
.mg-verb--3 { animation: mg-show-verb 20s ease-in-out infinite; animation-delay: 8s; }
.mg-verb--4 { animation: mg-show-verb 20s ease-in-out infinite; animation-delay: 12s; }
.mg-verb--5 { animation: mg-show-verb 20s ease-in-out infinite; animation-delay: 16s; }

@keyframes mg-show-verb {
  0%   { opacity: 0; transform: translateY(15px); }
  3%   { opacity: 1; transform: translateY(0); }
  18%  { opacity: 1; transform: translateY(0); }
  20%  { opacity: 0; transform: translateY(-15px); }
  100% { opacity: 0; transform: translateY(-15px); }
}


/* Subline below the rotating verb */
.mg-hero__subline {
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.2;
  font-weight: 700;
  color: var(--color-ink);
  margin: 0 0 clamp(20px, 3vw, 32px);
  letter-spacing: -0.01em;
}


/* Body copy */
.mg-hero__body {
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.7;
  color: var(--color-stone);
  margin: 0 0 clamp(20px, 3vw, 32px);
  max-width: 520px;
  font-weight: 300;
}


/* CTAs reuse existing .btn styles from styles.css */
.mg-hero__ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}


/* ----------------------------------------
   SVG visual
   ---------------------------------------- */
.mg-hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mg-svg {
  width: 100%;
  max-width: clamp(220px, 32vw, 380px);
  color: var(--color-terracotta);
  display: block;
}


/* SVG path animations */
.mg-path {
  stroke-dasharray: 2500;
  stroke-dashoffset: 2500;
  opacity: 0;
  animation-fill-mode: both;
}

.mg-detail {
  opacity: 0;
  animation-fill-mode: both;
}

.mg-path--g1 { animation: mg-draw 20s ease-in-out infinite; animation-delay: 0s; }
.mg-path--g2 { animation: mg-draw 20s ease-in-out infinite; animation-delay: 4s; }
.mg-path--g3 { animation: mg-draw 20s ease-in-out infinite; animation-delay: 8s; }
.mg-path--g4 { animation: mg-draw 20s ease-in-out infinite; animation-delay: 12s; }
.mg-path--g5 { animation: mg-draw 20s ease-in-out infinite; animation-delay: 16s; }

.mg-detail--d1 { animation: mg-fade 20s ease-in-out infinite; animation-delay: 0s; }
.mg-detail--d2 { animation: mg-fade 20s ease-in-out infinite; animation-delay: 4s; }
.mg-detail--d3 { animation: mg-fade 20s ease-in-out infinite; animation-delay: 8s; }
.mg-detail--d4 { animation: mg-fade 20s ease-in-out infinite; animation-delay: 12s; }
.mg-detail--d5 { animation: mg-fade 20s ease-in-out infinite; animation-delay: 16s; }

@keyframes mg-draw {
  0%   { stroke-dashoffset: 2500; opacity: 1; }
  10%  { stroke-dashoffset: 0; opacity: 1; }
  18%  { stroke-dashoffset: 0; opacity: 1; }
  20%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes mg-fade {
  0%   { opacity: 0; }
  8%   { opacity: 0; }
  12%  { opacity: 1; }
  18%  { opacity: 1; }
  20%  { opacity: 0; }
  100% { opacity: 0; }
}


/* Sway, like a garment hanging on a hanger */
.mg-svg__sway {
  transform-origin: 200px 60px;
  animation: mg-sway 7s ease-in-out infinite;
}

@keyframes mg-sway {
  0%, 100% { transform: rotate(-1deg); }
  50%      { transform: rotate(1deg); }
}


/* ----------------------------------------
   Capability marquee
   ---------------------------------------- */
.mg-marquee {
  background: var(--color-ink);
  padding: 18px 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mg-marquee__track {
  display: flex;
  white-space: nowrap;
  animation: mg-scroll 50s linear infinite;
  width: max-content;
}

.mg-marquee__row {
  color: var(--color-cream);
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}

@keyframes mg-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ----------------------------------------
   Stats grid
   Replaces the existing dark trust-bar with a
   cream version that matches the new hero.
   ---------------------------------------- */
.mg-stats {
  background: var(--color-cream);
  padding: clamp(48px, 6vw, 80px) 1.5rem;
}

.mg-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 48px);
  max-width: var(--container-max);
  margin: 0 auto;
}

.mg-stat__number {
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1;
  letter-spacing: -0.02em;
}

.mg-stat__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-warm);
  margin-top: clamp(8px, 1vw, 14px);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.4;
}


/* ----------------------------------------
   Responsive: tablet
   ---------------------------------------- */
@media (max-width: 1024px) {
  .mg-stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

@media (max-width: 900px) {
  .mg-hero {
    padding: 100px 1.5rem 60px;
    min-height: auto;
  }

  .mg-hero__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .mg-hero__visual {
    order: 2;
  }

  .mg-svg {
    max-width: 280px;
  }
}


/* ----------------------------------------
   Responsive: mobile
   ---------------------------------------- */
@media (max-width: 540px) {
  .mg-hero {
    padding: 90px 1.25rem 48px;
  }

  .mg-hero__verbs {
    height: 56px;
  }

  .mg-verb {
    font-size: 48px;
  }

  .mg-hero__subline {
    font-size: 20px;
    margin-bottom: 1.25rem;
  }

  .mg-hero__ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .mg-hero__ctas .btn {
    text-align: center;
    width: 100%;
  }

  .mg-svg {
    max-width: 220px;
  }

  .mg-marquee__row {
    font-size: 0.6875rem;
    letter-spacing: 0.22em;
  }

  .mg-stats {
    padding: 2.5rem 1.25rem;
  }
}


/* ----------------------------------------
   Reduced motion: honor user preference.
   Stops all animation, parks the t shirt visible
   and the first verb on display, drops sway.
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .mg-verb,
  .mg-path,
  .mg-detail,
  .mg-svg__sway,
  .mg-marquee__track {
    animation: none !important;
  }

  .mg-verb--1 {
    opacity: 1;
    transform: none;
  }
  .mg-verb--2,
  .mg-verb--3,
  .mg-verb--4,
  .mg-verb--5 {
    display: none;
  }

  .mg-path--g1 {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  .mg-detail--d1 {
    opacity: 1;
  }
  .mg-path--g2,
  .mg-path--g3,
  .mg-path--g4,
  .mg-path--g5,
  .mg-detail--d2,
  .mg-detail--d3,
  .mg-detail--d4,
  .mg-detail--d5 {
    display: none;
  }

  .mg-svg__sway {
    transform: none;
  }
}
