/* =====================================================================
   b4.bet bilingual landing page
   All overlay positions are PERCENTAGES of the artwork (bg/bg.png,
   809 × 1944 px), so they scale with the artwork at every width:
     x / width → % of artwork width     y / top → % of artwork height
   ===================================================================== */
:root {
  --page-bg: #02289c;        /* deep blue outside the 480px page (desktop) */
  --page-max: 480px;

  /* Header / logo — top centre, in the empty band above "Register Now".
     46% wide ≈ 372 × 105 px on the artwork (headline starts at ~125 px). */
  --logo-x: 50%;
  --logo-top: 0%;
  --logo-width: 46%;

  /* Registration buttons — the VISIBLE pill is aligned with the gold
     content panels (outer edges x 33–779 px, centre 406 px).
     Button image = assets/register-button.png (1200 × 232, pill fills
     99.67% of its width), so 746 px ÷ 809 ÷ 0.9967 = 92.52%.            */
  --cta-x: 50.185%;          /* 406 / 809 */
  --cta-width: 92.52%;
  --cta-top-y: 47.608%;      /* centre 925.5 px: mascot/coin end ≈ 840, panel top = 1011 */
  --cta-bottom-y: 94.68%;    /* centre 1840.5 px: birthday panel bottom = 1736, artwork end = 1944 */

  /* Breathing animation */
  --pulse-scale: 1.035;
  --pulse-duration: 2.2s;
}

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

html, body {
  margin: 0;
  background: var(--page-bg);
}

body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile: full width. Desktop: centred, max ~480px. */
.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
}

/* Wrapper is exactly the size of the artwork; overlays are positioned in it. */
.stage {
  position: relative;
  width: 100%;
}

/* Full artwork at its natural aspect ratio — never cropped or stretched. */
.artwork {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Header / logo (static) ---------- */
.logo {
  position: absolute;
  left: var(--logo-x);
  top: var(--logo-top);
  width: var(--logo-width);
  height: auto;
  object-fit: contain;
  transform: translateX(-50%);
}

/* ---------- Registration buttons ----------
   Three layers so transforms never conflict:
   .cta-slot  → positioning (translate to centre)
   .cta       → the link + focus ring
   .cta-pulse → breathing animation (scale from centre)                */
.cta-slot {
  position: absolute;
  left: var(--cta-x);
  width: var(--cta-width);
  transform: translate(-50%, -50%);
  z-index: 2;
}
.cta-slot--top    { top: var(--cta-top-y); }
.cta-slot--bottom { top: var(--cta-bottom-y); }

.cta {
  display: block;
  border-radius: 999px;
  outline: none;
  touch-action: manipulation;
}

.cta:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px #ffd600;
}

.cta-pulse {
  display: block;
  transform-origin: 50% 50%;
  animation: cta-breathe var(--pulse-duration) ease-in-out infinite;
  will-change: transform;
}

.cta-pulse img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes cta-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(var(--pulse-scale)); }
}

@media (prefers-reduced-motion: reduce) {
  .cta-pulse { animation: none; }
}

/* Screen-reader-only text (bilingual button label) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
