/* ==========================================================================
   Home hero — city in letters, opening into the cinematic event layout
   ========================================================================== */

.hx { position: relative; isolation: isolate; padding: 0; }
.hx-eyebrow { font-size: 0.6875rem; letter-spacing: 0.22em; }
.hx-fact { display: flex; flex-direction: column; gap: 0.3rem; }
.hx-fact .label { font-size: 0.625rem; letter-spacing: 0.18em; opacity: 0.7; }
.hx-fact__v { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.15; }
.hx-cd .label { font-size: 0.625rem; letter-spacing: 0.18em; opacity: 0.7; }
.hx-cd__row { display: flex; gap: 1.25rem; margin-top: 0.4rem; }
.hx-cd__row span { display: flex; flex-direction: column; align-items: flex-start; }
.hx-cd__row b { font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.5rem); line-height: 1; }
.hx-cd__row small { font-size: 0.5625rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.65; }

/* ---------- End-state layout (title, lead, glass event bar) ------------- */
.hx1__title { margin-top: 2rem; font-family: var(--font-serif); font-weight: 400; font-size: clamp(3.25rem, 1rem + 8.5vw, 10.5rem); line-height: 0.92; letter-spacing: -0.035em; color: var(--white); }
.hx1__lead { margin-top: 1.5rem; max-width: 40rem; font-family: var(--font-serif); font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem); line-height: 1.4; color: rgba(255, 255, 255, 0.85); }
.hx1__bar {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: clamp(1.5rem, 1rem + 2.5vw, 4rem);
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); padding: clamp(1rem, 1rem + 0.8vw, 0.5rem) clamp(1.25rem, 1rem + 1.2vw, 2.0rem);
  border-radius: calc(var(--radius-img) + 4px); border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 26, 43, 0.35); -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
}
.hx1__facts { display: flex; gap: clamp(1.5rem, 1rem + 2vw, 3rem); }
.hx1__facts .hx-fact + .hx-fact { padding-left: clamp(1.5rem, 1rem + 2vw, 3rem); }
.hx1__actions { display: flex; gap: 0.75rem; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 2 · City in letters ------------------------------------------ */
/* One photo sits behind everything. An SVG navy layer has the word cut out of it
   (mask), placed by JS exactly over the hidden word in the text layout; scaling
   the cut-out on scroll opens the letters until the photo fills the screen. */
.hx2 { background: var(--navy-900); color: var(--white); }
.hx2__pin { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: center; overflow: hidden; }
.hx2__reveal { position: absolute; inset: 0; z-index: 0; }
.hx2__reveal video { width: 100%; height: 100%; object-fit: cover; animation: hx-drift 24s ease-in-out infinite alternate; }
.hx2__reveal::after { content: ""; position: absolute; inset: 0; opacity: var(--veil, 0); }
@keyframes hx-drift { from { transform: scale(1.12) translateX(-2%); } to { transform: scale(1.12) translateX(2%); } }
.hx2__mask { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hx2__cut { font-family: var(--font-serif); letter-spacing: -0.05em; }
.hx2__pin > .hx2__inner { position: relative; z-index: 2; }
.hx2__pin > .hx2__inner .hx2__word { visibility: hidden; }
.hx2__inner { width: 100%; padding-top: calc(var(--header-h) + 2rem); padding-bottom: 3rem; }
.hx2 .hx-eyebrow { color: var(--steel); text-align: center; }
.hx2__title { margin-top: 1rem; text-align: center; font-weight: 400; }
.hx2__word { display: block; font-family: var(--font-serif); font-size: clamp(5rem, 1rem + 19vw, 22rem); line-height: 0.85; letter-spacing: -0.05em; transform-origin: 46% 55%; }
.hx2__sub { display: block; margin-top: 0.75rem; font-family: var(--font-serif); font-size: clamp(1.5rem, 1rem + 2vw, 3rem); letter-spacing: 0.02em; color: var(--white); }
.hx2__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: clamp(1.5rem, 1rem + 3vw, 4rem); margin-top: clamp(2.5rem, 2rem + 3vw, 5rem); padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.hx2__lead { max-width: 30rem; font-family: var(--font-serif); font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.3125rem); line-height: 1.4; color: rgba(255, 255, 255, 0.8); }
.hx2__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
/* End state (looks like variant 1): hidden until the scroll animation reveals it */
.hx2__final { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; margin-inline: auto; padding-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); opacity: 0; visibility: hidden; }
.hx2__final .hx-eyebrow { text-align: left; }
.hx2__final .hx1__title span { display: block; }
.hx2__final .hx-eyebrow { color: var(-); }
.hx2__final .hx-cd { padding-left: clamp(1.5rem, 1rem + 2.5vw, 4rem); }
@media (max-width: 639px) { .hx2__final .hx-cd { padding-left: 0; border-left: 0; } }
.hx2__reveal::after { background: linear-gradient(180deg, rgba(11, 26, 43, 0.55) 0%, rgba(11, 26, 43, 0.1) 30%, rgba(11, 26, 43, 0.35) 55%, rgba(11, 26, 43, 0.92) 100%); }
/* intro animation must not hold opacity, or the scroll fade can't take over */
.hx2 .intro-rise { animation-fill-mode: backwards !important; }

/* ---------- Responsive ---------------------------------------------------- */
@media (max-width: 1023px) {
  .hx1__bar { grid-template-columns: 1fr 1fr; }
  .hx1__actions { grid-column: 1 / -1; justify-content: flex-start; }
  .hx2__row { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 639px) {
  .hx1__bar { grid-template-columns: 1fr; }
  .hx1__facts { flex-direction: column; gap: 1rem; }
  .hx1__facts .hx-fact + .hx-fact,   .hx1__actions .btn, .hx2__actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  }

/* Phones: keep the end-state layout within one screen */
@media (max-width: 639px) {
  .hx2__final { padding-bottom: 1rem; }
  .hx2__final .hx1__title { font-size: clamp(2.75rem, 1rem + 9vw, 3.5rem); }
  .hx2__final .hx1__lead { display: none; }
  .hx2__final .hx1__bar { gap: 1rem; margin-top: 1.25rem; padding: 1rem 1.1rem; }
  .hx2__final .hx1__facts { flex-direction: row; gap: 1.25rem; }
  .hx2__final .hx1__facts .hx-fact + .hx-fact { padding-left: 1.25rem; border-left: 1px solid rgba(255, 255, 255, 0.18); }
  .hx2__final .hx-fact__v { font-size: 1rem; }
  .hx2__final .hx-cd__row b { font-size: 1.75rem; }
  .hx2__final .hx1__actions .btn { flex: 1 1 0; min-width: 0; padding-inline: 0.75rem; }
}

/* Hero opens straight on the final layout: no letter intro, no scroll pin */
.hx2__pin > .hx2__inner, .hx2__cut-svg, .hx2 svg:has(.hx2__cut) { display: none; }
.hx2__reveal { --veil: 1; }
.hx2__final { opacity: 1; visibility: visible; }

/* Hero info bar on phones: tidy grid, buttons stacked full width */
@media (max-width: 639px) {
  .hx2__final .hx1__bar { display: grid; gap: 1.25rem; }
  .hx2__final .hx1__facts { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; }
  .hx2__final .hx1__facts .hx-fact + .hx-fact { padding-left: 1rem; }
  .hx2__final .hx-cd { padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
  .hx2__final .hx1__actions { display: grid; grid-template-columns: 1fr; gap: 0.625rem; width: 100%; }
  .hx2__final .hx1__actions .btn { width: 100%; justify-content: center; white-space: nowrap; }
}
@media (max-width: 639px) {
  .hx2__final { padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
  .hx2__pin { min-height: max(100svh, 46rem); }
}

/* UA: Ukrainian words are longer — hero end-state title ~30% smaller on desktop */
@media (min-width: 1024px) {
  html:lang(uk) .hx1__title { font-size: clamp(2.275rem, 0.7rem + 5.95vw, 7.35rem); }
}
