/* loader.css — экран загрузки «Томское окно» */
.ld { --p: 0; display: grid; place-items: center; overflow: hidden; background: #FFFFFF; z-index: 60; }
.ld::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 70% at 30% 46%, rgba(117,193,237,.22), rgba(117,193,237,0) 70%), linear-gradient(180deg, #FFFFFF, #F4F8F6); opacity: calc(.35 + var(--p) * .65); }
.ld::after { content: ""; position: absolute; inset: 0; background: var(--pat-silver) 0 0/var(--pat-size) repeat; opacity: .34; -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); mask-image: linear-gradient(90deg, transparent 40%, #000); }
.ld__dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.ld__in.ui-start__hero { position: relative; max-height: none; overflow: visible; display: grid; grid-template-columns: auto minmax(340px, 460px); align-items: center; gap: clamp(40px, 6vw, 120px); padding: 32px; z-index: 1; }
.ld__win { height: min(82dvh, 860px); aspect-ratio: 460 / 744; transform-origin: 50% 58%; transition: transform 1.3s cubic-bezier(.5, 0, .1, 1), opacity 1.1s ease; }
.ld__win svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ld-l { fill: none; stroke: #006246; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - 100 * clamp(0, (var(--p) - var(--f)) * var(--s), 1)); opacity: clamp(0, (var(--p) - var(--f)) * 40, 1); }
.ld-dawn { opacity: calc(.1 + var(--p) * .9); }
.ld-w { fill: #DCE7E2; transition: fill .9s ease; }
.ld-w.is-lit { fill: #007A57; }
.ld__side { color: #14241E; position: relative; }
.ld__logo { width: 236px; height: 52px; background: url(../assets/logo/mikh-logo-horizontal.svg) left center/contain no-repeat; margin-bottom: 44px; }
.ld__kick { font: 600 13px/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: #006246; }
.ld__title { margin: 16px 0 0; font: 500 clamp(56px, 6.2vw, 104px)/.98 var(--font-display); letter-spacing: .01em; text-transform: uppercase; color: #006246; }
.ld__load { margin-top: 48px; }
.ld__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.ld__stage { font: 500 18px/1.2 var(--font); color: #14241E; min-height: 22px; }
.ld__stage.is-in { animation: ld-in .6s ease both; }
@keyframes ld-in { from { opacity: 0; transform: translateY(8px); } }
.ld__num { font: 400 44px/1 var(--font-display); font-variant-numeric: tabular-nums; color: #006246; }
.ld__num b { font-weight: 400; } .ld__num small { font-size: 22px; color: #4F7F6E; margin-left: 4px; }
.ld__rail { margin-top: 14px; height: 2px; background: rgba(0,98,70,.14); overflow: hidden; }
.ld__rail i { display: block; height: 100%; background: linear-gradient(90deg, #00805B, #006246); transform: scaleX(0); transform-origin: 0 50%; }
.ld__txt { margin-top: 12px; min-height: 18px; font: 500 14px/18px var(--font); color: #4F6A60; font-variant-numeric: tabular-nums; }
.ld__acts { margin-top: 28px; min-height: 60px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ld__go { width: 100%; transition: opacity .4s ease, transform .4s ease; }
.ld:not(.is-ready) .ld__go { opacity: 0; transform: translateY(8px); pointer-events: none; position: absolute; }
.ld__facts { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(0,98,70,.16); display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 16px; }
.ld__facts b { display: block; font: 400 28px/1 var(--font-display); color: #006246; } .ld__facts span { display: block; margin-top: 8px; font: 500 13px/1 var(--font); color: #4F6A60; }
/* вход: пролетаем в окно */
body.is-started .ui-start.ld { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .9s ease .35s, visibility 0s linear 1.3s; }
body.is-started .ld__win { transform: scale(4.2); opacity: 0; }
body.is-started .ld__side { opacity: 0; transition: opacity .35s ease; }
@media (max-width: 1100px) { .ld__in.ui-start__hero { gap: 40px; } .ld__logo { margin-bottom: 28px; } .ld__load { margin-top: 32px; } .ld__facts { margin-top: 28px; } }
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .ld__in.ui-start__hero { left: auto; right: auto; top: auto; grid-template-columns: minmax(0, 420px); justify-items: center; gap: 18px; padding: 20px; width: 100%; justify-content: center; }
  .ld__win { height: min(46dvh, 420px); } .ld__side { width: 100%; text-align: center; }
  .ld__logo { width: 168px; height: 38px; margin: 0 auto 14px; background-position: center; } .ld__title { font-size: 44px; } .ld__title br { display: none; }
  .ld__load { margin-top: 20px; } .ld__num { font-size: 32px; } .ld__acts { margin-top: 16px; align-items: center; } .ld__facts { display: none; } .ld__kick { font-size: 11px; }
}
@media (max-height: 760px) and (min-width: 861px) { .ld__facts { display: none; } .ld__load { margin-top: 28px; } .ld__logo { margin-bottom: 24px; } .ld__title { font-size: 64px; } }
@media (prefers-reduced-motion: reduce) { .ld__win, .ld__side, .ui-start.ld { transition: opacity .3s ease !important; } body.is-started .ld__win { transform: none; } .ld__stage.is-in { animation: none; } }

/* телефон горизонтально: окно слева, текст и кнопка справа, всё в высоту экрана */
@media (orientation: landscape) and (max-height: 520px) {
  .ld__in.ui-start__hero { grid-template-columns: auto minmax(0, 340px); gap: 44px; padding: 10px 24px; justify-content: center; align-items: center; }
  .ld__win { height: min(86dvh, 400px) !important; } .ld__side { text-align: left; width: 100%; }
  .ld__logo { width: 140px; height: 32px; margin: 0 0 10px; background-position: left center; } .ld__kick { font-size: 10px; }
  .ld__title { font-size: 38px !important; line-height: 1.04; } .ld__title br { display: none; }
  .ld__load { margin-top: 14px !important; } .ld__num { font-size: 26px; } .ld__stage { font-size: 15px; } .ld__acts { margin-top: 12px; align-items: stretch; } .ld__facts { display: none !important; }
}
