/* =========================
   ROOT
========================= */

:root {
  --scene-width: 1920px;
  --scene-height: 1080px;

  /* BACKGROUNDS */
  --bg-main-image: url("bg_bogdasmas_main.png");
  --bg-about-image: url("bg_bogdasmas_about.png");
  --bg-chart-image: url("bg_bogdasmas_chart.png");

  /* TICKER */
  --ticker-height: 30px;
  --ticker-font-size: 22px;
  --ticker-speed-normal: 22s;
  --ticker-speed-fast: 11s;
  --ticker-bg: transparent;
  --ticker-text-color: #2bdc3b;

  /* NAV */
  --nav-top: 120px;
  --nav-gap: 70px;
  --nav-font-size: 25px;

  /* MAIN TITLE */
  --title-top: 180px;
  --title-width: 650px;

  /* ABOUT */
  --about-title-top: -500px;
  --about-title-font-size: 80px;
  --about-text-top: -340px;
  --about-text-width: 60%;
  --about-text-font-size: 18px;
  --about-pump-offset-y: 120px;
  --about-pump-font-size: 46px;
  --about-pump-tilt: 18deg;

  /* CHART */
  --chart-title-top: -500px;
  --chart-title-font-size: 80px;
  --chart-frame-top: -200px;
  --chart-frame-width: 700px;
  --chart-frame-height: 500px;
  --gift-width: 200px;

  /* СМЕЩЕНИЕ ГРАФИКА */
  --chart-offset-x: 250px; /* + вправо, - влево */
  --chart-offset-y: 0px;   /* + вниз, - вверх */

  /* СМЕЩЕНИЕ ПОДАРКА */
  --gift-offset-x: 250px;  /* + вправо, - влево */
  --gift-offset-y: 100px;  /* + вниз, - вверх */

  --text-color-main: #000000;
  --shadow-strong: 0 0 14px rgba(0, 0, 0, 0.6);
}

/* =========================
   BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text-color-main);
  background-color: #000;
}

.page-wrapper {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

/* =========================
   SCREENS
========================= */

.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.screen-main {
  background-image: var(--bg-main-image);
}

.screen-about {
  background-image: var(--bg-about-image);
}

.screen-chart {
  background-image: var(--bg-chart-image);
}

/* =========================
   TICKER (ФИНАЛЬНАЯ ВЕРСИЯ)
========================= */

.ticker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--ticker-height);
  overflow: hidden;
  background: var(--ticker-bg);
  display: flex;
  align-items: center;
  z-index: 100;
}

.ticker-inner {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%; /* стартуем справа за экраном */
  animation: ticker-scroll var(--ticker-speed-normal) linear infinite;
}

.ticker-inner span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: var(--ticker-font-size);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ticker-text-color);
  text-shadow: 0 0 6px rgba(43, 220, 59, 0.7);
  animation:
    ticker-glow 2.2s ease-in-out infinite,
    ticker-jitter 0.35s ease-in-out infinite alternate;
}

.ticker:hover .ticker-inner {
  animation-duration: var(--ticker-speed-fast);
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes ticker-glow {
  0%,
  100% {
    text-shadow: 0 0 6px rgba(43, 220, 59, 0.7);
  }
  50% {
    text-shadow: 0 0 14px rgba(43, 220, 59, 1);
  }
}

@keyframes ticker-jitter {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(2px);
  }
}

/* =========================
   NAV — без подчёркивания, с зелёным силуэтом
========================= */

.top-nav {
  position: absolute;
  top: var(--nav-top);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--nav-gap);
  z-index: 20;
}

.nav-link {
  position: relative;
  background: transparent;
  border: none;
  padding: 4px 2px;
  font-family: "Ultra", system-ui, serif;
  font-size: var(--nav-font-size);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;

  animation: nav-float 4s ease-in-out infinite;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    text-shadow 0.18s ease;
}

.nav-link:hover {
  transform: translateY(-2px) scale(1.05);
  filter:
    drop-shadow(0 0 14px rgba(43, 220, 59, 0.9))
    drop-shadow(0 0 26px rgba(43, 220, 59, 0.7));
}

.nav-link:active {
  transform: translateY(1px) scale(0.95);
}

@keyframes nav-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* =========================
   MAIN TITLE
========================= */

.title-wrapper {
  position: absolute;
  top: var(--title-top);
  left: 50%;
  transform: translateX(-50%);
  width: var(--title-width);
  max-width: 90vw;
  filter: drop-shadow(var(--shadow-strong));
  animation: title-breathe 6s ease-in-out infinite;
}

.title-image {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes title-breathe {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
  }
  50% {
    transform: translateX(-50%) scale(1.02);
  }
}

/* =========================
   ABOUT
========================= */

.about-content {
  position: relative;
  width: 100%;
  max-width: var(--scene-width);
  margin: 0 auto;
}

.section-title {
  font-family: "Ultra", system-ui, serif;
  text-transform: uppercase;
  text-align: center;
  color: #000;
  text-shadow: var(--shadow-strong);
}

.about-title {
  position: absolute;
  top: var(--about-title-top);
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  font-size: var(--about-title-font-size);
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-title.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.about-text {
  position: absolute;
  top: var(--about-text-top);
  left: 50%;
  transform: translateX(-50%);
  width: var(--about-text-width);
  max-width: 90vw;
  font-family: "Ultra", system-ui, serif;
  font-size: var(--about-text-font-size);
  line-height: 1.5;
  text-align: center;
  white-space: pre-line;
}

/* Диагональные PUMP IT */

.about-pump {
  position: absolute;
  top: calc(var(--about-title-top) + var(--about-pump-offset-y));
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 700;
  font-size: var(--about-pump-font-size);
  color: #2bdc3b;
  text-shadow: 0 0 12px rgba(43, 220, 59, 0.8);
  transform-origin: center;
}

.about-pump-left {
  left: 12%;
  animation: pump-swing-left 5s ease-in-out infinite;
}

.about-pump-right {
  right: 12%;
  animation: pump-swing-right 5s ease-in-out infinite;
}

@keyframes pump-swing-left {
  0%,
  100% {
    transform: translateY(0) rotate(calc(-1 * var(--about-pump-tilt)));
  }
  50% {
    transform: translateY(-4px)
      rotate(calc(-1 * var(--about-pump-tilt) + 4deg));
  }
}

@keyframes pump-swing-right {
  0%,
  100% {
    transform: translateY(0) rotate(var(--about-pump-tilt));
  }
  50% {
    transform: translateY(-4px) rotate(calc(var(--about-pump-tilt) - 4deg));
  }
}

/* =========================
   CHART
========================= */

.chart-content {
  position: relative;
  width: 100%;
  max-width: var(--scene-width);
  margin: 0 auto;
}

.chart-title {
  position: absolute;
  top: var(--chart-title-top);
  left: 50%;
  transform: translateX(-50%) translateY(40px) scale(0.95);
  font-size: var(--chart-title-font-size);
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.chart-title.visible {
  opacity: 1;
  animation: chart-bounce 0.7s ease-out forwards;
}

@keyframes chart-bounce {
  0% {
    transform: translateX(-50%) translateY(40px) scale(0.95);
  }
  60% {
    transform: translateX(-50%) translateY(-5px) scale(1.03);
  }
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

.chart-and-gift {
  position: absolute;
  top: var(--chart-frame-top);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--scene-width);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
  padding: 0 40px;
}

/* Фрейм графика — двигается отдельно */

.chart-frame-wrapper {
  position: relative;
  width: var(--chart-frame-width);
  max-width: 90vw;
  height: var(--chart-frame-height);
  max-height: 60vh;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.6);
  transform: translate(var(--chart-offset-x), var(--chart-offset-y));
}

.chart-frame-hover {
  pointer-events: none;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
  transition: box-shadow 0.3s ease;
}

.chart-frame-wrapper:hover .chart-frame-hover {
  box-shadow: 0 0 14px 4px rgba(255, 255, 255, 0.5);
}

.chart-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ПОДАРОК — двигается независимо */

.gift-wrapper {
  position: relative;
  width: var(--gift-width);
  max-width: 40vw;
  margin-left: var(--gift-offset-x);
  margin-top: var(--gift-offset-y);
  animation:
    gift-float 4s ease-in-out infinite,
    gift-tilt 6s ease-in-out infinite;
}

.gift-image {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
}

.gift-shadow {
  position: absolute;
  left: 50%;
  bottom: -16px;
  transform: translateX(-50%);
  width: 70%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.45),
    transparent
  );
  filter: blur(3px);
  z-index: 1;
  animation: gift-shadow-pulse 4s ease-in-out infinite;
}

@keyframes gift-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes gift-tilt {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-4deg);
  }
}

@keyframes gift-shadow-pulse {
  0%,
  100% {
    transform: translateX(-50%) scaleX(1);
    opacity: 0.85;
  }
  50% {
    transform: translateX(-50%) scaleX(0.9);
    opacity: 0.5;
  }
}

.gift-wrapper:hover {
  animation:
    gift-float 4s ease-in-out infinite,
    gift-tilt 6s ease-in-out infinite,
    gift-shake 0.35s linear infinite;
}

@keyframes gift-shake {
  0% {
    transform: translate(0, -2px) rotate(-3deg);
  }
  25% {
    transform: translate(2px, 0) rotate(3deg);
  }
  50% {
    transform: translate(-2px, 2px) rotate(-3deg);
  }
  75% {
    transform: translate(1px, -1px) rotate(3deg);
  }
  100% {
    transform: translate(0, 0) rotate(0);
  }
}

/* =========================
   ADAPTIVE
========================= */

@media (max-width: 1024px) {
  :root {
    --nav-top: 50px;
    --nav-gap: 40px;
    --title-width: 70vw;
    --about-text-width: 80%;
    --chart-frame-width: 80vw;
    --chart-frame-height: 55vw;
    --gift-width: 220px;
  }

  .chart-and-gift {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --ticker-height: 26px;
    --ticker-font-size: 14px;

    --nav-top: 44px;
    --nav-gap: 26px;
    --nav-font-size: 14px;

    --title-top: 170px;
    --title-width: 78vw;

    --about-title-top: 130px;
    --about-title-font-size: 38px;
    --about-text-top: 200px;
    --about-text-width: 86%;
    --about-text-font-size: 15px;

    --about-pump-offset-y: 150px;
    --about-pump-font-size: 26px;

    --chart-title-top: 140px;
    --chart-title-font-size: 38px;
    --chart-frame-top: 220px;
    --chart-frame-width: 90vw;
    --chart-frame-height: 60vw;
    --gift-width: 180px;
  }

  .chart-and-gift {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 0 10px;
  }

  .about-pump-left {
    left: 8%;
  }

  .about-pump-right {
    right: 8%;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-gap: 18px;
    --nav-font-size: 12px;

    --about-title-font-size: 32px;
    --about-text-font-size: 14px;

    --about-pump-font-size: 22px;
    --chart-title-font-size: 32px;
  }

  .about-pump-left {
    left: 6%;
  }

  .about-pump-right {
    right: 6%;
  }
}
