/* ============================================================
   PAGE TRANSITION OVERLAY
   ============================================================ */

.tx-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg, #0a0a0a);
  display: grid;
  place-items: center;
  transform: translateY(100%);
  pointer-events: none;
  will-change: transform;
  overflow: hidden;
}

/* Subtle grid — same as hero */
.tx-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(245,240,230,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,240,230,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 72%);
  pointer-events: none;
}

/* ---- Panel slides UP to cover screen ---- */
.tx-overlay.tx-in {
  pointer-events: all;
  animation: txIn 0.52s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

/* ---- Panel slides UP to reveal new page ---- */
.tx-overlay.tx-out {
  transform: translateY(0);
  animation: txOut 0.52s cubic-bezier(0.76, 0, 0.24, 1) forwards 0.08s;
}

@keyframes txIn  { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes txOut { from { transform: translateY(0);    } to { transform: translateY(-100%); } }

/* ---- Content ---- */
.tx-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px;
  gap: 0;
}

.tx-kicker {
  font-family: 'Unbounded', system-ui, sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(245,240,230,0.45);
  margin-bottom: 20px;
  opacity: 0;
}
.tx-overlay.tx-in .tx-kicker {
  animation: txFadeUp 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) 0.28s both;
}
.tx-overlay.tx-out .tx-kicker { opacity: 1; }

.tx-num {
  font-family: 'Unbounded', system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(96px, 20vw, 260px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: #f5f0e6;
  opacity: 0;
  transform: translateY(24px);
  white-space: nowrap;
}
.tx-overlay.tx-in .tx-num {
  animation: txFadeUp 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) 0.32s both;
}
.tx-overlay.tx-out .tx-num { opacity: 1; transform: translateY(0); }

.tx-line {
  width: 0;
  height: 2px;
  background: #d4ff4f;
  margin: 28px 0 24px;
  border-radius: 1px;
}
.tx-overlay.tx-in .tx-line {
  animation: txLineGrow 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.46s both;
}
.tx-overlay.tx-out .tx-line { width: 100px; }

.tx-title {
  font-family: 'Old Standard TT', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 30px);
  color: rgba(245,240,230,0.6);
  max-width: 640px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(16px);
}
.tx-overlay.tx-in .tx-title {
  animation: txFadeUp 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.52s both;
}
.tx-overlay.tx-out .tx-title { opacity: 1; transform: translateY(0); }

@keyframes txFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes txLineGrow {
  from { width: 0;     }
  to   { width: 100px; }
}
