/* ==========================================================================
   Base
   ========================================================================== */

::selection {
  background: rgba(0, 240, 255, 0.25);
  color: #E2E8F0;
}

:focus-visible {
  outline: 2px solid #00F0FF;
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #12141C;
  color: #E2E8F0;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.skip-link:focus {
  left: 0;
}
/* ==========================================================================
   Text Overflow Protection
   ========================================================================== */

h1, h2, h3, h4, p, span {
  overflow-wrap: break-word;
}
/* ==========================================================================
   Background grid (subtle, non-decorative noise-free texture)
   ========================================================================== */

.hero-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 100%);
}

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Pulse dot (hero badge)
   ========================================================================== */

.pulse-dot {
  box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.5);
  animation: pulse-dot 2.4s ease-out infinite;
}

@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.45); }
  70%  { box-shadow: 0 0 0 8px rgba(0, 240, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-dot { animation: none; }
}

/* ==========================================================================
   Hero workflow visual
   ========================================================================== */

.workflow-node {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0C0E15;
}

.workflow-node--accent {
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.06);
}

.workflow-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: #94A3B8;
}

.workflow-icon--accent {
  background: rgba(0, 240, 255, 0.12);
  color: #00F0FF;
}

.workflow-line {
  position: relative;
  height: 22px;
  margin-left: 15px;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.workflow-pulse {
  position: absolute;
  left: -2.5px;
  top: -4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00F0FF;
  box-shadow: 0 0 6px rgba(0, 240, 255, 0.8);
  animation: workflow-travel 2.4s ease-in-out infinite;
}

@keyframes workflow-travel {
  0%   { transform: translateY(0); opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateY(22px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .workflow-pulse { animation: none; opacity: 0.6; }
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background: #12141C;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.75rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 240, 255, 0.08);
  color: #00F0FF;
}

/* ==========================================================================
   Tags / labels
   ========================================================================== */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  color: #94A3B8;
  background: rgba(255, 255, 255, 0.02);
}

.tag--mono {
  font-family: 'JetBrains Mono', monospace;
}

.section-label {
  font-size: 0.8rem;
  color: #94A3B8;
  font-weight: 500;
}

.feature-item {
  position: relative;
  padding-left: 1.1rem;
}

.feature-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00F0FF;
}

/* ==========================================================================
   Architecture diagram nodes
   ========================================================================== */

.arch-node {
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #12141C;
  white-space: normal;
  word-break: break-word;
}

.arch-node--accent {
  border-color: rgba(0, 240, 255, 0.35);
  color: #00F0FF;
}

/* ==========================================================================
   Chat mockup
   ========================================================================== */

.chat-bubble {
  max-width: 85%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  line-height: 1.4;
}

.chat-bubble--in {
  background: #171A24;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #E2E8F0;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.chat-bubble--out {
  background: rgba(0, 240, 255, 0.07);
  border: 1px solid rgba(0, 240, 255, 0.15);
  color: #E2E8F0;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-bubble--success {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
  color: #10B981;
}

/* ==========================================================================
   BANT cards
   ========================================================================== */

.bant-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0C0E15;
  font-size: 0.9rem;
  min-width: 0;
}
/* Добавляем перенос текста внутри карточки BANT */
.bant-card span,
.bant-card p,
.bant-card div {
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
/* ==========================================================================
   End-to-end diagram nodes
   ========================================================================== */

.e2e-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.1rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0C0E15;
  font-size: 0.85rem;
  color: #94A3B8;
  min-height: 96px;
}

.e2e-node--accent {
  border-color: rgba(0, 240, 255, 0.35);
  color: #00F0FF;
  background: rgba(0, 240, 255, 0.05);
}

.e2e-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
  flex-shrink: 0;
}

/* ==========================================================================
   Process steps
   ========================================================================== */

.step {
  padding: 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #12141C;
  position: relative;
}

.step-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: #00F0FF;
}

/* connecting line between steps on desktop */
@media (min-width: 1024px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2.15rem;
    right: -1.05rem;
    width: 1rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
  }
}

/* ==========================================================================
   Tech stack cards
   ========================================================================== */

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #12141C;
  font-size: 0.85rem;
  text-align: center;
  transition: border-color 0.25s ease;
}

.tech-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
}

/* ==========================================================================
   Final CTA block
   ========================================================================== */

.cta-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 3rem 2rem;
  border-radius: 20px;
  border: 1px solid rgba(0, 240, 255, 0.18);
  background:
    radial-gradient(ellipse 60% 100% at 100% 0%, rgba(0, 240, 255, 0.08), transparent 60%),
    #12141C;
}

@media (min-width: 640px) {
  .cta-block { padding: 4rem; }
}
