:root {
  --bg: #edeade;
  --paper: #fff9f0;
  --paper-soft: #f7f0e6;
  --ink: #111827;
  --muted: #5f625b;
  --olive: #8a9b6e;
  --olive-dark: #66724f;
  --burgundy: #5e0b15;
  --line: rgba(17, 24, 39, 0.14);
  --shadow: 0 22px 70px rgba(43, 33, 29, 0.13);
  --radius: 16px;
  --shell: min(1160px, calc(100% - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 249, 240, 0.96), transparent 30rem),
    linear-gradient(180deg, #f4efe5 0%, var(--bg) 44%, #f7efe4 100%);
  font-family: Ubuntu, Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

.shell {
  width: var(--shell);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(237, 234, 222, 0.88);
  backdrop-filter: blur(18px);
  animation: topbar-enter 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.topbar__inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr minmax(260px, auto) 1fr;
  align-items: center;
  gap: 18px;
}

.brand {
  display: grid;
  grid-column: 2;
  gap: 2px;
  justify-items: center;
  text-decoration: none;
  text-align: center;
}

.brand__name {
  font-family: Oswald, Impact, sans-serif;
  font-size: clamp(20px, 2.3vw, 30px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--burgundy);
  text-transform: none;
}

.home-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(94, 11, 21, 0.2);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--burgundy);
  background: rgba(255, 249, 240, 0.72);
  font: 700 13px/1 Ubuntu, Arial, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.home-link:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 11, 21, 0.34);
  background: var(--paper);
}

html.standalone-recommendations .topbar__inner {
  grid-template-columns: minmax(0, 1fr) auto;
}

html.standalone-recommendations .home-link {
  display: none;
}

html.standalone-recommendations .brand {
  grid-column: 1;
  justify-items: start;
  text-align: left;
}

html.standalone-recommendations .jump {
  grid-column: 2;
}

.jump {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid rgba(94, 11, 21, 0.26);
  border-radius: 999px;
  padding: 0 16px 0 18px;
  color: var(--burgundy);
  background: rgba(255, 249, 240, 0.76);
  font: 700 13px/1 Ubuntu, Arial, sans-serif;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.jump:hover {
  transform: translateY(-1px);
  background: #fff9f0;
  border-color: rgba(94, 11, 21, 0.44);
}

.jump:focus-visible {
  outline: 3px solid rgba(138, 155, 110, 0.48);
  outline-offset: 3px;
}

.jump__arrow {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff9f0;
  background: var(--burgundy);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.22s ease, background 0.22s ease;
  animation: arrow-pulse-down 1.75s ease-in-out infinite;
}

.jump:hover .jump__arrow {
  animation: none;
  background: #4a0710;
  transform: translateY(2px);
}

.jump[data-target="before"] .jump__arrow {
  animation-name: arrow-pulse-up;
}

.jump[data-target="before"]:hover .jump__arrow {
  transform: translateY(-2px);
}

.reading-progress {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 35;
  width: min(330px, calc(100% - 32px));
  display: grid;
  gap: 8px;
  border: 1px solid rgba(94, 11, 21, 0.18);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--burgundy);
  background: rgba(255, 249, 240, 0.88);
  box-shadow: 0 16px 48px rgba(43, 33, 29, 0.12);
  backdrop-filter: blur(16px);
}

.reading-progress__track {
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: rgba(94, 11, 21, 0.12);
}

.reading-progress__track span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--olive), var(--burgundy));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.reading-progress__text {
  font: 700 13px/1 Ubuntu, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Oswald, Impact, sans-serif;
  letter-spacing: 0;
  font-weight: 500;
}

.scheme-section {
  padding: 48px 0 34px;
  scroll-margin-top: 124px;
}

.scheme-section--after {
  padding-top: 76px;
  border-top: 1px solid var(--line);
}

.scheme-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(94, 11, 21, 0.1);
  border-radius: 24px;
  padding: clamp(22px, 3vw, 38px);
  background:
    radial-gradient(ellipse at 50% 58%, rgba(244, 218, 179, 0.42), transparent 38rem),
    radial-gradient(ellipse at 47% 42%, rgba(255, 249, 240, 0.94), transparent 32rem),
    linear-gradient(180deg, #fff9ef 0%, #fbf0df 100%);
  box-shadow: var(--shadow);
}

.scheme-card::before,
.scheme-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.scheme-card::before {
  background:
    radial-gradient(ellipse at 39% 59%, rgba(138, 155, 110, 0.2), transparent 17rem),
    radial-gradient(ellipse at 61% 61%, rgba(94, 11, 21, 0.16), transparent 14rem),
    radial-gradient(ellipse at 50% 83%, rgba(204, 154, 92, 0.18), transparent 18rem),
    radial-gradient(ellipse at 18% 36%, rgba(138, 155, 110, 0.1), transparent 16rem),
    radial-gradient(ellipse at 84% 34%, rgba(94, 11, 21, 0.08), transparent 16rem);
  filter: blur(1px);
  opacity: 0.9;
}

.scheme-card::after {
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    inset 0 -44px 90px rgba(94, 11, 21, 0.035);
}

.scheme-card--poster {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: var(--shadow);
}

.scheme-card--poster::before,
.scheme-card--poster::after {
  content: none;
}

.scheme-poster {
  display: block;
  overflow: hidden;
  border-radius: inherit;
  background: #fff4e4;
}

.scheme-poster img {
  width: 100%;
  height: auto;
  border-radius: inherit;
  transform-origin: center;
}

.scheme-title {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto 20px;
  color: #4d3027;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.4vw, 72px);
  font-weight: 400;
  line-height: 1.12;
  text-align: center;
  text-transform: uppercase;
}

.scheme-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(320px, 1.08fr) minmax(190px, 0.72fr);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
}

.scheme-side {
  display: grid;
  gap: 26px;
}

.scheme-point {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.scheme-point__image {
  width: min(154px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 245, 232, 0.7);
  border: 1px solid rgba(94, 11, 21, 0.08);
  box-shadow: 0 12px 26px rgba(43, 33, 29, 0.08);
}

.scheme-point__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.scheme-point p {
  margin: 0;
  color: #25201d;
  font-size: 16px;
  line-height: 1.38;
}

.scheme-center {
  display: grid;
  place-items: center;
  min-height: 540px;
}

.scheme-center img {
  width: min(100%, 500px);
  max-height: 620px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 26px 38px rgba(43, 33, 29, 0.1));
  -webkit-mask-image: radial-gradient(ellipse at center, #000 58%, rgba(0, 0, 0, 0.96) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse at center, #000 58%, rgba(0, 0, 0, 0.96) 72%, transparent 100%);
}

.section {
  padding: 64px 0;
  scroll-margin-top: 124px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.section-label {
  width: fit-content;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--burgundy);
  background: rgba(94, 11, 21, 0.08);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.section h2 {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1;
  text-transform: uppercase;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.recommendations {
  counter-reset: recommendation-step;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.recommendations--after {
  margin-top: 18px;
}

.step {
  counter-increment: recommendation-step;
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(128px, 0.42fr) 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(17, 24, 39, 0.13);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(255, 249, 240, 0.94), rgba(247, 240, 230, 0.78)),
    var(--paper);
  box-shadow: 0 15px 38px rgba(43, 33, 29, 0.08);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.step > div {
  min-width: 0;
}

.step > div::before {
  content: "Шаг " counter(recommendation-step, decimal-leading-zero);
  display: inline-grid;
  place-items: center;
  min-height: 28px;
  margin-bottom: 10px;
  border: 1px solid rgba(94, 11, 21, 0.18);
  border-radius: 999px;
  padding: 0 12px;
  color: #fff9f0;
  background: linear-gradient(135deg, var(--burgundy), #7a2430);
  box-shadow: 0 10px 22px rgba(94, 11, 21, 0.13);
  font: 700 12px/1 Ubuntu, Arial, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.step:hover {
  border-color: rgba(138, 155, 110, 0.38);
  box-shadow: 0 19px 48px rgba(43, 33, 29, 0.12);
  transform: translateY(-3px);
}

.step__media {
  overflow: hidden;
  border: 1px solid rgba(138, 155, 110, 0.26);
  border-radius: 14px;
  aspect-ratio: 1;
  background: var(--paper-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 249, 240, 0.36);
}

.step__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s ease;
}

.step:hover .step__media img {
  transform: scale(1.045);
}

.step h3 {
  margin: 0 0 8px;
  color: var(--burgundy);
  font-size: 25px;
  line-height: 1.1;
}

.step p {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.feature {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.62fr);
  gap: 16px;
  align-items: stretch;
}

.feature__text,
.feature__visual,
.note {
  border: 1px solid rgba(17, 24, 39, 0.13);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 15px 38px rgba(43, 33, 29, 0.08);
  transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
}

.feature__text {
  padding: 28px;
}

.feature__text h3 {
  margin: 0 0 14px;
  color: var(--burgundy);
  font-size: 34px;
  text-transform: uppercase;
  text-align: center;
}

.feature__text p {
  margin: 0 0 12px;
  font-size: 17px;
}

.feature__visual {
  min-height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 22% 18%, rgba(138, 155, 110, 0.24), transparent 16rem),
    var(--paper-soft);
}

.feature__visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.5s ease;
}

.note {
  margin-top: 18px;
  padding: 26px;
  color: var(--burgundy);
  text-align: center;
  font-family: Oswald, Impact, sans-serif;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.12;
  text-transform: uppercase;
}

.feature:hover .feature__text,
.feature:hover .feature__visual,
.note:hover {
  border-color: rgba(94, 11, 21, 0.22);
  box-shadow: 0 19px 48px rgba(43, 33, 29, 0.12);
  transform: translateY(-2px);
}

.feature:hover .feature__visual img {
  transform: scale(1.025);
}

.motion-ready .reveal-target {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease var(--reveal-delay, 0ms),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

.motion-ready .reveal-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.motion-ready .scheme-card--poster.is-visible .scheme-poster img {
  animation: poster-breathe 7s ease-in-out 0.8s infinite;
}

.motion-ready .step.reveal-target.is-visible:hover {
  transform: translateY(-3px);
}

.motion-ready .note.reveal-target.is-visible:hover {
  transform: translateY(-2px);
}

@keyframes topbar-enter {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes arrow-pulse-down {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(3px);
  }
}

@keyframes arrow-pulse-up {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes poster-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.012);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 980px) {
  .section-head,
  .feature {
    grid-template-columns: 1fr;
  }

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

  .scheme-center {
    order: -1;
    min-height: auto;
  }

  .scheme-center img {
    max-height: 560px;
  }

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

  .scheme-side--right {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --shell: min(100% - 24px, 560px);
  }

  .topbar__inner {
    min-height: 86px;
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
  }

  .brand,
  .home-link,
  .jump {
    grid-column: 1;
  }

  .brand {
    justify-items: center;
    text-align: center;
  }

  .home-link {
    justify-content: center;
    width: 100%;
  }

  .jump {
    justify-self: stretch;
    justify-content: space-between;
    width: 100%;
  }

  html.standalone-recommendations .topbar__inner {
    grid-template-columns: 1fr;
  }

  html.standalone-recommendations .brand,
  html.standalone-recommendations .jump {
    grid-column: 1;
  }

  html.standalone-recommendations .brand {
    justify-items: center;
    text-align: center;
  }

  html.standalone-recommendations .jump {
    justify-self: stretch;
    justify-content: space-between;
    width: 100%;
  }

  .scheme-section {
    padding: 26px 0 30px;
    scroll-margin-top: 132px;
  }

  .recommendations {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 46px 0;
    scroll-margin-top: 132px;
  }

  .step {
    grid-template-columns: 112px 1fr;
    gap: 14px;
    padding: 16px;
  }

  .step h3 {
    font-size: 23px;
  }

  .scheme-card {
    border-radius: 18px;
    padding: 18px 14px;
  }

  .scheme-card--poster {
    padding: 0;
  }

  .scheme-title {
    margin-bottom: 14px;
    font-size: clamp(30px, 9vw, 42px);
  }

  .scheme-side,
  .scheme-side--right {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .scheme-point {
    grid-template-columns: 82px 1fr;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .scheme-point__image {
    width: 82px;
  }

  .scheme-point p {
    font-size: 15px;
  }

  .feature__text {
    padding: 22px;
  }

  .reading-progress {
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100% - 24px);
  }
}

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

  .step__media {
    aspect-ratio: 16 / 10;
  }
}
