/* ═══════════════════════════════════════════════════════════
   وناسة للترفيه — Mobile link page
   Palette: Teal #1A7B90 · Coral #E95E5E · Gold #D4A66C · Beige #FDF7E7
   ═══════════════════════════════════════════════════════════ */

:root {
  --teal: #1a7b90;
  --teal-dark: #145f70;
  --coral: #e95e5e;
  --coral-dark: #cf4a4a;
  --gold: #d4a66c;
  --gold-dark: #b88d52;
  --beige: #fdf7e7;
  --beige-deep: #f5ecd4;
  --text: #1a3d47;
  --white: #ffffff;
  --shadow: rgba(26, 61, 71, 0.14);
  --shadow-hover: rgba(26, 61, 71, 0.24);

  --font-display: "Almarai", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Almarai", "Segoe UI", Tahoma, sans-serif;

  --screen-w: min(100vw, 430px);
  --bg-ratio: calc(2436 / 1125);
  --bg-side: calc(var(--screen-w) * 78 / 1125);
  --content-inset: calc(var(--screen-w) * 52 / 1125);
  --bg-top: calc(var(--screen-w) * 230 / 1125);
  --bg-bottom: calc(var(--screen-w) * 220 / 1125);
  --content-max: 100%;
  --radius: 14px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--beige-deep);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ─── Page shell with full background image ─── */
.screen {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: calc(var(--screen-w) * var(--bg-ratio));
  background: var(--beige) url("bg.png") no-repeat center top / 100% auto;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(26, 123, 144, 0.08), 0 24px 64px var(--shadow);
}

.page {
  position: relative;
  z-index: 1;
  min-height: calc(var(--screen-w) * var(--bg-ratio));
  padding:
    var(--bg-top)
    calc(var(--bg-side) + var(--content-inset))
    var(--bg-bottom)
    calc(var(--bg-side) + var(--content-inset));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

/* ─── Intro text ─── */
.intro {
  text-align: center;
  width: 100%;
  animation: fadeDown 0.55s ease both;
}

.intro__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 9.5vw, 3rem);
  font-weight: 800;
  color: var(--coral);
  line-height: 1.25;
  -webkit-text-stroke: 1.5px var(--white);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.55), 0 3px 8px rgba(233, 94, 94, 0.22);
}

.intro__tagline {
  margin-top: 0.4rem;
  font-size: clamp(1.1rem, 5.2vw, 1.3rem);
  font-weight: 700;
  color: var(--teal);
  line-height: 1.5;
}

/* ─── Link buttons ─── */
.links {
  width: 100%;
  max-width: var(--content-max);
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: fadeUp 0.55s 0.12s ease both;
}

.link-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.5rem 0.68rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 4px 14px var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    filter var(--transition);
}

.link-btn:hover,
.link-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px var(--shadow-hover);
  filter: brightness(1.04);
}

.link-btn:active {
  transform: translateY(0);
}

.link-btn--teal {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
}

.link-btn--coral {
  background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
}

.link-btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: var(--white);
}

.link-btn--gold .link-btn__handle {
  color: inherit;
}

.link-btn__icon {
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 1rem;
}

.link-btn--gold .link-btn__icon {
  background: rgba(255, 255, 255, 0.35);
}

.link-btn__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  min-width: 0;
}

.link-btn__label {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
}

.link-btn__handle {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.92;
  letter-spacing: 0.03em;
  direction: ltr;
  unicode-bidi: embed;
}

.link-btn__arrow {
  flex-shrink: 0;
  opacity: 0.75;
  font-size: 0.78rem;
}

/* ─── Games showcase ─── */
.games-showcase {
  width: 100%;
  max-width: var(--content-max);
  margin-top: 1.15rem;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.35rem;
  animation: fadeUp 0.55s 0.2s ease both;
}

.games-showcase__cluster {
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
  line-height: 0;
}

.games-showcase__cluster img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Animations ─── */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── Larger phones / tablets ─── */
@media (min-width: 480px) {
  .screen {
    margin: 1rem 0;
    min-height: calc(var(--screen-w) * var(--bg-ratio) - 2rem);
    border-radius: 24px;
  }

  .page {
    gap: 1.1rem;
  }

  .links {
    gap: 0.75rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
