.project-opening {
    background: radial-gradient(ellipse at 94% 18%, #dbeaf6 0%, #f0f6fb 48%, #f8fbfd 90%);
    border-bottom: 1px solid #d9e6ef;
  }
  .project-opening h1 { max-width: 18ch; text-wrap: balance; }
  .project-opening .lead { max-width: 64ch; }
  .project-origin-copy { max-width: 70ch; border-left: 3px solid #759bb8; padding-left: 24px; }
  .project-origin-copy p:last-child { margin-bottom: 0; }
  .project-scope { background: #153451; color: #eaf3fa; }
  .project-scope h2, .project-scope h3 { color: #fff; }
  .project-scope .eyebrow { color: #b9d5ea; }
  .project-scope-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
  .project-scope-grid article { padding: clamp(22px, 3vw, 35px); border-radius: 15px; }
  .project-scope-grid article p { margin-bottom: 0; }
  .project-scope article { background: #214562; border: 1px solid #547696; }
  .project-phases { background: #f4f8fb; }
  .project-phase-grid { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 14px; }
  .project-phase-grid article { background: #fff; border: 1px solid #c8dce9; }
  .project-context .stat-row { margin-top: 24px; }
  @media (max-width: 760px) {
    .project-scope-grid { grid-template-columns: minmax(0,1fr); }
    .project-origin-copy { padding-left: 16px; }
    .project-opening h1 { font-size: clamp(2.15rem, 8.8vw, 3.15rem); }
  }
  @media (prefers-reduced-motion: no-preference) {
    #main { --project-rise: 24px; }
    [data-motion="project-heading"] { animation: project-heading-in .76s cubic-bezier(.18,.7,.25,1); }
    [data-motion="project-card"].entered { animation: project-card-in .64s ease-out; }
    img[data-motion="project-photo"].entered,
    figure[data-motion="project-photo"].entered img { animation: project-photo-in .88s cubic-bezier(.2,.7,.3,1); }
    [data-motion="project-link"].entered { animation: project-link-in .65s ease-out; }
    @keyframes project-heading-in {
      from { opacity: .32; transform: translateY(var(--project-rise)); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes project-card-in {
      from { opacity: .42; transform: translateY(calc(var(--project-rise) * .65)); }
      to { opacity: 1; transform: translateY(0); }
    }
    @keyframes project-photo-in {
      from { opacity: .48; clip-path: inset(0 28% 0 0 round 8px); }
      to { opacity: 1; clip-path: inset(0); }
    }
    @keyframes project-link-in {
      from { opacity: .36; }
      to { opacity: 1; }
    }
    @media (max-width: 760px) {
      #main { --project-rise: 16px; }
    }
  }

.project-phase-grid { gap: 20px; }
.project-phase-grid article {
  position: relative;
  overflow: hidden;
  border-top: 4px solid #4a7ba3;
}
.project-phase-grid .phase-label { margin-bottom: 9px; }
.project-phase-grid h3 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.project-phase-grid dl { margin: 20px 0 0; }
.project-phase-grid dl > div { border-top: 1px solid #c9dce9; padding: 10px 0; }
.project-phase-grid dl > div:last-child { padding-bottom: 0; }
.project-phase-grid dt { font-weight: 700; color: #173955; }
.project-phase-grid dd { margin: 2px 0 0; line-height: 1.55; }

@media (prefers-reduced-motion: no-preference) {
  .project-phase-grid article.entered {
    animation: project-phase-in 740ms cubic-bezier(.2,.7,.25,1);
  }
  .project-phase-grid article.entered::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: #88b6d8;
    transform-origin: left;
    animation: project-phase-line 850ms ease-out both;
    pointer-events: none;
  }
  @keyframes project-phase-in {
    from { opacity: .38; transform: translateY(var(--project-rise)); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes project-phase-line {
    0% { opacity: 0; transform: scaleX(.03); }
    30% { opacity: 1; }
    76% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1); }
  }
}

.research-source {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: #e8f1f8;
  border-left: 3px solid #608baa;
  border-radius: 0 10px 10px 0;
  color: #173955;
}
.research-source p { margin: 0; }
.research-source .research-citation { margin-top: .65rem; color: #354b60; }
.research-source a { text-underline-offset: .17em; }

/* Contexto en Mexico: cifra y credito institucional. */
.project-context .stat-row {
  display: block;
  margin: 24px 0 20px;
}
.project-context .stat-row strong {
  display: block;
  font-size: clamp(4.4rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: -.055em;
  font-variant-numeric: lining-nums;
  margin-bottom: 14px;
}
.project-context .stat-row > span {
  display: block;
  max-width: 36ch;
  padding: 0;
  border: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.45;
  font-weight: 600;
}
.project-context .research-credit {
  margin: 0;
  border-top: 1px solid #bfd2e2;
  padding-top: 14px;
  color: #355a7b;
}
.research-credit strong {
  display: block;
  font-size: .86rem;
  letter-spacing: .035em;
}
.research-credit > span {
  display: block;
  margin-top: 4px;
  font-size: .8rem;
  line-height: 1.45;
}

.project-rule-line {
  display: block;
  width: 65px;
  height: 3px;
  margin-top: 12px;
  border-radius: 2px;
  background: #608baa;
  transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
  .project-rule-line.entered { animation: section-rule-grow .75s ease-out; }
}
