/* Local overrides on top of the compiled Tailwind stylesheet.
 *
 * styles.css is the production build output and is kept byte-identical, so it
 * contains only the utility classes that existed at build time. Anything new
 * has to live here — adding an unknown Tailwind class to the markup does
 * nothing, because no rule for it was ever compiled.
 */

/* Hero: give the campaign creative the same share of the row as the reference
 * layout on oleksiykononov.com. Inside max-w-6xl that is 1120px of content
 * minus the 40px gap, so 1.5fr/1fr renders the image at 648px. */
@media (min-width: 768px) {
  [data-hero-grid] {
    grid-template-columns: 1.5fr 1fr;
  }
}

/* ---------------------------------------------------------------------------
 * Sticky CTA bar — one wide button, not a bar-with-a-button.
 *
 * The old bar spent half its width restating the product name and price, so
 * the tap target was a ~110px pill in the bottom-right corner. Everything the
 * copy carried is folded into the button label instead, which frees the full
 * width for the target and leaves a single decision on screen.
 * ------------------------------------------------------------------------ */

/* main carries pb-24 (96px) — reserved upstream for a ~70px single-row bar.
 * The rebuilt bar is 150–190px depending on width, so the footer scrolled
 * underneath it. app.js measures the bar and overwrites this inline; the value
 * here is the no-JS floor, set to the tallest case (320px, strip wrapped). */
main.pb-24 {
  padding-bottom: calc(12rem + env(safe-area-inset-bottom));
}

/* The bar floats over live page content, so it carries its own backdrop —
 * a hard white floor plus a short fade above it, so text scrolling underneath
 * dissolves instead of colliding with the reassurance line. */
[data-sticky-cta][data-sticky-cta] {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #fff 18%);
}

[data-sticky-inner] {
  margin: 0 auto;
  max-width: 40rem;
  padding: 0.75rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
}

/* Urgency strip: dark, so it reads against the orange button below it and
 * against the white page behind it. Sits directly above the target — the
 * deadline is only decision-relevant next to the thing it applies to. */
[data-sticky-urgency] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 0.6rem;
  border-radius: 0.85rem 0.85rem 0 0;
  background: #000;
  padding: 0.7rem 0.75rem;
  font-size: clamp(0.78rem, 3.4vw, 0.9375rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: #fff;
}

[data-sticky-urgency] [data-countdown] {
  display: inline-flex;
  align-items: center;
  /* Same reasoning as the button label — keeps the strip to one line on a
   * 360px phone while still reading big on anything wider. */
  font-size: clamp(1.3rem, 6vw, 1.6rem);
  font-weight: 900;
  line-height: 1;
}

/* Digit blocks, scoped to the bar — the offer card's own MM/SS already carry
 * bg-ink/90 from the compiled sheet, and custom.css is unlayered, so an
 * unscoped [data-countdown-mm] rule would silently restyle that one too. */
[data-sticky-urgency] [data-countdown-mm],
[data-sticky-urgency] [data-countdown-ss] {
  display: inline-block;
  border-radius: 0.4rem;
  /* Slightly lifted off the pure-black strip so the blocks read as blocks,
   * with a brand-tinted edge to define them. */
  background: #141414;
  border: 1px solid rgba(252, 122, 0, 0.45);
  padding: 0.18em 0.34em;
  color: #ff9d3d;
  font-variant-numeric: tabular-nums;
}

[data-countdown-sep] {
  margin: 0 0.18em;
  color: #ff9d3d;
  opacity: 0.6;
}

/* The target itself: full width, 60px tall — comfortably above the 44px
 * minimum tap target, and reachable one-handed at the bottom of the screen.
 * position/overflow/isolation are here rather than in a second block so the
 * sheen's containing block is declared alongside the sheen it contains. */
[data-sticky-button] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 0 0 0.85rem 0.85rem;
  background: #fc7a00;
  padding: 1.1rem 0.75rem;
  text-align: center;
  /* Fluid rather than fixed: the all-caps label is long, and at a fixed size
   * the arrow orphaned onto a second line around 390px. This keeps it to one
   * line from 320px up without shrinking the target on real phones. */
  font-size: clamp(0.95rem, 4.7vw, 1.35rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: #fff;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.12s ease;
  /* The glow breathes rather than sitting static — this is the bar's only
   * attention cue now that the price has come out of the label. */
  animation: stickyGlow 2.4s ease-in-out infinite;
}

/* Keeps the arrow married to the label — a lone "→" on line two reads as a
 * layout bug. Safe with the fluid size above, which guarantees it fits. */
[data-sticky-label] {
  display: inline-block;
  white-space: nowrap;
}

[data-sticky-button]:hover {
  background: #fa7a01;
}

/* Press feedback only — no lift on hover. A control anchored to the bottom
 * edge that moves under the finger reads as unstable. */
[data-sticky-button]:active {
  transform: translateY(1px);
}

[data-sticky-was] {
  margin-left: 0.15em;
  font-weight: 600;
  text-decoration: line-through;
  opacity: 0.65;
}

[data-sticky-arrow] {
  display: inline-block;
  margin-left: 0.15em;
}

[data-sticky-reassurance] {
  margin-top: 0.4rem;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #575757;
}

@media (min-width: 640px) {
  [data-sticky-button] { font-size: 1.5rem; }
  [data-sticky-urgency] { font-size: 0.9375rem; }
  [data-sticky-urgency] [data-countdown] { font-size: 1.8rem; }
}

/* Attention, once. A sheen crosses the button every 4.5s — motion at the
 * edge of the eye, without the whole control changing size. A scale/box-shadow
 * pulse on a 60px-wide element next to the thumb reads as a moving target. */
[data-sticky-button]::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Behind the label, in front of the button's own background. The parent's
   * isolation:isolate keeps this negative index from escaping the button.
   * Without it the sheen is a positioned box painting over static inline
   * text, and the sweep visibly washes out the words as it crosses. */
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  animation: stickySheen 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes stickySheen {
  0%, 40% { transform: translateX(-100%); }
  75%, 100% { transform: translateX(100%); }
}

/* Outer halo. Peaks between sheen passes so the two cues alternate instead of
 * landing together and reading as one bigger flash. */
@keyframes stickyGlow {
  0%, 100% { box-shadow: 0 8px 24px -8px rgba(252, 122, 0, 0.55); }
  50% { box-shadow: 0 12px 42px -4px rgba(252, 122, 0, 0.95); }
}

/* styles.css already silences .cta-pulse and .fade-up under this query; both
 * of these are new, so they need their own opt-out. */
@media (prefers-reduced-motion: reduce) {
  [data-sticky-button] {
    animation: none;
    box-shadow: 0 10px 30px -8px rgba(252, 122, 0, 0.65);
  }
  [data-sticky-button]::after {
    animation: none;
    opacity: 0;
  }
}
