/* ─────────────────────────────────────────────────────────────
   Ranger Turf Co — Mobile Layer
   Phone-only overrides. Desktop is untouched above 900px.
   Strategy: stack everything, neutralize horizontal grids,
   reduce typography by ~25%, give thumbs room.
   ───────────────────────────────────────────────────────────── */

/* ── Desktop defaults: hide all mobile chrome ── */
.tb__hb { display: none; }
.nav-overlay { display: none; }
.mb-cta { display: none; }

@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  img, svg, video { max-width: 100%; height: auto; }

  /* ── Top bar / Nav ── */
  .tb__inner {
    padding: 12px 18px !important;
    gap: 12px !important;
    justify-content: space-between !important;
  }
  .logo img.logo__img,
  img.logo__img,
  header.tb img.logo__img {
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
  }
  .logo > div { gap: 2px; }
  .logo__n { font-size: 12px; letter-spacing: 0.03em; }
  .logo__s { font-size: 9px; }

  /* Hide desktop nav + right-side phone/quote */
  .tb__nav { display: none !important; }
  .tb__right { display: none !important; }

  /* Hamburger button — visible only on mobile */
  .tb__hb {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 1.5px solid var(--ink);
    background: var(--bg);
    cursor: pointer;
    margin-left: auto;
    border-radius: 2px;
    padding: 0;
    transition: background var(--dur-fast) var(--ease-out);
  }
  .tb__hb:hover { background: var(--bg-alt); }
  .tb__hb span {
    display: block;
    width: 18px;
    height: 1.8px;
    background: var(--ink);
    transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
  }
  .tb__hb.is-open span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .tb__hb.is-open span:nth-child(2) { opacity: 0; }
  .tb__hb.is-open span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

  /* Mobile overlay menu */
  .nav-overlay {
    display: flex !important;
    position: fixed;
    inset: 0;
    background: var(--forest);
    color: var(--bg);
    z-index: 100;
    overflow-y: auto;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
    visibility: hidden;
  }
  .nav-overlay.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-overlay__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(237, 232, 220, 0.15);
  }
  .nav-overlay__brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
  }
  .nav-overlay__close {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1.5px solid rgba(237, 232, 220, 0.5);
    color: var(--bg);
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
  }
  .nav-overlay__list {
    list-style: none;
    margin: 0;
    padding: 16px 0;
    flex: 1;
  }
  .nav-overlay__list li {
    border-bottom: 1px solid rgba(237, 232, 220, 0.12);
  }
  .nav-overlay__list a {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    color: var(--bg);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.01em;
    text-transform: none;
  }
  .nav-overlay__list a .num {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(237, 232, 220, 0.5);
    font-weight: 500;
  }
  .nav-overlay__list a .arr {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 18px;
  }
  .nav-overlay__list a.is-current { color: var(--accent); }
  .nav-overlay__list a.is-current .num { color: var(--accent); }

  .nav-overlay__foot {
    padding: 24px;
    border-top: 1px solid rgba(237, 232, 220, 0.15);
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .nav-overlay__call {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: var(--accent);
    color: var(--accent-ink);
    text-decoration: none;
    border: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .nav-overlay__call b {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.05em;
  }
  .nav-overlay__quote {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 22px;
    background: transparent;
    color: var(--bg);
    border: 1.5px solid var(--bg);
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  body.nav-locked { overflow: hidden; }

  /* ── Sticky bottom CTA bar ── */
  .mb-cta {
    display: flex !important;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: var(--bg);
    border-top: 1.5px solid var(--ink);
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    gap: 8px;
    box-shadow: 0 -8px 24px rgba(15, 26, 18, 0.08);
  }
  .mb-cta__call,
  .mb-cta__quote {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 14px;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 2px;
  }
  .mb-cta__call {
    background: var(--bg);
    color: var(--ink);
    border: 1.5px solid var(--ink);
  }
  .mb-cta__quote {
    background: var(--ink);
    color: var(--bg);
    border: 1.5px solid var(--ink);
  }
  /* leave room at bottom of page so CTA doesn't cover content */
  body { padding-bottom: 72px; }
  /* footer needs the same buffer */
  .ft { padding-bottom: 32px !important; margin-bottom: 0; }

  /* ── Generic body type rhythm ── */
  h1, h2, h3 { text-wrap: balance; }

  /* ── Hero (homepage DirB) ── */
  .hero-b {
    grid-template-columns: 1fr !important;
    padding: 32px 18px 48px !important;
    gap: 32px !important;
  }
  .hero-b__left { padding-top: 0; }
  .hero-b__tag { margin-bottom: 24px; font-size: 10px; }
  .hero-b__title {
    font-size: clamp(34px, 9vw, 44px) !important;
    margin-bottom: 20px;
  }
  .hero-b__lede {
    font-size: 16px;
    margin-bottom: 28px;
  }
  .hero-b__ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 32px;
  }
  .hero-b__ctas .b { justify-content: center; padding: 14px 18px; }
  .hero-b__calclink {
    align-self: stretch !important;
    justify-content: center;
    margin-top: 14px !important;
    padding: 12px 14px !important;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  .hero-b__calclink span:first-child { padding-right: 10px !important; }
  .hero-b__calclink span:nth-child(2) { font-size: 13px !important; }
  .hero-b__metrics {
    grid-template-columns: 1fr 1fr 1fr;
    margin-top: 0;
    padding-top: 20px;
    gap: 12px;
  }
  .hero-b__metrics b { font-size: 28px; }
  .hero-b__metrics b i { font-size: 18px; }
  .hero-b__metrics span { font-size: 9px; letter-spacing: 0.06em; }
  .hero-b__right { gap: 10px; }
  .hero-b__img { min-height: 280px; }
  .hero-b__subimg { display: none; }
  .hero-b__stamp { padding: 10px 12px; font-size: 9px; }

  /* ── Trust bar ── */
  .trust { padding: 18px 0; margin-bottom: 64px; }
  .trust__inner {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 18px;
  }
  .trust__label { font-size: 10px; max-width: none; }
  .trust__row {
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: flex-start;
  }
  .trust__item { font-size: 11px; letter-spacing: 0.05em; }

  /* ── Section heading (DirB) ── */
  .sec-b {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 18px;
    margin-bottom: 32px;
  }
  .sec-b h2 {
    font-size: clamp(30px, 8vw, 38px) !important;
    grid-column: 1;
    grid-row: auto;
  }
  .sec-b p { grid-column: 1; font-size: 15px; margin-top: 12px; }
  .sec-b__no { padding-top: 12px; font-size: 10px; }

  /* ── Before / After (DirB) ── */
  .ba-b { padding: 0 18px; margin-bottom: 64px; }
  .ba-b__stage { height: 380px; }
  .ba-b__handle-inner { width: 44px; height: 44px; }
  .ba-b__tag { font-size: 9px; padding: 6px 9px; top: 12px; }
  .ba-b__tag--l { left: 12px; }
  .ba-b__tag--r { right: 12px; }
  .ba-b__specs {
    grid-template-columns: 1fr 1fr;
  }
  .ba-b__specs > div {
    padding: 14px;
    border-bottom: 1px solid var(--rule);
  }
  .ba-b__specs > div:nth-child(odd) { border-right: 1px solid var(--rule); }
  .ba-b__specs > div:nth-child(even) { border-right: none; }
  .ba-b__specs > div:nth-last-child(-n+2) { border-bottom: none; }
  .ba-b__specs b { font-size: 16px; }

  /* ── Services (DirB tabs) ── */
  .svc { padding: 0 18px; margin-bottom: 64px; }
  .svc__tabs {
    flex-direction: column;
    margin-bottom: 0;
  }
  .svc__tab {
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 14px 16px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .svc__tab:last-child { border-bottom: none; }
  .svc__tab-name { font-size: 15px; }
  .svc__tab-no { order: 2; font-size: 10px; }
  .svc__panel {
    grid-template-columns: 1fr;
    border-top: 1.5px solid var(--ink);
  }
  .svc__img {
    min-height: 240px;
    border-right: none;
    border-bottom: 1.5px solid var(--ink);
    order: -1;
  }
  .svc__meta { padding: 28px 22px; }
  .svc__meta h3 { font-size: 28px; margin-bottom: 14px; }
  .svc__meta p { font-size: 15px; margin-bottom: 22px; }
  .svc__bullets li { font-size: 14px; padding: 12px 0; }

  /* ── Portfolio grid (DirB home) ── */
  .port { padding: 0 18px; margin-bottom: 64px; }
  .port__filter {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }
  .port__chip { padding: 7px 11px; font-size: 11px; }
  .port__count { width: 100%; margin-left: 0; margin-top: 6px; font-size: 10px; }
  .port__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .port__card--2 { grid-column: span 1; }
  .port__card .ph,
  .port__card--2 .ph { aspect-ratio: 4/3; }
  /* Show overlay always on touch (no hover) */
  .port__overlay { opacity: 1; padding: 14px; }
  .port__loc { font-size: 18px; }
  .port__type { font-size: 10px; }

  /* ── Process (DirB home) ── */
  .proc { padding: 64px 0; margin-bottom: 64px; }
  .proc__steps {
    grid-template-columns: 1fr;
    padding: 0 18px;
  }
  .proc__step {
    border-right: none;
    border-bottom: 1px solid rgba(237, 232, 220, 0.2);
    padding: 24px 4px 24px;
  }
  .proc__step:last-child { border-bottom: none; }
  .proc__step-head { margin-bottom: 18px; }
  .proc__n { font-size: 36px; }
  .proc__step h3 { font-size: 20px; margin-bottom: 10px; }
  .proc__step p { font-size: 14px; }

  /* ── Testimonials (DirB home) ── */
  .test { padding: 0 18px; margin-bottom: 64px; }
  .test__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .test__card { padding: 22px 20px; gap: 18px; }
  .test__card blockquote { font-size: 17px; }
  .test__card--lg blockquote { font-size: 20px; }

  /* ── FAQ (DirB home) ── */
  .faq-b { padding: 0 18px; margin-bottom: 64px; }
  .faq-b__q {
    grid-template-columns: 36px 1fr 28px;
    gap: 14px;
    padding: 22px 4px;
    font-size: 19px;
  }
  .faq-b__q:hover { padding-left: 4px; }
  .faq-b__qn { font-size: 10px; }
  .faq-b__a {
    padding: 0 4px 22px 50px;
    font-size: 15px;
  }

  /* ── Big CTA panel ── */
  .cta { padding: 0 18px; margin-bottom: 64px; }
  .cta__panel {
    grid-template-columns: 1fr;
    padding: 36px 24px;
    gap: 32px;
  }
  .cta__left h2 { font-size: 34px !important; line-height: 1; }
  .cta__left p { font-size: 15px; margin-bottom: 24px; }

  /* ── Footer ── */
  .ft { padding: 56px 0 32px; }
  .ft__top {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 18px 32px;
  }
  .ft__logo { font-size: 28px; }
  .ft__cols {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .ft__cols a { font-size: 13px; }
  .ft__bot {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding: 0 18px;
    margin-top: 24px;
  }

  /* ──────────────────────────────────────────────
     Subpages (pages.css overrides)
     ────────────────────────────────────────────── */

  .phero {
    padding: 64px 18px 40px !important;
  }
  .phero__crumbs { font-size: 10px; margin-bottom: 16px; }
  .phero__head {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }
  .phero__title {
    font-size: clamp(32px, 9vw, 42px) !important;
  }
  .phero__lede { font-size: 15px; max-width: none; }

  .psec {
    padding: 56px 18px !important;
  }
  .psec--dark .psec-inner {
    padding: 0 18px;
  }
  .psec__hd {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
  }
  .psec__hd-left h2 { font-size: clamp(28px, 8vw, 38px) !important; }
  .psec__hd-right { font-size: 15px; padding-top: 0; }

  /* Services subpage rows */
  .sv-row {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 40px 0 !important;
  }
  .sv-row__n { padding-top: 0; font-size: 11px; }
  .sv-row__body h3 { font-size: clamp(28px, 8vw, 36px) !important; }
  .sv-row__body p { font-size: 15px; max-width: none; }

  /* Process subpage steps */
  .pr-step {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 36px 0 !important;
  }
  .pr-step__n { font-size: 56px !important; }

  /* About */
  .ab-intro {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .ab-intro__img { min-height: 260px; }
  .ab-stats {
    grid-template-columns: 1fr 1fr;
  }
  .ab-stats__item { padding: 28px 18px !important; }
  .ab-stats__n { font-size: clamp(36px, 11vw, 56px) !important; }
  .ab-stats__l { font-size: 10px !important; margin-top: 10px !important; }
  .ab-team {
    grid-template-columns: 1fr !important;
    max-width: none !important;
  }
  .ab-team__img { min-height: 260px; }
  .ab-vals {
    grid-template-columns: 1fr;
  }

  /* Project detail */
  .pd-head { margin-top: -40px !important; }
  .pd-head__inner { padding: 24px 18px !important; }
  .pd-notes, .pd-next {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }
  .pd-specs {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Contact */
  .ct-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    padding: 48px 18px 80px !important;
  }
  .ct-left h2 { font-size: 36px; }
  .ct-info { padding: 22px; }
  .ct-info__row dd { font-size: 17px; }
  .ct-faq {
    grid-template-columns: 1fr !important;
    padding: 64px 18px !important;
    gap: 24px !important;
  }
  .ct-faq h2 { font-size: 32px; }
  .ct-faq__q {
    grid-template-columns: 28px 1fr 24px;
    gap: 12px;
    padding: 22px 0;
    font-size: 16px;
  }
  .ct-faq__a {
    padding: 0 0 22px 40px;
    font-size: 14px;
  }

  /* Quote form */
  .f { padding: 22px; }
  .f__hd { font-size: 10px; padding-bottom: 14px; margin-bottom: 18px; }
  .f__input { font-size: 17px; }
  .f__grid { grid-template-columns: 1fr; }
  .f__opt-inner { padding: 13px 14px; }
  .f__opt-inner b { font-size: 13px; }
  .f__actions { flex-wrap: wrap; gap: 8px; }
  .f__actions .b { flex: 1; justify-content: center; }

  /* ──────────────────────────────────────────────
     Blog (journal)
     ────────────────────────────────────────────── */
  .jn-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .jn-card--feature {
    grid-template-columns: 1fr !important;
  }
  .jn-card--feature .jn-card__img {
    min-height: 220px;
  }
  .jn-card__body { padding: 22px 4px !important; }
  .jn-card__title {
    font-size: 22px !important;
  }
  .jn-card--feature .jn-card__title {
    font-size: 28px !important;
  }
  .jn-card__excerpt { font-size: 14px; }

  /* Blog post page */
  .bp-hero {
    padding: 32px 18px 24px !important;
  }
  .bp-hero__title {
    font-size: clamp(28px, 8vw, 38px) !important;
  }
  .jp-hero { padding: 80px 20px 40px !important; max-width: 100% !important; box-sizing: border-box !important; }
  .jp-hero h1 { font-size: clamp(26px, 7.5vw, 36px) !important; line-height: 1.1 !important; word-break: break-word !important; overflow-wrap: break-word !important; hyphens: auto !important; }
  .jp-hero__meta { flex-wrap: wrap !important; gap: 8px 16px !important; }
  .jp-img { padding: 0 !important; max-width: 100% !important; }
  .jp-body { padding: 40px 20px !important; max-width: 100% !important; box-sizing: border-box !important; }
  .jp-body h2 { font-size: clamp(22px, 5.5vw, 28px) !important; word-break: break-word !important; }
  .jp-body p, .jp-body li { font-size: 16px !important; line-height: 1.65 !important; word-break: break-word !important; }
  .jp-body img { max-width: 100% !important; height: auto !important; }
  .jp-cta { margin: 40px 16px !important; padding: 28px 20px !important; }
  .bp-hero__meta {
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 11px;
  }
  .bp-img {
    margin: 24px -18px !important;
    border-radius: 0;
  }
  .bp-body {
    padding: 0 18px 48px !important;
    font-size: 16px !important;
    line-height: 1.65 !important;
  }
  .bp-body h2 {
    font-size: clamp(22px, 6vw, 28px) !important;
    margin-top: 36px !important;
  }
  .bp-body h3 {
    font-size: 19px !important;
  }
  .bp-body ul, .bp-body ol {
    padding-left: 22px !important;
  }
  .bp-body blockquote {
    margin: 20px 0 !important;
    padding: 16px 18px !important;
    font-size: 16px !important;
  }
  .bp-nav {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 32px 18px !important;
  }
}

/* ── Tighter phones ── */
@media (max-width: 380px) {
  .hero-b__metrics b { font-size: 24px; }
  .hero-b__metrics span { font-size: 8px; }
  .ab-stats { grid-template-columns: 1fr; }
  .ft__cols { grid-template-columns: 1fr; }
}
