:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #15202b;
  --muted: #5c6773;
  --line: #e4e8ee;
  --accent: #e23b44;
  --accent-dark: #c42f37;
  --hero: #15202b;
  --ad: #eef1f4;
  --ad-line: #d3d9e0;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(21, 32, 43, 0.08);
  --max: 1180px;
  --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
}

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

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

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

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

.site-nav {
  display: flex;
  gap: 6px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--ink);
  background: var(--bg);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  content: "";
}

.nav-toggle span::before {
  transform: translateY(-6px);
}

.nav-toggle span::after {
  transform: translateY(4px);
}

.ad--side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 300px;
  height: 250px;
  padding: 0;
  background: transparent;
  border-radius: var(--radius);
  box-shadow: none;
  overflow: hidden;
}

.ad--side.is-filled,
.ad--side:has(ins[data-ad-status="filled"]) {
  background: #fff;
  box-shadow: var(--shadow);
}

.ad__label {
  display: none;
}

.ad.is-filled .ad__label,
.ad:has(ins[data-ad-status="filled"]) .ad__label {
  display: block;
  width: 100%;
  padding: 0 0 6px;
  color: #8b95a1;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ad--side ins.adsbygoogle {
  display: inline-block;
  width: 300px;
  height: 250px;
}

.ad--inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(728px, 100%);
  min-height: 90px;
  margin: 28px auto;
  background: transparent;
  box-shadow: none;
}

.ad--inline.is-filled,
.ad--inline:has(ins[data-ad-status="filled"]) {
  background: #fff;
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px 0 36px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(21, 32, 43, 0.72), rgba(21, 32, 43, 0.82)),
    url("../img/home/header.jpg") center / cover no-repeat;
}

.hero__copy {
  max-width: 640px;
  margin: 0 auto 20px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}

.stage {
  display: grid;
  grid-template-columns: 300px 520px 300px;
  justify-content: center;
  gap: 16px;
  align-items: start;
}

.panel,
.stage .card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 520px;
  max-width: 100%;
  justify-self: center;
}

.speed-frame {
  display: block;
  width: 520px;
  max-width: 100%;
  height: 350px;
  border: 0;
  background: #fff;
}

.ip-panel {
  padding: 22px;
}

.ip-panel h1,
.ip-panel h2 {
  margin: 0 0 16px;
  font-size: 1.35rem;
}

.ip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ip-row:hover {
  border-color: #c9d1da;
}

.ip-row strong {
  min-width: 48px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ip-row span {
  flex: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ip-row small {
  color: var(--muted);
}

.section {
  padding: 48px 0;
}

.section h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0 0 24px;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.card {
  display: block;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
}

.card:hover {
  color: inherit;
  text-decoration: none;
  border-color: #d3dbe3;
  transform: translateY(-1px);
}

.card h3 {
  margin: 0 0 8px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.posts {
  display: grid;
  gap: 16px;
}

.post {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.post img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
}

.post h3 {
  margin: 0 0 8px;
}

.post p {
  margin: 0 0 10px;
  color: var(--muted);
}

.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 0 56px;
}

.article__hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.article__hero img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
}

.article h1 {
  margin: 0 0 12px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.article h2 {
  margin: 28px 0 8px;
}

.article p,
.article li {
  color: #334155;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

.legal {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 0 64px;
}

.legal h4,
.legal h2,
.legal h3 {
  margin-top: 28px;
}

.site-footer {
  padding: 28px 0;
  color: rgba(255, 255, 255, 0.72);
  background: var(--hero);
  font-size: 14px;
}

.site-footer a {
  color: #fff;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 8px;
}

@media (max-width: 1100px) {
  .stage {
    grid-template-columns: minmax(0, 520px);
    justify-items: center;
  }

  .ad--side {
    width: min(300px, 100%);
  }

  .panel,
  .speed-frame,
  .stage .card {
    width: min(520px, 100%);
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    right: 16px;
    left: 16px;
    padding: 8px;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .cards,
  .post,
  .article__hero {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 22px 0 28px;
  }
}
