/* Shared page ending: one clear next step, followed by compact cross-page navigation. */
.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.page-end-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(72px, 9vw, 132px) max(24px, calc((100vw - 1160px) / 2)) 0;
  color: #f3ead4;
  background:
    linear-gradient(112deg, rgba(14, 15, 12, .98), rgba(31, 31, 23, .94)),
    url('assets/vellum.webp') center / cover;
  background-blend-mode: normal, multiply;
}

.page-end-cta::before {
  content: 'كوفي';
  position: absolute;
  z-index: -1;
  right: -2vw;
  bottom: -48px;
  color: #d6b566;
  font: 340px/1 KufiLegacy, serif;
  opacity: .055;
  pointer-events: none;
  transform: rotate(-2deg);
}

.page-end-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr);
  gap: clamp(38px, 7vw, 105px);
  align-items: end;
  padding-bottom: clamp(62px, 7vw, 94px);
}

.page-end-copy { max-width: 720px; }
.page-end-cta .eyebrow { color: #d8bb71; }
.page-end-cta h2 {
  max-width: 12ch;
  margin: 18px 0 24px;
  color: #f5ecd8;
  font: 400 clamp(46px, 6.2vw, 86px)/.96 var(--display);
  letter-spacing: -.045em;
}
.page-end-cta h2 em { color: #d8b75f; font-weight: 400; }
.page-end-copy > p:last-child {
  max-width: 54ch;
  margin: 0;
  color: rgba(245, 236, 216, .68);
  font-size: 15px;
}

.page-end-actions {
  display: grid;
  gap: 16px;
  justify-items: start;
}
.page-end-actions .studio-cta { width: min(100%, 370px); }
.page-end-secondary {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 3px;
  color: #efe4ca;
  border-bottom: 1px solid rgba(216, 183, 95, .5);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}
.page-end-secondary span { transition: transform .3s ease; }
.page-end-secondary:hover span,
.page-end-secondary:focus-visible span { transform: translateX(5px); }

.page-end-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  min-height: 74px;
  border-top: 1px solid rgba(216, 183, 95, .22);
}
.page-end-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  position: relative;
  color: rgba(245, 236, 216, .62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .25s ease;
}
.page-end-nav a:hover,
.page-end-nav a:focus-visible,
.page-end-nav a[aria-current='page'] { color: #f2d786; }
.page-end-nav a[aria-current='page']::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 8px;
  left: 0;
  height: 1px;
  background: currentColor;
}

@media (max-width: 760px) {
  .page-end-cta { padding-inline: 24px; }
  .page-end-cta::before { right: -110px; bottom: 10px; font-size: 230px; }
  .page-end-inner { grid-template-columns: 1fr; gap: 34px; }
  .page-end-cta h2 { font-size: clamp(43px, 13vw, 62px); }
  .page-end-actions,
  .page-end-actions .studio-cta,
  .page-end-secondary { width: 100%; }
  .page-end-secondary { justify-content: space-between; }
  .page-end-nav { gap: 4px 18px; flex-wrap: wrap; padding-block: 12px; }
  .page-end-nav a { flex: 1 1 calc(50% - 18px); }
}

@media (prefers-reduced-motion: reduce) {
  .page-end-secondary span { transition: none; }
  .page-end-secondary:hover span,
  .page-end-secondary:focus-visible span { transform: none; }
}
