.hero {
  position: relative;
  isolation: isolate;
  padding-block: calc(var(--header-height) + clamp(28px, 5vh, 64px)) clamp(40px, 6vw, 80px);
  overflow: clip;
  background:
    radial-gradient(60% 46% at 50% 0%, light-dark(rgb(133 200 253 / .3), rgb(255 196 112 / .17)), transparent 72%),
    linear-gradient(180deg, light-dark(#F7F9FC, #0D1119), var(--bg));
}

.hero-lamp {
  position: absolute;
  z-index: -1;
  inset-block-start: 0;
  inset-inline-start: calc(50% - 300px);
  width: 600px;
  height: min(820px, 92%);
  pointer-events: none;
  background: linear-gradient(180deg, light-dark(rgb(133 200 253 / .15), rgb(255 205 130 / .2)), transparent 88%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
  filter: blur(26px);
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: clamp(10px, 1.6vh, 18px);
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.35rem, 1.3rem + 4.2vw, 4.7rem);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -.012em;
}

:lang(ar) .hero h1 { letter-spacing: 0; line-height: 1.3; }

.hero-accent {
  background: linear-gradient(100deg, var(--chalk) 0%, var(--accent) 45%, light-dark(#0F7A58, #F2EBCB) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-block-start: 6px;
}

.table-stage {
  margin-block-start: clamp(26px, 4vh, 48px);
  max-width: 1120px;
}

.table-frame {
  position: relative;
  direction: ltr;
  aspect-ratio: 1076 / 576;
  margin-inline: auto;
  border-radius: clamp(14px, 2.4vw, 26px);
  box-shadow: 0 34px 70px -24px light-dark(rgb(22 29 41 / .55), rgb(0 0 0 / .95)), 0 0 90px -20px light-dark(rgb(47 107 228 / .25), rgb(255 190 96 / .22));
}

#pool-table {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

#pool-table:active { cursor: grabbing; }
#pool-table img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.cue-hint {
  position: absolute;
  left: var(--x, 0);
  top: var(--y, 0);
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border: 2px solid var(--ice);
  border-radius: 50%;
  pointer-events: none;
  animation: cue-pulse 1.8s ease-out infinite;
}

.cue-hint[hidden] { display: none; }
.table-stage.is-offscreen .cue-hint { animation-play-state: paused; }

@keyframes cue-pulse {
  from { transform: scale(.55); opacity: 1; }
  to { transform: scale(1.3); opacity: 0; }
}

.table-toast {
  position: absolute;
  inset-block-start: 14%;
  inset-inline-start: 50%;
  translate: -50% 10px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgb(11 14 20 / .85);
  color: var(--cream);
  font-weight: 800;
  white-space: nowrap;
  unicode-bidi: plaintext;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, translate .35s var(--ease);
}

.table-toast.is-visible { opacity: 1; translate: -50% 0; }

.table-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-block-start: 16px;
}

html:not(.js) .table-bar { display: none; }

.rack-switch {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.rack-switch button {
  min-height: 36px;
  padding-inline: clamp(10px, 2vw, 18px);
  border-radius: 999px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 800;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.rack-switch button:hover { color: var(--ink); }
.rack-switch button[aria-pressed="true"] { background: var(--chalk); color: #fff; }

.table-help { color: var(--muted); font-size: .92rem; }

.table-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 700;
}

.table-score strong { color: var(--ink); font-size: 1.15rem; }

@media (max-width: 640px) {
  .table-frame {
    aspect-ratio: 576 / 1076;
    width: min(100%, calc(74svh * 576 / 1076));
  }

  .table-bar { justify-content: center; text-align: center; }
  .table-help { order: 3; width: 100%; }
}

.why-visual {
  position: relative;
  display: grid;
  align-items: end;
  min-height: min(92svh, 760px);
  overflow: hidden;
  background: #0B0E14;
}

.why-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 30% 62%;
  transform: scale(1.14);
}

@supports (animation-timeline: view()) {
  .why-image {
    animation: hall-parallax linear both;
    animation-timeline: view();
  }
}

@keyframes hall-parallax {
  from { transform: translateY(-6%) scale(1.14); }
  to { transform: translateY(6%) scale(1.14); }
}

.why-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(11 14 20 / .5) 0, transparent 24%, transparent 46%, rgb(11 14 20 / .88) 88%);
}

.why-statement {
  position: relative;
  z-index: 1;
  width: min(100%, 1240px);
  padding-block-end: clamp(44px, 7vw, 96px);
}

.why-statement .eyebrow { color: var(--ice); }

.why-statement h2 {
  margin-block-start: 8px;
  color: #fff;
  font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4.4rem);
  font-weight: 900;
  text-shadow: 0 4px 30px rgb(0 0 0 / .55);
}

.reasons {
  display: grid;
  gap: 18px;
  padding-block: clamp(36px, 5vw, 64px) var(--section-space);
}

.reason {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: translate .35s var(--ease), box-shadow .35s ease, border-color .25s ease, opacity .8s var(--ease);
}

.reason:hover { translate: 0 -5px; box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.reason h3 { font-size: 1.32rem; }
.reason p { color: var(--muted); }

.reason-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

@media (min-width: 1000px) {
  .why {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .why-visual {
    position: sticky;
    inset-block-start: 0;
    height: 100svh;
    min-height: 0;
    border-start-end-radius: 36px;
    border-end-end-radius: 36px;
  }

  .why-statement { padding-inline: clamp(32px, 5vw, 72px); }

  .reasons {
    width: auto;
    margin: 0;
    gap: 22px;
    padding-block: 18vh;
    padding-inline: clamp(32px, 5vw, 88px);
  }

  .reason { min-height: 26svh; align-content: center; }
}

.how { background: var(--bg-raised); }

.story {
  display: grid;
  gap: 24px;
}

.story-stage {
  position: sticky;
  z-index: 2;
  inset-block-start: calc(var(--header-height) - 4px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-block: 8px;
  background: linear-gradient(180deg, var(--bg-raised) 88%, transparent);
}

.story-dots { display: grid; gap: 8px; }

.story-dots li {
  width: 7px;
  height: 22px;
  border-radius: 4px;
  background: var(--line);
  transition: background-color .3s ease;
}

.story-dots li.is-active { background: var(--accent); }

.story-steps { display: grid; }

.story-step {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 48svh;
  padding-block: 20px;
  opacity: .34;
  transition: opacity .4s ease;
}

.story-step.is-active { opacity: 1; }
.story-step h3 { font-size: clamp(1.45rem, 1.2rem + 1.3vw, 2.3rem); font-weight: 900; }
.story-step p { color: var(--muted); max-width: 46ch; }

.step-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff, var(--cream) 52%, #BDB38B);
  color: #10141C;
  font-weight: 900;
  box-shadow: 0 6px 14px -4px rgb(0 0 0 / .5);
}

@media (min-width: 900px) {
  .story {
    grid-template-columns: 1fr 1fr;
    gap: clamp(32px, 6vw, 96px);
    align-items: start;
  }

  .story-stage {
    order: 2;
    inset-block-start: calc(50svh - 330px + var(--header-height) / 2);
    background: none;
  }

  .story-step { min-height: 74svh; }
}

html:not(.js) .story-stage { position: static; }
html:not(.js) .story-dots { display: none; }
html:not(.js) .story-step { opacity: 1; min-height: 0; }

.games .section-head { margin-inline: auto; text-align: center; justify-items: center; }

.game-grid {
  display: grid;
  gap: 18px;
}

.game-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: translate .35s var(--ease), box-shadow .35s ease, opacity .8s var(--ease);
}

.game-card:hover { translate: 0 -6px; box-shadow: var(--shadow-lift); }

.game-table {
  width: calc(100% - 20px);
  margin: 10px 10px 0;
  aspect-ratio: 720 / 385;
  border-radius: 12px;
  transition: scale .6s var(--ease);
}

.game-card:hover .game-table { scale: 1.04; }

.game-body {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 30px 22px 22px;
  background: var(--surface);
}

.game-ball {
  position: absolute;
  inset-block-start: -22px;
  inset-inline-start: 20px;
  border-radius: 50%;
  filter: drop-shadow(0 6px 8px rgb(0 0 0 / .4));
}

.game-body h3 { font-size: 1.3rem; }
.game-body p { color: var(--muted); font-size: .96rem; }

.text-link {
  justify-self: start;
  margin-block-start: 6px;
  color: var(--accent);
  font-weight: 800;
  font-size: .94rem;
  border-block-end: 2px solid transparent;
  transition: border-color .2s ease;
}

.text-link:hover { border-color: currentColor; }

html:not(.js) .text-link { display: none; }

@media (min-width: 620px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1120px) { .game-grid { grid-template-columns: repeat(4, 1fr); } }

.matches { background: var(--bg-raised); }

.lifecycle {
  --stage-progress: 1;
  position: relative;
  display: grid;
  gap: 22px;
  margin-block-end: clamp(32px, 5vw, 56px);
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.lifecycle-line {
  position: absolute;
  inset-block: 62px;
  inset-inline-start: calc(clamp(22px, 4vw, 44px) + 21px);
  width: 3px;
  border-radius: 3px;
  background: var(--line);
}

.lifecycle-fill {
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  height: calc(var(--stage-progress) * 100%);
  border-radius: inherit;
  background: linear-gradient(180deg, var(--chalk), var(--ice));
  transition: height .9s var(--ease), width .9s var(--ease);
}

.lifecycle-ball {
  position: absolute;
  inset-inline-start: -7px;
  inset-block-start: calc(var(--stage-progress) * 100% - 8px);
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff, var(--cream) 52%, #BDB38B);
  box-shadow: 0 0 14px 2px rgb(133 200 253 / .7);
  transition: inset-block-start .9s var(--ease), inset-inline-start .9s var(--ease);
}

.lifecycle-stage {
  position: relative;
  display: grid;
  grid-template-columns: 45px 1fr;
  column-gap: 16px;
  align-items: center;
}

.lifecycle-stage strong { font-size: 1.08rem; line-height: 1.4; }
.lifecycle-stage small { grid-column: 2; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.stage-node {
  grid-row: span 2;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
  transition: background-color .4s ease, border-color .4s ease, color .4s ease, scale .4s var(--ease);
}

.lifecycle-stage.is-done .stage-node { border-color: var(--chalk); background: var(--accent-soft); color: var(--accent); }
.lifecycle-stage.is-current .stage-node { border-color: var(--chalk); background: var(--chalk); color: #fff; scale: 1.14; }

@media (min-width: 900px) {
  .lifecycle { grid-template-columns: repeat(6, 1fr); gap: 12px; }

  .lifecycle-line {
    inset-block: auto;
    inset-block-start: calc(clamp(22px, 4vw, 44px) + 21px);
    inset-inline: calc(clamp(22px, 4vw, 44px) + (100% - 2 * clamp(22px, 4vw, 44px)) / 12);
    width: auto;
    height: 3px;
  }

  .lifecycle-fill {
    inset-block: 0;
    inset-inline: 0 auto;
    width: calc(var(--stage-progress) * 100%);
    height: auto;
  }

  .lifecycle-ball {
    inset-block-start: -7px;
    inset-inline-start: calc(var(--stage-progress) * 100% - 8px);
  }

  .lifecycle-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 4px;
    text-align: center;
  }

  .lifecycle-stage small { grid-column: 1; }
  .stage-node { grid-row: auto; margin-block-end: 8px; }
}

.tool-grid { display: grid; gap: 12px; }

.tool {
  display: grid;
  gap: 2px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  transition: translate .3s var(--ease), border-color .25s ease, opacity .8s var(--ease);
}

.tool:hover { translate: 0 -3px; border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.tool strong { font-size: 1.04rem; }
.tool span { color: var(--muted); font-size: .94rem; line-height: 1.55; }

@media (min-width: 620px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tool-grid { grid-template-columns: repeat(3, 1fr); } }

.ratings {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: #080B11;
  color: #F2F4F8;
  color-scheme: dark;
}

.ratings::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(38% 34% at 50% 54%, rgb(133 200 253 / .2), transparent 72%),
    radial-gradient(60% 50% at 50% 60%, rgb(47 107 228 / .2), transparent 74%),
    radial-gradient(34% 24% at 50% 0%, rgb(255 196 112 / .12), transparent 72%);
}

.ratings .section-head { margin-inline: auto; text-align: center; justify-items: center; margin-block-end: 0; }

.orbit-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-inline: auto;
  margin-block-start: clamp(4px, 2vw, 20px);
}

.orbit-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.orbit-fallback {
  position: absolute;
  inset-block-start: 47%;
  inset-inline-start: 50%;
  width: 34%;
  translate: -50% -50%;
}

[dir="rtl"] .orbit-fallback { translate: 50% -50%; }
.js .orbit-fallback { display: none; }
html:not(.js) .orbit-score { display: none; }

.orbit-score {
  position: absolute;
  inset-block-end: clamp(4px, 2%, 18px);
  inset-inline-start: 50%;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 20px;
  border: 1px solid rgb(133 200 253 / .3);
  border-radius: 999px;
  background: rgb(16 20 28 / .82);
  box-shadow: 0 14px 34px -14px rgb(47 107 228 / .7);
  white-space: nowrap;
  translate: -50% 0;
}

[dir="rtl"] .orbit-score { translate: 50% 0; }
.orbit-score small { color: #AEB7C6; font-size: .84rem; font-weight: 700; }
.orbit-score strong { direction: ltr; font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); font-weight: 900; line-height: 1.2; font-variant-numeric: tabular-nums; }
.orbit-score span { direction: ltr; color: #3FC18F; font-weight: 900; }

.orbit-facts {
  display: grid;
  gap: 10px;
  width: min(100%, 940px);
  margin-inline: auto;
  margin-block-start: clamp(18px, 3vw, 32px);
}

.orbit-facts li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border: 1px solid rgb(133 200 253 / .18);
  border-radius: var(--radius-small);
  background: rgb(255 255 255 / .04);
}

.orbit-facts strong { min-width: 1.5em; color: var(--ice); font-size: 1.8rem; font-weight: 900; line-height: 1.2; text-align: center; }
.orbit-facts span { color: #C4CBD7; font-size: .95rem; font-weight: 600; line-height: 1.45; }

@media (min-width: 720px) {
  .orbit-stage { width: min(100%, calc(70svh * 16 / 9)); aspect-ratio: 16 / 9; }
  .orbit-fallback { width: auto; height: 42%; }
  .orbit-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tournaments { background: var(--bg-raised); }

.halls {
  background:
    radial-gradient(46% 30% at 12% 6%, light-dark(rgb(15 122 88 / .1), rgb(63 193 143 / .1)), transparent 72%),
    var(--bg);
}

.faq { background: var(--bg-raised); }

.faq-layout { display: grid; gap: 12px; }

.faq-list { display: grid; gap: 10px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface);
  transition: border-color .25s ease;
  interpolate-size: allow-keywords;
}

.faq details[open] { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }

.faq details::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size .3s var(--ease), content-visibility .3s allow-discrete;
}

.faq details[open]::details-content { block-size: auto; }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  margin-inline-end: 3px;
  border-bottom: 2.5px solid var(--accent);
  border-right: 2.5px solid var(--accent);
  rotate: 45deg;
  translate: 0 -2px;
  transition: rotate .3s var(--ease), translate .3s var(--ease);
}

.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

@media (min-width: 960px) {
  .faq-layout { grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
  .faq .section-head { position: sticky; inset-block-start: calc(var(--header-height) + 28px); margin-block-end: 0; }
}

.download {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-block: var(--section-space) clamp(48px, 6vw, 80px);
  background: #0B0E14;
  color: #F2F4F8;
  color-scheme: dark;
}

.download::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(46% 42% at 50% 0%, rgb(255 196 112 / .22), transparent 74%),
    radial-gradient(70% 60% at 50% 110%, rgb(47 107 228 / .32), transparent 72%);
}

.download-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.download-icon {
  border-radius: 24px;
  box-shadow: 0 0 60px 4px rgb(133 200 253 / .4);
}

.download h2 {
  font-size: clamp(2rem, 1.3rem + 3.6vw, 4.2rem);
  font-weight: 900;
}

.download .lead { color: #B8C0CE; }

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-block-start: 10px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 196px;
  min-height: 62px;
  padding: 8px 20px;
  border: 1.5px solid #3A4557;
  border-radius: 14px;
  background: #10141C;
  color: #fff;
  text-align: start;
  transition: translate .25s var(--ease), border-color .2s ease, box-shadow .25s ease;
}

.store-badge .icon { width: 30px; height: 30px; }
.store-badge span { display: grid; line-height: 1.2; }
.store-badge small { color: #AEB7C6; font-size: .76rem; font-weight: 600; }
.store-badge strong { font-size: 1.16rem; font-weight: 800; }
a.store-badge:hover { translate: 0 -3px; border-color: var(--ice); box-shadow: 0 12px 28px -12px rgb(133 200 253 / .6); }
.store-badge.is-soon { border-style: dashed; }
.store-badge.is-soon .icon { opacity: .72; }

.contact {
  display: grid;
  gap: 8px;
  margin-block-start: clamp(56px, 8vw, 96px);
  padding-block-start: clamp(32px, 4vw, 44px);
  text-align: center;
}

.contact h3 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.8rem); }
.contact-note { color: #B8C0CE; }

.contact-list {
  display: grid;
  gap: 12px;
  margin-block-start: 16px;
}

.contact-list a, .contact-static {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px 18px;
  border: 1px solid #2A3342;
  border-radius: var(--radius-small);
  background: rgb(255 255 255 / .04);
  text-align: start;
  transition: border-color .2s ease, background-color .2s ease;
}

.contact-list a:hover { border-color: var(--ice); background: rgb(133 200 253 / .08); }
.contact-list .icon { color: var(--ice); width: 26px; height: 26px; }
.contact-list a > span, .contact-static > span { display: grid; line-height: 1.45; font-weight: 700; }
.contact-list small { color: #AEB7C6; font-weight: 600; font-size: .8rem; }

@media (min-width: 820px) {
  .contact-list { grid-template-columns: repeat(3, 1fr); }
}
