/* yandexbolan.com — brand tokens */
:root {
  --red: #e11d2e;
  --red-deep: #b40f1e;
  --ink: #14181f;
  --ink-soft: #3a4250;
  --mute: #6b7382;
  --line: rgba(20, 24, 31, 0.1);
  --paper: #f7f4ef;
  --snow: #fffcf8;
  --panel: #ffffff;
  --moss: #1f4d3a;
  --amber: #e8751a;
  --shadow: 0 18px 50px rgba(20, 24, 31, 0.12);
  --radius: 18px;
  --header-h: 68px;
  --font-display: "Syne", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(225, 29, 46, 0.16), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(31, 77, 58, 0.14), transparent 50%),
    linear-gradient(180deg, #efe8dc 0%, var(--paper) 38%, #f3efe8 100%);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--red-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--red);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(255, 252, 248, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.25rem;
}

.brand span {
  color: var(--red);
}

.brand small {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--mute);
  letter-spacing: 0.04em;
  margin-left: 0.2rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.is-active {
  color: var(--red);
}

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

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: end;
  padding: 3.5rem 0 4.5rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 8% -8% auto auto;
  width: min(58vw, 640px);
  aspect-ratio: 1;
  border-radius: 40% 60% 55% 45%;
  background:
    linear-gradient(145deg, rgba(225, 29, 46, 0.88), rgba(180, 15, 30, 0.55) 45%, rgba(31, 77, 58, 0.45)),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 45%);
  filter: blur(2px);
  animation: drift 14s ease-in-out infinite alternate;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  left: -6%;
  bottom: 8%;
  width: min(42vw, 420px);
  aspect-ratio: 4/3;
  border-radius: 28px;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent 0 14px,
      rgba(20, 24, 31, 0.05) 14px 15px
    ),
    linear-gradient(160deg, rgba(31, 77, 58, 0.2), rgba(225, 29, 46, 0.12));
  border: 1px solid rgba(20, 24, 31, 0.08);
  animation: rise 1.2s ease both;
  z-index: 0;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  animation: rise 0.9s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin: 0 0 1.1rem;
}

.hero-brand em {
  font-style: normal;
  color: var(--red);
}

.hero p {
  margin: 0 0 1.8rem;
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 36em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-deep);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 252, 248, 0.75);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline-amber {
  background: #fff;
  color: var(--amber);
  border-color: var(--amber);
}

.btn-outline-amber:hover {
  background: rgba(232, 117, 26, 0.08);
  color: var(--amber);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 2rem;
  max-width: 40rem;
}

.section-head h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.55rem;
  color: var(--moss);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Entry list — no cards as decorative shells; interactive rows */
.entry-list {
  display: grid;
  gap: 0.85rem;
}

.entry-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem 1.2rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  background: rgba(255, 252, 248, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.entry-item:hover {
  border-color: rgba(225, 29, 46, 0.35);
  transform: translateY(-2px);
}

.entry-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.entry-item h3 {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.entry-url {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92rem;
  color: var(--mute);
  user-select: none;
  -webkit-user-select: none;
}

.entry-desc {
  margin: 0.45rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  grid-column: 1 / -1;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-ok {
  background: rgba(31, 77, 58, 0.12);
  color: var(--moss);
}

.badge-warn {
  background: rgba(232, 117, 26, 0.14);
  color: #a34f07;
}

.badge-off {
  background: rgba(20, 24, 31, 0.08);
  color: var(--mute);
}

/* Content pages */
.page-hero {
  padding: 3rem 0 1.5rem;
}

.page-hero h1 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 40rem;
  font-size: 1.05rem;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  margin: 2.2rem 0 0.8rem;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-size: 1.45rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose ul {
  padding-left: 1.2rem;
}

.timeline {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

.timeline-item {
  padding-left: 1rem;
  border-left: 3px solid rgba(225, 29, 46, 0.35);
}

.timeline-item strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

/* Tutorial steps */
.steps {
  display: grid;
  gap: 2rem;
}

.step {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1.4rem;
  align-items: center;
}

.step:nth-child(even) {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.step:nth-child(even) .step-media {
  order: 2;
}

.step-media img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.step-copy h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.step-copy p {
  margin: 0;
  color: var(--ink-soft);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  margin: 0.7rem 0 0;
  color: var(--ink-soft);
}

/* Go page */
.go-panel {
  width: min(560px, 100%);
  margin: 3rem auto 5rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(255, 252, 248, 0.85);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.go-panel h1 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.go-panel p {
  margin: 0 0 0.35rem;
  color: var(--ink-soft);
}

.go-target {
  margin: 1rem 0 1.6rem !important;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(20, 24, 31, 0.04);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
  color: var(--ink) !important;
}

.go-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 7rem;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.2rem;
}

.footer-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--red);
}

/* Floating UI */
.float-guide {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 50;
  min-width: 148px;
  box-shadow: 0 10px 30px rgba(20, 24, 31, 0.18);
}

.back-top {
  position: fixed;
  right: 1.1rem;
  bottom: 5.2rem;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.95);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow);
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 24, 31, 0.55);
}

.modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  background: var(--snow);
  border-radius: 22px;
  padding: 1.25rem 1.15rem 1.4rem;
  box-shadow: var(--shadow);
  animation: pop 0.28s ease;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.modal-close {
  border: 0;
  background: rgba(20, 24, 31, 0.06);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.guide-swiper {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

.guide-swiper .swiper-slide img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  background: #fafafa;
}

.guide-steps {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.guide-steps li {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(20, 24, 31, 0.035);
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.guide-steps strong {
  color: var(--ink);
}

.swiper-pagination-bullet-active {
  background: var(--red) !important;
}

/* Animations */
@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) rotate(-4deg);
  }
  to {
    transform: translate3d(-18px, 24px, 0) rotate(5deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    padding: 0.9rem 1rem 1.1rem;
    background: rgba(255, 252, 248, 0.97);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

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

  .hero {
    min-height: auto;
    padding-top: 2.4rem;
    padding-bottom: 3.2rem;
  }

  .hero::before,
  .hero::after {
    opacity: 0.55;
  }

  .step,
  .step:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .step:nth-child(even) .step-media {
    order: 0;
  }

  .entry-item {
    grid-template-columns: 1fr;
  }

  .entry-actions {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero::before,
  .hero-copy,
  .hero::after,
  .modal-dialog {
    animation: none;
  }
}
