:root {
  color-scheme: dark;
  --bg: #061016;
  --panel: rgba(9, 20, 28, 0.78);
  --panel-strong: rgba(8, 17, 24, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(125, 211, 252, 0.28);
  --text: #eef8fb;
  --muted: #9fb2bf;
  --soft: #cfe5eb;
  --cyan: #67e8f9;
  --blue: #38bdf8;
  --green: #34d399;
  --amber: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.14), transparent 28%),
    radial-gradient(circle at 82% 6%, rgba(52, 211, 153, 0.1), transparent 24%),
    linear-gradient(180deg, #08131b 0%, #050a0f 46%, #030609 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.4), transparent 72%);
  animation: gridDrift 24s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -30% -20%;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(245, 158, 11, 0.07) 48%, transparent 55%),
    linear-gradient(62deg, transparent 0 52%, rgba(103, 232, 249, 0.08) 57%, transparent 64%),
    repeating-linear-gradient(145deg, transparent 0 92px, rgba(255, 255, 255, 0.028) 94px, transparent 98px);
  opacity: 0.72;
  transform: translate3d(0, 0, 0);
  animation: lightSweep 18s ease-in-out infinite alternate;
}

.constellation-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.88;
}

a {
  color: inherit;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 13, 0.76);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.92), rgba(6, 78, 59, 0.72));
  box-shadow: 0 18px 48px rgba(56, 189, 248, 0.12);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-mark {
  animation: markPulse 4.8s ease-in-out infinite;
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-kicker {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-name {
  color: white;
  font-size: 15px;
  font-weight: 760;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.footer a:hover {
  color: white;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  background: rgba(8, 22, 30, 0.72);
  color: var(--text);
  font-size: 14px;
  font-weight: 740;
  text-decoration: none;
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #021016;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  position: relative;
  overflow: hidden;
}

.button.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 30%, rgba(255, 255, 255, 0.38), transparent 70%);
  transform: translateX(-130%);
  animation: buttonSweep 5.8s ease-in-out infinite;
}

.hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.76fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.08);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 860px;
  margin-top: 22px;
  font-size: clamp(42px, 7vw, 78px);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
}

h3 {
  font-size: 19px;
}

.lead {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 14px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.8);
}

.phone-scene {
  position: relative;
  min-height: 520px;
}

.phone-scene::before,
.phone-scene::after {
  content: "";
  position: absolute;
  inset: 24px 6px auto auto;
  width: min(430px, 96%);
  aspect-ratio: 1;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-top-color: rgba(103, 232, 249, 0.38);
  border-right-color: rgba(52, 211, 153, 0.24);
  border-radius: 50%;
  pointer-events: none;
  animation: orbitSpin 22s linear infinite;
}

.phone-scene::after {
  inset: 78px 42px auto auto;
  width: min(330px, 78%);
  border-color: rgba(251, 146, 60, 0.16);
  border-left-color: rgba(103, 232, 249, 0.32);
  animation-duration: 30s;
  animation-direction: reverse;
}

.phone {
  position: absolute;
  inset: 0 0 auto auto;
  width: min(360px, 100%);
  min-height: 520px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 12, 0.98)),
    radial-gradient(circle at 24% 16%, rgba(56, 189, 248, 0.16), transparent 26%);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: phoneFloat 7.2s ease-in-out infinite;
}

.phone::after {
  content: "";
  position: absolute;
  inset: auto -22% 18% -22%;
  height: 120px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.14), rgba(103, 232, 249, 0.18), transparent);
  transform: rotate(-8deg) translateY(40px);
  animation: phoneLight 6.5s ease-in-out infinite;
}

.phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 92px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  transform: translateX(-50%);
}

.phone-inner {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  padding: 34px 18px 20px;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px 18px;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(103, 232, 249, 0.12);
  color: var(--cyan);
  font-weight: 900;
}

.status-pill {
  padding: 4px 9px;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 999px;
  color: #bbf7d0;
  font-size: 11px;
  font-weight: 800;
}

.message-list {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.bubble {
  max-width: 84%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  color: #e5eef4;
  font-size: 14px;
  animation: bubbleIn 650ms ease both;
}

.bubble.out {
  justify-self: end;
  border-color: rgba(103, 232, 249, 0.2);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32), rgba(16, 185, 129, 0.22));
}

.bubble:nth-child(2) {
  animation-delay: 160ms;
}

.bubble:nth-child(3) {
  animation-delay: 320ms;
}

.bubble:nth-child(4) {
  animation-delay: 480ms;
}

.secure-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 18px;
  background: rgba(6, 78, 59, 0.16);
  animation: securePulse 5.5s ease-in-out infinite;
}

.secure-card strong {
  display: block;
  color: #d1fae5;
}

.secure-card span {
  color: #99f6e4;
  font-size: 13px;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.section-header {
  max-width: 740px;
  margin-bottom: 28px;
}

.section-header p {
  color: var(--muted);
  font-size: 17px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.16);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(10, 24, 32, 0.88);
}

.card .icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: rgba(103, 232, 249, 0.1);
  color: var(--cyan);
}

.card p,
.legal p,
.legal li {
  color: var(--muted);
}

.legal {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 84px;
}

.legal h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.legal h2 {
  margin-top: 44px;
  font-size: 26px;
}

.legal h3 {
  margin-top: 28px;
}

.legal ul {
  padding-left: 22px;
}

.legal .updated {
  margin-top: 18px;
  color: var(--muted);
}

.notice {
  margin: 28px 0;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.08);
  padding: 18px;
  color: #fde68a;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 12, 0.66);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.footer-links {
  display: grid;
  grid-auto-flow: column;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.small {
  color: var(--muted);
  font-size: 13px;
}

.signal-art {
  position: absolute;
  inset: 26px 18px auto auto;
  width: min(430px, 94%);
  height: 430px;
  pointer-events: none;
}

.signal-art span {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(103, 232, 249, 0.5), rgba(251, 191, 36, 0.34), transparent);
  transform-origin: center;
  opacity: 0.54;
  animation: signalSlide 7s ease-in-out infinite;
}

.signal-art span:nth-child(1) {
  top: 20%;
  transform: rotate(12deg);
}

.signal-art span:nth-child(2) {
  top: 48%;
  transform: rotate(-8deg);
  animation-delay: -2s;
}

.signal-art span:nth-child(3) {
  top: 72%;
  transform: rotate(16deg);
  animation-delay: -4s;
}

.message-sparks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.message-sparks span {
  position: absolute;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(251, 191, 36, 0.48);
  transform: rotate(45deg);
  animation: sparkDrift 9s ease-in-out infinite;
}

.message-sparks span:nth-child(1) {
  top: 16%;
  left: 4%;
}

.message-sparks span:nth-child(2) {
  top: 64%;
  left: 12%;
  animation-delay: -2.8s;
}

.message-sparks span:nth-child(3) {
  top: 38%;
  right: 4%;
  animation-delay: -5.2s;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 56px 56px, 56px 56px; }
}

@keyframes lightSweep {
  from { transform: translate3d(-3%, -2%, 0) rotate(0.001deg); }
  to { transform: translate3d(3%, 2%, 0) rotate(0.001deg); }
}

@keyframes markPulse {
  0%, 100% { box-shadow: 0 18px 48px rgba(56, 189, 248, 0.12); }
  50% { box-shadow: 0 18px 58px rgba(251, 191, 36, 0.18); }
}

@keyframes buttonSweep {
  0%, 62% { transform: translateX(-130%); }
  76%, 100% { transform: translateX(130%); }
}

@keyframes orbitSpin {
  to { transform: rotate(360deg); }
}

@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes phoneLight {
  0%, 100% { transform: rotate(-8deg) translateY(46px); opacity: 0.45; }
  50% { transform: rotate(-8deg) translateY(-6px); opacity: 0.9; }
}

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

@keyframes securePulse {
  0%, 100% { border-color: rgba(52, 211, 153, 0.18); }
  50% { border-color: rgba(251, 191, 36, 0.34); }
}

@keyframes signalSlide {
  0%, 100% { clip-path: inset(0 72% 0 0); opacity: 0.22; }
  45%, 58% { clip-path: inset(0 0 0 0); opacity: 0.66; }
}

@keyframes sparkDrift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(45deg); opacity: 0.28; }
  50% { transform: translate3d(16px, -18px, 0) rotate(135deg); opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-grid,
  .split,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .phone-scene {
    min-height: 480px;
  }

  .phone {
    left: 0;
    margin: 0 auto;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-auto-flow: row;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 14px;
  }

  .hero-actions .button,
  .button {
    width: 100%;
  }

  .phone {
    min-height: 500px;
  }
}

/* CHAT_WEB_LANDING_POLISH_V1 */
.hero-polish {
  padding-top: 68px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.testing-badge {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
  color: #fde68a;
}

.hero-visual {
  position: relative;
  min-height: 560px;
}

.visual-panel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: 28px;
  background:
    radial-gradient(circle at 24% 18%, rgba(103, 232, 249, 0.18), transparent 30%),
    radial-gradient(circle at 72% 20%, rgba(52, 211, 153, 0.13), transparent 28%),
    linear-gradient(150deg, rgba(6, 20, 29, 0.96), rgba(4, 10, 16, 0.98));
  box-shadow: var(--shadow);
  animation: panelGlow 8s ease-in-out infinite;
}

.visual-panel::before,
.visual-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(103, 232, 249, 0.16);
  border-radius: 999px;
  pointer-events: none;
}

.visual-panel::before {
  inset: 42px 48px auto auto;
  width: 320px;
  height: 320px;
  border-top-color: rgba(251, 191, 36, 0.28);
  animation: orbitSpin 32s linear infinite;
}

.visual-panel::after {
  inset: auto auto -92px -76px;
  width: 270px;
  height: 270px;
  border-right-color: rgba(52, 211, 153, 0.32);
  animation: orbitSpin 38s linear infinite reverse;
}

.visual-glow {
  position: absolute;
  inset: 12% 10% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.1);
  filter: blur(22px);
  pointer-events: none;
}

.private-group-pill {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(3, 12, 18, 0.78);
  color: #d1fae5;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.mini-lock,
.lock-dot {
  position: relative;
  display: inline-block;
  width: 14px;
  height: 12px;
  border: 2px solid #86efac;
  border-radius: 4px;
}

.mini-lock::before,
.lock-dot::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -8px;
  width: 6px;
  height: 8px;
  border: 2px solid #86efac;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

.lock-dot {
  width: 18px;
  height: 16px;
  margin-left: auto;
  border-color: rgba(134, 239, 172, 0.9);
  transform: scale(0.86);
  animation: keyPulse 4.6s ease-in-out infinite;
}

.secure-thread {
  position: absolute;
  inset: 42px 18px auto;
  z-index: 1;
  width: calc(100% - 36px);
  height: 72%;
  fill: none;
  pointer-events: none;
}

.secure-thread path {
  stroke: rgba(103, 232, 249, 0.44);
  stroke-width: 2;
  stroke-dasharray: 12 15;
  animation: threadFlow 10s linear infinite;
}

.secure-thread path:nth-child(2) {
  stroke: rgba(251, 191, 36, 0.34);
  animation-duration: 13s;
  animation-direction: reverse;
}

.devices-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(190px, 0.82fr);
  gap: 18px;
  min-height: 560px;
  padding: 86px 22px 22px;
  align-items: end;
}

.device-card,
.call-widget,
.group-widget,
.key-widget {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(6, 18, 27, 0.82);
  box-shadow: 0 24px 62px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.device-card {
  display: flex;
  min-height: 410px;
  flex-direction: column;
  border-radius: 26px;
  padding: 18px;
  animation: deviceFloat 7.8s ease-in-out infinite;
}

.device-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.device-top strong,
.call-widget strong,
.group-widget strong,
.key-widget strong {
  display: block;
  color: #f8fdff;
}

.device-top p,
.call-widget p,
.group-widget p,
.key-widget p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.avatar-stack,
.group-avatars {
  display: flex;
  align-items: center;
}

.avatar-stack span,
.group-avatars span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-left: -8px;
  border: 2px solid rgba(3, 12, 18, 0.92);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(16, 185, 129, 0.82));
  color: #021016;
  font-size: 12px;
  font-weight: 900;
}

.avatar-stack span:first-child,
.group-avatars span:first-child {
  margin-left: 0;
}

.message-flow {
  display: grid;
  gap: 12px;
}

.message-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  color: #eaf6fb;
  font-size: 14px;
  animation: bubbleIn 680ms ease both;
}

.message-bubble.outgoing {
  justify-self: end;
  border-color: rgba(103, 232, 249, 0.22);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(16, 185, 129, 0.18));
}

.media-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.audio-bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.audio-bars i {
  display: block;
  width: 3px;
  height: 9px;
  border-radius: 999px;
  background: #67e8f9;
  animation: audioBars 1.1s ease-in-out infinite;
}

.audio-bars i:nth-child(2) {
  height: 16px;
  animation-delay: -0.2s;
}

.audio-bars i:nth-child(3) {
  height: 12px;
  animation-delay: -0.4s;
}

.audio-bars i:nth-child(4) {
  height: 18px;
  animation-delay: -0.6s;
}

.composer-row {
  display: grid;
  grid-template-columns: 1fr 34px 34px;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.composer-row span {
  height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

.side-stack {
  display: grid;
  gap: 14px;
  align-content: center;
}

.call-widget,
.group-widget,
.key-widget {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 96px;
  border-radius: 20px;
  padding: 14px;
  animation: widgetFloat 8s ease-in-out infinite;
}

.call-widget {
  transform: translateX(-10px);
}

.group-widget {
  transform: translateX(10px);
  animation-delay: -2.6s;
}

.key-widget {
  transform: translateX(-4px);
  animation-delay: -4.2s;
}

.call-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.13);
}

.call-ring::before,
.call-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(52, 211, 153, 0.38);
  border-radius: 999px;
  animation: callPulse 2.4s ease-out infinite;
}

.call-ring::after {
  animation-delay: -1.2s;
}

.call-ring span {
  width: 18px;
  height: 18px;
  border: 3px solid #86efac;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 6px;
  transform: rotate(45deg);
}

.group-avatars {
  min-width: 54px;
}

.key-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 70% 34%, #021016 0 5px, transparent 6px),
    linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(103, 232, 249, 0.8));
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.18);
}

.feature-grid,
.privacy-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 19, 27, 0.78);
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 232, 249, 0.34);
  background: rgba(10, 24, 32, 0.9);
}

.feature-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(103, 232, 249, 0.1);
}

.feature-icon::before,
.feature-icon::after {
  content: "";
  position: absolute;
}

.message-icon::before {
  width: 24px;
  height: 18px;
  border: 2px solid var(--cyan);
  border-radius: 8px;
}

.message-icon::after {
  left: 15px;
  bottom: 10px;
  width: 9px;
  height: 9px;
  border-left: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(-18deg);
}

.call-icon::before {
  width: 20px;
  height: 20px;
  border: 3px solid #86efac;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 7px;
  transform: rotate(45deg);
}

.group-icon::before {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: -10px 12px 0 #86efac, 10px 12px 0 #fbbf24;
}

.media-icon::before {
  width: 24px;
  height: 18px;
  border: 2px solid var(--cyan);
  border-radius: 7px;
}

.media-icon::after {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #fbbf24;
}

.block-icon::before {
  width: 24px;
  height: 24px;
  border: 2px solid #fb7185;
  border-radius: 999px;
}

.block-icon::after {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #fb7185;
  transform: rotate(-35deg);
}

.key-icon::before {
  width: 14px;
  height: 14px;
  border: 2px solid #fbbf24;
  border-radius: 999px;
  box-shadow: 13px 9px 0 -5px #fbbf24, 21px 9px 0 -5px #fbbf24;
}

.key-icon::after {
  left: 25px;
  top: 23px;
  width: 17px;
  height: 2px;
  background: #fbbf24;
}

.privacy-summary {
  position: relative;
}

.privacy-summary::before {
  content: "";
  position: absolute;
  inset: 54px 0 auto;
  z-index: -1;
  height: 220px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(16, 185, 129, 0.07));
}

.privacy-points {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.privacy-points div {
  min-height: 150px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 8px;
  background: rgba(6, 78, 59, 0.12);
  padding: 20px;
  color: #d9fbee;
  font-weight: 720;
}

.privacy-points span {
  display: block;
  width: 28px;
  height: 28px;
  margin-bottom: 18px;
  border: 2px solid #86efac;
  border-radius: 999px;
  background:
    linear-gradient(45deg, transparent 44%, #86efac 45% 56%, transparent 57%),
    rgba(52, 211, 153, 0.08);
}

.testing-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(8, 22, 30, 0.78)),
    rgba(8, 19, 27, 0.78);
  padding: 26px;
}

.testing-strip p {
  max-width: 720px;
  color: var(--muted);
}

.testing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.legal-entry .card {
  color: inherit;
  text-decoration: none;
}

@keyframes panelGlow {
  0%, 100% { border-color: rgba(103, 232, 249, 0.2); }
  50% { border-color: rgba(52, 211, 153, 0.28); }
}

@keyframes threadFlow {
  to { stroke-dashoffset: -220; }
}

@keyframes deviceFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes widgetFloat {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -8px; }
}

@keyframes callPulse {
  from { transform: scale(0.72); opacity: 0.74; }
  to { transform: scale(1.42); opacity: 0; }
}

@keyframes keyPulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

@keyframes audioBars {
  0%, 100% { transform: scaleY(0.58); opacity: 0.74; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 900px) {
  .hero-polish {
    padding-top: 44px;
  }

  .hero-visual,
  .visual-panel {
    min-height: auto;
  }

  .devices-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 84px 18px 20px;
  }

  .device-card {
    min-height: auto;
  }

  .side-stack {
    grid-template-columns: 1fr;
  }

  .call-widget,
  .group-widget,
  .key-widget {
    transform: none;
  }

  .feature-grid,
  .privacy-points,
  .testing-strip {
    grid-template-columns: 1fr;
  }

  .testing-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(36px, 12vw, 48px);
  }

  .visual-panel {
    border-radius: 16px;
  }

  .private-group-pill {
    left: 14px;
    right: 14px;
    justify-content: center;
  }

  .devices-grid {
    padding: 82px 14px 16px;
  }

  .message-bubble {
    max-width: 100%;
  }

  .feature-card,
  .privacy-points div {
    min-height: auto;
  }

  .testing-strip {
    padding: 20px;
  }
}
