/* Ramira Games: shared tokens, fonts and the bubble button. */

@font-face {
  font-family: 'Lalezar';
  src: url(/assets/fonts/lalezar-arabic-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'Lalezar';
  src: url(/assets/fonts/lalezar-latin-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { font-family: 'Baloo Bhaijaan 2'; src: url(/assets/fonts/baloo-bhaijaan-2-arabic-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Baloo Bhaijaan 2'; src: url(/assets/fonts/baloo-bhaijaan-2-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo Bhaijaan 2'; src: url(/assets/fonts/baloo-bhaijaan-2-arabic-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Baloo Bhaijaan 2'; src: url(/assets/fonts/baloo-bhaijaan-2-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Baloo Bhaijaan 2'; src: url(/assets/fonts/baloo-bhaijaan-2-arabic-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: 'Baloo Bhaijaan 2'; src: url(/assets/fonts/baloo-bhaijaan-2-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

:root {
  /* Ramira plum carries the brand; the film colours are a soap bubble's thin-film shimmer. */
  --plum: #3F2B2E;
  --plum-deep: #24171A;
  --plum-glass: rgba(36, 23, 26, 0.58);
  --foam: #FFF6F1;
  --foam-dim: rgba(255, 246, 241, 0.74);
  --foam-faint: rgba(255, 246, 241, 0.14);
  --film-cyan: #5EE6E0;
  --film-pink: #FF6FAE;
  --film-gold: #FFC94D;
  --film-lilac: #A99BFF;
  --film: conic-gradient(from 0deg, var(--film-cyan), var(--film-lilac), var(--film-pink), var(--film-gold), var(--film-cyan));
  --film-line: linear-gradient(100deg, var(--film-cyan), var(--foam) 38%, var(--film-pink) 64%, var(--film-gold));

  --font-display: 'Lalezar', 'Baloo Bhaijaan 2', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'Baloo Bhaijaan 2', 'Segoe UI', Tahoma, system-ui, sans-serif;
}

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

body {
  margin: 0;
  background: var(--plum-deep);
  color: var(--foam);
  font-family: var(--font-body);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; }

.film-text {
  background: var(--film-line);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: film-slide 9s ease-in-out infinite alternate;
}

/* The bubble button: every primary action is a bubble. A hand resting on it
   fills the outer ring (--p, 0..1); when the ring closes, the bubble pops. */
.bubble-btn {
  --size: clamp(150px, 22vmin, 270px);
  --p: 0;
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  color: var(--foam);
  font: 400 calc(var(--size) * 0.25) / 1 var(--font-display);
  text-shadow: 0 2px 14px rgba(36, 23, 26, 0.65);
  background:
    radial-gradient(circle at 31% 27%, rgba(255, 255, 255, 0.85) 0 3.5%, rgba(255, 255, 255, 0) 9%),
    radial-gradient(ellipse 20% 11% at 34% 30%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0 50%, rgba(255, 255, 255, 0.15) 72%, rgba(255, 255, 255, 0.36) 100%);
  box-shadow:
    0 0 calc(var(--size) * 0.22) rgba(94, 230, 224, 0.22),
    inset 0 0 calc(var(--size) * 0.14) rgba(255, 111, 174, 0.16);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3), opacity 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.bubble-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--film);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
  opacity: 0.9;
  animation: film-turn 7s linear infinite;
}
.bubble-btn::after {
  content: '';
  position: absolute;
  inset: calc(var(--size) * -0.1);
  border-radius: 50%;
  background: conic-gradient(var(--foam) calc(var(--p) * 1turn), var(--foam-faint) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
  opacity: 0;
  transition: opacity 0.2s;
}
.bubble-btn.is-hovered { transform: scale(1.07); }
.bubble-btn.is-hovered::after { opacity: 1; }
.bubble-btn:hover { transform: scale(1.04); }
.bubble-btn:focus-visible { outline: 4px solid var(--film-gold); outline-offset: 12px; }
.bubble-btn:disabled { opacity: 0.38; cursor: default; transform: none; }
.bubble-btn.is-small { --size: clamp(110px, 15vmin, 180px); font-size: calc(var(--size) * 0.22); }

/* Secondary actions: quiet pills. */
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.5em 1.1em;
  border: 1px solid var(--foam-faint);
  border-radius: 999px;
  background: var(--plum-glass);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  color: var(--foam);
  font: 700 clamp(14px, 1.9vh, 20px) / 1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.chip-btn:hover { background: rgba(63, 43, 46, 0.85); border-color: rgba(255, 246, 241, 0.32); }
.chip-btn:focus-visible { outline: 3px solid var(--film-gold); outline-offset: 3px; }
.chip-btn kbd {
  font: 700 0.8em/1 var(--font-body);
  padding: 0.2em 0.45em;
  border-radius: 6px;
  background: var(--foam-faint);
}

@keyframes film-turn { to { transform: rotate(1turn); } }
@keyframes film-slide { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

@media (prefers-reduced-motion: reduce) {
  .bubble-btn::before, .film-text { animation: none; }
  .bubble-btn, .bubble-btn:hover, .bubble-btn.is-hovered { transition: none; transform: none; }
}
