:root {
  --bg: #f6f7fb;
  --white: #ffffff;
  --text: #151821;
  --muted: #697386;
  --border: #e4e7ee;
  --primary: #635bff;
  --primary-dark: #5048e5;
  --green: #16a34a;
  --red: #dc2626;
  --orange: #d97706;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(18, 24, 40, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, select, input { font: inherit; }

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,247,251,.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
  font-weight: 800;
}

.logo span {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
}

.nav nav {
  display: flex;
  gap: 25px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.hero {
  padding: 85px 0 65px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 55px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  letter-spacing: .14em;
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(43px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.hero-text {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
}

.actions {
  display: flex;
  gap: 12px;
  margin: 30px 0;
}

.button {
  border: 0;
  border-radius: 11px;
  padding: 13px 18px;
  font-weight: 750;
}

.primary {
  background: var(--primary);
  color: white;
}

.primary:hover { background: var(--primary-dark); }

.secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.hero-status,
.tool-card,
.panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-status {
  padding: 30px;
}

.online-dot {
  width: 10px;
  height: 10px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 7px #dcfce7;
}

.hero-status small {
  color: var(--muted);
  letter-spacing: .12em;
  font-weight: 800;
}

.hero-status h2 {
  margin: 5px 0 25px;
  font-size: 28px;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.status-grid div {
  padding: 15px;
  background: #fff;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.status-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status-grid b {
  display: block;
  margin-top: 4px;
}

.section {
  padding: 72px 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 30px;
  margin-bottom: 28px;
}

.section-heading h2,
.narrow h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.section-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  padding: 24px;
  text-align: left;
  color: var(--text);
  transition: transform .2s, box-shadow .2s;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 55px rgba(18,24,40,.13);
}

.tool-card > span {
  font-size: 28px;
}

.tool-card h3 {
  margin: 14px 0 7px;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tool-card.featured {
  background: linear-gradient(145deg, #fff, #f4f2ff);
  border-color: #bbb7ff;
}

.tool-area {
  padding-top: 35px;
}

.hidden { display: none !important; }

.back {
  border: 0;
  padding: 0;
  margin-bottom: 20px;
  background: transparent;
  color: var(--primary);
  font-weight: 750;
}

.tool-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 20px;
}

.tool-heading h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.tool-heading p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
}

.panel {
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: none;
}

.controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.select,
.range {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
}

.status {
  margin-top: 15px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #f3f4f7;
  color: var(--muted);
}

.status.good { background: #ecfdf3; color: var(--green); }
.status.bad { background: #fef2f2; color: var(--red); }
.status.warn { background: #fff7ed; color: var(--orange); }

.meter {
  height: 18px;
  overflow: hidden;
  margin: 18px 0;
  border-radius: 99px;
  background: #eceef3;
}

.meter-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg,#22c55e,#eab308,#ef4444);
  transition: width .08s;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  padding: 16px;
  border-radius: 13px;
  background: #f7f8fa;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat b {
  display: block;
  margin-top: 3px;
  font-size: 21px;
}

.canvas-box {
  background: #0d1118;
  border-radius: 14px;
  padding: 10px;
}

canvas {
  display: block;
  width: 100%;
  height: 220px;
}

video {
  display: block;
  width: 100%;
  max-height: 560px;
  background: #080a0e;
  border-radius: 14px;
}

.camera-box {
  position: relative;
}

.camera-info {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 7px 10px;
  border-radius: 8px;
  color: white;
  background: rgba(0,0,0,.65);
  font-size: 12px;
}

.key-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 150px;
}

.key {
  min-width: 42px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f1f3f7;
  text-align: center;
  font-size: 12px;
}

.key.active {
  border-color: #8d87ff;
  background: #e9e7ff;
  color: #4338ca;
}

.mouse-pad {
  height: 280px;
  display: grid;
  place-items: center;
  border: 2px dashed #cfd3df;
  border-radius: 16px;
  background: #fafbfc;
  color: var(--muted);
  user-select: none;
}

.mouse-pad.active {
  border-color: var(--primary);
  background: #f5f3ff;
}

.tone-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.color-test {
  height: 320px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #111;
  color: white;
  font-weight: 800;
}

.color-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.color-buttons button {
  width: 44px;
  height: 34px;
  border: 1px solid #bbb;
  border-radius: 8px;
}

.info-list {
  display: grid;
  gap: 8px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f7f8fa;
}

.info-row span { color: var(--muted); }

.privacy {
  background: #eef0f7;
}

.narrow {
  max-width: 800px;
}

.narrow p {
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
}

@media (max-width: 850px) {
  .hero-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr 1fr; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 10px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .nav nav { gap: 13px; }
  .hero { padding-top: 50px; }
  .hero h1 { font-size: 43px; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-heading { display: block; }
  .tool-heading h2 { font-size: 34px; }
  .stat-grid { grid-template-columns: 1fr; }
  .footer-inner { display: block; }
  .footer-inner span { display: block; margin: 5px 0; }
}
