/* games.justvet.ru - стартовая страница трёх игр. Те же ограничения, что у игр (встроенные браузеры ТВ):
   без grid, gap, clamp(), min()/max(), inset. Каждая афиша - уменьшенная заставка своей игры. */
@font-face { font-family: Manrope; font-weight: 500; font-display: swap; src: url(/shared/fonts/manrope-cyrillic-500.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(/shared/fonts/manrope-cyrillic-700.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(/shared/fonts/manrope-cyrillic-800.woff2) format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Manrope; font-weight: 500; font-display: swap; src: url(/shared/fonts/manrope-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: Manrope; font-weight: 700; font-display: swap; src: url(/shared/fonts/manrope-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }
@font-face { font-family: Manrope; font-weight: 800; font-display: swap; src: url(/shared/fonts/manrope-latin-800.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

:root {
  --mp: #8965FD;          /* МетаПетс */
  --mp-deep: #5B3BD6;
  --nvt: #875EF8;         /* НьюВетТех, брендбук */
  --night: #2B168A;       /* ночь «Победи рутину» */
  --gold: #FFD23F;
  --ink: #18222C;
  --ink-2: #3A4350;
  --page: #EEEAFC;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  font-family: Manrope, "Segoe UI", Arial, sans-serif; font-weight: 500; line-height: 1.4;
  color: var(--ink); background: var(--page);
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
img { display: block; max-width: 100%; }

/* два мягких пятна за страницей, как «аврора» на заставках игр */
body:before, body:after { content: ""; position: fixed; width: 70vmax; height: 70vmax; border-radius: 50%; pointer-events: none; z-index: 0; }
body:before { left: -28vmax; top: -34vmax; background: radial-gradient(circle, rgba(137, 101, 253, .30) 0%, rgba(137, 101, 253, 0) 65%); }
body:after { right: -32vmax; bottom: -38vmax; background: radial-gradient(circle, rgba(94, 224, 176, .20) 0%, rgba(94, 224, 176, 0) 62%); }

.page { position: relative; z-index: 1; min-height: 100vh; padding: 1.1rem 1rem 1.4rem;
  display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }

/* ---------- шапка ---------- */
.top { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; }
.brands { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
.logo-mp { height: 1.6rem; width: auto; }
.logo-nvt { height: 1.35rem; width: auto; }
.x { margin: 0 .55rem; font-weight: 700; color: #8A84A8; font-size: 1rem; }
.event { text-align: right; line-height: 1.15; }
.event b { display: block; font-weight: 800; font-size: .95rem; }
.event span { font-size: .8rem; color: var(--ink-2); }

.intro { margin: 1.6rem 0 1.3rem; }
.intro h1 { margin: 0; font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.intro p { margin: .7rem 0 0; font-size: 1.02rem; line-height: 1.45; color: var(--ink-2); max-width: 32rem; }

/* ---------- афиши ---------- */
.posters { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.poster {
  position: relative; overflow: hidden; display: -webkit-box; display: -webkit-flex; display: flex;
  -webkit-flex-direction: column; flex-direction: column;
  margin-bottom: 1rem; padding: 1.1rem 1.2rem 1.3rem; border-radius: 1.6rem;
  color: var(--ink); text-decoration: none; background: #fff;
  box-shadow: 0 1.1rem 2.6rem rgba(59, 31, 166, .12), 0 .15rem .4rem rgba(59, 31, 166, .06);
  -webkit-transition: -webkit-transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s;
  -webkit-animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; animation: rise .8s cubic-bezier(.2, .8, .2, 1) both;
}
.p2 { -webkit-animation-delay: .1s; animation-delay: .1s; }
.p3 { -webkit-animation-delay: .2s; animation-delay: .2s; }
@-webkit-keyframes rise { from { opacity: 0; -webkit-transform: translate3d(0, 2.2rem, 0); } to { opacity: 1; -webkit-transform: none; } }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 2.2rem, 0); } to { opacity: 1; transform: none; } }
.poster:hover { -webkit-transform: translate3d(0, -.4rem, 0); transform: translate3d(0, -.4rem, 0); box-shadow: 0 1.6rem 3.4rem rgba(59, 31, 166, .2), 0 .2rem .5rem rgba(59, 31, 166, .08); }
.poster:active { -webkit-transform: scale(.985); transform: scale(.985); }
.poster:focus { outline: .2rem solid var(--ink); outline-offset: .3rem; }
.poster:focus:not(:focus-visible) { outline: none; }

.p-head { position: relative; z-index: 2; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; }
.p-logo { height: 1.35rem; width: auto; }
.p-logo-nvt { height: 1.15rem; }
.p-logo-pill { display: inline-block; background: #fff; border-radius: 99rem; padding: .3rem .7rem; }
.p-logo-pill img { height: 1.1rem; width: auto; }
.p-time { font-size: .8rem; font-weight: 700; padding: .25rem .7rem; border-radius: 99rem; border: .1rem solid rgba(24, 34, 44, .18); white-space: nowrap; }

/* маскот: фон картинки растворяется в фоне афиши (та же маска, что у .art в играх). Маска на самой картинке,
   а картинка вписана в рамку с сохранением пропорций (max-width/max-height), иначе в широкой рамке видны края JPG */
.p-art { position: relative; height: 12rem; margin: .2rem -.6rem 0;
  display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center;
  -webkit-box-align: center; -webkit-align-items: center; align-items: center; }
.p-art img { width: auto; height: auto; max-width: 100%; max-height: 100%; -webkit-flex: none; flex: none;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, rgba(0, 0, 0, 0) 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 58%, rgba(0, 0, 0, 0) 100%);
  -webkit-transition: -webkit-transform .5s cubic-bezier(.2, .8, .2, 1); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.poster:hover .p-art img { -webkit-transform: scale(1.05) translate3d(0, -.3rem, 0); transform: scale(1.05) translate3d(0, -.3rem, 0); }

.p-body { position: relative; z-index: 2; }
.p-title { font-weight: 800; letter-spacing: -.02em; line-height: 1.02; }
.p-desc { margin: .7rem 0 1.1rem; font-size: 1rem; line-height: 1.45; max-width: 26rem; }
.p-cta { display: inline-block; font-weight: 800; font-size: 1.05rem; line-height: 1.2; padding: .85rem 1.5rem; border-radius: 99rem;
  background: var(--mp); color: #fff; box-shadow: 0 .4rem 1rem rgba(91, 59, 214, .3);
  -webkit-transition: background .2s, box-shadow .2s; transition: background .2s, box-shadow .2s; }
.p-cta:after { content: ""; display: inline-block; vertical-align: -.08em; margin-left: .6rem;
  border-left: .7em solid currentColor; border-top: .45em solid transparent; border-bottom: .45em solid transparent; }
.poster:hover .p-cta { background: var(--mp-deep); }

/* 1. Ветеринария 2030 - светлая, крупные цифры года с бликом */
.p1 { background: #fff; background-image: radial-gradient(ellipse at 62% 26%, #F0EAFF 0%, rgba(255, 255, 255, 0) 62%); }
.t2030 .w { display: block; font-size: 1.45rem; }
.t2030 .y { display: block; font-size: 4.6rem; line-height: .88; letter-spacing: -.045em; margin-top: .1rem; color: var(--mp);
  background: linear-gradient(100deg, var(--mp) 0%, var(--mp) 38%, #D8CCFF 50%, var(--mp-deep) 62%, var(--mp-deep) 100%);
  background-size: 260% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.poster.p1:hover .t2030 .y { -webkit-animation: shine 1.1s ease-out both; animation: shine 1.1s ease-out both; }
@-webkit-keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes shine { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* 2. Победи рутину - ночная, заголовок сложен из двух блоков башни; при наведении верхний встаёт точно */
.p2 { color: #fff; background: var(--night); background-image: radial-gradient(ellipse at 50% 28%, #6A47EE 0%, #3A1FB0 48%, #1E0F66 100%);
  box-shadow: 0 1.2rem 2.8rem rgba(30, 15, 102, .38), 0 .15rem .4rem rgba(30, 15, 102, .2); }
.p2:hover { box-shadow: 0 1.7rem 3.6rem rgba(30, 15, 102, .5), 0 .2rem .5rem rgba(30, 15, 102, .25); }
.p2 .p-time { border-color: rgba(255, 255, 255, .35); }
.p2 .p-art img { -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 52%, rgba(0, 0, 0, 0) 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 52%, rgba(0, 0, 0, 0) 100%); }
.p2 .p-desc { color: rgba(255, 255, 255, .88); }
.p2 .p-cta { background: #fff; color: var(--night); box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .25); }
.p2:hover .p-cta { background: var(--gold); }
.tower { font-size: 2rem; }
.tower .blk { display: block; width: 9.4rem; padding: .12rem .55rem .2rem; border-radius: .4rem; }
.tower .b-top { margin-bottom: .2rem; background: rgba(255, 255, 255, .14); border: .1rem solid rgba(255, 255, 255, .42);
  -webkit-transform: translate3d(1.3rem, 0, 0) rotate(1.5deg); transform: translate3d(1.3rem, 0, 0) rotate(1.5deg);
  -webkit-transition: -webkit-transform .45s cubic-bezier(.3, 1.6, .5, 1); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.tower .b-base { background: var(--gold); color: var(--night); border: .1rem solid var(--gold);
  -webkit-transition: box-shadow .3s; transition: box-shadow .3s; }
.p2:hover .tower .b-top, .p2:active .tower .b-top, .p2:focus .tower .b-top { -webkit-transform: none; transform: none; }
.p2:hover .tower .b-base { box-shadow: 0 0 0 .2rem rgba(255, 210, 63, .35), 0 .4rem 1.4rem rgba(255, 210, 63, .45); }

/* 3. Собери консилиум - светлая, под заголовком бежит ЭКГ монитора пациента */
.p3 { background: #fff; background-image: radial-gradient(ellipse at 50% 24%, #F2EFFA 0%, rgba(255, 255, 255, 0) 64%); }
.p3 .p-cta { background: var(--nvt); }
.p3:hover .p-cta { background: #6A43E0; }
.tcons { font-size: 2rem; max-width: 11em; }
.ecg { display: block; width: 100%; height: 2.4rem; margin-top: .45rem; overflow: visible; }
.ecg path { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ecg-base { stroke: rgba(135, 94, 248, .22); stroke-width: 2; }
.ecg-run { stroke: var(--nvt); stroke-width: 2.6; stroke-dasharray: 150 850; stroke-dashoffset: 1000;
  -webkit-animation: ecg 3.2s linear infinite; animation: ecg 3.2s linear infinite; }
.p3:hover .ecg-run { -webkit-animation-duration: 1.9s; animation-duration: 1.9s; }
@-webkit-keyframes ecg { to { stroke-dashoffset: 0; } }
@keyframes ecg { to { stroke-dashoffset: 0; } }

.foot { position: relative; z-index: 1; margin-top: .4rem; font-size: .82rem; color: var(--ink-2); text-align: center; }

/* ---------- планшет: афиши в столбик, маскот справа ---------- */
@media (min-width: 600px) {
  html { font-size: 17px; }
  .page { padding: 1.4rem 1.6rem 1.6rem; }
  .intro h1 { font-size: 3rem; }
  .poster { min-height: 17.5rem; padding: 1.3rem 1.5rem 1.4rem; }
  .p-head, .p-body { margin-right: 44%; }
  .p-body { margin-top: auto; }
  .p-art { position: absolute; right: 0; top: 0; bottom: 0; width: 46%; height: auto; margin: 0; }
}

/* ---------- планшет лёжа, ноутбук, монитор, ТВ: три афиши в ряд на весь экран ---------- */
@media (min-width: 800px) and (min-height: 480px) and (orientation: landscape) {
  html { font-size: 17px; }
  .page { height: 100vh; min-height: 38rem; padding: 1.5rem 2.2rem 1.4rem; }
  .intro { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: flex-end; align-items: flex-end; -webkit-justify-content: space-between; justify-content: space-between; margin: 1.6rem 0 1.5rem; }
  .intro h1 { font-size: 3.3rem; }
  .intro p { margin: 0 0 .2rem 2rem; max-width: 27rem; text-align: right; }
  .posters { -webkit-flex-direction: row; flex-direction: row; -webkit-box-flex: 1; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-height: 0; }
  .poster { -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; min-height: 0; margin: 0 .7rem; padding: 1.3rem 1.5rem 1.5rem; }
  .poster:first-child { margin-left: 0; }
  .poster:last-child { margin-right: 0; }
  .p-head, .p-body { margin-right: 0; }
  .p-art { position: relative; right: auto; top: auto; bottom: auto; width: auto; height: auto; -webkit-box-flex: 1; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-height: 8rem; margin: .4rem -.8rem .6rem; }
  .p-body { margin-top: 0; }
  .t2030 .y { font-size: 4.9rem; }
  .foot { margin-top: 1rem; }
}
@media (min-width: 1360px) and (orientation: landscape) { html { font-size: 18px; } }
@media (min-width: 1600px) and (orientation: landscape) { html { font-size: 20px; } }
@media (min-width: 1900px) and (orientation: landscape) { html { font-size: 23px; } }
/* невысокие экраны ноутбуков: меньше шрифт, чтобы три афиши и шапка поместились без прокрутки */
@media (min-width: 1000px) and (max-height: 800px) and (orientation: landscape) { html { font-size: 15px; } }
@media (min-width: 1600px) and (max-height: 960px) and (orientation: landscape) { html { font-size: 18px; } }

/* ---------- вертикальный ТВ и большой планшет стоя: афиши столбиком на всю высоту ---------- */
@media (min-width: 1000px) and (orientation: portrait) {
  html { font-size: 22px; }
  .page { height: 100vh; min-height: 46rem; padding: 1.6rem 1.8rem 1.4rem; }
  .intro h1 { font-size: 3.4rem; }
  .posters { -webkit-box-flex: 1; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-height: 0; }
  .poster { -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center; }
  .p-body { margin-top: 1rem; }
  .t2030 .y { font-size: 5.2rem; }
  .tower, .tcons { font-size: 2.3rem; }
}
@media (min-width: 1400px) and (orientation: portrait) { html { font-size: 28px; } }

/* ---------- планшет, ноутбук, ТВ: всё на одном экране без прокрутки ----------
   Скрипт fit в index.html ставит странице высоту окна и подбирает самый крупный шрифт, при котором шапка,
   три афиши и подпись помещаются целиком. Без скрипта остаются ступени шрифта выше (с прокруткой). */
html.fit body { min-height: 0; }  /* 100vh на iPad выше видимого окна (панель Safari) - высоту задаёт скрипт */
html.fit .page { min-height: 0; }
html.fit .intro { margin: 1.1rem 0 1rem; }
html.fit .posters { -webkit-box-flex: 1; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-height: 0; }
html.fit .poster { -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; margin-bottom: .8rem;
  -webkit-box-pack: center; -webkit-justify-content: center; justify-content: center; }
html.fit .poster:last-child { margin-bottom: 0; }
html.fit .p-body { margin-top: .9rem; }
html.fit .foot { margin-top: .7rem; }
@media (min-width: 800px) and (min-height: 480px) and (orientation: landscape) {
  html.fit .poster { margin-bottom: 0; -webkit-box-pack: start; -webkit-justify-content: flex-start; justify-content: flex-start; }
  html.fit .p-body { margin-top: 0; }
  html.fit .intro { margin: 1.2rem 0 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .poster, .poster.p1:hover .t2030 .y, .ecg-run { -webkit-animation: none; animation: none; }
  .ecg-run { stroke-dasharray: none; }
  .poster, .p-art img, .tower .b-top { -webkit-transition: none; transition: none; }
  .poster:hover, .poster:hover .p-art img { -webkit-transform: none; transform: none; }
}
