/* ============ БАЗА ============ */
:root {
  --bg-deep: #021b2b;
  --bg-mid: #06344b;
  --ink: #eaf6f8;
  --ink-dim: #9dc0cb;
  --accent: #4fd8c9;
  --accent-2: #6fc3ff;
  --accent-glow: rgba(79, 216, 201, 0.4);
  --card-bg: rgba(6, 42, 60, 0.72);
  --card-border: rgba(120, 210, 220, 0.16);
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  /* меняется скриптом при скролле: 0 → 1 */
  --time: 0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-deep);
  overflow-x: hidden;
  line-height: 1.6;
}

img { display: block; max-width: 100%; }

/* ============ ФОН: толща воды ============ */
.time-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 700px at 50% -10%, rgba(120, 220, 235, 0.22), transparent 60%),
    radial-gradient(900px 600px at 80% 100%, rgba(10, 60, 80, 0.5), transparent 65%),
    linear-gradient(180deg, #0a4c66, var(--bg-mid) 45%, var(--bg-deep));
  /* чем глубже скроллим — тем темнее вода */
  filter: brightness(calc(1 - var(--time) * 0.45));
  transition: filter 0.2s linear;
}

/* лучи света с поверхности, тают с глубиной */
.time-bg::after {
  content: '';
  position: absolute;
  inset: -30% -10% 0;
  background: repeating-linear-gradient(
    100deg,
    transparent 0 6%,
    rgba(190, 240, 250, 0.05) 6% 7.5%,
    transparent 7.5% 15%
  );
  filter: blur(6px);
  opacity: calc(0.9 - var(--time) * 1.2);
  animation: rays 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes rays {
  from { transform: translateX(-3%) skewX(-2deg); }
  to   { transform: translateX(3%) skewX(2deg); }
}

/* камень с именем на дне */
.rock {
  position: fixed;
  left: -44px;
  bottom: -14px;
  width: min(520px, 62vw);
  z-index: -1;
  opacity: 0.9;
  filter: brightness(calc(1 - var(--time) * 0.3));
}
.rock__text {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 5px;
  fill: rgba(160, 215, 225, 0.26);
}

#ocean {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ============ ПРОГРЕСС СКРОЛЛА ============ */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100;
  background: rgba(255, 255, 255, 0.06);
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: calc(var(--time) * 100%);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 64px 24px 48px;
  position: relative;
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  background: linear-gradient(90deg, #fff, var(--accent) 70%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ ДНО: камни-контакты ============ */
.seabed {
  position: relative;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 40px 16px 14px;
}
/* тёмный придонный слой воды */
.seabed::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, rgba(2, 12, 20, 0.85));
  pointer-events: none;
}

.seabed__rocks {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(2px, 3vw, 28px);
  width: 100%;
  max-width: 780px;
}

.rock-link {
  display: block;
  width: clamp(110px, 27vw, 240px);
  transition: filter 0.3s ease, transform 0.3s ease;
}
.rock-link svg { display: block; width: 100%; height: auto; }
.rock-link__text {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 2px;
  fill: rgba(170, 222, 232, 0.5);
  transition: fill 0.3s ease;
}
.rock-link:hover,
.rock-link:focus-visible {
  filter: brightness(1.45) drop-shadow(0 0 18px rgba(79, 216, 201, 0.35));
  transform: translateY(-5px);
  outline: none;
}
.rock-link:hover .rock-link__text { fill: rgba(210, 245, 250, 0.85); }

.footer__note {
  position: relative;
  color: var(--ink-dim);
  font-size: 0.8rem;
  margin-top: 18px;
  opacity: 0.7;
}

/* ============ АДАПТИВ ============ */
@media (max-width: 820px) {

}

/* уважение к reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
