/* ============================================================
   BLACK FRIDAY INTRO — full-screen film overlay on the homepage
   Built by bf-intro.js only while the campaign runs.
   ============================================================ */
html.bf-lock, html.bf-lock body { overflow: hidden; }

.bf-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  background: #1c2730 url("img/bf-field.jpg?v=2") 38% 65% / cover no-repeat; /* keeps the logo clear of the offer panel */
  color: #f2f5f7;
  font-family: var(--ff-mono);
  transition: opacity 0.9s var(--ease-out), transform 1.2s var(--ease-out), filter 0.9s var(--ease-out);
}
/* Film grade: a little extra contrast */
.bf-film { filter: contrast(1.15) saturate(1.08); }
/* Poster grade: night city — the grey mist sinks, lit tiles stay bright */
.bf-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(5,8,13,0.6) 0%, rgba(5,8,13,0.25) 25%, rgba(5,8,13,0) 45%),
    url("img/bf-field.jpg?v=2") 38% 65% / cover no-repeat;
  filter: contrast(1.6) brightness(0.95) saturate(1.35);
}
/* Leaving: the field rushes towards the viewer, then fades */
.bf-intro.is-leaving {
  opacity: 0;
  transform: scale(1.08);
  filter: blur(6px);
  pointer-events: none;
}

/* ---- Film: YouTube iframe scaled to cover the viewport ---- */
.bf-film {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease;
  pointer-events: none;
}
.bf-intro.is-playing .bf-film { opacity: 1; }
.bf-film iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;
  min-width: 177.78vh;
  min-height: 100vh;
  /* slight overscan crops YouTube's edge chrome */
  transform: translate(-50%, -50%) scale(1.12);
  border: 0;
}

/* ---- Shade: keeps type readable over the bright fog ---- */
.bf-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10,16,22,0.45) 0%, rgba(10,16,22,0) 18%),
    linear-gradient(to top, rgba(8,12,17,0.85) 0%, rgba(8,12,17,0.4) 30%, rgba(8,12,17,0) 58%);
}

/* ---- Top bar ---- */
.bf-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 56px);
}
.bf-logo {
  font-family: var(--ff-display);
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  color: #f2f5f7;
}
.bf-logo .logo-lab { color: #3b8fd4; }
.bf-top-actions { display: flex; gap: 10px; }
.bf-chip {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242,245,247,0.85);
  background: rgba(10,16,22,0.35);
  border: 1px solid rgba(242,245,247,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 9px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.bf-chip:hover { border-color: rgba(242,245,247,0.6); color: #fff; }
.bf-chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

/* ---- Content ---- */
.bf-content {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 clamp(20px, 4vw, 56px) clamp(28px, 5vh, 56px);
  display: grid;
  grid-template-columns: 1fr minmax(360px, 620px);
  gap: clamp(28px, 4vw, 64px);
  align-items: end;
}

/* Verse: the film's three lines, appearing one at a time */
.bf-verse { position: relative; isolation: isolate; margin: 0; max-width: 640px; }
/* Soft dark pool behind the verse so it reads over the bright tiles */
.bf-verse::before {
  content: "";
  position: absolute;
  inset: -70px -110px -50px -80px;
  z-index: -1;
  background: radial-gradient(ellipse at 42% 55%, rgba(4,7,11,0.82) 0%, rgba(4,7,11,0.55) 42%, rgba(4,7,11,0) 72%);
  pointer-events: none;
}
.bf-verse span {
  display: block;
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.6rem);
  line-height: 1.35;
  color: rgba(242,245,247,0.92);
  text-shadow: 0 1px 3px rgba(0,0,0,0.8), 0 2px 24px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(14px);
  animation: bf-rise 1.2s var(--ease-out) forwards;
}
.bf-verse span:nth-child(1) { animation-delay: 0.3s; }
.bf-verse span:nth-child(2) { animation-delay: 1.4s; }
.bf-verse span:nth-child(3) { animation-delay: 2.5s; color: #fff; }

/* Offer panel */
.bf-panel {
  background: rgba(6,10,15,0.74);
  border: 1px solid rgba(242,245,247,0.16);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  padding: clamp(24px, 3.2vw, 40px);
  opacity: 0;
  transform: translateY(18px);
  animation: bf-rise 1.1s var(--ease-out) 3.6s forwards;
}
.bf-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-display);
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}
.bf-label::before {
  content: "";
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.bf-offer {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 14px 0 4px;
  font-family: var(--ff-display);
  line-height: 0.9;
}
.bf-offer strong {
  font-size: clamp(5rem, 9.5vw, 8rem);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.bf-offer span {
  font-size: clamp(1.9rem, 3vw, 2.7rem);
  letter-spacing: 0.06em;
  color: #f2f5f7;
}
.bf-offer small {
  display: block;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242,245,247,0.7);
  margin-top: 6px;
}
.bf-code {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(242,245,247,0.7);
}
.bf-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-mono);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: #fff;
  background: rgba(191,255,0,0.08);
  border: 1px dashed rgba(191,255,0,0.6);
  padding: 8px 12px 8px 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.bf-code-btn:hover { background: rgba(191,255,0,0.16); border-color: var(--accent); }
.bf-code-btn i {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.bf-code-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.bf-question {
  margin: 18px 0 24px;
  font-family: var(--ff-serif);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.5;
  color: rgba(242,245,247,0.8);
}
.bf-question em { display: block; color: #fff; font-style: italic; }
.bf-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.bf-enter {
  font-family: var(--ff-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a0a0a;
  background: var(--accent);
  border: 0;
  padding: 13px 22px;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.bf-enter:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(191,255,0,0.3); }
.bf-prices {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(242,245,247,0.75);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}
.bf-prices:hover { color: #fff; }

.bf-enter:focus-visible, .bf-chip:focus-visible, .bf-prices:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* ---- Small screens: stack verse above the panel ---- */
@media (max-width: 820px) {
  .bf-content { grid-template-columns: 1fr; gap: 22px; }
  .bf-verse span { font-size: 1rem; }
  .bf-shade {
    background:
      linear-gradient(to bottom, rgba(10,16,22,0.55) 0%, rgba(10,16,22,0) 20%),
      linear-gradient(to top, rgba(8,12,17,0.95) 0%, rgba(8,12,17,0.7) 50%, rgba(8,12,17,0.1) 85%);
  }
  .bf-top { padding-top: 18px; }
  .bf-logo { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bf-verse span, .bf-panel { animation: none; opacity: 1; transform: none; }
  .bf-intro, .bf-film { transition: opacity 0.3s; }
  .bf-intro.is-leaving { transform: none; filter: none; }
}
