/*
  chessKish — shared stylesheet for the statically served pages.

  One small file instead of inline <style> blocks so the landing pages stay
  readable and the CSS is fetched once and cached.

  The palette is copied from the application itself, not invented here:
  --paper / --accent are the tokens in lib/src/view/home/home_dashboard.dart and
  lib/src/widgets/web_scaffold.dart (0xFFF6F2EA and 0xFF9A6B3F). Keeping the
  static pages on the same tokens means a visitor who clicks through to the app
  sees one continuous product rather than a marketing site bolted onto it.
*/

:root {
  --paper: #f6f2ea;
  --surface: #fffdf9;
  --surface-2: #fbf7ef;
  --ink: #26221c;
  --muted: #5f5648;
  --line: #e4daca;
  --accent: #9a6b3f;
  --accent-ink: #7a5230;
  --dark: #1d1b17;
  --radius: 14px;
  --wrap: 1080px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.68 "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-ink);
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
}

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

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1px solid var(--accent);
}

.btn:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

.btn.secondary {
  background: transparent;
  color: var(--accent-ink);
}

.btn.secondary:hover {
  background: var(--surface-2);
}

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

.hero {
  padding: 62px 0 46px;
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  max-width: 20ch;
}

.hero .lede {
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 14px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- sections ---------- */

main section {
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

main section:first-of-type {
  border-top: 0;
}

h2 {
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

h3 {
  font-size: 18.5px;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
}

p {
  margin: 0 0 16px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

li {
  margin-bottom: 9px;
}

a {
  color: var(--accent-ink);
}

strong {
  font-weight: 650;
}

/* ---------- cards ---------- */

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin: 26px 0 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}

.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.card .card-link {
  font-weight: 600;
  text-decoration: none;
}

.card .card-link:hover {
  text-decoration: underline;
}

/* ---------- FAQ ---------- */

.faq {
  margin-top: 24px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin-bottom: 11px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
}

.faq summary::marker {
  color: var(--accent);
}

.faq details[open] summary {
  margin-bottom: 11px;
}

.faq details p:last-child {
  margin-bottom: 0;
}

/* ---------- steps ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 20px 48px;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14.5px;
}

/* ---------- callout ---------- */

.callout {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 38px 0 52px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 15px;
}

.site-footer .footer-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.site-footer h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin: 0 0 10px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 7px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.site-footer .fine {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* ---------- 404 ---------- */

.notfound {
  padding: 84px 0 96px;
  text-align: center;
}

.notfound h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.notfound p {
  color: var(--muted);
  max-width: 54ch;
  margin: 0 auto 26px;
}

@media (max-width: 640px) {
  .site-header .wrap {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .hero {
    padding-top: 44px;
  }
}
