/* Card Kings — the official site. A palace at night: velvet navy, gold
   leaf, the crown's sapphire; Ruqaa calligraphy for the big words. */
:root {
  --night: #0d1430;
  --velvet: #19214a;
  --velvet-2: #232c5e;
  --sapphire: #3d5be0;
  --gold: #e2b255;
  --gold-light: #f6d88b;
  --parchment: #f7efdd;
  --ink: #e9e4d6;
  --ink-soft: #b9b4c9;
  --line: rgba(226, 178, 85, 0.28);
  --radius-card: 14px;
  --radius-soft: 22px;
  --measure: 68ch;
  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 3.1rem);
  --step-4: clamp(2.5rem, 1.8rem + 3.4vw, 4.6rem);
  --font-body: "Cairo", system-ui, sans-serif;
  --font-display: "El Messiri", "Cairo", sans-serif;
  color-scheme: dark;
}
html[lang="en"] { --font-display: "El Messiri", "Cairo", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 var(--step-0)/1.75 var(--font-body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-light); text-underline-offset: 0.2em; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: -999px; top: 0; }
.skip:focus { inset-inline-start: 1rem; top: 1rem; background: var(--gold); color: var(--night); padding: .5rem 1rem; z-index: 10; }
.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 5;
  background: rgba(13, 20, 48, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand img { height: 42px; width: auto; }
.nav { margin-inline-start: auto; display: flex; gap: 1.4rem; align-items: center; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--step--1); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-light); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: .2rem .8rem; }
.menu-btn { display: none; margin-inline-start: auto; background: none; border: 1px solid var(--line);
  color: var(--ink); border-radius: 10px; padding: .35rem .7rem; font: inherit; }
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; inset-inline: 0; top: 64px; flex-direction: column;
    align-items: stretch; gap: 0; background: var(--velvet); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: .9rem 1.2rem; border-top: 1px solid rgba(255,255,255,.05); font-size: var(--step-0); }
  .lang { border: 0; border-radius: 0; }
}

/* ------------------------------------------------------------ hero */
.hero {
  position: relative; isolation: isolate;
  min-height: min(86vh, 760px);
  display: grid; align-items: center;
  overflow: hidden;
}
.hero picture img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 30% 50%; z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to left, rgba(13,20,48,.92) 0%, rgba(13,20,48,.7) 38%, rgba(13,20,48,0) 70%),
              linear-gradient(to top, var(--night) 0%, rgba(13,20,48,0) 30%);
}
html[dir="ltr"] .hero::after {
  background: linear-gradient(to left, rgba(13,20,48,.92) 0%, rgba(13,20,48,.7) 38%, rgba(13,20,48,0) 70%),
              linear-gradient(to top, var(--night) 0%, rgba(13,20,48,0) 30%);
}
/* The picture's subject is on its left, so the words sit on the right in
   both languages (the picture is never mirrored: the card letters would flip). */
html[dir="ltr"] .hero-copy { margin-inline-start: auto; }
.hero-copy { max-width: 34rem; padding-block: 5rem 4rem; }
.hero h1 {
  font: 700 var(--step-4)/1.15 var(--font-display);
  margin: 0 0 1rem;
  color: var(--gold-light);
  text-shadow: 0 2px 0 #6b4a12, 0 10px 30px rgba(0,0,0,.55);
}
html[lang="en"] .hero h1 { font-weight: 600; letter-spacing: .01em; line-height: 1.1; }
.hero p { font-size: var(--step-1); color: var(--ink); margin: 0 0 2rem; max-width: 30rem; }
.hero .soon { margin-top: 1rem; }
.stores { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.store {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .7rem 1.2rem; border-radius: 12px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.28); min-width: 11rem;
}
.store small { display: block; font-size: .72rem; line-height: 1.2; opacity: .8; }
.store strong { display: block; font-size: 1.05rem; line-height: 1.2; }
.store[aria-disabled="true"] { opacity: .78; cursor: default; }
.store svg { width: 26px; height: 26px; flex: none; }
.soon { font-size: var(--step--1); color: var(--ink-soft); }

/* ------------------------------------------------------------ sections */
section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.sec-title { font: 700 var(--step-3)/1.25 var(--font-display); color: var(--gold-light); margin: 0 0 .6rem; }
html[lang="en"] .sec-title { font-weight: 600; }
.sec-lead { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 2.5rem; font-size: var(--step-1); }

/* The games: a hand of cards, fanned. */
.hand {
  list-style: none; margin: 2rem auto 0; padding: 0;
  display: flex; justify-content: center;
  min-height: 430px; position: relative;
}
.hand li {
  width: 200px; margin-inline: -34px;
  transform-origin: 50% 140%;
  /* --rot and --lift are set per card by the build (a fan). */
  transform: rotate(var(--rot, 0deg)) translateY(var(--lift, 0px));
  transition: transform .25s ease;
}
.hand li:hover, .hand li:focus-within { transform: rotate(0deg) translateY(-34px); z-index: 2; }
.card-game {
  display: block; text-decoration: none; color: #2a1d06;
  background: var(--parchment);
  border-radius: var(--radius-card);
  padding: 9px 9px 14px;
  box-shadow: 0 1px 0 #fff inset, 0 14px 30px rgba(0,0,0,.45);
  border: 1px solid #d9c38f;
  position: relative;
}
.card-game::before, .card-game::after {
  content: attr(data-pip); position: absolute; font: 700 15px/1 var(--font-body); color: #9b1b1b;
}
.card-game::before { top: 6px; inset-inline-start: 9px; }
.card-game::after { bottom: 6px; inset-inline-end: 9px; transform: rotate(180deg); }
.card-game[data-suit="black"]::before, .card-game[data-suit="black"]::after { color: #1d1d2b; }
.card-game img { border-radius: 8px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; margin-top: 16px; }
.card-game h3 { font: 700 1.25rem/1.3 var(--font-display); margin: .7rem 0 .15rem; text-align: center; color: #3b2706; }
html[lang="en"] .card-game h3 { font-size: 1.05rem; }
.card-game p { margin: 0; font-size: .82rem; line-height: 1.45; text-align: center; color: #5a4a2c; }
@media (max-width: 900px) {
  .hand { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; min-height: 0;
    padding: 1rem 1rem 2rem; margin-inline: -1rem; gap: 1rem; }
  .hand li { transform: none; margin: 0; flex: 0 0 72%; max-width: 260px; scroll-snap-align: center; }
  .hand li:hover, .hand li:focus-within { transform: none; }
}

/* Features: image and words, alternating. */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; padding-block: 2rem; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature:nth-child(even) .feature-img { order: 2; }
.feature-img img { border-radius: var(--radius-soft); box-shadow: 0 18px 48px rgba(0,0,0,.5); }
.feature h3 { font: 700 var(--step-2)/1.3 var(--font-display); color: var(--gold-light); margin: 0 0 .6rem; }
html[lang="en"] .feature h3 { font-weight: 600; }
.feature p { margin: 0 0 .8rem; max-width: 46ch; }
.feature ul { margin: 0; padding-inline-start: 1.2rem; color: var(--ink-soft); }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-img { order: 0; }
}

/* No gambling: a plain promise. */
.promise { background: var(--velvet); border-block: 1px solid var(--line); }
.promise .wrap { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: center; }
.promise svg { width: 64px; height: 64px; color: var(--gold); }
.promise h2 { font: 700 var(--step-2)/1.3 var(--font-display); margin: 0 0 .3rem; color: var(--gold-light); }
.promise p { margin: 0; max-width: var(--measure); color: var(--ink); }
@media (max-width: 560px) { .promise .wrap { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: .3rem 0; max-width: 54rem; }
.faq summary { cursor: pointer; font-weight: 700; padding: .8rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 1rem; color: var(--ink-soft); max-width: var(--measure); }

/* ------------------------------------------------------------ articles (rules, policies) */
.page-head { padding-block: 3.5rem 1.5rem; position: relative; isolation: isolate; overflow: hidden; }
.page-head.with-image::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--night) 8%, rgba(13,20,48,.72) 60%, rgba(13,20,48,.55)), var(--bg) center / cover;
}
.page-head h1 { font: 700 var(--step-3)/1.25 var(--font-display); color: var(--gold-light); margin: 0 0 .6rem; }
html[lang="en"] .page-head h1 { font-weight: 600; }
.page-head p { color: var(--ink); max-width: var(--measure); margin: 0; font-size: var(--step-1); }
.crumbs { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 1rem; }
.crumbs a { color: var(--ink-soft); }
.facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.2rem; padding: 0; list-style: none; }
.facts li { background: rgba(25,33,74,.85); border: 1px solid var(--line); border-radius: 999px; padding: .2rem .9rem; font-size: var(--step--1); }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 15rem; gap: 3rem; padding-bottom: 4rem; }
.article.single { grid-template-columns: minmax(0, 1fr); }
.prose { max-width: var(--measure); }
.prose h2 { font: 700 var(--step-2)/1.35 var(--font-display); color: var(--gold-light); margin: 2.6rem 0 .6rem; scroll-margin-top: 80px; }
html[lang="en"] .prose h2 { font-weight: 600; }
.prose h3 { font-size: var(--step-1); margin: 1.8rem 0 .4rem; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; }
.prose li { margin-bottom: .35rem; }
.prose .note { background: var(--velvet); border-inline-start: 3px solid var(--gold); padding: .8rem 1rem; border-radius: 8px; color: var(--ink); }
.toc { position: sticky; top: 90px; align-self: start; font-size: var(--step--1); border-inline-start: 1px solid var(--line); padding-inline-start: 1rem; }
.toc strong { display: block; color: var(--gold-light); margin-bottom: .5rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: .35rem 0; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--gold-light); }
@media (max-width: 900px) { .article { grid-template-columns: 1fr; } .toc { display: none; } }
.other-games { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; }
.other-games a { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: .3rem 1rem; text-decoration: none; }

/* ------------------------------------------------------------ footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 2.5rem; color: var(--ink-soft); font-size: var(--step--1); background: #0a1028; }
.site-foot .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.site-foot img { height: 46px; width: auto; margin-bottom: .6rem; }
.site-foot h2 { font-size: var(--step-0); color: var(--ink); margin: 0 0 .6rem; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: .3rem 0; }
.site-foot a { color: var(--ink-soft); }
.site-foot a:hover { color: var(--gold-light); }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hand li { transition: none; }
}
.btn { display: inline-block; margin-inline-end: .6rem; padding: .6rem 1.4rem; border-radius: 999px; background: var(--gold); color: var(--night); font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--gold-light); }
/* Phones: the picture sits above the words instead of behind them. */
@media (max-width: 760px) {
  .hero { min-height: 0; display: block; padding-top: 0; }
  .hero picture img { position: static; display: block; height: auto; aspect-ratio: 3 / 2; }
  .hero::after { background: linear-gradient(to top, var(--night) 0%, rgba(13,20,48,0) 18%) !important; inset: 0 0 auto 0; aspect-ratio: 3 / 2; height: auto; }
  .hero-copy { padding-block: 1.2rem 3rem; }
}
