/* ============================================================
   test-domain.ru — лендинг проектов
   Тёмная modern-тема, адаптивная сетка карточек.
   ============================================================ */

:root {
  --bg: #0d0f1a;
  --bg-soft: #141827;
  --card: #171b2d;
  --card-hover: #1d2238;
  --border: #262c46;
  --text: #e7eaf6;
  --muted: #9aa3c0;
  --accent: #6c8cff;
  --accent-2: #22d3ee;
  --radius: 16px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1000px 500px at 80% -10%, rgba(108, 140, 255, 0.16), transparent 60%),
    radial-gradient(800px 400px at 0% 10%, rgba(34, 211, 238, 0.1), transparent 55%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(var(--max), 92%);
  margin: 0 auto;
}

/* ---------- Шапка ---------- */

.hero {
  padding: 72px 0 40px;
  text-align: center;
}

.hero .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
}

.hero .logo::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px var(--accent-2);
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.hero h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

/* ---------- Секции ---------- */

.section {
  padding: 32px 0 16px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.3px;
}

/* ---------- Сетка карточек ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.grid--primary {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

/* ---------- Карточка ---------- */

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #38406a;
  background: var(--card-hover);
}

.card__shot {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0a0c15;
  overflow: hidden;
}

.card__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0b0d16;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 18px 18px 20px;
}

.card__body h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
}

.card__host {
  margin-top: -6px;
  color: var(--accent-2);
  font-size: 12.5px;
  word-break: break-all;
  opacity: 0.85;
}

.card__desc {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
}

.card__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  color: #0b0d16;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: filter 0.15s ease;
}

.card__link:hover {
  filter: brightness(1.12);
}

/* ---------- Подвал ---------- */

.footer {
  margin-top: 56px;
  padding: 26px 0 40px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.footer a {
  color: var(--accent);
}

/* ---------- Адаптив ---------- */

@media (max-width: 560px) {
  .hero {
    padding-top: 48px;
  }

  .grid,
  .grid--primary {
    grid-template-columns: 1fr;
  }
}
