/* ===========================
   keyboard-arabic.org — Minimalist Design
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:         #fafaf9;
  --bg2:        #f3f2f0;
  --surface:    #ffffff;
  --border:     #e5e3df;
  --border-strong: #c9c5be;
  --text:       #18181b;
  --text-2:     #52525b;
  --muted:      #a1a1aa;
  --accent:     #1a6fe8;
  --brand:      #1a6fe8;
  --accent-dim: rgba(26, 111, 232, 0.08);
  --accent-mid: rgba(26, 111, 232, 0.18);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  18px;
  --font-head:  'Instrument Serif', Georgia, serif;
  --font-body:  'DM Sans', -apple-system, sans-serif;
  --ease:       cubic-bezier(.25, .46, .45, .94);
  --transition: .22s var(--ease);
}

[data-theme="dark"] {
  --bg:         #0f0f0f;
  --bg2:        #161616;
  --surface:    #1c1c1c;
  --border:     #2a2a2a;
  --border-strong: #3f3f3f;
  --text:       #fafafa;
  --text-2:     #a8a8a8;
  --muted:      #5a5a5a;
  --accent:     #4a8ff5;
  --brand:      #4a8ff5;
  --accent-dim: rgba(74, 143, 245, 0.1);
  --accent-mid: rgba(74, 143, 245, 0.2);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.3);
  --shadow:     0 4px 20px rgba(0,0,0,.4);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Navigation ─── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 2px 12px rgba(0,0,0,.04);
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] nav {
  background: rgba(15,15,15,0.85);
}

.nav-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 64px;
}

.logo {
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 600;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.02em;
}

.logo-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  background: none;
}

.nav-links {
  display: flex; align-items: center; gap: 24px;
  list-style: none;
}

.nav-links a {
  font-size: .825rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  transition: color var(--transition);
  letter-spacing: -.005em;
}

.nav-links a:hover { color: var(--text); }

.nav-right { display: flex; align-items: center; gap: 10px; }

/* ─── Theme Toggle ─── */
.theme-toggle {
  width: 72px; height: 34px;
  background: var(--bg2);
  border: 1.5px solid var(--border-strong);
  border-radius: 34px;
  cursor: pointer; position: relative;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
  display: flex; align-items: center;
  padding: 0 6px;
  justify-content: space-between;
}

.theme-toggle::after {
  content: '';
  position: absolute; top: 4px; left: 4px;
  width: 24px; height: 24px;
  background: var(--surface);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  z-index: 1;
}

[data-theme="dark"] .theme-toggle {
  background: #1e2a3a;
  border-color: #2d3f55;
}
[data-theme="dark"] .theme-toggle::after {
  transform: translateX(36px);
  background: #2a3f5a;
}

.theme-icon {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  position: relative; z-index: 0;
  pointer-events: none;
  color: var(--muted);
  flex-shrink: 0;
}

.theme-icon svg { width: 13px; height: 13px; }

[data-theme="dark"] .theme-icon.moon { color: #7ab3e8; }
[data-theme="light"] .theme-icon.sun { color: #e8a020; }

/* ─── Hero ─── */
.hero {
  max-width: 1160px; margin: 0 auto;
  padding: 72px 28px 56px;
  display: flex; flex-direction: column; align-items: center;
  gap: 40px; text-align: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  padding: 4px 12px; border-radius: 100px;
  font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 16px;
}

.hero-badge::before { content: ''; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 20px;
  color: var(--text);
}

h1 em { font-style: italic; color: var(--accent); }

.hero-desc {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 0;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
  line-height: 1.7;
  font-weight: 400;
}

/* ─── Tool Wrap ─── */
.tool-wrap {
  width: 100%; max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px 48px;
}

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2);
}

.panel-title {
  font-size: .8rem; font-weight: 600;
  color: var(--text); letter-spacing: .03em;
  text-transform: uppercase;
}

.panel-meta {
  font-size: .75rem; color: var(--muted);
  font-weight: 500;
}

.panel-body { padding: 20px; }

/* ─── Arabic Text Area ─── */
textarea#arabicOutput {
  width: 100%;
  min-height: 130px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  padding: 16px 20px;
  font-family: 'Noto Naskh Arabic', 'Amiri', 'Arial Unicode MS', Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 2;
  color: var(--text);
  direction: rtl;
  text-align: right;
  transition: border-color var(--transition), box-shadow var(--transition);
  margin-bottom: 20px;
}

textarea#arabicOutput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

textarea#arabicOutput::placeholder {
  color: var(--muted);
  font-size: 1rem;
  direction: rtl;
}

/* ─── Virtual Keyboard — Windows Style ─── */
.vkb-wrap { margin-top: 4px; user-select: none; }

.vkb-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 4px;
  flex-wrap: nowrap;
}

.vkb-row-fn { margin-bottom: 8px; }

.vkb-row-bottom { align-items: center; }

/* Base key */
.vkb-key {
  min-width: 46px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .08s ease, transform .08s ease, box-shadow .08s ease;
  user-select: none;
  position: relative;
  padding: 0 5px;
  box-shadow: 0 2px 0 var(--border-strong);
  flex-shrink: 0;
}

.vkb-key:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  border-bottom-color: #1055c0;
  box-shadow: 0 2px 0 #1055c0;
  z-index: 1;
}

.vkb-key.key-pressed,
.vkb-key:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--border-strong);
  border-bottom-width: 1px;
  background: var(--bg2);
}

.vkb-key.key-active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* Arabic letter keys */
.vkb-key .ar {
  font-family: 'Noto Naskh Arabic', 'Amiri', Arial, sans-serif;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text);
  display: block;
}

.vkb-key:hover .ar { color: var(--accent); }

.vkb-key .lat {
  font-family: var(--font-body);
  font-size: .5rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
  margin-top: 2px;
  text-transform: uppercase;
}

/* Number row keys (top+bottom label) */
.vkb-key-num {
  min-width: 44px;
  height: 48px;
  justify-content: space-between;
  padding: 4px 6px 3px;
}

.vkb-key-num .top-ar {
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 500;
  color: var(--text-2);
  align-self: flex-start;
}

.vkb-key-num .bot-ar {
  font-family: 'Noto Naskh Arabic', Arial, sans-serif;
  font-size: 1rem;
  color: var(--text);
  align-self: flex-end;
  line-height: 1;
}

.vkb-key-num .lat {
  display: none;
}

/* Function keys row */
.vkb-key-fn {
  min-width: 38px;
  height: 38px;
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .02em;
}

.vkb-key-fn:hover { color: var(--accent); }

/* Wide utility keys */
.vkb-key-wide {
  min-width: 80px;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .02em;
  flex-direction: row;
  gap: 4px;
}

.vkb-key-wide:hover { color: var(--accent); }

/* Delete / Backspace */
.vkb-key-del {
  background: #fff5f5;
  border-color: #fecaca;
  border-bottom-color: #f87171;
  box-shadow: 0 2px 0 #f87171;
  color: #dc2626;
}

[data-theme="dark"] .vkb-key-del {
  background: #2d1515;
  border-color: #6b2020;
  border-bottom-color: #8b3030;
  box-shadow: 0 2px 0 #8b3030;
  color: #f87171;
}

.vkb-key-del:hover {
  background: #ef4444;
  border-color: #ef4444;
  border-bottom-color: #b91c1c;
  box-shadow: 0 2px 0 #b91c1c;
  color: white;
}

/* Enter key */
.vkb-key-enter {
  min-width: 90px;
  background: #f0fdf4;
  border-color: #86efac;
  border-bottom-color: #16a34a;
  box-shadow: 0 2px 0 #16a34a;
  color: #15803d;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  flex-direction: row;
  gap: 4px;
}

[data-theme="dark"] .vkb-key-enter {
  background: #0d2d1a;
  border-color: #1a5c34;
  border-bottom-color: #16a34a;
  box-shadow: 0 2px 0 #16a34a;
  color: #4ade80;
}

.vkb-key-enter:hover {
  background: #22c55e;
  border-color: #22c55e;
  border-bottom-color: #15803d;
  box-shadow: 0 2px 0 #15803d;
  color: white;
}

/* Action keys (Tab, CapsLock) */
.vkb-key-action {
  min-width: 72px;
  background: var(--bg2);
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-2);
  flex-direction: row;
  gap: 4px;
}

/* Real Shift key (left) */
.vkb-key-real-shift {
  min-width: 110px;
  background: var(--bg2);
  border-color: var(--border);
  border-bottom-color: var(--border-strong);
  box-shadow: 0 2px 0 var(--border-strong);
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  flex-direction: row;
  gap: 5px;
}

.vkb-key-real-shift:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  border-bottom-color: #1055c0;
  box-shadow: 0 2px 0 #1055c0;
  color: var(--accent);
}

.vkb-key-real-shift.key-active {
  background: var(--accent);
  border-color: var(--accent);
  border-bottom-color: #1055c0;
  box-shadow: 0 2px 0 #1055c0;
  color: white;
}
  min-width: 110px;
  background: #fffbf0;
  border-color: #fde68a;
  border-bottom-color: #d97706;
  box-shadow: 0 2px 0 #d97706;
  color: #92400e;
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 600;
  flex-direction: row;
  gap: 5px;
}

[data-theme="dark"] .vkb-key-shift {
  background: #2d2000;
  border-color: #7a5500;
  border-bottom-color: #d97706;
  box-shadow: 0 2px 0 #d97706;
  color: #fbbf24;
}

.vkb-key-shift:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  border-bottom-color: #b45309;
  box-shadow: 0 2px 0 #b45309;
  color: white;
}

.shift-icon { font-size: .9rem; }
.shift-label { font-size: .68rem; font-weight: 700; }

/* Modifier keys (Ctrl, Alt, Win, Fn) */
.vkb-key-mod {
  min-width: 54px;
  background: var(--bg2);
  font-family: var(--font-body);
  font-size: .65rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: .03em;
}

.vkb-key-win {
  min-width: 44px;
  color: #0078d4;
}

[data-theme="dark"] .vkb-key-win { color: #4a9fe8; }

/* Space bar */
.vkb-key-space {
  min-width: 280px;
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: .08em;
  text-transform: uppercase;
  flex-direction: row;
}

/* Arrow keys cluster */
.vkb-arrows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}

.arrow-row {
  display: flex;
  gap: 3px;
}

.vkb-key-arrow {
  min-width: 38px;
  height: 38px;
  font-size: .75rem;
  color: var(--text-2);
}

/* Search bar */
.search-bar {
  margin-top: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  animation: fadeUp .2s ease both;
}

.search-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: wrap;
}

.search-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.search-query {
  font-family: 'Noto Naskh Arabic', Arial, sans-serif;
  font-size: .9rem;
  direction: rtl;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  flex: 1;
  min-width: 100px;
  max-width: 400px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-go {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 16px;
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition);
}

.search-go:hover { opacity: .85; }

.search-cancel {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: .8rem;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--transition);
}

.search-cancel:hover { color: var(--text); }

/* ─── Options Bar ─── */
.options-bar {
  max-width: 1100px; margin: 0 auto;
  padding: 0 28px 16px;
}

.options-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.options-title {
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 14px;
}

.options-grid {
  display: flex; flex-wrap: wrap; gap: 10px;
}

.opt-toggle {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: .8rem; font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
  user-select: none;
}

.opt-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.opt-toggle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.opt-toggle .icon { font-size: .9rem; }

/* ─── Action Bar ─── */
.action-bar {
  max-width: 1100px; margin: 0 auto;
  padding: 0 28px 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-family: var(--font-body); font-weight: 600; font-size: .875rem;
  cursor: pointer; letter-spacing: -.01em;
  transition: opacity var(--transition), transform var(--transition);
}

.btn-primary:hover { opacity: .88; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: var(--font-body); font-weight: 500; font-size: .875rem;
  cursor: pointer; letter-spacing: -.01em;
  transition: all var(--transition);
}

.btn-secondary:hover { border-color: var(--border-strong); color: var(--text); }

.btn-copy {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-family: var(--font-body); font-weight: 500; font-size: .875rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-left: auto;
}

.btn-copy:hover { border-color: var(--accent); color: var(--accent); }
.btn-copy.copied { background: #f0fdf4; border-color: #86efac; color: #15803d; }

/* ─── Stats Bar ─── */
.stats-bar {
  max-width: 1100px; margin: 0 auto;
  padding: 0 28px 48px;
  display: flex; gap: 12px; flex-wrap: wrap;
}

.stat-chip {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: .775rem; color: var(--muted); font-weight: 500;
  display: flex; align-items: center; gap: 6px;
}

.stat-chip strong { color: var(--accent); }

/* ─── Sections ─── */
.section {
  padding: 72px 28px;
  border-top: 1px solid var(--border);
}

.section-inner { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent); margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.5vw, 2.9rem);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -.01em;
  margin-bottom: 14px;
}

.section-desc { font-size: .95rem; color: var(--text-2); max-width: 520px; line-height: 1.7; }

.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; margin-top: 48px;
}

.feat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.feat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.feat-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 16px;
  border: 1px solid var(--accent-mid);
}

.feat-title { font-weight: 600; font-size: .95rem; margin-bottom: 8px; letter-spacing: -.01em; }
.feat-desc { font-size: .825rem; color: var(--text-2); line-height: 1.65; }

/* ─── Steps ─── */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; margin-top: 48px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden;
}

.step {
  padding: 32px 28px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.step:last-child { border-right: none; }

.step-num {
  font-family: var(--font-head);
  font-size: 2.2rem; color: var(--accent);
  font-weight: 400; line-height: 1; margin-bottom: 14px;
  opacity: .6;
}

.step-title { font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.step-desc { font-size: .825rem; color: var(--text-2); line-height: 1.65; }

/* ─── FAQ ─── */
.faq-list { margin-top: 40px; display: flex; flex-direction: column; gap: 2px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--transition);
}

.faq-item.open { border-color: var(--accent); }

.faq-q {
  padding: 18px 22px;
  font-weight: 600; font-size: .9rem;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  user-select: none;
}

.faq-q:hover { background: var(--bg2); }

.faq-chevron {
  flex-shrink: 0; transition: transform var(--transition);
  color: var(--muted); font-size: .75rem;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }

.faq-a {
  display: none;
  padding: 0 22px 18px;
  font-size: .875rem; color: var(--text-2); line-height: 1.75;
}

.faq-item.open .faq-a { display: block; }

/* ─── CTA ─── */
.cta-banner {
  background: var(--accent);
  padding: 72px 28px;
  text-align: center;
  color: white;
}

.cta-banner h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; margin-bottom: 14px; line-height: 1.15;
  color: white;
}

.cta-banner p { opacity: .88; font-size: .95rem; margin-bottom: 28px; }

.cta-btn-white {
  display: inline-flex; align-items: center; gap: 8px;
  background: white; color: var(--accent);
  border: none; border-radius: var(--radius-sm);
  padding: 13px 28px;
  font-family: var(--font-body); font-weight: 600; font-size: .9rem;
  cursor: pointer; text-decoration: none;
  transition: opacity var(--transition), transform var(--transition);
}

.cta-btn-white:hover { opacity: .9; transform: translateY(-1px); }

/* ─── Footer ─── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 56px 28px 32px;
}

.footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}

.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: .825rem; color: var(--text-2); line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin-bottom: 14px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: .825rem; color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  max-width: 1160px; margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .775rem; color: var(--muted);
  flex-wrap: wrap; gap: 10px;
}

/* ─── Inner Pages ─── */
.page-hero {
  border-bottom: 1px solid var(--border);
  padding: 72px 28px;
  text-align: center;
}

.page-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin-bottom: 14px; }
.page-hero p { color: var(--text-2); font-size: 1rem; }

.page-content {
  max-width: 720px; margin: 72px auto;
  padding: 0 28px;
}

.page-content h2 {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight: 400;
  margin: 44px 0 14px; color: var(--text); letter-spacing: -.01em;
}

.page-content h2:first-child { margin-top: 0; }

.page-content p {
  color: var(--text-2); font-size: .9rem;
  line-height: 1.8; margin-bottom: 16px;
}

.page-content ul {
  color: var(--text-2); font-size: .9rem;
  line-height: 1.8; margin-bottom: 16px;
  padding-left: 18px;
}

.page-content ul li { margin-bottom: 8px; }

/* ─── Contact ─── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }

.contact-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  border: 1px solid var(--border);
}

.contact-item h4 { font-weight: 600; margin-bottom: 3px; font-size: .9rem; }
.contact-item p { font-size: .825rem; color: var(--text-2); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block; font-size: .8rem; font-weight: 600;
  margin-bottom: 7px; color: var(--text); letter-spacing: -.005em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: .875rem; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.form-submit {
  width: 100%; padding: 12px;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500; font-size: .925rem;
  cursor: pointer; letter-spacing: -.01em;
  transition: opacity var(--transition), transform var(--transition);
}

.form-submit:hover { opacity: .85; transform: translateY(-1px); }

.success-msg {
  background: #f0fdf4; color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm); padding: 11px 14px;
  font-size: .825rem; margin-top: 12px;
}

/* ─── Hamburger ─── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1;
}

.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 99;
  padding: 12px 0 16px;
}

.nav-mobile-menu.open { display: block; }

.nav-mobile-menu ul {
  list-style: none;
  padding: 0 16px;
  display: flex; flex-direction: column; gap: 2px;
}

.nav-mobile-menu ul li a {
  display: block; padding: 12px 8px;
  font-size: .9rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.nav-mobile-menu ul li a:hover { background: var(--bg2); color: var(--text); }

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .55s var(--ease) both; }
.fade-up-1 { animation-delay: .06s; }
.fade-up-2 { animation-delay: .14s; }
.fade-up-3 { animation-delay: .22s; }
.fade-up-4 { animation-delay: .30s; }

/* ─── Responsive ─── */
/* Keyboard scroll wrapper for small screens */
.vkb-scroll { overflow-x: auto; padding-bottom: 6px; }
.vkb-scroll::-webkit-scrollbar { height: 4px; }
.vkb-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

@media (max-width: 1100px) {
  .vkb-wrap { overflow-x: auto; padding-bottom: 6px; }
  .vkb-row { flex-wrap: nowrap; justify-content: flex-start; min-width: 680px; }
  .vkb-row-bottom { min-width: 680px; }
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .vkb-key { min-width: 38px; height: 44px; }
  .vkb-key-fn { min-width: 30px; height: 34px; font-size: .58rem; }
  .vkb-key-num { min-width: 38px; height: 44px; }
  .vkb-key-space { min-width: 200px; }
  .vkb-key-shift { min-width: 80px; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 16px; height: 56px; }
  .nav-links { display: none; }
  .logo { font-size: .9rem; }
  .logo-icon { width: 28px; height: 28px; }
  .logo-icon svg { width: 28px; height: 28px; }
  .nav-hamburger { display: flex; align-items: center; }

  .hero { padding: 40px 16px 40px; gap: 28px; }
  h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero-desc { font-size: .9rem; }

  .tool-wrap, .options-bar, .action-bar, .stats-bar { padding-left: 16px; padding-right: 16px; }

  .vkb-key { min-width: 34px; height: 40px; }
  .vkb-key .lat { display: none; }
  .vkb-key .ar { font-size: 1rem; }
  .vkb-key-fn { min-width: 28px; height: 30px; font-size: .52rem; }
  .vkb-key-num .top-ar { font-size: .55rem; }
  .vkb-key-space { min-width: 160px; }
  .vkb-key-shift { min-width: 64px; }
  .vkb-key-mod { min-width: 40px; font-size: .58rem; }
  .vkb-key-wide { min-width: 56px; font-size: .58rem; }
  .vkb-key-enter { min-width: 68px; font-size: .58rem; }
  .vkb-row { gap: 3px; min-width: 560px; }
  .panel-body { overflow-x: auto; }

  .action-bar { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-secondary, .btn-copy { width: 100%; justify-content: center; }
  .btn-copy { margin-left: 0; }

  .section { padding: 48px 16px; }
  .features-grid { grid-template-columns: 1fr; margin-top: 28px; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }

  .cta-banner { padding: 48px 16px; }
  .cta-btn-white { width: 100%; justify-content: center; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  footer { padding: 40px 16px 80px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
  .page-hero { padding: 40px 16px; }
  .contact-form { padding: 24px 18px; }
  body { padding-bottom: 72px; }
}
