/* Polish pass — loaded last. */

/* Parallax must never expose the section's flat background; 32px covers the maximum 24px movement. Mobile framing stays unchanged. */
@media (min-width: 901px) {
  .blade-bg[data-parallax] { inset: -32px 0; }
}

/* 1. Hard seam at light/dark joins: old band was clipped by overflow:hidden. Draw fades inside each section. */
.blade + .blade::before {
  inset: 0 0 auto 0; height: 64px; z-index: 1;
  background: linear-gradient(180deg, var(--blade-edge-color, transparent) 0%, transparent 100%);
}
.blade-light + .blade-dark::before { background: linear-gradient(180deg, rgba(11,23,19,.9), transparent); }
.blade-dark + .blade-light::before { background: linear-gradient(180deg, rgba(220,226,215,.9), transparent); }
.blade-light:has(+ .blade-dark)::after,
.blade-dark:has(+ .blade-light)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px;
  z-index: 1; pointer-events: none;
}
.blade-light:has(+ .blade-dark)::after { background: linear-gradient(180deg, transparent, rgba(11,23,19,.9)); }
.blade-dark:has(+ .blade-light)::after { background: linear-gradient(180deg, transparent, rgba(220,226,215,.9)); }
.blade-light:has(+ .blade-dark), .blade-dark:has(+ .blade-light) { position: relative; }

/* 2. Roadmap copy unreadable over dark mountain: mist behind the copy only. */
.roadmap .blade-veil {
  background:
    linear-gradient(180deg, rgba(220,226,215,.84) 0%, rgba(220,226,215,.6) 40%, rgba(220,226,215,.35) 100%),
    linear-gradient(180deg, rgba(220,226,215,.20), rgba(220,226,215,.30)) !important;
}
@media (min-width: 1100px) {
  .roadmap .blade-veil {
    background:
      linear-gradient(90deg, rgba(220,226,215,.86) 0%, rgba(220,226,215,.62) 30%, rgba(220,226,215,.18) 62%, rgba(220,226,215,.12) 100%),
      linear-gradient(180deg, rgba(220,226,215,.20), rgba(220,226,215,.30)) !important;
  }
}

/* 3. Mobile framing of 16:9 art in portrait sections. */
@media (max-width: 1099px) {
  .closing .blade-bg { background-position: 56% center !important; } /* couple off-screen */
}
@media (max-width: 899px) {
  .transition-blade .blade-bg { background-position: 80% center !important; } /* S mark cut */
  .pause-blade .blade-bg { background-size: auto 125% !important; background-position: 62% 0% !important; } /* S behind text */
  .pause-blade .pause-copy { margin-top: calc(var(--header-height) + 24px) !important; }
}

/* 4. Header ≤960px: empty CTA column made uneven gutters and a stretched PT/EN pill. */
@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr auto auto; }
  .lang-toggle { justify-self: end; }
}

/* 5. Paired buttons 50px vs 52px; stacked CTAs different widths on phones. */
.btn-primary { border: 1px solid transparent; }
.btn { justify-content: center; }
@media (max-width: 559px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
}

/* 6. Dark→light seams showed a bright line (two 0.9 layers meeting). Use one eased, fully-opaque fade that matches the light section's top colour exactly. */
.blade-dark:has(+ .blade-light)::after {
  height: 220px;
  background: linear-gradient(180deg,
    rgba(220,226,215,0) 0%, rgba(220,226,215,.04) 18%, rgba(220,226,215,.14) 36%,
    rgba(220,226,215,.32) 52%, rgba(220,226,215,.56) 68%, rgba(220,226,215,.8) 84%,
    rgba(220,226,215,.94) 94%, rgb(220,226,215) 100%);
}
.blade-dark + .blade-light::before {
  height: 120px;
  background: linear-gradient(180deg,
    rgb(220,226,215) 0%, rgba(220,226,215,.7) 35%, rgba(220,226,215,.3) 70%, rgba(220,226,215,0) 100%);
}

/* 7. Hero→Mercado fade showed during the intro: hide it until the copy appears, then rise from the bottom. */
.hero.blade-dark::after {
  transform-origin: bottom; transform: scaleY(0); opacity: 0;
  transition: transform 1.6s cubic-bezier(.22,.61,.36,1), opacity 1.6s ease;
}
body:not(.is-loading):not(.intro-playing) .hero.blade-dark::after { transform: scaleY(1); opacity: 1; }
