:root {
  --bg: #eef2f8;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --blue: #2f80ed;
  --green: #8ab775;
  --bubble: #ffffff;
  --telegram-bg: #dfead6;
  --line: #d9e1ee;
  --shadow: 0 24px 80px rgba(16, 24, 40, .16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(74, 144, 255, .16), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(138, 183, 117, .18), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eef2f8 55%, #e9eef7 100%);
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.page-shell {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 52px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 26px;
}

.hero__badge {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  box-shadow: 0 12px 40px rgba(47, 128, 237, .12);
}

.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(42px, 5vw, 76px);
  line-height: .98;
  letter-spacing: -2.5px;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.hero__actions,
.toolbar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-btn,
.ghost-btn,
.toolbar-buttons button {
  border-radius: 16px;
  padding: 13px 18px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #2f80ed, #56ccf2);
  box-shadow: 0 14px 36px rgba(47, 128, 237, .28);
}

.ghost-btn,
.toolbar-buttons button {
  color: #1d2939;
  background: #fff;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .08);
}

.primary-btn:hover,
.ghost-btn:hover,
.toolbar-buttons button:hover {
  transform: translateY(-2px);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px;
}

.hero__stats span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .75);
  color: #475467;
  font-weight: 700;
  box-shadow: 0 12px 40px rgba(16, 24, 40, .08);
  backdrop-filter: blur(10px);
}

.demo-panel {
  padding: 24px;
  border: 1px solid rgba(217, 225, 238, .85);
  border-radius: 34px;
  background: rgba(255, 255, 255, .66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.demo-toolbar h2,
.project-info h2 {
  margin: 0 0 7px;
  font-size: 28px;
}

.demo-toolbar p,
.project-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.phones-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 28px;
  align-items: start;
}

.phone-card {
  display: grid;
  place-items: center;
  gap: 14px;
}

.phone-title {
  width: min(410px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-weight: 700;
}

.phone-title small {
  color: var(--muted);
  font-weight: 400;
}

.phone {
  width: min(410px, 100%);
  aspect-ratio: 390 / 790;
  padding: 12px;
  border-radius: 56px;
  background: linear-gradient(145deg, #090b10, #22252d 42%, #07080b 100%);
  box-shadow: 0 30px 90px rgba(12, 17, 29, .28);
}

.phone__frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 44px;
  background: var(--telegram-bg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.phone__frame::before {
  content: "";
  position: absolute;
  z-index: 20;
  top: 7px;
  left: 50%;
  width: 120px;
  height: 28px;
  border-radius: 18px;
  transform: translateX(-50%);
  background: #08090b;
}

.phone__status {
  position: relative;
  z-index: 2;
  height: 38px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0 26px 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
}

.telegram-head {
  position: relative;
  z-index: 2;
  height: 62px;
  display: grid;
  grid-template-columns: 85px 1fr 48px;
  align-items: center;
  padding: 0 14px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.telegram-head .back {
  color: #2f80ed;
  font-size: 15px;
  font-weight: 700;
}

.telegram-head div {
  text-align: center;
  line-height: 1.05;
}

.telegram-head small {
  display: block;
  margin-top: 4px;
  color: #98a2b3;
  font-size: 11px;
}

.tg-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: auto;
  border-radius: 50%;
  background: #53a8eb;
  color: #fff;
  font-size: 15px;
}

.chat {
  height: calc(100% - 50px - 90px - 160px);
  padding: 15px 12px 12px;
  overflow: auto;
  background:
    radial-gradient(circle at 20px 20px, rgba(91, 121, 77, .11) 0 6px, transparent 7px) 0 0 / 58px 58px,
    radial-gradient(circle at 46px 44px, rgba(91, 121, 77, .08) 0 5px, transparent 6px) 0 0 / 64px 64px,
    var(--telegram-bg);
  scrollbar-width: thin;
}

.message {
  width: fit-content;
  max-width: 86%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 17px;
  color: #2b2b2b;
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 24, 40, .08);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-line;
  animation: pop .22s ease both;
}

.message strong { font-weight: 700; }
.message .time {
  display: inline-block;
  margin-left: 8px;
  color: #98a2b3;
  font-size: 10px;
}

.message--out {
  margin-left: auto;
  background: #cce7c3;
}

.message--system {
  margin-inline: auto;
  padding: 5px 12px;
  border-radius: 999px;
  color: #667085;
  background: rgba(255, 255, 255, .72);
  font-size: 12px;
}

.inline-buttons {
  display: grid;
  gap: 8px;
  margin: 5px 0 12px;
  animation: pop .22s ease both;
}

.inline-buttons--grid {
  grid-template-columns: repeat(3, 1fr);
}

.inline-buttons button,
.reply-keyboard button {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #334155;
  background: #f3f4f6;
  font-weight: 700;
  font-size: 13px;
}

.inline-buttons .green {
  color: #fff;
  background: #8ab775;
}

.calendar-card {
  width: 100%;
  max-width: 310px;
  margin: 4px 0 12px;
  padding: 13px 12px 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 2px 7px rgba(16, 24, 40, .08);
  animation: pop .22s ease both;
}

.calendar-card__month {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #303030;
  font-size: 15px;
  font-weight: 700;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  text-align: center;
}

.calendar-grid span,
.calendar-grid button {
  display: grid;
  place-items: center;
  min-height: 27px;
  border-radius: 999px;
  color: #262626;
  background: transparent;
  font-size: 13px;
}

.calendar-grid .weekday {
  color: #494949;
  font-size: 11px;
  font-weight: 700;
}

.calendar-grid .muted { color: #b8b8b8; }
.calendar-grid button:hover { background: #eaf3ff; }
.calendar-grid .selected {
  color: #fff;
  background: #2f80ed;
  font-weight: 700;
}

.reply-keyboard {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 54px;
  min-height: 106px;
  display: grid;
  gap: 7px;
  padding: 10px 12px;
  background: rgba(255,255,255,.9);
  border-top: 1px solid #e5e7eb;
}

.reply-keyboard .row {
  display: grid;
  gap: 7px;
}
.reply-keyboard .row--2 { grid-template-columns: repeat(2, 1fr); }
.reply-keyboard .row--1 { grid-template-columns: 1fr; }

.compose-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  display: grid;
  grid-template-columns: 34px 34px 1fr 34px;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  color: #8a8f98;
}

.compose-bar em {
  padding: 10px 14px;
  border: 1px solid #d9d9dc;
  border-radius: 999px;
  color: #b2b2b8;
  font-style: normal;
  font-size: 14px;
}

.project-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 26px;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(217,225,238,.85);
}

.project-info ul {
  margin: 0;
  padding-left: 20px;
  color: #475467;
  line-height: 1.75;
}

@keyframes pop {
  from { transform: translateY(6px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 980px) {
  .hero,
  .demo-toolbar,
  .project-info {
    grid-template-columns: 1fr;
  }
  .phones-grid {
    grid-template-columns: 1fr;
  }
  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .page-shell { width: min(100% - 16px, 1500px); padding-top: 18px; }
  .demo-panel { padding: 14px; border-radius: 24px; }
  .hero h1 { letter-spacing: -1.4px; }
  .hero__stats { grid-template-columns: 1fr; }
  .phone { width: 100%; border-radius: 44px; padding: 9px; }
  .phone__frame { border-radius: 36px; }
}
