/* ============ 02 АВТОМАТИЗАЦИЯ И SAAS (terminal, тёмный) ============ */
.terminal {
  position: relative;
  background: #07070a;
  color: var(--text);
  padding: 4.5rem 5vw 5rem;
  border-top: 1px solid rgba(255,255,255,.09);
  overflow: hidden;
}

.terminal::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
  pointer-events: none;
}

/* шапка блока */
.term__head {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: 1rem;
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
}

.term__head span:first-child { color: var(--accent); }
.term__meta { margin-left: auto; opacity: .5; }

/* заголовок */
.term__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.7rem, 4.6vw, 3.8rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin-bottom: 1.4rem;
}

.term__title::before { content: '> '; color: var(--accent); }

.term__accent { color: var(--accent); text-shadow: 0 0 24px rgba(184,255,60,.4); }

.term__cursor { animation: blink 1.1s steps(1) infinite; }

.term__sub {
  max-width: 52ch;
  font-size: .9rem;
  line-height: 1.75;
  color: rgba(232,232,236,.65);
  margin-bottom: 3.5rem;
}

/* сетка: текст + окно терминала */
.term__layout {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
  margin-bottom: 3.5rem;
}

/* чипы направлений */
.term__chips { display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; }

.term__chips li {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 99px;
  padding: .5rem 1rem;
  transition: border-color .25s, color .25s, background .25s;
  cursor: default;
}

.term__chips li:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* окно терминала */
.term-window {
  background: #0c0c12;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}

.term-window__bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem .95rem;
  background: #12121a;
  border-bottom: 1px solid rgba(255,255,255,.12);
  font-size: .7rem;
  letter-spacing: .06em;
  color: rgba(232,232,236,.6);
}

.term-window__dot { width: 9px; height: 9px; border-radius: 50%; background: #2c2c38; }
.term-window__dot--live { background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2s infinite; }

.term-window__path { margin-left: .7rem; }
.term-window__live { margin-left: auto; color: var(--accent); }

.term-window__body {
  padding: 1.2rem 1.1rem;
  font-size: .74rem;
  line-height: 2;
  min-height: 320px;
  color: rgba(232,232,236,.85);
}

.tline {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
  animation: tline-in .35s ease;
}

@keyframes tline-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.tline__time { color: rgba(232,232,236,.38); }
.tline__pid { color: rgba(232,232,236,.55); }
.tline__event { color: var(--accent); font-weight: 700; }
.tline__hex { color: #58ffa5; margin-left: auto; }

/* кейсы */
.term-cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  overflow: hidden;
}

.term-case {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.3rem 1.2rem;
  background: #0c0c12;
  font-size: .8rem;
  line-height: 1.55;
  transition: background .25s;
}

.term-case:hover { background: #12121c; }

.term-case__name {
  font-family: var(--disp);
  font-weight: 600;
  font-size: .95rem;
  color: var(--accent);
}

.term-case__tag {
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(232,232,236,.45);
}

.term-case__arrow { margin-top: auto; font-size: 1rem; }

/* адаптив */
@media (max-width: 960px) {
  .term__layout { grid-template-columns: 1fr; }
  .term-cases { grid-template-columns: 1fr; }
  .tline { font-size: .66rem; gap: .6rem; }
}
