/* Ecranul AdSpot: o scenă fixă de 1920×1080, scalată întreagă pe televizor.
   Animațiile mișcă doar transform și opacity, ca să meargă lin și pe un stick TV slab. */

@property --accent { syntax: '<color>'; inherits: true; initial-value: #ff6b2c; }
@property --accent2 { syntax: '<color>'; inherits: true; initial-value: #ffc94a; }

:root {
  --bg: #07080c;
  --ink: #f5f7fb;
  --muted: rgba(245, 247, 251, 0.74);
  --line: rgba(255, 255, 255, 0.14);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body.is-idle { cursor: none; }

.viewport { position: fixed; inset: 0; }

.noscript { padding: 32px 16px; font-size: 18px; text-align: center; }

/* ---------- Scena ---------- */

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  background: var(--bg);
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transition: --accent 0.9s ease, --accent2 0.9s ease;
  cursor: pointer;
}

/* ---------- Banda de sus ---------- */

.ticker {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  height: 72px;
  background: rgba(8, 10, 16, 0.86);
  border-bottom: 2px solid var(--accent);
}

.ticker__label {
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 36px;
  background: var(--accent);
  color: #0b0b0f;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.ticker__viewport {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent);
}

.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 45s linear infinite;
}

.ticker__item {
  display: flex;
  align-items: center;
  font-size: 28px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
}

.ticker__item::after {
  content: '';
  width: 10px;
  height: 10px;
  margin: 0 48px;
  border-radius: 50%;
  background: var(--accent);
}

@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Reclamele ---------- */

.slides { position: absolute; inset: 72px 0 0 0; }

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease;
}

.slide__bg { position: absolute; inset: 0; overflow: hidden; background: var(--bg); }

/* Pete de culoare din gradient, fără filter: blur (prea scump pentru un stick TV). */
.blob { position: absolute; border-radius: 50%; will-change: transform; }

.blob--a {
  width: 1300px;
  height: 1300px;
  right: -380px;
  top: -520px;
  background: radial-gradient(circle, var(--a) 0%, transparent 66%);
  opacity: 0.5;
  animation: drift-a 16s ease-in-out infinite alternate;
}

.blob--b {
  width: 1000px;
  height: 1000px;
  right: 380px;
  bottom: -560px;
  background: radial-gradient(circle, var(--b) 0%, transparent 66%);
  opacity: 0.28;
  animation: drift-b 20s ease-in-out infinite alternate;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 96px 96px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
}

@keyframes drift-a { to { transform: translate3d(-140px, 90px, 0) scale(1.08); } }
@keyframes drift-b { to { transform: translate3d(160px, -70px, 0) scale(0.94); } }

/* Conținutul stă în zona sigură pentru titluri (10% din fiecare margine). */
.slide__body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 560px;
  align-items: center;
  gap: 80px;
  height: 100%;
  padding: 0 192px 72px;
}

.slide__content { min-width: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  color: var(--b);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 56px;
  height: 5px;
  border-radius: 3px;
  background: var(--a);
}

.headline {
  margin-top: 28px;
  font-size: 112px;
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.slide--house .headline {
  font-size: 156px;
  line-height: 0.96;
  background: linear-gradient(100deg, #fff 30%, var(--b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text {
  max-width: 960px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 40px;
  font-weight: 500;
  line-height: 1.38;
}

.chips { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 56px; }

.chip {
  padding: 18px 32px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 30px;
  font-weight: 700;
}

.chip:first-child { border-color: transparent; background: var(--a); color: #0b0b0f; }

.slide__side { display: grid; place-items: center; }

/* Oferta, într-un cerc cu inel care se rotește încet. */
.badge {
  position: relative;
  display: grid;
  place-content: center;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--a), var(--b));
  color: #0b0b0f;
  text-align: center;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
  animation: float 6s ease-in-out infinite alternate;
}

.badge::before {
  content: '';
  position: absolute;
  inset: -30px;
  border: 3px dashed rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: spin 40s linear infinite;
}

.badge__value { font-size: 140px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; }

.badge__caption {
  margin-top: 14px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qr-card {
  width: 460px;
  padding: 36px 36px 32px;
  border-radius: 40px;
  background: #fff;
  color: #0b0b0f;
  text-align: center;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(255, 255, 255, 0.08);
  animation: float 6s ease-in-out infinite alternate;
}

.qr-card__code { width: 388px; height: 388px; margin: 0 auto; }
.qr-card__code svg { display: block; width: 100%; height: 100%; fill: #0b0b0f; }
.qr-card__code.is-missing { display: none; }

.qr-card__label { margin-top: 20px; font-size: 30px; font-weight: 800; line-height: 1.2; }
.qr-card__url { margin-top: 4px; color: #55575f; font-size: 26px; font-weight: 600; }

.sample-tag {
  position: absolute;
  top: 40px;
  right: 192px;
  padding: 10px 20px;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  border-radius: 12px;
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes float { to { transform: translateY(-18px); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Intrarea pe ecran ---------- */

.reveal { opacity: 0; transform: translateY(44px); }
.pop { opacity: 0; transform: scale(0.86); }

.slide.is-active .reveal {
  animation: rise 0.9s var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 130ms + 250ms);
}

.slide.is-active .pop { animation: pop 1s var(--ease-out) 0.45s forwards; }

/* Reclama care pleacă rămâne cum era cât se estompează. */
.slide.is-leaving .reveal,
.slide.is-leaving .pop { opacity: 1; transform: none; }

@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { to { opacity: 1; transform: none; } }

/* ---------- Progres, pauză, zona sigură ---------- */

.progress {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 5;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
}

.progress__bar.is-running { animation: progress var(--duration, 8s) linear forwards; }

@keyframes progress { to { transform: scaleX(1); } }

.stage.is-paused .progress__bar,
.stage.is-paused .ticker__track { animation-play-state: paused; }

.paused-tag {
  position: absolute;
  bottom: 40px;
  left: 50%;
  z-index: 6;
  padding: 12px 28px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 26px;
  font-weight: 700;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.3s ease;
}

.stage.is-paused .paused-tag { opacity: 1; }

/* Marginea exterioară: zona pe care o arată orice televizor (5%). Cea interioară: zona
   pentru text (10%), unde nimic important nu riscă să fie tăiat. */
.safezone {
  position: absolute;
  inset: 54px 96px;
  z-index: 7;
  display: none;
  border: 3px dashed rgba(45, 255, 170, 0.9);
  pointer-events: none;
}

.safezone::after {
  content: '';
  position: absolute;
  inset: 51px 93px;
  border: 3px dashed rgba(255, 214, 10, 0.9);
}

.safezone span {
  position: absolute;
  left: 50%;
  bottom: 16px;
  padding: 8px 18px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #2dffaa;
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}

.stage.show-safezone .safezone { display: block; }

/* ---------- Indicații (în afara scenei, pentru demo pe calculator) ---------- */

.hint {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 10;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 0.4s ease;
}

body.is-idle .hint { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .blob, .badge, .badge::before, .qr-card { animation: none; }
}
