@font-face {
  font-family: "Soyuz Grotesk";
  src: url("fonts/Soyuz Grotesk Bold.woff") format("woff"),
       url("fonts/Soyuz Grotesk Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/Manrope-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --palatinate: #930541;
  --amaranth: #a9224f;
  --orange: #fa4616;
  --cream: #fbeedd;
  --cream-2: #f4e2c9;
  --black: #0d0708;
  --white: #ffffff;
  --ink: #2a1114;
  --muted: rgba(43, 17, 20, 0.6);
  --line: rgba(43, 17, 20, 0.12);
  --line-light: rgba(255, 255, 255, 0.22);
  --radius: 18px;
  --shadow: 0 20px 60px rgba(84, 6, 33, 0.28);
  --grad: linear-gradient(120deg, var(--palatinate) 0%, var(--amaranth) 42%, var(--orange) 100%);
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* иначе мобильный Chrome сам «раздувает» шрифты и ломает вёрстку карточки */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background-color: var(--cream);
  background-image: url("assets/pattern-faint.png");
  background-size: 480px auto;
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

h1, h2, .display { font-family: "Soyuz Grotesk", "Manrope", sans-serif; font-weight: 700; }
a { color: inherit; text-decoration: none; }

/* ЛОГО */
.logo-word {
  font-family: "Soyuz Grotesk", sans-serif;
  text-transform: lowercase;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
}
.logo-orange { color: var(--orange); -webkit-text-fill-color: var(--orange); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 26px; }
.brand-barrel, .hero-barrel, .hint-barrel { object-fit: contain; display: inline-block; vertical-align: middle; }
.brand-barrel { width: 30px; height: 30px; flex: none; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 238, 221, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-links { display: flex; align-items: center; gap: 24px; font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; flex-wrap: wrap; }
.nav-links a { color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--amaranth); }
.nav-cta { color: #fff !important; background: var(--grad); padding: 9px 20px; border-radius: 999px; }
.nav-cta:hover { color: #fff !important; opacity: 0.92; }

/* HERO */
.hero {
  position: relative;
  min-height: 94vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 20px 70px;
  background: var(--grad);
  overflow: hidden;
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.4px, transparent 1.6px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 900px; }
.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 9px 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--white);
  margin-bottom: 26px;
}
.hero-title {
  font-family: "Soyuz Grotesk", sans-serif;
  text-transform: lowercase;
  color: var(--white);
  font-size: clamp(56px, 13vw, 150px);
  line-height: 0.9;
  margin: 0;
  letter-spacing: -1px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ht-loto { display: inline-flex; align-items: center; gap: 0.18em; }
.hero-barrel { width: 0.82em; height: 0.82em; }
.hero-sign {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--white);
  font-size: clamp(13px, 2vw, 16px);
  line-height: 1.2;
  margin: 12px 0 24px;
  opacity: 0.92;
}
.hero-sub { font-size: clamp(16px, 2.4vw, 20px); color: rgba(255, 255, 255, 0.92); margin: 0 auto 34px; max-width: 560px; font-weight: 500; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 44px; justify-content: center; margin-top: 46px; }
.stat b { display: block; font-family: "Soyuz Grotesk", sans-serif; font-size: 42px; color: var(--white); line-height: 1; }
.stat span { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); font-weight: 700; }

.side-word {
  position: absolute;
  top: 50%;
  font-family: "Soyuz Grotesk", sans-serif;
  text-transform: lowercase;
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: 2px;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  z-index: 1;
  pointer-events: none;
}
.side-left { left: 0; transform: translateX(-42%) translateY(-50%) rotate(-90deg); }
.side-right { right: 0; transform: translateX(42%) translateY(-50%) rotate(90deg); }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--white); color: var(--amaranth); }
.btn-primary:hover { background: var(--black); color: var(--white); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(169, 34, 79, 0.3); }
.btn-solid:hover { opacity: 0.94; }

/* SECTIONS */
.section { max-width: 1160px; margin: 0 auto; padding: 92px 22px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(34px, 6vw, 60px); margin: 0 0 12px; color: var(--palatinate); text-transform: lowercase; }
.section-head p { color: var(--muted); max-width: 580px; margin: 0 auto; font-size: 17px; }

/* RULES */
.rules { padding-top: 46px; }
.rules-head { display: flex; justify-content: center; margin-bottom: 46px; }
.pill {
  background: var(--black);
  color: var(--white);
  font-family: "Soyuz Grotesk", sans-serif;
  font-size: clamp(22px, 5vw, 38px);
  padding: 12px 42px;
  border-radius: 999px;
  letter-spacing: 4px;
  text-transform: uppercase;
}
.rules-intro {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--ink);
}
.rules-steps {
  list-style: none;
  margin: 0 0 56px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.rules-steps li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 10px 30px rgba(84, 6, 33, 0.06);
}
.rules-steps span {
  display: block;
  font-family: "Soyuz Grotesk", sans-serif;
  font-size: 34px;
  line-height: 1;
  color: var(--orange);
  margin-bottom: 10px;
}

.rounds-title {
  font-family: "Soyuz Grotesk", sans-serif;
  font-size: clamp(24px, 4vw, 38px);
  text-transform: lowercase;
  color: var(--palatinate);
  text-align: center;
  margin: 0 0 24px;
}
.rounds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.round {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px 26px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(84, 6, 33, 0.08);
}
.round-label {
  font-family: "Soyuz Grotesk", sans-serif;
  color: var(--amaranth);
  font-size: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.round-svg { width: 100%; max-width: 150px; height: auto; margin-bottom: 14px; }
.round-svg .dot { fill: rgba(169, 34, 79, 0.22); }
.round-svg .dot.on { fill: var(--orange); }
.round-svg .win { stroke: var(--orange); stroke-width: 4; stroke-linecap: round; }
.round p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }
.round p b { color: var(--ink); }
.round-final { background: var(--black); border-color: transparent; }
.round-final .round-label { color: var(--orange); }
.round-final p { color: rgba(255, 255, 255, 0.72); }
.round-final p b { color: #fff; }
.round-final .round-svg .dot { fill: rgba(255, 255, 255, 0.25); }
.round-final .round-svg .dot.on { fill: var(--orange); }

/* PLAY */
.play { position: relative; }
.play-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 34px;
}
.ctrl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); align-items: center; }
.play-controls .btn { padding: 13px 22px; }
.play-controls .btn-ghost { border-color: var(--amaranth); color: var(--amaranth); }
.play-controls .btn-ghost:hover { background: var(--amaranth); color: #fff; }
/* ВВОД НОМЕРА КАРТОЧКИ */
.card-input {
  width: 100px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: "Soyuz Grotesk", sans-serif;
  font-size: 18px;
  text-align: center;
}
.card-input:focus { outline: 2px solid var(--amaranth); outline-offset: 1px; }

/* ПРОГРЕСС-ЧИПЫ */
.progress {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.progress-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}
.progress-item b { font-family: "Soyuz Grotesk", sans-serif; color: inherit; }
.progress-item.on {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(169, 34, 79, 0.28);
}

/* ВСПЛЫВАЮЩАЯ ПОДСКАЗКА */
.hint {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 30px);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: min(440px, 92vw);
  padding: 18px 24px 18px 18px;
  border-radius: 18px;
  background: var(--black);
  color: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.hint.show { opacity: 1; transform: translate(-50%, 0); }
.hint::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 2px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.hint-barrel { width: 46px; height: 46px; flex: none; }
.hint-round {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--orange);
}
.hint-title { font-family: "Soyuz Grotesk", sans-serif; font-size: 20px; line-height: 1.1; margin: 2px 0 3px; }
.hint-text { font-size: 13px; color: rgba(255, 255, 255, 0.78); line-height: 1.35; }

.card-stage { display: flex; justify-content: center; }
.card-frame {
  background: var(--grad);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow);
  width: min(720px, 100%);
}
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 2px 4px; }
.card-brand { display: inline-flex; align-items: center; gap: 8px; font-size: clamp(20px, 3.4vw, 30px); }
.card-brand .logo-word { background: none; -webkit-text-fill-color: #fff; color: #fff; }
.card-brand .logo-orange { -webkit-text-fill-color: #ffd9c7; color: #ffd9c7; }
.card-brand .brand-barrel { width: 1em; height: 1em; }
.card-no { color: var(--white); font-family: "Soyuz Grotesk", sans-serif; font-size: clamp(20px, 3.4vw, 30px); }

.board { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; container-type: inline-size; }
.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  font-size: clamp(6.5px, 1.15vw, 10px);
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  overflow: hidden;
  overflow-wrap: anywhere;
  hyphens: auto;
  transition: transform 0.1s ease, background 0.2s;
  user-select: none;
  touch-action: manipulation;
}
/* Размер подписи считаем от ширины самой карточки, а не окна:
   так текст читаем и на телефоне, и на большом экране. */
@supports (container-type: inline-size) {
  .cell { font-size: clamp(7px, 2.5cqw, 11px); }
}
.cell:hover { transform: scale(1.04); z-index: 2; }
.cell:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; z-index: 2; }
.cell.marked { background: var(--black); color: rgba(255, 255, 255, 0.38); }
.cell.marked::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top right, transparent calc(50% - 1.5px), var(--orange) 50%, transparent calc(50% + 1.5px)),
    linear-gradient(to bottom right, transparent calc(50% - 1.5px), var(--orange) 50%, transparent calc(50% + 1.5px));
}

/* FOOTER */
.footer { border-top: 1px solid var(--line); text-align: center; padding: 44px 20px; }
.footer .brand { font-size: 30px; justify-content: center; }
.footer p { color: var(--muted); letter-spacing: 2px; text-transform: uppercase; font-size: 13px; font-weight: 700; margin: 12px 0 0; }
.footer-sign { font-family: "Manrope", sans-serif; color: var(--amaranth) !important; margin-top: 8px !important; }

/* ПЛАНШЕТЫ И ТЕЛЕФОНЫ */
@media (max-width: 1024px) {
  .section { padding: 74px 18px; }
}
@media (max-width: 860px) {
  .rounds { grid-template-columns: repeat(2, 1fr); }
  .rules-steps { grid-template-columns: 1fr; gap: 12px; margin-bottom: 42px; }
  .rules-steps li { padding: 18px; }
  .rules-steps span { font-size: 26px; margin-bottom: 6px; }
  .side-word { display: none; }
  .nav-links { gap: 14px; font-size: 13px; }
  .hero { min-height: auto; padding: 74px 18px 58px; }
  .hero-stats { gap: 30px; margin-top: 34px; }
  .card-frame { padding: 16px; }
}
@media (max-width: 640px) {
  body { background-attachment: scroll; } /* fixed заметно тормозит скролл в iOS */
  .section { padding: 52px 12px; }
  .section-head { margin-bottom: 26px; }
  .section-head p { font-size: 15px; }
  .rounds { grid-template-columns: 1fr; gap: 12px; }
  .round { padding: 18px 16px 20px; }
  .round-svg { max-width: 104px; }
  .rules { padding-top: 34px; }
  .rules-head { margin-bottom: 26px; }
  .rules-intro { margin-bottom: 28px; font-size: 16px; }
  .rounds-title { font-size: clamp(21px, 7vw, 30px); }
  /* Заголовок не должен распирать контейнер: иначе всё остальное уезжает за экран */
  .hero { padding: 62px 14px 48px; }
  .hero-title { font-size: clamp(30px, 11vw, 72px); line-height: 0.94; max-width: 100%; }
  .badge { font-size: 11px; letter-spacing: 1.4px; padding: 8px 14px; margin-bottom: 20px; }
  .hero-sign { font-size: 12px; letter-spacing: 1.6px; margin: 10px 0 18px; }
  .hero-sub { font-size: 15px; margin-bottom: 26px; }
  .hero-stats { gap: 22px; margin-top: 28px; }
  .stat b { font-size: 32px; }
  .stat span { font-size: 11px; letter-spacing: 1px; }
  .hero-cta { gap: 10px; }
  .hero-cta .btn { flex: 1 1 100%; padding: 14px 22px; }

  .nav-inner { padding: 10px 12px; }
  .nav-links { gap: 10px; font-size: 12px; }
  .nav-cta { padding: 8px 14px; }
  .brand { font-size: 21px; }
  .brand-barrel { width: 24px; height: 24px; }
  .pill { font-size: clamp(18px, 6vw, 28px); padding: 10px 26px; letter-spacing: 2px; }
  .rules-steps li { font-size: 15px; }

  .play-controls { gap: 10px; margin-bottom: 24px; }
  .play-controls .btn-solid { flex: 1 1 100%; }
  .play-controls .ctrl, .play-controls .btn-ghost { flex: 1 1 auto; }
  .card-input { width: 100%; }

  .progress { gap: 8px; margin-bottom: 20px; }
  .progress-item { padding: 7px 13px; font-size: 12px; letter-spacing: 0; }

  .card-frame { padding: 10px; border-radius: 16px; }
  .card-top { margin-bottom: 10px; }
  .board { gap: 4px; }
  .cell { border-width: 1px; border-radius: 7px; padding: 2px; }

  .hint { left: 10px; right: 10px; bottom: 12px; max-width: none; transform: translateY(24px); padding: 14px 16px; gap: 12px; }
  .hint.show { transform: translateY(0); }
  .hint-barrel { width: 38px; height: 38px; }
  .footer { padding: 34px 16px; }
}
