/* === MOBILE FIRST RESPONSIVE DESIGN === */

/* Base mobile styles (320px+) */
.hero {
  padding: 1rem;
  height: 100vh;
  min-height: 600px;
}

.hero__title {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0;
}

.hero__canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Riduce complessità su mobile */
  opacity: 0.7;
}

/* Sistema di breakpoint */
@media (min-width: 480px) {
  .hero__title {
    font-size: 2.5rem;
  }
}

@media (min-width: 768px) {
  .hero {
    padding: 2rem;
  }
  
  .hero__title {
    font-size: 3.5rem;
  }
  
  .hero__canvas {
    opacity: 1;
  }
}

@media (min-width: 1024px) {
  .hero__title {
    font-size: 4rem;
  }
}

@media (min-width: 1440px) {
  .hero {
    padding: 3rem;
  }
  
  .hero__title {
    font-size: 4.5rem;
  }
}

/* === PERFORMANCE OPTIMIZATIONS === */

/* Riduce animazioni su dispositivi low-end */
@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  .parallax-image {
    transform: none !important;
    transition: opacity 0.3s ease !important;
  }
  
  .particles-canvas {
    display: none; /* Disabilita particelle su mobile */
  }
  
  /* Semplifica animazioni */
  .text-compose span {
    animation-duration: 0.3s !important;
    animation-delay: 0s !important;
  }
}

/* === TOUCH OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {
  /* Touch device styles */
  .project-card {
    transform: none !important;
    transition: background-color 0.2s ease;
  }
  
  .project-card:active {
    background-color: rgba(94, 228, 195, 0.1);
  }
  
  /* Larger touch targets */
  .breadcrumb-item,
  .project-nav-arrow {
    min-height: 44px;
    min-width: 44px;
  }
}

/* === DEVICE-SPECIFIC OPTIMIZATIONS === */

/* iPhone safe areas */
@supports (padding: max(0px)) {
  .hero,
  .navigation {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
  
  .navigation {
    padding-top: max(0.5rem, env(safe-area-inset-top));
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero__canvas {
    image-rendering: crisp-edges;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #ffffff;
    --bg-color: #000000;
  }
}

/* === CONTAINER QUERIES (when supported) === */
@container (max-width: 400px) {
  .project-card {
    min-width: 100%;
    margin-bottom: 1rem;
  }
}
/* Responsive */
@media (max-width: 768px) {
  .editorial-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .editorial-sidebar {
    grid-column: 1;
    padding-left: 0;
    margin-top: var(--spacing-md);
  }

  .content-block-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }

  .drop-cap {
    font-size: 3rem;
  }

  .flex-2col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-header {
    padding-left: 1rem;
    text-align: center;
  }

  .hero-text-wrapper {
    padding-left: 1rem;
    max-width: 100%;
    text-align: center;
  }

  .content-column,
  .image-column {
    border-radius: 1rem;
  }

  .content-column {
    padding: 1.5rem;
  }
}

/* Mobile responsive for SubHero CTA */
@media (max-width: 768px) {
  .subhero-cta-layout {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1.5rem !important;
  }
  
  .frame-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1.5rem !important;
  }
  
  .subhero-text-content {
    max-width: 100% !important;
  }
  
  .subhero-cta-content {
    width: 100% !important;
  }
  
  .btn-editorial-inline {
    width: 100% !important;
  }
}