@font-face {
  font-family: "Forum";
  src: url("https://con.xl.ru/jLdvFS9X2UqmCxo_fOj78Q/files/TSZrEK7VaEm3XmMWYsVj2g.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("https://con.xl.ru/jLdvFS9X2UqmCxo_fOj78Q/files/RZKohTnLoEuw_ANRxKOFnA.ttf") format("truetype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("https://con.xl.ru/jLdvFS9X2UqmCxo_fOj78Q/files/qQRc-ztyzUO9iS7ZO5ZT0A.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("https://con.xl.ru/jLdvFS9X2UqmCxo_fOj78Q/files/yfMpms4s2U6azP41siSNWQ.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --color-bg: #030e1f;
  --color-bg-deep: #000204;
  --color-surface: rgba(255, 255, 255, 0.05);
  --color-surface-solid: #27364c;
  --color-stroke: rgba(255, 255, 255, 0.12);
  --color-stroke-strong: rgba(255, 255, 255, 0.3);
  --color-text: #ffffff;
  --color-text-muted: #c2c2c2;
  --color-text-soft: #acacac;
  --color-gold-a: #f8ecb3;
  --color-gold-b: #fff7d2;
  --color-gold-c: #f3e19a;
  --gradient-gold: linear-gradient(128deg, var(--color-gold-a) 16%, var(--color-gold-b) 57%, var(--color-gold-a) 99%);
  --shadow-soft: 0 24px 64px rgba(0, 0, 0, 0.35);
  --radius-pill: 999px;
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --content-width: 1100px;
  --transition: 180ms ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Inter", Arial, sans-serif;
  font-weight: 400;
  background:
    radial-gradient(circle at 16% 17%, rgba(248, 236, 179, 0.12), transparent 12%),
    radial-gradient(circle at 84% 14%, rgba(248, 236, 179, 0.11), transparent 11%),
    linear-gradient(180deg, #061224 0%, #030e1f 100%);
  color: var(--color-text);
}

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

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

button {
  font: inherit;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.site-header {
  position: sticky;
  top: 16px;
  z-index: 20;
  width: min(calc(100% - 32px), var(--content-width));
  margin: 16px auto 0;
  padding: 17px 27px 17px 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--color-stroke);
  border-radius: 50px;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 12px 30px rgba(2, 9, 21, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  width: 21px;
  height: 20px;
  border-radius: 5px;
  background:
    center / cover no-repeat url("https://con.xl.ru/jLdvFS9X2UqmCxo_fOj78Q/images/CuR-igL7ckC70tht05EKyA.png"),
    var(--gradient-gold);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand-text {
  font-family: "Forum", Georgia, serif;
  font-size: 20px;
  line-height: 28px;
  letter-spacing: 0.5px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex: 1;
}

.site-nav a {
  font-family: "Inter", Arial, sans-serif;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 300;
  line-height: 20px;
  transition: color var(--transition), opacity var(--transition);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--color-gold-b);
  opacity: 1;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-links a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color var(--transition), background-color var(--transition), transform var(--transition);
}

.social-links a:hover,
.social-links a:focus-visible {
  border-color: rgba(248, 236, 179, 0.65);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.social-links svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.nav-toggle,
.toc-toggle {
  display: none;
}

.hero {
  position: relative;
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0 50px 0;
}

.hero-pattern {
  position: absolute;
  inset: 90px 0 177px;
  background:
    linear-gradient(180deg, rgba(3, 14, 31, 0.18), rgba(3, 14, 31, 0.18)),
    center top / cover no-repeat url("https://con.xl.ru/jLdvFS9X2UqmCxo_fOj78Q/images/R9KohIykjk6oF_yP7eFU8A.png");
  opacity: 0.52;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 236, 179, 0.55) 0%, rgba(248, 236, 179, 0.14) 34%, transparent 70%);
  filter: blur(16px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-glow--left {
  top: 104px;
  left: 62px;
}

.hero-glow--right {
  top: 160px;
  right: 76px;
}

.hero-intro {
  position: relative;
  grid-column: 2;
  max-width: 564px;
  margin: 0;
  align-self: start;
}

.hero-intro h1 {
  margin: 0;
  font-family: "Forum", Georgia, serif;
  font-size: 48px;
  line-height: 1.05;
  font-weight: 400;
  text-transform: uppercase;
  background: var(--gradient-gold);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.content-grid {
  position: relative;
  display: grid;
  grid-template-columns: 244px minmax(0, 640px);
  grid-template-areas:
    "toc intro"
    "toc chapters";
  column-gap: 51px;
  row-gap: 0;
  align-items: start;
  padding-top: 58px;
}

.toc {
  grid-area: toc;
  position: sticky;
  top: 126px;
  z-index: 5;
}

.hero-intro {
  grid-area: intro;
}

.toc-panel {
  width: 244px;
  padding: 32px 22px 20px;
  border-radius: var(--radius-xl);
  background: #2f3f57;
  box-shadow: none;
}

.toc h2 {
  margin: 0 0 14px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.15;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.toc a {
  min-height: 34px;
  display: block;
  padding: 6px 10px 7px;
  border-radius: var(--radius-md);
  background: #394a65;
  color: #b3b8c2;
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.01em;
  transition: background-color var(--transition), color var(--transition);
}

.toc a:hover,
.toc a:focus-visible,
.toc a.is-active {
  color: var(--color-text);
  background: #425470;
}

.chapters {
  grid-area: chapters;
  display: grid;
  gap: 16px;
  margin-top: 40px;
  padding-bottom: 103px;
}

.chapter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 143px;
  gap: 22px;
  align-items: center;
  padding: 18px 24px 24px;
  min-height: 304px;
  border: 1px solid var(--color-stroke-strong);
  border-radius: var(--radius-xl);
  background: rgba(3, 14, 31, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.chapter-card__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.chapter-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.chapter-card__number {
  flex-shrink: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 48px;
  line-height: 1;
  font-weight: 400;
  background: var(--gradient-gold);
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.chapter-card h2 {
  margin: 8px 0 0;
  font-family: "Forum", Georgia, serif;
  font-size: 30px;
  line-height: 1.05;
  text-transform: uppercase;
  font-weight: 400;
  white-space: nowrap;
}

.chapter-card p {
  margin: 0 0 20px;
  max-width: 100%;
  font-family: "Inter", Arial, sans-serif;
  color: var(--color-text-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
}

.chapter-card img {
  width: 143px;
  height: 186px;
  object-fit: cover;
  border-radius: 2px;
  justify-self: end;
}

.chapter-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 4px 12px 4px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(318deg, #f8ecb3 0%, #fff7d2 50.01%, #f8ecb3 100%);
  color: #040404;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform var(--transition), box-shadow var(--transition);
}

.chapter-card__cta:hover,
.chapter-card__cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(248, 236, 179, 0.22);
}

.chapter-card__cta span:last-child {
  font-family: "Forum", Georgia, serif;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: 0;
}

.chapter-card__cta-icon {
  width: 46px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: linear-gradient(270deg, #ffed97 0%, #fff5c7 50.01%, #ffed97 100%);
  flex-shrink: 0;
}

.chapter-card__cta-icon img {
  width: 28px;
  height: 16px;
}

.site-footer {
  width: 100%;
  margin: 0;
  padding: 40px max(24px, calc((100vw - 1200px) / 2 + 89px)) 44px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  background: var(--color-bg-deep);
}

.site-footer__brand p,
.site-footer__links a {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
}

.site-footer__brand {
  display: grid;
  gap: 4px;
  color: rgba(255, 255, 255, 0.9);
}

.brand--footer {
  margin-bottom: 28px;
}

.site-footer__links {
  display: grid;
  gap: 2px;
  max-width: 525px;
}

.site-footer__links a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--color-gold-b);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid rgba(248, 236, 179, 0.85);
  outline-offset: 2px;
}

@media (max-width: 1080px) {
  .site-header {
    top: 10px;
    width: min(calc(100% - 20px), var(--content-width));
    padding-inline: 20px;
    gap: 16px;
  }

  .site-nav {
    gap: 20px;
  }

  .hero {
    padding-inline: 20px;
  }

  .content-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "toc"
      "chapters";
    row-gap: 28px;
    padding-top: 72px;
  }

  .hero-intro {
    max-width: 720px;
  }

  .toc {
    position: relative;
    top: 0;
  }

  .toc-panel {
    padding: 20px;
  }

  .toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chapters {
    padding-bottom: 72px;
  }

  .site-footer {
    padding: 36px 24px 40px;
  }
}

@media (max-width: 780px) {
  .site-header {
    position: sticky;
    top: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    border: 1px solid var(--color-stroke);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    color: var(--color-text);
  }

  .nav-toggle span {
    width: 18px;
    height: 1.5px;
    border-radius: 99px;
    background: currentColor;
    transition: transform var(--transition), opacity var(--transition);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    width: 100%;
    order: 4;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 10px;
  }

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

  .content-grid {
    row-gap: 14px;
  }

  .social-links {
    gap: 8px;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-pattern {
    inset: 70px 0 0;
    background-position: center top;
    background-size: auto 100%;
  }

  .hero-intro {
    margin-bottom: 8px;
  }

  .hero-intro h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .toc {
    width: 100%;
  }

  .toc-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid var(--color-stroke);
    border-radius: 16px;
    background: rgba(39, 54, 76, 0.92);
    color: var(--color-text);
  }

  .toc-toggle::after {
    content: "+";
    font-size: 24px;
    line-height: 1;
  }

  .toc-toggle[aria-expanded="true"]::after {
    content: "−";
  }

  .toc-panel {
    width: 100%;
    padding: 20px;
    display: none;
    margin-top: 12px;
  }

  .toc-panel.is-open {
    display: block;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .chapters {
    margin-top: 0;
  }

  .chapter-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px 18px;
  }

  .chapter-card__head {
    gap: 10px;
    margin-bottom: 20px;
  }

  .chapter-card__number {
    font-size: 38px;
  }

  .chapter-card h2 {
    font-size: 28px;
    white-space: normal;
  }

  .chapter-card p {
    max-width: none;
    font-size: 16px;
  }

  .chapter-card img {
    width: min(100%, 250px);
    height: auto;
    justify-self: start;
  }

  .chapter-card__cta span:last-child {
    font-size: 18px;
  }

  .site-footer {
    flex-direction: column;
    gap: 24px;
    padding-inline: 20px;
  }

  .site-footer__links {
    max-width: none;
  }
}
