:root {
  --bg: #020202;
  --text: #ffffff;
  --stroke: #ababab;
  --accent: #cc6aa5;
  --content: 1140px;
  --header-height: 96px;
  --stars: url("./assets/stars.webp");
}

/* Одинаковая компактная шапка на главной, Таро и страницах Любовь, Работа, Жизнь. */
.body-home,
.body-tarot,
.body-love-page,
.body-work,
.body-life {
  --header-height: 68px;
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .moon {
  width: clamp(43.2px, calc(0.73vw + 34.58px), 49.5px);
  height: clamp(43.2px, calc(0.73vw + 34.58px), 49.5px);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .menu {
  right: clamp(24px, calc(13.1vw - 83.8px), 212px);
  gap: clamp(28px, calc(2.1vw + 22.4px), 74px);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .menu a {
  font-size: clamp(24px, calc(0.98vw + 16.4px), 36px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

::-moz-selection {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Alumni Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.98) 100%),
    radial-gradient(circle at 20% 10%, rgba(86, 255, 92, 0.14), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(204, 106, 165, 0.12), transparent 40%);
  background-size: cover;
}

.bg-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.21;
  background-image: var(--stars);
  background-size: cover;
  background-position: center;
}

@media (max-width: 760px) {
  .bg-layer {
    inset: 0 0 auto;
    height: 100vh;
    height: 100lvh;
  }

  .bg-layer::after {
    background-size: auto 100vh;
    background-size: auto 100lvh;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-height);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
}

.page-back {
  position: absolute;
  z-index: 2;
  top: calc(var(--header-height) + max(0px, calc(clamp(18px, calc(50svh - 270px), 250px) - 62px)));
  left: clamp(20px, calc(30vw - 100px), 340px);
  display: grid;
  place-items: center;
  width: clamp(52px, 4.8vw, 72px);
  height: clamp(40px, 3vw, 44px);
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
}

.page-back:hover,
.page-back:focus-visible {
  color: var(--accent);
}

.page-back svg {
  display: block;
  width: clamp(40px, 3.2vw, 48px);
  height: auto;
}

@media (max-width: 650px) {
  :is(.body-tarot, .body-love-page, .body-work, .body-life) .page-back {
    top: calc(var(--header-height) + 100px);
    left: clamp(48px, 17vw, 68px);
  }
}

.moon {
  width: 78px;
  height: 78px;
  object-fit: cover;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.menu {
  position: absolute;
  right: clamp(24px, 9vw, 212px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: clamp(28px, 3.2vw, 74px);
}

.menu a {
  color: var(--text);
  text-decoration: none;
  font-size: clamp(30px, 2.5vw, 50px);
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.menu a:hover,
.menu a:focus-visible {
  color: var(--accent);
}

.page {
  max-width: var(--content);
  margin: 0 auto;
  padding: 40px 20px 20px;
}

.body-home .page {
  padding-top: 0;
}

.section {
  width: 100%;
}

.hero {
  min-height: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.body-home .hero {
  min-height: calc(100svh - var(--header-height));
}

.hero-copy {
  width: auto;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 0.8vw, 14px);
  transform: translateY(-20px);
}

.body-home .hero-copy {
  transform: translateY(-20px);
}

.hero h1 {
  margin: 0;
  font-size: clamp(220px, 22vw, 400px);
  line-height: 0.9;
  font-weight: 300;
}

.hero p {
  margin: 0;
  padding-top: 0;
  font-size: clamp(56px, 5.2vw, 100px);
  line-height: 0.88;
  font-weight: 300;
}

.body-home .hero-service {
  display: block;
}

.body-home .hero-service-tarot { opacity: 1; }
.body-home .hero-service-matrix { opacity: 0.8; }
.body-home .hero-service-chakra { opacity: 0.6; }

.lead {
  margin: 28px 0 48px;
  scroll-margin-top: calc(var(--header-height) + 16px);
  text-align: center;
  font-size: clamp(34px, 3.1vw, 50px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
}

.lead-strong {
  color: #ffffff;
  opacity: 1;
}

.home-tarot-frame {
  display: flow-root;
  scroll-margin-top:var(--header-height);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  width: min(1040px, 100%);
  margin: 0 auto 48px;
}

.card {
  height: 490px;
  position: relative;
  overflow: visible;
}

.card-link {
  color: inherit;
  display: block;
  text-decoration: none;
}

.card::before,
.card::after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 87.18%;
  border: 6px solid var(--stroke);
  border-radius: 55px;
  opacity: 0.6;
  pointer-events: none;
  transition: border-color 0.25s ease;
}

.card::before {
  left: 0;
}

.card::after {
  left: 12.82%;
}

/* Внешние контуры лежат под внутренним, поэтому не приглушают его цвет. */
.body-home .card::before,
.body-home .card::after,
.body-tarot .tarot-cards-frame .card::before,
.body-tarot .tarot-cards-frame .card::after {
  z-index: 0;
}

.card-main {
  position: absolute;
  top: 0;
  left: 12.82%;
  width: 74.36%;
  height: 100%;
  border: 6px solid var(--stroke);
  border-radius: 55px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: clamp(18px, 2.4vw, 36px);
  transition: border-color 0.25s ease;
}

.body-home .card-main,
.body-tarot .tarot-cards-frame .card-main {
  z-index: 1;
}

.card-main:hover {
  border-color: var(--accent);
}

.card img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-top: 0;
}

.card h3 {
  margin: 0;
  font-size: clamp(50px, 3.8vw, 64px);
  line-height: 1;
  font-weight: 400;
}

/* Карточки главной и Таро сохраняют одинаковые пропорции при изменении ширины окна. */
.body-home .home-tarot-frame {
  min-height: calc(100svh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  padding-bottom: 34px;
}

:is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .cards {
  width: min(920px, calc(100vw - clamp(64px, 16vw, 180px)));
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 5.6%;
  justify-self: center;
  margin: 0;
  container-type: inline-size;
}

:is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 272.35 / 410;
  margin: 0;
}

:is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card::before,
:is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card::after,
:is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card-main {
  border-width: clamp(3px, 0.652cqw, 6px);
  border-radius: clamp(24px, 5.98cqw, 55px);
}

.body-home .home-tarot-frame .card h3 {
  font-size: clamp(21px, 5.22cqw, 48px);
}

.body-home .home-tarot-frame .card:nth-child(1) h3,
.body-home .home-tarot-frame .card:nth-child(3) h3 {
  font-size: clamp(17px, 4.13cqw, 38px);
}

@media (max-width: 650px) {
  .body-home .home-tarot-frame {
    padding-block: 24px;
  }

  :is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .cards {
    --card-gap: clamp(18px, 5vw, 24px);
    width: min(347px, calc(100vw - 64px));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(24px, 6vw, 30px) var(--card-gap);
  }

  :is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card::before,
  :is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card::after,
  :is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card-main {
    border-width: clamp(2.5px, 1.03cqw, 3.6px);
    border-radius: clamp(22px, 9.4cqw, 33px);
  }

  .body-home .home-tarot-frame .card h3 {
    font-size: clamp(21px, 8.2cqw, 28.5px);
  }

  .body-home .home-tarot-frame .card:nth-child(1) h3,
  .body-home .home-tarot-frame .card:nth-child(3) h3 {
    font-size: clamp(17px, 6.5cqw, 22.5px);
  }

  :is(.body-home .home-tarot-frame, .body-tarot .tarot-cards-frame) .card:nth-child(3) {
    grid-column: 1 / -1;
    width: calc((100% - var(--card-gap)) / 2);
    justify-self: center;
  }
}

.actions {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 28px;
  margin-bottom: 48px;
}

.btn {
  min-height: 72px;
  border-radius: 55px;
  border: 5px solid var(--stroke);
  color: var(--text);
  text-decoration: none;
  display: grid;
  place-items: center;
  width: 360px;
  font-size: clamp(34px, 3vw, 50px);
  letter-spacing: 0.02em;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.btn.btn-accent {
  width: 420px;
  border-color: var(--accent);
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.btn.btn-outline:hover {
  background: rgba(204, 106, 165, 0.28);
  border-color: var(--accent);
}

.btn.btn-accent:hover {
  background: rgba(204, 106, 165, 0.28);
}

.about {
  min-height: calc(100svh - var(--header-height));
  scroll-margin-top: var(--header-height);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  gap: 22px;
  align-items: center;
}

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

.about-text p {
  margin: 0 0 26px;
  font-size: clamp(34px, 2.9vw, 50px);
  line-height: 1.02;
  max-width: 790px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text p:first-child {
  max-width: 680px;
}

.about-photo-wrap {
  width: min(340px, calc((100vh - 180px) * 0.51));
  max-width: 100%;
  justify-self: end;
  position: relative;
}

.about-photo-back {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 120%;
  border: 6px solid var(--stroke);
  opacity: 0.6;
  border-radius: 76px;
  transform: translateX(-50%);
}

.about-photo {
  width: 100%;
  height: min(668px, calc(100vh - 180px));
  object-fit: cover;
  object-position: center;
  border: 6px solid var(--stroke);
  border-radius: 76px;
  display: block;
}

.body-home .about-photo-card .card-main {
  display: block;
  overflow: hidden;
}

.body-home .about-photo-card .card-main:hover {
  border-color: var(--stroke);
}

.body-home .about-photo-card .about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 49px;
  object-fit: cover;
  object-position: center;
}

.footer {
  padding-top: 0;
  padding-bottom: 0;
  min-height: auto;
  display: grid;
  align-content: start;
  justify-items: center;
}

.social-shell {
  width: min(760px, 92%);
  min-height: 242px;
  border: none;
  border-radius: 64px;
  margin-top: clamp(234px, 26vh, 314px);
  transform: translateY(-108px);
  position: relative;
  display: grid;
  place-items: center;
}

.social-row {
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: center;
  gap: 0;
  align-items: center;
  transform: translateY(-10px);
}

.social-row a {
  width: 132px;
  height: 176px;
  display: grid;
  place-items: center;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.social-row a:hover {
  transform: translateY(-3px);
  opacity: 0.86;
}

.social-row img {
  width: 128px;
  height: 128px;
  object-fit: contain;
  display: block;
  transition: filter 0.25s ease;
}

.social-row a:hover img {
  filter: brightness(0) saturate(100%) invert(61%) sepia(27%) saturate(1032%) hue-rotate(276deg) brightness(86%) contrast(86%);
}

.social-row img[data-asset="youtube"] {
  width: 92px;
  height: 92px;
}

.social-row img[data-asset="telegram"] {
  width: 120px;
  height: 120px;
}

.social-row img[data-asset="instagram"] {
  width: 78px;
  height: 78px;
}

.brand {
  margin: 56px 0 0;
  font-size: clamp(72px, 7vw, 100px);
  line-height: 1;
  font-weight: 300;
}

@media (max-width: 1080px) {
  .hero {
    min-height: 560px;
  }

  .hero-copy {
    width: auto;
    gap: clamp(4px, 0.8vw, 10px);
    transform: translateY(-14px);
  }

  .cards {
    gap: 20px;
  }

  .about {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
    padding: 28px 0;
  }

  .about-photo-wrap {
    justify-self: center;
  }

  .about-photo {
    height: auto;
    aspect-ratio: 387 / 761;
  }

  .footer {
    min-height: auto;
    padding-top: 0;
    padding-bottom: 0;
  }

  .social-shell {
    width: min(700px, 96%);
    min-height: 224px;
    margin-top: 202px;
  }

  .brand {
    margin-top: 52px;
  }
}

@media (min-width: 1181px) {
  .body-home .about {
    grid-template-columns: minmax(0, 1fr);
    position: relative;
  }

  .body-home .about-text p {
    font-size: clamp(20.4px, 1.74vw, 30px);
    max-width: 100%;
    line-height: 1.18;
  }

  .body-home .about-text {
    width: 596.18px;
    margin-left: max(0px, calc(50% - 460px));
  }

  .body-home .about-photo-wrap {
    width: 272.35px;
    position: absolute;
    top: 50%;
    right: max(0px, calc(50% - 460px));
    transform: translateY(-50%);
  }

  .body-home .about-photo-card {
    height: min(410px, calc((100vh - 300px) * 0.86));
    min-height: 0;
  }
}

@media (max-width: 1180px) {
  .body-home .about-photo-card {
    height: auto;
    min-height: 0;
    aspect-ratio: 272.35 / 410;
    max-height: min(410px, max(150px, calc((100svh - 300px) * 0.86)));
  }
}

@media (min-width: 701px) and (max-width: 1180px) {
  .body-home .about {
    width: min(100%, calc(100vw - clamp(96px, 14vw, 160px)));
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr) clamp(190px, 25vw, 272px);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
    min-height: calc(100svh - var(--header-height));
    padding: 24px 0;
  }

  .body-home .about-text p {
    max-width: 100%;
    margin-bottom: 22px;
    font-size: clamp(19px, 1.74vw, 20.5px);
    line-height: 1.18;
  }

  .body-home .about-photo-wrap {
    width: 100%;
    max-width: none;
    justify-self: end;
  }
}

@media (max-width: 700px) {
  .body-home .about {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(18px, 3svh, 28px);
    justify-items: center;
    align-content: center;
    min-height: calc(100svh - var(--header-height));
    padding: clamp(18px, 4svh, 32px) 0;
  }

  .body-home .about-text {
    width: min(350px, calc(100% - 48px));
    transform: none;
  }

  .body-home .about-text p {
    max-width: 100%;
    margin: 0 0 18px;
    font-size: clamp(18px, 2.8vw, 20px);
    line-height: 1.12;
    text-align: center;
  }

  .body-home .about-photo-wrap {
    width: clamp(195px, 42vw, 230px);
    justify-self: center;
    transform: none;
  }

  .body-home .about-photo-card {
    max-height: min(340px, max(220px, calc(100svh - 275px)));
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  :root { --header-height: 82px; }
  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) { --header-height: 68px; }
  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .moon {
    width: 43.2px;
    height: 43.2px;
  }
  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .menu {
    right: clamp(24px, 6vw, 82px);
    gap: clamp(24px, 4vw, 48px);
  }
  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .menu a { font-size: clamp(24px, 2.4vw, 28px); }
  .moon {
    width: 62px;
    height: 62px;
  }

  .menu {
    right: clamp(24px, 6vw, 82px);
    gap: clamp(24px, 4vw, 48px);
  }

  .menu a {
    font-size: clamp(28px, 3.4vw, 38px);
  }

  .page {
    max-width: 960px;
    padding: 40px 28px 20px;
  }

  .body-home .hero h1 {
    font-size: calc(10vw + 142px);
  }

  .body-home .hero p {
    font-size: calc(2.23vw + 35.05px);
  }

}

@media (max-width: 760px) {
  :root { --header-height: 72px; }
  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) { --header-height: 68px; }
  .moon {
    width: 42px;
    height: 42px;
  }

  .menu {
    right: 14px;
    gap: 12px;
  }

  .menu a {
    font-size: 18px;
  }

  .page {
    padding-top: 28px;
  }

  .hero-copy {
    width: auto;
    display: flex;
    justify-content: center;
    text-align: left;
    gap: 4px;
    transform: translateY(-8px);
  }

  .hero h1 {
    font-size: clamp(132px, 33vw, 210px);
    line-height: 0.88;
  }

  .hero p {
    padding-top: 0;
    font-size: clamp(40px, 9.8vw, 72px);
  }

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

  .card {
    height: 340px;
    width: min(351px, 100%);
    margin: 0 auto;
  }

  .card::before,
  .card::after,
  .card-main {
    border-width: 4px;
  }

  .card img {
    margin-top: 0;
    width: 74px;
    height: 74px;
  }

  .card h3 {
    margin-top: 0;
    font-size: 48px;
  }

  .actions {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .btn {
    min-height: 72px;
    border-width: 4px;
    font-size: 40px;
    width: min(360px, 100%);
  }

  .btn.btn-accent {
    width: min(420px, 100%);
  }

  .about-text p {
    font-size: 40px;
  }

  .social-shell {
    width: min(360px, 96%);
    min-height: 164px;
    margin-top: 130px;
    padding: 14px 8px;
    border-radius: 52px;
  }

  .social-row a {
    width: 94px;
    height: 124px;
  }

  .social-row img {
    width: 88px;
    height: 88px;
  }

  .social-row img[data-asset="youtube"] {
    width: 64px;
    height: 64px;
  }

  .social-row img[data-asset="telegram"] {
    width: 82px;
    height: 82px;
  }

  .social-row img[data-asset="instagram"] {
    width: 54px;
    height: 54px;
  }

  .brand {
    margin-top: 44px;
  }
}

@media (max-width: 760px) {
  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .moon {
    left: 50%;
    width: clamp(37.8px, calc(1.23vw + 33.86px), 43.2px);
    height: clamp(37.8px, calc(1.23vw + 33.86px), 43.2px);
    transform: translate(-50%, -50%);
  }

  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .menu {
    left: auto;
    right: clamp(10px, calc(8.1vw - 15.9px), 45.7px);
    justify-content: flex-start;
    gap: clamp(12px, calc(4.2vw - 1.6px), 30.4px);
  }

  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .menu a {
    font-size: clamp(17px, calc(4vw + 4px), 24px);
    white-space: nowrap;
  }

  .body-home .page {
    padding: 0 18px;
  }

  .body-home .hero-copy {
    flex-direction: row;
    align-items: center;
    gap: clamp(4px, 0.8vw, 10px);
    text-align: left;
  }

  .body-home .hero h1 {
    font-size: clamp(136px, calc(22.16vw + 49.6px), 218px);
    line-height: 0.9;
  }

  .body-home .hero p {
    font-size: clamp(34px, calc(4.86vw + 15.05px), 52px);
    line-height: 0.88;
  }

}

/* Tarot Details Page */
.body-tarot {
  --tarot-hero-width: 577.2px;
  overflow-anchor: none;
}

.body-tarot .page {
  max-width: 1294px;
  padding: 56px 20px 20px;
}

.body-tarot .tarot-snap-frame {
  min-height: calc(100svh - var(--header-height));
}

.tarot-hero {
  display: grid;
  place-items: center;
}

.tarot-hero-stack {
  width: var(--tarot-hero-width);
  height: auto;
  aspect-ratio: 962 / 483;
  position: relative;
  transform: translateY(-56px);
  --tarot-card-h: calc(var(--tarot-hero-width) * 407 / 962);
  --tarot-stack-gap: calc(var(--tarot-hero-width) * 14 / 962);
  --tarot-layer-h: calc(var(--tarot-hero-width) * 44 / 962);
  --tarot-layer-radius: calc(var(--tarot-hero-width) * 46 / 962);
  --tarot-layer-stroke: calc(var(--tarot-hero-width) * 10 / 962);
  --tarot-mid-rise: calc(var(--tarot-hero-width) * 50 / 962);
  --tarot-back-rise: calc(var(--tarot-mid-rise) + var(--tarot-stack-gap) * 2 + var(--tarot-hero-width) * 8 / 962);
}

.tarot-hero-layer {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--tarot-layer-h);
  border: var(--tarot-layer-stroke) solid var(--stroke);
  border-top: none;
  border-radius: 0 0 var(--tarot-layer-radius) var(--tarot-layer-radius);
  pointer-events: none;
}

.tarot-hero-layer-back {
  top: calc(var(--tarot-card-h) + var(--tarot-stack-gap) * 2 - var(--tarot-back-rise));
  height: calc(var(--tarot-layer-h) + var(--tarot-back-rise));
  opacity: 0.4;
  z-index: 1;
}

.tarot-hero-layer-mid {
  top: calc(var(--tarot-card-h) - var(--tarot-hero-width) * 8 / 962 - var(--tarot-mid-rise));
  height: calc(var(--tarot-layer-h) + var(--tarot-mid-rise));
  opacity: 0.7;
  z-index: 2;
}

.tarot-hero-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--tarot-card-h);
  border: var(--tarot-layer-stroke) solid var(--stroke);
  border-radius: var(--tarot-layer-radius);
  display: grid;
  place-items: center;
  z-index: 3;
}

.tarot-hero-card h1 {
  margin: 0;
  font-size: clamp(43.2px, 3.6vw, 60px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.52em;
  padding-left: 0.52em;
}

.tarot-intro {
  display: grid;
  place-items: center;
}

.tarot-intro-content {
  width: 100%;
  display: grid;
  grid-template-columns: 170px minmax(0, 688px);
  align-content: center;
  justify-content: center;
  gap: 62px;
  padding: 0;
}

.tarot-label {
  margin: 0;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: 0.58em;
  padding-left: 0.58em;
  opacity: 0.6;
}

.tarot-intro-text {
  margin: 0;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.02;
}

@media (min-width: 1181px) {
  .tarot-intro-content {
    transform: translateX(-58px);
  }

  .tarot-label,
  .tarot-intro-text {
    font-size: clamp(20.16px, 2.016vw, 28.8px);
  }

  .tarot-label {
    transform: translate(115px, -26px);
  }
}

.tarot-cards-frame {
  display: grid;
  place-items: center;
  scroll-margin-top: calc(var(--header-height) + 55px);
  /* Подпись поднята внутри блока: оставляем место перед слайдом,
     чтобы она не заходила на предыдущий экран при малой высоте окна. */
  margin-top: 120px;
}

.tarot-cards-content {
  width: min(920px, calc(100vw - clamp(64px, 16vw, 180px)));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  container-type: inline-size;
  transform: translateY(clamp(-55px, calc(-55px + (100vw - 650px) * 29 / 530), -26px));
}

.body-tarot .tarot-cards-frame .cards {
  width: 100%;
}

.tarot-cards-frame .lead {
  margin: 0 0 48px;
}

.tarot-cards-frame .cards {
  margin: 0 auto 48px;
}

.tarot-cards-frame .actions {
  grid-template-columns: 1fr;
  justify-self: center;
  justify-items: center;
  width: fit-content;
  margin-inline: auto;
  margin-bottom: 0;
}

@media (min-width: 1181px) {
  .body-tarot .tarot-cards-content > .lead,
  .body-tarot .tarot-cards-content > .cards {
    position: relative;
    top: -30px;
  }

  .body-tarot .tarot-cards-content > .actions {
    position: relative;
    top: -2px;
  }
}

@media (min-width: 761px) {
  .body-tarot .tarot-cards-frame .lead {
    margin: 0 auto 30px;
    font-size: clamp(21px, 1.75vw, 29.4px);
    transform: translateY(-17px);
  }

  .body-tarot .tarot-cards-frame .cards {
    margin-bottom: 34px;
  }

  .body-tarot .tarot-cards-frame .card img {
    width: clamp(72px, 5.2vw, 92px);
    height: clamp(72px, 5.2vw, 92px);
  }

  .body-tarot .tarot-cards-frame .card h3 {
    font-size: clamp(42px, 3.2vw, 56px);
  }

  .body-tarot .tarot-cards-frame .btn,
  .body-tarot .tarot-cards-frame .btn.btn-accent {
    width: 266px;
    min-height: 42px;
    border-width: 3px;
    font-size: clamp(21px, 1.82vw, 29.4px);
  }
}

.tarot-details {
  margin: 0 auto;
  max-width: 1239px;
  display: grid;
  place-items: center;
  padding-top: 0;
}

.tarot-details-content {
  display: grid;
  gap: 50px;
  justify-items: center;
}

.tarot-details-main,
.tarot-details-note {
  margin: 0;
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.03;
  text-align: center;
  font-weight: 300;
}

.tarot-details-note {
  opacity: 0.5;
  white-space: nowrap;
}

@media (min-width: 1181px) {
  .body-tarot .tarot-details-content {
    width: min(920px, 100%);
  }

  .body-tarot .tarot-details-main {
    width: 100%;
  }

  .body-tarot .tarot-details-main,
  .body-tarot .tarot-details-note {
    font-size: clamp(20.16px, 2.016vw, 28.8px);
  }
}

/* Shared service pages: Love, Work, Life. */
.body-love .page {
  max-width: 1294px;
  padding: 0 20px 0;
}

.love-hero {
  min-height: calc(100svh - var(--header-height));
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 0;
  text-align: center;
}

.love-hero h1 {
  margin: 0;
  font-size: 100px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.89em;
  padding-left: 0.89em;
}

.love-hero p {
  width: min(1136px, 100%);
  margin: 76px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 40px;
  line-height: 1.05;
}

.love-intro {
  padding: clamp(72px, 12svh, 140px) 0;
  display: grid;
  grid-template-columns: 170px minmax(0, 743px);
  justify-content: center;
  align-content: center;
  gap: 180px;
}

.love-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0.89em;
  padding-left: 0.89em;
}

.love-intro-text {
  margin: 0;
  font-size: 40px;
  line-height: 1.04;
}

.love-topics {
  min-height: calc(100svh - var(--header-height));
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 32px 0 80px;
}

@media (min-width: 761px) {
  .body-love .love-topics {
    align-content: start;
  }
}

.love-topic-list {
  width: 100%;
  display: grid;
  justify-items: center;
}

.love-topic-row {
  appearance: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  width: min(1210px, 100%);
  min-height: 82px;
  position: relative;
  border-top: 1px solid rgba(217, 217, 217, 0.48);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  align-items: center;
  column-gap: 24px;
  cursor: pointer;
}

.love-topic-row:last-child {
  border-bottom: 1px solid rgba(217, 217, 217, 0.48);
}

.love-topic-row span {
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  transition: color 0.25s ease;
}

.love-topic-row img {
  width: 31.36px;
  height: 31.36px;
  justify-self: center;
  object-fit: contain;
  transition: filter 0.25s ease;
}

.love-topic-row:hover span,
.love-topic-row.is-active span {
  color: var(--accent);
}

.love-topic-row:hover img,
.love-topic-row.is-active img {
  filter: brightness(0) saturate(100%) invert(61%) sepia(27%) saturate(1032%) hue-rotate(276deg) brightness(86%) contrast(86%);
}

.love-actions {
  display: grid;
  gap: 18px;
  justify-items: center;
  margin-top: 34px;
}

.love-service-btn {
  width: min(640px, 100%);
  min-height: 70px;
  padding: 0 52px;
  border: 3px solid var(--accent);
  border-radius: 55px;
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease,
    background 0.25s ease;
}

.love-service-btn-outline:hover {
  transform: translateY(-2px);
  opacity: 0.9;
  background: rgba(204, 106, 165, 0.28);
}

.love-service-btn-filled {
  background: rgba(204, 106, 165, 0.3);
  pointer-events: none;
}

.love-footer {
  padding-top: 110px;
}

@media (max-width: 1080px) {
  .love-hero {
    min-height: calc(100svh - var(--header-height));
    padding: 0;
  }

  .love-hero h1 {
    font-size: 76px;
    letter-spacing: 0.42em;
    padding-left: 0.42em;
  }

  .love-hero p {
    margin-top: 52px;
    font-size: 34px;
  }

  .love-intro {
    grid-template-columns: 1fr;
    gap: 28px;
    transform: none;
  }

  .love-topic-row span,
  .love-intro-text,
  .love-label,
  .love-service-btn {
    font-size: 34px;
  }

}

@media (min-width: 761px) and (max-width: 1180px) {
  .body-love .page {
    max-width: 960px;
    padding: 0 28px;
  }

  .body-love .love-hero {
    min-height: calc(100svh - var(--header-height));
  }

  .body-love .love-hero h1 {
    font-size: clamp(70px, 9vw, 88px);
    letter-spacing: 0.56em;
    padding-left: 0.56em;
  }

  .body-love .love-hero p {
    width: min(820px, 100%);
    margin-top: 44px;
    font-size: clamp(30px, 4vw, 38px);
  }

  .body-love .love-intro {
    grid-template-columns: 220px minmax(0, 560px);
    justify-content: center;
    align-content: center;
    align-items: start;
    gap: 42px;
    padding: clamp(64px, 10svh, 112px) 24px;
  }

  .body-love .love-label,
  .body-love .love-intro-text {
    transform: none;
  }

  .body-love .love-label {
    justify-self: end;
    width: 220px;
    font-size: clamp(28px, 3.2vw, 34px);
    letter-spacing: 0.5em;
    padding-left: 0.5em;
    white-space: nowrap;
  }

  .body-love .love-intro-text {
    max-width: 560px;
    font-size: clamp(28px, 3.4vw, 34px);
    line-height: 1.06;
  }

  .body-love .love-topics {
    min-height: calc(100svh - var(--header-height));
    padding: 24px 0 64px;
    align-content: start;
  }

  .body-love .love-topic-row {
    width: min(1040px, 100%);
    min-height: 68px;
    grid-template-columns: minmax(0, 1fr) 46px;
    column-gap: 18px;
  }

  .body-love .love-topic-row span,
  .body-love .love-service-btn {
    font-size: clamp(24px, 3vw, 31px);
  }

  .body-love .love-topic-row img {
    width: 24px;
    height: 24px;
  }

  .body-love .love-actions {
    gap: 18px;
    margin-top: 42px;
  }

  .body-love .love-service-btn {
    width: 260px;
    min-height: 48px;
    border-width: 4px;
    font-size: clamp(24px, 3vw, 30px);
  }

  .body-love .love-footer {
    min-height: calc(100svh - var(--header-height));
    padding-top: 0;
    align-content: center;
  }

  .body-love .love-footer .social-shell {
    margin-top: 0;
    transform: none;
  }
}

@media (max-width: 760px) {
  .body-love .page {
    padding: 0 20px;
  }

  .love-hero {
    min-height: calc(100svh - var(--header-height));
    padding: 0;
    align-content: center;
    justify-items: center;
    transform: translateY(-38px);
  }

  .love-hero h1 {
    font-size: 54px;
    letter-spacing: 0.58em;
    padding-left: 0.58em;
  }

  .love-hero p {
    width: min(374px, 100%);
    margin-top: 34px;
    font-size: 20px;
    line-height: 1.12;
  }

  .love-intro {
    width: 100vw;
    min-height: calc(100svh - var(--header-height));
    margin-left: calc(50% - 50vw);
    grid-template-columns: 92px minmax(0, 314px);
    justify-content: center;
    align-content: center;
    align-items: start;
    gap: 4px;
    padding: 0 16px;
    transform: none;
  }

  .love-label {
    margin-top: -44px;
    font-size: 28px;
    line-height: 1;
    letter-spacing: 0.48em;
    padding-left: 0.48em;
    text-transform: lowercase;
    transform: none;
  }

  .love-intro-text {
    font-size: 26px;
    line-height: 1.12;
    transform: none;
  }

  .love-topic-row {
    width: min(436px, calc(100vw - 120px));
    min-height: 63px;
    grid-template-columns: minmax(0, 1fr) 38px;
    column-gap: 16px;
    border-top-color: rgba(217, 217, 217, 0.58);
  }

  .love-topic-row span {
    padding-left: 16px;
    font-size: 19px;
  }

  .love-topic-row img {
    width: 20px;
    height: 20px;
  }

  .love-topics {
    width: 100vw;
    min-height: calc(100svh - var(--header-height));
    margin-left: calc(50% - 50vw);
    padding: 0;
    align-content: center;
    justify-items: center;
  }

  .love-actions {
    gap: 18px;
    margin-top: 102px;
    transform: none;
  }

  .love-service-btn {
    width: 224px;
    min-height: 58px;
    padding: 0 28px;
    border-width: 4px;
    font-size: 22px;
  }

  .body-love .love-footer {
    width: 100vw;
    min-height: calc(100svh - var(--header-height));
    margin-left: calc(50% - 50vw);
    padding-top: 0;
    align-content: center;
  }

}

/* Первый экран страниц Любовь, Работа и Жизнь: уменьшенный заголовок и подпись. */
:is(.body-love-page, .body-work, .body-life) .love-hero {
  grid-template-columns: min-content;
  justify-content: center;
}

:is(.body-love-page, .body-work, .body-life) .love-hero h1 {
  font-size: 60px;
  letter-spacing: 0.534em;
  padding-left: 0.534em;
}

:is(.body-love-page, .body-work, .body-life) .love-hero p {
  width: 100%;
  margin-top: 20px;
  font-size: 24px;
  white-space: nowrap;
}

@media (min-width: 761px) and (max-width: 1180px) {
  :is(.body-love-page, .body-work, .body-life) .love-hero h1 {
    font-size: clamp(42px, 5.4vw, 52.8px);
    letter-spacing: 0.336em;
    padding-left: 0.336em;
  }

  :is(.body-love-page, .body-work, .body-life) .love-hero p {
    margin-top: 18px;
    font-size: clamp(18px, 2.4vw, 22.8px);
  }
}

@media (max-width: 760px) {
  :is(.body-love-page, .body-work, .body-life) .love-hero h1 {
    font-size: 32.4px;
    letter-spacing: 0.348em;
    padding-left: 0.348em;
  }

  :is(.body-love-page, .body-work, .body-life) .love-hero p {
    margin-top: 14px;
    font-size: 12px;
  }
}

/* Shared mobile contacts on all five pages. */
@media (max-width: 760px) {
  :is(.body-home, .body-tarot, .body-love) .footer .social-shell {
    width: min(350px, 100%);
    min-height: 160px;
    margin-top: 0;
    padding: 0;
    transform: none;
  }

  :is(.body-home, .body-tarot, .body-love) .footer .social-row {
    transform: none;
  }

  :is(.body-home, .body-tarot, .body-love) .footer .social-row a {
    width: 82px;
    height: 110px;
  }

  :is(.body-home, .body-tarot, .body-love) .footer .social-row img {
    width: 76px;
    height: 76px;
  }

  :is(.body-home, .body-tarot, .body-love) .footer .social-row img[data-asset="youtube"] {
    width: 56px;
    height: 56px;
  }

  :is(.body-home, .body-tarot, .body-love) .footer .social-row img[data-asset="telegram"] {
    width: 72px;
    height: 72px;
  }

  :is(.body-home, .body-tarot, .body-love) .footer .social-row img[data-asset="instagram"] {
    width: 48px;
    height: 48px;
  }

  :is(.body-home, .body-tarot, .body-love) .footer .brand {
    margin-top: 42px;
    font-size: 72px;
    transform: translateY(150px);
  }

}

/* Одинаковый блок соцсетей на главной, Таро и страницах Любовь, Работа, Жизнь. */
:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer {
  --social-height: clamp(160px, calc(10.38vw + 119.5px), 242px);
  position: relative;
  min-height: calc(100svh - var(--header-height));
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .social-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100%, clamp(350px, calc(51.9vw + 147.5px), 760px));
  min-height: var(--social-height);
  margin: 0;
  transform: translate(-50%, -50%);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .social-row {
  transform: none;
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .social-row a {
  width: min(clamp(82px, calc(6.33vw + 57.3px), 132px), calc(25vw - 9px));
  height: clamp(110px, calc(8.35vw + 77.4px), 176px);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .social-row img[data-asset="telegram"] {
  width: clamp(72px, calc(6.08vw + 48.3px), 120px);
  height: clamp(72px, calc(6.08vw + 48.3px), 120px);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .social-row img[data-asset="tiktok"] {
  width: clamp(62px, calc(5.32vw + 41.25px), 104px);
  height: clamp(62px, calc(5.32vw + 41.25px), 104px);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .social-row img[data-asset="youtube"] {
  width: clamp(56px, calc(4.56vw + 38.22px), 92px);
  height: clamp(56px, calc(4.56vw + 38.22px), 92px);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .social-row img[data-asset="instagram"] {
  width: clamp(48px, calc(3.8vw + 33.18px), 78px);
  height: clamp(48px, calc(3.8vw + 33.18px), 78px);
}

:is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .brand {
  position: absolute;
  bottom: 8px;
  left: 50%;
  margin: 0;
  font-size: clamp(43.2px, calc(1.1vw + 38.9px), 60px);
  transform: translateX(-50%);
}

/* На телефоне высота карточек и контактов рассчитана на свёрнутую
   панель браузера и не меняется
   во время её анимации. svh первого экрана сохраняет место для открытой панели. */
@media (max-width: 760px) {
  .body-home .home-tarot-frame {
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100lvh - var(--header-height));
    padding-block: 40px;
  }

  .body-home .about {
    min-height: 0;
    padding-block: 48px 32px;
    gap: 28px;
  }

  .body-home .about-photo-card {
    max-height: none;
  }

  .body-tarot .page {
    padding-bottom: 0;
  }

  .body-tarot .tarot-intro {
    min-height: calc(100lvh - var(--header-height));
    padding-bottom: calc(100lvh - 100svh);
  }

  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer {
    min-height: max(360px, calc(100vh - var(--header-height)));
    min-height: max(360px, calc(100lvh - var(--header-height)));
  }

  :is(.body-home, .body-tarot, .body-love-page, .body-work, .body-life) .footer .brand {
    bottom: max(24px, env(safe-area-inset-bottom, 0px));
  }
}

/* Центры слайдов не зависят от ширины окна. Масштабируются только
   содержимое и его внутренние интервалы; внешние отступы постоянны. */
@media (max-width: 1180px) {
  :is(.body-tarot, .body-love-page, .body-work, .body-life) {
    --tarot-hero-width: min(
      577.2px,
      max(calc(75vw - 48px), calc(91.727273vw - 119.927273px))
    );
    --tarot-content-width: min(920px, calc(100vw - clamp(40px, 16vw, 180px)));
    --tarot-reading-width: min(
      var(--tarot-content-width),
      max(var(--tarot-hero-width), calc(122.2vw - 290.32px))
    );
    --tarot-copy-size: min(
      clamp(22px, 2.016vw, 28.8px),
      calc(var(--tarot-reading-width) * 22 / 262.5)
    );
    --tarot-copy-leading: clamp(0px, calc(5.5px - 0.466102vw), 2.2px);
  }

  .body-tarot .tarot-hero-card h1 {
    font-size: clamp(28px, calc(2vw + 19.6px), 43.2px);
  }

  :is(.body-tarot, .body-love-page, .body-work, .body-life) .tarot-intro-content {
    width: var(--tarot-reading-width);
    grid-template-columns: clamp(0px, calc(27.419355vw - 153.548387px), 170px) minmax(0, 1fr);
    gap: clamp(0px, calc(10vw - 56px), 62px);
    transform: translateX(clamp(-58px, calc(52.387097px - 9.354839vw), 0px));
  }

  :is(.body-tarot, .body-love-page, .body-work, .body-life) .tarot-label {
    width: max-content;
    font-size: var(--tarot-copy-size);
    padding-left: clamp(0px, calc(7vw - 39.2px), 0.58em);
    white-space: nowrap;
    transform: translate(clamp(0px, calc(18.548387vw - 103.870968px), 115px), -26px);
  }

  :is(.body-tarot, .body-love-page, .body-work, .body-life) .tarot-intro-text {
    min-width: 0;
    font-size: var(--tarot-copy-size);
    line-height: calc(1.02em + var(--tarot-copy-leading));
    overflow-wrap: anywhere;
  }

  .body-tarot .tarot-cards-frame .lead {
    width: 100%;
    margin: 0 0 3.26087cqw;
    font-size: 2.282609cqw;
    line-height: 1;
    white-space: nowrap;
    position: relative;
    top: -3.26087cqw;
    transform: translateY(-1.847826cqw);
  }

  .body-tarot .tarot-cards-frame .cards {
    margin: 0 0 3.695652cqw;
    position: relative;
    top: -3.26087cqw;
  }

  .body-tarot .tarot-cards-frame .card-main {
    gap: clamp(12px, 3.078261cqw, 28.32px);
  }

  .body-tarot .tarot-cards-frame .card img {
    width: clamp(50px, 7.83cqw, 72px);
    height: auto;
    aspect-ratio: 1;
  }

  .body-tarot .tarot-cards-frame .card h3 {
    font-size: clamp(21px, 4.565cqw, 42px);
  }

  .body-tarot .tarot-cards-frame .actions {
    gap: 0;
    margin: 0;
    position: relative;
    top: -0.217391cqw;
  }

  .body-tarot .tarot-cards-frame .btn.btn-accent {
    width: clamp(180px, 28.913043cqw, 266px);
    min-height: 42px;
    border-width: 3px;
    font-size: clamp(18px, 1.82vw, 29.4px);
  }

  .body-tarot .tarot-details-content {
    width: var(--tarot-reading-width);
    max-width: 100%;
    gap: clamp(28px, calc(3.548387vw + 8.129032px), 50px);
  }

  .body-tarot .tarot-details-main,
  .body-tarot .tarot-details-note {
    width: 100%;
    font-size: var(--tarot-copy-size);
    line-height: calc(1.03em + var(--tarot-copy-leading));
    overflow-wrap: anywhere;
  }

  .body-tarot .tarot-details-note {
    font-size: clamp(18px, 2.016vw, 28.8px);
    white-space: normal;
  }
}

/* Та же мобильная композиция карточек, что на главной: две + одна. */
@media (max-width: 650px) {
  .body-tarot .tarot-cards-content {
    width: min(347px, calc(100vw - 64px));
  }

  .body-tarot .tarot-cards-frame .lead {
    font-size: 3.89cqw;
  }
}

:is(.body-love-page, .body-work, .body-life) .love-intro {
  width: 100%;
  min-height: calc(100svh - var(--header-height));
  margin-left: 0;
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  transform: none;
}

:is(.body-love-page, .body-work, .body-life) .tarot-label {
  transform: translateY(-26px);
}

:is(.body-love-page, .body-work, .body-life) .love-topics {
  align-content: center;
  padding: 0;
}

:is(.body-love-page, .body-work, .body-life) .love-topic-list {
  transform: scale(0.7);
  transform-origin: center;
}

@media (min-width: 761px) {
  :is(.body-love-page, .body-work, .body-life) .page {
    padding-bottom: 20px;
  }
}

/* Любовь, Работа, Жизнь: плавный масштаб без скачков между ширинами. */
:is(.body-love-page, .body-work, .body-life) {
  --love-title-size: clamp(32.4px, calc(18.774684px + 3.493671vw), 60px);
  --love-intro-width: var(--tarot-reading-width, 920px);
  --love-intro-size: min(
    clamp(22px, calc(22px + (100vw - 760px) * 6.8 / 420), 28.8px),
    calc(var(--love-intro-width) * 22 / 262.5)
  );
  --love-page-end: clamp(0px, calc((100vw - 760px) / 21), 20px);
  overflow-anchor: none;
}

:is(.body-love-page, .body-work, .body-life) .page {
  max-width: 1294px;
  padding: 0 20px var(--love-page-end);
}

:is(.body-love-page, .body-work, .body-life) .moon {
  width: clamp(37.8px, max(calc(35.137139px + 0.682785vw), calc(34.58px + 0.73vw)), 49.5px);
  height: clamp(37.8px, max(calc(35.137139px + 0.682785vw), calc(34.58px + 0.73vw)), 49.5px);
}

:is(.body-love-page, .body-work, .body-life) .menu {
  left: auto;
  right: clamp(10px, max(calc(7vw - 11.82px), calc(13.1vw - 83.8px)), 212px);
  gap: clamp(12px, min(calc(4.101266vw - 1.214937px), calc(2.1vw + 22.4px)), 74px);
  justify-content: flex-start;
}

:is(.body-love-page, .body-work, .body-life) .menu a {
  font-size: clamp(17px, min(calc(15.470936px + 1.058734vw), calc(16.4px + 0.98vw)), 36px);
  white-space: nowrap;
}

:is(.body-love-page, .body-work, .body-life) :is(.love-hero, .love-intro, .love-topics) {
  width: 100%;
  min-height: calc(100svh - var(--header-height));
  margin: 0;
  padding: 0;
  align-content: center;
  justify-items: center;
  transform: none;
}

:is(.body-love-page, .body-work, .body-life) .love-hero h1 {
  font-size: var(--love-title-size);
  letter-spacing: 0.534em;
  padding-left: 0.534em;
}

:is(.body-love-page, .body-work, .body-life) .love-hero p {
  width: 100%;
  margin: calc(var(--love-title-size) / 3) 0 0;
  font-size: calc(var(--love-title-size) * 0.4);
  line-height: 1.05;
}

/* Как на Таро: левая колонка плавно сужается до нуля,
   название остаётся над текстом на узком экране. */
:is(.body-love-page, .body-work, .body-life) .tarot-intro-content {
  width: var(--love-intro-width);
  grid-template-columns: clamp(0px, calc(27.419355vw - 153.548387px), 170px) minmax(0, 1fr);
  gap: clamp(0px, calc(10vw - 56px), 62px);
  transform: translateX(clamp(-58px, calc(52.387097px - 9.354839vw), 0px));
}

:is(.body-love-page, .body-work, .body-life) .tarot-label,
:is(.body-love-page, .body-work, .body-life) .tarot-intro-text {
  font-size: var(--love-intro-size);
}

:is(.body-love-page, .body-work, .body-life) .tarot-label {
  width: max-content;
  padding-left: clamp(0px, calc(7vw - 39.2px), 0.58em);
  white-space: nowrap;
  transform: translateY(-26px);
}

:is(.body-love-page, .body-work, .body-life) .tarot-intro-text {
  line-height: calc(1.02em + var(--tarot-copy-leading, 0px));
  overflow-wrap: anywhere;
}

:is(.body-love-page, .body-work, .body-life) .love-topic-list {
  width: min(847px, calc(70vw - 28px));
  transform: none;
}

@media (max-width: 760px) {
  :is(.body-love-page, .body-work, .body-life) .love-topic-list {
    transform: scale(1.1);
    transform-origin: center;
  }
}

:is(.body-love-page, .body-work, .body-life) .love-topic-row {
  width: 100%;
  min-height: clamp(44.1px, calc(37.534177px + 1.683544vw), 57.4px);
  grid-template-columns: minmax(0, 1fr) clamp(26.6px, calc(20.379747px + 1.594937vw), 39.2px);
  column-gap: clamp(11.2px, calc(8.435443px + 0.708861vw), 16.8px);
  border-top-width: 0.7px;
  border-top-color: rgba(217, 217, 217, 0.48);
}

:is(.body-love-page, .body-work, .body-life) .love-topic-row:last-child {
  border-bottom-width: 0.7px;
}

:is(.body-love-page, .body-work, .body-life) .love-topic-row span {
  padding-left: 0;
  font-size: clamp(13.3px, calc(6.043038px + 1.860759vw), 28px);
}

:is(.body-love-page, .body-work, .body-life) .love-topic-row img {
  width: clamp(14px, calc(10.074329px + 1.006582vw), 21.952px);
  height: clamp(14px, calc(10.074329px + 1.006582vw), 21.952px);
}

:is(.body-love-page, .body-work, .body-life) .footer {
  min-height: max(360px, calc(100vh - var(--header-height)));
  min-height: max(360px, calc(100lvh - var(--header-height)));
}

:is(.body-love-page, .body-work, .body-life) .footer .brand {
  bottom: max(env(safe-area-inset-bottom, 0px), calc(24px - var(--love-page-end) * 0.8));
}

/* Keyboard focus and motion preferences. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none;
    scroll-behavior: auto;
  }
}
