/* FLAPBOARD landing.
   One accent (amber, the colour of a real board lamp), one radius (none, like the
   flaps), Archivo for anything a person reads, Plex Mono for anything a machine
   reads. Dark throughout, because the product is a dark instrument. */

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

:root {
  --bg: #0b0c0e;
  --bg-raise: #111317;
  --line: rgba(255, 255, 255, 0.11);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f2f1ec;
  --dim: #a2a7b0;
  --accent: #f5a524;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1180px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
  padding: 0 24px;
  background: rgba(11, 12, 14, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark { display: inline-flex; gap: 2px; }
.brand-mark i { width: 7px; height: 18px; background: var(--accent); }
.brand-mark i:nth-child(2) { background: #2a2d33; }
.brand-mark i:nth-child(3) { background: #2a2d33; }

.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a {
  color: var(--dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }
.nav-cta { padding: 9px 15px; font-size: 11px; flex: 0 0 auto; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav { gap: 12px; }
  .nav-cta { margin-left: auto; }
}
/* the brand and the CTA together are wider than a 320px screen at full size */
@media (max-width: 400px) {
  .nav { padding: 0 12px; gap: 8px; }
  .brand { font-size: 13px; letter-spacing: 0.1em; }
  .nav-cta { padding: 9px 8px; font-size: 10px; letter-spacing: 0.04em; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  border-radius: 0;
  padding: 12px 20px;
  transition: transform 0.14s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #17120a; font-weight: 600; }
.btn-primary:hover { background: #ffb63c; }
.btn-ghost { color: var(--text); border: 1px solid rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: 15px 26px; font-size: 13px; }

/* ---------- hero ---------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px 88px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 1.05fr);
  gap: 52px;
  align-items: center;
}
h1 { font-size: clamp(26px, 3.6vw, 44px); margin-bottom: 22px; max-width: 22ch; }
.sub {
  color: var(--dim);
  max-width: 40ch;
  font-size: 18px;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-board { min-width: 0; }
#heroBoard {
  display: grid;
  grid-template-columns: repeat(22, var(--cw));
  grid-auto-rows: var(--chh);
  gap: var(--gap);
  aspect-ratio: 4.05 / 1;
  background: #000;
  border: 1px solid var(--line);
  padding: calc(var(--gap) + 1px);
}
.hero-caption {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: #7d828c;
  min-height: 1.4em;
}
#heroLabel { color: var(--accent); }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 48px 24px 64px; gap: 36px; }
  #heroBoard { aspect-ratio: 3.4 / 1; }
}

/* ---------- generic section ---------- */

.section { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px; }
.section h2 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 44px; max-width: 20ch; }

/* ---------- what it shows: grouped reference ---------- */

.clusters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.cluster { border-top: 1px solid var(--line); padding-top: 20px; }
.cluster h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
}
.cluster p { color: var(--dim); font-size: 15px; margin-bottom: 18px; max-width: 32ch; }
.cluster ul { list-style: none; }
.cluster li { padding: 5px 0; font-size: 16px; color: var(--text); }

@media (max-width: 820px) { .clusters { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- on a wall: full-bleed band + step strip ---------- */

.band {
  background: var(--bg-raise);
  border-block: 1px solid var(--line);
}
.band-inner { max-width: var(--maxw); margin: 0 auto; padding: 88px 24px; }
.band h2 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 20px; max-width: 18ch; }
.band-sub { color: var(--dim); max-width: 62ch; font-size: 17px; }
.strip {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 52px;
  border-top: 1px solid var(--line);
}
.strip li { padding: 22px 28px 0 0; }
.strip li + li { border-left: 1px solid var(--line); padding-left: 28px; }
.strip p { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
@media (max-width: 820px) {
  .strip { grid-template-columns: 1fr; }
  .strip li { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
  .strip li + li { border-left: 0; padding-left: 0; }
}

/* ---------- touch ---------- */

.touch {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: start;
}
.touch h2 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 20px; max-width: 16ch; }
.touch-copy p { color: var(--dim); font-size: 17px; max-width: 52ch; }
.pair-steps { list-style: none; counter-reset: s; margin-top: 26px; max-width: 46ch; }
.pair-steps li {
  counter-increment: s;
  position: relative;
  padding: 10px 0 10px 40px;
  font-size: 16px;
}
.pair-steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(245, 165, 36, 0.4);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.touch-code { border-top: 1px solid var(--line); padding-top: 20px; }
.code-lead { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--dim); margin-bottom: 12px; }
.touch-code pre {
  background: #000;
  border: 1px solid var(--line);
  padding: 18px 20px;
  overflow-x: auto;
}
.touch-code code { font-family: var(--mono); font-size: 15px; color: var(--accent); }
.code-note { margin-top: 14px; color: var(--dim); font-size: 15px; max-width: 44ch; }

@media (max-width: 900px) { .touch { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 24px 56px;
  text-align: center;
  font-size: 15px;
  color: var(--dim);
}
.footer strong { color: var(--text); letter-spacing: 0.16em; font-size: 14px; }
.foot-dim { margin-top: 8px; font-size: 13px; color: #7d828c; }

/* ---------- board tiles (shared with the app) ---------- */

.tile { position: relative; perspective: 260px; overflow: hidden; border-radius: 0; }
.face {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 32%, transparent 50%),
    linear-gradient(180deg, #2c2f35, #15171c);
}
.face.bot {
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.015) 32%, transparent 50%),
    linear-gradient(180deg, #22252a, #101216);
}
.face.top { top: 0; box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.34); }
.face.bot { bottom: 0; box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.3); }
.face i {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--chh);
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-stretch: var(--fw, 112%);
  font-weight: var(--fweight, 700);
  font-size: var(--fs);
  line-height: 1;
  color: #fbfaf6;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}
.face.bot i { top: calc(-1 * var(--chh) / 2); }
.face.leaf { z-index: 6; backface-visibility: hidden; will-change: transform; }
.face.top.leaf { transform-origin: center bottom; }
.face.bot.leaf { transform-origin: center top; z-index: 7; }
.tile::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0, 0, 0, 0.92);
  z-index: 5;
  pointer-events: none;
}
.tile.c-red .face, .face.c-red     { background-image: linear-gradient(180deg, #e2566d, #ab2c43); }
.tile.c-orange .face, .face.c-orange { background-image: linear-gradient(180deg, #fb8c40, #d3641c); }
.tile.c-yellow .face, .face.c-yellow { background-image: linear-gradient(180deg, #f8cd4e, #d9a41e); }
.tile.c-green .face, .face.c-green   { background-image: linear-gradient(180deg, #4bb377, #2c7d51); }
.tile.c-blue .face, .face.c-blue     { background-image: linear-gradient(180deg, #4d87dc, #2a63b4); }
.tile.c-violet .face, .face.c-violet { background-image: linear-gradient(180deg, #8a70de, #5d47ad); }
.tile.c-white .face, .face.c-white   { background-image: linear-gradient(180deg, #f4f2ea, #ddd9cc); }
.tile.c-black .face, .face.c-black   { background-image: linear-gradient(180deg, #17181c, #07080a); }
