/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --pad-top: 100px;
  --pad-x: 20px;
  --pad-bottom: 24px;
}

html, body {
  height: 100%;
  background: radial-gradient(ellipse at center, #000 0%, #0a0a0a 100%);
  font-family: Arial, sans-serif;
  color: #fff;
}

/* Desktop: lock page scroll; Mobile: allow */
@media (min-width: 769px) { html, body { overflow: hidden; } }
@media (max-width: 768px) { html, body { overflow: auto; } }

/* ===== BACKGROUND CANVASES ===== */
canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; pointer-events: none; }
#background-canvas { z-index: 0; }
#ripples { z-index: 1; }
#trail { z-index: 2; }

/* ===== LAYOUT ===== */
.logo { position: absolute; top: 20px; left: 20px; width: 120px; z-index: 10; }

.container {
  position: relative;
  z-index: 10;
  height: 100vh;                  /* ключ: фиксируем высоту контейнера */
  padding: var(--pad-top) var(--pad-x) var(--pad-bottom);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

h1 { font-size: 36px; line-height: 1.3; text-shadow: 0 0 10px #00f6ff, 0 0 20px #00f6ff; }

/* area under the header uses remaining height */
.content-wrapper {
  display: flex;
  gap: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  flex: 1;            /* занимает всё доступное место под заголовком */
  min-height: 0;      /* критично: разрешаем сжиматься для внутреннего скролла */
  align-items: stretch; /* ключ: растягиваем колонки по высоте */
  justify-content: center;
}

/* Left column */
.left-block {
  flex: 1 1 55%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.banner {
  width: 100%;
  max-width: 600px;
  border-radius: 20px;
  overflow: hidden;
  animation: floatBanner 6s ease-in-out infinite;
}
.banner img { width: 100%; height: auto; display: block; }

.buttons { display: flex; gap: 20px; margin-top: 25px; flex-wrap: wrap; justify-content: center; }
.btn {
  padding: 12px 30px; font-size: 16px;
  border: 2px solid #00f6ff; color: #00f6ff;
  background: transparent; border-radius: 30px;
  cursor: pointer; transition: 0.3s; text-decoration: none;
}
.btn:hover { background: #00f6ff; color: #000; box-shadow: 0 0 15px #00f6ff, 0 0 30px #00f6ff; animation: flicker .15s infinite alternate, shake .2s infinite; }

/* Right column with inner scroll */
.right-block {
  flex: 1 1 45%;
  min-width: 260px; max-width: 520px;
  display: flex; flex-direction: column;
  min-height: 0;                    /* критично */
}

.scroll-text {
  flex: 1;
  min-height: 0;                    /* критично */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 12px;
  text-align: left;
  border-radius: 14px;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  box-shadow: inset 0 0 0 1px rgba(0,246,255,0.15);
}

/* Typography */
.marketing-copy { font-size: 18px; line-height: 1.65; padding: 16px 18px; display: grid; gap: 14px; }
.marketing-copy h2 { font-size: 22px; line-height: 1.35; margin-top: 6px; text-shadow: 0 0 8px rgba(0,246,255,0.35); }

/* Animations */
@keyframes floatBanner { 0% {transform: translateY(0)} 50% {transform: translateY(-10px)} 100% {transform: translateY(0)} }
@keyframes flicker { 0% {opacity:1} 100% {opacity:.7} }
@keyframes shake { 0% {transform: translate(0)} 50% {transform: translate(1px,-1px)} 100% {transform: translate(-1px,1px)} }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .content-wrapper { gap: 28px; }
  .right-block { max-width: 480px; }
}

@media (max-width: 768px) {
  .logo { width: 70px; top: 5px; left: 8px; }
  h1 { font-size: 24px; }

  .content-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }

  /* On mobile, allow page to scroll normally; disable inner scroll */
  .scroll-text { overflow: visible; max-height: none; padding-right: 0; }

  .buttons { flex-direction: column; gap: 15px; margin-top: 20px; }
  .btn { width: 200px; padding: 14px; font-size: 16px; }
  .banner { max-width: 90vw; }
}
