/* Macedon Interactive — one stylesheet for every page.
   The world: a coach's board at night. Black ground, white chalk, gold pieces.
   Three inks only: ink, paper, gold. Paper is dimmed with alpha, never a grey. */

@font-face {
  font-family: "Big Shoulders";
  src: url("/fonts/big-shoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #070707;
  --ink-raised: #0f0e0c;
  --paper: #f4f3ee;
  --paper-2: rgba(244, 243, 238, 0.72);
  --paper-3: rgba(244, 243, 238, 0.5);
  --chalk: rgba(244, 243, 238, 0.16);
  --gold: #d2a640;
  --gold-hi: #e8c56a;
  --gold-deep: #8c6a1f;

  --display: "Big Shoulders", "Arial Narrow", sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --measure: 34rem;
  --bar-h: 4.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bar-h);
  scrollbar-color: var(--gold-deep) var(--ink);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  font-variation-settings: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--ink);
}
::-webkit-scrollbar-thumb {
  background: var(--gold-deep);
  border: 3px solid var(--ink);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover {
  color: var(--gold-hi);
}

p {
  margin: 0 0 1em;
  max-width: 65ch;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 0.9;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus {
  top: 0.75rem;
}

/* ---------- The bar ---------- */

.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 var(--gutter);
  background: linear-gradient(var(--ink) 62%, rgba(7, 7, 7, 0));
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--paper);
  line-height: 1;
}
.wordmark b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.wordmark span {
  font-stretch: 125%;
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-2);
}
.wordmark:hover b {
  color: var(--gold-hi);
}

.bar nav ul {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.bar nav a {
  font-stretch: 125%;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper-2);
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.bar nav a:hover,
.bar nav a[aria-current="page"] {
  color: var(--paper);
  border-bottom-color: var(--gold);
}

/* ---------- The board (3D stage behind the home page) ---------- */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--ink) url("/img/board-poster.jpg") 72% 50% / cover no-repeat;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.stage.is-live {
  background-image: none;
}
.stage.is-live canvas {
  opacity: 1;
}

.caption {
  position: fixed;
  right: var(--gutter);
  bottom: 1.5rem;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-stretch: 125%;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-2);
  transition: opacity 0.5s var(--ease-out);
}
.caption::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: var(--gold);
}
.caption.is-changing {
  opacity: 0;
}

/* ---------- Home: sections laid over the board ---------- */

.home main {
  position: relative;
  z-index: 2;
}
/* Keeps any piece that wanders left from sitting under the words. */
.home .stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(7, 7, 7, 0.97) 42%, rgba(7, 7, 7, 0) 58%);
}
@media (max-width: 860px) {
  .home .stage::after {
    display: none;
  }
}

.scene {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--bar-h) + 3rem) var(--gutter) 5rem;
}
.scene > .panel {
  width: min(var(--measure), 44vw);
}

.hero h1 {
  font-size: clamp(3.6rem, 8.4vw, 6rem);
  line-height: 0.84;
  margin-bottom: 1.75rem;
}
.hero h1 .line-2 {
  display: block;
  color: var(--gold);
}
.lede {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  color: var(--paper);
  margin-bottom: 1.25rem;
}
.hero .support {
  color: var(--paper-2);
  margin-bottom: 2.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  font-stretch: 112%;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.1;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.btn svg {
  width: 1rem;
  height: 1rem;
  flex: none;
  transition: transform 0.35s var(--ease-out);
}
.btn:hover {
  background: var(--gold-hi);
  border-color: var(--gold-hi);
  color: var(--ink);
}
.btn:hover svg {
  transform: translateX(3px);
}
.btn:active {
  transform: translateY(1px);
}
.btn.is-line {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper-3);
}
.btn.is-line:hover {
  border-color: var(--gold);
  color: var(--gold-hi);
}

/* A game */

.game h2 {
  font-size: clamp(2.8rem, 5.4vw, 4.4rem);
  margin-bottom: 1.1rem;
}
.game .icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 22%;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}

.stamp {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.45rem 0.8rem 0.4rem;
  font-stretch: 125%;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1;
}
.stamp.is-out {
  background: var(--gold);
  color: var(--ink);
}
.stamp.is-dev {
  border: 1px dashed var(--gold);
  color: var(--gold);
}

.facts {
  margin: 1.75rem 0 0;
  border-top: 1px solid var(--chalk);
}
.facts div {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--chalk);
}
.facts dt {
  font-stretch: 125%;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 0.28rem;
}
.facts dd {
  margin: 0;
  color: var(--paper);
  font-size: 0.98rem;
  line-height: 1.5;
}

/* How we make them */

.creed h2 {
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin-bottom: 2.25rem;
}
.creed ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--chalk);
}
.creed li {
  padding: 1.35rem 0 1.2rem;
  border-bottom: 1px solid var(--chalk);
}
.creed h3 {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 0.55rem;
}
.creed li p {
  margin: 0;
  color: var(--paper-2);
}

/* Contact */

.talk h2 {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 1.5rem;
}
.talk p {
  color: var(--paper-2);
}
.mail {
  display: inline-block;
  margin: 1rem 0 0.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  letter-spacing: 0.01em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  overflow-wrap: anywhere;
  transition: color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.mail:hover {
  color: var(--gold-hi);
  border-bottom-color: var(--gold-hi);
}

/* ---------- Inner pages ---------- */

.page {
  position: relative;
  flex: 1;
  padding: calc(var(--bar-h) + clamp(3rem, 9vh, 6rem)) var(--gutter) 6rem;
}
.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--chalk);
}
.page-head h1 {
  font-size: clamp(3.4rem, 9vw, 6rem);
}
.page-head .diagram {
  width: clamp(7rem, 16vw, 11rem);
  color: var(--gold);
}
.page-intro {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  max-width: 44rem;
}

.cols {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.25rem clamp(2rem, 5vw, 5rem);
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--chalk);
}
.cols h2 {
  font-size: 1.9rem;
  color: var(--gold);
}
.cols p {
  color: var(--paper-2);
}
.cols p strong {
  color: var(--paper);
  font-weight: 600;
}

.sheet {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  font-variant-numeric: tabular-nums;
}
.sheet th,
.sheet td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1.25rem 0.75rem 0;
  border-bottom: 1px solid var(--chalk);
}
.sheet th {
  font-stretch: 125%;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  width: 11rem;
  padding-top: 1rem;
}
.sheet thead th {
  width: auto;
  color: var(--paper-3);
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.downloads li {
  display: flex;
}
.downloads a {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  width: 13rem;
  padding: 1rem;
  border: 1px solid var(--chalk);
  text-decoration: none;
  font-size: 0.9rem;
  transition: border-color 0.3s var(--ease-out);
}
.downloads a:hover {
  border-color: var(--gold);
  color: var(--paper);
}
.downloads .swatch {
  display: grid;
  place-items: center;
  height: 7rem;
  background: var(--ink-raised);
}
.downloads .swatch.is-light {
  background: var(--paper);
}
.downloads .swatch img {
  max-width: 80%;
  max-height: 4.5rem;
  width: auto;
}
.downloads .swatch img.app {
  border-radius: 22%;
}
.downloads small {
  color: var(--paper-3);
}

.placeholder {
  color: var(--gold);
  border-bottom: 1px dashed var(--gold);
}

/* ---------- The credit band ---------- */

.credits {
  position: relative;
  z-index: 3;
  background: var(--ink);
  border-top: 1px solid var(--gold-deep);
  padding: 1.75rem var(--gutter) 2rem;
  font-stretch: 112%;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: var(--paper-2);
}
.credits .row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}
.credits .row + .row {
  margin-top: 0.75rem;
}
.credits b {
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.66rem;
  margin-right: 0.5rem;
}
.credits a {
  text-decoration: none;
  color: var(--paper-2);
}
.credits a:hover {
  color: var(--gold-hi);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 860px) {
  .scene {
    display: block;
    min-height: 0;
    padding: 0;
  }
  .scene::before {
    content: "";
    display: block;
    height: 62svh;
  }
  .scene > .panel {
    width: auto;
    background: var(--ink);
    padding: 2.25rem var(--gutter) 3.5rem;
    border-top: 1px solid var(--chalk);
  }
  .hero::before {
    height: 46svh;
  }
  .hero > .panel {
    border-top: 0;
    background: linear-gradient(rgba(7, 7, 7, 0), var(--ink) 4.5rem);
    padding-top: 4.5rem;
  }
  .bar {
    background: var(--ink);
  }
  .caption {
    display: none;
  }
  .facts div {
    grid-template-columns: 6.25rem 1fr;
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .page-head {
    grid-template-columns: 1fr;
  }
  .page-head .diagram {
    display: none;
  }
  .sheet th {
    width: 7.5rem;
    white-space: normal;
  }
  /* The games table keeps name and status on a phone; sport and platforms are on the home page. */
  .sheet.is-games th:nth-child(2),
  .sheet.is-games th:nth-child(3),
  .sheet.is-games td:nth-child(2),
  .sheet.is-games td:nth-child(3) {
    display: none;
  }
}
.after-table {
  margin-top: 1.25rem;
}

@media (max-width: 440px) {
  .wordmark span {
    display: none;
  }
  .bar {
    gap: 0.75rem;
  }
  .wordmark b {
    font-size: 1.3rem;
  }
  .bar nav ul {
    gap: 0.6rem;
  }
  .bar nav a {
    font-size: 0.64rem;
    letter-spacing: 0.06em;
  }
  .btn {
    width: 100%;
    justify-content: space-between;
  }
}

/* The smallest phones: Games drops from the bar; the first button on the home page goes there. */
@media (max-width: 370px) {
  .bar nav .opt {
    display: none;
  }
}
