/* ==========================================================================
   Offer page — modern glass card, soft aurora background, gentle motion
   ========================================================================== */

:root {
  color-scheme: light dark;

  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --bg: #eef3fb;
  --ink: #141c33;
  --muted: #5f6b86;
  --soft: #8d98b0;
  --line: rgba(47, 80, 160, 0.16);

  --card: rgba(255, 255, 255, 0.72);
  --card-border: rgba(255, 255, 255, 0.9);
  --card-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 40px 70px -28px rgba(31, 53, 110, 0.34),
    0 14px 28px -14px rgba(31, 53, 110, 0.18);
  --edge-a: rgba(255, 255, 255, 0.95);
  --edge-b: rgba(47, 108, 246, 0.28);
  --edge-c: rgba(124, 92, 255, 0.22);

  --brand-1: #2f6cf6;
  --brand-2: #6a5cff;
  --pulse: rgba(47, 108, 246, 0.38);
  --btn-shadow: rgba(47, 108, 246, 0.6);

  --title: linear-gradient(135deg, #12206b 0%, #2f6cf6 58%, #7a5cff 100%);

  --orb-1: rgba(47, 108, 246, 0.42);
  --orb-2: rgba(124, 92, 255, 0.32);
  --orb-3: rgba(34, 199, 232, 0.34);
  --grid-line: rgba(47, 108, 246, 0.07);

  --gift-ink: #1f3a8a;
  --gift-glow: rgba(47, 108, 246, 0.2);
  --ring: rgba(47, 108, 246, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070b17;
    --ink: #eef2ff;
    --muted: #a3aed0;
    --soft: #75819f;
    --line: rgba(150, 170, 255, 0.16);

    --card: rgba(16, 23, 48, 0.62);
    --card-border: rgba(150, 170, 255, 0.14);
    --card-shadow:
      0 1px 0 rgba(255, 255, 255, 0.06) inset,
      0 40px 80px -30px rgba(0, 0, 0, 0.7),
      0 14px 28px -14px rgba(0, 0, 0, 0.5);
    --edge-a: rgba(180, 196, 255, 0.28);
    --edge-b: rgba(47, 108, 246, 0.22);
    --edge-c: rgba(124, 92, 255, 0.16);

    --pulse: rgba(106, 140, 255, 0.4);
    --btn-shadow: rgba(47, 108, 246, 0.55);

    --title: linear-gradient(135deg, #ffffff 0%, #b4c8ff 58%, #cbbcff 100%);

    --orb-1: rgba(47, 108, 246, 0.34);
    --orb-2: rgba(124, 92, 255, 0.28);
    --orb-3: rgba(34, 199, 232, 0.2);
    --grid-line: rgba(150, 170, 255, 0.06);

    --gift-ink: #000;
    --gift-glow: rgba(80, 130, 255, 0.28);
    --ring: rgba(120, 150, 255, 0.34);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   Page + background
   -------------------------------------------------------------------------- */

.offer-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  overflow-x: hidden;
  isolation: isolate;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* faint grid that fades out toward the edges */
.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 50%, #000 15%, transparent 75%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.orb-1 {
  top: -22vmax;
  left: -18vmax;
  width: 56vmax;
  height: 56vmax;
  background: radial-gradient(circle at center, var(--orb-1), transparent 66%);
  animation: drift-a 24s ease-in-out infinite alternate;
}

.orb-2 {
  top: 8vh;
  right: -22vmax;
  width: 52vmax;
  height: 52vmax;
  background: radial-gradient(circle at center, var(--orb-2), transparent 66%);
  animation: drift-b 28s ease-in-out infinite alternate;
}

.orb-3 {
  bottom: -26vmax;
  left: 14vw;
  width: 50vmax;
  height: 50vmax;
  background: radial-gradient(circle at center, var(--orb-3), transparent 66%);
  animation: drift-c 32s ease-in-out infinite alternate;
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.offer {
  width: min(440px, 100%);
}

.offer-card {
  position: relative;
  padding: 40px 32px 28px;
  border: 1px solid var(--card-border);
  border-radius: 32px;
  background: var(--card);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: var(--card-shadow);
  text-align: center;
  animation: card-in 0.9s var(--ease) both;
}

/* gradient hairline around the card */
.offer-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(160deg, var(--edge-a), var(--edge-b) 45%, var(--edge-c));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box exclude,
    linear-gradient(#000 0 0);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Gift illustration
   -------------------------------------------------------------------------- */

.gift {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 0 auto 26px;
  color: var(--gift-ink);
  animation: pop 0.9s var(--ease) 0.15s both;
}

.gift::before {
  content: "";
  position: absolute;
  inset: -26px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--gift-glow), transparent 66%);
}

.ring {
  position: absolute;
  inset: 4px;
  border: 1px solid var(--ring);
  border-radius: 50%;
  opacity: 0;
  animation: ring 4s ease-out infinite;
}

.ring-2 {
  animation-delay: 2s;
}

.gift-svg {
  position: relative;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 14px 18px rgba(47, 80, 224, 0.28));
  animation: float 5.5s ease-in-out infinite;
}

.gift-shadow {
  transform-box: fill-box;
  transform-origin: center;
  animation: shadow 5.5s ease-in-out infinite;
}

.gift-lid {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: lid 7s ease-in-out infinite 1.4s;
}

.spark {
  position: absolute;
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #fff2bd, #ffbe3d);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: twinkle 3.6s ease-in-out infinite;
}

.s1 {
  top: -6px;
  right: -8px;
  animation-delay: 0.6s;
}

.s2 {
  top: 22px;
  left: -16px;
  width: 9px;
  height: 9px;
  background: linear-gradient(135deg, #d6e4ff, #7fa8ff);
  animation-delay: 1.5s;
}

.s3 {
  bottom: 14px;
  right: -20px;
  width: 8px;
  height: 8px;
  animation-delay: 2.3s;
}

.s4 {
  top: -14px;
  left: 14px;
  width: 7px;
  height: 7px;
  background: linear-gradient(135deg, #e3dbff, #9d8bff);
  animation-delay: 3s;
}

/* --------------------------------------------------------------------------
   Text
   -------------------------------------------------------------------------- */

.offer-page h1 {
  margin: 0;
  font-size: clamp(24px, 6.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.28;
  text-wrap: balance;
  color: #2f6cf6; /* fallback when background-clip:text is unsupported */
  background: var(--title);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rise 0.8s var(--ease) 0.35s both;
}

.offer-card .lead {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  text-wrap: balance;
  animation: rise 0.8s var(--ease) 0.45s both;
}

.offer-card .note {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  color: var(--soft);
  font-size: 13.5px;
  line-height: 1.6;
  text-wrap: balance;
  animation: rise 0.8s var(--ease) 0.65s both;
}

/* --------------------------------------------------------------------------
   Call to action
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  margin-top: 28px;
  border-radius: 16px;
  animation: rise 0.8s var(--ease) 0.55s both;
}

/* soft breathing ring behind the button */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 var(--pulse);
  animation: cta-pulse 3.4s ease-out infinite 1.6s;
  pointer-events: none;
}

.offer-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  background-size: 150% 150%;
  background-position: 0% 50%;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 16px 30px -12px var(--btn-shadow);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    background-position 0.6s var(--ease),
    filter 0.3s ease,
    opacity 0.3s ease;
}

/* light sheen that sweeps across now and then */
.offer-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, 0.38) 50%, transparent 68%);
  transform: translateX(-130%);
  animation: sheen 5s ease-in-out infinite 2s;
  pointer-events: none;
}

.offer-btn-text,
.offer-btn-arrow {
  position: relative;
  z-index: 1;
}

.offer-btn-arrow {
  flex: none;
  transition: transform 0.35s var(--ease);
}

.offer-btn:hover {
  transform: translateY(-2px);
  background-position: 100% 50%;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 22px 36px -12px var(--btn-shadow);
}

.offer-btn:hover .offer-btn-arrow {
  transform: translateX(4px);
}

.offer-btn:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 0.12s;
}

.offer-btn:focus-visible {
  outline: 3px solid var(--brand-1);
  outline-offset: 4px;
}

/* while the link is still being resolved (or none is configured) */
.offer-btn:not([href]) {
  pointer-events: none;
  opacity: 0.7;
  filter: saturate(0.6);
}

.offer-btn:not([href])::after {
  animation: none;
}

.cta:has(.offer-btn:not([href]))::before {
  animation: none;
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6) translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-1.5deg);
  }
  50% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

@keyframes shadow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.2;
  }
  50% {
    transform: scale(0.82);
    opacity: 0.12;
  }
}

@keyframes lid {
  0%,
  60%,
  100% {
    transform: translateY(0) rotate(0);
  }
  72% {
    transform: translateY(-5px) rotate(-3deg);
  }
  84% {
    transform: translateY(0) rotate(0.6deg);
  }
  92% {
    transform: translateY(0) rotate(0);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  45% {
    opacity: 1;
    transform: scale(1) rotate(45deg);
  }
  70% {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
  }
}

@keyframes ring {
  0% {
    opacity: 0.8;
    transform: scale(0.85);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes cta-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--pulse);
  }
  70%,
  100% {
    box-shadow: 0 0 0 16px transparent;
  }
}

@keyframes sheen {
  0%,
  55% {
    transform: translateX(-130%);
  }
  80%,
  100% {
    transform: translateX(130%);
  }
}

@keyframes drift-a {
  to {
    transform: translate3d(8vmax, 6vmax, 0) scale(1.08);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(-9vmax, 5vmax, 0) scale(1.1);
  }
}

@keyframes drift-c {
  to {
    transform: translate3d(7vmax, -6vmax, 0) scale(1.06);
  }
}

/* --------------------------------------------------------------------------
   Responsive + accessibility
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {
  .offer-page {
    padding-inline: 16px;
  }

  .offer-card {
    padding: 34px 22px 24px;
    border-radius: 28px;
  }

  .offer-card .lead {
    font-size: 15px;
  }

  .offer-btn {
    padding: 16px 18px;
    font-size: 14px;
  }
}

@media (max-height: 600px) {
  .gift {
    margin-bottom: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .spark {
    opacity: 0.9;
  }
}
