/* The static pages of chatrang.app (landing, privacy, terms, support). Midnight & Gold, as in the app. */

/* The app's own fonts, served from this site: no page calls a font service. TrueType, as the app bundles them. */
@font-face {
  font-family: Vazirmatn;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Vazirmatn-Regular.ttf') format('truetype');
}
@font-face {
  font-family: Vazirmatn;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/Vazirmatn-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: Vazirmatn;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/Vazirmatn-ExtraBold.ttf') format('truetype');
}
@font-face {
  font-family: Lalezar;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/Lalezar-Regular.ttf') format('truetype');
}

/* The tokens of app/src/theme/tokens.ts that these pages use. */
:root {
  --bg: #10162b;
  --bg-deep: #070a15;
  --bg-glow: #1c2650;
  --bg-mid: #0d1226;
  --ink: #f4ead2;
  --muted: #b9b3a3;
  --line: rgba(244, 234, 210, 0.22);
  --line-faint: rgba(244, 234, 210, 0.12);
  --chip: rgba(255, 255, 255, 0.07);
  --gold: #e6c36a;
  --gold-ink: #1a1606;
  --gold-top: #f0d283;
  --gold-bottom: #d9b45a;
  --gold-wash: rgba(230, 195, 106, 0.14);
  --panel: rgba(20, 28, 56, 0.85);
  --panel-border: rgba(230, 195, 106, 0.22);
  --nav-line: rgba(230, 195, 106, 0.15);
  --stitch: rgba(230, 195, 106, 0.45);
  --card: #fbf5e6;
  --card-border: #d9c38c;
  --suit-red: #a3242f;
  --suit-red-on-dark: #ff8f8f;
  --suit-black: #18203a;
  --online: #5ad17a;
  --plate: rgba(7, 10, 21, 0.78);
  --rail-top: #3b2a1d;
  --rail-mid: #24170f;
  --rail-bottom: #1a110b;
  --felt-center: #24366e;
  --felt-mid: #18264f;
  --felt-edge: #0f1838;
  --card-shadow: 0 6px 14px rgba(0, 0, 0, 0.45);

  --radius-button: 16px;
  --radius-panel: 22px;
  --radius-card: 9px;
  --radius-pill: 999px;

  --font: Vazirmatn, Tahoma, sans-serif;
  --font-display: Lalezar, Vazirmatn, sans-serif;

  /* The side gutter: the spec's 16 on phones, 24 from tablets up. */
  --gutter: 16px;
}

@media (min-width: 720px) {
  :root {
    --gutter: 24px;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.9;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

a {
  color: var(--gold);
}

strong {
  font-weight: 800;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
}

.muted {
  color: var(--muted);
}

.icon {
  flex: none;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: var(--radius-button);
  font-weight: 800;
  font-size: 15px;
  line-height: 1.4;
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: var(--gold-ink);
}

.btn-cta {
  padding: 17px 30px;
  font-size: 17px;
  background: linear-gradient(var(--gold-top), var(--gold-bottom));
  color: var(--gold-ink);
  box-shadow: 0 0 28px rgba(230, 195, 106, 0.35);
}

.btn-ghost {
  padding: 16px 22px;
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  background: var(--chip);
  border: 1px solid var(--line);
}

.btn-mail {
  align-self: flex-start;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 16px 24px;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  background: var(--gold-wash);
  border: 1px solid var(--stitch);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.pill-gold {
  background: var(--gold-wash);
  color: var(--gold);
}

.pill-ready {
  background: rgba(90, 209, 122, 0.14);
  color: var(--online);
}

.pill-soon {
  background: var(--chip);
  color: var(--muted);
}

/* Header and footer, shared by every page */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--nav-line);
}

.site-header .wrap {
  padding-block: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.logo-tile {
  fill: var(--gold);
}

.logo-letter {
  fill: var(--bg);
  font-family: var(--font-display);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.nav-link {
  padding: 10px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
}

.nav .btn {
  margin-inline-start: 8px;
}

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--nav-line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .wrap {
  padding-block: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.footer-links a {
  padding: 12px 8px;
  text-decoration: none;
}

/* Landing: sections */

.section {
  background: var(--bg);
}

.section-deep {
  background: var(--bg-deep);
}

.section > .wrap {
  padding-block: 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 720px) {
  .section > .wrap {
    padding-block: 80px;
    gap: 40px;
  }
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.section-title {
  font-size: clamp(32px, 4vw, 44px);
}

/* Landing: hero */

.hero {
  background: radial-gradient(85% 70% at 50% 30%, var(--bg-glow), var(--bg-mid) 62%, var(--bg-deep));
}

.hero .wrap {
  padding-block: 48px 64px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 56px;
}

@media (min-width: 720px) {
  .hero .wrap {
    padding-block: 72px 88px;
  }
}

.hero-copy {
  flex: 1 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
}

.eyebrow {
  border: 1px solid var(--panel-border);
  padding: 6px 14px;
  font-size: 14px;
}

.hero h1 {
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.15;
}

.hero h1 span {
  color: var(--gold);
}

.lead {
  max-width: 34em;
  font-size: 19px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.fine-print {
  font-size: 14px;
  color: var(--muted);
}

/* Landing: the Hokm table art. Sizes are relative to the table, so it scales down on a phone. */

.hero-art {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hokm-table {
  position: relative;
  width: min(420px, 100%);
  aspect-ratio: 1;
  padding: 5%;
  border-radius: 50%;
  background: linear-gradient(var(--rail-top), var(--rail-mid) 60%, var(--rail-bottom));
  box-shadow: 0 34px 60px rgba(0, 0, 0, 0.65);
  container-type: inline-size;
}

.table-name {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  padding: 6px 18px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: var(--gold-ink);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.2;
  box-shadow: var(--card-shadow);
}

.felt {
  position: relative;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, var(--felt-center), var(--felt-mid) 60%, var(--felt-edge));
  box-shadow: inset 0 0 0 10px rgba(7, 10, 21, 0.35);
  overflow: hidden;
}

.felt::before {
  content: '';
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 2px dashed var(--stitch);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 74 / 104;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  color: var(--suit-black);
  font-weight: 800;
  line-height: 1;
}

.card-red {
  color: var(--suit-red);
}

.felt .card {
  position: absolute;
  width: 20cqw;
  font-size: 8cqw;
}

.card-north {
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
}

.card-south {
  left: 50%;
  top: 48%;
  transform: translateX(-50%) rotate(4deg);
}

.card-west {
  left: 20%;
  top: 36%;
  transform: rotate(-10deg);
}

.card-east {
  right: 20%;
  top: 36%;
  transform: rotate(9deg);
}

.table-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--plate);
  font-size: 14px;
  line-height: 1.4;
}

.table-trump {
  top: 8%;
  left: 6%;
  border: 1px solid var(--stitch);
}

.table-trump span {
  color: var(--suit-red-on-dark);
  font-size: 18px;
}

.table-score {
  bottom: 8%;
  right: 4%;
  border: 1px solid var(--panel-border);
  color: var(--gold);
  font-weight: 600;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--chip);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.chip-live {
  background: var(--gold-wash);
  border-color: var(--stitch);
  color: var(--gold);
}

.chip-live::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
}

.chip-more {
  border-style: dashed;
}

/* Landing: why Chatrang */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  border-radius: var(--radius-panel);
  background: var(--panel);
  border: 1px solid var(--panel-border);
}

.feature h3 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
}

.feature p {
  font-size: 15px;
  color: var(--muted);
}

/* Landing: games */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 20px;
}

.game {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: var(--radius-panel);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.game-hokm {
  background: linear-gradient(160deg, var(--bg-glow), var(--bg));
  border-color: var(--stitch);
}

.game-more {
  align-items: center;
  justify-content: center;
  min-height: 260px;
  gap: 12px;
  background: transparent;
  border-style: dashed;
  text-align: center;
}

.game-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  border-radius: var(--radius-button);
}

.game-hokm .game-art {
  background: radial-gradient(circle at 50% 45%, var(--felt-center), var(--felt-mid) 60%, var(--felt-edge));
}

.game-mafia .game-art {
  background: radial-gradient(circle at 50% 40%, #2a1f3d, #120d1c 70%);
}

.game-mafia .icon {
  stroke: var(--muted);
  stroke-width: 1.4;
}

.fan .card {
  width: 52px;
  margin-inline: -5px;
  border-radius: 7px;
  font-size: 20px;
}

.fan .card:first-child {
  transform: rotate(-12deg) translateY(6px);
}

.fan .card:last-child {
  transform: rotate(12deg) translateY(6px);
}

.game-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-head h3 {
  font-size: 38px;
}

.game-hokm h3 {
  color: var(--gold);
}

.game-meta {
  font-size: 14px;
  color: var(--muted);
}

.game .btn {
  align-self: flex-start;
  margin-top: auto;
  padding: 14px 24px;
  font-size: 16px;
}

.game-more h3 {
  font-size: 20px;
  font-weight: 800;
}

.game-more p {
  font-size: 15px;
  color: var(--muted);
}

.game-more a {
  padding: 12px 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

/* Landing: three steps */

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 8px;
}

.step-number {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold-wash);
  border: 1px solid var(--stitch);
  color: var(--gold);
  font-weight: 800;
  font-size: 20px;
}

.step h3 {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.6;
}

.step p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

/* Landing: download */

.download {
  background: radial-gradient(70% 120% at 50% 0%, var(--bg-glow), var(--bg-mid) 70%);
}

.download .wrap {
  align-items: center;
  gap: 20px;
  text-align: center;
}

.download .lead {
  max-width: 36em;
  font-size: 17px;
}

.tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  padding: 14px 22px;
  border-radius: var(--radius-button);
  border: 1px solid var(--line);
  background: rgba(7, 10, 21, 0.6);
  color: var(--ink);
  text-align: start;
  text-decoration: none;
}

.tile .icon {
  stroke: currentColor;
  stroke-width: 1.6;
}

.tile-label {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.tile-label small {
  font-size: 12px;
  color: var(--muted);
}

.tile-label strong {
  font-size: 18px;
}

.tile-web {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--gold-ink);
}

.tile-web .tile-label small {
  color: inherit;
}

/* Landing: contact */

.contact .wrap {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.contact-copy {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact h2 {
  font-size: clamp(30px, 3.6vw, 40px);
}

.contact p {
  color: var(--muted);
}

/* Policy pages: privacy, terms, support */

.doc-page {
  background: var(--bg);
}

.doc {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px var(--gutter) 64px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

@media (min-width: 720px) {
  .doc {
    padding-block: 56px 72px;
  }
}

.doc-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-head h1 {
  font-size: clamp(38px, 5vw, 52px);
}

.doc-head p {
  font-size: 14px;
  color: var(--muted);
}

.doc section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
}

.doc h2 {
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.5;
}

.doc ul {
  padding-inline-start: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.doc li strong,
.doc p strong {
  color: var(--ink);
}

.doc dl {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.doc dt {
  font-weight: 600;
  color: var(--gold);
}

.summary {
  padding: 22px 24px;
  border-radius: var(--radius-panel);
  background: var(--gold-wash);
  border: 1px solid var(--panel-border);
}

.doc .summary {
  color: var(--ink);
}

.doc .summary h2 {
  color: var(--gold);
  font-size: 18px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-button);
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.7;
}

.doc th,
.doc td {
  padding: 12px 16px;
  text-align: start;
}

.doc th {
  background: var(--chip);
  color: var(--ink);
  font-weight: 600;
}

.doc td {
  border-top: 1px solid var(--line-faint);
}

.doc hr {
  width: 100%;
  margin: 12px 0;
  border: none;
  border-top: 1px solid var(--line);
}

.doc .english {
  gap: 14px;
  line-height: 1.8;
}

.doc .english h2 {
  font-size: 30px;
}

.doc .english h3 {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.doc .english .updated {
  font-size: 14px;
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.faq h3 {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.6;
}
