/* ObraUp claim flow v1.0.0 — sticky claim bar, breathing CTA, claim dialog, Lenis helpers.
   Loaded after each site's own styles.css, so equal-specificity rules here win. */

:root {
  --claim-copper: #e0a15f;
  --claim-copper-hover: #eab475;
  --claim-copper-ink: #1c1208;
  --claim-bar-bg: #191512;
  --claim-bar-ink: #f3ece1;
  --claim-bar-height: 56px;
}

/* ---------- Sticky bar ---------- */

.sample-banner {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--claim-bar-bg);
  color: var(--claim-bar-ink);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sample-banner strong { color: inherit; }

/* The sample-page sticky sidebar must sit below the pinned bar. */
.process-intro { top: calc(var(--claim-bar-height) + 28px); }

/* ---------- Claim button: warm pill with a slow, subtle breathing glow (no expanding ring) ---------- */

.sample-banner [data-buy] {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--claim-copper);
  color: var(--claim-copper-ink);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 0 12px 1px rgba(224, 161, 95, .28);
  position: relative;
  overflow: hidden;
  animation: claim-breathe 3.2s ease-in-out infinite, claim-nudge 4.5s ease-in-out 1.2s infinite;
  transition: background-color .25s, transform .25s;
}

.sample-banner [data-buy]:hover { background: var(--claim-copper-hover); transform: translateY(-1px); }
.sample-banner [data-buy]:active { transform: translateY(0); }
.sample-banner [data-buy]:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

@keyframes claim-breathe {
  0%, 100% { box-shadow: 0 0 12px 1px rgba(224, 161, 95, .28); }
  50% { box-shadow: 0 0 18px 3px rgba(224, 161, 95, .45); }
}

@media (max-width: 640px) {
  .sample-banner { padding: 8px 14px; gap: 12px; }
  .sample-banner [data-buy] { min-height: 44px; padding: 8px 15px; font-size: 13px; }
}

/* ---------- Claim dialog: transparent frame, congratulations above a form card ---------- */

#buy-dialog.claim-dialog {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  max-width: 590px;
  color: var(--ink);
}

#buy-dialog.claim-dialog::backdrop { animation: claim-backdrop .35s ease-out both; }

@keyframes claim-backdrop { from { opacity: 0; } to { opacity: 1; } }

#buy-dialog .claim-congrats { text-align: center; margin: 0 0 18px; padding-top: 4px; }

#buy-dialog .claim-congrats-title {
  margin: 0;
  color: #f6efe4;
  font: 600 21px/1.25 Georgia, 'Times New Roman', serif;
  letter-spacing: -.01em;
}

#buy-dialog .claim-congrats-sub {
  margin: 5px 0 0;
  color: rgba(246, 239, 228, .8);
  font-size: 14px;
  line-height: 1.5;
}

#buy-dialog .claim-card {
  position: relative;
  padding: 42px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* app.js styled the intro as a direct child of the dialog; it now lives inside the card. */
#buy-dialog .claim-card > p { margin-bottom: 28px; }

@media (max-width: 640px) {
  #buy-dialog .claim-card { padding: 32px 22px; }
  #buy-dialog .claim-congrats-title { font-size: 20px; }
}

/* While the particles fly, the real form is laid out but invisible and untouchable. */
#buy-dialog.claim-arming .claim-card,
#buy-dialog.claim-arming .claim-congrats { opacity: 0; }
#buy-dialog.claim-arming .claim-content { pointer-events: none; }

/* The canvas is a child of the dialog so it paints in the browser's top layer, above the backdrop. */
.claim-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* ---------- Lenis smooth scroll helpers ---------- */

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
/* Stopped while the claim dialog is open; the gutter keeps the page from shifting when the scrollbar hides. */
.lenis.lenis-stopped { overflow: clip; scrollbar-gutter: stable; }

/* ---------- Reduced motion: no glow animation, no particles ---------- */

@media (prefers-reduced-motion: reduce) {
  .sample-banner [data-buy] { animation: none; box-shadow: 0 0 14px 2px rgba(224, 161, 95, .34); transition: none; }
  #buy-dialog.claim-dialog::backdrop { animation: none; }
  .claim-canvas { display: none; }
}

/* Attention cue: every 4.5 s a quick hop-and-wiggle while a light sweeps across, then rest. */
@keyframes claim-nudge {
  0%, 80%, 100% { transform: none; }
  83% { transform: translateY(-3px) scale(1.07) rotate(-2.5deg); }
  86% { transform: translateY(0) scale(1.05) rotate(2.5deg); }
  89% { transform: translateY(-2px) scale(1.06) rotate(-1.5deg); }
  93% { transform: none; }
}
.sample-banner [data-buy]::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .6), transparent);
  transform: skewX(-20deg); pointer-events: none;
  animation: claim-shine 4.5s ease-in-out 1.2s infinite;
}
@keyframes claim-shine { 0%, 68% { left: -60%; } 88%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  .sample-banner [data-buy]::after { animation: none; display: none; }
}

/* "$0" spins like a coin: quick flip, short hold so it stays readable. */
.sample-banner [data-buy] .claim-zero {
  display: inline-block; font-weight: 800; perspective: 400px;
  animation: claim-coin 2.2s cubic-bezier(.45, 0, .2, 1) infinite;
}
@keyframes claim-coin { 0% { transform: rotateY(0); } 45%, 100% { transform: rotateY(360deg); } }
@media (prefers-reduced-motion: reduce) { .sample-banner [data-buy] .claim-zero { animation: none; } }
