/* Home hero, variant A (white background, video in a card), 25.10.2026. Linked by the templates «Главная»
   and «Главная — предпросмотр героя». Approved mockups: /root/tomoko/glavnaya-hero-maket-2026-10-25/
   variant-a-video.png (desktop) and video-mesto/doska-*.png, variant Г (tablet and phone). */

.hx { background: var(--c-paper); padding: 56px 0 72px; }
/* The markup follows the phone order: head, buttons, video, ratings. On the desktop the video takes the right
   column and the left column is centred against it: the empty 1fr rows absorb the spare height. */
.hx__grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); grid-template-rows: 1fr auto auto auto 1fr;
  grid-template-areas: ". side" "head side" "cta side" "proof side" ". side"; column-gap: 64px;
}
.hx__head { grid-area: head; display: flex; flex-direction: column; align-items: flex-start; }

.hx__eyebrow {
  display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 20px;
  font-size: 13px; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; font-weight: 600;
  color: var(--c-accent-text);
}
.hx__eyebrow-part + .hx__eyebrow-part::before { content: "·"; margin-right: 10px; color: var(--c-ash); }

.hx__title {
  margin: 0 0 24px;
  font-size: 60px; line-height: 1.02; letter-spacing: -.04em; font-weight: 400;
  color: var(--c-ink-green); text-wrap: balance;
}
.hx__lead { display: flex; flex-direction: column; gap: 8px; max-width: 34em; }
.hx__lead p { margin: 0; font-size: 19px; line-height: 1.45; letter-spacing: -.02em; color: var(--c-fog); }
.hx__cta { grid-area: cta; justify-self: start; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.hx__proof { grid-area: proof; justify-self: start; display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }

.hx__side { grid-area: side; align-self: center; position: relative; }
.hx__video {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--r-card); aspect-ratio: 1040 / 840; background: var(--c-mist);
}
.hx__video video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 35% 50%; }
.hx__pause {
  position: absolute; right: 16px; top: 16px;
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: rgb(11 26 16 / .55); color: var(--c-paper); cursor: pointer;
}
.hx__pause svg { width: 16px; height: 16px; grid-area: 1 / 1; }
.hx__pause .hx__icon-play { display: none; }
.hx__pause.is-paused .hx__icon-play { display: block; }
.hx__pause.is-paused .hx__icon-pause { display: none; }
.hx__pause:focus-visible { outline: 2px solid var(--c-paper); outline-offset: 2px; }

.hx__mntk {
  position: absolute; left: -40px; right: 40px; bottom: -36px;
  display: flex; align-items: center; gap: 16px; padding: 18px 22px;
  border: 1.5px solid var(--c-hairline); border-radius: var(--r-card); background: var(--c-paper);
}
.hx__mntk img { flex: none; width: 56px; height: auto; }
.hx__mntk p { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.hx__mntk b { font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; color: var(--c-ink-green); }
.hx__mntk span { font-size: 13px; line-height: 1.45; color: var(--c-fog); }

/* Desktop. The bottom padding plus «Новые возможности» without its top padding give the same 120 px gap as between
   the other home sections (25.10.2026; the hero no longer stretches to the window height). The symmetric margins
   keep the video centred and let the grid contain the MNTK note hanging 36 px below the video. */
@media (min-width: 1101px) {
  .hx { padding: 72px 0 120px; }
  .hx__side { margin-block: 36px; }
}

/* Tablet and phone: one column in the markup order, the MNTK note moves to the end (variant Г). */
@media (max-width: 1100px) {
  .hx { padding: 32px 0 120px; }
  .hx__grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: none; }
  .hx__head, .hx__cta, .hx__proof { grid-area: auto; }
  .hx__side { display: contents; }
  .hx__title { font-size: 48px; }
  .hx__video { aspect-ratio: 16 / 9; margin-top: 32px; }
  .hx__mntk { position: static; order: 1; margin-top: 32px; }
}

@media (max-width: 680px) {
  .hx { padding: 20px 0 50px; }
  .hx__eyebrow { flex-direction: column; gap: 2px; margin-bottom: 14px; font-size: 12px; }
  .hx__eyebrow-part + .hx__eyebrow-part::before { content: none; }
  .hx__title { margin-bottom: 16px; font-size: 32px; line-height: 1.06; }
  .hx__lead p { font-size: 16px; }
  .hx__cta { flex-direction: column; align-items: stretch; width: 100%; margin-top: 24px; }
  .hx__cta .tk-btn { width: 100%; justify-content: center; text-align: center; }
  .hx__proof { width: 100%; margin-top: 24px; gap: 10px; }
  .hx__mntk { align-items: flex-start; padding: 14px 16px; margin-top: 24px; }
  .hx__mntk img { width: 44px; margin-top: 2px; }
  .hx__mntk b { font-size: 14px; }
  .hx__video { aspect-ratio: 3 / 2; border-radius: var(--r-image); margin-top: 24px; }
}

/* «Офтальмологический» is about 10.8 em wide: on the narrowest phones the size follows the screen width so the word
   fits between the 20 px gutters (at 320 px it overflowed by 22 px). */
@media (max-width: 360px) { .hx__title { font-size: min(30px, calc((100vw - 40px) / 10.9)); } }


/* Section «Новые возможности» right under the hero: the block heading size of the home page (as .t-heading-lg),
   not a second page title (25.10.2026). Overrides the generated sections.css and mobile.css. */
.tk-newops__title {
  font-size: var(--t-heading-lg-size); line-height: var(--t-heading-lg-lh); letter-spacing: var(--t-heading-lg-ls);
}
/* The other sections start without a top padding on desktop and tablet (on the phone all of them have 50 px). */
@media (min-width: 681px) { .tk-home .tk-newops { padding-top: 0; } }
/* Tablet: the figures over the photo stay inside it; the long MNTK caption wraps instead of running past the edge
   (25.10.2026). */
@media (min-width: 681px) and (max-width: 1100px) {
  .tk-newops__stats { right: var(--s-card); white-space: normal; }
  .tk-newops__stats li { flex: 0 1 auto; min-width: 0; }
}
/* Narrow phones (under 375 px): three figures do not fit one row with «СПЕЦИАЛИСТЫ», the last one moves to a second row. */
@media (max-width: 374px) {
  .tk-newops__stats { flex-wrap: wrap; row-gap: var(--s-4); }
}
/* «Опыт прошлого — технологии будущего»: one button «Записаться на диагностику» (25.10.2026); the description takes
   the freed width, 3 lines instead of 4 on desktop and tablet. */
.tk-newops__lead { flex: 1 1 auto; width: auto; max-width: none; }
.tk-newops__cta { flex: none; }
@media (max-width: 680px) { .tk-newops__cta .tk-btn { width: 100%; padding-inline: 12px; } }
