header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 13px 0;
  background: rgba(253, 249, 255, 0.56);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}
.nav {
  width: var(--container);
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}
.logo-link {
  display: block;
  transition: 0.35s var(--ease);
}
.logo-link:hover {
  transform: rotate(-2deg) scale(1.035);
}
.logo {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 9px 15px rgba(132, 86, 160, 0.18));
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.nav__link {
  position: relative;
  padding: 10px 15px;
  border-radius: 999px;
  color: var(--muted);
  transition: 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 5px;
  height: 2px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  transform: scaleX(0);
  transition: 0.3s var(--ease);
}
.nav__link:hover,
.nav__link.active {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  box-shadow: 0 8px 25px rgba(104, 74, 130, 0.08);
}
.nav__link:hover::after,
.nav__link.active::after {
  transform: scaleX(1);
}

.hero {
  min-height: 84vh;
  display: grid;
  place-items: center;
  padding: 70px 0;
  position: relative;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  width: min(620px, 80vw);
  height: min(620px, 80vw);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.95),
    rgba(229, 210, 255, 0.26) 45%,
    transparent 70%
  );
  filter: blur(3px);
  z-index: -1;
}
.hero__inner {
  text-align: center;
  position: relative;
  z-index: 2;
}
.hero__logo {
  width: min(500px, 76vw);
  margin: 0 auto 24px;
  filter: drop-shadow(0 24px 35px rgba(126, 77, 155, 0.24));
  animation: heroFloat 7s ease-in-out infinite;
}
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.22rem);
  color: var(--muted);
  max-width: 660px;
  margin: auto;
  line-height: 1.8;
}
.hero__sparkle {
  position: absolute;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 0 20px #a78ee8;
  animation: twinkle 3.5s ease-in-out infinite;
}
.hero__sparkle:nth-child(1) {
  left: -10%;
  top: 14%;
}
.hero__sparkle:nth-child(2) {
  right: -9%;
  top: 28%;
  animation-delay: -1s;
}
.hero__sparkle:nth-child(3) {
  left: 5%;
  bottom: 8%;
  animation-delay: -2s;
}
.hero__sparkle:nth-child(4) {
  right: 4%;
  bottom: 12%;
  animation-delay: -2.5s;
}

.glass {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.64),
    rgba(255, 255, 255, 0.28)
  );
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius);
}
.card {
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -90px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.85),
    transparent 68%
  );
  pointer-events: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 13px 21px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  color: #fff;
  font-weight: 750;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 12px 30px rgba(178, 102, 185, 0.23);
  transition: 0.3s var(--ease);
}
.btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 38px rgba(178, 102, 185, 0.32);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 7px 20px rgba(90, 60, 110, 0.06);
  color: var(--muted);
  font-size: 0.8rem;
}
.grid {
  display: grid;
  gap: 22px;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.product-card,
.social-card {
  overflow: hidden;
  transition: 0.4s var(--ease);
}
.product-card:hover,
.social-card:hover {
  transform: translateY(-8px) rotate(0.25deg);
  box-shadow: 0 30px 70px rgba(101, 70, 130, 0.19);
}
.product-card__image {
  aspect-ratio: 1/1;
  object-fit: cover;
  width: 100%;
  background: linear-gradient(135deg, #fbe4f3, #e8ddff);
}
.product-card__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.product-card h3 {
  margin: 13px 0 8px;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.15;
}
.product-card .muted {
  margin: 0 0 12px;
}
.product-card .btn {
  margin-top: 14px;
}
.muted {
  color: var(--muted);
  line-height: 1.7;
}
.social-card {
  padding: 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.social-card strong {
  overflow-wrap: anywhere;
}
.social-card > span:last-child {
  flex: 0 0 auto;
}
.social-card__icon {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink-2), var(--violet-2));
  font-weight: 850;
  box-shadow: inset 0 1px 0 #fff;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow-small);
  transition: 0.35s var(--ease);
}
.gallery img:hover {
  transform: scale(1.025);
  box-shadow: var(--shadow);
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 25px;
}
.filter {
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: 0.25s;
}
.filter:hover {
  transform: translateY(-2px);
}
.filter.active {
  background: var(--ink);
  color: #fff;
}
footer {
  padding: 50px 0 65px;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.floating-object {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.float-eye {
  font-size: clamp(38px, 6vw, 82px);
  filter: drop-shadow(0 13px 20px rgba(80, 40, 100, 0.14));
  animation: float 8s ease-in-out infinite;
}
.float-crystal {
  width: 74px;
  height: 74px;
  transform: rotate(45deg);
  border-radius: 17px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95),
    rgba(188, 163, 255, 0.45)
  );
  box-shadow:
    inset 7px 7px 16px #fff,
    0 15px 35px rgba(130, 100, 190, 0.2);
  animation: float 9s ease-in-out infinite;
}

/* ---- Recycling card: isolated vertical flow ---- */
.recycling-card {
  display: block;
  overflow: hidden;
  contain: layout paint;
}
.recycling-card__title {
  display: block;
  position: relative;
  width: 100%;
  margin: 16px 0 14px;
  padding: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}
.recycling-card > .section__text {
  display: block;
  position: relative;
  clear: both;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ---- Streams card: same safe vertical flow as Recycling ---- */
.streams-card {
  display: block;
  overflow: hidden;
  contain: layout paint;
}
.streams-card__title {
  display: block;
  position: relative;
  width: 100%;
  margin: 16px 0 14px;
  padding: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
}
.streams-card > .section__text {
  display: block;
  position: relative;
  clear: both;
  width: 100%;
  margin: 0;
  padding: 0;
}
.streams-card > .btn {
  margin-top: 18px;
}

/* ---- Book section badge ---- */
.book-card .badge,
.card.book-card > .badge {
  align-self: flex-start;
  display: inline-flex;
  width: auto;
  min-height: 34px;
  padding: 8px 14px;
  margin: 0 0 2px;
  font-size: 0.82rem;
  line-height: 1;
  transform: none;
}
.book-card h2,
.card.book-card h2 {
  margin: 14px 0 10px;
}
.book-card .section__text,
.card.book-card .section__text {
  margin: 0;
}

/* ===== V7 STREAMS: explicit vertical layout ===== */
.streams-section .streams-card {
  box-sizing: border-box;
  display: block !important;
  position: relative;
  overflow: hidden;
  contain: layout paint;
  height: auto !important;
  min-height: 0 !important;
  padding: 32px;
}
.streams-section .streams-card > .badge {
  display: inline-flex;
  position: static !important;
  float: none !important;
  margin: 0 !important;
  vertical-align: top;
}
.streams-section .streams-card > .streams-card__title {
  display: block !important;
  position: static !important;
  float: none !important;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  box-sizing: border-box;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08 !important;
  letter-spacing: -0.045em;
  overflow: visible !important;
}
.streams-section .streams-card > .streams-card__text {
  display: block !important;
  position: static !important;
  float: none !important;
  width: 100%;
  height: auto !important;
  box-sizing: border-box;
  margin: 16px 0 0 !important;
  padding: 0 !important;
  line-height: 1.75 !important;
}
.streams-section .streams-card > .streams-card__actions {
  display: flex;
  position: static;
  width: 100%;
  box-sizing: border-box;
  margin: 24px 0 0;
  padding: 0;
}
.streams-section .streams-card__actions .btn {
  position: static;
  margin: 0;
}
.book-card > .badge {
  margin: 0 !important;
  align-self: flex-start;
}
.book-card > h2 {
  margin: 16px 0 10px !important;
}
.book-card > .section__text {
  margin: 0 !important;
}

/* V9 — no face/emoji/circular smiley decorations */
.hero__sparkle {
  opacity: 0.45;
}
/* =========================================
   Кликабельные названия глав книги
   ========================================= */

.book-card__title {
  margin: 16px 0 10px !important;
}

.book-card__title a {
  display: inline;
  color: inherit;
  text-decoration: none;
  cursor: pointer;

  transition:
    color 0.25s var(--ease),
    text-shadow 0.25s var(--ease),
    opacity 0.25s var(--ease);
}

.book-card__title a:hover {
  color: var(--violet);

  text-shadow:
    0 0 8px rgba(150, 115, 210, 0.18),
    0 0 18px rgba(150, 115, 210, 0.28);
}

.book-card__title a:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 5px;
  border-radius: 4px;
}
