/* Responsive */
@media (max-width: 1024px) {
  .service-details,
  .clients-grid,
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .site-header__inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav,
  .header-cta {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .contact-layout {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    align-items: stretch;
    width: 100%;
  }

  .contact-layout > .contact-panel,
  .contact-layout > form {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  /* Form first on mobile — easier to act */
  .contact-layout #contact-form,
  .contact-layout #careers-form {
    order: -1;
  }

  .contact-quick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin: 1rem 0 0.25rem;
  }

  .contact-quick .btn {
    min-height: 48px;
    justify-content: center;
    width: 100%;
  }

  .about-services {
    grid-template-columns: 1fr;
  }

  .about-copy {
    margin-left: 0;
    max-width: none;
  }

  .about-copy h2 {
    max-width: none;
  }

  .service-detail__list {
    grid-template-columns: 1fr;
  }

  .hero__sub-full {
    display: none;
  }

  .hero__sub-short {
    display: inline;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    gap: 0.7rem;
  }

  .hero__btn-primary,
  .hero__btn-ghost {
    width: 100%;
    min-height: 48px;
    min-width: 0;
    flex: none;
    justify-content: center;
  }

  .hero__scroll {
    display: none;
  }
}

/* Desktop / PC — keep original layout; mobile-only simplicity stays below 861px */
@media (min-width: 861px) {
  .contact-quick {
    display: none !important;
  }

  .hero__sub-short {
    display: none !important;
  }

  .hero__sub-full {
    display: inline;
  }

  .contact-layout #contact-form,
  .contact-layout #careers-form {
    order: initial;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
    --section-y: clamp(3rem, 10vw, 4.25rem);
  }

  html,
  body {
    overflow-x: clip;
  }

  body {
    background-attachment: scroll;
  }

  .container {
    width: min(100% - 1rem, var(--content-max));
  }

  #contact .container,
  #apply .container {
    width: calc(100% - 0.85rem);
    max-width: none;
  }

  .contact-panel {
    padding: 1.15rem;
    border-radius: 14px;
  }

  .form-grid {
    width: 100%;
    gap: 0.85rem;
  }

  .form-grid .form-row,
  .form-grid .btn {
    width: 100%;
    max-width: none;
  }

  .service-details,
  .clients-grid,
  .projects-grid,
  .process-steps {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 120px;
    gap: 0.55rem;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(6) {
    grid-column: span 2;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .trust-bar__inner {
    justify-content: flex-start;
  }

  .whatsapp-float__label {
    display: none;
  }

  /* Forms — no iOS zoom, comfortable tap targets */
  .form-row input,
  .form-row textarea,
  .form-row select {
    font-size: 16px;
    min-height: 48px;
    padding: 0.85rem 0.95rem;
  }

  .form-row textarea {
    min-height: 140px;
  }

  .form-row input:focus,
  .form-row textarea:focus,
  .form-row select:focus {
    transform: none;
  }

  .contact-panel {
    padding: 1.15rem;
  }

  .form-grid {
    gap: 0.85rem;
  }

  .form-grid .btn,
  #contact-submit,
  #careers-submit {
    width: 100%;
    min-height: 48px;
  }

  /* WhatsApp + visit notice clearance */
  .whatsapp-float {
    right: max(0.85rem, env(safe-area-inset-right));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    width: 52px;
    height: 52px;
  }

  #contact,
  #apply,
  .site-footer {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .svc-float__stage {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .svc-float__stage::-webkit-scrollbar {
    display: none;
  }

  .flipbook-section {
    overflow-x: clip;
  }

  .flipbook__stage {
    height: min(68vh, 420px);
    min-height: 300px;
    overflow: hidden;
  }

  .gallery-hero__visual {
    overflow: hidden;
    min-height: 220px;
  }
}

/* Phones (~390px) */
@media (max-width: 480px) {
  .hero {
    align-items: flex-start;
    padding-top: calc(var(--header-h) + 0.75rem);
    padding-bottom: 3.25rem;
  }

  .hero__content {
    width: min(100% - 1.5rem, 34rem);
    padding: 1rem 0.95rem 1.15rem;
  }

  .hero__brand-name strong {
    font-size: clamp(2.15rem, 10.5vw, 2.7rem);
  }

  .hero__headline {
    font-size: clamp(1.2rem, 5.2vw, 1.4rem);
    max-width: 100%;
  }

  .hero__sub {
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
    line-height: 1.5;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
    gap: 0.7rem;
  }

  .hero__btn-primary,
  .hero__btn-ghost {
    width: 100%;
    min-height: 48px;
    min-width: 0;
    flex: none;
    justify-content: center;
  }

  .hero__scroll {
    display: none;
  }

  .contact-panel {
    padding: 1.15rem;
  }

  .contact-details {
    gap: 0.85rem;
  }

  .page-hero--careers,
  .page-hero--team,
  .page-hero {
    padding: calc(var(--header-h) + 2.1rem) 0 2rem;
  }

  .page-hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.25rem);
  }

  .career-role {
    flex-direction: column;
    align-items: stretch;
    padding: 1.1rem;
    gap: 0.85rem;
  }

  .career-role .btn {
    width: 100%;
    min-height: 44px;
  }

  .leader-actions {
    flex-direction: column;
    width: 100%;
  }

  .leader-actions .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .leader-profile__media {
    max-height: 320px;
  }

  .leader-contact-card {
    padding: 1.15rem;
  }

  .gallery-hero__copy h1 {
    font-size: clamp(2rem, 9vw, 2.55rem);
  }

  .gallery-page .gallery-grid {
    grid-auto-rows: 110px;
  }

  .gallery-item:nth-child(1),
  .gallery-item:nth-child(6) {
    grid-column: span 1;
  }

  .flipbook__nav {
    width: 48px;
    height: 48px;
  }

  .flipbook__hint {
    font-size: 0.8rem;
    padding-inline: 0.5rem;
  }

  .section-header h2 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .intro__title {
    font-size: clamp(2.4rem, 12vw, 3rem);
  }

  .intro__tagline {
    font-size: 0.95rem;
    padding-inline: 1rem;
  }
}
