/* Atlas pre-order prototype. Values are copied from extract.md (capsules = layout/colour/type/buttons/scroll,
   aardvark = book card + its motion). Comments name the source of each number. */

@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/Golos-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/Golos-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* One family for every glyph: Host Grotesk (capsules) has no Cyrillic; Golos Text is the owner's pick with it */
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/Golos-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(fonts/Golos-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
/* owner 29.11: «Давай использовать Geist шрифт, мне он нравится» (picked from a 7-font sheet, fonts-cmp/fonts2.png).
   Golos stays only on the «Заказать»-type buttons: owner liked it there («на кнопках классный шрифт»). */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/Geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/Geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/Geist-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/Geist-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

:root {
  /* capsules tokens */
  --black: #181717; --dark: #2A2725; --middle: #332E2B; --light: #B1A696; --white: #F4EFE7;
  /* Atlas cover burgundy (banner lettering) */
  --burgundy: #64263F;
  /* capsules scale: design px at 1920 -> 100vw/1920 (0.75px at 1440). --v for display, --u clamped for UI text */
  --v: calc(100vw / 1920);
  --u: clamp(0.66px, calc(100vw / 1920), 1.25px);
  /* aardvark eases */
  --ease-bounce: cubic-bezier(0.34, 1.57, 0.64, 1);
  --ease-smooth: cubic-bezier(0.32, 0.72, 0, 1);
  --z-header: 20; --z-overlay: 30; --z-panel: 40;
  --font: "Geist", system-ui, sans-serif; /* owner 28.11: Wix Madefor -> Geologica -> Golos; 29.11 -> Geist */
  --font-button: "Golos Text", system-ui, sans-serif;
}
@media (max-width: 767px) { :root { --v: calc(100vw / 480); --u: calc(100vw / 480); } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); }
body { margin: 0; background: var(--black); color: var(--white); font-family: var(--font); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- capsules SecondaryButton: 64u pill, 6u padding, 18u label, dark disc ---------- */
.pill { height: calc(64 * var(--u)); padding: calc(6 * var(--u)); border: 0; border-radius: calc(50 * var(--u));
  background: var(--white); display: inline-flex; align-items: center; justify-content: space-between; cursor: pointer; }
.pill:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.pill__text { position: relative; overflow: hidden; display: grid; text-align: center; margin: 0 calc(16 * var(--u)) calc(1 * var(--u)) calc(24 * var(--u));
  color: var(--dark); font-family: var(--font-button); font-size: calc(18 * var(--u)); line-height: 1.5; font-weight: 400; white-space: nowrap; }
.pill__t1, .pill__t2 { grid-area: 1 / 1; }
.pill__t2 { transform: translateY(90%); }
.pill--secondary .pill__t2 { opacity: 0; } /* SecondaryButton text2: opacity-0; PrimaryButton text2 has none */
.pill__disc { height: 100%; aspect-ratio: 1; border-radius: 9999px; background: var(--dark); display: grid; place-items: center; }
/* disc @px-[15]: icon = 52u - 30u = 22u wide (16.5px @1440); fill #B1A696 (capsules lightBrown, not white) */
.pill__disc svg { width: calc(22 * var(--u)); height: auto; fill: var(--light); }
.pill[disabled] { cursor: progress; }

/* ---------- fixed header (capsules TopBar: fixed top-0, padding 40u) ---------- */
.header { position: fixed; inset: 0 0 auto 0; z-index: var(--z-header); display: flex; justify-content: flex-end;
  align-items: center; padding: calc(40 * var(--u)); pointer-events: none; }
.header > * { pointer-events: auto; }
/* owner 04.12: the fixed «Заказать» is visible on the whole page (no hiding over the footer) */
/* owner 30.11: icons sit left of «Заказать» and leave when the page scrolls (they do not travel with the button) */
.header { gap: calc(14 * var(--u)); }
.header__soc { transition: scale .45s cubic-bezier(.65, 0, .35, 1), opacity .3s ease; }
.header.is-down .header__soc { scale: 0; opacity: 0; pointer-events: none; }

/* ---------- hero (capsules: @p-[10] h-svh @mb-[120], frame @rounded-[60]) ---------- */
/* 29.11 owner: «пустые места… отнимают много места… везде между частями» — every band measured by tools/gaps.cjs */
.hero { padding: calc(10 * var(--v)); margin-bottom: calc(30 * var(--v)); }
/* 29.11 owner: «уберём стиль обложки… нашими шрифтами большими буквами на подходящем цвете фоне, а не картинкой».
   Live type on a flat colour; line 2 spans the frame width, «Атлас» is set larger. Sizes in cqw of the frame. */
.hero { height: 100svh; }
.hero__frame { height: 100%; position: relative; border-radius: calc(60 * var(--v)); overflow: hidden;
  container-type: inline-size; background: var(--hero-bg); color: var(--hero-ink);
  display: flex; flex-direction: column; justify-content: space-between; padding: calc(40 * var(--v)) calc(40 * var(--v)) calc(30 * var(--v)); }
/* owner 29.11: variant Б — black-to-grey gradient, white letters (burgundy rejected: not a site colour) */
.hero { --hero-bg: linear-gradient(160deg, #0F0E0E 0%, #181717 35%, #4A4542 100%); --hero-ink: var(--white); --hero-sub: var(--light); }
/* 29.11 (4): owner — «Атлас акушера-гинеколога / Аида Дарбинян» top-left a bit larger; equal top and bottom margins;
   the book (atlas-book.js, #heroBook) and the title share one band: the book box is exactly as tall as the title. */
.hero__frame { display: grid; grid-template-columns: minmax(0, 58fr) minmax(0, 42fr); grid-template-rows: auto minmax(0, 1fr) auto;
  column-gap: calc(40 * var(--v)); padding: calc(50 * var(--v)); }
.hero__sub { grid-column: 1; grid-row: 1; margin: -0.21em 0 0; color: var(--white); font-size: calc(52 * var(--u)); line-height: 1.12;
  font-weight: 400; letter-spacing: -0.02em; }
.hero__by { color: var(--light); }
.hero__title { grid-column: 1; grid-row: 3; margin: 0; line-height: 0; }
/* the «И» ink starts 86/5745 of the width in: pull the svg left so the title and the line above share one left edge */
.hero__word { display: block; width: 101.5%; margin-left: -1.5%; height: auto; overflow: visible; }
/* owner 29.11 (drawn box, then «больше»): the book area = the whole column, a bit wider than tall, its bottom on the title's bottom line,
   rising above «Искусство» */
.hero__book { grid-column: 2; grid-row: 2 / 4; align-self: end; justify-self: center; position: relative; min-height: 0;
  width: 100%; aspect-ratio: 10 / 9; max-height: 100%; }
.hero__book canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lead { font-size: calc(48 * var(--u)); line-height: calc(50 / 48); font-weight: 500; letter-spacing: calc(-0.2 * var(--u)); margin: 0; }
/* owner 29.11: «убери жирность, сделай обычный geist» (was 600) */
.small { font-size: calc(18 * var(--u)); line-height: calc(23 / 18); font-weight: 400; letter-spacing: calc(-0.2 * var(--u)); margin: 0; }

/* ---------- welcome: @py-[160] @px-[40], @text-[100] lh 1.2 ls -4 ---------- */
/* bottom 40 (was 160): the follicle drawing already runs below the facts line, so 160 + its tail read as a hole */
.welcome { padding: calc(100 * var(--v)) calc(40 * var(--v)) 0; }
.big { max-width: calc(1600 * var(--v)); margin: 0; font-weight: 400; font-size: calc(100 * var(--v)); line-height: 1.2;
  letter-spacing: calc(-4 * var(--v)); text-wrap: pretty; }
.big { color: var(--white); } /* motion.js dims the letters and lights them one by one on scroll; without motion the text stays readable */
/* Welcome type on one modular scale, ratio 1.5 (owner 28.11: «где идеальные пропорции?»):
   20 (caption, facts) -> 30 (paragraph) -> 45 (gaps) -> 101 (phrase, .big = 100). Spacing uses the same steps.
   Caption plain (the pill read as AI slop); the hairline above the facts stays (owner liked it). */
/* owner 29.11: «почему здесь серый… к единому стилю, как в оригинале» — the kicker is a section label like «От автора»: .small, white */
.welcome__kicker { margin: 0 0 calc(30 * var(--v)); color: var(--white); }
/* row: follicle stipple (follicles.js, drawn in a 900x500 box) on the left, paragraph on the right */
.welcome__row { display: flex; align-items: center; justify-content: space-between; margin-top: calc(50 * var(--v)); }
.welcome__art { display: block; flex: none; width: calc(900 * var(--v)); aspect-ratio: 9 / 5; margin-left: calc(-40 * var(--v)); }
.welcome__about { max-width: calc(900 * var(--v)); margin: 0; }
.welcome__text { margin: 0; font-size: calc(30 * var(--u)); line-height: 1.4; font-weight: 400; letter-spacing: -0.01em; color: var(--light); text-wrap: pretty; }
.welcome__meta { margin: calc(45 * var(--u)) 0 0; padding-top: calc(20 * var(--u)); border-top: 1px solid var(--middle);
  font-size: calc(20 * var(--u)); line-height: 1.4; font-weight: 400; color: var(--white); }

/* ---------- chapters: capsules "Choose" frame + aardvark slider ---------- */
/* owner 28.11 (third chat): «очень большой пробел… должна начинаться пораньше» — was 160 + 210 + 70 + 50 = 490u of empty
   space between the facts line and the heading; now 0 + 20 + 50 below the welcome block's own bottom padding */
.parts { position: relative; padding: calc(20 * var(--v)) 0 0; margin-top: 0; isolation: isolate; }
.parts::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, var(--black), var(--middle), var(--black)); }
.parts__head { padding: 0 calc(40 * var(--v)); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.display { margin: calc(10 * var(--v)) 0 0; font-weight: 400; font-size: calc(230 * var(--v)); line-height: 1;
  letter-spacing: calc(-4 * var(--v)); text-wrap: balance; }
.display .w { display: inline-block; overflow: hidden; vertical-align: top; }
.display .w > span { display: inline-block; }
.controls { display: flex; gap: calc(10 * var(--u)); margin-bottom: calc(40 * var(--v)); }
/* owner 28.11 (third chat): arrows grey like the «Заказать» disc — same dark disc (--dark) and lightBrown arrow, no bright
   ring and no light fill on hover (it turned the arrow black); hover only lifts the disc one step and the arrow to white */
.ctrl { position: relative; width: calc(52 * var(--u)); height: calc(52 * var(--u)); min-width: 40px; min-height: 40px;
  border-radius: 9999px; border: 0; background: var(--dark); display: grid; place-items: center; cursor: pointer;
  transition: opacity 250ms ease-out, background-color 300ms ease, transform 150ms cubic-bezier(0.4, 0, 0.2, 1); }
/* fill on the <svg>, not on «svg path»: the path lives inside <use> (shadow tree) and page selectors never reach it, which
   is why the arrow used to render default black; the colour reaches it by inheritance, as in .pill__disc svg */
@media (hover: hover) and (pointer: fine) { .ctrl:hover { background: var(--middle); } .ctrl:hover svg { fill: var(--white); } }
.ctrl:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; }
.ctrl:active { transform: scale(0.9); }
.ctrl.is-disabled { opacity: 0.4; pointer-events: none; }
.ctrl svg { width: 40%; fill: var(--light); transition: fill 300ms ease; }

/* aardvark card + marquee + closing + footer: sections.css */

/* order panel: order.css */

/* ---------- mobile (< 768): capsules' own mobile is a 1920-scaled miniature, so this is a new layout ---------- */
@media (max-width: 767px) {
  .header { padding: 14px; }
  .hero { padding: 6px; }
  .hero__frame { border-radius: 24px; }
  .hero__frame { padding: 18px 16px 16px; }
    .welcome { padding: 48px 16px 24px; }
  .big { font-size: 8.4vw; letter-spacing: -0.03em; }
  .welcome__kicker { margin-bottom: 20px; }
  .welcome__row { flex-direction: column; align-items: stretch; margin-top: 48px; }
  .welcome__about { max-width: none; }
  .welcome__art { order: 2; width: calc(100% + 32px); margin: 24px -16px 0; }
  .welcome__text { font-size: 19px; }
  .welcome__meta { font-size: 14px; }
  .parts { margin-top: 0; padding: 0 0 24px; }
  .parts__head { padding: 0 16px; }
  .display { font-size: 15vw; letter-spacing: -0.03em; }
}

/* portrait screens: the book above, the title under it, the subtitle last */
@media (max-aspect-ratio: 1/1) {
  .hero__frame { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; row-gap: 12px; }
  .hero__book { grid-column: 1; grid-row: 1; margin-top: 52px; width: 100%; aspect-ratio: auto; align-self: stretch; max-height: none; }
  .hero__title { grid-column: 1; grid-row: 2; }
  .hero__sub { grid-column: 1; grid-row: 3; font-size: 20px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .card__inner, .ctrl, .ctrl::before { transition: none !important; }
}

/* intro gate: hero hidden until fonts are ready and the intro takes over (3s fallback in <head>) */
.is-loading .hero__frame { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27876%27 height=%27252%27%3E%3Crect width=%27876%27 height=%27252%27 rx=%27110%27/%3E%3C/svg%3E") 50% 50% / auto 23vh no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27876%27 height=%27252%27%3E%3Crect width=%27876%27 height=%27252%27 rx=%27110%27/%3E%3C/svg%3E") 50% 50% / auto 23vh no-repeat; }
.is-loading .hero__title, .is-loading .hero__sub { opacity: 0; }
.is-loading #orderBtn { transform: scale(0); }
.is-loading .header__soc { transform: scale(0); }

/* 04.12: no scrolling while the preloader plays — the rest of the page waits for the banner to open */
html.is-intro, html.is-intro body { overflow: hidden; overscroll-behavior: none; }
html.is-intro body { touch-action: none; }

/* ---------- preloader (capsules Preloader, measured 30.11): shown only while motion.js runs it ---------- */
.hero { position: relative; }
.loader { display: none; position: absolute; inset: 0; z-index: 5; background: var(--black); }
.is-loading .loader, .loader.is-on { display: block; }
.loader.is-open { background: transparent; }
.loader__capsule { position: absolute; inset: 0; display: grid; place-items: center; background: var(--dark); opacity: 0; isolation: isolate; }
.loader__bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--white); }
.loader__word { position: relative; z-index: 1; margin: 0; max-width: 80%; text-align: center; color: var(--white); mix-blend-mode: exclusion;
  font-size: calc(28 * var(--u)); line-height: 1.15; font-weight: 500; letter-spacing: -0.01em; text-transform: uppercase; }
/* owner 30.11: «где trademark?» — ® as on the hero title and capsules' «Capsules®»: small, at the baseline, a hair after the word */
.loader__ch--r { font-size: 1.1em; margin-left: 0.06em; vertical-align: 0; } /* owner 30.11: 0.42em «почти не видно»; Geist draws ® small inside its em */
.loader__cap { display: none; position: absolute; left: 0; right: 0; bottom: calc(60 * var(--u)); z-index: 6; margin: 0; text-align: center;
  color: var(--light); font-size: calc(18 * var(--u)); line-height: calc(23 * var(--u)); font-weight: 600; letter-spacing: -0.01em; }
.is-loading .loader__cap, .loader__cap.is-on { display: block; }
.loader__cap > span { display: block; overflow: hidden; }
@media (max-width: 767px) { .loader__word { font-size: 22px; max-width: 70%; } .loader__cap { font-size: 15px; line-height: 20px; bottom: 40px; } }
