/* Kit Cat Toe marketing site — the game's cardboard look, in CSS.
   Shared by the English and Russian landing pages. */

:root {
  --ink: #30251f;
  --paper: #fff7e6;
  --card: #f6e7c8;
  --salmon: #ff6f61;
  --blue: #58c4e5;
  --tape: #b7ea42;
  --gold: #f5c542;
  --board: #d08b4f;
  --muted: #6b5749;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgb(48 37 31 / 7%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(48 37 31 / 5%) 1px, transparent 1px),
    var(--board);
  background-size: 120px 90px, 140px 110px, auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}

.wrap {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* Cards --------------------------------------------------------------- */

.card {
  padding: clamp(20px, 4vw, 40px);
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 18px 13px 22px 11px;
  box-shadow: 10px 12px 0 var(--ink);
}

section { margin: clamp(28px, 6vw, 56px) 0; }

/* Typography ---------------------------------------------------------- */

h1, h2, h3 {
  margin: 0 0 .5em;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.6rem, 9vw, 4.6rem); letter-spacing: -0.05em; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.4rem); }
h3 { font-size: 1.12rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  margin: 0 0 10px;
  color: #a83a26;
  font-weight: 900;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.tagline {
  display: inline-block;
  margin: 4px 0 18px;
  padding: 8px 14px;
  background: var(--tape);
  border: 3px solid var(--ink);
  font-weight: 900;
  transform: rotate(-.8deg);
}

.lede { font-size: 1.15rem; }

/* Header -------------------------------------------------------------- */

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 4px;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--paper);
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.brand img {
  width: 40px;
  height: 40px;
  border: 3px solid var(--ink);
  border-radius: 10px;
}

.langs { display: flex; gap: 8px; }

.langs a {
  padding: 6px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: 8px 11px 7px 10px;
  font-weight: 900;
  font-size: .82rem;
  text-decoration: none;
  text-transform: uppercase;
}

.langs a[aria-current="true"] { background: var(--gold); }

/* Hero ---------------------------------------------------------------- */

.hero { display: grid; gap: 26px; align-items: center; }

@media (min-width: 760px) {
  .hero { grid-template-columns: 1.05fr .95fr; }
}

.hero img {
  width: 100%;
  /* The width/height attributes reserve space, but they also land as a
     presentational `height`, which stretches the art once CSS sets the width.
     `auto` hands the aspect ratio back to the attributes. */
  height: auto;
  border: 4px solid var(--ink);
  border-radius: 14px 9px 16px 8px;
  box-shadow: 8px 9px 0 var(--ink);
}

/* Buttons ------------------------------------------------------------- */

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.btn {
  min-height: 54px;
  display: inline-grid;
  place-items: center;
  padding: 12px 22px;
  color: var(--ink);
  background: var(--salmon);
  border: 3px solid var(--ink);
  border-radius: 9px 13px 8px 11px;
  box-shadow: 4px 5px 0 var(--ink);
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.btn:hover { transform: translate(1px, 1px); box-shadow: 3px 4px 0 var(--ink); }
.btn.secondary { background: var(--blue); }

/* Feature grid -------------------------------------------------------- */

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

.grid li {
  padding: 16px 18px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 10px 14px 9px 12px;
}

.grid strong { display: block; margin-bottom: 4px; text-transform: uppercase; }
.grid span { color: var(--muted); font-size: .95rem; }

/* Screenshot strip ----------------------------------------------------- */

.shots {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.shots img {
  width: 100%;
  height: auto;
  border: 3px solid var(--ink);
  border-radius: 10px 14px 9px 12px;
  box-shadow: 5px 6px 0 var(--ink);
}

/* FAQ ------------------------------------------------------------------ */

.faq { display: grid; gap: 12px; }

.faq details {
  padding: 14px 18px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 10px 14px 9px 12px;
}

.faq summary {
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.faq p { margin: 10px 0 0; }

/* Footer --------------------------------------------------------------- */

footer {
  padding: 28px 0 40px;
  color: var(--paper);
  text-align: center;
}

footer a { color: var(--paper); font-weight: 700; }

footer .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin-bottom: 10px;
}

.fineprint { color: rgb(255 247 230 / 78%); font-size: .88rem; }

/* Board diagrams ------------------------------------------------------- */

.boards {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 18px 0 4px;
}

.board figure { margin: 0; }

.board .grid3 {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  grid-template-rows: repeat(3, 52px);
  gap: 4px;
  padding: 6px;
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 8px 11px 7px 10px;
}

.board .grid3 span {
  display: grid;
  place-items: center;
  background: var(--card);
  border-radius: 4px;
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
}

.board .x { color: var(--salmon); }
.board .o { color: #2d7fa8; }
.board .mark { background: var(--tape); }

.board figcaption {
  max-width: 190px;
  margin-top: 8px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;
}

.callout {
  margin: 18px 0;
  padding: 16px 18px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-left-width: 10px;
  border-radius: 6px 12px 6px 12px;
}

.toc { margin: 0 0 4px; padding-left: 1.2em; }
.toc li { margin-bottom: 4px; }
