/* tokens
   tan: #e5b36c (sampled straight off the avatar's flat background, page and art fuse into one field)
   ink: #1c130a (outline black, used for all text)
   rust: #9b350e (hoodie shadow, ticker accent)
   moss: #006c1d (hair/can green, CA accent on hover)
   type: Unbounded (bundled local woff2, blunt geometric display face) for line + ticker,
         system monospace for the CA (real case, always legible, always copyable)
   corner radius: 0 everywhere, flat sticker has no soft UI chrome
   motion: one thing only, the vape wisp drifting up and fading, looped
*/

@font-face {
  font-family: "Unbounded";
  src: url("assets/fonts/unbounded-variable.woff2") format("woff2");
  font-weight: 500 900;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #e5b36c;
}

body {
  display: flex;
  min-height: 100vh;
  font-family: "Unbounded", "Helvetica Neue", Arial, sans-serif;
  color: #1c130a;
}

.stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 100%;
  height: 100vh;
}

.copy {
  position: absolute;
  left: 6vw;
  top: 50%;
  transform: translateY(-58%);
  /* текст всегда выше картинки по слою: на широком экране квадратная картинка доходила до
     середины и накрывала заголовок и адрес контракта (владелец, 03.09.2026) */
  z-index: 3;
  max-width: min(38vw, 520px);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9em;
}

.line, .ticker, .ca { min-width: 0; }

.line {
  margin: 0;
  font-size: clamp(1.1rem, 2.6vw, 2rem);
  font-weight: 700;
  line-height: 1.22;
}

.ticker {
  margin: 0;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  font-weight: 900;
  letter-spacing: 0.01em;
  color: #9b350e;
}

.ca {
  appearance: none;
  border: 2px solid #1c130a;
  background: transparent;
  color: #1c130a;
  font: 600 clamp(0.75rem, 1.35vw, 1rem)/1 ui-monospace, "SF Mono", "JetBrains Mono", "Courier New", monospace;
  padding: 0.7em 0.9em;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: left;
}
.ca:hover, .ca:focus-visible { background: #006c1d; border-color: #006c1d; color: #f3e7cc; }

.figure {
  position: relative;
  display: inline-block;
  line-height: 0;
  height: 100vh;
  /* и одновременно физически ограничиваем картинку правой половиной, чтобы она не наезжала */
  max-width: 52vw;
}

.portrait {
  display: block;
  height: 100vh;
  width: auto;
  /* max-width was none: в узком окне квадратная картинка вылезала за экран и накрывала
     ссылки внизу (владелец, 03.09.2026 - "картинка поверх всего"). */
  max-width: 100%;
  object-fit: contain;
}

.wisp {
  position: absolute;
  left: 77.5%;
  top: 19%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28, 19, 10, 0.35) 0%, rgba(28, 19, 10, 0) 70%);
  filter: blur(1px);
  animation: drift 4.5s ease-out infinite;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1);   opacity: 0; }
  15%  { opacity: 0.7; }
  100% { transform: translate(-6px, -70px) scale(2.6); opacity: 0; }
}

.credit {
  position: absolute;
  right: 1.4em;
  bottom: 1em;
  display: flex;
  gap: 1em;
  font: 700 0.75rem "Unbounded", sans-serif;
  letter-spacing: 0.04em;
  z-index: 2;
}
.credit a { color: #1c130a; text-decoration: none; opacity: 0.7; }
.credit a:hover { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .wisp { animation: none; opacity: 0.4; }
}

@media (max-width: 760px) {
  .stage { flex-direction: column; align-items: center; justify-content: flex-end; }
  .copy {
    position: static;
    transform: none;
    display: block;
    width: 88vw;
    max-width: 88vw;
    text-align: center;
    padding-top: 6vh;
  }
  .line, .ticker { width: 100%; margin: 0 0 0.6em; }
  .ca { display: inline-block; }
  /* на телефоне ведём размер по ШИРИНЕ, иначе высота в vh давала картинку шире экрана */
  .figure { height: auto; width: min(88vw, 56vh); max-width: 88vw; }
  .portrait { height: auto; width: 100%; max-width: 100%; }
  .stage { padding-bottom: 3em; }
  .credit { right: 50%; transform: translateX(50%); bottom: 0.6em; }
}
