/* ===========================================================
   bento.css — Bento Grid (Aceternity UI, via Inspira UI) com as
   ferramentas do Studio. Cada card tem um visual em gradiente,
   um icone flutuante, titulo e descricao; no hover o conteudo
   desliza e o card levanta. Escopo: #tools-bento
   =========================================================== */
#tools-bento {
    background: var(--bg, #08080a);
    padding: clamp(72px, 10vh, 110px) 48px;
}

.bento-head {
    max-width: 720px;
    margin: 0 auto clamp(40px, 6vh, 60px);
    text-align: center;
}

.bento-head .section-tag {
    display: inline-flex;
}

.bento-head .section-title {
    margin: 14px 0 16px;
}

.bento-head .section-sub {
    margin: 0 auto;
    max-width: 560px;
}

.bento-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

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

@media (min-width: 1000px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
    .bento-card.bento-lg { grid-column: span 2; }
}

.bento-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    border-radius: 18px;
    border: 1px solid var(--border, rgba(255, 255, 255, .08));
    background: linear-gradient(180deg, #0e0e13, #0a0a0e);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .5s cubic-bezier(.22, 1, .36, 1), border-color .3s ease, box-shadow .35s ease;
}

/* entrada: reveal ao rolar (stagger). Armado via JS (.reveal) e disparado por .in;
   sem JS os cards ja aparecem normalmente. */
.bento-grid.reveal .bento-card {
    opacity: 0;
    transform: translateY(30px);
}

.bento-grid.reveal.in .bento-card {
    opacity: 1;
    transform: none;
}

.bento-grid.reveal.in .bento-card:nth-child(1) { transition-delay: 0s; }
.bento-grid.reveal.in .bento-card:nth-child(2) { transition-delay: .07s; }
.bento-grid.reveal.in .bento-card:nth-child(3) { transition-delay: .14s; }
.bento-grid.reveal.in .bento-card:nth-child(4) { transition-delay: .21s; }
.bento-grid.reveal.in .bento-card:nth-child(5) { transition-delay: .28s; }
.bento-grid.reveal.in .bento-card:nth-child(6) { transition-delay: .35s; }
.bento-grid.reveal.in .bento-card:nth-child(7) { transition-delay: .42s; }

/* entrada dos textos do cabecalho (tag, titulo, subtitulo) */
.bento-head.reveal .section-tag,
.bento-head.reveal .section-title,
.bento-head.reveal .section-sub {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
    transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1), filter .7s ease;
}

.bento-head.reveal.in .section-tag,
.bento-head.reveal.in .section-title,
.bento-head.reveal.in .section-sub {
    opacity: 1;
    transform: none;
    filter: blur(0);
}

.bento-head.reveal.in .section-title { transition-delay: .1s; }
.bento-head.reveal.in .section-sub { transition-delay: .2s; }

.bento-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, .2);
    box-shadow: 0 26px 60px rgba(0, 0, 0, .5);
}

.bento-visual {
    position: relative;
    flex: 1;
    min-height: 104px;
    overflow: hidden;
    background:
        radial-gradient(130% 120% at 15% 0%, rgba(24, 100, 255, .28), transparent 60%),
        radial-gradient(120% 130% at 100% 30%, rgba(99, 102, 241, .20), transparent 55%);
}

.bento-visual[data-accent="purple"] {
    background:
        radial-gradient(130% 120% at 15% 0%, rgba(124, 92, 246, .30), transparent 60%),
        radial-gradient(120% 130% at 100% 30%, rgba(56, 90, 200, .18), transparent 55%);
}

.bento-visual[data-accent="gray"] {
    background:
        radial-gradient(130% 120% at 15% 0%, rgba(150, 160, 190, .20), transparent 60%),
        radial-gradient(120% 130% at 100% 30%, rgba(90, 100, 130, .16), transparent 55%);
}

/* Imagem de exemplo da ferramenta. Preenche o visual do card; os gradientes de
   accent acima ficam de fallback enquanto a imagem carrega, e a textura de
   pontos (::after) segue por cima. */
.bento-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
    transition: transform .6s cubic-bezier(.22, 1, .36, 1);
}

.bento-card:hover .bento-img {
    transform: scale(1.07);
}

@media (prefers-reduced-motion: reduce) {
    .bento-img {
        transition: none;
    }

    .bento-card:hover .bento-img {
        transform: scale(1.01);
    }
}

.bento-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1.2px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
    mask-image: linear-gradient(180deg, #000, transparent 85%);
    opacity: .45;
    transition: transform .6s cubic-bezier(.22, 1, .36, 1), opacity .3s ease;
}

.bento-card:hover .bento-visual::after {
    transform: scale(1.12);
    opacity: .6;
}

.bento-body {
    position: relative;
    padding: 0 24px 24px;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}

.bento-card:hover .bento-body {
    transform: translateX(6px);
}

.bento-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-top: -23px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: rgba(14, 14, 19, .85);
    border: 1px solid rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--white, #f4f4f5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
}

.bento-icon svg {
    width: 21px;
    height: 21px;
}

.bento-title {
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--white, #f4f4f5);
    margin-bottom: 7px;
    letter-spacing: -.01em;
}

.bento-desc {
    font-size: .875rem;
    line-height: 1.55;
    color: var(--dim, #71717a);
    max-width: 44ch;
}

@media (prefers-reduced-motion: reduce) {
    .bento-card,
    .bento-body,
    .bento-visual::after { transition: none; }
}

@media (max-width: 560px) {
    #tools-bento { padding: 64px 20px; }
}
