/* Button Board landing page. Palette follows the docs site (tools/docsgen/assets/style.css). */
:root {
  --bg: #ffffff;
  --bg-subtle: #f5f7fa;
  --bg-raised: #ffffff;
  --plate: #ffffff;            /* behind the line drawings: always white, they are drawn on white */
  --border: #e4e6ea;
  --border-strong: #d0d4da;
  --text: #1d2129;
  --text-muted: #5f6672;
  --text-faint: #9aa1ab;
  --accent: #2f6feb;
  --accent-ink: #ffffff;
  --accent-soft: #eaf1fe;
  --ok: #0f8a5f;
  --warn: #b45309;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .07);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-subtle: #1a1d22;
    --bg-raised: #1c1f25;
    --plate: #f3f4f6;
    --border: #2a2e36;
    --border-strong: #3a3f49;
    --text: #e6e8ec;
    --text-muted: #a0a8b3;
    --text-faint: #6f7883;
    --accent: #6f9bff;
    --accent-ink: #0b1020;
    --accent-soft: #1d2637;
    --ok: #34d399;
    --warn: #fbbf24;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.015em; }

.wrap { max-width: 72rem; margin: 0 auto; padding-inline: max(1rem, 4vw); }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
       backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.6rem; flex-wrap: wrap; }
.brand { font-weight: 800; color: var(--text); letter-spacing: .02em; }
.brand span { font-weight: 500; color: var(--text-muted); }
.brand:hover { text-decoration: none; }
nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .95rem; }
nav a { color: var(--text-muted); }
nav a:hover { color: var(--text); text-decoration: none; }
nav .nav-shop { color: var(--accent); font-weight: 600; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.15rem; border-radius: 10px;
       font-weight: 600; font-size: .98rem; border: 1px solid transparent; transition: transform .08s ease, background .15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--bg-subtle); }

/* hero */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 4rem);
        background: radial-gradient(60rem 30rem at 85% -10%, var(--accent-soft), transparent 70%); }
.hero-in { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.eyebrow { font: 600 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 1rem; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); margin: 1.1rem 0 1.6rem; max-width: 34rem; }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-fig { margin: 0; background: var(--plate); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
figcaption { font-size: .85rem; color: var(--text-faint); margin-top: .6rem; }
.hero-fig figcaption { color: #6b7280; }

/* points */
.points { border-block: 1px solid var(--border); background: var(--bg-subtle); }
.points-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-block: 1.8rem; }
.points h3 { font-size: 1rem; margin-bottom: .3rem; }
.points p { margin: 0; color: var(--text-muted); font-size: .93rem; }

/* catalogue */
.catalogue, .how, .also { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { max-width: 44rem; margin-bottom: 1.5rem; }
.section-head h2, .how h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.section-head p { color: var(--text-muted); margin: .6rem 0 0; }
.group { margin-top: 2.25rem; }
.group h3 { font-size: 1.1rem; display: flex; align-items: center; gap: .75rem; }
.group h3::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.group-note { color: var(--text-muted); font-size: .92rem; margin: .4rem 0 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; margin-top: 1rem; }

.card { display: flex; flex-direction: column; background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius);
        overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.card-img { background: var(--plate); height: 11rem; display: grid; place-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.card-img.photo { padding: 0; }
.card-img.photo img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1rem 1.1rem .6rem; flex: 1; }
.card h4 { font-size: 1.05rem; font-family: var(--mono); font-weight: 700; letter-spacing: 0; }
.card p { margin: .35rem 0 .7rem; color: var(--text-muted); font-size: .92rem; }
.specs { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.specs li { font: 500 .75rem/1 var(--mono); color: var(--text-muted); background: var(--bg-subtle); border: 1px solid var(--border);
            padding: .35rem .5rem; border-radius: 999px; }
.card-buy { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; padding: .8rem 1.1rem 1rem; min-height: 3.6rem; border-top: 1px dashed var(--border); }
.price { font-weight: 800; font-size: 1.1rem; }
.price.loading { width: 5rem; height: 1.1rem; border-radius: 6px; background: linear-gradient(90deg, var(--bg-subtle), var(--border), var(--bg-subtle));
                 background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.stock { font-size: .8rem; font-weight: 600; }
.stock.in { color: var(--ok); }
.stock.out { color: var(--warn); }
.btn-buy { margin-left: auto; padding: .45rem 1rem; background: var(--accent); color: var(--accent-ink); }
.btn-buy:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.link { font-size: .88rem; font-weight: 600; }
.soon { font: 600 .78rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--text-faint); }
.card.is-soon .card-img img { opacity: .85; }

/* how */
.how { background: var(--bg-subtle); border-block: 1px solid var(--border); }
.how-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.steps { padding-left: 1.2rem; margin: 1.2rem 0 1.5rem; color: var(--text-muted); }
.steps li { margin-bottom: .7rem; }
.steps b { color: var(--text); }
.how-fig { margin: 0; background: var(--plate); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.how-fig figcaption { color: #6b7280; }

/* also */
.also-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); gap: 1rem; }
.card-wide .card-img { height: 13rem; }

/* the main module: one card across the row, drawing beside the text */
.grid:has(.card-feature) { grid-template-columns: 1fr; }
.card-feature { display: grid; grid-template-columns: minmax(12rem, 22rem) 1fr; grid-template-rows: 1fr auto; }
.card-feature .card-img { grid-row: 1 / 3; height: auto; min-height: 12rem; border-bottom: 0; border-right: 1px solid var(--border); }
.card-feature .card-body { padding-top: 1.3rem; }
@media (max-width: 640px) {
  .card-feature { display: flex; }
  .card-feature .card-img { min-height: 0; height: 11rem; border-right: 0; border-bottom: 1px solid var(--border); }
}

/* footer */
.foot { border-top: 1px solid var(--border); padding-block: 2rem 2.5rem; color: var(--text-muted); font-size: .9rem; }
.foot-in p { margin: .25rem 0; }
.fine { color: var(--text-faint); font-size: .82rem; }

@media (max-width: 860px) {
  .hero-in, .how-grid { grid-template-columns: 1fr; }
  .points-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .points-grid { grid-template-columns: 1fr; }
  nav { gap: .9rem; font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
