/* ============================================
   MOBILE-FIRST OPTIMIZATIONS
   Violet Rae - Ultra-Mobile Experience
   ============================================ */

/* Mobile Typography Enhancements */
@media (max-width: 768px) {
  body {
    font-size: 16px; /* Prevents iOS zoom on input focus */
  }

  .section__title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    line-height: 1.25;
  }

  .section__subtitle {
    font-size: 1rem;
    line-height: 1.7;
  }

  .section__label {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
  }
}

/* Enhanced Mobile Navigation */
@media (max-width: 768px) {
  .top-nav {
    padding: 0.8rem 1.2rem;
    position: fixed;
    backdrop-filter: blur(20px);
  }

  .brand-mark {
    font-size: 0.85rem;
  }

  .brand-mark__icon {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }

  .mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(
      135deg,
      rgba(2, 3, 10, 0.98),
      rgba(5, 8, 22, 0.98)
    );
    backdrop-filter: blur(30px);
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    padding: 5rem 2rem 2rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-links.active {
    right: 0;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
  }

  .nav-link,
  .nav-cta {
    font-size: 1.1rem;
    width: 100%;
    text-align: left;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-cta {
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.3);
  }

  .mobile-menu-overlay {
    display: block;
  }

  .mobile-menu-overlay.active {
    display: block;
  }
}

/* Mobile Section Optimization */
@media (max-width: 768px) {
  main {
    padding: 4rem 0 2rem;
  }

  .depth-wrapper {
    padding: 1rem 1rem 3rem;
    perspective: 1000px;
  }

  .section {
    min-height: auto;
    margin-bottom: 3rem;
    padding: 2rem 1.5rem;
    border-radius: 24px;
  }

  .section--hero {
    min-height: 85vh;
    padding: 2.5rem 1.5rem;
  }
}

/* Mobile Stats - Full Optimization */
@media (max-width: 768px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .stat-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.1);
  }

  .stat-number {
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
  }

  .stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
  }
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

/* Mobile Gallery - Enhanced */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .gallery-tile {
    border-radius: 16px;
  }

  .gallery-tile__icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-tile {
    aspect-ratio: 3 / 4;
    max-height: 500px;
  }
}

/* Mobile Lightbox Optimization */
@media (max-width: 768px) {
  .lightbox__content {
    max-width: 95vw;
    max-height: 85vh;
  }

  .lightbox__image {
    max-height: 75vh;
    border-radius: 12px;
  }

  .lightbox__close {
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }

  .lightbox__prev,
  .lightbox__next {
    width: 45px;
    height: 45px;
    bottom: 1rem;
    top: auto;
  }

  .lightbox__prev {
    left: 1rem;
  }

  .lightbox__next {
    right: 1rem;
  }

  .lightbox__counter {
    margin-top: 1rem;
    font-size: 0.85rem;
  }
}

/* Mobile Services List */
@media (max-width: 768px) {
  .services-list {
    gap: 1rem;
  }

  .services-list li {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.2rem;
    border-radius: 20px;
    gap: 0.8rem;
  }

  .services-label {
    font-size: 1rem;
  }

  .services-meta {
    font-size: 0.85rem;
    margin-top: 0.3rem;
  }

  .services-rate {
    font-size: 1.4rem;
    margin-top: 0.5rem;
    align-self: flex-end;
  }

  .luxury-note {
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 16px;
  }

  .booking-footnote {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }
}

/* Mobile Testimonials */
@media (max-width: 768px) {
  .testimonial-card {
    padding: 1.8rem 1.5rem;
    border-radius: 20px;
  }

  .testimonial-stars {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
  }

  .testimonial-author {
    padding-top: 1.2rem;
  }

  .testimonial-initial {
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  .testimonial-name {
    font-size: 0.95rem;
  }

  .testimonial-meta {
    font-size: 0.8rem;
  }

  .testimonial-controls {
    margin-top: 1.5rem;
    gap: 1rem;
  }

  .testimonial-btn {
    width: 40px;
    height: 40px;
  }

  .testimonial-dot {
    width: 10px;
    height: 10px;
  }
}

/* Mobile Form Optimization */
@media (max-width: 768px) {
  .booking-form {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .field {
    gap: 0.5rem;
  }

  .field label {
    font-size: 0.8rem;
    font-weight: 500;
  }

  .field input,
  .field textarea,
  .field select {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 1rem;
    border-radius: 12px;
    min-height: 48px; /* Touch-friendly */
  }

  .field textarea {
    min-height: 120px;
    border-radius: 16px;
  }

  .primary-button {
    width: 100%;
    padding: 1.1rem 2rem;
    font-size: 0.95rem;
    min-height: 52px; /* Touch-friendly */
    border-radius: 14px;
  }

  .booking-actions {
    margin-top: 1rem;
  }
}

/* Mobile Buttons - Enhanced Touch Targets */
@media (max-width: 768px) {
  .primary-button,
  .ghost-link {
    min-height: 48px; /* Apple's recommended touch target */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .primary-button {
    padding: 1rem 2rem;
    font-size: 0.9rem;
  }

  .ghost-link {
    padding: 0.8rem 1rem;
    margin-top: 1rem;
    margin-left: 0;
    display: inline-flex;
  }

  .hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .hero-cta .primary-button {
    width: 100%;
  }
}

/* Mobile Pills */
@media (max-width: 768px) {
  .section__pill-row {
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .pill {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    border-radius: 20px;
  }
}

/* Mobile Footer */
@media (max-width: 768px) {
  footer {
    padding: 2rem 1.5rem;
  }

  .footer-content {
    gap: 1rem;
  }

  .footer-brand {
    font-size: 0.8rem;
  }

  .footer-links,
  .footer-social {
    font-size: 0.75rem;
  }

  .footer-legal {
    font-size: 0.7rem;
    margin-top: 0.5rem;
  }
}

/* Mobile Preloader */
@media (max-width: 768px) {
  .preloader__logo {
    font-size: 3rem;
  }

  .preloader__text {
    font-size: 1rem;
    letter-spacing: 0.25em;
  }

  .preloader__bar {
    width: 150px;
  }
}

/* Touch Optimization */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .gallery-tile__overlay {
    opacity: 0;
  }

  /* Make tap areas larger */
  .nav-link,
  .nav-cta {
    min-height: 48px;
  }

  /* Disable parallax on mobile for performance */
  .hero-bg-gradient {
    animation: none;
  }

  /* Simplify animations for better performance */
  .section {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
}

/* Landscape Mobile Optimization */
@media (max-width: 896px) and (orientation: landscape) {
  .section--hero {
    min-height: auto;
    padding: 2rem 1.5rem;
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }
}

/* Small Phones (< 375px) */
@media (max-width: 374px) {
  .section__title {
    font-size: 1.6rem;
  }

  .brand-mark {
    font-size: 0.75rem;
  }

  .brand-mark__icon {
    width: 30px;
    height: 30px;
  }

  .section {
    padding: 1.5rem 1.2rem;
  }

  .services-rate {
    font-size: 1.2rem;
  }

  .testimonial-text {
    font-size: 0.95rem;
  }
}

/* Safe Area Insets for Notched Devices */
@supports (padding: max(0px)) {
  .top-nav {
    padding-left: max(1.2rem, env(safe-area-inset-left));
    padding-right: max(1.2rem, env(safe-area-inset-right));
  }

  .nav-links {
    padding-top: max(5rem, env(safe-area-inset-top));
  }

  .section {
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
  }
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-bg-gradient,
  .pill--animated,
  .preloader__letter {
    animation: none !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  /* Already dark by default, but ensure consistency */
  body {
    background-color: #02030a;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .section {
    border: 2px solid rgba(212, 175, 55, 0.5);
  }

  .pill,
  .nav-cta {
    border-width: 2px;
  }
}

