:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #111820;
  --panel-2: #151f2a;
  --text: #f3f7fb;
  --muted: #a7b3c2;
  --line: #263341;
  --accent: #e54b3f;
  --accent-2: #f3b43f;
  --good: #45c486;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(229, 75, 63, 0.16), transparent 32rem),
    linear-gradient(180deg, #0b0f14 0%, #0f141b 48%, #0b0f14 100%);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.site {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(11, 15, 20, 0.9);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050608;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.brand-text {
  min-width: 0;
}

.brand-title {
  display: block;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a,
.lang button {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  padding: 10px 12px;
  cursor: pointer;
}

.nav a.active,
.nav a:hover,
.lang button.active,
.lang button:hover {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.04);
}

.lang button {
  padding: 8px 10px;
  font-weight: 700;
}

.hero,
.content {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  padding: 58px 0 26px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 32px;
  align-items: center;
}

.hero-logo {
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid rgba(243, 180, 63, 0.4);
  border-radius: 8px;
  background: #050608;
  box-shadow: 0 22px 70px rgba(229, 75, 63, 0.18);
  overflow: hidden;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 14px;
  max-width: 860px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: 0;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  text-decoration: none;
  font-weight: 800;
  background: var(--panel-2);
}

.button.primary {
  border-color: rgba(229, 75, 63, 0.6);
  background: linear-gradient(135deg, var(--accent), #9f2f28);
}

.content {
  padding: 24px 0 72px;
}

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

.card,
.article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 24, 32, 0.92);
  box-shadow: var(--shadow);
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 22px;
  text-decoration: none;
}

.card-kicker {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.card h2 {
  margin: 12px 0 10px;
  font-size: 24px;
  line-height: 1.18;
}

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

.card .more {
  margin-top: auto;
  color: var(--good);
  font-weight: 800;
}

.article {
  padding: clamp(22px, 4vw, 44px);
}

.section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.section:first-child {
  border-top: 0;
  padding-top: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

h3 {
  margin: 22px 0 10px;
  font-size: 20px;
}

p {
  margin: 0 0 12px;
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin: 5px 0;
}

.note {
  border-left: 3px solid var(--accent-2);
  padding: 12px 14px;
  margin: 16px 0;
  background: rgba(243, 180, 63, 0.08);
  color: #f8deb0;
}

.muted {
  color: var(--muted);
}

.code-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.code-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px 0;
}

.footer-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .topbar-inner {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: min(180px, 60vw);
    order: -1;
  }

  .nav {
    justify-content: flex-start;
  }

  .grid,
  .code-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar-inner,
  .hero,
  .content,
  .footer-inner {
    width: min(100% - 20px, 1120px);
  }

  .nav a {
    padding: 9px 10px;
  }

  .hero {
    padding-top: 36px;
  }

  .card {
    min-height: 0;
  }
}
