/* The KeyBoard — 公開サイト共通スタイル
   配色はアプリのランチャーアイコン(白地・黒キー・オレンジのスペースバー)と
   キーボード面(地 #E4E1E1 / キー #FCFCFC / 機能 #CBC5C5)に合わせている。 */
:root {
  --paper: #F4F2EE;
  --paper-2: #E8E5DF;
  --ink: #111111;
  --ink-2: #34312D;
  --muted: #6A655E;
  --line: #D8D3CB;
  --key: #FCFCFC;
  --key-fn: #CFC9C3;
  --key-press: #B1A9A9;
  --accent: #FF5402;
  --accent-ink: #C73F00;
  --dark: #0E0E0F;
  --dark-2: #19191B;
  --dark-line: #2A2A2E;
  --dark-text: #EDEAE4;
  --dark-muted: #9B968E;
  --key-shadow: 0 1px 0 #CFCAC2, 0 2px 3px rgba(20, 16, 10, .10);
  --sans: "Instrument Sans", "Helvetica Neue", Arial, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
}

*, *::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.65 var(--sans);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
html[lang="ja"] body { font-size: 16.5px; line-height: 1.85; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
h1, h2 { text-wrap: balance; }
html[lang="ja"] :is(h1, h2, h3, h4) { letter-spacing: 0; line-height: 1.35; word-break: auto-phrase; font-feature-settings: "palt"; }
p { margin: 0; }
a { color: inherit; }
code, kbd { font-family: var(--mono); }
img, svg { display: block; max-width: 100%; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.overline { font: 500 12px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
html[lang="ja"] .overline { letter-spacing: .12em; }

/* キーキャップ(サイト全体の記号) */
.kc {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.9em; height: 1.9em; padding: 0 .5em; margin: 0 .08em;
  border-radius: .38em; background: var(--key); color: var(--ink);
  box-shadow: var(--key-shadow); font: 500 .85em/1 var(--mono); vertical-align: -.35em;
}
.kc-fn { background: var(--key-fn); }
.kc-on { background: var(--accent); color: #fff; box-shadow: 0 1px 0 #B53B00, 0 2px 5px rgba(255, 84, 2, .35); }
.kc-press { background: var(--key-press); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); }
.kc-dot { position: relative; }
.kc-dot::after { content: ""; position: absolute; top: .3em; right: .3em; width: .4em; height: .4em; border-radius: 50%; background: var(--accent); }
.kc-lg { font-size: 1.4rem; min-width: 2.3em; height: 2.3em; margin: 0 0 18px; }

/* ヘッダー */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 22px; font: 500 14px/1 var(--sans); }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav .lang { font-family: var(--mono); font-size: 13px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; }
@media (max-width: 600px) { .nav a.inpage { display: none; } }

/* ヒーロー */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 85% at 72% 45%, #000 25%, transparent 72%);
  mask-image: radial-gradient(ellipse 70% 85% at 72% 45%, #000 25%, transparent 72%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 66px); margin: 20px 0 22px; }
html[lang="ja"] .hero h1 { font-size: clamp(31px, 4.8vw, 56px); }
.lede { font-size: 18.5px; color: var(--ink-2); max-width: 34em; }
html[lang="ja"] .lede { font-size: 17px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn { display: inline-flex; align-items: center; gap: 10px; height: 50px; padding: 0 20px; border-radius: 12px; font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn-soon { background: var(--ink); color: var(--paper); cursor: default; }
.btn-soon small { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding: 4px 7px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 6px; }
.btn-ghost { background: var(--key); box-shadow: var(--key-shadow); color: var(--ink); transition: transform .15s, box-shadow .15s; }
.btn-ghost:hover { transform: translateY(1px); box-shadow: 0 0 0 #CFCAC2, 0 1px 2px rgba(20, 16, 10, .12); }
.fine { margin-top: 18px; font: 500 12.5px/1.7 var(--mono); color: var(--muted); }
.enter { opacity: 0; transform: translateY(12px); animation: enter .7s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: var(--d, 0s); }
@keyframes enter { to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .hero { padding: 44px 0 64px; } .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

/* ヒーローのモック(ターミナル + キーボード面)。cqw で面幅に追従させる */
.device { container-type: inline-size; filter: drop-shadow(0 30px 50px rgba(20, 16, 10, .22)); }
.term { background: var(--dark); color: var(--dark-text); border-radius: 14px 14px 0 0; padding: 3.2cqw 3.6cqw 2.8cqw; font: 500 clamp(10px, 2.5cqw, 14px)/1.7 var(--mono); }
.term .dim { color: var(--dark-muted); }
.term .pr { color: var(--accent); }
.term-in { margin-top: 1em; }
.typed { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; width: 7ch; animation: type 1.1s steps(7) 1s both; }
@keyframes type { from { width: 0; } to { width: 7ch; } }
.caret { display: inline-block; width: .6em; height: 1.1em; margin-left: 1px; background: var(--dark-text); vertical-align: -.18em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.kbd { background: var(--paper-2); border-radius: 0 0 16px 16px; padding: 1.4cqw 1.6cqw 1.9cqw; }
.kbd-bar { display: flex; align-items: center; gap: 1.6cqw; height: 6cqw; margin-bottom: 1.2cqw; color: var(--ink-2); }
.kbd-bar svg { width: 3.4cqw; height: 3.4cqw; flex: none; }
.kbd-bar .on { color: var(--accent-ink); }
.kbd-bar .grow { flex: 1; }
.chip { font: 500 1.95cqw/1 var(--mono); padding: .9cqw 1.5cqw; border-radius: 1cqw; background: var(--key); box-shadow: var(--key-shadow); color: var(--ink); white-space: nowrap; }
.chip-on { background: var(--ink); color: var(--paper); box-shadow: none; }
.pad { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1cqw; margin-bottom: 1.6cqw; }
.pad .chip { text-align: center; padding: 1.4cqw 0; }
.pad .press { background: var(--key-press); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); }
.row { display: flex; gap: 1.1cqw; margin-top: 1.1cqw; }
.key { flex: var(--u, 1) 1 0; min-width: 0; height: 6.4cqw; display: flex; align-items: center; justify-content: center; background: var(--key); border-radius: .9cqw; box-shadow: var(--key-shadow); font: 500 2.2cqw/1 var(--mono); color: var(--ink); }
.key.fn { background: var(--key-fn); font-size: 1.9cqw; }
.key.on { background: var(--accent); color: #fff; box-shadow: 0 1px 0 #B53B00, 0 2px 6px rgba(255, 84, 2, .35); }
.key.dot { position: relative; }
.key.dot::after { content: ""; position: absolute; top: .9cqw; right: .9cqw; width: 1.1cqw; height: 1.1cqw; border-radius: 50%; background: var(--accent); }
.key.stack { flex-direction: column; gap: .5cqw; }
.key.stack span { font-size: 1.5cqw; line-height: 1; }
.key.sp { background: var(--key); }

/* 課題(ダーク帯) */
.problem { background: var(--dark); color: var(--dark-text); padding: 88px 0; }
.problem h2 { font-size: clamp(28px, 3.8vw, 44px); max-width: 17em; }
.pains { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.pains li { border-top: 1px solid var(--dark-line); padding-top: 18px; color: var(--dark-muted); font-size: 16px; }
.pains .n { display: block; font: 500 12px/1 var(--mono); color: var(--accent); margin-bottom: 14px; letter-spacing: .12em; }
.pains code { color: var(--dark-text); font-size: .92em; }
.resolve { margin-top: 48px; font: 500 clamp(17px, 2.2vw, 22px)/1.5 var(--mono); color: var(--dark-text); }
.resolve::before { content: "❯ "; color: var(--accent); }
html[lang="ja"] .resolve { font-family: var(--sans); font-weight: 600; }
@media (max-width: 760px) { .pains { grid-template-columns: 1fr; } }

/* 機能カード */
.features { padding: 96px 0; }
.features h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 44px; max-width: 22em; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--key); border-radius: 20px; padding: 30px 30px 32px; box-shadow: var(--key-shadow); display: flex; flex-direction: column; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 16px; }
.card .demo { margin-top: auto; padding-top: 28px; }
.card > .kc { align-self: flex-start; }
.card .demo-twelve { padding-top: 112px; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } .card { padding: 24px; } }

.mods { display: grid; gap: 10px; }
.mods div { display: flex; align-items: center; gap: 14px; font: 500 13.5px/1.4 var(--mono); color: var(--ink-2); }
.mods .kc { font-size: 1.05rem; margin: 0; flex: none; }
.mods b { color: var(--ink); font-weight: 600; }
html[lang="ja"] .mods div { font-family: var(--sans); font-size: 14px; }

.pads { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pads h4 { font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font: 500 12.5px/1 var(--mono); padding: 8px 10px; border-radius: 8px; background: var(--paper-2); color: var(--ink); }
@media (max-width: 480px) { .pads { grid-template-columns: 1fr; } }

.demo-twelve { padding-top: 92px; }
.twelve { position: relative; display: grid; grid-template-columns: repeat(3, 54px); gap: 7px; width: max-content; }
.twelve span { height: 42px; display: grid; place-items: center; background: var(--paper-2); border-radius: 8px; font: 500 17px/1 var(--sans); }
.twelve .press { background: var(--key-press); }
.guide { position: absolute; left: 58px; top: -84px; display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(3, 26px); gap: 1px; padding: 5px; background: var(--key); border-radius: 10px; box-shadow: 0 10px 24px -8px rgba(20, 16, 10, .35), var(--key-shadow); }
.guide span { background: none; height: auto; font-size: 14px; }
.guide .c { color: var(--accent-ink); font-weight: 700; }

.trackpad { position: relative; height: 96px; border-radius: 12px; background: var(--paper-2); overflow: hidden; }
.trackpad::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--line) 1px, transparent 1.2px); background-size: 12px 12px; opacity: .8; }
.trackpad .f1, .trackpad .f2 { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--accent); opacity: .7; }
.trackpad .f1 { left: 22%; top: 36%; }
.trackpad .f2 { left: 32%; top: 52%; }
.trackpad .cur { position: absolute; right: 18%; top: 28%; width: 18px; height: 18px; }

/* プライバシー帯 */
.privacy { background: var(--paper-2); padding: 88px 0; }
.privacy .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.privacy h2 { font: 600 clamp(30px, 4.4vw, 52px)/1.08 var(--mono); letter-spacing: -.03em; }
.privacy h2 em { font-style: normal; color: var(--accent-ink); }
html[lang="ja"] .privacy h2 { font-family: var(--sans); font-size: clamp(26px, 4vw, 44px); line-height: 1.3; letter-spacing: 0; }
.privacy p { color: var(--ink-2); }
.privacy .more { display: inline-block; margin-top: 18px; font: 600 15px/1 var(--sans); color: var(--ink); }
@media (max-width: 860px) { .privacy .wrap { grid-template-columns: 1fr; gap: 24px; } }

/* 動作環境・注記 */
.faq { padding: 96px 0; }
.faq h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 14px 0 36px; }
.faq dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 40px; margin: 0; }
.faq dt { font-weight: 600; font-size: 17px; margin-bottom: 8px; }
.faq dd { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.faq a { color: var(--accent-ink); }
@media (max-width: 760px) { .faq dl { grid-template-columns: 1fr; } }

/* フッター */
.site-foot { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { color: var(--ink-2); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

/* 文書ページ(プライバシー / サポート / 404) */
.doc { padding: 64px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 4.5vw, 44px); margin: 10px 0 12px; }
.doc .meta { font: 500 13px/1.7 var(--mono); color: var(--muted); }
.doc h2 { font-size: 21px; margin: 44px 0 12px; }
.doc h3 { font-size: 17px; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--ink-2); font-size: 16.5px; }
.doc p + p { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.3em; margin: 10px 0; }
.doc li { margin: 6px 0; }
.doc .box { background: var(--key); border-radius: 14px; padding: 20px 22px; box-shadow: var(--key-shadow); margin: 22px 0; }
.doc .box p { margin: 0; }
.doc a { color: var(--accent-ink); }
.doc code { font-size: .9em; background: var(--paper-2); padding: 2px 6px; border-radius: 5px; }
.center { text-align: center; padding: 120px 0; }
.center .kc { font-size: 2rem; margin-bottom: 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .enter { animation: none; opacity: 1; transform: none; }
  .typed { animation: none; width: auto; }
  .caret { animation: none; }
}
