:root{
  --wine: #2a1015;
  --wine-dark: #160809;
  --paper: #ecdfc0;
  --ink: #1c1410;
  --gold: #a9812f;
  --gold-soft: #c9a758;
}

*{ box-sizing: border-box; }

html, body{
  margin: 0;
  padding: 0;
  background: var(--wine-dark);
  font-family: 'Special Elite', monospace;
}

/* ===== ФОН ===== */
.bg{
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  display: flex;             /* добавили */
  align-items: center;       /* центрируем .stage по вертикали */
  justify-content: center;   /* и по горизонтали */
  background: radial-gradient(ellipse at 50% 30%, #3a1620 0%, #200a12 45%, #0d0509 100%);
}


.bg::after{
  content: "";
  position: absolute; inset: 0;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.bg::before{
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.55) 100%);
}

/* ===== СЦЕНА — единый холст с фиксированной пропорцией ===== */
.stage{
  position: relative;
  aspect-ratio: 8 / 5;
  width: min(100%, 1400px, calc(90vh * 8 / 5));  /* ключевая строка */
  margin: 0 auto;
  z-index: 2;
}

.title-scrawl{
  position: absolute;
  top: 12%;
  left: 2%;
  z-index: 3;
  font-family: "Barrio", system-ui;
  font-weight: 400;
  font-size: 70px;
  line-height: 0.9;
  transform: rotate(-15deg);
  pointer-events: none;
  color: #3f0f0f;
text-shadow: 
  1px 1px 0 rgba(0,0,0,0.4),
  -1px -1px 0 rgba(255,255,255,0.15);
}


.rug-wrap{
  position: absolute;
  top: 78%;
  left: 20%;
  width: 55%;      /* 55% * 2.88 → пропорционально низкий, широкий ковёр */
  z-index: 0;
}

.furniture-wrap{
  position: absolute;
  top: 52%;
  left: 24%;
  width: 34%;       /* desk почти квадратный, компактный */
  z-index: 2;
}

.typewriter-wrap{
  position: absolute;
  top: 37%;
  left: 36%;
  width: 20%;
  z-index: 3;
}

.chair-wrap{
  position: absolute;
  top: 42%;
  left: 56%;
  width: 45%;       /* квадратная картинка, ширина = высота визуально */
  z-index: 2;
}

.games-wrap{
  position: absolute;
  top: 67%;
  left: 15%;
  width: 48%;        /* широкий leopard, пропорция 1.75:1 */
  z-index: 4;
}

.painting-wrap{
  position: absolute;
  top: 13%;
  left: 55%;
  width: 19%;
  z-index: 2;
}

.moon-wrap{
  position: absolute;
  top: 1%;
  left: 1%;
  width: 30%;
  z-index: 2;
}

/* ===== Картинки внутри wrap — тянутся на 100% своего wrap ===== */
.moon-img, .painting-img, .typewriter-img,
.desk-img, .chair-img, .rug-img, .games-img{
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,0.45));
}

.egg-in-frame{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 45%;
  height: auto;
  z-index: -1;
}

/* ===== Ссылки-обёртки (для tooltip) ===== */
.painting-link,
.typewriter-link,
.chair-link,
.games-link{
  position: relative;
  display: block;
}

/* ===== Hover-эффекты ===== */
.painting-img:hover,
.typewriter-img:hover,
.chair-img:hover,
.games-img:hover{
  transform: scale(1.08);
  filter: drop-shadow(0 14px 20px rgba(0,0,0,0.55));
  transition: transform 0.25s ease, filter 0.25s ease;
}

/* ===== Тултипы ===== */
.tooltip{
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: var(--paper);
  color: var(--ink);
  font-family: "Jim Nightshade", cursive;
  font-size: 1rem;
  letter-spacing: 0.05em;
  padding: 0.4rem 0.8rem;
  white-space: nowrap;
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.painting-link:hover .tooltip,
.typewriter-link:hover .tooltip,
.chair-link:hover .tooltip,
.games-link:hover .tooltip{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
