/* Bento Grid Section Styles */
.bento-section {
  padding: 120px 20px;
  background: #000000;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  
  /* Smooth transition into the section */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Add a subtle gradient overlay for depth */
.bento-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.01), transparent);
  pointer-events: none;
}

.bento-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(300px, auto);
  gap: 24px;
  width: 100%;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-section.in-view .bento-grid {
  opacity: 1;
  transform: translateY(0);
}

.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

.bento-section.in-view .bento-card {
  animation: cardRevealBento 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Staggered card animations */
.bento-section.in-view .bento-card:nth-child(1) { animation-delay: 0.1s; }
.bento-section.in-view .bento-card:nth-child(2) { animation-delay: 0.2s; }
.bento-section.in-view .bento-card:nth-child(3) { animation-delay: 0.3s; }
.bento-section.in-view .bento-card:nth-child(4) { animation-delay: 0.4s; }
.bento-section.in-view .bento-card:nth-child(5) { animation-delay: 0.5s; }
.bento-section.in-view .bento-card:nth-child(6) { animation-delay: 0.6s; }
.bento-section.in-view .bento-card:nth-child(7) { animation-delay: 0.7s; }
.bento-section.in-view .bento-card:nth-child(8) { animation-delay: 0.8s; }
.bento-section.in-view .bento-card:nth-child(9) { animation-delay: 0.9s; }

@keyframes cardRevealBento {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bento-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  background: rgba(255, 255, 255, 0.04);
}

/* Remove dark mode adjustments as we're now using the hero statement style */

.bento-card.col-span-1 {
  grid-column: span 1;
}

.bento-card.col-span-2 {
  grid-column: span 2;
}

.bento-card.col-span-3 {
  grid-column: span 3;
}

/* Large screen (lg) specific grid spans */
@media (min-width: 1024px) {
  .bento-card.lg-col-span-1 {
    grid-column: span 1;
  }

  .bento-card.lg-col-span-2 {
    grid-column: span 2;
  }
}

.bento-card-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-card-icon {
  width: 24px;
  height: 24px;
  color: #e0e0e0;
  opacity: 0.85;
}

.bento-card-title {
  font-size: 20px;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0;
  font-family: var(--font-main);
}

.bento-card-description {
  font-size: 14px;
  color: rgba(200, 200, 200, 0.85);
  opacity: 0.9;
  line-height: 1.5;
  margin: 0;
  font-family: var(--font-main);
}

.bento-card-footer {
  margin-top: auto;
  padding-top: 16px;
}

.bento-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #5a9fd8;
  text-decoration: none;
  transition: color 0.2s ease;
  font-family: var(--font-main);
}

.bento-card-cta:hover {
  color: #7bb3e4;
}

.bento-card-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* File Marquee Styles - positioned like in React component */
.file-marquee {
  position: absolute;
  top: 40px; /* top-10 */
  left: 0;
  right: 0;
  height: 200px;
  overflow: hidden;
  mask-image: linear-gradient(to top, transparent 40%, #000 100%); /* [mask-image:linear-gradient(to_top,transparent_40%,#000_100%)] */
  -webkit-mask-image: linear-gradient(to top, transparent 40%, #000 100%);
}

.file-marquee-content {
  display: flex;
  gap: 16px;
  animation: marquee 20s linear infinite;
  will-change: transform;
  min-width: 100%;
}

.file-marquee-content:nth-child(2) {
  animation: marquee 20s linear infinite;
}

.file-marquee:hover .file-marquee-content {
  animation-play-state: paused;
}

.file-card {
  min-width: 128px;
  width: 128px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.3s ease;
  filter: blur(1px);
  transform: translateZ(0); /* Enable GPU acceleration */
}

.file-card:hover {
  background: rgba(255, 255, 255, 0.06);
  filter: blur(0);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Remove dark mode adjustments */

.file-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.file-card-name {
  font-size: 14px;
  font-weight: 500;
  color: #e8e8e8;
  margin: 0;
  font-family: var(--font-main);
}

.file-card-body {
  font-size: 12px;
  color: rgba(200, 200, 200, 0.8);
  opacity: 0.9;
  line-height: 1.4;
  font-family: var(--font-main);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* Add subtle blur animation for file cards */
@keyframes fileBlur {
  0%, 100% {
    filter: blur(1px);
  }
  50% {
    filter: blur(0.5px);
  }
}

.file-card {
  animation: fileBlur 3s ease-in-out infinite;
  animation-delay: calc(var(--card-index, 0) * 0.5s);
}

/* Animated List Styles - positioned like in React component */
.animated-list {
  position: absolute;
  top: 16px; /* top-4 */
  right: 8px; /* right-2 */
  height: 300px; /* h-[300px] */
  width: 100%;
  transform: scale(0.75); /* scale-75 */
  border: none; /* border-none */
  mask-image: linear-gradient(to top, transparent 10%, #000 100%); /* [mask-image:linear-gradient(to_top,transparent_10%,#000_100%)] */
  -webkit-mask-image: linear-gradient(to top, transparent 10%, #000 100%);
  transition: all 0.3s ease; /* transition-all duration-300 ease-out */
}

.bento-card:hover .animated-list {
  transform: scale(0.9); /* group-hover:scale-90 */
}

.notification-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  animation: slideIn 0.5s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

/* Remove dark mode adjustments */

.notification-item:nth-child(1) { animation-delay: 0.1s; }
.notification-item:nth-child(2) { animation-delay: 0.2s; }
.notification-item:nth-child(3) { animation-delay: 0.3s; }
.notification-item:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5a9fd8;
}

.notification-content {
  flex: 1;
}

.notification-title {
  font-size: 14px;
  font-weight: 500;
  color: #e8e8e8;
  margin: 0 0 4px 0;
  font-family: var(--font-main);
}

.notification-description {
  font-size: 12px;
  color: rgba(200, 200, 200, 0.8);
  opacity: 0.9;
  margin: 0;
  font-family: var(--font-main);
}

/* Integrations Logos Styles */
.integrations-logos {
  position: absolute;
  top: 16px;
  right: 8px;
  width: 400px;
  height: 300px;
  border: none;
  mask-image: linear-gradient(to top, transparent 10%, #000 100%);
  -webkit-mask-image: linear-gradient(to top, transparent 10%, #000 100%);
  transition: all 0.3s ease;
  overflow: hidden;
}

.bento-card:hover .integrations-logos {
  transform: scale(1.05);
}

.logo-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 20px;
  padding: 20px;
}

.logo-item {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  opacity: 0.8;
}

.logo-item svg {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.logo-item:hover {
  transform: translateY(-4px) scale(1.1);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  opacity: 1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Floating animation for logos */
.logo-item {
  animation: float 6s ease-in-out infinite;
}

.logo-item:nth-child(2n) {
  animation-delay: -2s;
}

.logo-item:nth-child(3n) {
  animation-delay: -4s;
}

.logo-item:nth-child(4n) {
  animation-delay: -1s;
}

.logo-item:nth-child(5n) {
  animation-delay: -3s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Specific logo positioning to create organic layout */
.logo-figma {
  grid-column: 1;
  grid-row: 1;
}

.logo-wordpress {
  grid-column: 2;
  grid-row: 1;
}

.logo-webflow {
  grid-column: 3;
  grid-row: 1;
}

.logo-squarespace {
  grid-column: 1;
  grid-row: 2;
}

.logo-slack {
  grid-column: 2;
  grid-row: 2;
}

.logo-adobe {
  grid-column: 3;
  grid-row: 2;
}

.logo-shopify {
  grid-column: 1;
  grid-row: 3;
}

.logo-notion {
  grid-column: 2;
  grid-row: 3;
}

.logo-discord {
  grid-column: 3;
  grid-row: 3;
  margin-top: -20px; /* Create some visual variety */
}

.logo-github {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0.6;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

/* Animated Beam Styles - positioned like in React component */
.animated-beam {
  position: absolute;
  top: 16px; /* top-4 */
  right: 8px; /* right-2 */
  height: 300px; /* h-[300px] */
  border: none; /* border-none */
  mask-image: linear-gradient(to top, transparent 10%, #000 100%); /* [mask-image:linear-gradient(to_top,transparent_10%,#000_100%)] */
  -webkit-mask-image: linear-gradient(to top, transparent 10%, #000 100%);
  transition: all 0.3s ease; /* transition-all duration-300 ease-out */
}

.bento-card:hover .animated-beam {
  transform: scale(1.05); /* group-hover:scale-105 */
}

.beam-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beam-center {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1A4D6F;
  position: relative;
  z-index: 2;
}

.beam-node {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #4A90E2;
}

.beam-node:nth-child(1) { top: 20px; left: 20px; }
.beam-node:nth-child(2) { top: 20px; right: 20px; }
.beam-node:nth-child(3) { bottom: 20px; left: 20px; }
.beam-node:nth-child(4) { bottom: 20px; right: 20px; }

/* Calendar Styles - positioned like in React component */
.calendar-widget {
  position: absolute;
  top: 40px; /* top-10 */
  right: 0; /* right-0 */
  transform: scale(0.75) translateY(0); /* origin-top scale-75 */
  transform-origin: top; /* origin-top */
  border-radius: 12px; /* rounded-md */
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 16px;
  mask-image: linear-gradient(to top, transparent 40%, #000 100%); /* [mask-image:linear-gradient(to_top,transparent_40%,#000_100%)] */
  -webkit-mask-image: linear-gradient(to top, transparent 40%, #000 100%);
  transition: all 0.3s ease; /* transition-all duration-300 ease-out */
}

.bento-card:hover .calendar-widget {
  transform: scale(0.9) translateY(0); /* group-hover:scale-90 */
  transform-origin: top;
}

/* Remove dark mode adjustments */

.calendar-header {
  text-align: center;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  font-family: var(--font-main);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.9;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-main);
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.1);
  opacity: 1;
}

.calendar-day.selected {
  background: #4A90E2;
  color: #ffffff;
  opacity: 1;
}

.calendar-day.today {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  opacity: 1;
}

/* Remove dark mode adjustments */

/* Responsive Design */
/* Mobile first - all cards take full width */
@media (max-width: 1023px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  
  .bento-card.col-span-1,
  .bento-card.col-span-2, 
  .bento-card.col-span-3,
  .bento-card.lg-col-span-1,
  .bento-card.lg-col-span-2 {
    grid-column: span 1;
  }
}

/* Large screens - use the specified lg column spans */
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .bento-section {
    padding: 80px 16px;
  }
  
  .bento-grid {
    gap: 16px;
  }
  
  .bento-card {
    min-height: 200px;
  }
  
  /* Responsive integrations logos */
  .integrations-logos {
    width: 300px;
    height: 200px;
  }
  
  .logo-container {
    gap: 12px;
    padding: 12px;
  }
  
  .logo-item {
    width: 36px;
    height: 36px;
  }
  
  .logo-item svg {
    width: 18px;
    height: 18px;
  }
  
  /* Show simplified versions on mobile */
  .file-marquee,
  .animated-list,
  .animated-beam,
  .calendar-widget {
    opacity: 0.3;
    pointer-events: none;
  }
}

/* ========================================
   ENHANCED MOBILE RESPONSIVE STYLES
   ======================================== */

/* Large Phones (480px and below) */
@media (max-width: 480px) {
  .bento-section {
    padding: 60px 12px;
    min-height: auto;
  }

  .bento-section::before {
    height: 60px;
  }

  .bento-grid {
    gap: 12px;
    grid-auto-rows: minmax(250px, auto);
  }

  .bento-card {
    padding: 20px;
    min-height: 250px;
    border-radius: 10px;
  }

  .bento-card-header {
    gap: 10px;
  }

  .bento-card-icon {
    width: 20px;
    height: 20px;
  }

  .bento-card-title {
    font-size: 18px;
    line-height: 1.3;
  }

  .bento-card-description {
    font-size: 13px;
    line-height: 1.5;
  }

  /* Adjust specific card features */
  .integrations-logos {
    width: 250px;
    height: 180px;
  }

  .logo-container {
    gap: 10px;
    padding: 10px;
  }

  .logo-item {
    width: 32px;
    height: 32px;
  }

  .logo-item svg {
    width: 16px;
    height: 16px;
  }

  /* Calendar widget adjustments */
  .calendar-header h3 {
    font-size: 14px;
  }

  .calendar-date {
    font-size: 11px;
  }

  .month-grid {
    gap: 4px;
  }

  .day {
    font-size: 11px;
  }

  /* Code block adjustments */
  .code-block {
    font-size: 11px;
    padding: 12px;
  }

  /* Chart and graph adjustments */
  .chart-container,
  .graph-container {
    height: 160px;
  }
}

/* Very Small Phones (375px and below) */
@media (max-width: 375px) {
  .bento-section {
    padding: 50px 10px;
  }

  .bento-grid {
    gap: 10px;
    grid-auto-rows: minmax(220px, auto);
  }

  .bento-card {
    padding: 16px;
    min-height: 220px;
    border-radius: 8px;
  }

  .bento-card-header {
    gap: 8px;
  }

  .bento-card-icon {
    width: 18px;
    height: 18px;
  }

  .bento-card-title {
    font-size: 16px;
  }

  .bento-card-description {
    font-size: 12px;
    line-height: 1.45;
  }

  .integrations-logos {
    width: 220px;
    height: 160px;
  }

  .logo-container {
    gap: 8px;
    padding: 8px;
  }

  .logo-item {
    width: 28px;
    height: 28px;
  }

  .logo-item svg {
    width: 14px;
    height: 14px;
  }

  .code-block {
    font-size: 10px;
    padding: 10px;
  }

  .chart-container,
  .graph-container {
    height: 140px;
  }
}

/* Extra Small Phones (320px) */
@media (max-width: 320px) {
  .bento-section {
    padding: 40px 8px;
  }

  .bento-grid {
    gap: 8px;
    grid-auto-rows: minmax(200px, auto);
  }

  .bento-card {
    padding: 14px;
    min-height: 200px;
  }

  .bento-card-title {
    font-size: 15px;
  }

  .bento-card-description {
    font-size: 11px;
  }

  .integrations-logos {
    width: 200px;
    height: 140px;
  }

  .logo-item {
    width: 24px;
    height: 24px;
  }

  .logo-item svg {
    width: 12px;
    height: 12px;
  }
}

/* Tablet Landscape and Medium Screens (769px - 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  .bento-section {
    padding: 100px 20px;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    grid-auto-rows: minmax(280px, auto);
  }

  .bento-card {
    padding: 22px;
    min-height: 280px;
  }

  .bento-card.col-span-2,
  .bento-card.col-span-3 {
    grid-column: span 2;
  }

  .bento-card.col-span-1 {
    grid-column: span 1;
  }
}

/* Landscape Mobile Orientation */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 900px) {
  .bento-section {
    padding: 40px 16px;
    min-height: auto;
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    grid-auto-rows: minmax(200px, auto);
  }

  .bento-card {
    padding: 16px;
    min-height: 200px;
  }

  .bento-card-title {
    font-size: 16px;
  }

  .bento-card-description {
    font-size: 12px;
  }

  .integrations-logos {
    width: 220px;
    height: 150px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .bento-card {
    /* Remove hover effects on touch devices */
    transition: transform 0.2s ease;
  }

  .bento-card:active {
    transform: scale(0.98);
  }

  /* Ensure minimum touch targets */
  .bento-card {
    min-height: 250px;
  }

  /* Disable complex animations on touch devices for better performance */
  .file-marquee,
  .animated-list {
    animation-duration: 20s; /* Slow down animations */
  }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .bento-card-icon,
  .logo-item svg {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .bento-grid,
  .bento-card {
    transition: none;
    animation: none !important;
  }

  .bento-section.in-view .bento-grid,
  .bento-section.in-view .bento-card {
    opacity: 1;
    transform: none;
  }

  .file-marquee,
  .animated-list,
  .animated-beam {
    animation: none !important;
  }
}

/* Improve readability on small screens */
@media (max-width: 480px) {
  .bento-card-header {
    margin-bottom: 12px;
  }

  /* Ensure text doesn't overflow */
  .bento-card-title,
  .bento-card-description {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Better spacing for card content */
  .bento-card-content > * + * {
    margin-top: 12px;
  }
}