@use 'abstracts';

@keyframes card-fade-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.features-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--space-4) * 2);

  &__wrapper {
    @include abstracts.container-wrapper;
    width: 100%;
  }

  &__header {
    text-align: center;
    margin-bottom: calc(var(--space-4) * 1.5);

    h2 {
      font-size: var(--font-size-xl);
      margin-bottom: var(--space-2);
    }

    p {
      font-size: var(--font-size-lg);
    }
  }

  &__label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-2);
  }

  &__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);

    @include abstracts.breakpoint('md') {
      grid-template-columns: repeat(2, 1fr);
    }

    @include abstracts.breakpoint('lg') {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  &__card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    gap: var(--space-3);
    background-color: var(--bg-surface);
    cursor: default;
    opacity: 0;

    &.is-visible {
      animation: card-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) var(--delay, 0ms) both;
    }

    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease,
                border-color 0.25s ease;

    &:hover {
      transform: translateY(-4px);
      border-color: var(--accent);
      box-shadow: 0 12px 32px oklch(0% 0 0 / 0.08);
    }
  }

  &__icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: abstracts.rem(48);
    height: abstracts.rem(48);
    border-radius: 12px;
    background: linear-gradient(135deg, oklch(from var(--accent) l c h / 0.15) 0%, oklch(from var(--accent) l c h / 0.08) 100%);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);

    .features-section__card:hover & {
      transform: scale(1.08);
    }
  }

  &__icon {
    font-size: abstracts.rem(24);
    color: var(--accent);
  }

  &__claim {
    font-size: var(--font-size-lg);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
  }

  &__description {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
  }

  &__benefit {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
  }

  &__check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: oklch(from var(--accent) l c h / 0.15);
    font-size: 0.7rem;
    flex-shrink: 0;
  }
}
