/* ============================================================
   SECTIONS: Контентные слои, карточки, диалоговый блок
============================================================ */

.content-scroll-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  z-index: 5;
  scrollbar-width: none;
}

.content-scroll-container::-webkit-scrollbar {
  display: none;
}

.panel-section {
  position: relative;
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  padding: 0 80px 0 calc(var(--char-w) * 8);
  pointer-events: none; /* Пропускаем клики на канвас сквозь пустые места */
}

/* Разрешаем клики внутри интерактивных блоков */
.hero-left-anchor,
.section-card,
.dialogue-wrapper,
.hero-bottom-hint {
  pointer-events: auto;
}

/* --- HERO --- */
.hero-section {
  justify-content: flex-start;
}

.hero-left-anchor {
  max-width: 520px;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.brand-quote {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: calc(var(--char-h) * 1.4);
  color: var(--text-dim);
}

.hero-bottom-hint {
  position: absolute;
  bottom: 14px;
  left: 24px;
  font-size: 11px;
  color: #4f5860;
  user-select: none;
}

/* --- КАРТОЧКИ (Кто мы, Что делаем, Контакты) --- */
.section-card {
  width: 100%;
  max-width: 640px;
  background: var(--bg-panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--bg-panel-border);
  padding: calc(var(--char-h) * 2) calc(var(--char-w) * 3);
  position: relative;
}

.section-badge {
  font-size: 10px;
  color: #5b656d;
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.section-headline {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 18px;
}

.section-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: calc(var(--char-h) * 1.3);
  color: var(--text-main);
}

.section-footnote {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed var(--bg-panel-border);
  font-size: 11px;
  color: var(--text-dim);
}

.section-principle {
  margin-top: 20px;
  display: inline-block;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 2px solid var(--text-dim);
  font-size: 12px;
}

/* --- ДИАЛОГОВЫЙ БЛОК --- */
.dialogue-section {
  justify-content: center;
  padding-right: calc(var(--char-w) * 8);
}

.dialogue-wrapper {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.input-container {
  position: relative;
  width: 100%;
  border: 1px solid var(--bg-panel-border);
  background: var(--bg-panel);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-container:focus-within {
  border-color: var(--bg-panel-border-bright);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

.prime-input {
  width: 100%;
  height: 64px;
  padding: 0 20px;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text-bright);
}

.prime-input::placeholder {
  color: var(--text-dim);
  opacity: 0.6;
}

.input-corner-tl,
.input-corner-br {
  position: absolute;
  width: 6px;
  height: 6px;
  pointer-events: none;
}

.input-corner-tl {
  top: -1px; left: -1px;
  border-top: 1px solid var(--text-bright);
  border-left: 1px solid var(--text-bright);
}

.input-corner-br {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--text-bright);
  border-right: 1px solid var(--text-bright);
}

.dialogue-window {
  width: 100%;
  height: 360px;
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--bg-panel-border);
  border-bottom: none;
  display: flex;
  flex-direction: column;
}

.dialogue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--bg-panel-border);
  font-size: 10px;
  color: var(--text-dim);
}

.dialogue-close {
  color: var(--text-dim);
}

.dialogue-close:hover {
  color: var(--text-bright);
}

.dialogue-feed {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
}

.msg {
  max-width: 85%;
  line-height: calc(var(--char-h) * 1.3);
}

.msg-user {
  align-self: flex-end;
  color: var(--text-bright);
  border-right: 2px solid var(--text-bright);
  padding-right: 8px;
  text-align: right;
}

.msg-system {
  align-self: flex-start;
  color: var(--text-main);
  border-left: 2px solid #5b656d;
  padding-left: 8px;
}

.dialogue-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chip-btn {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-panel-border);
  color: var(--text-dim);
  border-radius: 2px;
}

.chip-btn:hover {
  color: var(--text-bright);
  border-color: var(--bg-panel-border-bright);
}

/* --- КОНТАКТЫ --- */
.contact-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--bg-panel-border);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.contact-btn:hover {
  border-color: var(--bg-panel-border-bright);
  background: rgba(255, 255, 255, 0.06);
}

.btn-meta {
  font-size: 10px;
  color: #5b656d;
}

.btn-label {
  font-size: 13px;
  color: var(--text-bright);
}

.contacts-footer {
  margin-top: 18px;
  font-size: 11px;
}

.mono-dim {
  color: #5b656d;
}

/* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
@media (max-width: 768px) {
  .panel-section {
    padding: 0 20px;
  }
  .side-nav {
    display: none;
  }
  .contact-links-grid {
    grid-template-columns: 1fr;
  }
  .dialogue-window {
    height: 280px;
  }
}
