/* ===== Qzacko HT — Mobile-first enhancements ===== */

:root {
  --header-h: 64px;
  --bottom-nav-h: 64px;
  --fab-size: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --touch-min: 44px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 8px);
  -webkit-tap-highlight-color: rgba(14, 107, 99, 0.15);
}

body.nav-open {
  overflow: hidden;
  touch-action: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--qz-gold);
  color: var(--qz-dark);
  font-weight: 700;
}

.skip-link:focus {
  left: 0;
}

/* Icons */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon--sm {
  width: 18px;
  height: 18px;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.top-bar__icon {
  color: var(--qz-gold);
}

/* Header mobile */
.site-header {
  padding-top: var(--safe-top);
}

.header-inner {
  min-height: var(--header-h);
  gap: 0.5rem;
  position: relative;
}

.logo-mark {
  width: 44px;
  height: 44px;
}

.logo-text {
  font-size: 0.9rem;
}

.logo-text span {
  font-size: 0.55rem;
}

/* Nav toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--touch-min);
  height: var(--touch-min);
  border-radius: 10px;
  background: var(--qz-mint);
  z-index: 1102;
}

.nav-toggle__close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__close {
  display: block;
}

.header-cta--desktop {
  display: none;
}

/* Overlay + drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 61, 57, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 1100;
}

.nav-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  height: 100dvh;
  background: var(--qz-white);
  z-index: 1101;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--header-h) + var(--safe-top) + 1rem) 1.25rem calc(1.5rem + var(--safe-bottom));
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}

.site-nav.is-open {
  transform: translateX(0);
}

.nav-main {
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
}

.nav-main a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  min-height: var(--touch-min);
  border-radius: 10px;
}

.nav-link__icon {
  width: 22px;
  height: 22px;
  color: var(--qz-teal-mid);
}

.nav-main a.active {
  background: var(--qz-teal);
  color: var(--qz-white);
}

.nav-main a.active .nav-link__icon {
  color: var(--qz-gold);
}

.header-cta--drawer {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--qz-mint);
}

/* Buttons touch */
.btn {
  min-height: var(--touch-min);
  padding: 0.75rem 1.25rem;
  gap: 0.5rem;
  -webkit-user-select: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn--block {
  width: 100%;
}

.btn--lg {
  min-height: 48px;
  font-size: 0.85rem;
  padding: 0.85rem 1.5rem;
}

.hero-btn-light {
  border-color: #fff !important;
  color: #fff !important;
}

/* Bottom navigation */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--qz-white);
  border-top: 1px solid rgba(10, 61, 57, 0.1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.mobile-bottom-nav__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.35rem 0.25rem;
  color: var(--qz-muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  min-width: 0;
  transition: color 0.15s;
}

.mobile-bottom-nav__link.is-active {
  color: var(--qz-teal-mid);
}

.mobile-bottom-nav__link.is-active .mobile-bottom-nav__icon {
  color: var(--qz-teal-mid);
  transform: scale(1.08);
}

.mobile-bottom-nav__icon {
  width: 22px;
  height: 22px;
  transition: transform 0.15s;
}

/* Call FAB */
.mobile-fab {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 1rem);
  z-index: 999;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: var(--qz-gold);
  color: var(--qz-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(245, 179, 1, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}

.mobile-fab:active {
  transform: scale(0.94);
}

.mobile-fab .icon {
  width: 24px;
  height: 24px;
}

/* Hero mobile */
.hero {
  min-height: min(72vh, 520px);
}

.hero-carousel-controls {
  bottom: 0.75rem;
  gap: 0.5rem;
  padding: 0.3rem 0.5rem;
}

.hero-carousel-btn {
  width: 2.25rem;
  height: 2.25rem;
}

.hero-carousel-dots {
  max-width: min(46vw, 200px);
}

.hero-content {
  padding: 2.5rem 0 4.5rem;
}

.hero .lead {
  font-size: 1rem;
  line-height: 1.55;
}

.hero-cta {
  flex-direction: column;
  align-items: stretch;
}

.hero-cta .btn {
  width: 100%;
}

/* Cards */
.cards-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

.card {
  padding: 1.5rem 1.25rem;
  text-align: left;
}

.card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--qz-mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-icon-svg {
  width: 28px;
  height: 28px;
  color: var(--qz-teal-mid);
}

.card .btn {
  width: 100%;
}

/* Scroll reveal */
.scroll-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.page-hero {
  padding: 2.5rem 0;
}

.container {
  width: min(1140px, 94vw);
}

/* CEO / profile mobile */
.ceo-block,
.profile-card.featured {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.profile-card.featured .ceo-photo {
  max-height: 360px;
}

.profile-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
}

.profile-bio .btn {
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Contact */
.contact-grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.contact-form-wrap {
  padding: 1.25rem;
  order: 2;
}

.contact-info-box {
  order: 1;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-size: 16px; /* prevents iOS zoom on focus */
  min-height: var(--touch-min);
  padding: 0.75rem 1rem;
}

.phone-big {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  font-size: 1.1rem;
  min-height: var(--touch-min);
}

.contact-email-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0;
  min-height: var(--touch-min);
}

/* Services */
.service-detail {
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
}

.service-num {
  width: 40px;
  height: 40px;
}

/* Footer mobile */
.site-footer {
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom));
}

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

.footer-contact-line a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch-min);
  padding: 0.15rem 0;
}

.footer-bottom {
  flex-direction: column;
  text-align: center;
}

.seo-keywords {
  font-size: 0.7rem;
}

/* CTA */
.cta-band {
  padding: 2.5rem 1rem;
}

.cta-band .btn {
  width: 100%;
  max-width: 320px;
}

/* Desktop overrides */
@media (min-width: 901px) {
  body {
    padding-bottom: 0;
  }

  .mobile-bottom-nav,
  .mobile-fab {
    display: none;
  }

  .nav-toggle,
  .nav-overlay,
  .header-cta--drawer {
    display: none !important;
  }

  .site-nav {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    padding: 0;
    overflow: visible;
    box-shadow: none;
    background: transparent;
  }

  .nav-main {
    flex-direction: row;
  }

  .nav-main a {
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
    min-height: auto;
  }

  .nav-main a span {
    /* desktop: hide text icons layout - show text only */
  }

  .nav-link__icon {
    display: none;
  }

  .header-cta--desktop {
    display: flex;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }

  .card {
    text-align: center;
  }

  .card .btn {
    width: auto;
  }

  .hero-cta {
    flex-direction: row;
    justify-content: center;
  }

  .hero-cta .btn {
    width: auto;
  }

  .contact-form-wrap {
    order: 1;
  }

  .contact-info-box {
    order: 2;
  }

  .site-footer {
    padding-bottom: 0;
  }
}

@media (min-width: 901px) and (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
  }

  .btn:hover {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .site-nav,
  .nav-overlay {
    transition: none;
  }
}
