/* Главная страница THPoker: та же палитра, что у игры, но своя лёгкая вёрстка —
   страница для поиска должна открываться быстро и без скриптов игры. */

:root {
  --ink: #0d1317;
  --ink-2: #121c21;
  --ink-3: #18262c;
  --line: #24363d;
  --felt: #1c4a44;
  --felt-deep: #0f2f2b;
  --brass: #c9a24a;
  --brass-dim: #8d7134;
  --bone: #f1ebdd;
  --clay: #ad4a3c;
  --muted: #8a9da3;
  --text: #dfe7e6;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* Двойной тап не увеличивает страницу; прокрутка и щипок работают как обычно. */
html, body, * { touch-action: manipulation; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  margin: 0;
  background: var(--ink);
  background-image:
    radial-gradient(1000px 640px at 70% -10%, #16302c 0%, transparent 70%),
    radial-gradient(700px 500px at 0% 40%, #131f24 0%, transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3 {
  font-family: Fraunces, Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
  color: var(--bone);
}
h2 { font-size: clamp(26px, 3.4vw, 36px); }
h3 { font-size: 19px; }
p { margin: 0; }
a { color: var(--brass); }

.wrap { width: min(1120px, 100%); margin: 0 auto; padding: 0 22px; }
.wrap--narrow { width: min(800px, 100%); }
.center { text-align: center; margin-top: 36px; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap;
  color: var(--text); background: var(--ink-3); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 18px; cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, transform 80ms ease;
}
.btn:hover { background: #1f3037; border-color: #33484f; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.btn--primary { background: var(--brass); border-color: var(--brass); color: #1a1305; }
.btn--primary:hover { background: #d9b25c; border-color: #d9b25c; }
.btn--ghost { background: transparent; }
.btn--sm { padding: 7px 14px; font-size: 14px; }
.btn--lg { padding: 14px 26px; font-size: 17px; }

/* шапка */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(13, 19, 23, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__in { display: flex; align-items: center; gap: 28px; height: 60px; }
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: Fraunces, Georgia, serif; font-size: 21px; color: var(--bone); text-decoration: none;
}
.logo__mark {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-size: 16px; color: #1a1305;
  background: radial-gradient(circle at 35% 30%, #f0d68f, var(--brass) 60%, #8d7134);
}
.logo--sm { font-size: 18px; }
.logo--sm .logo__mark { width: 26px; height: 26px; font-size: 14px; }
.nav__links { display: flex; gap: 22px; margin-left: auto; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav__links a:hover { color: var(--text); }
.nav__burger { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* первый экран */
.hero { padding: 72px 0 84px; }
.hero__in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass);
  margin-bottom: 16px;
}
.hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 300; }
.lede { color: #b8c8c6; font-size: 18px; margin-top: 20px; max-width: 54ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.hero__facts {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; color: var(--muted);
}
.hero__facts b { color: var(--bone); font-weight: 600; }
.hero__facts li::before { content: '♦'; color: var(--brass-dim); margin-right: 8px; font-size: 11px; }
#live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4f9d6a; margin-right: 8px; vertical-align: 1px; }

/* стол на первом экране */
.table { position: relative; }
.table__felt {
  position: relative; aspect-ratio: 1.45; border-radius: 48% / 48%;
  background: radial-gradient(120% 100% at 50% 38%, var(--felt) 0%, var(--felt-deep) 76%);
  border: 12px solid #241a11;
  box-shadow: 0 0 0 2px var(--brass-dim), inset 0 0 90px rgba(0, 0, 0, 0.55), 0 40px 80px rgba(0, 0, 0, 0.45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
}
.table__pot { display: flex; align-items: center; gap: 4px; color: #cfe0d6; font-size: 13px; }
.table__pot span { margin-left: 8px; letter-spacing: 0.04em; }
.chip {
  width: 20px; height: 20px; border-radius: 50%;
  background:
    radial-gradient(circle, var(--face) 0 38%, transparent 39%),
    repeating-conic-gradient(var(--edge) 0 18deg, var(--face) 18deg 36deg);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.5);
}
.chip--gold { --face: #c9a24a; --edge: #7d6127; }
.chip--red { --face: #b23b32; --edge: #7a251f; }
.chip--green { --face: #2f7d54; --edge: #1b4c33; }
.table__board, .table__hand { display: flex; gap: 8px; }
.table__hand { margin-top: 6px; }
.table__label {
  font-family: Fraunces, Georgia, serif; font-size: 16px; color: var(--bone);
  background: rgba(9, 16, 19, 0.88); border: 1px solid var(--brass-dim); border-radius: 999px; padding: 4px 16px;
}
.card {
  --suit: #222b33;
  width: clamp(38px, 5.2vw, 56px); aspect-ratio: 0.7; border-radius: 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  font-weight: 700; font-size: clamp(16px, 2.2vw, 24px); color: var(--suit);
  background: linear-gradient(158deg, #fdfbf5 0%, #f3ede1 62%, #e9e1d1 100%);
  box-shadow: inset 0 0 0 1px rgba(20, 26, 32, 0.16), 0 6px 14px rgba(0, 0, 0, 0.45);
}
.card i { font-style: normal; font-size: 0.75em; margin-top: 2px; }
.card--s { --suit: #222b33; }
.card--h { --suit: #b0392c; }
.card--d { --suit: #1c6b9f; }
.card--c { --suit: #1e7a4c; }
.card--lift { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--brass), 0 0 22px rgba(201, 162, 74, 0.45); }
.table__board .card:nth-child(-n+3) { box-shadow: 0 0 0 2px var(--brass), 0 0 22px rgba(201, 162, 74, 0.45); }

/* разделы */
.section { padding: 84px 0; }
.section--alt { background: linear-gradient(180deg, rgba(18, 28, 33, 0.7), rgba(18, 28, 33, 0.25)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { margin-bottom: 12px; }
.section__lede { color: var(--muted); margin-bottom: 34px; max-width: 64ch; }
.section > .wrap > h2 + .grid, .section > .wrap > h2 + .steps { margin-top: 30px; }

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

.card-box {
  padding: 24px; border-radius: var(--radius);
  background: var(--ink-2); border: 1px solid var(--line);
}
.card-box__icon {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-size: 19px; color: var(--brass); border: 1px solid var(--brass-dim); margin-bottom: 16px;
}
.card-box h3 { margin-bottom: 8px; }
.card-box p, .feature p { color: #b0c0c0; font-size: 15px; }

.features { gap: 34px 40px; }
.feature { padding-left: 18px; border-left: 2px solid var(--brass-dim); }
.feature h3 { margin-bottom: 8px; }

/* шаги */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.steps li {
  counter-increment: step; position: relative;
  padding: 26px 24px 24px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line);
}
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 14px;
  font-family: Fraunces, Georgia, serif; font-size: 18px; color: #1a1305; background: var(--brass);
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: #b0c0c0; font-size: 15px; }

/* правила и комбинации */
.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.rules__text p { color: #b8c8c6; margin-top: 14px; }
.rules__table h3 { margin-bottom: 14px; }
.combos { list-style: none; margin: 0; padding: 0; counter-reset: combo; }
.combos li {
  counter-increment: combo;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.combos b { font-weight: 500; color: var(--bone); }
.combos b::before { content: counter(combo) '.'; display: inline-block; width: 28px; color: var(--muted); font-weight: 400; }
.hand { display: flex; gap: 3px; flex: 0 0 auto; }
.m {
  min-width: 30px; padding: 2px 4px; border-radius: 4px; text-align: center;
  font-style: normal; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--suit);
  background: linear-gradient(160deg, #fdfbf5, #ece5d7);
  box-shadow: inset 0 0 0 1px rgba(20, 26, 32, 0.2);
}
.m--s { --suit: #222b33; }
.m--h { --suit: #b0392c; }
.m--d { --suit: #1c6b9f; }
.m--c { --suit: #1e7a4c; }

/* вопросы */
.faq { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.faq details {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2);
  padding: 0 20px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-weight: 600; color: var(--bone); display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brass); font-size: 20px; line-height: 1; transition: transform 160ms ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; border-radius: 4px; }
.faq details p { color: #b8c8c6; padding-bottom: 18px; }

/* призыв в конце */
.final { padding: 84px 0 96px; }
.final__in {
  text-align: center; padding: 56px 22px; border-radius: 24px;
  background: radial-gradient(120% 140% at 50% 0%, var(--felt) 0%, var(--felt-deep) 70%);
  border: 1px solid var(--brass-dim);
}
.final p { color: #c3d4cd; margin: 12px 0 26px; font-size: 17px; }

.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.footer__in { display: flex; align-items: center; gap: 24px; }
.footer p { color: var(--muted); font-size: 13px; max-width: 70ch; }
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: auto; font-size: 13px; }
.footer__links a { color: var(--muted); text-decoration: none; }
.footer__links a:hover { color: var(--text); }

/* статьи */
.crumbs { font-size: 13px; color: var(--muted); margin: 28px 0 18px; }
.crumbs a, .article .crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 6px; opacity: 0.6; }
.article { width: min(760px, 100%); margin: 0 auto; padding: 0 22px 40px; }
.article h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 300; margin-bottom: 14px; }
.article__meta { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.article__lede { font-size: 19px; color: #c3d4cd; margin-bottom: 26px; }
.article h2 { font-size: clamp(23px, 3vw, 29px); margin: 40px 0 14px; }
.article h3 { margin: 26px 0 10px; }
.article p { margin: 0 0 16px; color: #c9d6d4; }
.article ul, .article ol { margin: 0 0 18px; padding-left: 22px; color: #c9d6d4; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--bone); font-weight: 600; }
.article a { color: var(--brass); }
/* Кнопки внутри статьи — со своими цветами: общее правило для ссылок их перекрашивало. */
.article a.btn { color: var(--text); text-decoration: none; }
.article a.btn--primary { color: #1a1305; }
.article table { width: 100%; border-collapse: collapse; margin: 6px 0 22px; font-size: 15px; }
.article th { text-align: left; font-weight: 600; color: var(--bone); padding: 9px 10px; border-bottom: 1px solid var(--brass-dim); }
.article td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: #c9d6d4; vertical-align: top; }
.article .hand { display: inline-flex; vertical-align: middle; }
.toc { margin: 0 0 30px; padding: 16px 20px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); }
.toc b { display: block; color: var(--bone); margin-bottom: 8px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--brass); }
.note {
  margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius);
  background: rgba(201, 162, 74, 0.08); border-left: 3px solid var(--brass); color: var(--text);
}
.note p:last-child { margin-bottom: 0; }
.article-cta {
  margin: 40px 0 10px; padding: 28px; border-radius: 18px; text-align: center;
  background: radial-gradient(120% 140% at 50% 0%, var(--felt) 0%, var(--felt-deep) 70%); border: 1px solid var(--brass-dim);
}
.article-cta h2 { margin: 0 0 8px; }
.article-cta p { color: #c3d4cd; margin-bottom: 18px; }
.related { margin-top: 36px; }
.related h2 { font-size: 22px; margin: 0 0 12px; }
.related ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.related a { display: block; padding: 12px 16px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; color: var(--bone); }
.related a:hover { border-color: var(--brass-dim); }
.articles-list { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.articles-list a {
  display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px; border-radius: var(--radius);
  background: var(--ink-2); border: 1px solid var(--line); text-decoration: none; transition: border-color 140ms ease;
}
.articles-list a:hover { border-color: var(--brass-dim); }
.articles-list b { font-family: Fraunces, Georgia, serif; font-weight: 500; font-size: 21px; color: var(--bone); line-height: 1.2; }
.articles-list span { color: #b0c0c0; font-size: 15px; }

/* публичный профиль игрока */
.pp { padding-top: 40px; padding-bottom: 20px; }
.pp-head { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.pp-head h1 { font-size: clamp(30px, 5vw, 44px); }
.pp-avatar {
  flex: 0 0 auto; width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center;
  font-family: Fraunces, Georgia, serif; font-size: 36px; color: #1a1305;
  background: radial-gradient(circle at 35% 30%, #f0d68f, var(--brass) 60%, #8d7134);
  overflow: hidden;
}
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-sub { color: var(--muted); margin-top: 6px; }
.pp-league {
  --lg: #b07a4b; --lg-hi: #e0ad7d;
  display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 3px;
  background: linear-gradient(135deg, var(--lg-hi), var(--lg)); transform: rotate(45deg); vertical-align: 0;
}
.pp-league--silver { --lg: #9aa6aa; --lg-hi: #e4ecee; }
.pp-league--gold { --lg: #c9a24a; --lg-hi: #f0d68f; }
.pp-league--platinum { --lg: #7fb7c9; --lg-hi: #e3f6fb; }
.pp-league--diamond { --lg: #6f7fe8; --lg-hi: #c7f0ff; }
.pp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pp-stat { padding: 16px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.pp-stat b { font-size: 24px; color: var(--bone); font-weight: 600; font-variant-numeric: tabular-nums; }
.pp-stat span { font-size: 13px; color: var(--muted); }
.pp-stat--wide { grid-column: span 2; }
.pp-stat .hand { margin-top: 8px; }
.pp-seasons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pp-season { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.pp-block { margin-top: 40px; }
.pp-block h2 { margin-bottom: 16px; }
.pp-ach { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pp-ach__item { --medal: #b07a4b; --medal-hi: #e0ad7d; display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--medal); }
.pp-ach__item.tier-2 { --medal: #9aa6aa; --medal-hi: #e4ecee; }
.pp-ach__item.tier-3 { --medal: #c9a24a; --medal-hi: #f0d68f; }
.pp-ach__item.tier-4 { --medal: #7fb7c9; --medal-hi: #e3f6fb; }
.pp-ach__icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #1a1305; background: radial-gradient(circle at 35% 30%, var(--medal-hi), var(--medal) 70%); }
.pp-ach__item b { color: var(--bone); font-weight: 600; }
.pp-ach__item small { display: block; font-size: 12px; color: var(--muted); }
.pp-empty { color: var(--muted); }
.pp .final { padding: 56px 0 40px; }

/* адаптив */
@media (max-width: 960px) {
  .hero__in, .rules { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding-top: 48px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3, .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  /* Ссылки шапки — в выпадающем меню под бургером. */
  .nav__in { justify-content: space-between; gap: 12px; }
  .nav__in > .btn { margin-left: auto; }
  .nav__links {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 16px 14px;
    background: var(--ink); border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  }
  .nav.is-open .nav__links { display: flex; animation: menuIn 160ms ease-out both; }
  .nav__links a { padding: 12px 4px; font-size: 17px; color: var(--text); border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 10px; flex: 0 0 auto; cursor: pointer;
    background: transparent; border: 1px solid var(--line); border-radius: 10px;
  }
  .nav__burger span { display: block; height: 2px; border-radius: 1px; background: var(--bone); transition: transform 160ms ease, opacity 160ms ease; }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav__burger:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
  .hero { padding: 36px 0 56px; }
  .lede { font-size: 16px; }
  .hero__cta .btn { flex: 1; }
  .table__felt { border-width: 8px; }
  .grid--4, .grid--3, .steps { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .combos li { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pp-stats { grid-template-columns: 1fr 1fr; }
  .article { padding: 0 16px 30px; }
  .articles-list { grid-template-columns: 1fr; }
  .article table { font-size: 13px; }
  .article th, .article td { padding: 7px 6px; }
  .pp-head { gap: 14px; }
  .pp-avatar { width: 60px; height: 60px; font-size: 28px; }
  .final__in { padding: 40px 18px; }
  .footer__in { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq summary::after { transition: none; }
  .nav.is-open .nav__links { animation: none; }
  .nav__burger span { transition: none; }
}
