/* ==========================================================================
   NGW Studio — előnézeti bővítmények
   --------------------------------------------------------------------------
   Csak az /elonezet oldal tölti be. A főoldal CSS-éhez nem nyúl, és minden
   osztálynév x- előtaggal kezdődik, hogy semmi ne ütközzön.
   ========================================================================== */

/* ---------- 1. Görgetéssel tekert film ---------- */
/* A szekciónak nincs saját háttere: az oldaléra ül rá (--bg: #07070f).
   A felvétel széleit maszk oldja el, így nem egy kivágott doboz lóg az
   oldal közepén, hanem beleúszik. */
.x-scrub { position: relative; height: 260vh; background: transparent; }
.x-scrub__pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  display: grid; place-items: center;
}
.x-scrub__pin video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: contents;
  -webkit-mask-image:
    radial-gradient(122% 78% at 50% 48%, #000 30%, rgba(0,0,0,.62) 62%, transparent 92%);
          mask-image:
    radial-gradient(122% 78% at 50% 48%, #000 30%, rgba(0,0,0,.62) 62%, transparent 92%);
}
.x-scrub__pin::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(126% 86% at 50% 48%, transparent 0%, rgba(7,7,15,.42) 68%, var(--bg, #07070f) 100%),
    linear-gradient(to bottom, var(--bg, #07070f) 0%, transparent 26%, transparent 74%, var(--bg, #07070f) 100%);
  pointer-events: none;
}
/* Egyetlen szó a felvétel fölött. Amint elindul a tekerés, elhalványul —
   a dolgát elvégezte. */
.x-scrub__cue {
  position: relative; z-index: 2; margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .68rem; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
  transition: opacity .5s ease;
}

/* a tekerés állapotjelzője */
.x-scrub__bar {
  position: absolute; left: 50%; bottom: 46px; translate: -50% 0;
  width: min(280px, 60vw); height: 2px; z-index: 3;
  background: rgba(255,255,255,.14); border-radius: 2px; overflow: hidden;
}
.x-scrub__bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, #a855f7, #22d3ee, #f472b6);
}

/* ---------- 2. Short form reel ---------- */
.x-short { padding: clamp(70px, 10vw, 130px) 0; position: relative; }
.x-short__grid {
  max-width: 1180px; margin: 0 auto; padding: 0 26px;
  display: grid; gap: clamp(34px, 5vw, 68px);
  grid-template-columns: 1fr min(300px, 34%);
  align-items: center;
}
.x-short__copy h2 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: clamp(1.9rem, 4vw, 3.1rem); font-weight: 700;
  letter-spacing: -.03em; line-height: 1.06; margin: 12px 0 16px; color: #fff;
}
.x-short__copy .lead { color: #a3a9bd; margin: 0; font-size: 1.02rem; max-width: 52ch; }

/* tényszerű felsorolás a szlogenek helyett */
.x-facts { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.x-facts li {
  display: grid; grid-template-columns: minmax(0, 168px) 1fr; gap: 6px 18px;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,.09);
}
.x-facts b {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
  color: #22d3ee; font-weight: 500;
}
.x-facts span { color: #a3a9bd; font-size: .92rem; line-height: 1.5; }

/* Ajánlatkérő gomb a szekcióban. A gomb stílusát az eredeti oldal adja
   (.btn.btn-p), itt csak a helyét igazítjuk. */
.x-short__cta { display: inline-flex; margin-top: 28px; }

/* telefonkeret a reellel */
.x-short__player { display: grid; justify-items: center; gap: 14px; }
.x-phone {
  position: relative; width: 100%; max-width: 300px;
  aspect-ratio: 9 / 16;
  border-radius: 30px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(150deg, #1a1233, #0a1420);
  box-shadow: 0 20px 46px -22px rgba(168,85,247,.42), 0 0 0 6px rgba(255,255,255,.03);
}
.x-phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-phone::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 44px rgba(5,5,12,.5);
}
/* Jelölő: ez példa, nem ügyfélmunka. */
.x-phone__tag {
  position: absolute; left: 12px; top: 12px; z-index: 3;
  padding: 4px 9px; border-radius: 100px;
  background: rgba(5,5,12,.72); border: 1px solid rgba(255,255,255,.2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .56rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.x-phone__btn {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(5,5,12,.78);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: background .25s, border-color .25s;
}
.x-phone__btn:hover { background: rgba(5,5,12,.85); border-color: rgba(255,255,255,.4); }
.x-phone__btn:focus-visible { outline: 2px solid #22d3ee; outline-offset: 2px; }
/* lejátszás alatt szünet-, egyébként lejátszás-ikon — tiszta CSS */
.x-phone__ico { display: block; width: 0; height: 0;
  border-left: 10px solid #fff; border-top: 6px solid transparent;
  border-bottom: 6px solid transparent; margin-left: 3px; }
.x-playing .x-phone__ico {
  width: 10px; height: 12px; margin-left: 0; border: 0;
  border-left: 3px solid #fff; border-right: 3px solid #fff;
  background: transparent; box-sizing: border-box;
}

@media (max-width: 860px) {
  .x-short__grid { grid-template-columns: 1fr; }
  .x-short__player { order: -1; }
  .x-phone { max-width: 260px; }
  .x-facts li { grid-template-columns: 1fr; gap: 3px; }
}

/* ---------- 2. Betűnkénti dekódolás ----------
   A címsor csak akkor van elrejtve, ha a JS tényleg fut (.x-js). Ha az
   extra.js bármiért nem töltődne be, a failsafe animáció 3 másodperc után
   akkor is láthatóvá teszi — soha nem maradhat üres a címsor. */
.x-js .x-decode {
  visibility: hidden;
  animation: x-decode-failsafe 0s linear 3s forwards;
}
.x-js .x-decode.x-on { visibility: visible; animation: none; }
@keyframes x-decode-failsafe { to { visibility: visible; } }
/* A hosszabb címsorok inkább törjenek több sorba, mint hogy egy hosszú
   sorban feszüljenek: a balance kiegyenlíti a sorok hosszát. */
.x-decode, .x-short__copy h2 {
  text-wrap: balance;
  hyphens: manual;
}
.x-decode i { font-style: inherit; }
.x-decode i.x-scr { color: #22d3ee; opacity: .75; }

/* ---------- Telefon ---------- */
@media (max-width: 760px) {
  .x-short__grid { padding: 0 20px; }
  .x-scrub { height: 200vh; }
  .x-scrub__bar { bottom: 62px; width: 56vw; }
  /* Kis kijelzőn halványabban, hogy a szöveg mindig olvasható legyen. */
}

/* Az előnézeti csík telefonon két sorba törhet, ilyenkor több hely kell alá. */
@media (max-width: 520px) {
  .x-flag { font-size: .58rem; letter-spacing: .1em; padding: 8px 12px; }
}

/* ---------- Mozgáscsökkentés ---------- */
@media (prefers-reduced-motion: reduce) {
  .x-scrub { height: auto; }
  .x-scrub__pin { position: relative; height: 70vh; }
  .x-phone video { transition: none; }
  .x-decode { visibility: visible; }
}


/* ---------- Nyelvváltó ---------- */
.x-lang {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; margin-right: 12px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 100px;
  background: rgba(255,255,255,.035);
}
.x-lang button {
  appearance: none; border: 0; cursor: pointer;
  padding: 5px 11px; border-radius: 100px;
  background: transparent; color: #7a8199;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .64rem; letter-spacing: .12em; font-weight: 500;
  transition: color .25s, background .25s;
}
.x-lang button:hover { color: #eef0f8; }
.x-lang button:focus-visible { outline: 2px solid #22d3ee; outline-offset: 1px; }
.x-lang .x-lang__on {
  background: linear-gradient(135deg, rgba(168,85,247,.9), rgba(34,211,238,.9));
  color: #05050c;
}
/* A fejlécben szűk a hely: mobilon a hamburger mellé kerül, kisebben. */
@media (max-width: 900px) {
  .x-lang { margin-right: 10px; padding: 2px; }
  .x-lang button { padding: 4px 8px; font-size: .58rem; letter-spacing: .08em; }
}

/* ---------- Előnézeti csík ---------- */
.x-flag {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99998;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 9px 16px;
  background: linear-gradient(90deg, #a855f7, #22d3ee, #f472b6);
  color: #05050c;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500;
}
.x-flag a { color: #05050c; text-decoration: underline; }
body { padding-bottom: 34px; }
