/* spongedigital.asia — обложка со станцией. Весь экран занимает сцена;
   в DOM живут только заголовок, подсказка и обязательная строка лицензии. */

@font-face {
  font-family: "Wix Madefor Text";
  src: url(/assets/fonts/wixmadefortext-latin.woff2) format("woff2");
  font-weight: 400 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2197;
}
@font-face {
  font-family: "Wix Madefor Text";
  src: url(/assets/fonts/wixmadefortext-latin-ext.woff2) format("woff2");
  font-weight: 400 800; font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB;
}

:root {
  --sky-top: #0e1b2e;
  --sky-mid: #35618a;
  --sky-low: #9fc6d6;
  --haze:    #dfeaef;
  --paper:   #f4f8fa;
  --e-ui:    cubic-bezier(.4, 0, .2, 1);
  --e-display: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--sky-top);
}

body {
  /* фолбэк на случай, если WebGL не поднялся: то же небо, нарисованное CSS */
  background:
    radial-gradient(120% 78% at 50% 118%, var(--haze) 0%, var(--sky-low) 34%, transparent 62%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 72%, var(--sky-low) 100%);
  color: #fff;
  font: 400 15px/1.5 "Wix Madefor Text", system-ui, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  /* канвас показан сразу: космос и звёзды уже рисуются, пока тянется модель,
     а сама станция выезжает наездом камеры — пустого экрана не бывает */
}
.stage:active { cursor: grabbing; }
.is-flat .stage { display: none; }

/* подложка внизу кадра: подписи обязаны читаться и на облаке, и на тени */
body::after {
  content: "";
  position: fixed;
  inset: auto 0 0 0;
  height: 190px;
  background: linear-gradient(to top, rgba(6, 12, 20, .62), rgba(6, 12, 20, 0));
  pointer-events: none;
}

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hint, .credit {
  position: fixed;
  z-index: 2;
  margin: 0;
  font-size: 12px;
  letter-spacing: .07em;
  color: rgba(255, 255, 255, .78);
  text-shadow: 0 1px 2px rgba(4, 10, 18, .45);
}

.hint {
  left: max(20px, env(safe-area-inset-left));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 9px;
  transition: opacity .5s var(--e-ui), translate .6s var(--e-display);
}
.hint::before {
  content: "";
  width: 22px; height: 1px;
  background: currentColor;
  opacity: .55;
  animation: reach 3.4s var(--e-display) infinite;
}
@keyframes reach {
  0%, 62%, 100% { transform: translateX(0); opacity: .35; }
  26%           { transform: translateX(7px); opacity: .9; }
}
.is-touched .hint { opacity: 0; translate: 0 6px; pointer-events: none; }
.js .hint { opacity: 0; }                 /* до загрузки модели подсказки нет */
.js.is-live .hint { opacity: 1; }
.js.is-live.is-touched .hint { opacity: 0; }

.credit {
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  max-width: 54vw;
  text-align: right;
  font-size: 11px;
  color: rgba(255, 255, 255, .6);
}
.credit a {
  color: inherit;
  text-decoration-color: rgba(255, 255, 255, .3);
  text-underline-offset: 3px;
  /* палец попадает в 44 px, хотя на вид строка в одиннадцать пунктов */
  display: inline-block;
  padding: 14px 2px;
  margin: -14px 0;
}
.credit a:hover { color: #fff; text-decoration-color: rgba(255, 255, 255, .8); }

.flat-note {
  position: fixed;
  left: 50%; top: 50%;
  translate: -50% -50%;
  margin: 0;
  max-width: 28ch;
  text-align: center;
  font-size: 15px;
  color: rgba(255, 255, 255, .86);
}
.is-flat [data-flat-note] { display: block; }

@media (max-width: 859px) {
  body::after { height: 210px; }
  .hint, .credit {
    left: 50%;
    right: auto;
    translate: -50% 0;
    text-align: center;
    max-width: min(86vw, 420px);
  }
  .hint   { bottom: calc(max(20px, env(safe-area-inset-bottom)) + 30px); }
  .credit { bottom: max(16px, env(safe-area-inset-bottom)); }
  .is-touched .hint { translate: -50% 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .hint::before { animation: none; opacity: .55; }
  .stage { transition: none; }
}

/* ссылки на внутренние страницы (02.11.2026): тот же кегль и трассировка, что у подсказки, правый верхний угол */
.homenav {
  position: fixed;
  z-index: 2;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  gap: 2px;
}
.homenav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  font-size: 12px;
  letter-spacing: .07em;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(4, 10, 18, .45);
  background: linear-gradient(#c8d6e2, #c8d6e2) left 8px bottom 12px / 0 1px no-repeat;
  transition: color .3s var(--e-ui), background-size .6s var(--e-display);
}
.homenav a:hover { color: #fff; background-size: calc(100% - 16px) 1px; }
.homenav a:focus-visible { outline: 1px solid #c8d6e2; outline-offset: -6px; }
@media (max-width: 859px) {
  .homenav { left: 50%; right: auto; translate: -50% 0; }
}

/* строка предложения на главной (07.11.2026, PR-правка): тот же кегль и цвет, что у подсказки, левый верхний угол */
.offer {
  position: fixed;
  z-index: 2;
  top: max(26px, env(safe-area-inset-top));
  left: max(20px, env(safe-area-inset-left));
  margin: 0;
  max-width: min(46vw, 460px);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .07em;
  color: rgba(255, 255, 255, .78);
  text-shadow: 0 1px 2px rgba(4, 10, 18, .45);
}
.offer a {
  color: #fff;
  text-decoration-color: rgba(200, 214, 226, .55);
  text-underline-offset: 3px;
  display: inline-block;
  padding: 12px 2px;
  margin: -12px 0;
}
.offer a:hover { text-decoration-color: #c8d6e2; }
@media (max-width: 859px) {
  .offer {
    top: calc(max(14px, env(safe-area-inset-top)) + 50px);
    left: 50%;
    translate: -50% 0;
    width: max-content;
    max-width: min(86vw, 420px);
    text-align: center;
  }
}
