/* ============================================================
   GRr / Secret Box — стили сайта
   Тёмная тема, акцент #ff4a4a (унаследован из Тильды)
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f8f8f8;
  --surface: #ffffff;
  --surface-2: #f1f1f4;
  --text: #101014;
  --text-muted: #5c5f68;
  --accent: #ff4a4a;
  --accent-hover: #e63c3c;
  --accent-soft: #fa8669;
  --border: rgba(0, 0, 0, 0.09);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding:0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }

p { margin-bottom: 1em; color: var(--text-muted); }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(64px, 9vw, 120px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head p { font-size: 1.15rem; }

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}
.btn--ghost:hover { border-color: var(--text-muted); background: rgba(255,255,255,0.04); }

/* ---------- шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}
.logo span { color: var(--accent); }

.nav { display: flex; gap: 32px; }
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.98rem;
  transition: color 0.15s ease;
}
.nav a:hover, .nav a.active { color: var(--text); }

.header-cta { display: inline-flex; }

.burger {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.25s ease;
}

.btn--ghost:hover { background: rgba(0, 0, 0, 0.04); }

/* мобильное меню */
@media (max-width: 900px) {
  .nav, .header-cta { display: none; }
  .burger { display: block; }

  .site-header.open .nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-soft);
    padding: 24px;
    gap: 18px;
    border-bottom: 1px solid var(--border);
  }
  .site-header.open .header-cta {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    transform: translateY(180px);
    padding: 0 24px 24px;
    background: var(--bg-soft);
    justify-content: center;
  }
}

/* ---------- герой-обложка (как на Тильде: фото сверху) ---------- */
.hero-cover {
  position: relative;
  min-height: clamp(420px, 62vw, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,0.72) 100%);
}

.hero-cover .container {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(36px, 6vw, 72px);
}

.hero-cover h1 { color: #fff; margin-bottom: 18px; max-width: 860px; }
.hero-cover .lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  max-width: 620px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-badges {
  display: flex;
  gap: 28px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-badges div strong {
  display: block;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  color: #fff;
}
.hero-badges div span { color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }

/* текстовый герой (внутренние страницы) */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 9vw, 120px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 400px at 80% 10%, rgba(255, 74, 74, 0.10), transparent 65%),
    radial-gradient(700px 500px at 15% 85%, rgba(250, 134, 105, 0.08), transparent 65%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 { margin-bottom: 24px; }
.hero .lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 36px;
}

.hero-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

.hero-badges--dark div strong { color: var(--text); }
.hero-badges--dark div span { color: var(--text-muted); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}

/* ---------- карточки / сетки ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1000px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 16px 40px rgba(15, 15, 20, 0.08);
}
.card .icon { font-size: 1.8rem; margin-bottom: 16px; }
.card h3 { margin-bottom: 10px; font-size: 1.15rem; letter-spacing: -0.02em; }
.card p { margin: 0; font-size: 0.98rem; }

/* карточка товара */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 16px 40px rgba(15, 15, 20, 0.08);
}
.product-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-card h3 { font-size: 1.05rem; }
.product-card .spec { color: var(--text-muted); font-size: 0.92rem; margin: 0; }
.product-card .more {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
}

/* карточка статьи */
.article-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
}
.article-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.article-card:hover img { transform: scale(1.06); }
.article-card .overlay {
  position: relative;
  width: 100%;
  padding: 28px;
  background: linear-gradient(transparent, rgba(10, 10, 14, 0.92));
}
.article-card h3 { margin-bottom: 6px; }
.article-card p { margin: 0; color: rgba(242, 243, 245, 0.75); font-size: 0.95rem; }

/* ---------- шаги ---------- */
.steps { counter-reset: step; }
.step {
  position: relative;
  padding: 28px 28px 28px 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 28px;
  top: 28px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255, 74, 74, 0.12);
  color: var(--accent);
  font-weight: 700;
  border-radius: 12px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step p { margin: 0; font-size: 0.97rem; }

/* ---------- галерея ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.gallery img:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}
@media (max-width: 700px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery img:first-child { grid-column: span 2; }
}

/* ---------- таблица сравнения ---------- */
.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare th, .compare td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.97rem;
}
.compare th {
  background: var(--surface-2);
  font-weight: 600;
}
.compare tr:last-child td { border-bottom: 0; }
.compare td:first-child { color: var(--text-muted); }

@media (max-width: 620px) {
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare thead { display: none; }
  .compare tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .compare td { border: 0; padding: 6px 20px; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}

/* ---------- CTA-блок ---------- */
.cta {
  background: linear-gradient(135deg, #f5f5f7, #ebebef);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
}
.cta h2 { margin-bottom: 14px; }
.cta p { max-width: 560px; margin: 0 auto 32px; font-size: 1.1rem; }
.cta .hero-actions { justify-content: center; }

/* ---------- подвал ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 64px 40px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-grid h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 18px;
  font-weight: 600;
}

.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { color: var(--text-muted); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- отдельная страница ---------- */
.page-hero {
  padding-block: clamp(56px, 8vw, 100px) clamp(32px, 4vw, 56px);
}
.page-hero .lead { font-size: 1.2rem; max-width: 680px; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; margin-bottom: 0.6em; }
.prose h3 { margin-top: 1.8em; margin-bottom: 0.5em; }
.prose p { margin-bottom: 1.2em; color: var(--text); opacity: 0.86; }
.prose ul { margin: 0 0 1.2em 1.2em; color: var(--text); opacity: 0.86; }
.prose li { margin-bottom: 0.5em; }
.prose .figure {
  margin: 2em 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.prose .figure figcaption {
  padding: 12px 18px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- служебное ---------- */
.muted { color: var(--text-muted); }
.center { text-align: center; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }
