/**
 * Bento Grid Layout System
 * Hexastudio Marketing Website
 * 
 * A CSS Grid-based bento layout system for intentional asymmetry.
 * Reference: Linear.app features page bento layout style
 * 
 * Usage:
 *   <div class="bento-grid">
 *     <div class="bento-item bento-item--large">...</div>
 *     <div class="bento-item bento-item--wide">...</div>
 *     <div class="bento-item">...</div>
 *   </div>
 */

/* ============================================
   BASE GRID CONTAINER
   ============================================ */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}

/* ============================================
   DESKTOP BREAKPOINT (≥1024px)
   Fixed 4-column layout with span classes
   ============================================ */

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

  .bento-item--large {
    grid-column: span 2;
    grid-row: span 2;
  }

  .bento-item--wide {
    grid-column: span 2;
    grid-row: span 1;
  }

  .bento-item--tall {
    grid-column: span 1;
    grid-row: span 2;
  }

  .bento-item--full {
    grid-column: 1 / -1;
    grid-row: span 1;
  }
}

/* ============================================
   TABLET BREAKPOINT (768px - 1023px)
   2-column layout, span classes reset
   ============================================ */

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

  .bento-item--large,
  .bento-item--wide,
  .bento-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ============================================
   MOBILE BREAKPOINT (<768px)
   Single column, all items full width
   ============================================ */

@media (max-width: 767px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-item,
  .bento-item--large,
  .bento-item--wide,
  .bento-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

/* ============================================
   GRID ITEM BASE
   ============================================ */

.bento-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bento-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   FEATURED VARIANT
   ============================================ */

.bento-item--featured {
  border: 2px solid var(--accent-color, currentColor);
}

/* ============================================
   INNER CONTENT WRAPPER
   ============================================ */

.bento-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
  gap: 10px;
}

/* ============================================
   ICON CONTAINER
   ============================================ */

.bento-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}

.bento-icon svg,
.bento-icon img {
  width: 24px;
  height: 24px;
}

/* ============================================
   LABEL (chip/tag)
   ============================================ */

.bento-label {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}

.bento-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.bento-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--blue-subtle);
  color: var(--blue);
}

/* ============================================
   TITLE
   ============================================ */

.bento-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: var(--leading-snug);
}

.bento-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  opacity: 0.85;
}

/* ============================================
   VARIANT PRESETS
   ============================================ */

/* Features: 10 items, denser grid */
.bento-grid--features {
  gap: 20px;
}

/* Pricing: 4 items, more breathing room */
.bento-grid--pricing {
  gap: 24px;
}

/* Services: 6-8 items, balanced */
.bento-grid--services {
  gap: 24px;
}

/* ============================================
   GAP CONTROL MODIFIERS
   ============================================ */

.bento-grid--tight {
  gap: 12px;
}

.bento-grid--loose {
  gap: 32px;
}

/* ============================================
   ANIMATION-READY CLASS
   For GSAP stagger targets
   ============================================ */

.bento-item--animate {
  opacity: 0;
  transform: translateY(20px);
}

/* ============================================
   DEMO / USAGE EXAMPLE
   ============================================

   <!-- 6-item bento layout: 2 large, 2 wide, 2 standard -->
   <div class="bento-grid">
     
     <!-- Large item (2×2) -->
     <div class="bento-item bento-item--large">
       <div class="bento-content">
         <div class="bento-icon">...</div>
         <span class="bento-label">Feature</span>
         <h3 class="bento-title">AI Content Studio</h3>
         <p class="bento-text">Generate stunning visuals...</p>
       </div>
     </div>
     
     <!-- Wide item (2×1) -->
     <div class="bento-item bento-item--wide">
       <div class="bento-content">...</div>
     </div>
     
     <!-- Standard item (1×1) -->
     <div class="bento-item">
       <div class="bento-content">...</div>
     </div>
     
     <!-- Standard item (1×1) -->
     <div class="bento-item">
       <div class="bento-content">...</div>
     </div>
     
     <!-- Large item (2×2) -->
     <div class="bento-item bento-item--large">
       <div class="bento-content">...</div>
     </div>
     
     <!-- Wide item (2×1) -->
     <div class="bento-item bento-item--wide">
       <div class="bento-content">...</div>
     </div>
     
   </div>

   ============================================ */
