/* =====================================================================
   1HourSites — MOBILE APP LAYER  (mobile-app.css)
   Loaded LAST (before </body>) so it overrides earlier inline mobile rules.
   Visual rules are gated behind @media (max-width:768px) / (max-width:480px),
   PLUS one tablet/narrow-desktop nav band (769–1180px, at the bottom of this
   file) that collapses the dense header to the hamburger sheet.
   Desktop (>1180px) renders 100% unchanged. Do not add other un-gated rules.
   v1 — 2026-06-21  ·  v5 — 769–1180px responsive nav
   ===================================================================== */

/* Bottom action bar + injected hamburger are hidden everywhere by default; mobile only. */
#sb-appbar { display: none; }
.sb-ham { display: none; }

/* The injected JS menu container is a hidden fixed overlay at ALL widths — never
   a stray visible block above 768px. Its phone open-state polish lives in the
   ≤768 block (which overrides inset to 60px); the 769–1100 band re-applies the
   list styling. */
.sb-mn { display: none; position: fixed; inset: 64px 0 0 0; z-index: 400;
         background: var(--bg); overflow-y: auto; border-top: 1px solid var(--border); }
.sb-mn.open { display: block; }

/* Injected hamburger ICON styling is ungated so it renders in the 769–1180
   band too (the button itself stays display:none by default — set above —
   so desktop >1180px never shows it). Only its `display` is width-gated. */
.sb-ham { flex-direction: column; gap: 5px; cursor: pointer; background: none;
          border: none; padding: 12px 6px; margin-right: -6px; -webkit-tap-highlight-color: transparent; }
.sb-ham span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }
.sb-ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sb-ham.open span:nth-child(2) { opacity: 0; }
.sb-ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

  /* ---- App-feel base polish ---- */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body {
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
    /* clear the fixed bottom action bar */
    padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  }
  ::selection { background: rgba(255,79,0,0.18); }
  /* never let anything cause a horizontal scrollbar on phones */
  html, body { max-width: 100%; overflow-x: hidden; }
  img, svg, video, iframe, canvas { max-width: 100%; }
  /* (Real comparison tables — pricing / vs-* — are tuned per-page so their
     column alignment is preserved; no blunt table override here.) */

  /* ---- NAV (frosted, taller tap targets) ---- */
  nav { height: 60px; }
  .nav-inner { padding: 0 18px; }
  .nav-logo { font-size: 19px; }
  .hamburger { padding: 12px 6px; margin-right: -6px; }
  .hamburger span { width: 24px; }
  /* Any page's desktop nav links never show on a phone (fixes pages that
     shipped without a mobile menu — the JS injects a hamburger for them). */
  .nav-links { display: none !important; }

  /* ---- INJECTED MOBILE NAV (only built by JS on pages lacking one) ---- */
  .sb-ham {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer;
    background: none; border: none; padding: 12px 6px; margin-right: -6px;
    -webkit-tap-highlight-color: transparent;
  }
  .sb-ham span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: all .25s; }
  .sb-ham.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .sb-ham.open span:nth-child(2) { opacity: 0; }
  .sb-ham.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .sb-mn {
    display: none; position: fixed; inset: 60px 0 0 0; background: var(--bg);
    z-index: 400; overflow-y: auto; border-top: 1px solid var(--border);
    padding: 8px 0 calc(28px + env(safe-area-inset-bottom,0px));
  }
  .sb-mn.open { display: block; }
  .sb-mn a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 17px 22px; font-size: 16px; font-weight: 600; color: var(--text);
    text-decoration: none; border-bottom: 1px solid var(--border);
  }
  .sb-mn a:not(.sb-mn-cta)::after { content: '\203A'; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1; }
  .sb-mn a:active:not(.sb-mn-cta) { background: rgba(32,21,21,0.04); }
  .sb-mn-cta {
    margin: 18px 18px 6px !important; border-radius: 14px !important;
    padding: 16px !important; background: var(--orange) !important; color: #fff !important;
    justify-content: center !important; font-weight: 700 !important; border-bottom: none !important;
    box-shadow: 0 8px 22px rgba(255,79,0,0.26);
  }
  .sb-mn-cta::after { content: none !important; }

  /* ---- MOBILE NAV MENU → app-style sheet ---- */
  .mobile-nav { inset: 60px 0 0 0; background: var(--bg); padding: 8px 0 calc(28px + env(safe-area-inset-bottom,0px)); }
  .mobile-nav a {
    padding: 17px 22px; font-size: 16px; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border);
  }
  .mobile-nav a:not(.mobile-nav-cta)::after {
    content: '›'; color: var(--muted); font-size: 22px; font-weight: 400; line-height: 1;
  }
  .mobile-nav a:active:not(.mobile-nav-cta) { background: rgba(32,21,21,0.04); }
  .mobile-nav-cta {
    margin: 16px 18px 6px !important; border-radius: 14px !important;
    padding: 16px !important; font-size: 16px !important;
    box-shadow: 0 8px 22px rgba(255,79,0,0.26);
  }
  .mobile-nav-cta::after { content: none !important; }
  .mobile-nav-book { box-shadow: none !important; }

  /* ---- BUTTONS → rounded, app-like, real tap targets, press feedback ---- */
  .btn-primary, .btn-secondary, .btn-book-call,
  .pricing-cta, .calc-cta-btn, .footer-btn, .nav-cta {
    border-radius: 14px !important;
    min-height: 54px;
    display: inline-flex !important;
    align-items: center; justify-content: center;
    font-size: 16px !important;
    transition: transform .12s ease, background .2s ease, box-shadow .2s ease !important;
  }
  .btn-primary, .pricing-cta, .calc-cta-btn {
    box-shadow: 0 8px 24px rgba(255,79,0,0.26);
  }
  .btn-primary:active, .btn-secondary:active, .btn-book-call:active,
  .pricing-cta:active, .calc-cta-btn:active, .footer-btn:active { transform: scale(.975); }

  /* ---- HERO ---- */
  #hero { padding: 40px 20px 36px; }
  .hero-badge {
    font-size: 11.5px; padding: 6px 14px; margin-bottom: 20px;
    line-height: 1.35; max-width: 92%;
  }
  h1 { font-size: clamp(34px, 9.2vw, 50px); letter-spacing: -1.4px; margin-bottom: 18px; }
  .hero-value-banner { margin: 0 auto 20px; }
  .hero-value-pill { font-size: 13.5px; padding: 8px 16px; }
  .hero-sub {
    font-size: 15.5px; line-height: 1.62; margin: 0 auto 26px;
    max-width: 38ch; color: var(--muted);
  }
  .hero-actions { gap: 11px; margin-bottom: 18px; }
  .hero-book-caption { font-size: 12.5px; margin-bottom: 28px; }
  .hero-proof { flex-wrap: wrap; gap: 6px; font-size: 13px; line-height: 1.5; }

  /* ---- PROOF BAR → horizontal snap rail (app card strip) ---- */
  .proof-bar { padding: 16px 0; }
  .proof-bar-inner {
    flex-direction: row; flex-wrap: nowrap; justify-content: flex-start;
    gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 2px 16px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .proof-bar-inner::-webkit-scrollbar { display: none; }
  .proof-stat {
    flex: 0 0 auto; scroll-snap-align: start;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; padding: 12px 16px; gap: 10px;
    box-shadow: 0 2px 10px rgba(32,21,21,0.04);
  }

  /* ---- SECTION RHYTHM + HEADINGS ---- */
  section { padding: 54px 20px; }
  section h2, h2 { font-size: clamp(27px, 7.2vw, 38px); letter-spacing: -0.8px; line-height: 1.12; }
  .section-label { font-size: 11px; letter-spacing: 2px; }
  .section-sub { font-size: 15.5px; line-height: 1.6; }

  /* ---- GENERIC CARD POLISH (shared card-ish blocks) ---- */
  .step, .stat-card, .value-card, .faq-card, .trust-item, .included-card,
  .tool-card, .why-card, .about-item, .vid-card, .ff-card, .trade-card,
  .review-card, .feature-card, .keyword-item, .detail-item, .hero-stat {
    border-radius: 16px;
  }

  /* ---- COMPARISON TABLE (real <table.vs-table>) stays compact ---- */
  .vs-wrap { border-radius: 14px; }

  /* ---- FOOTER ---- */
  .footer-top { padding: 44px 22px 30px; gap: 34px; }
  .footer-phone { font-size: 22px !important; }
  .social-icon { width: 42px; height: 42px; }
  .footer-col ul a, .footer-col p a { display: inline-block; padding: 3px 0; font-size: 14.5px; }
  .footer-bottom { padding: 22px 22px calc(22px + env(safe-area-inset-bottom,0px)); }
  .footer-btm-inner { flex-direction: column; align-items: flex-start; gap: 14px; }

  /* ---- MODALS → clean full bottom-sheet, safe areas ---- */
  #bookingModal { align-items: flex-end !important; padding: 0 !important; }
  #bookingModalInner { width: 100% !important; max-width: 100% !important; border-radius: 18px 18px 0 0 !important; max-height: 94vh; }
  #bookingModalIframe { height: 70vh !important; }
  #trialModal { align-items: flex-end !important; padding: 0 !important; }

  /* =========== STICKY BOTTOM ACTION BAR (the "app" feel) =========== */
  #sb-appbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    gap: 10px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,254,251,0.86);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 24px rgba(32,21,21,0.08);
    transform: translateY(0);
    transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .2s ease;
  }
  body.sb-hide-appbar #sb-appbar {
    transform: translateY(130%);
    opacity: 0; pointer-events: none;
  }
  .sb-appbar-btn {
    flex: 1 1 0; min-height: 52px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    border-radius: 13px; font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 15.5px; font-weight: 700; text-decoration: none;
    cursor: pointer; border: none; line-height: 1;
    transition: transform .12s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .sb-appbar-btn:active { transform: scale(.97); }
  .sb-appbar-primary {
    flex: 1.55 1 0;
    background: var(--orange); color: #fff;
    box-shadow: 0 6px 18px rgba(255,79,0,0.34);
  }
  .sb-appbar-primary:active { background: var(--orange-d); }
  .sb-appbar-call {
    flex: 1 1 0;
    background: #fff; color: var(--text);
    border: 1.5px solid var(--border);
  }
  .sb-appbar-call svg { width: 17px; height: 17px; }
}

/* ====================================================================
   TABLET / NARROW-DESKTOP NAV   ( 769px – 1180px )      v4 — 2026-07-16
   The header packs a logo + 5 nav links + 2 CTA buttons. Below ~1180px
   there isn't room for that on one line with comfortable spacing.
   Instead of jumping straight to the hamburger sheet, items drop off
   one at a time, right to left, so the header stays a real nav for as
   long as there's room: About → Pricing → Gallery → How It Works →
   What's Included. Only once all five are gone (≤840px) does the
   header switch to the hamburger sheet. Desktop ( >1180px ) unchanged.
   Requires each page's nav <li> to carry a matching nav-item-* class
   (nav-item-about / nav-item-pricing / nav-item-gallery /
   nav-item-howitworks / nav-item-included) — pages without those
   classes simply keep the old blunt collapse via the .nav-links rule
   at 840px below, so nothing breaks on pages not yet tagged.
   ==================================================================== */

/* Belt-and-suspenders: desktop nav items never wrap mid-item. Harmless
   above 1100px (already one line) and hidden below it. */
.nav-links { flex-wrap: nowrap; }
.nav-links > li > a, .nav-mega-btn { white-space: nowrap; }

@media (min-width: 769px) and (max-width: 1180px) { .nav-item-about { display: none !important; } }
@media (min-width: 769px) and (max-width: 1080px) { .nav-item-pricing { display: none !important; } }
@media (min-width: 769px) and (max-width: 1000px) { .nav-item-gallery { display: none !important; } }
@media (min-width: 769px) and (max-width: 920px)  { .nav-item-howitworks { display: none !important; } }
@media (min-width: 769px) and (max-width: 840px) {
  .nav-item-included { display: none !important; }
  .nav-links { display: none !important; }
  .hamburger, .sb-ham { display: flex !important; }
}

@media (min-width: 769px) and (max-width: 1180px) {
  /* Injected menu (vs-* pages) gets the same clean list styling here. */
  .sb-mn a { display: flex; align-items: center; justify-content: space-between;
             padding: 17px 22px; font-size: 16px; font-weight: 600; color: var(--text);
             text-decoration: none; border-bottom: 1px solid var(--border); }
  .sb-mn-cta { margin: 18px 18px 6px !important; border-radius: 14px !important;
               padding: 16px !important; background: var(--orange) !important; color: #fff !important;
               justify-content: center !important; font-weight: 700 !important; border-bottom: none !important; }
}

/* ============================ SMALL PHONES ============================ */
@media (max-width: 400px) {
  h1 { font-size: 31px; letter-spacing: -1px; }
  .hero-sub { font-size: 15px; }
  .hero-badge { font-size: 11px; }
  .sb-appbar-btn { font-size: 14.5px; }
  .sb-appbar-primary { flex: 1.4 1 0; }
  .btn-primary, .btn-secondary, .btn-book-call { font-size: 15.5px !important; }
}
