/*
 * mobile.css — OPTIFIT Perform
 * Mobile-only overrides. Loaded alongside marketing.css.
 * Does not modify any desktop styles (all rules are inside max-width media queries).
 */

/* ===== Legal pages ===== */
.legal-section {
  max-width: 740px;
  margin: 0 auto;
  padding: 56px 32px 96px;
}
.legal-section h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 8px;
}
.legal-meta {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  display: block;
}
.legal-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 3vw, 22px);
  color: var(--ink);
  margin: 40px 0 12px;
}
.legal-section h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin: 24px 0 8px;
  letter-spacing: 0.02em;
}
.legal-section p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal-section ul,
.legal-section ol {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.75;
  margin: 0 0 16px 20px;
  padding: 0;
}
.legal-section li {
  margin-bottom: 8px;
}
.legal-section a {
  color: var(--brand-orange);
  text-decoration: underline;
}

/* ===== Instagram marquee banner (mobile-only sizing) =====
   Wrapped in a media query so the desktop marquee (styled in
   marketing.css) keeps its own sizing on wider viewports. */
@media (max-width: 768px) {
  .insta-marquee-wrap {
    padding: 16px 0;
  }
  .insta-marquee-item {
    font-size: 17px;
    padding: 0 24px;
    gap: 20px;
  }
  .insta-marquee-sep {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
  }
}

/* ===== Hamburger button (hidden on desktop) ===== */
.nav-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #1A1B1F;
  padding: 8px;
  flex-shrink: 0;
  line-height: 0;
}

/* ===== Mobile nav dropdown panel ===== */
.nav-mobile-panel {
  display: none;
  flex-direction: column;
  background: rgba(245, 245, 245, 0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  padding: 20px 20px 28px;
}
.nav-mobile-panel.nav-menu-open {
  display: flex;
}
.nav-mobile-links {
  display: flex;
  flex-direction: column;
}
.nav-mobile-links a {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  border: 0;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: block;
}
.nav-mobile-links a:last-child {
  border-bottom: none;
}
.nav-mobile-links a:hover {
  color: var(--brand-orange);
}

/* ===================================================
   MOBILE — 768px main breakpoint
   =================================================== */
@media (max-width: 768px) {

  /* ---- Typography ---- */
  .display-xl { font-size: clamp(34px, 9vw, 52px); }
  .display-lg { font-size: clamp(28px, 7vw, 36px); }
  .display-md { font-size: 18px; }
  .lead { font-size: 16px; margin: 14px 0 20px; }

  /* ---- Nav ---- */
  .nav-inner { padding: 14px 20px; }
  /* Hide desktop nav links and CTA button inside nav */
  .nav-inner .links { display: none; }
  .nav-inner > button:not(.nav-hamburger) { display: none; }
  /* Show hamburger — uses :not above to avoid specificity conflict */
  .nav-hamburger { display: flex; }

  /* ---- Hero ---- */
  .hero { padding: 36px 20px 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 0; display: block; }
  .hero-copy { padding-top: 0; }
  /* hero-img-wrap is moved inside hero-copy by JS (between H1 and CTAs) */
  .hero-img-wrap {
    position: relative;
    overflow: visible;
    margin: 20px 0 80px;
    max-width: 400px;
    width: 100%;
  }
  .hero-photo {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 14px;
    height: auto;
  }
  /* Review card hovers over bottom 30% of image, 2% left from image edge */
  .hero-review-card {
    position: absolute;
    top: 70%;
    bottom: auto;
    left: 2%;
    right: auto;
    width: 82%;
    max-width: 280px;
    height: auto;
    margin: 0;
    z-index: 2;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    box-sizing: border-box;
  }
  .hero-review-card p {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.45;
    white-space: normal;
    word-break: break-word;
  }
  .hero-review-card span {
    font-size: 10px;
  }
  /* Stack CTA buttons vertically */
  .hero-ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-ctas .btn { justify-content: center; }
  /* Proof stats — centered, single row */
  .hero-proof {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: center;
    align-items: flex-start;
    margin-top: 32px;
    padding-top: 24px;
  }
  .pstat {
    align-items: center;
    text-align: center;
    flex: 1;
  }
  .metric-lg { font-size: 26px; }

  /* ---- Services ---- */
  .services { padding: 64px 0; }
  .section-head { margin-bottom: 32px; padding: 0 20px; }
  /* Tabs: off-screen but still in DOM so JS can .click() them */
  .svc-tabs-wrap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  /* Panel as white card — same feel as testimonials */
  .svc-panel {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
    margin: 0 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-1);
  }
  /* Text above */
  .svc-panel-copy { order: 1; padding: 24px 24px 20px; }
  /* Image below the text */
  .svc-panel-img-wrap { order: 2; padding: 0 24px 24px; background: var(--paper); }
  /* Square image, responsive width, no crop */
  .svc-panel-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    display: block;
    height: auto;
  }
  /* Mobile slider navigation (injected by mobile-nav.js) */
  .svc-mobile-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 48px;
    gap: 16px;
  }
  .svc-mobile-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--line-strong);
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s var(--ease-out);
  }
  .svc-mobile-arrow:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
  .svc-mobile-arrow:disabled { opacity: 0.35; cursor: default; pointer-events: none; }
  .svc-mobile-dots { display: flex; gap: 8px; align-items: center; }
  .svc-mobile-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--line-strong);
    transition: background 0.2s;
    cursor: pointer;
  }
  .svc-mobile-dot-active { background: var(--brand-orange); }

  /* ---- Philosophy ---- */
  .philosophy-outer .philosophy { padding: 64px 20px; }
  .phil-grid { grid-template-columns: 1fr; gap: 0; padding: 0; }
  /* Hide sticky photo — steps stand alone on mobile */
  .phil-photo-wrap { display: none; }
  .phil-step { padding: 24px 0; gap: 16px; }
  .step-num { font-size: 36px; width: 44px; }

  /* ---- About section ---- */
  .about-section { padding: 64px 20px; }
  .about-approach-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-copy .eyebrow,
  .about-copy .display-lg { text-align: center; }

  /* ---- Testimonials: horizontal scroll carousel ---- */
  .testimonials { padding: 64px 0; }
  .t-slider-wrap { padding: 0 20px; }
  .t-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .t-grid::-webkit-scrollbar { display: none; }
  .t-card {
    flex: 0 0 82vw;
    max-width: 340px;
    scroll-snap-align: start;
  }
  .t-nav { margin-top: 24px; }

  /* ---- Pricing ---- */
  .pricing-section { padding: 64px 0; }
  .pricing-hero-text { padding: 0 20px; margin-bottom: 32px; }
  .pricing-headline { font-size: clamp(28px, 7vw, 40px); }
  .pricing-toggle { padding: 0 20px; margin-bottom: 40px; }
  .toggle-btn { flex: 1; padding: 12px 16px; }
  .pricing-grid { grid-template-columns: 1fr; padding: 0 20px; gap: 24px; }
  .pricing-card { padding: 28px 24px; }
  .pricing-amount { font-size: 44px; }

  /* ---- FAQ ---- */
  .faq { padding: 64px 20px; }
  .faq-sub { padding: 0 20px; }

  /* ---- Instagram ---- */
  .instagram-section { padding: 0 0 64px; }
  .insta-marquee-wrap { display: block; margin-bottom: 28px; }
  .insta-desktop-head { display: none; }
  .insta-grid { grid-template-columns: repeat(2, 1fr); padding: 0 20px; gap: 8px; }

  /* ---- CTA Band ---- */
  .cta-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 64px 20px;
    text-align: center;
  }
  .cta-actions { align-items: center; }
  .cta-actions .btn { width: 100%; justify-content: center; }

  /* ---- Footer ---- */
  .site-foot { padding: 48px 0 20px; }
  .foot-inner { grid-template-columns: 1fr; gap: 40px; padding: 0 20px; }
  .foot-brand img { height: 44px; }
  .foot-cols { grid-template-columns: 1fr; gap: 28px; }
  .foot-bottom {
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
    margin-top: 32px;
    padding: 20px 20px 0;
  }

  /* ---- About page ---- */
  .ap-hero { padding: 40px 20px 56px; }
  .ap-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .ap-hero-photos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ap-photo-offset { margin-top: 28px; }
  .ap-story { padding: 56px 0; }
  .ap-story-inner { padding: 0 20px; }
  .ap-story-block { padding: 36px 0; }
  .ap-story-block p { font-size: 16px; }
  .ap-fitness { padding: 56px 20px; }
  .ap-fitness-inner { grid-template-columns: 1fr; gap: 32px; }
  .ap-fitness-photo { max-height: 300px; }
  .ap-fitness-copy p { font-size: 16px; }
  .ap-certs { padding: 56px 0; }
  .ap-certs-inner { padding: 0 20px; }
  .ap-cert-badges { gap: 20px; margin: 28px 0 40px; }
  .ap-cert-badges img { height: 100px; }
  .ap-cert-logos { gap: 24px; padding-top: 28px; }
  .ap-cert-logos img { height: 44px; }
}

/* ===================================================
   NARROW PHONES — 480px
   =================================================== */
@media (max-width: 480px) {
  .display-xl  { font-size: clamp(30px, 10vw, 38px); }
  .display-lg  { font-size: clamp(24px, 8vw, 30px); }
  .metric-lg   { font-size: 22px; }
  .t-card      { flex: 0 0 88vw; }
  .svc-panel-img { max-height: 60vw; }
  .pricing-amount { font-size: 40px; }
  .ap-cert-badges img { height: 80px; }
  .toggle-btn  { font-size: 12px; padding: 10px 12px; }
}
