:root {
  --bg: #0a0705;
  --text: #f4ece3;
  --accent: #ff8c00;
  --accent-light: #ffb347;
  --on-accent: #170b02;
  --smooth: cubic-bezier(.4, 0, .2, 1);
  --soft-out: cubic-bezier(.22, 1, .36, 1);
}

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

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, system-ui, sans-serif;
  line-height: 1.5;
  /* текст «вшит»: не выделяется мышью и по Ctrl+A, на телефоне нет подсветки нажатия */
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  cursor: default;
}

/* Живой фон: пятна плывут и перетекают друг в друга.
   Двигаются только transform и opacity, поэтому анимация лёгкая для видеокарты. */
.backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  width: 78vmax;
  height: 78vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tone), transparent);
  animation: var(--path) var(--speed) ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.blob-1 {
  --tone: rgba(255, 140, 0, .24);
  --path: drift-a;
  --speed: 11s;
  top: -42vmax;
  left: 38%;
}

.blob-2 {
  --tone: rgba(179, 71, 0, .3);
  --path: drift-b;
  --speed: 14s;
  bottom: -46vmax;
  left: -18vmax;
}

.blob-3 {
  --tone: rgba(255, 179, 71, .13);
  --path: drift-c;
  --speed: 9s;
  top: -20vmax;
  left: -30vmax;
}

.blob-4 {
  --tone: rgba(224, 82, 0, .2);
  --path: drift-d;
  --speed: 17s;
  right: -38vmax;
  bottom: -34vmax;
}

@keyframes drift-a {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  50% { transform: translate(-28vw, 24vh) scale(1.18); opacity: .65; }
  100% { transform: translate(-48vw, 8vh) scale(.9); opacity: .95; }
}

@keyframes drift-b {
  0% { transform: translate(0, 0) scale(.95); opacity: .8; }
  50% { transform: translate(30vw, -22vh) scale(1.2); opacity: 1; }
  100% { transform: translate(52vw, -6vh) scale(1); opacity: .6; }
}

@keyframes drift-c {
  0% { transform: translate(0, 0) scale(.85); opacity: .35; }
  50% { transform: translate(34vw, 30vh) scale(1.15); opacity: 1; }
  100% { transform: translate(12vw, 52vh) scale(1); opacity: .5; }
}

@keyframes drift-d {
  0% { transform: translate(0, 0) scale(1.1); opacity: .6; }
  50% { transform: translate(-26vw, -34vh) scale(.85); opacity: 1; }
  100% { transform: translate(-50vw, -12vh) scale(1.2); opacity: .45; }
}

.card {
  position: relative;
  width: min(560px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: clamp(20px, 5vw, 36px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 32px;
  /* без backdrop-filter: фон и так мягкий, а размытие пересчитывалось бы каждый кадр */
  background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .05) 55%, rgba(255, 255, 255, .08));
  box-shadow: 0 40px 90px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .18);
}

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1 {
  font-size: 60px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.03em;
}

.role {
  font-size: 17px;
  font-weight: 500;
  color: var(--accent-light);
}

.bubble {
  width: 108px;
  height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-light), var(--accent) 55%, #e06a00);
  color: var(--on-accent);
  box-shadow: 0 16px 34px rgba(255, 120, 0, .35);
}

.bubble strong {
  font-size: 28px;
  line-height: 1.1;
}

.bubble span {
  font-size: 12px;
  font-weight: 600;
}

.tabs {
  --count: 4;
  --index: 0;
  --space: 4px;
  --inset: 6px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--count), minmax(0, 1fr));
  gap: var(--space);
  padding: var(--inset);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* Стеклянная подсветка, переезжающая под выбранную вкладку */
.glider {
  position: absolute;
  top: var(--inset);
  bottom: var(--inset);
  left: var(--inset);
  width: calc((100% - 2 * var(--inset) - (var(--count) - 1) * var(--space)) / var(--count));
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(255, 179, 71, .96), rgba(255, 140, 0, .9) 55%, rgba(232, 113, 10, .92));
  box-shadow: 0 8px 22px rgba(255, 140, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -6px 12px rgba(179, 71, 0, .35);
  transform: translateX(calc(var(--index) * (100% + var(--space))));
  transition: transform .5s var(--smooth);
  will-change: transform;
}

.tabs button {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #e6d9cc;
  font: 600 14px Poppins, system-ui, sans-serif;
  cursor: pointer;
  transition: color .5s var(--smooth), transform .25s var(--soft-out);
}

/* матовое стекло при наведении: только плавно проявляется и гаснет */
.tabs button::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  opacity: 0;
  transform: scale(.94);
  transition: opacity .35s var(--smooth), transform .35s var(--soft-out);
  pointer-events: none;
}

.tabs button[aria-pressed="false"]:hover {
  color: #fff;
}

.tabs button[aria-pressed="false"]:hover::before {
  opacity: 1;
  transform: scale(1);
}

.tabs button:active {
  transform: scale(.96);
}

.tabs button[aria-pressed="true"] {
  color: var(--on-accent);
}

/* списки занимают одну ячейку сетки: высота не прыгает, а смена идёт без паузы */
.terminal {
  display: grid;
  min-height: 172px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  background: rgba(10, 6, 3, .64);
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 14px;
}

.panel {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .3s var(--smooth), transform .5s var(--soft-out), visibility 0s .3s;
}

.panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity .45s var(--smooth) .1s, transform .55s var(--soft-out) .1s, visibility 0s;
}

.prompt {
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  list-style: none;
}

.chips li {
  padding: 8px 16px;
  border: 1px solid rgba(255, 179, 71, .45);
  border-radius: 999px;
  color: var(--accent-light);
  font-weight: 700;
}

.telegram {
  position: relative;
  overflow: hidden;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffa326, var(--accent) 55%, #ee7d00);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-drag: none;
  box-shadow: 0 12px 28px rgba(255, 140, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .45s var(--soft-out), box-shadow .45s var(--smooth);
}

.telegram:hover {
  color: var(--on-accent);
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(255, 140, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .65);
}

.telegram:active {
  transform: translateY(0) scale(.98);
}

/* Блик на стекле. Когда курсор уходит, он сначала гаснет и только потом возвращается назад */
.telegram::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 55%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .42), transparent);
  opacity: 0;
  transform: translateX(-130%) skewX(-18deg);
  transition: opacity .3s var(--smooth), transform 0s .3s;
  pointer-events: none;
}

.telegram:hover::after,
.telegram:focus-visible::after {
  opacity: 1;
  transform: translateX(260%) skewX(-18deg);
  transition: opacity .2s var(--smooth), transform .9s var(--smooth);
}

.telegram:focus-visible,
.tabs button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .head {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .bubble {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
  }

  .bubble strong {
    font-size: 24px;
  }

  .bubble span {
    font-size: 11px;
  }

  .tabs button {
    font-size: 12px;
  }

  .terminal {
    padding: 18px;
  }
}

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

  .glider,
  .panel,
  .panel.is-active,
  .telegram,
  .tabs button,
  .tabs button::before {
    transition: none;
  }

  .telegram::after {
    display: none;
  }
}
