/* ============ База ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --lady-x: 88vw;
  --lady-y: 78vh;
  --lady-rot: -90deg;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Georgia", "Times New Roman", serif;
  background: #0d0b09;
  color: #f4ecd8;
  overflow-x: hidden;
}

/* ============ HUD ============ */
.hud {
  position: fixed;
  top: 16px; left: 16px;
  z-index: 50;
  background: rgba(15, 12, 8, .72);
  border: 1px solid rgba(244, 236, 216, .25);
  border-radius: 14px;
  padding: 12px 16px;
  backdrop-filter: blur(6px);
  min-width: 210px;
  pointer-events: none;
}
.hud__label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; opacity: .6; }
.hud__value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hud__bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.15); margin-top: 8px; overflow: hidden; }
.hud__fill { height: 100%; width: 0%; background: linear-gradient(90deg,#f0d060,#e07b20,#e02020); transition: width .1s linear; }
.hud__layer { margin-top: 8px; font-size: 12px; opacity: .8; font-style: italic; }

/* ============ Божья коровка ============ */
.ladybug {
  position: fixed;
  top: 0; left: 0;
  width: 70px; height: 70px;
  z-index: 60;
  transform: translate3d(calc(var(--lady-x) - 35px), calc(var(--lady-y) - 35px), 0) rotate(var(--lady-rot));
  transition: transform .12s linear;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.55));
  pointer-events: none;
  will-change: transform;
}

/* ============ Титул ============ */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px;
  background:
    radial-gradient(1200px 600px at 50% -10%, #3b6ea5 0%, transparent 60%),
    linear-gradient(180deg, #1b2a4a 0%, #2e4a6b 40%, #7bbf5a 100%);
}
.hero__inner { max-width: 760px; }
.hero h1 { font-size: clamp(30px, 6vw, 62px); line-height: 1.1; text-shadow: 0 4px 24px rgba(0,0,0,.5); }
.hero p { margin-top: 22px; font-size: clamp(15px, 2.2vw, 20px); line-height: 1.6; opacity: .92; }
.hero__hint { margin-top: 34px; font-size: 18px; animation: bounce 1.6s infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0);opacity:.7} 50%{transform:translateY(10px);opacity:1} }

/* ============ Слои ============ */
.stratum {
  position: relative;
  min-height: 92vh;
  padding: 90px 8vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, var(--c1, #999), var(--c2, #555));
  border-top: 3px solid rgba(0,0,0,.35);
  box-shadow: inset 0 30px 60px rgba(0,0,0,.22);
  overflow: hidden;
}
.stratum::after {
  /* текстура породы */
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,.10) 1px, transparent 1.6px),
    radial-gradient(rgba(0,0,0,.14) 1px, transparent 1.6px);
  background-size: 26px 26px, 40px 40px;
  background-position: 0 0, 13px 13px;
  opacity: .6;
  pointer-events: none;
}
.stratum__tag {
  position: relative;
  z-index: 2;
  display: inline-block;
  align-self: flex-start;
  background: rgba(0,0,0,.42);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 15px;
  letter-spacing: .5px;
}
.stratum__tag span {
  font-weight: 700;
  color: #ffd868;
  margin-right: 8px;
}
.stratum__text {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin-top: 20px;
  font-size: clamp(16px, 2.4vw, 22px);
  line-height: 1.6;
  color: #fff8e8;
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}

/* декорации-окаменелости */
.fossil, .crystal, .gold, .lava {
  position: absolute;
  right: 6vw;
  bottom: 8%;
  opacity: .85;
  z-index: 1;
}
.fossil--ammonite {
  width: 130px; height: 130px;
  border-radius: 50%;
  border: 12px double rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 14px rgba(0,0,0,.18);
}
.fossil--bone {
  width: 190px; height: 40px;
  background: #efe6cf;
  border-radius: 20px;
  box-shadow: 0 0 0 6px rgba(0,0,0,.15);
  transform: rotate(-12deg);
}
.fossil--bone::before, .fossil--bone::after {
  content: ""; position: absolute; top: -14px; width: 46px; height: 46px;
  border-radius: 50%; background: #efe6cf;
}
.fossil--bone::before { left: -10px; }
.fossil--bone::after { right: -10px; }
.fossil--plant {
  width: 150px; height: 150px;
  background:
    conic-gradient(from 0deg, rgba(120,200,120,.8), transparent 40%, rgba(120,200,120,.8) 80%, transparent);
  border-radius: 50%;
  filter: blur(.4px);
}
.fossil--trilobite {
  width: 150px; height: 90px;
  background: rgba(230,220,190,.85);
  border-radius: 50% 50% 45% 45%;
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.2);
}
.fossil--trilobite::before {
  content: ""; position: absolute; inset: 12px 22px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 4px, transparent 4px 12px);
  border-radius: 40%;
}
.crystal {
  width: 170px; height: 170px;
  background: linear-gradient(135deg, rgba(220,120,180,.85), rgba(120,80,200,.7));
  clip-path: polygon(50% 0, 90% 35%, 72% 100%, 28% 100%, 10% 35%);
  box-shadow: 0 0 40px rgba(220,120,180,.5);
}
.gold {
  width: 200px; height: 120px;
  background:
    radial-gradient(circle at 30% 40%, #ffe066 0 8px, transparent 9px),
    radial-gradient(circle at 65% 60%, #ffd21f 0 6px, transparent 7px),
    radial-gradient(circle at 45% 75%, #fff2a8 0 5px, transparent 6px),
    radial-gradient(circle at 80% 30%, #ffcf33 0 7px, transparent 8px);
  background-color: transparent;
  filter: drop-shadow(0 0 12px rgba(255,210,40,.9));
}
.lava {
  width: 260px; height: 120px;
  background: radial-gradient(circle at 50% 100%, #ffca28, #ff5722 45%, transparent 75%);
  filter: blur(6px);
  animation: glow 2.4s ease-in-out infinite;
}
@keyframes glow { 0%,100%{opacity:.6} 50%{opacity:1} }

/* ============ Шрек / болото ============ */
.shrek {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #241b33 0%, #33324a 45%, #1d2e1a 100%);
}
.swamp { position: absolute; inset: 0; z-index: 1; }
.swamp__moon {
  position: absolute; top: 8%; right: 14%;
  width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fdf6d8, #d9d2a8);
  box-shadow: 0 0 80px 20px rgba(253,246,216,.35);
}
.swamp__fog {
  position: absolute; left: -20%; width: 140%; height: 220px;
  background: radial-gradient(ellipse at center, rgba(200,230,200,.22), transparent 70%);
  filter: blur(14px);
  animation: drift 18s linear infinite;
}
.swamp__fog--1 { bottom: 18%; }
.swamp__fog--2 { bottom: 4%; animation-duration: 26s; animation-direction: reverse; }
@keyframes drift { from{transform:translateX(-6%)} to{transform:translateX(6%)} }

.shrek__scene {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 6vh;
  text-align: center;
}
.shrek__bubble {
  position: relative;
  background: #f4ecd8;
  color: #25301c;
  border-radius: 18px;
  padding: 12px 20px;
  margin-bottom: 14px;
  font-size: 17px;
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
  animation: float 3s ease-in-out infinite;
}
.shrek__bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%);
  border: 12px solid transparent; border-top-color: #f4ecd8;
}
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
.shrek__svg { filter: drop-shadow(0 20px 30px rgba(0,0,0,.5)); }
.shrek__btn {
  margin-top: 18px;
  color: #f4ecd8;
  text-decoration: none;
  border: 1px solid rgba(244,236,216,.5);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 15px;
  transition: background .2s, color .2s;
}
.shrek__btn:hover { background: #f4ecd8; color: #1d2e1a; }
.shrek__water {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22vh;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(40,80,50,.35), rgba(15,50,30,.95)),
    repeating-linear-gradient(90deg, rgba(120,200,150,.10) 0 18px, transparent 18px 40px);
  animation: ripple 6s ease-in-out infinite;
}
@keyframes ripple { 0%,100%{filter:brightness(1)} 50%{filter:brightness(1.15)} }

.footer {
  background: #0d0b09;
  text-align: center;
  padding: 30px;
  font-size: 14px;
  opacity: .7;
}

@media (max-width: 640px) {
  .hud { transform: scale(.85); transform-origin: top left; }
  .fossil, .crystal, .gold, .lava { right: 4vw; bottom: 4%; opacity: .5; }
  .stratum { padding: 70px 6vw; }
}
