/* Startune - Responsive Styles */

/* ========================================
   BREAKPOINTS
   ======================================== */
/* Mobile: < 640px */
/* Tablet: 640px - 1024px */
/* Desktop: > 1024px */
/* Wide: > 1280px */

/* ========================================
   BASE RESPONSIVE
   ======================================== */
@media (max-width: 640px) {
  :root {
    --container-padding: var(--space-4);
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  :root {
    --container-padding: var(--space-6);
  }
}

@media (min-width: 1281px) {
  :root {
    --container-padding: var(--space-8);
  }
}

/* ========================================
   MOBILE (< 640px)
   ======================================== */
@media (max-width: 640px) {
  /* Section Spacing */
  .section { padding: var(--space-12) 0; }
  .section-lg { padding: var(--space-16) 0; }
  .section-sm { padding: var(--space-8) 0; }

  /* Hero Mobile */
  .hero {
    min-height: auto;
    padding: var(--space-16) 0 var(--space-12);
  }

  .hero-content {
    text-align: center;
    padding: 0 var(--space-4);
  }

  .hero-subtitle {
    font-size: var(--text-base);
    padding: 0 var(--space-4);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    padding: 0 var(--space-4);
  }

  .hero-actions .btn,
  .hero-actions a {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }

  /* Navigation Mobile */
  .nav-desktop {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--surface);
    z-index: var(--z-modal);
    transition: right 0.3s ease;
    padding: var(--space-6);
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
  }

  .mobile-menu.active {
    right: 0;
  }

  .mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  /* Cards Mobile */
  .card {
    padding: var(--space-4);
  }

  .card-icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  /* Bento Mobile */
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-item-featured,
  .bento-item-wide,
  .bento-item-normal {
    grid-column: span 1;
  }

  /* Suite Cards Mobile */
  .suite-grid {
    grid-template-columns: 1fr;
  }

  .suite-card {
    padding: var(--space-6);
  }

  .suite-card-featured {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Service Cards Mobile */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Stats Mobile */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .stat-card {
    padding: var(--space-4);
  }

  .stat-value {
    font-size: var(--text-2xl);
  }

  /* Table Mobile */
  .data-table {
    font-size: var(--text-sm);
  }

  .data-table th,
  .data-table td {
    padding: var(--space-3);
  }

  /* Process Steps Mobile */
  .process-steps::before {
    left: 24px;
  }

  .process-step {
    flex-direction: column;
    gap: var(--space-4);
  }

  .process-step-number {
    width: 48px;
    height: 48px;
    font-size: var(--text-lg);
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Grid Mobile */
  .grid-cols-2 { grid-template-columns: repeat(1, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(1, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(1, 1fr); }

  /* CTA Mobile */
  .cta-section {
    padding: var(--space-12) 0;
  }

  .cta-title {
    font-size: var(--text-2xl);
  }

  .cta-description {
    font-size: var(--text-base);
    padding: 0 var(--space-4);
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
    padding: 0 var(--space-4);
  }

  .btn-lg {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Contact Mobile */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Service Filters Mobile */
  .filter-grid {
    gap: var(--space-2);
  }

  .filter-btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  /* Modal Mobile */
  .modal-content {
    margin: var(--space-4);
    max-height: calc(100vh - var(--space-8));
    overflow-y: auto;
  }
}

/* ========================================
   TABLET (640px - 1024px)
   ======================================== */
@media (min-width: 641px) and (max-width: 1024px) {
  /* Section Spacing */
  .section { padding: var(--space-16) 0; }

  /* Navigation Tablet */
  .nav-desktop {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
  }

  /* Bento Tablet */
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .bento-item-featured {
    grid-column: span 3;
    grid-row: span 1;
  }

  .bento-item-wide {
    grid-column: span 3;
  }

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

  /* Suite Cards Tablet */
  .suite-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .suite-card-featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  /* Service Cards Tablet */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Stats Tablet */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Grid Tablet */
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }

  /* Footer Tablet */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }

  /* Process Tablet */
  .process-steps {
    gap: var(--space-6);
  }

  /* CTA Tablet */
  .cta-section {
    padding: var(--space-16) 0;
  }

  /* Contact Tablet */
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   DESKTOP (> 1024px)
   ======================================== */
@media (min-width: 1025px) {
  .nav-desktop {
    display: flex !important;
  }

  .mobile-menu-toggle {
    display: none !important;
  }

  .mobile-menu {
    display: none !important;
  }

  .mobile-menu-backdrop {
    display: none !important;
  }
}

/* ========================================
   WIDE (> 1280px)
   ======================================== */
@media (min-width: 1281px) {
  .section-lg { padding: var(--space-24) 0; }
}

/* ========================================
   CONTAINER QUERIES
   ======================================== */
@container (max-width: 480px) {
  .card {
    padding: var(--space-3);
  }

  .card-icon {
    width: 40px;
    height: 40px;
  }
}

@container (min-width: 481px) {
  .card-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   RESPONSIVE TYPOGRAPHY
   ======================================== */
@media (max-width: 768px) {
  .display-xl {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .display-lg {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }

  .headline-xl {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .headline-lg {
    font-size: clamp(1.25rem, 4vw, 2rem);
  }

  .hero-title {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .section-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
  }

  .cta-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
  }
}

/* ========================================
   RESPONSIVE SPACING
   ======================================== */
@media (max-width: 768px) {
  .mt-8 { margin-top: var(--space-6); }
  .mb-8 { margin-bottom: var(--space-6); }
  .gap-8 { gap: var(--space-6); }
  .section { padding: var(--space-12) 0; }
}

/* ========================================
   IMAGE RESPONSIVE
   ======================================== */
img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

.responsive-img {
  width: 100%;
  height: auto;
}

.responsive-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ========================================
   VIDEO RESPONSIVE
   ======================================== */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ========================================
   ASPECT RATIOS
   ======================================== */
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-portrait { aspect-ratio: 3 / 4; }
.aspect-wide { aspect-ratio: 21 / 9; }

/* ========================================
   CONTAINER MAX WIDTH
   ======================================== */
@media (max-width: 640px) {
  .container { max-width: 100%; }
}

@media (min-width: 641px) {
  .container { max-width: 640px; }
}

@media (min-width: 768px) {
  .container { max-width: 768px; }
}

@media (min-width: 1024px) {
  .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
  .container { max-width: 1280px; }
}

/* ========================================
   STICKY ELEMENTS
   ======================================== */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

@media (max-width: 640px) {
  .sticky-top {
    position: relative;
  }
}

/* ========================================
   ORIENTATION
   ======================================== */
@media (orientation: landscape) and (max-height: 500px) {
  .hero {
    min-height: auto;
    padding: var(--space-8) 0;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .hero,
  .animations,
  .parallax-container,
  .mobile-menu-toggle,
  .scroll-progress,
  .cursor-follower {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .footer {
    background: #f5f5f5;
    padding: var(--space-8) 0;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-contrast: high) {
  :root {
    --glass-border: rgba(0, 0, 0, 0.3);
    --outline: #000;
  }

  .card {
    border: 2px solid var(--on-surface);
  }

  .btn-primary {
    border: 2px solid var(--on-primary);
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Hide on specific breakpoints */
.hide-mobile {
  display: none;
}

@media (min-width: 641px) {
  .hide-mobile {
    display: block;
  }
}

.hide-desktop {
  display: block;
}

@media (min-width: 1025px) {
  .hide-desktop {
    display: none;
  }
}

/* ========================================
   SMOOTH SCROLL LOCK (for modals)
   ======================================== */
body.scroll-lock {
  overflow: hidden;
  padding-right: var(--scrollbar-width, 0);
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-up,
  .fade-in,
  .fade-left,
  .fade-right,
  .scale-up {
    opacity: 1;
    transform: none;
  }

  .parallax-layer {
    transform: none !important;
  }

  .hero-blur-1,
  .hero-blur-2,
  .hero-blur-3 {
    animation: none;
  }
}

/* ========================================
   HIGH DPI DISPLAYS
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .glass-card,
  .glass-card:hover {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }
}

/* ========================================
   SPECIAL CASES
   ======================================== */

/* Extra small devices */
@media (max-width: 375px) {
  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }

  .suite-card-icon {
    width: 48px;
    height: 48px;
  }

  .suite-card-icon .material-symbols-rounded {
    font-size: 24px;
  }
}

/* Large phones / Small tablets */
@media (min-width: 375px) and (max-width: 640px) {
  .hero-actions .btn {
    max-width: 320px;
  }
}

/* Large tablets / Small laptops */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
  }
}

/* Large desktops */
@media (min-width: 1440px) {
  :root {
    --container-max: 1440px;
  }

  .hero-title {
    font-size: var(--text-6xl);
  }

  .cta-title {
    font-size: var(--text-5xl);
  }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
  :root {
    --container-max: 1600px;
  }
}
