/* BitRanch LLC company site.
   A sober, plain corporate look, deliberately distinct from the ChessRoller
   product marketing site: white ground, rules instead of cards, system type,
   one restrained accent. Zero external requests, no webfonts, no JS. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f5f5f3;
  --ink: #17191c;
  --muted: #565b63;
  --line: #dcdcd8;
  --line-strong: #c3c3bd;
  --accent: #1a5570;
  --accent-hover: #113d52;
  --on-accent: #ffffff;

  --system:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --measure: 68ch;
  --maxw: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101214;
    --bg-alt: #16191c;
    --ink: #e8eaec;
    --muted: #a2a8b0;
    --line: #2a2e33;
    --line-strong: #3a4046;
    --accent: #7cc0dd;
    --accent-hover: #a5d5ea;
    --on-accent: #101214;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

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

.col {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-hover);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 10;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  padding: 0.5rem 0.85rem;
  border-radius: 4px;
}

/* ─── Header ─────────────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-header .bar {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.site-nav a[aria-current='page'] {
  color: var(--ink);
  font-weight: 600;
}

/* ─── Sections ───────────────────────────────────────────────────── */

section {
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
section.band {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}
/* separates two stacked white sections without a background change */
section.ruled {
  border-top: 1px solid var(--line);
}

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.018em;
  font-weight: 650;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
}
h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
}
h3 {
  font-size: 1.0625rem;
  font-weight: 650;
}

.lede {
  font-size: clamp(1.0625rem, 1.7vw, 1.1875rem);
  color: var(--muted);
  max-width: 60ch;
  margin-top: 0.9rem;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

/* ─── Home hero ──────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(3.25rem, 8vw, 5.5rem);
}
.hero h1 {
  max-width: 30ch;
}
.hero .lede {
  margin-top: 1.1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 5px;
  border: 1px solid transparent;
}
.btn:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.btn-ghost {
  display: inline-block;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 5px;
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.cta-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

/* ─── Generic content rows ───────────────────────────────────────── */

.rows {
  display: grid;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.rows > .row {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1rem 2.5rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.rows > .row > h3 {
  margin: 0;
}
.rows > .row p {
  color: var(--muted);
  max-width: var(--measure);
}
@media (max-width: 44rem) {
  .rows > .row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

/* ─── Product cards ──────────────────────────────────────────────── */

.product {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--bg);
  margin-top: 1.75rem;
}
/* the product name is an h2 or an h3 depending on the page's heading
   outline, so style it by position rather than by tag */
.product h2,
.product h3 {
  font-size: 1.3rem;
  letter-spacing: -0.015em;
}
.product .product-tag {
  color: var(--muted);
  margin-top: 0.3rem;
}
.product-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.product-logo {
  flex: none;
  border-radius: 10px;
}

/* product page: logo beside the H1 */
.product-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.product-title img {
  flex: none;
  border-radius: 12px;
}

/* application screenshot */
.shot {
  margin-top: 2.25rem;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 880px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-alt);
}
.shot figcaption {
  margin-top: 0.7rem;
  max-width: var(--measure);
  font-size: 0.875rem;
  color: var(--muted);
}
.product .product-summary {
  margin-top: 1rem;
  max-width: var(--measure);
}
.product .product-meta {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.product ul {
  margin: 1.1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  max-width: var(--measure);
}
.product li {
  margin-block: 0.25rem;
}
.product .cta-row {
  margin-top: 1.4rem;
}

.facts {
  margin-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.facts div {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 0.25rem 2.5rem;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-weight: 600;
}
.facts dd {
  color: var(--muted);
  margin: 0;
}
@media (max-width: 44rem) {
  .facts div {
    grid-template-columns: 1fr;
  }
}

/* ─── Page heads & prose ─────────────────────────────────────────── */

.page-head {
  padding-block: clamp(2.25rem, 5vw, 3.25rem) 0;
}
.page-head .meta {
  color: var(--muted);
  font-size: 0.9375rem;
  margin-top: 0.6rem;
}
.page-body {
  padding-block: clamp(1.5rem, 3vw, 2.25rem)
    clamp(2.75rem, 6vw, 4.5rem);
}

.prose {
  max-width: var(--measure);
}
.prose > * + * {
  margin-top: 1.05rem;
}
/* a standalone heading outside a .prose block, e.g. above a full-width
   .rows or .facts table; same rule-above treatment as .prose h2 */
.rule-h2 {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.prose + .prose {
  margin-top: 0;
}
.prose h2.first {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
/* a .prose block that opens with a heading sits below something that already
   drew a rule (a .rows table, say); keep the spacing, drop the second line */
.prose > h2:first-child {
  padding-top: 0;
  border-top: 0;
}
.prose h2 {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.prose h3 {
  margin-top: 1.7rem;
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}
.prose li + li {
  margin-top: 0.4rem;
}
.prose-legal {
  font-size: 16px;
}
.prose-legal h2 {
  font-size: 1.1875rem;
}

/* ─── Footer ─────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
  padding-block: clamp(2.25rem, 5vw, 3rem);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
@media (max-width: 52rem) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-org {
    grid-column: 1 / -1;
  }
}
.footer-brand {
  font-weight: 650;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.site-footer address {
  font-style: normal;
  color: var(--muted);
  line-height: 1.7;
}
.group-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.site-footer ul {
  list-style: none;
}
.site-footer li + li {
  margin-top: 0.35rem;
}
.site-footer a {
  color: var(--ink);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.copyright {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.875rem;
}

/* ─── 404 ────────────────────────────────────────────────────────── */

.notfound {
  padding-block: clamp(4rem, 12vw, 8rem);
}

@media print {
  .site-header,
  .site-footer,
  .cta-row {
    display: none;
  }
}

.prose address {
  font-style: normal;
  line-height: 1.7;
}
