/*
  Bento 04 — 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-950: #020617;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-50: #f8fafc;
  --blue-600: #2563eb;
  --blue-400: #60a5fa;
  --emerald-100: #d1fae5;
  --emerald-700: #047857;
  --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;
}

a {
  text-decoration: none;
  color: inherit;
}

.bento {
  padding: clamp(2.5rem, 2rem + 2vw, 4rem) clamp(1rem, 0.3rem + 3vw, 2rem);
}

.bento__grid {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.card--chart {
  order: 2;
  background-color: var(--slate-50);
  padding: 1.5rem;
}

.chart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.chart__label {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--slate-500);
}

.chart__trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  background-color: var(--emerald-100);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--emerald-700);
}

.chart__trend svg {
  width: 0.75rem;
  height: 0.75rem;
}

.chart__bars {
  margin-top: 1.5rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 9rem;
  border-bottom: 1px solid var(--slate-200);
}

.bar-col {
  flex: 1;
  display: flex;
  align-items: flex-end;
  height: 100%;
}

.bar {
  width: 100%;
  border-radius: 0.25rem 0.25rem 0 0;
  background-image: linear-gradient(to top, var(--blue-600), var(--blue-400));
}

.chart__labels {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

.chart__labels span {
  flex: 1;
  text-align: center;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--slate-400);
}

.card--message {
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--slate-950);
  padding: 1.75rem;
}

.card__heading {
  margin: 0;
  font-weight: 600;
  font-size: clamp(1.625rem, 1.3rem + 1.6vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--white);
}

.card__description {
  margin: 0.625rem 0 0;
  max-width: 24rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate-400);
}

.button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 150ms ease;
}

.button svg {
  width: 0.875rem;
  height: 0.875rem;
}

.button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

.button--primary {
  margin-top: 1.5rem;
  padding: 0.625rem 1.25rem;
  color: var(--slate-950);
  background-color: var(--white);
}

.button--primary:hover {
  background-color: var(--slate-200);
}

.card--testimonial {
  order: 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--slate-200);
  background-color: var(--white);
  padding: 1.5rem;
}

.stars {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.stars svg {
  width: 0.75rem;
  height: 0.75rem;
  color: #fbbf24;
}

.testimonial__quote {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--slate-700);
}

.testimonial__attribution {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background-color: var(--blue-600);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--white);
}

.testimonial__names {
  min-width: 0;
}

.testimonial__name {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.testimonial__role {
  margin: 0.125rem 0 0;
  font-size: 0.6875rem;
  color: var(--slate-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card--photo {
  order: 4;
  min-height: 13rem;
  overflow: hidden;
}

.card__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__photo-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to top, rgba(2, 6, 23, 0.55), transparent);
  pointer-events: none;
}

.badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--slate-900);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

@media (min-width: 640px) {
  .bento__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .card--message {
    grid-column: span 2;
  }

  .card--photo {
    grid-column: span 2;
  }
}

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

  .card--chart,
  .card--message,
  .card--testimonial,
  .card--photo {
    order: 0;
  }

  .card--chart {
    grid-row: span 2;
  }

  .card--message {
    grid-column: span 2;
  }

  .card--photo {
    grid-column: span 1;
  }

  .chart__bars {
    height: 12rem;
  }
}

/* Motion — disabled entirely under reduced motion; every card and bar
   already renders at its final, fully visible state outside this media
   query. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-bento04-fade {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes al-bento04-grow {
    from {
      transform: scaleY(0);
    }
    to {
      transform: scaleY(1);
    }
  }

  .reveal {
    animation: al-bento04-fade 550ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .bar {
    transform-origin: bottom;
    animation: al-bento04-grow 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
