:root {
  --bg: #0f0f10;
  --surface: #18181b;
  --line: #2a2a2e;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #c6f432;
  --accent-ink: #0f0f10;
  --radius: 20px;
  --gutter: 24px;
  --section: clamp(56px, 6vw, 80px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font: 17px/1.6 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: Unbounded, sans-serif; line-height: 1.1; letter-spacing: -.02em; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }
section { padding-block: var(--section); }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 16px max(var(--gutter), calc((100% - 1200px) / 2 + var(--gutter))); background: rgba(15,15,16,.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { font-family: Unbounded; font-weight: 700; font-size: 20px; }
.logo span { color: var(--accent); }
.nav nav { display: flex; gap: 28px; align-items: center; font-size: 15px; }
.nav nav a:not(.nav-cta) { color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.nav-cta { padding: 9px 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* buttons */
.btn { display: inline-flex; align-items: center; padding: 15px 26px; border-radius: 999px; font-weight: 700; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface); }

/* hero */
.hero { padding-top: clamp(56px, 7vw, 96px); }
.eyebrow { display: inline-flex; gap: 10px; align-items: center; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero h1 { font-size: clamp(36px, 6.4vw, 80px); margin: 28px 0 24px; max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 48px; margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }
.stats li { display: flex; gap: 14px; align-items: center; }
.stats b { font-family: Unbounded; font-size: 40px; }
.stats span { color: var(--muted); font-size: 14px; line-height: 1.35; }

/* sections */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 5vw, 56px); }
.section-head p { color: var(--muted); max-width: 44ch; }

/* work grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .25s, transform .25s; }
.card:hover { border-color: #3f3f46; transform: translateY(-4px); }
.card:first-child { grid-column: 1 / -1; }
.shot { position: relative; aspect-ratio: 16/10; overflow: hidden; cursor: pointer; background: #222; border: 0; padding: 0; width: 100%; }
.card:first-child .shot { aspect-ratio: 16/8; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s; }
.shot:hover img { transform: scale(1.03); }
.shot::after { content: "Посмотреть сайт"; position: absolute; inset: auto 16px 16px auto; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 14px Manrope; opacity: 0; transform: translateY(8px); transition: .25s; }
.shot:hover::after, .shot:focus-visible::after { opacity: 1; transform: none; }
.card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: baseline; }
.card h3 { font-size: 22px; }
.card .kind { font-size: 13px; color: var(--muted); white-space: nowrap; }
.card p { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.tags li { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: #242428; color: #d4d4d8; }
.card-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.card-actions .btn { padding: 11px 18px; font-size: 14px; }
.card-actions button.btn { cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: inherit; background: none; }
.card-actions button.btn-primary { background: var(--accent); color: var(--accent-ink); border: 0; }

/* services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.services article { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: flex; flex-direction: column; gap: 12px; }
.services h3 { font-size: 20px; }
.services p { color: var(--muted); font-size: 15px; flex: 1; }
.services b { color: var(--accent); }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.steps li { counter-increment: s; color: var(--muted); font-size: 15px; padding-top: 20px; border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); display: block; font: 700 14px Unbounded; color: var(--accent); margin-bottom: 8px; }
.steps b { display: block; color: var(--text); font-size: 17px; }

/* contact */
.contact { text-align: center; }
.contact h2 { font-size: clamp(30px, 5vw, 56px); max-width: 18ch; margin: 0 auto 16px; }
.contact p { color: var(--muted); }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* viewer */
dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; background: #09090b; color: var(--text); }
dialog::backdrop { background: rgba(0,0,0,.7); }
dialog[open] { display: flex; flex-direction: column; }
.viewer-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.viewer-bar b { font-family: Unbounded; font-size: 15px; margin-right: auto; }
.devices { display: flex; background: var(--surface); border-radius: 999px; padding: 4px; }
.devices button { border: 0; background: none; color: var(--muted); padding: 7px 14px; border-radius: 999px; font: 500 14px Manrope; cursor: pointer; }
.devices button.active { background: var(--accent); color: var(--accent-ink); }
#viewer-open { font-size: 14px; color: var(--muted); }
#viewer-open:hover { color: var(--text); }
.close { border: 1px solid var(--line); background: none; color: var(--text); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 15px; }
.viewer-stage { flex: 1; display: flex; justify-content: center; padding: 16px; overflow: hidden; }
#viewer-frame { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #fff; transition: width .35s ease; }

@media (max-width: 900px) {
  .grid, .services { grid-template-columns: 1fr; }
  .card:first-child .shot { aspect-ratio: 16/10; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .devices button[data-w="768px"] { display: none; }
}
@media (max-width: 600px) {
  :root { --gutter: 20px; --section: 48px; }
  .hero { padding-top: 40px; }
  .section-head { margin-bottom: 32px; }
  .steps { margin-top: 32px; }
  .nav nav a:not(.nav-cta) { display: none; }
  .stats { gap: 24px; margin-top: 48px; }
  .stats b { font-size: 32px; }
  .card-body { padding: 20px; }
  .devices { display: none; }
  .viewer-stage { padding: 0; }
  #viewer-frame { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.card .note { color: var(--accent); font-size: 14px; }
.card .warn { display: inline-block; align-self: flex-start; padding: 6px 10px; border-radius: 8px; font-size: 13px; color: #ffb4a8; background: rgba(255, 99, 71, .12); border: 1px solid rgba(255, 99, 71, .35); }
