/* Общая тема (см. websites/DESIGN.md). Без внешних шрифтов и CDN. */
:root {
  --bg: #121212;
  --surface: #1a1c1f;
  --surface-2: #22252a;
  --border: #2c3036;
  --text: #e8eaed;
  --muted: #9aa0a6;
  --cyan: #00e5ff;
  --amber: #ff9100;
  --radius: 8px;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-tap-highlight-color: transparent;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--mono); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
section { padding: 56px 0; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.section-title::before { content: "//"; font-family: var(--mono); color: var(--cyan); }

/* header */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(18, 18, 18, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.logo { font-family: var(--mono); font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 22px; height: 22px; flex: none; color: var(--cyan); }
.nav-links { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { color: var(--muted); font-family: var(--mono); font-size: .85rem; padding: 8px 10px; border-radius: var(--radius); white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav-actions { display: flex; gap: 8px; flex: none; }
.nav-actions .btn { white-space: nowrap; }

/* buttons */
.btn {
  appearance: none; cursor: pointer; border: 1px solid transparent;
  border-radius: var(--radius); padding: 11px 18px; min-height: 44px;
  font: 600 .95rem var(--mono); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.btn-primary { background: var(--cyan); color: #00262b; }
.btn-primary:hover { box-shadow: 0 0 0 4px rgba(0, 229, 255, .18); }
.btn-secondary { background: transparent; color: var(--amber); border-color: var(--amber); }
.btn-secondary:hover { background: rgba(255, 145, 0, .1); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .8rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* hero */
.hero { position: relative; padding: 72px 0 56px; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(rgba(0, 229, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, .07) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 30% 20%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 0%, transparent 70%);
}
.hero > .container { position: relative; }
.hero .eyebrow { font: .8rem var(--mono); color: var(--cyan); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.hero p.lead { max-width: 62ch; color: var(--muted); font-size: 1.08rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* cards & grids */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: rgba(0, 229, 255, .5); transform: translateY(-2px); }
.card .thumb {
  aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--surface-2);
  border: 1px solid var(--border); display: grid; place-items: center; color: var(--cyan);
  background-image:
    linear-gradient(rgba(0, 229, 255, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, .08) 1px, transparent 1px);
  background-size: 16px 16px;
}
.card .thumb svg { width: 56px; height: 56px; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: .94rem; }
.specs { margin: 0; padding: 0; list-style: none; font: .82rem var(--mono); color: var(--muted); display: grid; gap: 4px; }
.specs li::before { content: "› "; color: var(--cyan); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font: 600 .72rem var(--mono); padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--cyan); background: rgba(0, 229, 255, .06); }
.badge-amber { color: var(--amber); background: rgba(255, 145, 0, .08); }
.price { font: 700 1.15rem var(--mono); color: var(--amber); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.status { font: .78rem var(--mono); display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }

/* contact + footer */
.contact-list { display: grid; gap: 12px; max-width: 520px; }
.contact-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-family: var(--mono); }
.contact-list a:hover { border-color: var(--cyan); text-decoration: none; }
.footer { border-top: 1px solid var(--border); padding: 24px 0 calc(24px + var(--safe-bottom)); color: var(--muted); font: .82rem var(--mono); }

/* bottom sheet (Mini App order form) */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 40; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; overflow: auto;
  background: var(--surface); border-top: 1px solid var(--border); border-radius: 16px 16px 0 0;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  width: min(560px, 100%); margin-inline: auto;
}
.sheet h3 { margin-bottom: 4px; }
.field { display: grid; gap: 6px; margin: 16px 0; }
.field label { font: .8rem var(--mono); color: var(--muted); }
.field textarea {
  width: 100%; min-height: 96px; resize: vertical; padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 1rem var(--sans);
}
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-bottom)); transform: translateX(-50%); z-index: 50;
  background: var(--surface-2); border: 1px solid var(--cyan); padding: 12px 18px; border-radius: var(--radius); font: .9rem var(--mono); }

@media (max-width: 640px) {
  section { padding: 40px 0; }
  .hero { padding: 48px 0 40px; }
  .nav-links a { padding: 8px 6px; font-size: .8rem; }
  .hide-sm { display: none; }
}
@media (max-width: 480px) {
  /* на узком экране кнопка действия важнее якорных ссылок */
  .nav-inner:has(.nav-actions .btn:not(.hidden)) .nav-links { display: none; }
  .nav-inner:has(.nav-actions .btn:not(.hidden)) .nav-actions { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
