/* Kanso 65 — modern product page
   Anodised-aluminium greys with one signal-yellow accent key. */
:root {
  --brand: #F2C200;
  --brand-deep: #C89F00;
  --brand-soft: #FBF3CF;
  --brand-ink: #16140F;

  --bg: #E8E9EB;
  --panel: #F5F5F6;
  --ink: #111214;
  --muted: #62666E;
  --line: #CFD2D7;

  --display: 'Archivo', 'Arial', sans-serif;
  --mono: 'Chivo Mono', ui-monospace, monospace;
  --wrap: 1240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--display); font-stretch: 100%; color: var(--ink); background: var(--bg); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
h1, h2, .logo { font-stretch: 125%; font-weight: 800; letter-spacing: -.02em; }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 40; background: rgba(232, 233, 235, .9); backdrop-filter: blur(12px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 20px; }
.logo { font-size: 1.3rem; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; }
.nav { display: flex; gap: 30px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; padding: 14px 26px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .2s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 10px 16px; font-size: .9rem; }
.btn-brand { background: var(--brand); color: var(--brand-ink); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18); }
.btn-brand:hover { background: var(--brand-deep); }

/* ---------- hero ---------- */
.hero { padding: 40px 0 72px; }
.hero-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.hero h1 { font-size: clamp(3.4rem, 10vw, 9rem); line-height: .82; }
.lede { max-width: 38ch; color: var(--muted); font-size: 1.1rem; padding-bottom: 10px; }
.typed { font-family: var(--mono); font-size: clamp(1rem, 2vw, 1.35rem); min-height: 1.6em; margin: 40px 0 2px; white-space: pre; overflow: hidden; }
.caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.15em; background: var(--brand-deep); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.type-hint { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin-bottom: 18px; min-height: 1.3em; }

/* The keyboard: 16 units wide, each unit = 4 grid columns so 1.25u / 1.75u / 2.25u / 6.25u keys land on whole columns. */
.kb-wrap { container-type: inline-size; }
.kb-wrap[data-cw="chalk"]  { --case: #D5D7DB; --key: #F4F4F2; --mod: #C6C9CE; --legend: #3A3D44; }
.kb-wrap[data-cw="carbon"] { --case: #2B2D32; --key: #3B3E45; --mod: #25272C; --legend: #D9DBE0; }
.kb-wrap[data-cw="matcha"] { --case: #B6C2AA; --key: #EEF1E6; --mod: #9DAE8C; --legend: #2E3A26; }
.kb { display: grid; grid-template-columns: repeat(64, 1fr); grid-auto-rows: calc((100cqw - 36px) / 16 * .94); gap: 4px; padding: 16px; background: var(--case); border-radius: 18px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 30px 50px -28px rgba(17, 18, 20, .55), 0 2px 0 rgba(0, 0, 0, .15); transition: background .4s; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.key { position: relative; grid-column: span var(--s); border-radius: 7px; background: var(--key); color: var(--legend); font-family: var(--mono); font-size: clamp(.5rem, 1.1cqw, .82rem); padding: 5px 7px; cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 0 rgba(0, 0, 0, .3);
  transition: transform .05s ease-out, box-shadow .05s ease-out, background .45s ease; }
.key.mod { background: var(--mod); }
.key.accent { background: var(--brand); color: var(--brand-ink); }
.key.down { transform: translateY(3px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .16), 0 0 0 rgba(0, 0, 0, 0); background: var(--brand); color: var(--brand-ink); transition: transform .03s, box-shadow .03s, background .03s; }

.hero-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 22px; }
.cw { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctl-label, .mono-label { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.cw button, .sound { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--panel); border-radius: 999px; padding: 8px 14px 8px 8px; font-weight: 600; font-size: .9rem; cursor: pointer; }
.cw button[aria-checked="true"] { border-color: var(--ink); }
.cw i { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.sound { padding: 8px 16px; font-family: var(--mono); font-weight: 500; }
.sound[aria-pressed="true"] { background: var(--ink); color: var(--panel); border-color: var(--ink); }

/* ---------- switches + force curve ---------- */
.switches { padding: 88px 0; background: var(--panel); }
.switch-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.switches h2, .specs h2, .faq h2 { font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: .95; }
.sub { color: var(--muted); margin: 14px 0 26px; }
.switch-opts { display: grid; gap: 10px; }
.switch-opts button { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; text-align: left; border: 1.5px solid var(--line); background: var(--bg); border-radius: 14px; padding: 16px 18px; cursor: pointer; transition: border-color .2s, background .2s; }
.switch-opts button[aria-checked="true"] { border-color: var(--ink); background: #fff; box-shadow: inset 5px 0 0 var(--brand); }
.switch-opts strong { font-stretch: 125%; font-size: 1.2rem; }
.switch-opts span { font-family: var(--mono); font-size: .8rem; color: var(--muted); align-self: center; }
.switch-opts em { grid-column: 1 / -1; font-style: normal; color: var(--muted); font-size: .93rem; }
.chart svg { width: 100%; height: auto; display: block; }
.grid path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.grid .minor { stroke: var(--line); stroke-width: 1; }
.axis text { font-family: var(--mono); font-size: 12px; fill: var(--muted); }
.curve { fill: none; stroke: var(--line); stroke-width: 2.5; stroke-linejoin: round; transition: stroke .3s, stroke-width .3s; }
.curve.on { stroke: var(--ink); stroke-width: 4; }
.act { fill: var(--brand); stroke: var(--ink); stroke-width: 2; opacity: 0; transition: opacity .3s; }
.act.on { opacity: 1; }
.chart figcaption { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-top: 8px; }

/* ---------- specs ---------- */
.specs { padding: 88px 0; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 34px; border-top: 1.5px solid var(--ink); }
.spec-grid div { padding: 20px 18px 22px 0; border-bottom: 1px solid var(--line); }
.spec-grid dt { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.spec-grid dd { font-weight: 600; font-size: 1.05rem; line-height: 1.35; }

/* ---------- buy band ---------- */
.buy { background: var(--ink); color: var(--panel); padding: 56px 0; }
.buy-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.buy .mono-label { color: #9CA0A8; }
.summary { font-stretch: 125%; font-weight: 800; font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.1; margin: 4px 0 6px; }
.ship { color: #9CA0A8; }
.buy-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.price { font-stretch: 125%; font-weight: 800; font-size: 2rem; }
.buy-msg { flex-basis: 100%; min-height: 1.4em; font-family: var(--mono); font-size: .82rem; color: var(--brand); }

/* ---------- faq ---------- */
.faq { padding: 88px 0 100px; }
.faq h2 { margin-bottom: 26px; }
.faq details { border-top: 1.5px solid var(--ink); max-width: 820px; }
.faq details:last-of-type { border-bottom: 1.5px solid var(--ink); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.12rem; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding: 0 0 20px; max-width: 64ch; }
.footer { border-top: 1px solid var(--line); padding: 26px 0 90px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .9rem; }
.footer .logo { font-size: 1rem; color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .switch-grid { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .kb { padding: 8px; gap: 2px; border-radius: 10px; grid-auto-rows: calc((100cqw - 16px) / 16 * 1.05); }
  .key { border-radius: 4px; padding: 2px 3px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .16); }
  .spec-grid { grid-template-columns: 1fr; }
  .switches, .specs, .faq { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
