:root {
  --bg: #1f1d24;
  --bg-raised: #29262f;
  --line: #3a3642;
  --text: #ece6de;
  --muted: #a8a098;
  --accent: #ee8a63;
  --accent-2: #e2a668;
  --radius: 14px;
  --max: 1040px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 20px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand b { font-weight: 650; }
.brand span { color: var(--muted); font-weight: 400; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 84px 0 56px; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 18px; font-weight: 650; max-width: 760px; }
.hero p { color: var(--muted); font-size: 19px; max-width: 640px; margin: 0; }

/* Sections */
section { padding: 40px 0; }
section > .wrap > h2 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 600; margin: 0 0 18px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .media { aspect-ratio: 16 / 9; background: #18161c; display: block; }
.card .media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-size: 21px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); }
.card .meta { font-size: 14px; color: var(--muted); }
.card .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }

.app { display: flex; gap: 18px; align-items: center; padding: 22px; }
.app img { width: 88px; height: 88px; border-radius: 20px; flex: none; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-size: 15px; font-weight: 600; border: 1px solid var(--line); color: var(--text); background: transparent; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent-2)); color: #1f1d24; border: 0; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.disabled { color: var(--muted); cursor: default; }
.btn.disabled:hover { border-color: var(--line); }

.about { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 760px; }
.about p { margin: 0; }
.muted { color: var(--muted); }

.contact { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.contact .email { font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }

/* Product page */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.gallery img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.features { columns: 2 320px; column-gap: 36px; padding-left: 20px; margin: 0; }
.features li { margin: 0 0 8px; break-inside: avoid; }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec td { border-top: 1px solid var(--line); padding: 10px 8px; vertical-align: top; }
.spec td:first-child { color: var(--muted); width: 34%; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: #18161c; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
pre { background: #18161c; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
pre code { background: none; border: 0; padding: 0; }

/* Support page */
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin: 34px 0 10px; letter-spacing: -0.01em; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 26px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { gap: 14px; font-size: 14px; }
  .site-footer .wrap { flex-direction: column; }
  .nav .hide-sm { display: none; }
  .hero { padding: 56px 0 36px; }
  .app { flex-direction: column; align-items: flex-start; }
}

section > .wrap.prose > h2 { margin-top: 38px; }
