/* Hokm marketing site. Static, no script (CSP script-src 'none'): every effect here is CSS.
   One font for both languages — Vazirmatn, the game's own (Latin + Persian glyphs).
   Layout uses logical properties (margin-inline, inset-inline, text-align: start) so the Persian
   pages (dir="rtl") mirror without a second stylesheet. */

@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Vazirmatn"; src: url("/fonts/vazirmatn-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --ink: #1a0d05;
    --leather: #2b170a;
    --leather-2: #3a2110;
    --line: #6b4220;
    --cream: #f6ead0;
    --sand: #d8c39a;
    --gold: #f2d27a;
    --gold-deep: #c9973a;
    --red: #b3261e;
    --wrap: 1120px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--ink);
    color: var(--cream);
    font: 400 17px/1.65 "Vazirmatn", "Segoe UI", system-ui, -apple-system, Roboto, Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body, body[dir="rtl"] { line-height: 1.9; }
img { max-width: 100%; height: auto; }
a { color: var(--gold); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--gold); text-align: center; }
h3 { font-size: 1.15rem; color: var(--gold); }
p { margin: 0 0 1em; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.lead { text-align: center; color: var(--sand); max-width: 680px; margin: 0 auto 2.2em; }

/* the carved band of the game's pages */
.band { height: 34px; background: url("/img/band.webp") repeat-x center / auto 100%; }

/* ---------------------------------------------------------------- top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.wordmark { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.wordmark img { width: 44px; height: 44px; object-fit: contain; }
.top nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
.top nav a { color: var(--cream); text-decoration: none; opacity: 0.9; }
.top nav a:hover { color: var(--gold); opacity: 1; }
.lang { border: 1px solid var(--gold-deep); border-radius: 999px; padding: 3px 14px; }

/* ---------------------------------------------------------------- hero */
.hero {
    position: relative;
    background:
        linear-gradient(180deg, rgba(26, 13, 5, 0.78) 0%, rgba(26, 13, 5, 0.55) 45%, rgba(26, 13, 5, 0.96) 100%),
        url("/img/hero-1600.webp") center / cover no-repeat;
    padding-bottom: 40px;
}
.hero-body { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 30px; padding: 30px 0 20px; }
.hero-text { text-align: start; }
.hero-logo { width: min(300px, 60%); display: block; margin-bottom: 10px; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.6)); }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); color: var(--cream); text-shadow: 0 3px 14px rgba(0, 0, 0, 0.7); }
.hero h1 em { font-style: normal; color: var(--gold); }
.tagline { font-size: 1.15rem; color: var(--sand); max-width: 34em; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
    display: inline-flex; flex-direction: column; justify-content: center;
    min-width: 210px; padding: 12px 26px; border-radius: 14px; text-decoration: none; font-weight: 700; font-size: 1.15rem; line-height: 1.3;
    border: 2px solid var(--gold-deep); color: var(--cream); background: rgba(43, 23, 10, 0.78);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn small { font-weight: 400; font-size: 0.78rem; opacity: 0.85; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
.btn-gold { background: linear-gradient(180deg, #ffe39a 0%, #e0b252 100%); border-color: #fff0c2; color: #2b170a; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--sand); font-size: 0.92rem; }
.facts li::before { content: "◆"; color: var(--gold-deep); margin-inline-end: 7px; font-size: 0.7em; }

/* the fan of cards: five cards turned around a point below them */
.fan { position: relative; height: 380px; direction: ltr; }
.fan img {
    position: absolute; left: 50%; bottom: 10px; width: 190px; margin-left: -95px;
    transform-origin: 50% 130%; border-radius: 10px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease;
}
.fan img:nth-child(1) { transform: rotate(-28deg); }
.fan img:nth-child(2) { transform: rotate(-14deg); }
.fan img:nth-child(3) { transform: rotate(0deg); }
.fan img:nth-child(4) { transform: rotate(14deg); }
.fan img:nth-child(5) { transform: rotate(28deg); }
.fan:hover img:nth-child(1) { transform: rotate(-34deg); }
.fan:hover img:nth-child(2) { transform: rotate(-17deg); }
.fan:hover img:nth-child(3) { transform: rotate(0deg) translateY(-12px); }
.fan:hover img:nth-child(4) { transform: rotate(17deg); }
.fan:hover img:nth-child(5) { transform: rotate(34deg); }

/* ---------------------------------------------------------------- sections */
section { padding: 70px 0; }
.leather { background: linear-gradient(rgba(43, 23, 10, 0.86), rgba(43, 23, 10, 0.86)), url("/img/leather.webp") center / 900px auto; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step, .feature { background: rgba(26, 13, 5, 0.6); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.step { counter-increment: step; position: relative; padding-top: 34px; }
.step::before {
    content: counter(step); position: absolute; top: -20px; inset-inline-start: 22px;
    width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(180deg, #ffe39a, #e0b252); color: #2b170a; font-weight: 700;
}
[lang="fa"] .step::before { content: counter(step, persian); }
.step p, .feature p { color: var(--sand); margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature img { height: 56px; width: auto; margin-bottom: 12px; }

.shots { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; border-radius: 12px; border: 2px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); }
.shots figcaption { color: var(--sand); font-size: 0.9rem; margin-top: 8px; text-align: center; }
.shots .stack { display: grid; gap: 20px; }

.leagues { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; margin: 0; padding: 0; list-style: none; }
.leagues li { text-align: center; font-size: 0.85rem; color: var(--sand); }
.leagues img { height: 58px; width: auto; display: block; margin: 0 auto 6px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }

.avatars { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 34px; }
.avatars img { width: 120px; height: 120px; border-radius: 14px; border: 2px solid var(--gold-deep); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); }

.install { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.faq { max-width: 780px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; margin-bottom: 10px; background: rgba(26, 13, 5, 0.6); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--cream); }
.faq details[open] summary { color: var(--gold); margin-bottom: 8px; }
.faq p { color: var(--sand); margin: 0; }

.final { text-align: center; }
.final .cta { justify-content: center; }
.final .btn { align-items: center; }

/* ---------------------------------------------------------------- footer */
footer { background: #120904; padding: 34px 0 44px; color: var(--sand); font-size: 0.92rem; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--sand); text-decoration: none; }
.foot a:hover { color: var(--gold); }

/* ---------------------------------------------------------------- text pages (privacy, terms, ...) */
.doc { max-width: 800px; margin: 0 auto; padding: 50px 0 80px; }
.doc h1 { color: var(--gold); font-size: clamp(1.8rem, 4vw, 2.5rem); }
.doc h2 { text-align: start; font-size: 1.3rem; margin-top: 2em; }
.doc .updated { color: var(--sand); font-size: 0.92rem; }
.doc li { margin-bottom: 0.45em; }
.doc table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 0.95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 12px; text-align: start; vertical-align: top; }
.doc th { background: var(--leather-2); color: var(--gold); }
.table-scroll { overflow-x: auto; }
.center { text-align: center; padding: 110px 0; }

@media (max-width: 900px) {
    .hero-body { grid-template-columns: 1fr; text-align: center; }
    .hero-text { text-align: center; }
    .hero-logo { margin-inline: auto; }
    .tagline { margin-inline: auto; }
    .cta, .facts { justify-content: center; }
    .fan { height: 300px; }
    .fan img { width: 150px; margin-left: -75px; }
    .steps, .features, .install { grid-template-columns: 1fr; }
    .shots { grid-template-columns: 1fr; }
    .leagues { grid-template-columns: repeat(5, 1fr); row-gap: 18px; }
    section { padding: 54px 0; }
}
@media (max-width: 640px) {
    .top { flex-direction: column; gap: 8px; padding: 12px 0 6px; }
    .top nav { width: 100%; justify-content: center; gap: 6px 16px; font-size: 0.92rem; }
    .top nav a { white-space: nowrap; }
    .top nav a:not(.lang) { padding: 4px 0; }
}
@media (max-width: 480px) {
    .btn { min-width: 0; width: 100%; align-items: center; }
    .fan { height: 240px; }
    .fan img { width: 120px; margin-left: -60px; }
    .top nav { gap: 12px; font-size: 0.88rem; }
    .avatars img { width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .fan img { transition: none; }
}

/* the 404 page centres its buttons */
.center .cta { justify-content: center; }
.center .btn { align-items: center; }
