/* Главная страница 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 { 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); }

/* первый экран */
.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; }

/* адаптив */
@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__links { display: none; }
  .nav__in { justify-content: space-between; }
  .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; }
  .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; }
}
