/* Mobicolon — Mobile & tablet only (desktop lg+ unchanged) */

@media (max-width: 1023px) {
  /* Safe areas & overflow */
  html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
  }

  body {
    overflow-x: hidden;
  }



  img,
  video,
  svg {
    max-width: 100%;
  }

  /* Equal horizontal margins */
  .container-main {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  /* Sticky navigation — always visible glass bar */
  .site-nav {
    background-color: rgba(248, 250, 252, 0.88);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  }

  .dark .site-nav {
    background-color: rgba(15, 23, 42, 0.9);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .site-nav.nav-scrolled {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
  }

  /* Mobile menu backdrop */
  .mobile-menu-backdrop {
    position: fixed;
    inset: 72px 0 0 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .dark .mobile-menu-backdrop {
    background: rgba(0, 0, 0, 0.55);
  }

  /* Smooth full-height mobile menu */
  .mobile-menu {
    z-index: 45;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    transition:
      opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-menu.is-open {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  }

  .mobile-menu-link {
    min-height: 48px;
    padding: 0.875rem 1.25rem;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-actions {
    padding: 1rem 1.25rem max(1.25rem, env(safe-area-inset-bottom, 0px));
    gap: 0.75rem;
  }

  .mobile-menu-actions .btn {
    min-height: 48px;
    flex: 1;
  }

  #mobile-search-input {
    min-height: 48px;
    font-size: 16px;
  }

  /* Section rhythm */
  .section-padding {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .page-hero {
    padding-top: 112px;
    padding-bottom: 2.5rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .section-title {
    font-size: clamp(1.625rem, 5.5vw, 2.25rem);
    line-height: 1.15;
  }

  .section-desc {
    font-size: clamp(0.9375rem, 2.8vw, 1.0625rem);
    line-height: 1.65;
  }

  /* Touch targets */
  .btn,
  .icon-btn,
  .filter-pill,
  .filter-pill-active,
  .mobile-menu-link,
  .faq-item summary,
  .footer-links a,
  .social-link {
    touch-action: manipulation;
  }

  .btn {
    min-height: 48px;
  }

  .btn-lg {
    min-height: 52px;
    padding: 0.875rem 1.5rem;
  }

  .filter-pill,
  .filter-pill-active {
    min-height: 44px;
    padding: 0.625rem 1.125rem;
    font-size: 14px;
  }

  .icon-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Hamburger: icon-btn is row flex by default — stack lines vertically */
  #nav-toggle {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }

  #nav-toggle .hamburger-line {
    width: 1.125rem;
    flex-shrink: 0;
  }

  #nav-toggle .hamburger-line#bar1.is-open {
    transform: translateY(7px) rotate(45deg);
  }

  #nav-toggle .hamburger-line#bar2.is-open {
    opacity: 0;
    transform: scaleX(0);
  }

  #nav-toggle .hamburger-line#bar3.is-open {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-link {
    min-height: 44px;
  }

  /* Hero — headline first, device below */
  .hero {
    padding-top: calc(72px + 2rem);
    padding-bottom: 3rem;
  }

  .hero-inner {
    gap: 2.5rem;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
    margin-top: 0.5rem;
  }

  .hero-headline {
    font-size: clamp(1.875rem, 8.5vw, 2.75rem);
    line-height: 1.1;
  }

  .hero-subtitle {
    font-size: clamp(1rem, 3.8vw, 1.125rem);
    margin-bottom: 1.75rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    gap: 0.625rem;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-trust {
    font-size: 12px;
    gap: 0.375rem 0.75rem;
    justify-content: center;
  }

  .hero-device-wrap {
    max-width: 260px;
    margin: 0 auto;
  }

  .hero-bg-orb {
    display: none;
  }

  .hero-bg-grid {
    opacity: 0.2;
  }

  .hero-device {
    animation: none !important;
  }

  .hero-device-glow,
  .hero-device-reflection {
    opacity: 0.65;
  }

  /* Cards */
  .app-card {
    border-radius: 20px;
  }

  .app-card-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .app-card-actions .play-badge,
  .app-card-actions .link-arrow {
    min-height: 48px;
    justify-content: center;
    width: 100%;
  }

  .blog-card,
  .card {
    border-radius: 20px;
  }

  .blog-card-body {
    padding: 1.25rem;
  }

  .blog-toolbar {
    padding: 1rem;
    margin-bottom: 1.75rem;
  }

  .blog-toolbar-filters {
    gap: 0.5rem;
  }

  .blog-grid {
    gap: 1.25rem;
  }

  .blog-featured {
    border-radius: 20px;
  }

  .blog-featured-body {
    padding: 1.35rem;
  }

  /* FAQ */
  .faq-item summary {
    min-height: 56px;
    padding: 1rem 1.25rem;
    font-size: 15px;
    line-height: 1.45;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
  }

  .faq-answer,
  .faq-item [class*='px-5 pb-5'] {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    font-size: 15px;
    line-height: 1.65;
  }

  /* Footer */
  .site-footer {
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  }

  .footer-grid {
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-heading {
    margin-bottom: 0.875rem;
  }

  .footer-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.25rem 0;
    font-size: 15px;
  }

  .footer-bottom {
    padding-top: 1.5rem;
    gap: 1.25rem;
    text-align: center;
  }

  .social-link {
    min-height: 44px;
    min-width: 44px;
  }

  /* Forms */
  .form-input,
  .form-input textarea,
  textarea.form-input {
    font-size: 16px;
    min-height: 48px;
  }

  textarea.form-input {
    min-height: 140px;
  }

  .form-field {
    margin-bottom: 1.125rem;
  }

  .contact-card {
    padding: 1.125rem;
  }

  form.card {
    padding: 1.5rem !important;
  }

  /* Process timeline */
  .build-timeline {
    min-height: auto;
    padding: 0;
  }

  .build-timeline-card {
    padding: 1.125rem 1.2rem;
  }

  /* Grids — single column comfort */
  .grid.md\:grid-cols-2,
  .grid.lg\:grid-cols-3,
  .grid.sm\:grid-cols-2 {
    gap: 1.25rem;
  }

  /* CTA banner */
  .rounded-2xl.bg-gradient-to-br {
    padding: 2rem 1.5rem !important;
  }

  /* Subtle animations on mobile */
  .animate-float {
    animation: none !important;
  }

  .reveal {
    --tw-translate-y: 0.75rem;
    transition-duration: 0.55s !important;
  }

  .mockup-tile:hover,
  .hero-app-tile:hover,
  .blog-card:hover .blog-card-cover,
  .build-timeline-card:hover {
    transform: none;
  }

  .why-card:hover,
  .card-hover:hover {
    transform: none;
  }
}

/* Phone breakpoints */
@media (max-width: 767px) {
  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .hero-cta .btn,
  .mobile-menu-actions .btn,
  form .btn-primary,
  form .btn-lg {
    width: 100%;
  }

  .container-main {
    padding-left: max(1.125rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.125rem, env(safe-area-inset-right, 0px));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .blog-layout {
    gap: 2rem;
  }

  .hero-device-wrap {
    max-width: 240px;
  }
}

@media (max-width: 480px) {
  .container-main {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero {
    padding-top: calc(72px + 1.5rem);
    padding-bottom: 2.5rem;
  }

  .hero-badge {
    font-size: 12px;
    margin-bottom: 1.25rem;
  }

  .hero-device-wrap {
    max-width: 220px;
  }

  .blog-toolbar-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    scrollbar-width: none;
  }

  .blog-toolbar-filters::-webkit-scrollbar {
    display: none;
  }

  .blog-toolbar-filters .filter-pill,
  .blog-toolbar-filters .filter-pill-active {
    flex-shrink: 0;
  }

  #category-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  #category-filters::-webkit-scrollbar {
    display: none;
  }

  #category-filters .filter-pill,
  #category-filters .filter-pill-active {
    flex-shrink: 0;
  }
}

@media (max-width: 360px) {
  .hero-headline {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.975rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .btn-lg {
    font-size: 14px;
    padding: 0.8125rem 1.25rem;
  }
}

/* Reduced motion */
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .mobile-menu,
  .mobile-menu-backdrop,
  .reveal,
  .animate-fade-up {
    transition: none !important;
    animation: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Contact page */
.contact-layout {
  align-items: start;
}

.contact-info,
.contact-form-wrap {
  width: 100%;
}

.contact-card-body {
  min-width: 0;
  overflow-wrap: anywhere;
}

.contact-card-body a {
  word-break: break-word;
}

@media (max-width: 1023px) {
  .contact-layout {
    gap: 2rem;
  }

  .contact-info {
    order: 2;
  }

  .contact-form-wrap {
    order: 1;
  }
}

@media (min-width: 1024px) {
  .contact-info {
    position: sticky;
    top: 6.5rem;
  }
}