/*
 * The front page, and only the front page.
 *
 * home.css is the shared skin of nineteen root pages -- the axis pages, the
 * year pages, the archive -- and stays exactly as it was. This file is
 * loaded after it by index.html alone, and every rule in it is scoped under
 * body.front, so nothing here can reach a page that did not ask for it.
 *
 * The idea is the one the front page already argued in prose: "the two
 * columns are quantities of different kinds ... this site is both columns."
 * Here the columns are the layout. The first screen is a table seen from
 * above: the human side on the left in the red of the price-of-a-move bars,
 * the machine side on the right in their blue, the shared score as the two
 * big numbers, and the old site's green as the net down the middle. The
 * colours are not new -- they are the two bar colours home.css already
 * uses, so the chart further down reads as the same two sides.
 *
 * What is kept on purpose: the yellow card and the terminal swatch on the
 * two doors (the colour still says where you are about to land), the
 * archive's yellow, and every number in the catalogue's mono stack except
 * the two score figures, which are set as display type.
 */

body.front #page { max-width: none; padding: 0; }
body.front .wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* The palette, the two typefaces and the pieces shared with the games
   catalogue (top navigation, rope) are in sides.css, loaded first. */

/* ---------- the table, seen from above ---------- */

body.front #court {
  display: grid;
  grid-template-columns: 1fr 14px 1fr;
  background: linear-gradient(90deg, var(--h-bg) 50%, var(--m-bg) 50%);
}
body.front #courtHead {
  grid-column: 1 / -1;
  padding: 16px clamp(18px, 4vw, 56px) 0;
  text-align: center;
}

body.front #siteTitle {
  font-family: var(--display);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 700;
  color: var(--ink);
  text-shadow: none;
  margin: 0;
}
body.front #siteSub {
  max-width: 62ch;
  margin: 8px auto 0;
  font-size: 16px;
  color: var(--ink-soft);
}

body.front .side {
  display: flex;
  flex-direction: column;
  padding: 34px clamp(18px, 4vw, 56px) 46px;
}
body.front .side.m { align-items: flex-end; text-align: right; }
body.front .net {
  background: repeating-linear-gradient(var(--net) 0 10px, transparent 10px 14px);
  margin: 26px 0 0 0;
}

body.front .who {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2.6vw, 30px);
}
body.front .side.h .who { color: var(--h); }
body.front .side.m .who { color: var(--m); }

body.front .score {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(110px, 19vw, 280px);
  line-height: .84;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  margin: 6px 0 16px 0;
  text-decoration: none;
}
body.front .side.h .score { color: var(--h); }
body.front .side.m .score { color: var(--m); }
body.front .score:hover { text-decoration: underline; text-decoration-thickness: 4px; }

body.front .spec { max-width: 36ch; margin: 0; font-size: 16px; line-height: 1.5; }

body.front .act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
body.front .side.m .act { justify-content: flex-end; }
body.front .btn {
  display: inline-block;
  padding: 12px 22px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
body.front .side.h .btn { color: var(--h-ink); }
body.front .side.m .btn { color: var(--m-ink); }
body.front .side.h .btn.fill { background: var(--h); border-color: var(--h); color: #fff; }
body.front .side.m .btn.fill { background: var(--m-ink); border-color: var(--m-ink); color: #fff; }
body.front .btn:hover { filter: brightness(.92); }

body.front #scoreNote {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0 20px 22px;
  font-size: 14px;
  color: var(--ink-soft);
}
body.front #scoreNote a { color: inherit; }

/* ---------- section heads, now on white rather than on green ---------- */

body.front .sectionTitle {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  text-shadow: none;
  margin: 56px 0 4px 0;
}
body.front .sectionSub {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 18px 0;
  max-width: 70ch;
}

/* ---------- today: one card per side ---------- */

body.front .pair { gap: 14px; }
body.front .today {
  display: block;
  padding: 18px 20px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
}
body.front .today.h { background: var(--h-bg); }
body.front .today.m { background: var(--m-bg); }
body.front .today:hover { border-color: var(--ink); }
/* .kick is the year pages' small-caps mono line in home.css; here it is a
   plain label in the side's colour */
body.front .today .kick {
  font-family: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 4px 0;
}
body.front .today.h .kick { color: var(--h-ink); }
body.front .today.m .kick { color: var(--m-ink); }
body.front .today .ttl { font-family: var(--display); font-size: 24px; font-weight: 500; margin: 0 0 6px 0; }
body.front .today .txt { font-size: 15px; line-height: 1.5; }
body.front .today .txt + .txt { margin-top: 6px; }
body.front .today .soft { color: var(--ink-soft); }

body.front #frontierCard {
  margin: 14px 0 0 0;
  padding: 0;
  background: none;
  border: none;
  font-size: 15px;
}
body.front #frontierCard a { color: var(--h-ink); }

/* ---------- the games on the table ---------- */

body.front #table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}
body.front .game {
  display: block;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
body.front .game:hover { border-color: var(--ink); }
body.front .game .gn { font-size: 18px; font-weight: 700; }
body.front .game .gd { margin: 2px 0 12px 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); min-height: 2.9em; }

body.front #tableMore { margin: 16px 0 0 0; font-size: 16px; }
body.front #tableMore a { color: var(--ink); font-weight: 700; }

/* ---------- the price of a move: the argument beside its chart ---------- */

body.front #priceGrid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 36px;
  align-items: start;
}
body.front #priceGrid .prose p { margin: 0 0 14px 0; font-size: 17px; line-height: 1.6; max-width: 62ch; }
body.front #priceGrid .prose .src { font-size: 12px; color: var(--ink-soft); }
body.front .sheet {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  background: #fff;
}
body.front .sheet .src { font-size: 12px; color: var(--ink-soft); }
body.front .sheet a, body.front .prose a { color: var(--m-ink); }
body.front .barRow { font-size: 14px; }
body.front .barRow .lab a { color: var(--ink); }

body.front #axes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: none;
  border: none;
  padding: 0;
}
body.front #axes p {
  margin: 0;
  padding: 16px 18px;
  border-top: 3px solid var(--m);
  background: #f6f8fc;
  font-size: 15px;
  line-height: 1.5;
}
body.front #axes a { color: var(--m-ink); }

/* ---------- the doors keep their own palettes ---------- */

body.front .door { border-radius: 10px; }
body.front .door .name { font-family: var(--display); font-weight: 500; font-size: 26px; }
body.front .door.games .name { font-family: var(--display); }

/* ---------- years, archive, footer ---------- */

body.front #years a { border-radius: 6px; }
body.front .legacy {
  background: var(--card);
  border: 1px solid var(--edge);
  padding: 18px 20px;
}
body.front .legacy p { margin: 0 0 10px 0; line-height: 1.55; }
body.front .legacy p:last-child { margin: 0; }
body.front .legacy a { color: var(--link); }

body.front #footer {
  margin-top: 56px;
  padding: 18px 0 40px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
body.front #footer a { color: var(--ink); }

/* ---------- narrow screens ---------- */

@media (max-width: 760px) {
  body.front #court { grid-template-columns: 1fr; background: var(--h-bg); }
  body.front #courtHead { text-align: left; }
  /* the brand would sit right above the same words in the heading */
  body.front #topnav .brand { display: none; }
  body.front #siteTitle, body.front #siteSub { text-align: left; margin-left: 0; }
  body.front .net {
    margin: 0;
    height: 12px;
    background: repeating-linear-gradient(90deg, var(--net) 0 10px, #fff 10px 14px);
  }
  body.front .side { padding-top: 22px; padding-bottom: 30px; }
  body.front .side.m { background: var(--m-bg); align-items: flex-start; text-align: left; }
  body.front .side.m .act { justify-content: flex-start; }
  body.front #scoreNote { background: var(--m-bg); text-align: left; padding: 0 18px 22px; }
  body.front .score { font-size: 118px; }
  body.front #priceGrid { grid-template-columns: 1fr; gap: 18px; }
  body.front #axes { grid-template-columns: 1fr; }
  body.front .sectionTitle { font-size: 26px; margin-top: 44px; }
}

