/* SENTINEL — лендинг, сцены 1–2 (прототип) */
:root {
  --night: #07090C; --tele: #9FB4C7; --fire: #FF6A1A; --dim: rgba(159, 180, 199, .55);
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --padx: clamp(24px, 6vw, 96px);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Helvetica Neue", Arial, sans-serif;
  --head: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); color: var(--tele); }
html { scroll-behavior: auto; }
body { font: 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.lock { overflow: hidden; height: 100vh; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* ---------- скролл-полотно ---------- */
#spacer { height: calc((var(--sp, 10) + 2) * 100vh); }
html.lite #spacer { height: 0; }

/* ---------- сцена 1: загрузка системы ---------- */
#s1 { position: fixed; inset: 0; z-index: 30; background: #000; overflow: hidden; transition: opacity .9s ease; }
#s1.out { opacity: 0; pointer-events: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#tele { position: absolute; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); max-width: calc(100vw - 2 * var(--padx) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)); overflow: hidden; bottom: 16vh; margin: 0; font: 12px/1.9 var(--mono); letter-spacing: .06em; color: var(--tele); white-space: pre; text-transform: uppercase; opacity: .9; }
#tele .a { color: var(--fire); }
#tele .cur { display: inline-block; width: .55em; height: 1.1em; vertical-align: -2px; background: var(--tele); animation: blink 1s steps(2) infinite; margin-left: 2px; }
#tele .cur.a { background: var(--fire); }
@keyframes blink { to { opacity: 0; } }
/* логотип рисуется выступом из точек сетки (canvas); h1 оставлен для доступности */
#logo { position: absolute; left: 0; right: 0; top: 56%; text-align: center; pointer-events: none; }
#logo h1 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#logo p { margin: 0; font: 400 clamp(14px, 1.3vw, 19px)/1.4 var(--sans); letter-spacing: -.005em; color: var(--tele); opacity: 0; transition: opacity 1.4s ease .5s; }
#logo.on p { opacity: .85; }
#hold { position: absolute; left: 50%; bottom: max(7vh, calc(env(safe-area-inset-bottom, 0px) + 28px)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: 0; transition: opacity 1.2s ease; user-select: none; -webkit-user-select: none; touch-action: none; }
#hold.on { opacity: 1; }
#hold .ring { width: 54px; height: 54px; position: relative; }
#hold svg { width: 54px; height: 54px; transform: rotate(-90deg); }
#hold circle { fill: none; stroke-width: 1.2; }
#hold .bg { stroke: rgba(159, 180, 199, .25); }
#hold .fg { stroke: #E6EDF3; stroke-dasharray: 157; stroke-dashoffset: 157; }
#hold .dot { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--tele); transition: transform .3s; }
#hold.press .dot { transform: scale(1.6); background: #fff; }
#hold span { font: 500 11px/1 var(--sans); letter-spacing: .14em; padding-left: .14em; text-transform: uppercase; color: var(--dim); }
#skip { position: absolute; right: calc(var(--padx) + env(safe-area-inset-right, 0px) - .28em); top: max(4vh, calc(env(safe-area-inset-top, 0px) + 16px)); font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding: 8px 0; }
#skip:hover { color: #E6EDF3; }
#sound { position: fixed; right: calc(var(--padx) + env(safe-area-inset-right, 0px) - .28em); bottom: max(4vh, calc(env(safe-area-inset-bottom, 0px) + 12px)); z-index: 40; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); display: flex; gap: 10px; align-items: center; }
#sound i { display: inline-block; width: 14px; height: 1px; background: currentColor; }
#black { position: fixed; inset: 0; z-index: 35; background: #000; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
#black.on { opacity: 1; }

/* ---------- сцена 2: взлёт ---------- */
#stage { position: fixed; inset: 0; z-index: 10; background: #cfd9e0; }
#c3 { display: block; width: 100vw; height: 100vh; }
#titles { position: absolute; inset: 0; pointer-events: none; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* гигантские заголовки — в 3D; DOM-копии скрыты визуально (доступность), в lite показываются */
.cap { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* гигантские заголовки (DOM поверх 3D): #f5f5f7, clamp(56px, 9vw, 160px), трекинг Apple; site.js гасит при пересечении с дроном/телефоном */
#tt { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.tw { position: absolute; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); width: min(56vw, 1180px); opacity: 0; top: 50%; margin-top: -0.9em; font-size: clamp(56px, 9vw, 160px); will-change: opacity; }
.tw::before { content: ""; position: absolute; inset: -30% -24% -34% -16%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, var(--scrim, rgba(5, 8, 13, .34)), rgba(5, 8, 13, 0)); }
.tw { transition: left .75s cubic-bezier(.2, .7, .2, 1), top .75s cubic-bezier(.2, .7, .2, 1); }  /* переезд в свободную зону (site.js: placeTitles) */
.tt { transition: color .5s ease; margin: 0; overflow: hidden; padding: .06em .05em .14em 0; font: 600 1em/1.02 var(--head); letter-spacing: -.03em; color: var(--tc, #f5f5f7); text-wrap: balance; }
.tt span { display: block; will-change: transform; }
.tw.dk { --tc: #1d1d1f; --scrim: rgba(235, 240, 245, .30); }
#tw-A { top: 43vh; margin-top: 0; width: min(54vw, 1100px); font-size: clamp(56px, 8vw, 150px); }
#tw-B, #tw-C { top: 13vh; margin-top: 0; }
#tw-E { top: 9vh; margin-top: 0; width: min(58vw, 1200px); font-size: clamp(56px, 8vw, 150px); }
@media (max-aspect-ratio: 1/1) {
  .tw, #tw-A, #tw-B, #tw-C, #tw-E { left: calc(24px + env(safe-area-inset-left, 0px)); right: calc(24px + env(safe-area-inset-right, 0px)); width: auto; top: calc(env(safe-area-inset-top, 0px) + 6.5vh); margin-top: 0; font-size: clamp(40px, 12.4vw, 66px); }
}
html.lite #tt { display: none; }
/* телеметрия: мелкая, по краям, вне зоны дрона */
#hud2 { position: absolute; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); bottom: max(15vh, 64px); display: flex; gap: 16px; font: 400 10px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(232, 240, 247, .9); opacity: 0; transition: opacity .8s, color .8s; mix-blend-mode: normal;
  /* stage 9: подложка под HUD — читается и на светлом фасаде, и на белой крыше, и на небе */ padding: 6px 12px; margin-left: -12px; border-radius: 7px; background: linear-gradient(90deg, rgba(8, 11, 15, .66), rgba(8, 11, 15, .5));   /* без backdrop-filter: размытие подложки поверх WebGL-канваса стоило ~4 мс/кадр */ box-shadow: 0 0 0 1px rgba(255, 255, 255, .05) inset; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
#hud2.on { opacity: 1; }
#hud2 > *, #thhud span, #lock-lbl, #lock-sub, #call, #per { white-space: nowrap; }
#hud2 b { font-weight: 500; color: inherit; }
body.night #hud2 { color: rgba(200, 214, 228, .78); background: linear-gradient(90deg, rgba(6, 8, 12, .5), rgba(6, 8, 12, .3)); }
#loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 11px/1 var(--mono); letter-spacing: .3em; color: var(--dim); text-transform: uppercase; transition: opacity .6s; }
#loading.off { opacity: 0; }
/* тепловизор: рамка, шкала, захват цели */
#thhud { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; font: 400 10px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #ffe9c4; }
#thhud.on { opacity: 1; }
#thhud .tl, #thhud .tr, #thhud .bl { position: absolute; }
#thhud .tl { left: calc(var(--padx) + env(safe-area-inset-left, 0px)); top: max(13vh, 60px); }
#thhud .tr { right: calc(var(--padx) + env(safe-area-inset-right, 0px)); top: max(13vh, 60px); }
#thhud .bl { right: calc(var(--padx) + env(safe-area-inset-right, 0px) + 22px); bottom: calc(max(15vh, 64px) + 7vh - 6px); text-align: right; color: #fff; font-size: 11px; line-height: 12px; letter-spacing: .08em; text-shadow: 0 0 6px rgba(0,0,0,.6); }
#thhud .bl::after { content: ""; position: absolute; right: -18px; top: 50%; width: 14px; height: 1px; background: #fff; }
#thhud .scale .mk { position: absolute; left: -3px; right: -3px; height: 2px; bottom: calc(var(--f, .5) * 100% - 1px); background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.7); }
#thhud .scale { position: absolute; right: calc(var(--padx) + env(safe-area-inset-right, 0px)); bottom: max(15vh, 64px); width: 6px; height: 14vh; }
#thhud .scale i { position: absolute; inset: 0; background: linear-gradient(#fcffa4, #f98e09, #bc3754, #57106e, #000004); border-radius: 3px; }
#thhud .scale em { position: absolute; left: -44px; font-style: normal; font-size: 9px; opacity: .8; } #thhud .scale em:first-of-type { top: -2px; } #thhud .scale em:last-of-type { bottom: -2px; }
#thhud .cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; opacity: .45; background: linear-gradient(#ffe9c4,#ffe9c4) center/1px 100% no-repeat, linear-gradient(#ffe9c4,#ffe9c4) center/100% 1px no-repeat; }
#lock { position: absolute; transform: translate(-50%, -50%); transition: opacity .3s; }
#lock i { position: absolute; width: 22%; height: 22%; border: 0 solid #ffe9c4; } 
#lock i:nth-child(1) { left: 0; top: 0; border-left-width: 1.5px; border-top-width: 1.5px; } #lock i:nth-child(2) { right: 0; top: 0; border-right-width: 1.5px; border-top-width: 1.5px; }
#lock i:nth-child(3) { left: 0; bottom: 0; border-left-width: 1.5px; border-bottom-width: 1.5px; } #lock i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1.5px; border-bottom-width: 1.5px; }
#lock.hit i { border-color: #ff6a1a; }
#lock-lbl, #lock-sub { position: absolute; white-space: nowrap; font-size: 11px; letter-spacing: .12em; color: #ffe9c4; text-shadow: 0 0 6px rgba(0,0,0,.6); }
#lock-sub { font-size: 9px; opacity: .75; }
#call, #per { position: absolute; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); bottom: calc(max(15vh, 64px) + 22px); font-size: 11px; letter-spacing: .14em; opacity: 0; transition: opacity .5s; color: #ffb27a; }
#call.on, #per.on { opacity: 1; } #per { color: #ffe9c4; }
#still { display: none; position: absolute; inset: 0; background: #000 url(img/lite_land.jpg) center/cover no-repeat; }
@media (max-aspect-ratio: 1/1) { #still { background-image: url(img/lite_portrait.jpg); } }
html.lite #still { display: block; }
html.lite #c3, html.lite #loading { display: none; }
html.lite #stage { position: relative; height: 100vh; }
html.lite .cap { position: absolute; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; white-space: normal; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); max-width: calc(100vw - 2 * var(--padx)); color: #fff; font: 600 clamp(26px, 8vw, 44px)/1.05 var(--head); letter-spacing: -.03em; }
html.lite #t1 { top: 14vh; } html.lite #t2 { top: 30vh; font-size: clamp(16px, 4.4vw, 22px); font-weight: 400; letter-spacing: -.01em; opacity: .85; } html.lite #t3 { display: none; }
html.lite #hud2 { opacity: 1; bottom: 9vh; color: rgba(190, 206, 222, .7); }

/* ---------- сцены 3–5: разбор, приложение, сеть/финал ---------- */
:root { --inter: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif; }
.scene { position: relative; z-index: 20; background: var(--night); }
.scene .stick { position: sticky; top: 0; height: 100vh; overflow: hidden; }
@supports (height: 100dvh) { .scene .stick { height: 100dvh; } }
#s25 { height: 460vh; } #s3 { height: 720vh; } #s5 { height: 380vh; }
html.lite #s3 { height: 100vh; } html.lite #s5 { height: 100vh; } html.lite #s25 { display: none; }
/* мягкий вход из ночной сцены 2: верх секции растворяется в кадре стаи */
#s25::before { content: ""; position: absolute; left: 0; right: 0; top: -38vh; height: 38vh; background: linear-gradient(to bottom, rgba(7, 9, 12, 0), var(--night)); pointer-events: none; }
.giant { margin: 0; font: 700 clamp(40px, 8.4vw, 150px)/.98 var(--inter); letter-spacing: -.045em; color: #F2F5F8; }
.giant span { display: block; }
.kick { margin: 0; font: 400 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.mono { font-family: var(--mono); }
.scene-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 11px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--dim); transition: opacity .6s; pointer-events: none; }
.scene-load.off { opacity: 0; }

/* сцена 3 */
#s3 .studio { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 62% at 50% 46%, #232c36 0%, #131920 46%, #07090C 100%); opacity: 0; }
#s3 .giant { position: absolute; z-index: 1; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); top: 9vh; opacity: 0; will-change: opacity, transform; }
#s3 canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; display: block; }
#s3 svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
#s3 svg.lines polyline { fill: none; stroke: rgba(230, 237, 243, .6); stroke-width: 1; opacity: 0; }
#s3 svg.lines circle { fill: var(--fire); opacity: 0; }
#s3 .labels { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
#s3 .lbl { position: absolute; left: 0; top: 0; display: flex; gap: 10px; align-items: baseline; white-space: nowrap; opacity: 0; font: 500 13px/1.2 var(--inter); letter-spacing: -.005em; color: #E6EDF3; will-change: transform, opacity; }
#s3 .lbl i { font: 400 10px/1 var(--mono); letter-spacing: .08em; color: var(--fire); font-style: normal; }
#s3 .lbl.r { flex-direction: row-reverse; text-align: right; }
#s3 .meta { position: absolute; z-index: 4; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); bottom: max(5vh, 28px); margin: 0; font: 400 10px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
#s3 picture { display: contents; }
#s3 .lite-img { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
html.lite #s3 .lite-img { display: block; } html.lite #s3 canvas, html.lite #s3 .lines, html.lite #s3 .scene-load { display: none; }
html.lite #s3 .giant { opacity: 1 !important; transform: none !important; z-index: 2; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
html.lite #s3 .studio { opacity: 1; }

/* сцена 4 */
/* сцена 5 */
#c-net { position: absolute; inset: 0; display: block; }
#s5 .vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 80% 80% at 70% 50%, rgba(7, 9, 12, 0) 20%, rgba(7, 9, 12, .78) 100%), linear-gradient(to right, rgba(7, 9, 12, .72), rgba(7, 9, 12, 0) 60%); }
#s5 .net-hud { position: absolute; z-index: 2; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); top: max(6vh, 36px); margin: 0; font: 400 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); white-space: pre; }
#s5 .giant { position: absolute; z-index: 2; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); will-change: opacity, transform; }
#s5 .t-a { bottom: 12vh; opacity: 0; }
#s5 .finale { position: absolute; z-index: 3; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); bottom: 12vh; opacity: 0; pointer-events: none; will-change: opacity, transform; }
#s5 .finale .giant { position: static; font-size: clamp(48px, 10.5vw, 180px); }
.cta { pointer-events: auto; display: inline-flex; align-items: center; gap: 12px; margin-top: clamp(24px, 4vh, 44px); padding: 18px 34px; border-radius: 999px; background: #EEF2F6; color: #0B0E12; font: 600 17px/1 var(--inter); letter-spacing: -.01em; text-decoration: none; transition: background .25s, color .25s, transform .25s; }
.cta::after { content: "→"; font-weight: 400; transition: transform .25s; }
.cta:hover, .cta:focus-visible { background: var(--fire); color: #140A04; outline: none; } .cta:hover::after { transform: translateX(4px); }
.cta-note { margin: 16px 0 0; font: 400 13px/1.4 var(--sans); color: var(--dim); }
html.lite #s5 .finale { opacity: 1 !important; transform: none !important; pointer-events: auto; } html.lite #s5 .t-a { display: none; }

#contact { position: relative; z-index: 20; background: var(--night); padding: 18vh var(--padx) 6vh; border-top: 1px solid rgba(159, 180, 199, .08); }
#contact h3 { margin: 14px 0 28px; font: 700 clamp(36px, 6vw, 96px)/1 var(--inter); letter-spacing: -.045em; color: #F2F5F8; }
#contact .lead { max-width: 640px; margin: 0 0 14px; font: 400 clamp(15px, 1.4vw, 19px)/1.55 var(--sans); color: var(--tele); }
#contact footer { margin-top: 14vh; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }

/* портрет / мобайл */
@media (max-aspect-ratio: 1/1) {
  #s3 .giant { top: max(8vh, 56px); font-size: clamp(34px, 10.4vw, 80px); } #s3 .giant span { white-space: nowrap; }
  #s3 .lbl { font-size: 13px; } #s3 .lbl i { display: none; }
  #s3 .meta { display: none; }
  #s5 .t-a { bottom: 16vh; font-size: clamp(38px, 12vw, 80px); } #s5 .finale { bottom: 14vh; } #s5 .finale .giant { font-size: clamp(48px, 16vw, 110px); }
  #s5 .net-hud { white-space: normal; max-width: 86vw; font-size: 10px; }
}

@media (max-width: 767px) {
  #tele { font-size: 9.5px; letter-spacing: .03em; bottom: 25vh; }
  #hold span { letter-spacing: .2em; white-space: nowrap; }
}
html.nofx *, html.nofx *::before { transition: none !important; animation: none !important; }

/* ---------- смартфон в кадре сцены 2 ---------- */
#appview { position: absolute; z-index: 3; width: var(--pw, 260px); height: var(--ph, 560px); transform: translateY(-50%); pointer-events: none; opacity: 0; visibility: hidden; }
#appview[data-port="1"] { transform: translateX(-50%); }
.aph { position: absolute; inset: 0; will-change: transform; }   /* тень — box-shadow корпуса (CSS filter на анимируемом слое с iframe пересчитывался каждый кадр) */
.aph-body { position: absolute; inset: 0; border-radius: calc(var(--pw) * .15); background: linear-gradient(145deg, #5b6068 0%, #2a2d33 18%, #14161a 50%, #2c3036 82%, #565b63 100%); padding: calc(var(--pw) * .028); box-shadow: inset 0 0 0 calc(var(--pw) * .004) rgba(255, 255, 255, .22), inset 0 0 0 calc(var(--pw) * .011) #07080a, 0 40px 60px rgba(0, 0, 0, .55), 0 8px 18px rgba(0, 0, 0, .35); }
.aph-screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--pw) * .125); overflow: hidden; background: #000; }
.apscr { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .55s ease, visibility 0s linear .56s; background: #07090C; }   /* неактивные экраны после затухания не рисуются */
.apscr.on { opacity: 1; visibility: visible; transition: opacity .55s ease, visibility 0s; }
.apscr iframe { position: absolute; left: calc(50% - 196.5px * var(--pk, .5)); top: 0; width: 393px; height: 852px; border: 0; transform-origin: 0 0; transform: scale(var(--pk, .5)); pointer-events: none; background: #07090C; }
.apnet canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.apnet .net-hud { display: none; }
.aph-island { position: absolute; left: 50%; top: calc(var(--pw) * .062); width: 28%; height: calc(var(--pw) * .085); transform: translateX(-50%); border-radius: 99px; background: #000; box-shadow: 0 0 0 1px rgba(255, 255, 255, .04); }
.aph-glare { position: absolute; inset: calc(var(--pw) * .028); border-radius: calc(var(--pw) * .125); background: linear-gradient(115deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0) 68%, rgba(255, 255, 255, .05) 100%); pointer-events: none; }
.aph-btn { position: absolute; width: calc(var(--pw) * .014); background: linear-gradient(#6a6f77, #2a2d33); border-radius: 2px; }
.aph-btn.b1 { left: calc(var(--pw) * -.01); top: 17%; height: 4.2%; } .aph-btn.b2 { left: calc(var(--pw) * -.01); top: 25%; height: 8%; } .aph-btn.b3 { left: calc(var(--pw) * -.01); top: 35%; height: 8%; } .aph-btn.b4 { right: calc(var(--pw) * -.01); top: 28%; height: 13%; }
html.lite #appview { display: none; }
footer .credits { display: block; width: 100%; margin-top: 10px; font-size: 10px; opacity: .55; letter-spacing: .02em; }

@media (max-aspect-ratio: 1/1) {
  /* портрет: строки телеметрии лежат на «полке» между дроном и телефоном — не на очаге в верхней половине кадра */
  body.phone-on #hud2 { top: auto; bottom: calc(var(--phone-top, 46.4vh) + 26px); }
  body.phone-on #call, body.phone-on #per { top: auto; bottom: calc(var(--phone-top, 46.4vh) + 8px); }
  body.phone-on #thhud .scale, body.phone-on #thhud .bl { display: none; }
}

/* ---------- сцена 2б · студийный облёт ---------- */
#s25 .stbg { position: absolute; inset: 0; background: radial-gradient(ellipse 80% 70% at 50% 58%, #2a323c 0%, #161c23 42%, #07090C 100%); opacity: 0; }
#s25 canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; display: block; }
#s25 .giant { position: absolute; z-index: 3; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); top: 9vh; opacity: 0; will-change: opacity, transform; }
#s25 .meta { position: absolute; z-index: 3; left: calc(var(--padx) + env(safe-area-inset-left, 0px)); bottom: max(5vh, 28px); margin: 0; font: 400 10px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); opacity: 0; }
#s25 .spec { display: none; }
@media (max-aspect-ratio: 1/1) { #s25 .spec { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; position: absolute; z-index: 3; left: 24px; right: 24px; bottom: max(17vh, 118px); margin: 0; padding-top: 18px; border-top: 1px solid rgba(159, 180, 199, .16); opacity: 0; }
  #s25 .spec div { display: flex; flex-direction: column; gap: 6px; } #s25 .spec b { font: 600 clamp(26px, 8vw, 34px)/1 var(--inter); letter-spacing: -.035em; color: #F2F5F8; } #s25 .spec span { font: 400 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
  #s25 .giant { top: max(7.5vh, 52px); font-size: clamp(34px, 10.4vw, 66px); } #s25 .giant span { white-space: nowrap; } #s25 .meta { display: none; } }

/* тепловизор + смартфон (десктоп): шкала и маркер температуры переезжают влево от телефона; IRONBOW — рядом с IR */
body.phone-on #thhud .tr { display: none; }
body.phone-on #thhud .tl::after { content: " · IRONBOW"; }
@media (min-aspect-ratio: 1/1) {
  body.phone-on #thhud .scale { right: auto; left: calc(var(--padx) + 46px + env(safe-area-inset-left, 0px)); bottom: calc(max(15vh, 64px) + 78px); }
  body.phone-on #thhud .bl { right: auto; left: calc(var(--padx) + 46px + 24px + env(safe-area-inset-left, 0px)); text-align: left; }
  body.phone-on #thhud .bl::after { right: auto; left: -18px; }
  body.phone-on #thhud .bl { margin-bottom: 0; }
}

@media (max-aspect-ratio: 1/1) and (max-width: 767px) { body.phone-on #sound { opacity: 0; pointer-events: none; } }   /* «ЗВУК ВЫКЛ» не ложится на телефон */
@media (max-aspect-ratio: 1/1) { body.phone-on #hud2, body.phone-on #call, body.phone-on #per { background: rgba(7, 9, 12, .78); padding: 5px 10px; border-radius: 8px; width: max-content; max-width: 92vw; left: 50%; right: auto; transform: translateX(-50%); text-align: center; } }   /* строка HUD ложится на подложку: линии связи не перечёркивают текст */
@media (max-aspect-ratio: 1/1) and (max-width: 767px) { body.th.phone-on #hud2 { display: none; } }   /* в ИК на мобайле строка HUD не закрывает дрон */
@media (max-aspect-ratio: 1/1) and (max-width: 767px) { body.phone-on #thhud .tl { top: max(4.5vh, 36px); } }

/* предрендер (телефон): видео вместо 3D-канваса */
.previd { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; pointer-events: none; background: #05070a; }
/* режим съёмки ?pre=1: на экране только 3D-канвас */
html.precap body > *:not(#stage), html.precap #stage > *:not(#c3) { display: none !important; }
html.precap, html.precap body { background: #000; }

/* Алматы + тайлы Google: заголовок поверх фотографии — мягкая подложка и тень, читается на любом фоне */
body.almaty .tw { --scrim: rgba(5, 8, 13, .52); text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
body.almaty .tw.dk { --scrim: rgba(238, 243, 248, .5); text-shadow: 0 2px 30px rgba(255, 255, 255, .45); }
body.almaty .tw::before { inset: -34% -30% -40% -22%; }

/* ---------- знак студии (угол, сдержанно; Google-атрибуция — слева внизу на десктопе, слева вверху на мобайле) ---------- */
#studio { position: fixed; left: calc(var(--padx) + env(safe-area-inset-left, 0px) - .28em); top: max(4vh, calc(env(safe-area-inset-top, 0px) + 14px)); z-index: 45; display: flex; align-items: center; gap: 9px; font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(236,241,246,.92); text-shadow: 0 0 7px rgba(0,0,0,.7), 0 1px 2px rgba(0,0,0,.65); text-decoration: none; transition: color .2s; }
#studio svg { width: 17px; height: 16px; display: block; filter: drop-shadow(0 0 4px rgba(0,0,0,.7)) drop-shadow(0 1px 1px rgba(0,0,0,.6)); }
#studio:hover, #studio:focus-visible { color: #E6EDF3; }
@media (max-width: 767px) { #studio { left: auto; right: calc(var(--padx) + env(safe-area-inset-right, 0px) - .28em); top: max(4vh, calc(env(safe-area-inset-top, 0px) + 14px)); } #studio span { display: none; } #skip { top: calc(max(4vh, calc(env(safe-area-inset-top, 0px) + 14px)) + 30px); } }
