/* ============================================================
   responsive.css — PortfolixHub mobile & responsive styles
   ============================================================ */

/* ── TOUCH DEVICE: restore cursor & hide custom cursor elements ── */
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
  #cd, #cr { display: none !important; }

  .btn-black,
  .btn-outline,
  .nav-cta,
  .plan-btn,
  .loc-view,
  .loc-card,
  .cta-btn,
  .submit-btn,
  .social-link,
  .faq-q,
  .inq-tab,
  .nav-hamburger { cursor: pointer; }
}

/* ── CONTACT HERO — h1 too large on mobile ── */
/* Default clamp(48px,7vw,88px) overflows narrow viewports, 
   causing body overflow-x: hidden to shift the entire page left.
   Override to a mobile-safe size. */
@media (max-width: 900px) {
  .contact-hero h1 {
    font-size: clamp(32px, 9vw, 56px);
    letter-spacing: -0.03em;
  }
}

@media (max-width: 640px) {
  .contact-hero h1 {
    font-size: clamp(28px, 8vw, 42px);
    line-height: 1.05;
  }
}

/* ── ON MOBILE: prevent translateX animations from triggering 
   horizontal overflow and page-shift side effects ── */
@media (max-width: 640px) {
  .from-l,
  .from-r {
    transform: translateY(20px);   /* use only vertical shift, never horizontal */
  }
  .from-l.vis,
  .from-r.vis {
    transform: translateY(0);
  }
}

/* ── NAV HAMBURGER BUTTON ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  z-index: 10;
  flex-shrink: 0;
  transition: background 0.2s;
}

.nav-hamburger:hover {
  background: rgba(255, 255, 255, 0.14);
}

.nav-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s,
              width 0.3s;
}

nav.nav-light .nav-hamburger {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.08);
}

nav.nav-light .nav-hamburger span { background: var(--black); }

/* Hamburger → X animation */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── MOBILE FULLSCREEN MENU ── */
#mobileMenu {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 450;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobileMenu.open {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
}

#mobileMenu a {
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  letter-spacing: -0.04em;
  padding: 10px 32px;
  transition: color 0.2s;
  border-radius: 12px;
}

#mobileMenu a:hover,
#mobileMenu a.active { color: var(--white); }

#mobileMenu .mob-cta {
  margin-top: 20px;
  background: var(--white);
  color: var(--black) !important;
  padding: 14px 36px !important;
  border-radius: 100px !important;
  font-size: 15px !important;
  font-weight: 600;
}

#mobileMenu .mob-cta:hover { background: var(--g100); }

#mobileMenu .mob-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: var(--white);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  transition: background 0.2s;
}

#mobileMenu .mob-close:hover { background: rgba(255, 255, 255, 0.15); }

#mobileMenu .mob-footer {
  position: absolute;
  bottom: 32px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.04em;
}

/* ============================================================
   BREAKPOINT: 1100px — Tighten large layouts
   ============================================================ */
@media (max-width: 1100px) {
  .pricing-grid {
    max-width: 860px;
  }

  .price-card { padding: 0 24px; }
  .price-card:first-child { padding-right: 20px; }
  .price-card:last-child  { padding-left:  20px; }
  .price-card-dark { padding: 28px 24px 32px; }

  .cta-box {
    padding: 44px 44px;
    gap: 40px;
  }

  .faq { gap: 48px; }
}

/* ============================================================
   BREAKPOINT: 900px — Tablet / small desktop
   ============================================================ */
@media (max-width: 900px) {
  /* Nav: hide center links, show hamburger */
  .nav-center    { display: none !important; }
  .nav-hamburger { display: flex; }

  /* Spaces: stack vertically */
  .spaces {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 72px;
  }

  .spaces-left p { max-width: 100%; }

  /* Locations: single column */
  .loc-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  /* Pricing: single column */
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    gap: 0;
  }

  .price-card {
    padding: 32px 0;
    border-left: none !important;
  }

  .price-card + .price-card {
    border-top: 1px solid var(--g200);
    border-left: none;
    padding-left: 0;
    padding-right: 0;
  }

  .price-card-dark {
    margin: 0;
    border-radius: 16px;
    padding: 32px;
    border-left: none !important;
    order: -1; /* put "Popular" card first on mobile */
  }

  .price-card-dark + .price-card {
    border-left: none;
    padding-left: 0;
    border-top: none;
    padding-top: 0;
  }

  /* FAQ: single column */
  .faq {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 72px;
  }

  .faq-left {
    position: static;
  }

  .faq-left p { max-width: 100%; }

  /* CTA: single column */
  .cta-box {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 36px;
  }

  .cta-desc { max-width: 100%; }

  /* Footer: 2-column grid */
  .foot-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  /* Contact: already handled in contact.css but reinforce */
  .contact-grid  { grid-template-columns: 1fr; }
  .contact-left  { border-right: none; border-bottom: 1px solid var(--g200); }
  .form-row      { grid-template-columns: 1fr; }
  .divider-strip { gap: 20px; }
  .strip-sep     { display: none; }
}

/* ============================================================
   BREAKPOINT: 640px — Mobile
   ============================================================ */
@media (max-width: 640px) {
  /* Hide nav CTA on phones — it's inside the hamburger menu */
  .nav-cta { display: none; }

  /* Hero */
  .hero-content {
    bottom: 28px;
    max-width: calc(100% - 2 * var(--pad));
  }

  .hero-trusted { display: none; }

  /* Statement */
  .statement { padding: 64px var(--pad) 48px; }

  .statement h2 { letter-spacing: -0.025em; }

  /* Tags: hide separators, let tags wrap naturally */
  .tag-sep { display: none; }

  /* Spaces */
  .spaces { padding-bottom: 56px; }

  /* Locations */
  .loc-grid   { max-width: 100%; }
  .loc-card-soon { min-height: 220px; }

  /* Pricing */
  .pricing-grid { max-width: 100%; }
  .price-card-dark { padding: 28px 24px 32px; }
  .plan-price { font-size: 44px; }

  /* FAQ */
  .faq-left h2 { font-size: clamp(24px, 6vw, 36px); }

  /* CTA */
  .cta-wrap { padding: 0 var(--pad) 40px; }
  .cta-box  { padding: 32px 24px; border-radius: 16px; }
  .cta-h2   { font-size: clamp(22px, 6vw, 32px); }
  .cta-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .cta-avatars { flex-wrap: wrap; gap: 8px; }
  .cta-join  { margin-left: 0; }

  /* Footer */
  .foot-inner { grid-template-columns: 1fr; gap: 28px; }
  .foot-desc  { max-width: 100%; }

  /* Contact hero */
  .contact-hero { padding: 80px var(--pad) 56px; min-height: 80vh; }

  /* Inquiry tabs: allow wrap */
  .inquiry-tabs { gap: 6px; }
  .inq-tab { padding: 7px 14px; font-size: 12.5px; }

  /* Social links: wrap */
  .social-links { gap: 8px; }
  .social-link  { padding: 8px 14px; font-size: 12.5px; }

  /* Divider strip */
  .divider-strip {
    flex-wrap: wrap;
    gap: 16px 32px;
    padding: 24px var(--pad);
  }
}

/* ============================================================
   BREAKPOINT: 420px — Small phones
   ============================================================ */
@media (max-width: 420px) {
  /* Nav: reduce pill side margins */
  nav {
    width: calc(100% - 28px);
    padding: 0 14px;
  }

  /* Hero heading */
  .hero-h1 { font-size: 36px; line-height: 1; }
  .hero-desc { font-size: 14px; }

  /* Pricing */
  .plan-price { font-size: 40px; }

  /* CTA */
  .cta-box { padding: 28px 18px; }
  .cta-feats { grid-template-columns: 1fr; }

  /* Foot bottom: stack */
  .foot-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Contact form */
  .form-bottom { flex-direction: column; align-items: stretch; }
  .form-bottom .submit-btn { justify-content: center; }
  .form-note { max-width: 100%; }

  /* Statement tags: hide separators already; just ensure wrap is clean */
  .tags-row { gap: 8px; }
  .tag { font-size: 12.5px; }

  /* Map height */
  .map-block { height: 180px; }
}
