/*
  Features 16 — standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy these three
  files into any project and open index.html as-is.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-900: #0f172a;
  --blue-50: #eff6ff;
  --blue-300: rgba(147, 197, 253, 1);
  --blue-600: #2563eb;
  --emerald-500: #10b981;
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--slate-900);
  background-color: var(--white);
  line-height: 1.5;
}

.features {
  padding: clamp(4rem, 3.5rem + 2vw, 6rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.features__inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
}

.intro {
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}

.kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.heading {
  margin: 0.75rem 0 0;
  font-weight: 600;
  font-size: clamp(1.875rem, 1.5rem + 1.9vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.stack {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.featured {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background-color: var(--slate-900);
  padding: 1.5rem;
}

.outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--slate-200);
}

.outline rect {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.featured .outline {
  color: rgba(59, 130, 246, 0.4);
}

.featured__content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.featured__left {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.icon-tile {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background-color: var(--blue-50);
  color: var(--blue-600);
}

.icon-tile svg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-tile--featured {
  width: 2.75rem;
  height: 2.75rem;
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.featured__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
}

.featured__text {
  margin: 0.25rem 0 0;
  max-width: 28rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #94a3b8;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  background-color: var(--slate-100);
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-500);
}

.badge--featured {
  width: fit-content;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background-color: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.card {
  position: relative;
  border-radius: 1rem;
  padding: 1.5rem;
}

.card__content {
  position: relative;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card__title {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

.card__text {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--slate-600);
}

.card .badge {
  margin-top: 0.75rem;
}

.live-dot {
  position: relative;
  display: inline-flex;
  width: 0.5rem;
  height: 0.5rem;
}

.live-dot__ping {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background-color: var(--emerald-500);
  opacity: 0.75;
}

.live-dot__core {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background-color: var(--emerald-500);
}

@media (min-width: 640px) {
  .featured__content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .featured {
    padding: 2rem;
  }
}

/* Motion — disabled entirely under reduced motion; every border already
   renders fully drawn and every card, dot, and badge is fully visible
   outside this media query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-features16-draw {
    from {
      stroke-dashoffset: 100;
    }
    to {
      stroke-dashoffset: 0;
    }
  }

  @keyframes al-features16-content {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes al-features16-status {
    from {
      opacity: 0;
      transform: scale(0.6);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes al-features16-glow {
    from {
      box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
    to {
      box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.06);
    }
  }

  @keyframes al-features16-ping {
    75%,
    100% {
      transform: scale(2);
      opacity: 0;
    }
  }

  .outline rect {
    animation: al-features16-draw 900ms cubic-bezier(0.65, 0, 0.35, 1) both;
  }

  .card__content,
  .featured__content {
    animation: al-features16-content 550ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .badge {
    animation: al-features16-status 350ms cubic-bezier(0.34, 1.35, 0.64, 1) both;
  }

  .featured {
    animation: al-features16-glow 500ms 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .live-dot__ping {
    animation: al-features16-ping 1800ms cubic-bezier(0, 0, 0.2, 1) infinite;
  }
}
