/* =========================================================
   Limited-time offer bar — slim strip pinned above the navbar.
   Slides away smoothly once the page is scrolled; the navbar
   slides up into its place. Comes back at the top of the page.
   ========================================================= */
:root { --offer-h: 0px; }
html.has-offer { --offer-h: 44px; }
html.has-offer.offer-away { --offer-h: 0px; }

.offer {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;                               /* above the navbar (50) */
  height: 44px;
  transform: translateY(-100%);
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
  font-family: var(--sans, "Inter", system-ui, sans-serif);
}
.offer[hidden] { display: block; visibility: hidden; }
html.has-offer .offer { transform: translateY(0); visibility: visible; }
html.has-offer.offer-away .offer { transform: translateY(-100%); }

/* navbar follows the bar */
.nav { top: var(--offer-h); transition: top .5s cubic-bezier(.22, 1, .36, 1), background .4s, backdrop-filter .4s, padding .4s; }
html.has-offer .hero__inner { padding-top: calc(96px + 44px); }

.offer__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2vw, 16px);
  padding: 0 52px 0 clamp(10px, 2vw, 24px);
  overflow: hidden;
  background:
    radial-gradient(160px 60px at 18% 50%, rgba(247, 196, 124, .2), transparent 70%),
    radial-gradient(320px 60px at 70% 50%, rgba(150, 60, 255, .35), transparent 70%),
    linear-gradient(90deg, #1a0736, #2c0d57 50%, #1a0736);
  border-bottom: 1px solid rgba(247, 196, 124, .35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .4);
}
.offer__inner::after {                       /* gold shimmer gliding along the bottom edge */
  content: "";
  position: absolute;
  left: -30%; bottom: -1px;
  width: 30%; height: 1px;
  background: linear-gradient(90deg, transparent, #ffe0a0, transparent);
  animation: oEdge 4.5s linear infinite;
}

.offer__om {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  color: #ffd27a;
  background: radial-gradient(circle at 50% 45%, rgba(255, 200, 110, .3), rgba(120, 40, 200, .5) 70%);
  border: 1px solid rgba(247, 196, 124, .7);
  text-shadow: 0 0 8px rgba(255, 200, 110, .9);
  animation: oOm 4s ease-in-out infinite;
}
.offer__diya { flex: 0 0 auto; width: 24px; height: 24px; overflow: visible; }
.offer__diya-flame { transform-box: fill-box; transform-origin: 50% 100%; animation: oFlame .9s ease-in-out infinite alternate; }
.offer__diya-glow { animation: oGlow 1.8s ease-in-out infinite; }

.offer__title { margin: 0; flex: 0 0 auto; font-size: 15px; font-weight: 600; color: #fff; white-space: nowrap; }
.offer__title span { color: #ffc44d; text-shadow: 0 0 10px rgba(255, 196, 77, .5); }
.offer__sep { flex: 0 0 auto; width: 1px; height: 20px; background: linear-gradient(to bottom, transparent, rgba(247, 196, 124, .7), transparent); }
.offer__msg { display: flex; align-items: center; gap: 6px; margin: 0; flex: 0 1 auto; min-width: 0; font-size: 13px; color: #e6dcf3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offer__msg svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: #ffc44d; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* compact inline timer: 13d : 01h : 51m : 25s */
.offer__timer { flex: 0 0 auto; display: flex; align-items: center; gap: 3px; }
.offer__cell {
  display: flex;
  align-items: baseline;
  gap: 1px;
  height: 28px;
  padding: 0 7px;
  border-radius: 7px;
  align-content: center;
  line-height: 28px;
  background: rgba(10, 3, 24, .7);
  border: 1px solid rgba(200, 150, 255, .28);
}
.offer__num { display: inline-block; font-size: 15px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.offer__num.is-tick { animation: oTick .45s cubic-bezier(.34, 1.56, .64, 1); }
.offer__unit { font-size: 10.5px; font-weight: 600; color: #c9bbdc; }
.offer__colon { font-size: 14px; font-weight: 700; color: #ffc44d; animation: oBlink 1s steps(1) infinite; }
.offer__timer.is-urgent .offer__cell { border-color: rgba(255, 110, 150, .6); }

.offer__btn {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: #2a1203;
  text-decoration: none;
  background: linear-gradient(180deg, #ffe08a, #f7b733 55%, #e8961c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 0 14px rgba(255, 190, 80, .45);
  transition: transform .3s var(--ease, ease), box-shadow .3s, filter .3s;
  animation: oBtn 2s ease-in-out infinite;
}
.offer__btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -50%;
  width: 35%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .6), transparent);
  transform: skewX(-20deg);
  animation: oShine 3.2s ease-in-out 1s infinite;
}
.offer__btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease, ease); }
.offer__btn:hover, .offer__btn:focus-visible { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 0 22px rgba(255, 190, 80, .8); outline: none; animation: none; }
.offer__btn:hover svg { transform: translateX(3px); }

.offer__close {
  position: absolute;
  right: 10px; top: 50%;
  width: 30px; height: 30px;
  margin-top: -15px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #e6dcf3;
  background: transparent;
  transition: background-color .3s, transform .4s var(--ease, ease), color .3s;
}
.offer__close:hover, .offer__close:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; transform: rotate(90deg); outline: none; }
.offer__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@keyframes oEdge  { to { left: 100%; } }
@keyframes oOm    { 0%, 100% { box-shadow: 0 0 8px rgba(247, 196, 124, .3); } 50% { box-shadow: 0 0 16px rgba(247, 196, 124, .7); } }
@keyframes oFlame { from { transform: scale(1, 1) rotate(-3deg); } to { transform: scale(.92, 1.12) rotate(3deg); } }
@keyframes oGlow  { 0%, 100% { opacity: .4; } 50% { opacity: .75; } }
@keyframes oTick  { 0% { transform: translateY(-3px) scale(1.1); color: #ffd98a; } 100% { transform: none; } }
@keyframes oBlink { 50% { opacity: .25; } }
@keyframes oBtn   { 0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 0 10px rgba(255, 190, 80, .4); } 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 0 22px rgba(255, 190, 80, .85); } }
@keyframes oShine { 0%, 55% { left: -50%; } 100% { left: 140%; } }

/* ---------- responsive ---------- */
@media (max-width: 1000px) { .offer__msg, .offer__sep { display: none; } }
@media (max-width: 700px) {
  .offer__om, .offer__diya { display: none; }
  .offer__title { font-size: 13.5px; }
}
@media (max-width: 520px) {
  .offer__inner { justify-content: flex-start; gap: 6px; padding-right: 44px; }
  .offer__title { display: none; }
  .offer__colon { display: none; }
  .offer__cell { padding: 0 5px; }
  .offer__num { font-size: 13.5px; }
  .offer__btn { padding: 0 12px; font-size: 12.5px; margin-left: auto; }
  .offer__btn svg { display: none; }
}
@media (max-width: 900px) {
  html.has-offer .hero__inner { padding-top: calc(100px + 44px); }
}
@media (prefers-reduced-motion: reduce) {
  .offer, .nav { transition: none; }
  .offer *, .offer *::before, .offer *::after { animation: none !important; }
}
