/* =========================
   ROOT: НАСТРОЙКИ СЦЕНЫ
========================= */

:root {
  /* Размер сцены */
  --scene-width: 1920px;
  --scene-height: 1080px;

  /* Фоны трёх экранов */
  --bg-main-image: url("bg_bateman_main.png");
  --bg-about-image: url("bg_bateman_about.png");
  --bg-chart-image: url("bg_bateman_chart.png");

  /* --- SCREEN 1 --- */
  --bateman-title-top: 25px;
  --bateman-title-left: 40px;
  --bateman-title-font-size: 80px;

  --bateman-card-width: 550px;
  --bateman-card-top: 130px;
  --bateman-card-right: 200px;

  --footer-strip-width: 1200px;
  --footer-strip-bottom: 20px;

  --main-nav-bottom: 60px;
  --main-nav-gap: 80px;
  --nav-font-size: 30px;

  /* --- SCREEN 2 --- */
  --about-images-top: 120px;

  --about-image-1-width: 320px;
  --about-image-2-width: 320px;
  --about-image-3-width: 320px;

  --about-images-gap: 30px;

  --about-title-top: 25px;
  --about-title-font-size: 80px;

  --about-text-top: 725px;
  --about-text-width: 1100px;
  --about-text-font-size: 26px;
  --about-text-line-height: 1.4;

  /* --- SCREEN 3 --- */
  --chart-title-top: 80px;
  --chart-title-font-size: 70px;

  --chart-window-top: 160px;
  --chart-window-width: 900px;
  --chart-window-height: 520px;

  --chart-window-bg: rgba(0, 0, 0, 0.65);
  --chart-window-border-radius: 18px;

  /* Анимации */
  --fade-duration: 0.8s;
  --nav-hover-scale: 1.08;
}

/* =========================
   BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  background: #000;
  color: #fff;
}

body {
  display: flex;
  justify-content: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-wrapper {
  width: var(--scene-width);
}

.screen {
  position: relative;
  width: var(--scene-width);
  height: var(--scene-height);
  overflow: hidden;
}

.screen-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 0;
}

.bg-main {
  background-image: var(--bg-main-image);
}

.bg-about {
  background-image: var(--bg-about-image);
}

.bg-chart {
  background-image: var(--bg-chart-image);
}

/* =========================
   SCREEN 1
========================= */

.bateman-title {
  position: absolute;
  top: var(--bateman-title-top);
  left: var(--bateman-title-left);
  font-family: "Just Another Hand", cursive;
  font-size: var(--bateman-title-font-size);
  letter-spacing: 2px;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

/* Визитка */
.bateman-card {
  position: absolute;
  top: var(--bateman-card-top);
  right: var(--bateman-card-right);
  width: var(--bateman-card-width);
  transform: translateY(-20px) rotate(-8deg);
  opacity: 0;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.7));
  transition:
    opacity var(--fade-duration) ease-out,
    transform var(--fade-duration) ease-out;
  z-index: 2;
}

.bateman-card.visible {
  opacity: 1;
  transform: translateY(0) rotate(-8deg);
}

/* Белая линия под кнопками */
.footer-strip {
  position: absolute;
  bottom: var(--footer-strip-bottom);
  left: 50%;
  transform: translateX(-50%);
  width: var(--footer-strip-width);
  max-width: 100%;
  z-index: 1; /* под кнопками */
}

/* Навигация поверх линии */
.main-nav {
  position: absolute;
  bottom: var(--main-nav-bottom);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--main-nav-gap);
  z-index: 2;
}

.nav-button {
  background: transparent;
  border: none;
  padding: 0;
  font-family: "Just Another Hand", cursive;
  font-size: var(--nav-font-size);
  color: #ffffff;
  cursor: pointer;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
  position: relative;
  transition:
    transform 0.18s ease-out,
    text-shadow 0.18s ease-out,
    opacity 0.18s ease-out;
}

/* underline */
.nav-button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  transition: width 0.18s ease-out;
}

.nav-button:hover {
  transform: scale(var(--nav-hover-scale));
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.85);
}

.nav-button:hover::after {
  width: 110%;
}

.nav-button:active {
  transform: scale(0.95);
  opacity: 0.8;
}

.nav-button-accent {
  letter-spacing: 2px;
}

/* =========================
   SCREEN 2 (ABOUT)
========================= */

.about-images {
  position: absolute;
  top: var(--about-images-top);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--about-images-gap);
  z-index: 2;
}

.about-image {
  width: 320px;
  max-width: 100%;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(25px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.7));
  transition:
    opacity var(--fade-duration) ease-out,
    transform var(--fade-duration) ease-out;
}

.about-image-1 {
  width: var(--about-image-1-width);
}

.about-image-2 {
  width: var(--about-image-2-width);
}

.about-image-3 {
  width: var(--about-image-3-width);
}

.about-image.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-image-1.visible {
  transition-delay: 0s;
}

.about-image-2.visible {
  transition-delay: 0.25s;
}

.about-image-3.visible {
  transition-delay: 0.5s;
}

.about-title {
  position: absolute;
  top: var(--about-title-top);
  left: 50%;
  transform: translateX(-50%);
  font-family: "Just Another Hand", cursive;
  font-size: var(--about-title-font-size);
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
  margin: 0;
  z-index: 2;
}

.about-text {
  position: absolute;
  top: var(--about-text-top);
  left: 50%;
  transform: translateX(-50%);
  width: var(--about-text-width);
  max-width: 90%;
  font-family: "Just Another Hand", cursive;
  font-size: var(--about-text-font-size);
  line-height: var(--about-text-line-height);
  color: #111;
  z-index: 2;
}

.about-text p {
  margin: 0 0 18px;
}

/* лёгкое осветление для читаемости */
.screen-about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  mix-blend-mode: screen;
  z-index: 1;
}

/* =========================
   SCREEN 3 (CHART)
========================= */

.chart-title {
  position: absolute;
  top: var(--chart-title-top);
  left: 50%;
  transform: translateX(-50%);
  font-family: "Just Another Hand", cursive;
  font-size: var(--chart-title-font-size);
  color: #ffffff;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
  margin: 0;
  z-index: 2;
}

.chart-window {
  position: absolute;
  top: var(--chart-window-top);
  left: 50%;
  transform: translateX(-50%);
  width: var(--chart-window-width);
  height: var(--chart-window-height);
  background: var(--chart-window-bg);
  border-radius: var(--chart-window-border-radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.85);
  z-index: 2;
}

.chart-window iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================
   MOBILE ADAPTIVE
========================= */

@media (max-width: 1024px) {
  body {
    display: block;
    overflow-x: hidden;
  }

  .page-wrapper {
    width: 1920px;
    transform: scale(calc(100vw / 1920));
    transform-origin: top left;
  }
}
