/* =========================
   BASE
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: "Kavoon", system-ui, sans-serif;
  background: #d0d0d0;
  color: #000;
  overflow-x: hidden;
}

/* =========================
   SECTIONS 1920×1080
========================= */

.section {
  position: relative;
  width: 1920px;
  height: 1080px;
  margin: 0 auto;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  background: url("bg_normie.png") center center no-repeat;
  background-size: 1920px 1080px;
  z-index: 0;
}

/* =========================
   TOP HEADER
========================= */

.top-header {
  position: absolute;
  top: 30px;
  left: 60px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 10;
}

.logo-title {
  font-size: 69px;
}

.logo-image {
  width: 85px;
  height: auto;
  display: block;
}

/* =========================
   RAINBOWS — HIGH QUALITY
========================= */

.rainbow {
  position: absolute;
  pointer-events: none;
  z-index: 1;

  /* отображаемый размер, исходник больше (4000×2000) */
  width: 1920px;
  height: auto;
}

/* Верхняя радуга */
.rainbow-top {
  left: 50%;
  bottom: 160px;
  transform: translateX(-50%);
}

/* Нижняя радуга */
.rainbow-bottom {
  left: 50%;
  top: 0px;
  width: 1920px;
  height: auto;
  transform: translateX(-50%) rotate(180deg);
  z-index: 1;
}

/* =========================
   MAIN CHARACTER
========================= */

.normie-character {
  position: absolute;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%);
  width: 553px;
  height: auto;
  z-index: 2;
}

/* =========================
   FLOATING TEXTS
========================= */

.floating-text-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.floating-text {
  position: absolute;
  font-family: "Kavoon", sans-serif;
  font-size: 26px;
  white-space: nowrap;
  opacity: 0;
  color: #000;
  animation:
    floatTextFade 4.2s ease-in-out forwards,
    floatTextJitter 0.18s linear infinite;
}

/* Плавное появление/исчезновение (одна надпись за цикл) */
@keyframes floatTextFade {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Судорожное дрожание */
@keyframes floatTextJitter {
  0%   { transform: translate(-50%, -50%) translate(0px, 0px) rotate(0deg); }
  20%  { transform: translate(-50%, -50%) translate(2px, -3px) rotate(-5deg); }
  40%  { transform: translate(-50%, -50%) translate(-3px, 2px) rotate(4deg); }
  60%  { transform: translate(-50%, -50%) translate(3px, 3px) rotate(-6deg); }
  80%  { transform: translate(-50%, -50%) translate(-2px, -2px) rotate(3deg); }
  100% { transform: translate(-50%, -50%) translate(0px, 0px) rotate(-2deg); }
}

/* =========================
   SCROLL ARROW
========================= */

.scroll-arrow {
  position: absolute;
  width: 80px;
  height: 80px;
  right: 470px;
  bottom: 150px;
  border: none;
  background: none;
  cursor: pointer;
  z-index: 4;
  animation: arrowBounce 1.4s ease-in-out infinite;
}

.scroll-arrow img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes arrowBounce {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}

/* =========================
   SECOND SECTION
========================= */

.who-title {
  position: absolute;
  top: 0px;
  left: 400px;
  font-size: 48px;
  opacity: 0;
  transform: translateY(-15px);
  transition: opacity .8s ease, transform .8s ease;
  z-index: 3;
}

.who-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.who-text-wrapper {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: 1340px;
  text-align: center;
  z-index: 3;
}

.normie-text {
  font-size: 23px;
  line-height: 1.4;
  white-space: pre-line;
}

/* =========================
   PHOTO + CAPTION
========================= */

.normies-row {
  position: absolute;
  top: 400px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 260px;
  display: flex;
  gap: 80px;
  justify-content: center;
  align-items: center;
  z-index: 3;
}

.normies-photo {
  width: 306px;
  height: auto;
  opacity: 0;
  transform: translateY(20px);
  transition: .8s ease;
}

.normies-caption {
  max-width: 420px;
  opacity: 0;
  transform: translateY(20px);
  transition: .8s ease;
}

.normies-row.visible .normies-photo,
.normies-row.visible .normies-caption {
  opacity: 1;
  transform: translateY(0);
}

.normies-title {
  font-size: 33px;
  margin-bottom: 8px;
}

.normies-subtitle {
  font-size: 16px;
}

/* =========================
   FOOTER 1920×108
========================= */

.footer {
  position: absolute;
  width: 1920px;
  height: 108px;
  left: 50%;
  bottom: -11px;
  transform: translateX(-50%);
  z-index: 4;
}

.footer-bg {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 108px;
  object-fit: fill;
}

.contract-display {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  font-size: 33px;
  cursor: pointer;
  display: none;
}

/* =========================
   FOOTER ICONS (без фона + глубина)
========================= */

.footer-icons {
  position: absolute;
  right: 40px;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 5;
}

.footer-icon {
  width: 50px;
  height: 50px;
  cursor: pointer;
  border: none;
  padding: 0;
  background: none;
  outline: none;
}

.footer-icon-twitter {
  width: 87px;
  height: 54px;
}

.footer-icon-small {
  width: 55px;
  height: 59px;
  cursor: default;
}

/* сами изображения — без белых квадратов, только картинка */
.footer-icon img,
.footer-icon-twitter img,
.footer-icon-small img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.12s ease-out, filter 0.12s ease-out;
}

/* эффект объёма при наведение (кроме маленького маскота) */
.footer-icon:not(.footer-icon-small):hover img,
.footer-icon-twitter:hover img {
  transform: translateY(-3px);
  filter: drop-shadow(0 6px 0 rgba(0,0,0,0.55));
}

/* эффект клика глубины */
.footer-icon:not(.footer-icon-small):active img,
.footer-icon-twitter:active img {
  transform: translateY(1px);
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.65));
}

/* у маленького персонажа — без ховера */
.footer-icon-small:hover img,
.footer-icon-small:active img {
  transform: none;
  filter: none;
}

/* =========================
   TOAST
========================= */

#toastContainer {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 999;
}

.toast {
  padding: 14px 32px;
  background: rgba(255,255,255,0.96);
  border: 3px solid #000;
  font-family: "Kavoon", sans-serif;
  font-size: 40px;
  animation: toastFade 1.4s ease-out forwards;
}

@keyframes toastFade {
  0%   { opacity: 0; transform: scale(0.9); }
  10%  { opacity: 1; transform: scale(1); }
  80%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.95); }
}
