/**
 * PM MEDIA — Mobile type + bottom layout fix (Aug 3 2026)
 * Loads LAST. Fixes fonts “falling apart” toward #book / footer / docks.
 * Absolute Zero: wrap · hierarchy · safe-area · no nowrap traps.
 */

/* —— Global phone type floor —— */
@media (max-width: 920px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    font-size: 16px;
    line-height: 1.5;
  }

  /* Kill letter-spacing traps that shove glyphs off-screen */
  .eyebrow,
  .biolum-zone-label,
  .section .eyebrow,
  .pm-insider-badge,
  .pm-product-lockup__name,
  .footer-bottom .pm-powered,
  .site-footer h4 {
    letter-spacing: 0.08em !important;
    word-spacing: normal;
    white-space: normal !important;
    overflow-wrap: anywhere;
    max-width: 100%;
  }

  h1, h2, h3,
  .hero-title-noon,
  .section h2,
  #book-title,
  #cta-title,
  #faq-title,
  #guides-title {
    max-width: 100% !important;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    text-wrap: balance;
    line-height: 1.15 !important;
  }

  /* Bottom-of-page headings were oversized / colliding with dock */
  #book h2,
  #faq h2,
  #operator-guides h2,
  #exclusivity h2,
  #investment h2,
  #results h2,
  #affiliates h2,
  #cta-band h2,
  .cta-band h2,
  section.cta-band h2,
  .form-section h2 {
    font-size: clamp(1.45rem, 6.2vw, 1.95rem) !important;
    margin-inline: auto;
    padding-inline: 0.15rem;
  }

  #book .lead,
  #book .pattern-interrupt,
  .form-section .lead,
  .form-section .pattern-interrupt,
  #faq .lead,
  #operator-guides .lead,
  .cta-band p,
  section.cta-band p {
    font-size: clamp(0.95rem, 3.6vw, 1.05rem) !important;
    line-height: 1.45 !important;
    max-width: 36rem;
    margin-inline: auto;
    padding-inline: 0.25rem;
  }

  /* Book / form — breathe above sticky dock */
  #book.form-section,
  .form-section {
    padding-top: clamp(2rem, 6vw, 3rem) !important;
    padding-bottom: calc(var(--pm-dock-offset, 5.5rem) + env(safe-area-inset-bottom, 0px) + 3.25rem) !important;
  }

  .form-wrap {
    margin-top: 1.25rem !important;
    padding: 1.25rem 1rem !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .form-wrap label,
  .form-qual legend,
  .form-qual-note {
    font-size: 0.88rem !important;
    line-height: 1.35 !important;
    letter-spacing: 0.02em !important;
  }

  .book-reassure {
    text-align: left;
    padding-inline: 0.25rem;
  }

  .book-reassure li {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.55rem;
  }

  /* Footer — beat body.pm-convert-lean .site-footer !important (uniform) */
  body.pm-convert-lean .site-footer,
  body .site-footer,
  .site-footer {
    padding: 2.25rem 0 calc(var(--pm-dock-offset, 5.5rem) + env(safe-area-inset-bottom, 0px) + 3.5rem) !important;
    font-size: 0.88rem !important;
  }

  .site-footer .container {
    padding-inline: max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-right));
  }

  .footer-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.35rem !important;
    margin-bottom: 1.5rem !important;
  }

  .footer-grid > div {
    min-width: 0;
  }

  .site-footer h4 {
    font-size: 0.72rem !important;
    margin-bottom: 0.5rem !important;
  }

  .site-footer p,
  .site-footer a {
    font-size: 0.9rem !important;
    line-height: 1.45 !important;
    overflow-wrap: anywhere;
  }

  .site-footer .logo-img {
    width: min(220px, 72vw) !important;
    height: auto !important;
    max-width: 100%;
  }

  .footer-bottom {
    text-align: left !important;
    padding-top: 1.25rem !important;
  }

  .footer-bottom .pm-product-lockup {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
  }

  .footer-bottom .pm-product-lockup__mark {
    width: 56px !important;
    height: 56px !important;
    flex: none;
  }

  .footer-bottom .pm-product-lockup__name {
    font-size: 0.95rem !important;
    letter-spacing: 0.06em !important;
  }

  .footer-bottom .pm-powered,
  .footer-bottom .legal-micro,
  .footer-bottom .legal-note,
  .footer-bottom .legal-note--footer {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: 0.02em !important;
    max-width: 100%;
    overflow-wrap: anywhere;
    margin: 0.55rem 0 0 !important;
  }

  /* Sticky CTA / dock — text wraps, never clips */
  .pm-sticky-cta .btn,
  .pm-sticky-cta-btn,
  .pm-action-dock .dock-btn {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.2 !important;
    font-size: clamp(0.72rem, 3.2vw, 0.86rem) !important;
  }

  .pm-sticky-cta-urgency {
    font-size: 0.72rem !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    max-width: 100%;
  }

  .pm-action-dock {
    gap: 0.35rem;
    padding-inline: max(0.4rem, env(safe-area-inset-left)) max(0.4rem, env(safe-area-inset-right));
  }

  /* Adventure hub + final CTA — was colliding / oversized */
  #adventure-home h2,
  .adventure-home h2,
  .adventure-home .gradient-text {
    font-size: clamp(1.4rem, 6.4vw, 1.9rem) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--text, #f4fbff) !important;
  }

  .adventure-hub-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 0.65rem !important;
  }

  .adventure-hub-card {
    min-width: 0 !important;
    padding: 0.85rem 0.65rem !important;
  }

  .adventure-hub-card strong,
  .adventure-hub-card em {
    font-size: 0.82rem !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }

  body.pm-convert-lean .cta-band,
  .cta-band {
    padding: 2.25rem 1rem calc(2.5rem + env(safe-area-inset-bottom)) !important;
    text-align: center;
  }

  .cta-band .btn {
    white-space: normal !important;
    max-width: 100%;
    font-size: 0.92rem !important;
  }

  /* Exit / social proof must not sit on sticky tools or CTA */
  #sp-vel-slots,
  .sp-vel-live,
  .pm-exit-rescue,
  .pm-social-proof,
  .sp-social-proof,
  [data-sp-social-proof],
  .pm-toast-proof,
  .pm-live-toast {
    left: 0.75rem !important;
    right: auto !important;
    max-width: min(72vw, 240px) !important;
    bottom: calc(var(--pm-dock-offset, 5.5rem) + 5.25rem) !important;
    top: auto !important;
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
    z-index: 40 !important;
  }

  #sp-vel-sticky {
    max-width: calc(100vw - 1.25rem) !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }

  #sp-vel-sticky a,
  #sp-vel-sticky button {
    white-space: normal !important;
    line-height: 1.2 !important;
    font-size: 0.78rem !important;
  }

  /* Collapsed sticky “SHOW” strip — keep clear of home indicator */
  .pm-sticky-cta.is-collapsed,
  .pm-sticky-cta[data-collapsed="1"],
  #pm-sticky-cta {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* Late sections before footer */
  #faq details,
  #faq summary,
  #operator-guides a,
  #library a {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }

  #operator-guides .footer-grid,
  #faq .faq {
    gap: 1.1rem !important;
  }

  #faq summary {
    padding-right: 1.5rem;
    overflow-wrap: anywhere;
  }

  #tools .tool-card h3,
  #engines h3,
  #services h3,
  #floors h3 {
    font-size: clamp(1.05rem, 4.5vw, 1.25rem) !important;
  }

  /* Trust strip injected near footer */
  [data-sp-trust-strip],
  .sp-trust-strip,
  #sp-trust-strip {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
    padding-inline: 0.5rem;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 480px) {
  #book h2,
  .form-section h2,
  .cta-band h2 {
    font-size: clamp(1.35rem, 7vw, 1.7rem) !important;
  }

  .form-wrap {
    padding: 1.1rem 0.85rem !important;
  }

  .pm-sticky-cta .btn {
    font-size: 0.8rem !important;
    padding-inline: 0.65rem !important;
  }
}

/* Prefer reduced motion — keep layout fixes, drop fancy */
@media (max-width: 920px) and (prefers-reduced-motion: reduce) {
  .footer-grid,
  .form-wrap,
  #book h2 {
    transition: none !important;
  }
}
