/* GlowTech Halloween · glh5 — справжня 3D-сцена (WebGL2), стилі в просторі імен .glh5-* */
.glh5-hero, .glh5-footdeco { box-sizing: border-box; position: relative; isolation: isolate; color: #fff4ea; font-family: inherit; }
.glh5-hero *, .glh5-footdeco * { box-sizing: border-box; }

.glh5-hero { display: block; overflow: hidden; border-radius: 24px; background: #170817 linear-gradient(180deg, #120610 0%, #1a0915 50%, #2c1420 100%); contain: layout paint; }
.glh5-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 1; opacity: 0; }
/* fallback — повний статичний кадр тієї ж сцени, вписаний у .glh5-stage без обрізання (contain) */
.glh5-fallback { position: absolute; inset: 0; display: block; pointer-events: none; }
.glh5-fallback img {
  display: block; width: 100%; height: 100%; object-fit: contain; object-position: 50% 50%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 8%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 8%, #000 90%, transparent);
  mask-composite: intersect;
}
.glh5-hero.glh5-live .glh5-canvas { opacity: 1; }
.glh5-hero.glh5-live .glh5-fallback { visibility: hidden; }
.glh5-hero::after { /* м'яке затемнення під текстом, лише ліворуч */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(20, 6, 20, .55) 0%, rgba(20, 6, 20, .25) 30%, rgba(20, 6, 20, 0) 48%);
}
.glh5-inner {
  position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  align-items: center; gap: clamp(8px, 2vw, 28px); min-height: clamp(480px, 44vw, 660px);
  padding: clamp(24px, 3vw, 48px) clamp(16px, 2.4vw, 40px) clamp(16px, 2vw, 32px) clamp(24px, 4vw, 64px);
}
.glh5-copy { max-width: 520px; }
.glh5-stage { position: relative; align-self: center; width: 100%; aspect-ratio: 1000 / 720; pointer-events: none; }
.glh5-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #ffa24c; }
.glh5-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ffa24c; box-shadow: 0 0 0 4px rgba(255, 162, 76, .18); }
.glh5-title { margin: 0; font-size: clamp(34px, 4.4vw, 68px); line-height: 1.02; font-weight: 800; letter-spacing: -.025em; color: #fff4ea; text-wrap: balance; }
.glh5-title em { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; color: #ffa24c; }
.glh5-lead { margin: 20px 0 0; max-width: 34ch; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: rgba(244, 226, 238, .82); }
.glh5-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.glh5-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border-radius: 14px; font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.glh5-btn--primary { background: #ffa24c; color: #2a0f12; }
.glh5-btn--primary:hover { background: #ffb46a; }
.glh5-btn--ghost { color: #fff4ea; border: 1.5px solid rgba(255, 230, 210, .42); background: rgba(20, 6, 20, .25); }
.glh5-btn--ghost:hover { border-color: rgba(255, 230, 210, .8); }
.glh5-btn:focus-visible { outline: 2px solid #ffd29a; outline-offset: 3px; }
.glh5-src { display: none; }

/* керування циклом: видно лише коли живий 3D-рендер працює */
.glh5-ctrl { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: none; gap: 8px; }
.glh5-js.glh5-live .glh5-ctrl { display: flex; }
.glh5-cbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 230, 210, .38); background: rgba(20, 6, 20, .55); color: #fff4ea; cursor: pointer; }
.glh5-cbtn:hover { border-color: rgba(255, 230, 210, .8); }
.glh5-cbtn:focus-visible { outline: 2px solid #ffd29a; outline-offset: 2px; }
.glh5-cbtn svg { width: 16px; height: 16px; fill: currentColor; }
.glh5-cbtn[data-state="playing"] .glh5-i-play, .glh5-cbtn[data-state="paused"] .glh5-i-pause { display: none; }

@media (max-width: 1023.98px) {
  .glh5-inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 32px 28px 16px; }
  .glh5-stage { aspect-ratio: 1000 / 620; }
  .glh5-hero::after { background: linear-gradient(180deg, rgba(20, 6, 20, .5) 0%, rgba(20, 6, 20, 0) 40%); }
}
@media (max-width: 767.98px) {
  .glh5-ctrl { right: 10px; bottom: 10px; gap: 6px; }
  .glh5-cbtn { width: 34px; height: 34px; }
  .glh5-hero { border-radius: 18px; }
  .glh5-inner { padding: 26px 18px 10px; gap: 6px; }
  .glh5-stage { aspect-ratio: 1000 / 1040; width: auto; margin: 0 -18px; } /* сцена на всю ширину картки */
  .glh5-eyebrow { font-size: 12px; margin-bottom: 14px; }
  .glh5-title { font-size: clamp(30px, 9.6vw, 42px); }
  .glh5-lead { margin-top: 14px; font-size: 15px; }
  .glh5-ctas { margin-top: 20px; gap: 10px; }
  .glh5-btn { flex: 1 1 140px; min-height: 48px; padding: 0 16px; font-size: 15px; }
}

/* Footer: низька широка 3D-смуга над чистою площиною контактів */
.glh5-footdeco { display: block; height: clamp(96px, 9vw, 140px); pointer-events: none; }
.glh5-fcanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.glh5-footdeco.glh5-live .glh5-fcanvas { opacity: 1; } /* втрачений контекст не показуємо — видно статичний кадр */
.glh5-ffallback { position: absolute; inset: 0; }
.glh5-ffallback::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, rgba(240, 150, 90, 0), #f0a26a 15%, #f7c08e 50%, #f0a26a 85%, rgba(240, 150, 90, 0)); }
.glh5-ffallback img { position: absolute; bottom: 0; display: block; height: 100%; width: auto; max-width: 50%; object-fit: contain; }
.glh5-ff-l { left: 0; object-position: 0 100%; }
.glh5-ff-r { right: 0; object-position: 100% 100%; }
.glh5-ffallback .glh5-ff-m { display: none; left: 0; width: 100%; max-width: none; object-position: 50% 100%; }
@media (max-width: 599.98px) {
  .glh5-ffallback .glh5-ff-l, .glh5-ffallback .glh5-ff-r { display: none; }
  .glh5-ffallback .glh5-ff-m { display: block; }
}
.glh5-footdeco.glh5-live .glh5-ffallback { display: none; }

/* Внутрішні сторінки: статична тонка смуга з тим самим 3D-мотивом (без JS і руху) */
.glh5-strip { box-sizing: border-box; position: relative; display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 6px 18px 6px 8px; border-radius: 16px; overflow: hidden; background: #170817 linear-gradient(90deg, #1d0a19, #170817 60%); color: #fff4ea; font-family: inherit; }
.glh5-strip *, .glh5-quiet * { box-sizing: border-box; }
.glh5-strip__art { flex: none; display: block; height: 64px; width: auto; }
.glh5-strip__text { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 15px; line-height: 1.4; color: rgba(244, 226, 238, .86); }
.glh5-strip__eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #ffa24c; }
.glh5-strip__link { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 12px; background: #ffa24c; color: #2a0f12; font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.glh5-strip__link:focus-visible { outline: 2px solid #ffd29a; outline-offset: 3px; }
@media (max-width: 599.98px) {
  .glh5-strip { flex-wrap: wrap; gap: 8px 12px; padding: 8px 14px 12px 6px; }
  .glh5-strip__art { height: 52px; }
  .glh5-strip__text { flex-basis: calc(100% - 130px); font-size: 14px; }
  .glh5-strip__link { margin-left: 6px; }
}
/* Checkout: найтихіший варіант — тонкий декоративний рядок, без посилань, без руху, не зсуває поля */
.glh5-quiet { box-sizing: border-box; display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 40px; padding: 0 12px; border-bottom: 1px solid rgba(240, 162, 106, .35); color: #b8865e; font-family: inherit; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.glh5-quiet__art { display: block; height: 34px; width: auto; }
