/* The public website (lib/site.js): the game's walnut-and-gold look, with the menu's colourful buttons. */

/* Rubik is a variable font: the game's fonts.css only names weights 600 and 800, the site uses the
   whole range from the same files. */
@font-face {
    font-family: 'Site Rubik';
    font-weight: 300 900;
    font-display: swap;
    src: url(/fonts/rubik-arabic-6.woff2) format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
    font-family: 'Site Rubik';
    font-weight: 300 900;
    font-display: swap;
    src: url(/fonts/rubik-latin-ext-7.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Site Rubik';
    font-weight: 300 900;
    font-display: swap;
    src: url(/fonts/rubik-latin-8.woff2) format('woff2');
    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;
}

:root {
    --bg: #1a120e;
    --bg-2: #22170f;
    --card: #2c1e12;
    --card-2: #3a2816;
    --gold: #e0b955;
    --gold-hi: #f6da78;
    --cream: #f6ead0;
    --muted: #d6c39d;
    --wood: #c99244;
    --wood-dark: #4e3414;
    --wrap: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--cream);
    font: 400 17px/1.7 'Site Rubik', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
.lang-ar body, body.lang-ar { font-size: 18px; }
img, svg { max-width: 100%; }
a { color: var(--gold-hi); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
.lang-en h1, .lang-en h2, .lang-en .way h3, .lang-en .quick h3 { font-family: 'Mate SC', 'Site Rubik', serif; font-weight: 400; letter-spacing: 0.01em; }
.lang-ar h1, .lang-ar h2, .lang-ar h3 { font-weight: 800; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

/* ---- buttons: the menu's lapis / emerald with a gold frame and a pressed edge ---- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 66px;
    padding: 10px 24px 10px 18px;
    border-radius: 19px;
    border: 1.5px solid var(--gold);
    color: #fff8e6;
    text-decoration: none;
    line-height: 1.15;
    transition: transform 0.14s ease, filter 0.15s ease, box-shadow 0.14s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(3px); }
.btn small { display: block; font-size: 13px; font-weight: 500; opacity: 0.9; }
.btn b { display: block; font-size: 21px; font-weight: 800; }
.btn-ico { width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.btn-ico-dice { width: 44px; height: 44px; margin: -6px 0; }
.btn-store {
    background:
        radial-gradient(120% 130% at 78% -12%, rgba(160, 245, 195, 0.42), rgba(160, 245, 195, 0) 56%),
        linear-gradient(180deg, #38ad6c 0%, #24804f 50%, #155333 100%);
    box-shadow: 0 5px 0 #0c331f, 0 14px 28px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.3), inset 0 -12px 22px rgba(4, 34, 18, 0.4);
}
.btn-web {
    background:
        radial-gradient(120% 130% at 78% -12%, rgba(150, 190, 255, 0.5), rgba(150, 190, 255, 0) 56%),
        linear-gradient(180deg, #4a74e0 0%, #2c4cb0 50%, #1b2e7a 100%);
    box-shadow: 0 5px 0 #121e52, 0 14px 28px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.32), inset 0 -12px 22px rgba(8, 16, 60, 0.4);
}
.btn-sm { min-height: 0; padding: 8px 16px; border-radius: 14px; font-weight: 800; font-size: 15px; box-shadow: 0 3px 0 #121e52, inset 0 2px 0 rgba(255, 255, 255, 0.3); }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 18px; margin: 26px 0 8px; }

/* ---- header ---- */
.top { position: absolute; inset: 0 0 auto; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.brand img { display: block; height: 46px; width: auto; }
.page-home .brand { visibility: hidden; } /* the big logo is just below */
.nav { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; justify-content: flex-end; }
.nav > a:not(.btn) { color: var(--cream); text-decoration: none; font-weight: 600; font-size: 15px; opacity: 0.92; }
.nav > a:not(.btn):hover, .nav > a[aria-current] { color: var(--gold-hi); opacity: 1; }

/* ---- hero ---- */
.hero {
    position: relative;
    padding: 76px 0 0;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(26, 18, 14, 0.25) 0%, rgba(26, 18, 14, 0.55) 55%, var(--bg) 100%),
        url(/site/img/city-1600.webp) center top / cover no-repeat;
}
@media (max-width: 800px) { .hero { background-image: linear-gradient(180deg, rgba(26, 18, 14, 0.25) 0%, rgba(26, 18, 14, 0.6) 55%, var(--bg) 100%), url(/site/img/city-800.webp); } }
.hero-logo { display: block; width: min(72vw, 400px); height: auto; margin: 0 auto 6px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5)); }
.hero h1 {
    font-size: clamp(30px, 5vw, 50px);
    color: var(--gold-hi);
    text-shadow: 0 3px 0 rgba(60, 30, 4, 0.75), 0 8px 26px rgba(0, 0, 0, 0.6);
}
.lead { max-width: 720px; margin: 0 auto; font-size: clamp(17px, 2.1vw, 20px); color: var(--cream); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.chips li { padding: 4px 14px; border-radius: 999px; background: rgba(14, 9, 5, 0.6); border: 1px solid rgba(224, 185, 85, 0.55); font-size: 14px; font-weight: 600; color: var(--muted); }

.shot { margin: 0; border-radius: 22px; overflow: hidden; border: 1.5px solid rgba(224, 185, 85, 0.7); background: #120c07; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55); }
.shot img { display: block; width: 100%; height: auto; }
.hero-shot { margin: 34px auto 0; max-width: 1040px; }

/* ---- sections ---- */
.band { padding: 64px 0; }
.title { text-align: center; font-size: clamp(26px, 3.6vw, 38px); color: var(--gold-hi); margin-bottom: 28px; }
.title::after {
    content: '';
    display: block;
    width: 120px;
    height: 2px;
    margin: 14px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Play your way: the menu's buttons as cards, each with its own art and colour. */
.ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.way {
    position: relative;
    padding: 18px 18px 20px;
    border-radius: 20px;
    border: 1.5px solid var(--gold);
    text-align: center;
    color: #fff4dc;
}
.way h3 { font-size: 22px; margin: 4px 0 6px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.way p { margin: 0; font-size: 15.5px; line-height: 1.55; opacity: 0.95; }
.way-art { display: block; width: 104px; height: 100px; margin: -6px auto 0; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
.way-online { background: radial-gradient(120% 90% at 78% -12%, rgba(150, 190, 255, 0.5), rgba(150, 190, 255, 0) 56%), linear-gradient(180deg, #4a74e0 0%, #2c4cb0 50%, #1b2e7a 100%); box-shadow: 0 5px 0 #121e52, 0 14px 26px rgba(0, 0, 0, 0.4); }
.way-invite { background: radial-gradient(120% 90% at 78% -12%, rgba(222, 190, 255, 0.45), rgba(222, 190, 255, 0) 56%), linear-gradient(180deg, #a774e0 0%, #7446b8 50%, #4c2785 100%); box-shadow: 0 5px 0 #331a5c, 0 14px 26px rgba(0, 0, 0, 0.4); }
.way-ai { background: radial-gradient(120% 90% at 78% -12%, rgba(255, 178, 170, 0.45), rgba(255, 178, 170, 0) 56%), linear-gradient(180deg, #dc4652 0%, #a92233 50%, #6b0f1e 100%); box-shadow: 0 5px 0 #470a13, 0 14px 26px rgba(0, 0, 0, 0.4); }
.way-local { background: radial-gradient(120% 90% at 78% -12%, rgba(160, 245, 195, 0.42), rgba(160, 245, 195, 0) 56%), linear-gradient(180deg, #38ad6c 0%, #24804f 50%, #155333 100%); box-shadow: 0 5px 0 #0c331f, 0 14px 26px rgba(0, 0, 0, 0.4); }

/* Feature rows: a picture from the game beside its text, alternating sides. */
.features { display: grid; gap: 56px; padding: 12px 0 64px; }
.feature { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 40px; }
.feature:nth-child(even) .shot { order: 2; }
.feature h2 { font-size: clamp(24px, 3vw, 32px); color: var(--gold-hi); }
.feature p { margin: 0 0 12px; color: var(--cream); }
/* List bullets: little checkers, white and black in turn. */
.pips { margin: 0; padding: 0; list-style: none; }
.pips li { position: relative; padding-inline-start: 30px; margin: 8px 0; color: var(--muted); }
.pips li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0.42em;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #fffdf6, #e8dcc2 70%);
    box-shadow: inset 0 0 0 1px #9b9b9b, inset 0 0 0 4px #fff, inset 0 0 0 5px #d6d6d6, 0 2px 3px rgba(0, 0, 0, 0.45);
}
.pips li:nth-child(even)::before {
    background: radial-gradient(circle at 40% 35%, #4a4a4a, #141414 70%);
    box-shadow: inset 0 0 0 1px #000, inset 0 0 0 4px #1d1d1d, inset 0 0 0 5px #3c3c3c, 0 2px 3px rgba(0, 0, 0, 0.45);
}

/* What is Tawla 31: on the board's wood. */
.about-band {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.32)),
        linear-gradient(180deg, #8a5a26, #5e3b17);
    border-block: 6px solid var(--wood-dark);
}
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: start; }
.about-text .title { text-align: start; }
.about-text .title::after { margin-inline: 0; }
.about-text p { margin: 0 0 14px; color: #fbf1da; }
.quick {
    padding: 22px 22px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(43, 29, 17, 0.96), rgba(22, 14, 8, 0.96));
    border: 1.5px solid var(--gold);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}
.quick h3 { font-size: 22px; color: var(--gold-hi); }
/* Numbered rules as dice faces. */
.dice-list { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: die; }
.dice-list li { position: relative; padding-inline-start: 44px; margin: 12px 0; font-size: 16px; line-height: 1.55; counter-increment: die; }
.dice-list li::before {
    content: counter(die);
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #e4ddd2);
    box-shadow: inset 0 0 0 1px #b9ad9c, 0 3px 0 #8f7f66;
    color: #2a1c06;
    font: 800 17px/30px 'Site Rubik', sans-serif;
    text-align: center;
}
.more { display: inline-block; font-weight: 700; text-decoration: none; }
.more::after { content: ' ←'; }
.lang-en .more::after { content: ' →'; }

/* FAQ */
.faq { padding: 64px 0 40px; max-width: 860px; }
.faq details {
    margin: 0 0 12px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid rgba(224, 185, 85, 0.45);
}
.faq summary {
    position: relative;
    padding: 16px 20px;
    padding-inline-end: 52px;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: 18px;
    color: var(--cream);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    position: absolute;
    inset-inline-end: 18px;
    top: 50%;
    width: 26px;
    height: 26px;
    margin-top: -13px;
    border-radius: 7px;
    background: linear-gradient(180deg, #fff, #e4ddd2);
    color: #2a1c06;
    font: 800 20px/26px 'Site Rubik', sans-serif;
    text-align: center;
}
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* Last call to play: the walnut board. */
.final {
    padding: 56px 0 60px;
    text-align: center;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 196, 92, 0.22), transparent 62%),
        linear-gradient(180deg, #2a1a0b, #120a05);
    border-top: 1px solid rgba(224, 185, 85, 0.35);
}
.final h2 { font-size: clamp(28px, 4vw, 40px); color: var(--gold-hi); }
.final p { margin: 0; color: var(--muted); }

/* ---- rules page ---- */
.page-head {
    padding: 100px 0 30px;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(26, 18, 14, 0.45), var(--bg)),
        url(/site/img/city-800.webp) center top / cover no-repeat;
}
.page-head h1 { font-size: clamp(32px, 5vw, 48px); color: var(--gold-hi); text-shadow: 0 3px 0 rgba(60, 30, 4, 0.75), 0 8px 26px rgba(0, 0, 0, 0.6); }
.first { display: inline-block; margin: 18px 0 0; padding: 10px 18px; border-radius: 14px; background: rgba(14, 9, 5, 0.65); border: 1px solid rgba(224, 185, 85, 0.55); color: var(--cream); }
.rules { display: grid; gap: 26px; padding: 30px 0 64px; max-width: 980px; }
.rule {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 28px;
    align-items: center;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(180deg, var(--card-2), var(--card));
    border: 1.5px solid rgba(224, 185, 85, 0.6);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}
.rule-art { margin: 0; }
.rule-art svg { display: block; width: 100%; height: auto; }
.rule-art .htp-num { font: 700 9px 'Site Rubik', system-ui, sans-serif; text-anchor: middle; }
.rule-art .htp-big { font: 800 22px 'Site Rubik', system-ui, sans-serif; text-anchor: middle; fill: #fff; stroke: rgba(0, 0, 0, 0.6); stroke-width: 3px; paint-order: stroke; }
.rule-art .htp-clock { font: 700 30px 'Site Rubik', system-ui, sans-serif; text-anchor: middle; fill: #fff; }
.rule-num { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; }
.rule h2 { font-size: clamp(24px, 3vw, 30px); color: var(--gold-hi); }
.rule p { margin: 0 0 10px; color: var(--muted); }
.rule .rule-main { color: var(--cream); font-size: 1.06em; }

/* ---- footer ---- */
.foot { padding: 30px 0 36px; background: #0e0905; border-top: 1px solid rgba(224, 185, 85, 0.25); text-align: center; }
.foot-logo { height: 54px; width: auto; opacity: 0.9; }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; margin: 12px 0; }
.foot-nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.foot-nav a:hover { color: var(--gold-hi); }
.foot-copy { margin: 0; font-size: 13px; color: rgba(214, 195, 157, 0.7); }

/* ---- narrow screens ---- */
@media (max-width: 960px) {
    .ways { grid-template-columns: repeat(2, 1fr); }
    .feature, .about, .rule { grid-template-columns: 1fr; gap: 18px; }
    .feature:nth-child(even) .shot { order: 0; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .nav > a:not(.btn):first-child { display: none; }
    .hero { padding-top: 64px; }
    .cta .btn { width: 100%; justify-content: center; }
    .ways { gap: 12px; }
    .way { padding: 12px 10px 14px; }
    .way h3 { font-size: 18px; }
    .way p { font-size: 14px; }
    .way-art { width: 80px; height: 77px; }
    .band { padding: 48px 0; }
    .rule { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
}
