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

:root {
  color-scheme: dark;
  --ink: #1b2026;          /* page */
  --ink-raised: #232a31;   /* panel, notes */
  --line: #343c45;
  --text: #e7e9ec;
  --muted: #9aa3ad;
  --wood-light: #e8d6b3;
  --wood-dark: #b0875b;
  --blue: #3d7ef0;
  --blue-hover: #5590f5;
  --a1: #3cc828;           /* the app's arrow colors: best, 2nd, 3rd */
  --a2: #ffbe00;
  --a3: #ff6428;
  --measure: 64ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.6 "Archivo", system-ui, sans-serif;
  font-stretch: 100%;
}

a { color: #9dbdff; text-underline-offset: 0.18em; }
a:hover { color: #c3d6ff; }
:focus-visible { outline: 3px solid var(--a2); outline-offset: 3px; border-radius: 4px; }

/* ---- top bar ---- */
.top {
  max-width: 1160px; margin: 0 auto; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 700; font-stretch: 112%; font-size: 1.05rem;
}
.brand img { border-radius: 6px; }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover { color: var(--text); }

/* ---- hero ---- */
.hero {
  max-width: 1160px; margin: 0 auto; padding: 36px 24px 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px; align-items: center;
}
h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1.02;
  font-weight: 800;
  font-stretch: 125%;
  letter-spacing: -0.01em;
  max-width: 13ch;
}
.lead { font-size: 1.2rem; color: #cfd4da; max-width: 46ch; margin: 0 0 30px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.fine { color: var(--muted); font-size: 0.95rem; margin: 18px 0 0; }

.button {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--text); text-decoration: none;
  font-weight: 600; font-stretch: 105%;
  background: var(--ink-raised);
}
.button:hover { background: #2c343c; color: var(--text); }
.button.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.button.primary:hover { background: var(--blue-hover); }

/* ---- example board ---- */
.demo {
  margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 190px;
  background: #141517; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
#board { display: block; width: 100%; height: auto; }
.sq-light { fill: var(--wood-light); }
.sq-dark { fill: var(--wood-dark); }
.pc {
  font-family: "DejaVu Sans", "Segoe UI Symbol", "Noto Sans Symbols 2", sans-serif;
  font-size: 46px; text-anchor: middle; dominant-baseline: central;
  paint-order: stroke; stroke-linejoin: round;
}
.pc-w { fill: #fbf8f2; stroke: #3a332a; stroke-width: 1.6px; }
.pc-b { fill: #26221d; stroke: #f3e8d2; stroke-width: 0.8px; }

.arrow { opacity: 0.88; }
.arrow.a1 { color: var(--a1); }
.arrow.a2 { color: var(--a2); }
.arrow.a3 { color: var(--a3); }
.shaft { stroke: currentColor; stroke-linecap: butt; stroke-dasharray: 1; stroke-dashoffset: 0; }
.head, .badge { fill: currentColor; }
.badge-num {
  fill: #fff; font-weight: 700; text-anchor: middle; dominant-baseline: central;
  font-family: "Archivo", system-ui, sans-serif;
}

/* the one animation: arrows draw in, best move last */
@media (prefers-reduced-motion: no-preference) {
  .shaft { animation: draw 0.55s ease-out both; animation-delay: calc(0.5s + var(--i) * 0.45s); stroke-dashoffset: 1; }
  .head, .badge, .badge-num { animation: show 0.2s ease-out both; animation-delay: calc(0.95s + var(--i) * 0.45s); }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes show { from { opacity: 0; } to { opacity: 1; } }

.demo-panel { padding: 18px 16px; background: var(--ink-raised); font-size: 0.92rem; }
.demo-turn { font-weight: 700; font-size: 1.05rem; margin: 0 0 14px; }
.demo-row { display: flex; gap: 9px; margin: 0 0 12px; line-height: 1.35; }
.demo-row small { color: var(--muted); font-size: 0.78rem; }
.sw { width: 12px; height: 12px; border-radius: 2px; margin-top: 4px; flex: none; }
.sw.g { background: var(--a1); }
.sw.y { background: var(--a2); }
.sw.o { background: var(--a3); }

/* ---- sections ---- */
.block { max-width: 1160px; margin: 0 auto; padding: 64px 24px; border-top: 1px solid var(--line); }
h2 {
  margin: 0 0 32px; font-size: 2rem; line-height: 1.15;
  font-weight: 750; font-stretch: 115%;
}
h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 650; font-stretch: 105%; }
.block p { margin: 0; max-width: var(--measure); color: #cfd4da; }

.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 14px;
  font-size: 3.2rem; line-height: 1; font-weight: 800; font-stretch: 125%;
  color: transparent; -webkit-text-stroke: 1.5px var(--wood-light);
}

.features {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px; row-gap: 28px;
}
.features div { border-left: 3px solid var(--line); padding-left: 18px; }
.features dt { font-weight: 650; font-stretch: 105%; font-size: 1.1rem; margin-bottom: 4px; }
.features dd { margin: 0; color: #cfd4da; max-width: 52ch; }

.note-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px;
  margin-bottom: 36px;
}
.note-grid > div { background: var(--ink-raised); border-radius: 10px; padding: 22px 24px; }

.foot {
  max-width: 1160px; margin: 0 auto; padding: 28px 24px 48px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem;
}
.foot p { margin: 0; max-width: 90ch; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* ---- smaller screens ---- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 16px; }
  .steps, .features, .note-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .top { flex-direction: column; align-items: flex-start; }
  .demo { grid-template-columns: 1fr; }
  .block { padding: 48px 16px; }
  .hero, .top, .foot { padding-left: 16px; padding-right: 16px; }
}
