/* Sections after "Части атласа": aardvark card (B1/B2) and capsules WhyCapsules / ReserveNow / Footer (A4/A5). */

/* ---------- aardvark book card (.books-slider__*), em-based: 1em = 12px at 1440. Slide 26em, padding 0 2em -> card 22em ---------- */
.slider { font-size: calc(100vw * 12 / 1440); margin-top: 0; padding: 3em 0 4em; overflow: hidden; }
.slider__wrap { position: relative; display: flex; padding: 0 1em; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.slider__wrap:active { cursor: grabbing; }
.slide { flex: 0 0 26em; padding: 0 2em; }
.card { will-change: transform; }
/* inner: transition rotate .35s ease-bounce; hover (:has(link:hover)) rotate x1.3 after .1s */
.card__inner { rotate: 0deg; transition: rotate .35s var(--ease-bounce); }
/* frame: solid colour, radius 2em, no shadow, no border; padding 1em 1em 1.5em, column, gap 1em */
.card__bg { background: var(--frame); color: var(--ink); border-radius: 2em; padding: 1em 1em 1.5em;
  display: flex; flex-direction: column; gap: 1em; }
/* cover: radius 1em, overflow clip, object-fit cover; tall 2:3 like aardvark (240x370 = 2:3.08), owner 28.11: «более вытянутое» */
.card__cover { position: relative; border-radius: 1em; overflow: clip; aspect-ratio: 2 / 3; background: rgba(24, 23, 23, .16); }
.card__cover--mock { display: grid; place-items: center; background: #E9E2D6; }
.card__cover.card__cover--mock img { width: 88%; height: auto; object-fit: contain; transform: none; }
.card__cover img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transform-origin: var(--o, 50% 50%);
  pointer-events: none; -webkit-user-drag: none; }
/* content: column, gap .75em; tags above the title (aardvark uses column-reverse on the same order) */
.card__content { display: flex; flex-direction: column; gap: .75em; padding: 0 .125em; }
/* .tag-small: radius 1.5em, padding .4375em .5em, Degular 600 13.5px lh 1, gap .25em, solid fills, no border */
.tags { display: flex; flex-wrap: wrap; gap: .25em; margin: 0; padding: 0; list-style: none; }
.tag { display: inline-flex; padding: .4375em .5em; border-radius: 1.5em; font-size: 1.125em; line-height: 1; font-weight: 600; }
.tag--part { background: var(--black); color: var(--white); }
.tag--count { background: var(--t2bg); color: var(--t2fg); }
/* title: Champ 700 2.5em lh .88 -> Golos Text 800; slider.js steps the size down until it fits 2 lines (Cyrillic words are longer) */
.card__title { margin: 0; font-size: 2.5em; line-height: .88; font-weight: 800; letter-spacing: -0.01em; hyphens: manual; padding-bottom: .06em; }
/* blurb: Degular 600 1.25em lh 1.2 ls -.02em, 3 lines then ellipsis */
.card__blurb { margin: 0; font-size: 1.25em; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card--dark { --ink: var(--white); }
.card--light { --ink: var(--black); }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__inner { rotate: calc(var(--book-slider-item-rotate, 0deg) * 1.3); transition: rotate .35s .1s var(--ease-bounce); }
}

/* below 992px aardvark drops smooothy for native snap scrolling (wrapper padding 2em 1.25em). At 390 their card is 224px wide
   (= 22em at 10.2px) with the title enlarged to 29.1px and 14px text; same proportions here: 1em = 250/26 px at 390 */
@media (max-width: 991px) {
  .controls { display: none; }
  .slider { font-size: clamp(9.6px, 2.465vw, 12px); padding: 0; margin-top: 24px; }
  /* touch-action: the desktop pan-y (drag is smooothy's there) blocked the horizontal swipe on phones (owner 29.11) */
  .slider__wrap { overflow-x: auto; scroll-snap-type: x mandatory; padding: 2em 1.6em 3em; cursor: auto; scrollbar-width: none;
    touch-action: pan-x pan-y; }
  .slider__wrap::-webkit-scrollbar { display: none; }
  .slide { flex-basis: 26em; padding: 0 1.2em; scroll-snap-align: center; }
  .card { will-change: auto; }
  .card__title { font-size: 3em; }
  .card__blurb { font-size: 1.45em; }
  .tag { font-size: 1.3em; }
}

/* ---------- capsules Reviews («Do people like us?»), owner 29.11 in place of the «Предзаказ» frame, static like the original
   (owner: «там нет никакой анимации»). Measured on capsules at 1898: @px-[40] @py-[60]; label 18u/600 white; quote @text-[100],
   @tracking-[-4], @max-w-[1400], @py-[50], line step 99px. Here the size is also capped by the screen height (owner: «даже не
   помещается на экран») so label + quote + name fit one screen; width 1560u keeps the longer Russian text to 5 lines. ---------- */
.quote { padding: calc(60 * var(--v)) calc(40 * var(--v)); }
.quote__text { margin: 0; padding: calc(40 * var(--v)) 0; max-width: calc(1560 * var(--v)); }
.quote__text p { margin: 0; font-size: min(calc(100 * var(--v)), 9.6svh); line-height: 1; letter-spacing: -0.04em; font-weight: 400; color: var(--white); text-wrap: pretty; }
.quote__who { display: flex; align-items: center; gap: calc(20 * var(--u)); }
/* owner's portrait (29.11), 288x288 crop = 3x the 90u circle */
.quote__photo { flex: none; width: calc(112.5 * var(--u)); height: calc(112.5 * var(--u)); /* owner 04.12: +25% (was 90u) */ border-radius: 50%; object-fit: cover; background: var(--middle); }
.quote__name { margin: 0; font-size: calc(18 * var(--u)); line-height: 1.3; color: var(--white); }
.quote__name span { color: var(--light); }

/* ---------- capsules Footer: lead @mt-[240] @px-[40]; BookYourCapsule @h-[270], track @px-[30] @py-[40], @text-[230];
   mid row @py-[140] @px-[40]; social row @px-[40] @pb-[80], circles 64u ring lightBrown, fill scales 0 -> 1 (.3s);
   hairline lightBrown; bottom row @py-[80] @px-[40] three flex-1 cells; then the wordmark ---------- */
/* the section above slides 30vh down behind the footer (motion.js footer()), so the footer paints over it */
.foot { position: relative; z-index: 1; background: var(--black); margin-top: 0; overflow: hidden; }
/* capsules Footer gradient: bottom 100vh fill black -> middleBrown behind the content */
.foot::after { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 100vh; pointer-events: none;
  background: linear-gradient(to bottom, var(--black), var(--middle)); }
.foot__lead { padding: 0 calc(40 * var(--v)); margin-top: calc(100 * var(--v)); color: var(--white); }
.book { position: relative; height: calc(270 * var(--v)); overflow: hidden; cursor: pointer; outline: none; }
.book__track { display: flex; width: max-content; padding: calc(40 * var(--v)) calc(30 * var(--v)); will-change: transform; }
.book__set { display: flex; align-items: center; font-size: calc(230 * var(--v)); line-height: 1; letter-spacing: calc(-4 * var(--v)); white-space: nowrap; }
.book__set span { color: var(--white); transition: color .4s ease; }
.book:hover .book__set span, .book:focus-visible .book__set span { color: var(--light); }
.foot__mid { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: calc(70 * var(--v)) calc(40 * var(--v)); }
.foot__p { margin: 0; font-size: calc(36 * var(--u)); line-height: 1.2; letter-spacing: -0.01em; color: var(--light); }
.foot__p--gap { margin-top: calc(30 * var(--v)); }
/* owner 06.12: price block 20% larger than .foot__p, white */
.foot__price p { margin: 0; font-size: calc(43.2 * var(--u)); line-height: 1.2; letter-spacing: -0.01em; color: var(--white); }
.foot__price p + p { margin-top: calc(14 * var(--v)); }
.foot__price + .foot__p--gap { margin-top: calc(40 * var(--v)); }
.foot__p a { color: var(--white); text-decoration: underline; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.foot__nav { display: flex; flex-direction: column; align-items: flex-end; }
/* FooterLink: text y -> -110%, copy from +100% -> 0 and to lightBrown, power3.inOut */
.flink { position: relative; display: block; overflow: hidden; font-size: calc(36 * var(--u)); line-height: 1.2; color: var(--white); text-decoration: none; }
.flink span { display: block; transition: transform .6s cubic-bezier(.65, 0, .35, 1), color .6s cubic-bezier(.65, 0, .35, 1); }
.flink span + span { position: absolute; top: 0; right: 0; transform: translateY(100%); }
.flink:hover span:first-child, .flink:focus-visible span:first-child { transform: translateY(-110%); }
.flink:hover span + span, .flink:focus-visible span + span { transform: translateY(0); color: var(--light); }
/* owner 28.11 (third chat): circles were touching («слиплись»), the contacts text repeated them, the hairline, bottom row and
   «Атлас» wordmark are removed (author's name moved into the running line) — the footer ends with the two circles */
.foot__social { display: flex; align-items: center; padding: 0 calc(40 * var(--v)) calc(60 * var(--v)); }
.soc { display: flex; gap: calc(14 * var(--u)); }
.soc a { position: relative; display: grid; place-items: center; width: calc(64 * var(--u)); height: calc(64 * var(--u)); border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--light); overflow: hidden; color: var(--white); }
.soc a::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--light); transform: scale(0);
  transition: transform .3s cubic-bezier(.45, 0, .55, 1); }
.soc a:hover::before, .soc a:focus-visible::before { transform: scale(1); }
.soc svg { position: relative; width: calc(22 * var(--u)); height: calc(22 * var(--u)); transition: color .3s; }
.soc a:hover svg, .soc a:focus-visible svg { color: var(--black); }
/* wordmark: inline SVG of Geist 500 outlines (tools/wordmark.py), one <path> per glyph filled with the capsules gradient in
   objectBoundingBox units, so each glyph runs #B3A694 -> #F5EFE6 over its own height, tails included. Full width like capsules. */
.foot__word { display: block; width: 100%; height: auto; overflow: visible; }

/* owner 04.12: «футер с текстом Искусство визуального объяснения сделать меньше… на 30-40% для десктопов, на телефонах норм» —
   desktop only: wordmark 100% -> 62% of the width (left edge on the 40v page margin), the rest of the footer x0.65 */
@media (min-width: 768px) {
  .foot__lead { margin-top: calc(65 * var(--v)); }
  .book { height: calc(175 * var(--v)); }
  .book__track { padding: calc(26 * var(--v)) calc(30 * var(--v)); }
  .book__set { font-size: calc(150 * var(--v)); letter-spacing: calc(-2.6 * var(--v)); }
  .foot__mid { padding: calc(45 * var(--v)) calc(40 * var(--v)); }
  .foot__p, .flink { font-size: calc(24 * var(--u)); }
  .foot__price p { font-size: calc(28.8 * var(--u)); }
  .foot__p--gap { margin-top: calc(20 * var(--v)); }
  .foot__social { padding: 0 calc(40 * var(--v)) calc(40 * var(--v)); }
  .soc a { width: calc(48 * var(--u)); height: calc(48 * var(--u)); }
  .soc svg { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
  .foot__word { width: 62%; margin: 0 0 calc(40 * var(--v)) calc(40 * var(--v)); }
}

@media (max-width: 767px) {
  .quote { padding: 40px 16px; }
  .quote__text { padding: 20px 0 28px; }
  .quote__text p { font-size: 8.4vw; letter-spacing: -0.03em; line-height: 1.1; }
  .quote__who { gap: 14px; }
  .quote__photo { width: 75px; height: 75px; } /* owner 04.12: +25% (was 60px) */
  .quote__name { font-size: 15px; }
  .foot__lead { padding: 0 16px; margin-top: 40px; }
  .book { height: auto; }
  .book__track { padding: 20px 16px; }
  .book__set { font-size: 17vw; }
  .foot__mid { flex-direction: column; align-items: flex-start; padding: 48px 16px; gap: 40px; }
  .foot__p, .flink { font-size: 20px; }
  .foot__price p { font-size: 24px; }
  .foot__p br { display: none; }
  .foot__nav { align-items: flex-start; }
  .flink span + span { left: 0; right: auto; }
  .foot__social { padding: 0 16px 48px; }
  .soc { gap: 12px; }
  .soc a { width: 52px; height: 52px; } .soc svg { width: 20px; height: 20px; }
}
