/* poca.im landing — committed dark theme, brand blue from the app logo */

:root {
  --bg: #0a0e17;
  --bg-raise: #0f1524;
  --panel: #141c2e;
  --line: #223049;
  --line-soft: #1a2438;
  --text: #e9eef8;
  --muted: #8fa0c2;
  --accent: #3366ff;
  --accent-2: #5c82ff;
  --screen: #f5f7fa;
  --screen-panel: #ffffff;
  --screen-ink: #16233b;
  --screen-line: #e3e9f2;
  --screen-muted: #7b8aa6;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #8aa6ff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand svg { display: block; }

.site-nav {
  display: flex;
  gap: 22px;
  margin-inline: auto;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); }

.head-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.lang:hover { color: var(--text); border-color: var(--accent-2); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { color: #fff; filter: brightness(1.08); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent-2); filter: none; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: 88px 104px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 120%;
  background:
    radial-gradient(46% 60% at 28% 30%, rgba(51, 102, 255, 0.16), transparent 70%),
    radial-gradient(30% 44% at 78% 16%, rgba(92, 130, 255, 0.08), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.7rem, 6.2vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.hero h1 .dot { color: var(--accent-2); }

.hero .sub {
  margin-top: 22px;
  max-width: 33rem;
  font-size: 1.13rem;
  line-height: 1.65;
  color: var(--muted);
}

/* download row — telegram-style platform buttons */

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.dl {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 13px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-weight: 650;
  font-size: 0.98rem;
}
.dl svg { flex: none; opacity: 0.9; }
a.dl:hover { border-color: var(--accent-2); color: var(--text); }

.dl--primary {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: transparent;
  box-shadow: 0 8px 28px rgba(51, 102, 255, 0.35);
}
a.dl--primary:hover { border-color: transparent; filter: brightness(1.07); }

.dl--soon { opacity: 0.6; cursor: default; }

.chip {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
}

.dl-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero-media { display: flex; justify-content: center; }

/* ---------- sections ---------- */

.section { padding-block: 96px; }
.section--tint { background: var(--bg-raise); border-block: 1px solid var(--line-soft); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.section h2 {
  margin-top: 14px;
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 750;
  letter-spacing: -0.022em;
  line-height: 1.15;
  max-width: 24ch;
}

.section .lead {
  margin-top: 18px;
  max-width: 40rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- security grid ---------- */

.sec-grid {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
}
.card svg { color: var(--accent-2); display: block; }
.card h3 {
  margin-top: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card p {
  margin-top: 8px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- feature rows (max.ru rhythm) ---------- */

.feats {
  display: flex;
  flex-direction: column;
  gap: 88px;
  margin-top: 72px;
}

.feat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.feat-media { display: flex; justify-content: center; }
.feat--flip .feat-media { order: 2; }

.chip-inline {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 45%, var(--line));
  border-radius: 999px;
  padding: 4px 11px;
}

.feat h3 {
  margin-top: 18px;
  font-size: clamp(1.4rem, 2.4vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.feat p {
  margin-top: 14px;
  max-width: 30rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- phone mockup ---------- */

.phone {
  width: min(310px, 100%);
  border-radius: 42px;
  padding: 11px;
  background: #0c1220;
  border: 1px solid #2b3c60;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  flex: none;
}

.screen {
  aspect-ratio: 9 / 18.6;
  border-radius: 32px;
  background: var(--screen);
  color: var(--screen-ink);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-size: 13.5px;
  line-height: 1.4;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px 12px;
  background: var(--screen-panel);
  border-bottom: 1px solid var(--screen-line);
}
.app-head .avatar { width: 34px; height: 34px; font-size: 0.85rem; }
.app-head .who { min-width: 0; }
.app-head .name { font-weight: 650; }
.app-head .status {
  font-size: 11px;
  color: var(--accent);
}

.avatar {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  font-weight: 700;
}
.avatar--alt { background: linear-gradient(180deg, #34c284, #1fa06a); }
.avatar--warm { background: linear-gradient(180deg, #f0a35c, #e2812f); }

.msgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px;
  overflow: hidden;
}

.msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 16px;
  background: var(--screen-panel);
  border: 1px solid var(--screen-line);
  border-bottom-left-radius: 6px;
}
.msg--out {
  margin-left: auto;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 6px;
}
.msg .meta {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: var(--screen-muted);
  text-align: right;
}
.msg--out .meta { color: rgba(255, 255, 255, 0.75); }

.typing {
  display: inline-flex;
  gap: 4px;
  padding: 12px 14px;
  background: var(--screen-panel);
  border: 1px solid var(--screen-line);
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  width: max-content;
}
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--screen-muted);
  animation: blink 1.2s infinite;
}
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 60%, 100% { opacity: 0.35; }
  30% { opacity: 1; }
}

.app-input {
  margin: 0 12px 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--screen-panel);
  border: 1px solid var(--screen-line);
  color: var(--screen-muted);
  font-size: 12.5px;
}

/* call screen variant */

.screen--call {
  background: linear-gradient(180deg, #0e1526 0%, #182648 100%);
  color: #eef2fc;
  align-items: center;
  justify-content: space-between;
  padding: 44px 20px 30px;
  text-align: center;
}
.screen--call .avatar { width: 88px; height: 88px; font-size: 1.7rem; }
.call-name { margin-top: 16px; font-size: 1.15rem; font-weight: 700; }
.call-timer {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  color: #9db1dc;
}
.call-badge {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7ef0b2;
  border: 1px solid rgba(126, 240, 178, 0.35);
  border-radius: 999px;
  padding: 5px 11px;
}
.call-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ef0b2;
}
.call-row {
  display: flex;
  gap: 18px;
}
.call-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #eef2fc;
}
.call-act--end { background: #e4484d; }

/* storage variant */

.stor-head {
  padding: 18px 16px 14px;
  background: var(--screen-panel);
  border-bottom: 1px solid var(--screen-line);
}
.stor-head .name { font-weight: 650; }
.stor-usage {
  margin-top: 10px;
  height: 6px;
  border-radius: 999px;
  background: var(--screen-line);
  overflow: hidden;
}
.stor-usage i {
  display: block;
  width: 28%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
}
.stor-note {
  margin-top: 6px;
  font-size: 11px;
  color: var(--screen-muted);
  font-variant-numeric: tabular-nums;
}
.stor-rows { padding: 6px 0; }
.stor-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--screen-line);
}
.stor-row:last-child { border-bottom: 0; }
.stor-ico {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e8eefc;
  color: var(--accent);
}
.stor-row .fname { font-weight: 550; font-size: 12.5px; }
.stor-row .fmeta {
  font-size: 10.5px;
  color: var(--screen-muted);
  font-variant-numeric: tabular-nums;
}

/* chat list variant */

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px 12px;
  background: var(--screen-panel);
  border-bottom: 1px solid var(--screen-line);
  font-weight: 700;
  font-size: 1.05rem;
}
.chat-rows { flex: 1; position: relative; }
.chat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--screen-line);
}
.chat-row .cbody { flex: 1; min-width: 0; }
.chat-row .top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.chat-row .cname { font-weight: 650; font-size: 13px; }
.chat-row .ctime {
  font-size: 10.5px;
  color: var(--screen-muted);
  font-variant-numeric: tabular-nums;
}
.chat-row .clast {
  margin-top: 1px;
  font-size: 12px;
  color: var(--screen-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-row .clast .ticks { color: var(--accent); }
.chat-row .clast--typing { color: var(--accent); }
.unread {
  flex: none;
  min-width: 19px;
  height: 19px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fab {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(51, 102, 255, 0.4);
}

/* ---------- network diagram ---------- */

.net-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
  }
.net-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.diagram {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}
.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- cta band ---------- */

.cta-band { padding-block: 32px 110px; }
.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 76px 32px;
  background:
    radial-gradient(60% 90% at 50% -10%, rgba(51, 102, 255, 0.28), transparent 70%),
    var(--bg-raise);
}
.cta-card h2 {
  margin: 0 auto;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 20ch;
}
.cta-card .dl-row { justify-content: center; }
.cta-card .dl-note { margin-top: 18px; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--line-soft);
  padding-block: 36px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 36px;
}
.foot-tag {
  font-size: 0.9rem;
  color: var(--muted);
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
}
.foot-nav a { color: var(--muted); font-size: 0.9rem; }
.foot-nav a:hover { color: var(--text); }
.foot-copy {
  width: 100%;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .typing i { animation: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .site-nav { display: none; }
  .hero { padding-block: 56px 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .sec-grid { grid-template-columns: 1fr 1fr; }
  .feat,
  .feat--flip { grid-template-columns: 1fr; gap: 32px; }
  .feat--flip .feat-media { order: 0; }
  .net-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding-block: 72px; }
}

@media (max-width: 600px) {
  .sec-grid { grid-template-columns: 1fr; }
  .dl { width: 100%; justify-content: center; }
  .cta-card { padding: 56px 20px; }
}
