/* ============ Токены ============ */
:root {
  --bg: #f8f5f0;
  --fg: #1a1a1a;
  --fg-muted: #555;
  --fg-subtle: #777;
  --accent: #c1e100;
  --btn-bg: #222;
  --btn-fg: #fff;
  --card-bg: #fff;
  --radius-card: 16px;
  --radius-btn: 10px;
  --radius-tile: 8px;
  --tile-green: #538d4e;
  --tile-yellow: #b59f3b;
  --tile-border: #d3d6da;
  --shadow-card: 0 2px 10px rgba(26, 26, 26, 0.06);
  --font-sans: "Inter", system-ui, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============ Тайлы ============ */
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  border-radius: var(--radius-tile);
  box-shadow: var(--shadow-card);
}
.tile-yellow { background: var(--tile-yellow); }
.tile-green { background: var(--tile-green); }
.tile-black { color: var(--fg); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}
.brand .tile-gap { width: 6px; }

@media (max-width: 600px) {
  .tile { width: 30px; height: 30px; font-size: 15px; }
}

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 30px; font-size: 18px; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: #000; }
.btn-secondary { background: var(--card-bg); color: var(--fg); border-color: var(--tile-border); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-max-icon {
  height: 24px;
  width: auto;
  flex-shrink: 0;
  margin-right: 10px;
}

/* ============ Шапка ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(248, 245, 240, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(26, 26, 26, 0.06);
}

/* ============ Hero ============ */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px 88px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.accent {
  background: var(--accent);
  color: var(--fg);
  padding: 0 0.12em;
  border-radius: 6px;
  white-space: nowrap;
}

.hero-sub {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.hero-meta {
  margin-top: 18px;
  color: var(--fg-subtle);
  font-size: 14px;
}

/* Поле 5×6 */
.hero-board {
  --btile: 52px;
  display: grid;
  gap: 6px;
  justify-content: center;
}
.board-row {
  display: grid;
  grid-template-columns: repeat(5, var(--btile));
  gap: 6px;
}
.btile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--btile);
  height: var(--btile);
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  border-radius: var(--radius-tile);
  animation: flipIn 0.4s both;
}
.btile.correct { background: var(--tile-green); }
.btile.present { background: var(--tile-yellow); }
.btile.empty {
  background: var(--card-bg);
  border: 2px solid var(--tile-border);
  color: var(--fg);
  box-shadow: none;
}
@keyframes flipIn {
  from { transform: rotateX(90deg); opacity: 0; }
  to { transform: rotateX(0deg); opacity: 1; }
}

/* ============ Секции ============ */
.howto,
.channel {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
section h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
}
.card-num {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--fg-subtle);
}
.card h3 { margin-top: 10px; font-size: 18px; font-weight: 600; }

/* Канал */
.channel { text-align: center; }
.channel p {
  color: var(--fg-muted);
  max-width: 52ch;
  margin: 0 auto 26px;
}

/* ============ Футер ============ */
.footer {
  text-align: center;
  padding: 30px 24px;
  color: var(--fg-subtle);
  font-size: 14px;
  border-top: 1px solid rgba(26, 26, 26, 0.06);
}

/* ============ Адаптив ============ */
@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 40px 20px 64px;
  }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero-board { --btile: 42px; }
}
