/* Matea review round 6 — final mobile balance, distinct portraits and restrained motion. */

/* 1. Hero: the decorative rule is optically centred against the complete audience line. */
.matea-hero-v5 .eyebrow {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  width: min(100%, 780px);
  max-width: none !important;
  text-wrap: balance;
}
.matea-hero-v5 .eyebrow::before {
  flex: 0 0 28px;
  align-self: center;
}

/* 2. Candidate profile: stable identity row and equal visual rhythm across all scenarios. */
.matea-candidate-v5 .map-profile {
  grid-template-columns: 82px minmax(0, 1fr) !important;
}
.matea-candidate-v5 .map-profile-copy {
  min-width: 0;
}
.matea-candidate-v5 .map-profile-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.matea-candidate-v5 .map-profile-top b {
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  font-size: clamp(25px, 3.1vw, 36px) !important;
  line-height: 1 !important;
  letter-spacing: -.045em !important;
}
.matea-candidate-v5 .map-badge {
  white-space: nowrap;
}
.matea-candidate-v5 .matea-brief-panel {
  min-height: 542px;
}
.matea-candidate-v5 .matea-brief-flow {
  grid-template-rows: minmax(96px, auto) minmax(96px, auto) minmax(162px, auto);
}
.matea-candidate-v5 .matea-brief-step.is-target {
  min-height: 154px;
}
.matea-candidate-v5 .matea-brief-step.is-target strong {
  min-height: 3.35em;
  display: flex;
  align-items: center;
}

/* 3. Proof cards: equal target-action space keeps the carousel calm while swiping. */
.matea-proof-v5 .matea-proof-status.is-target {
  min-height: 104px;
  display: grid;
  align-content: center;
}
.matea-proof-v5 .matea-proof-status.is-target span {
  min-height: 2.6em;
  display: flex;
  align-items: center;
}

/* 4. One-time, restrained motion. No looping, parallax, shimmer or moving backgrounds. */
@media (prefers-reduced-motion: no-preference) {
  html.matea-review-round6-ready .matea-hero-v5 .eyebrow {
    animation: matea-r6-rise .52s cubic-bezier(.22,.8,.28,1) both;
  }
  html.matea-review-round6-ready .matea-hero-v5 h1 {
    animation: matea-r6-rise .58s .06s cubic-bezier(.22,.8,.28,1) both;
  }
  html.matea-review-round6-ready .matea-hero-v5 .hero-copy {
    animation: matea-r6-rise .58s .12s cubic-bezier(.22,.8,.28,1) both;
  }
  html.matea-review-round6-ready .matea-hero-v5 .hero-actions {
    animation: matea-r6-rise .58s .18s cubic-bezier(.22,.8,.28,1) both;
  }

  .nav-panel.matea-menu-v5 .nav-links a {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .28s ease, transform .28s cubic-bezier(.22,.8,.28,1);
  }
  .is-menu-open .nav-panel.matea-menu-v5 .nav-links a {
    opacity: 1;
    transform: translateY(0);
  }
  .is-menu-open .nav-panel.matea-menu-v5 .nav-links a:nth-child(1) { transition-delay: .035s; }
  .is-menu-open .nav-panel.matea-menu-v5 .nav-links a:nth-child(2) { transition-delay: .065s; }
  .is-menu-open .nav-panel.matea-menu-v5 .nav-links a:nth-child(3) { transition-delay: .095s; }
  .is-menu-open .nav-panel.matea-menu-v5 .nav-links a:nth-child(4) { transition-delay: .125s; }
  .is-menu-open .nav-panel.matea-menu-v5 .nav-links a:nth-child(5) { transition-delay: .155s; }

  .matea-candidate-v5 .map-panel.matea-panel-enter {
    animation: matea-r6-panel .30s cubic-bezier(.22,.8,.28,1) both;
  }
}
@keyframes matea-r6-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes matea-r6-panel {
  from { opacity: .2; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .matea-hero-v5 .eyebrow,
  .matea-hero-v5 h1,
  .matea-hero-v5 .hero-copy,
  .matea-hero-v5 .hero-actions,
  .nav-panel.matea-menu-v5 .nav-links a,
  .matea-candidate-v5 .map-panel {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

@media (max-width: 980px) {
  /* More calm dark space before the ivory outcome section. */
  .matea-hero-v5.hero-copy-stage {
    min-height: calc(100svh - 76px);
    padding-top: 64px !important;
    padding-bottom: 96px !important;
  }
  .matea-hero-v5 .eyebrow {
    max-width: 38ch !important;
  }

  /* Slightly smaller editorial navigation than round five. */
  .nav-panel.matea-menu-v5 .nav-links {
    width: min(100%, 360px);
    gap: 8px;
  }
  .nav-panel.matea-menu-v5 .nav-links a {
    padding: 7px 12px;
    font-size: clamp(28px, 6.7vw, 34px) !important;
    line-height: 1.08 !important;
  }

  .matea-candidate-v5 .matea-brief-panel {
    min-height: 506px;
  }
  .matea-candidate-v5 .matea-brief-flow {
    grid-template-rows: minmax(84px, auto) minmax(84px, auto) minmax(148px, auto);
  }
  .matea-candidate-v5 .matea-brief-step.is-target {
    min-height: 140px;
  }
  .matea-candidate-v5 .matea-brief-step.is-target strong {
    min-height: 3.55em;
  }
}

@media (max-width: 520px) {
  .matea-hero-v5.hero-copy-stage {
    padding-top: 70px !important;
    padding-bottom: 112px !important;
  }
  .matea-hero-v5 .eyebrow {
    max-width: 36ch !important;
    gap: 15px !important;
  }
  .matea-hero-v5 .eyebrow::before {
    flex-basis: 28px;
  }

  .matea-candidate-v5 .map-profile {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 13px !important;
  }
  .matea-candidate-v5 .map-profile-top {
    gap: 8px;
  }
  .matea-candidate-v5 .map-profile-top b {
    font-size: 23px !important;
    letter-spacing: -.048em !important;
  }
  .matea-candidate-v5 .map-badge {
    padding: 7px 9px !important;
    font-size: 8px !important;
  }
  .matea-candidate-v5 .matea-brief-panel {
    min-height: 500px;
  }
  .matea-proof-v5 .matea-proof-status.is-target {
    min-height: 112px;
  }
}

@media (max-width: 390px) {
  .matea-hero-v5.hero-copy-stage {
    padding-top: 66px !important;
    padding-bottom: 104px !important;
  }
  .matea-hero-v5 .eyebrow {
    max-width: 34ch !important;
  }
  .matea-candidate-v5 .map-profile-top b {
    font-size: 21.5px !important;
  }
}

@media (max-width: 360px) {
  .nav-panel.matea-menu-v5 .nav-links a {
    font-size: 27px !important;
  }
  .matea-candidate-v5 .map-profile-top b {
    font-size: 20px !important;
  }
}
