/* ============================================
   V-SKY SYSTEMS — Mobile & touch-specific layout
   Not a scaled-down desktop: adapted for narrow
   viewports and touch interaction (iOS/Android).
   ============================================ */

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .back-controls {
    bottom: calc(16px + env(safe-area-inset-bottom));
    right: calc(16px + env(safe-area-inset-right));
  }

  .footer__bottom {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* Tablet: 768–1023px */
@media (max-width: 1023px) {
  .section {
    padding: 80px 0;
  }

  .container {
    padding: 0 24px;
  }

  .hero__title {
    font-size: clamp(2.25rem, 8vw, 3.5rem);
  }

  .page-hero {
    min-height: 380px;
    padding-bottom: 48px;
  }

  /* Mobile-first image crop: focus on aircraft centre */
  .hero__bg picture img,
  .page-hero__bg picture img {
    object-position: center 35%;
  }

  .capability-tiles {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .capability-tile {
    min-height: 120px;
    padding: 20px 16px;
  }

  .comparison-grid {
    font-size: 0.9375rem;
  }
}

/* Smartphone: max 767px */
@media (max-width: 767px) {
  :root {
    --header-height: 80px;
  }

  .nav__logo img {
    height: 64px;
    max-width: 160px;
  }

  body {
    font-size: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .section__title {
    font-size: clamp(1.875rem, 7vw, 2.5rem);
    margin-bottom: 24px;
  }

  .hero {
    min-height: 100svh;
    min-height: 100dvh;
  }

  .hero__subtitle {
    font-size: 1rem;
    line-height: 1.75;
  }

  .hero__scroll {
    display: none;
  }

  .page-hero {
    min-height: 280px;
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 32px;
  }

  .page-hero--compact {
    min-height: 240px;
  }

  .page-hero__subtitle {
    font-size: 0.9375rem;
  }

  .page-hero__actions {
    width: 100%;
  }

  .page-hero__actions .btn {
    width: 100%;
  }

  .video-modal {
    padding: 12px;
  }

  .video-modal__header {
    padding: 12px 14px;
  }

  .video-modal__close {
    min-width: 44px;
    min-height: 44px;
  }

  /* Touch targets: minimum 44×44px (WCAG 2.5.5) */
  .btn {
    min-height: 48px;
    padding: 16px 28px;
    width: 100%;
    max-width: none;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .hero__actions .btn {
    max-width: 100%;
  }

  .nav__toggle {
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav__link {
    display: block;
    padding: 14px 0;
    font-size: 0.875rem;
    min-height: 48px;
    line-height: 1.4;
  }

  /* Full-screen mobile nav drawer */
  .nav__right {
    padding: 48px 32px;
    gap: 40px;
  }

  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .stats__number {
    font-size: 1.5rem;
  }

  .stats__label {
    font-size: 0.625rem;
  }

  /* Capability nav cards — touch-friendly tiles */
  .capability-nav {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .capability-nav__card {
    min-height: auto;
    padding: 24px 20px;
    -webkit-tap-highlight-color: transparent;
  }

  .capability-nav__arrow {
    opacity: 1;
    transform: none;
  }

  /* Footer capability tiles — full width stack */
  .capability-tiles {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .capability-tile {
    min-height: 72px;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
  }

  .capability-tile__title {
    font-size: 0.875rem;
    flex: 1;
  }

  .capability-tile__arrow {
    opacity: 1;
    transform: none;
    align-self: center;
  }

  /* Forms — touch-friendly inputs */
  .form__group input,
  .form__group textarea,
  .form__group select {
    min-height: 48px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .form__group textarea {
    min-height: 140px;
  }

  .contact__form {
    padding: 24px 20px;
  }

  /* Technical diagrams — readable on narrow screens */
  .system-blocks {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .system-block {
    padding: 20px 16px;
  }

  .comparison-grid__cell {
    padding: 16px;
  }

  .tech-concept {
    gap: 24px;
  }

  .tech-concept__visual img,
  .content-split__visual picture img {
    object-position: center center;
  }

  .cta-banner {
    padding: 64px 0;
  }

  .cta-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .back-control {
    min-height: 44px;
    padding: 12px 18px;
  }

  .footer__capabilities {
    padding: 40px 0;
  }
}

/* Small phones: max 390px (iPhone SE, compact Android) */
@media (max-width: 390px) {
  .container {
    padding: 0 16px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .stats__grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .capability-nav__title {
    font-size: 1.125rem;
  }
}

/* Landscape phone */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: calc(var(--header-height) + 24px) 0 48px;
  }

  .page-hero {
    min-height: 220px;
  }

  .nav__right {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
  }

  .nav__menu {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px 24px;
  }
}
