/* 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: 38rem; 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: .72; cursor: default; }
a.store:hover { border-color: var(--gold-light); color: #fff; }
.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: 176px; margin-inline: -26px;
  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; }
}

.variants { text-align: center; color: var(--ink-soft); margin: 1.4rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; }
.variants a { border: 1px solid var(--line); border-radius: 999px; padding: .25rem .9rem; text-decoration: none; color: var(--ink); font-size: var(--step--1); }
.variants a:hover { border-color: var(--gold); color: var(--gold-light); }

/* Moving frames: the frames are the show, lit like jewels on velvet. */
.frames {
  background:
    radial-gradient(60rem 36rem at 72% 45%, rgba(226,178,85,.16), transparent 62%),
    linear-gradient(180deg, var(--night), #121a3e 50%, var(--night));
  border-block: 1px solid var(--line);
}
html[dir="rtl"] .frames { background:
    radial-gradient(60rem 36rem at 28% 45%, rgba(226,178,85,.16), transparent 62%),
    linear-gradient(180deg, var(--night), #121a3e 50%, var(--night)); }
.frames .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.frames .sec-lead { margin-bottom: 2rem; }
.profile-title { font: 600 var(--step-1)/1.4 var(--font-display); color: var(--ink); margin: 0 0 1rem; }
.profile-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.6rem; margin: 0; }
.profile-list div { border-inline-start: 2px solid rgba(226,178,85,.55); padding-inline-start: .9rem; }
.profile-list dt { color: var(--gold-light); font-weight: 700; margin-bottom: .2rem; }
.profile-list dd { margin: 0; color: var(--ink-soft); font-size: var(--step--1); line-height: 1.7; }
.frames-show { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem .6rem; }
.frames-show .lead { grid-column: span 2; grid-row: span 2; }
.frames-show figure { margin: 0; text-align: center; }
.frame-pic { position: relative; aspect-ratio: 448 / 512; container-type: inline-size; }
.frame-pic img { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
/* The picture inside the frame: where a player's photo sits in the game. */
.frame-face {
  position: absolute; left: 19.6%; top: 29.7%; width: 60.7%; height: 53.1%; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #2b3670, var(--velvet) 55%, #0b1129);
  color: rgba(246,216,139,.85); font-size: 24cqw; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(246,216,139,.18), inset 0 -10px 24px rgba(0,0,0,.45);
}
.frames-show li:nth-child(4n+2) .frame-face, .frames-show li:nth-child(4n+3) .frame-face { color: rgba(232,120,120,.9); }
.frames-show figcaption { font-size: var(--step--1); color: var(--ink-soft); margin-top: .1rem; }
.frames-show .lead figcaption { font: 600 var(--step-1)/1.3 var(--font-display); color: var(--gold-light); }
@media (max-width: 900px) {
  .frames .wrap { grid-template-columns: 1fr; }
  .frames-show { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .frames-show .lead { grid-column: 1 / -1; grid-row: auto; max-width: 300px; margin-inline: auto; width: 100%; }
  .frames-show li:nth-child(n+8) { display: none; }
}
@media (max-width: 480px) { .profile-list { grid-template-columns: 1fr; } }

/* The King and the Emperor: two crests on one velvet panel. */
.crests {
  display: grid; grid-template-columns: 1fr 1fr; position: relative;
  background: linear-gradient(180deg, rgba(25,33,74,.9), rgba(13,20,48,.9));
  border: 1px solid var(--line); border-radius: var(--radius-soft);
}
.crests::before { content: ""; position: absolute; top: 12%; bottom: 12%; left: 50%; width: 1px;
  background: linear-gradient(transparent, rgba(226,178,85,.6), transparent); }
.crest { text-align: center; padding: 2rem clamp(1rem, 4vw, 3rem) 2.4rem; }
.crest img { width: clamp(112px, 14vw, 156px); margin: 0 auto .6rem; filter: drop-shadow(0 12px 22px rgba(0,0,0,.5)); }
.crest h3 { font: 700 var(--step-2)/1.3 var(--font-display); color: var(--gold-light); margin: 0 0 .5rem; }
html[lang="en"] .crest h3 { font-weight: 600; }
.crest p { margin: 0 auto; max-width: 36ch; color: var(--ink); }
.royal-more { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 2.5rem; align-items: start; }
.royal-more h3 { font: 600 var(--step-1)/1.4 var(--font-display); color: var(--ink); margin: 0 0 1rem; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1.6rem; }
.perks li { position: relative; padding-inline-start: 1.3rem; color: var(--ink); }
.perks li::before { content: "♦"; position: absolute; inset-inline-start: 0; top: .05em; color: var(--gold); font-size: .8em; }
.challenge { display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: center;
  border: 1px solid rgba(226,178,85,.45); border-radius: var(--radius-soft); padding: 1.2rem 1.3rem;
  background: rgba(226,178,85,.06); }
.challenge h3 { color: var(--gold-light); margin-bottom: .3rem; }
.challenge p { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }
@media (max-width: 760px) {
  .crests { grid-template-columns: 1fr; }
  .crests::before { top: 50%; bottom: auto; left: 12%; right: 12%; width: auto; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(226,178,85,.6), transparent); }
  .royal-more { grid-template-columns: 1fr; }
  .perks { grid-template-columns: 1fr; }
}

/* 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; }
}

/* The rules guide: a table, short summaries, words. */
.prose.wide { max-width: 64rem; }
.table-wrap { overflow-x: auto; margin: 1rem 0 2rem; border: 1px solid var(--line); border-radius: var(--radius-soft); }
.games-table { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 40rem; }
.games-table th, .games-table td { text-align: start; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.games-table thead th { color: var(--gold-light); background: var(--velvet); font-weight: 700; }
.games-table tbody th a { color: var(--gold-light); text-decoration: none; font-weight: 700; }
.games-table tbody tr:last-child > * { border-bottom: 0; }
.rule-sum h2 a { color: inherit; text-decoration: none; }
.rule-sum h2 a:hover { text-decoration: underline; }
.glossary { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 1.6rem; margin: 1rem 0 0; }
.glossary div { border-inline-start: 2px solid rgba(226,178,85,.55); padding-inline-start: .9rem; }
.glossary dt { color: var(--gold-light); font-weight: 700; }
.glossary dd { margin: .2rem 0 0; color: var(--ink-soft); }
.cta-line { margin-top: 2.5rem; }
.play-box { margin: 2.6rem 0 0; padding: 1.3rem 1.4rem; border: 1px solid rgba(226,178,85,.45); border-radius: var(--radius-soft); background: rgba(226,178,85,.06); }
.play-box h2 { margin-top: 0; }
.play-box p { margin: 0 0 1rem; }
.all-rules { text-align: center; margin: 1.6rem 0 0; }
.all-rules a { color: var(--gold-light); font-weight: 700; }
.prose section.rule-sum { padding-block: 0; }
