/* =========================
   FOOTER POSITION CONTROLS
========================= */

:root {
  --footer-x: -5%;   /* ←→ движение футера (лево/право) */
  --footer-y: -100px; /* ↑↓ движение футера (вверх/вниз) */
}

/* =========================
   BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Kirang Haerang", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background-color: #000;
  overflow-x: hidden;
}

.page {
  width: 100%;
  min-height: 100vh;
}

.section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* =========================
   FIRST PAGE — HERO
========================= */

.section-hero {
  background-image: url("bg-main.png");
  background-size: cover;
  background-position: center;
}

.domers-title {
  position: absolute;
  left: 38%;
  bottom: -5%;
  transform: translateX(-50%);
  width: 1100px;
}

/* Right-side Barts */

.barts-group {
  position: absolute;
  right: 1.5%;
  bottom: 3%;
  display: flex;
  gap: 20px;
  align-items: flex-end;
}

.bart-wrapper {
  opacity: 0;
  transform: translateY(40px);
}

.bart-image { object-fit: contain; }

.bart-yellow { width: 158px; }
.bart-purple { width: 156px; }
.bart-red   { width: 220px; }

.bart-yellow-wrapper {
  animation: bart-appear 0.8s 0.4s ease-out forwards;
}
.bart-purple-wrapper {
  animation: bart-appear 0.8s 1.0s ease-out forwards;
}
.bart-red-wrapper {
  animation: bart-appear 0.8s 1.6s ease-out forwards,
             jitter 0.18s 2.0s linear infinite alternate;
}

@keyframes bart-appear {
  0% { opacity: 0; transform: translateY(60px) scale(0.96); }
  60% { opacity: 1; transform: translateY(-10px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes jitter {
  0%   { transform: translateX(-1px) translateY(0); }
  100% { transform: translateX(1px) translateY(-1px); }
}

/* Arrow */

.scroll-arrow {
  position: absolute;
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  background: none;
  border: none;
  cursor: pointer;
}

.scroll-arrow img {
  width: 100%;
  height: 100%;
  animation: arrow-bounce 1.1s ease-in-out infinite;
}

@keyframes arrow-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(16px); }
}

/* =========================
   SECOND PAGE — TV
========================= */

.section-tv {
  background-image: url("bg-tv.png");
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.tv-frame {
  width: 78%;
  height: 60%;
  overflow: hidden;
  position: relative;
  margin-top: 3%;
}

/* WHO IS DOMERS */

.whois-title {
  position: absolute;
  left: 35%;
  bottom: 2.2%;
  transform: translateX(-50%);
  width: 1000px;
  height: 500px;
  object-fit: contain;
  opacity: 0;
}

.whois-title.whois-play {
  animation: whois-fade 2s ease-out forwards;
}

@keyframes whois-fade {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}

/* TEXT */

.tv-text {
  position: absolute;
  top: 14%;
  left: 5%;
  right: 15%;
  font-size: 41px;
  line-height: 1.25;
  color: #000;
  opacity: 0;
  transform: translateY(20px);
}

.tv-text.show { animation: tv-text-in 0.6s ease-out forwards; }
.tv-text.hide { animation: tv-text-out 0.6s ease-in forwards; }

@keyframes tv-text-in {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes tv-text-out {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* =========================
   LOWER BARTS
========================= */

.tv-barts-row {
  position: absolute;
  bottom: 10%;
  left: 75%;
  transform: translateX(-50%);
  display: flex;
  gap: 26px;
  align-items: flex-end;
}

.tv-bart-wrapper {
  opacity: 0;
  transform: translateY(40px);
}

.tv-bart-image {
  width: calc(209px / 3);
  height: calc(508px / 3);
}

.tv-bart-red .tv-bart-image {
  width: 70px;
  height: calc(700px / 3); /* сохранён твоё значение */
}

.tv-bart-red {
  margin-left: -14px;
}

@keyframes tv-bart-appear {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  60% { opacity: 1; transform: translateY(-8px) scale(1.03); }
  100% { opacity: 1; transform: translateY(0); }
}

/* =========================
   FOOTER (ДВИГАЕТСЯ ЧЕРЕЗ ПЕРЕМЕННЫЕ)
========================= */

.domers-footer {
  position: relative;
  margin-top: var(--footer-y);
  left: calc(50% + var(--footer-x));
  transform: translateX(-50%);

  width: 1200px;
  height: 110px;

  background-image: url("footer.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-inner {
  width: 100%;
  height: 100%;
  position: relative;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* CA */

.ca-wrapper {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 30px;                 /* твой размер */
  font-family: "Kirang Haerang";   /* твой шрифт */
  color: #ffeb3b;                  /* жёлтый */
  display: flex;
  gap: 16px;
}

.ca-wrapper.hidden {
  opacity: 0;
  pointer-events: none;
}

.ca-value {
  background: none;
  border: none;
  padding: 0;
  font-family: "Kirang Haerang";  /* такой же шрифт */
  font-size: 20px;                /* такой же размер */
  color: #ffeb3b;                 /* жёлтый */
  cursor: pointer;
  text-shadow: 0 4px 0 rgba(0,0,0,0.4);
}

/* Icons */

.footer-icons {
  position: absolute;
  right: 4%;
  display: flex;
  gap: 14px;
}

.footer-icon-btn {
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0,0,0,0.7);
  border-radius: 999px;
  transition: transform 0.08s, box-shadow 0.08s;
}

.footer-icon-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-icon-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(0,0,0,0.9);
}

.footer-icon-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.7);
}

.footer-icon-btn.disabled {
  filter: grayscale(1) brightness(0.5);
  pointer-events: none;
  box-shadow: none;
}

/* =========================
   TOAST
========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.9);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 20px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 20;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
