/*
  JFWREALTOR mobile polish
  Load this file after styles_update.css.
  Every rule is limited to mobile and tablet widths, so desktop stays unchanged.
*/

@media (max-width: 860px) {
  :root {
    --mobile-gutter: 18px;
    --mobile-section-space: 76px;
    --mobile-card-radius: 22px;
  }

  html {
    scroll-padding-top: 92px;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
  }

  img,
  video,
  svg {
    max-width: 100%;
  }

  .wrap {
    width: 100%;
    padding-right: var(--mobile-gutter);
    padding-left: var(--mobile-gutter);
  }

  .section {
    padding-top: var(--mobile-section-space);
    padding-bottom: var(--mobile-section-space);
  }

  .section-head {
    max-width: 680px;
    margin-bottom: 38px;
  }

  .section-head h2,
  .custom__ h2 {
    font-size: clamp(32px, 8.5vw, 46px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    text-wrap: balance;
  }

  .section-head p,
  .custom__ p {
    margin-top: 16px;
    font-size: 16px;
    line-height: 1.65;
    text-wrap: pretty;
  }

  .eyebrow {
    margin-bottom: 13px;
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: 0.13em;
  }

  .btn {
    min-height: 48px;
    padding: 13px 21px;
    font-size: 14px;
    touch-action: manipulation;
  }

  /* Header */

  .site-header {
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .site-header .wrap {
    width: calc(100% - 24px);
    height: 60px;
    padding: 0 9px 0 15px;
    /* border-radius: 20px; */
    background: rgba(11, 11, 12, 0.84);
    box-shadow: 0 16px 42px -26px rgba(0, 0, 0, 0.9);
  }

  .logo-mark {
    width: 88px;
    height: 42px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn-primary {
    min-height: 42px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .nav-toggle {
    width: 42px;
    height: 42px;
    padding: 8px 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
  }

  /* Full screen menu */

  .mobile-nav-panel {
    padding:
      max(16px, env(safe-area-inset-top))
      var(--mobile-gutter)
      max(22px, env(safe-area-inset-bottom));
  }

  .mobile-nav-top {
    min-height: 58px;
    padding-bottom: 10px;
    border-bottom: 0;
  }

  .mobile-logo .logo-mark {
    width: 96px;
    height: 44px;
  }

  .mobile-nav-close {
    width: 44px;
    height: 44px;
  }

  .mobile-nav-content {
    justify-content: center;
    padding: 34px 0 26px;
  }

  .mobile-nav-label {
    margin-bottom: 14px;
  }

  .mobile-nav-content ul {
    gap: 2px;
  }

  .mobile-nav-content li a {
    min-height: 58px;
    padding: 11px 0;
    font-size: clamp(34px, 10vw, 50px);
  }

  .mobile-nav-actions {
    margin-top: 30px;
  }

  .mobile-nav-note {
    padding-top: 12px;
    border-top: 0;
  }

  /* Hero */

  .hero {
    padding-top: 126px;
    padding-bottom: 58px;
  }

  .hero .wrap {
    gap: 42px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero h1 {
    max-width: 720px;
    font-size: clamp(42px, 11.5vw, 68px);
    line-height: 0.98;
    letter-spacing: -0.05em;
    text-wrap: balance;
  }

  .hero-copy p {
    max-width: 620px;
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.65;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 40px;
    padding-top: 0;
    border-top: 0;
  }

  .hero-stats .stat {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
  }

  .stat b {
    font-size: clamp(19px, 4vw, 24px);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .stat span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
  }

  .hero-visual {
    width: min(100%, 500px);
    max-height: 72svh;
    margin: 0 auto;
    border-radius: 24px;
    aspect-ratio: 9 / 13;
    box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.88);
  }

  .hero-play-btn {
    padding-right: 17px;
    font-size: 13px;
  }

  .logo-marquee {
    margin-top: 46px;
    padding-top: 0;
    border-top: 0;
  }

  .logo-track {
    gap: 42px;
  }

  /* Service cards */

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .feature-card {
    padding: 26px 23px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 18px;
    background:
      radial-gradient(85% 140% at 100% 0%, rgba(33, 111, 243, 0.12), transparent 56%),
      var(--ink);
  }

  .feature-card .ic {
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
  }

  .feature-card h3 {
    font-size: 19px;
  }

  .feature-card p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
  }

  /* Work section */

  .work-section {
    padding-top: 78px;
    padding-bottom: 78px;
  }

  .work-intro {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .work-intro-image {
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: var(--mobile-card-radius);
  }

  .work-intro-image img {
    min-height: 0;
  }

  .work-intro-image figcaption {
    left: 22px;
    right: 22px;
    bottom: 20px;
  }

  .work-intro-image figcaption p {
    font-size: 13px;
  }

  .work-showcase {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 42px;
  }

  .work-card,
  .work-card:first-child {
    min-height: 0;
    overflow: hidden;
    border-radius: var(--mobile-card-radius);
  }

  .work-card-media,
  .work-card:first-child .work-card-media {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .work-card-head {
    top: 17px;
    right: 18px;
    left: 18px;
  }

  .work-card-copy {
    margin-top: 0;
    padding: 22px 22px 25px;
  }

  .work-card-kicker {
    margin-bottom: 10px;
  }

  .work-card-copy h3 {
    max-width: none;
    font-size: clamp(24px, 7vw, 31px);
    line-height: 1.04;
    text-wrap: balance;
  }

  .work-card-copy p {
    max-width: none;
    margin-top: 11px;
    font-size: 14px;
    line-height: 1.6;
  }

  .work-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    margin-top: 28px;
    padding-top: 0;
    border-top: 0;
  }

  .work-footer .btn {
    width: 100%;
  }

  /* Process cards */

  #steps .steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #steps .step {
    padding: 24px 22px;
    border-radius: 18px;
  }

  #steps .step .num {
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
  }

  #steps .step h3 {
    font-size: 20px;
  }

  #steps .step p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Trust section */

  .trust-section {
    padding-top: 70px;
    padding-bottom: 80px;
  }

  .trust-panel {
    grid-template-columns: 1fr;
    overflow: hidden;
    border-radius: 26px;
  }

  .trust-panel-copy {
    padding: 42px 28px 36px;
  }

  .trust-panel-copy h2 {
    max-width: 680px;
    font-size: clamp(36px, 10vw, 52px);
    line-height: 0.99;
    text-wrap: balance;
  }

  .trust-panel-copy > p {
    margin-top: 18px;
    font-size: 15.5px;
    line-height: 1.65;
  }

  .trust-panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 27px;
  }

  .trust-panel-actions .btn {
    width: 100%;
  }

  .trust-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 26px;
    padding-top: 0;
    border-top: 0;
  }

  .trust-points span {
    min-width: 0;
    align-items: flex-start;
    font-size: 12.5px;
    line-height: 1.45;
  }

  .trust-panel-visual {
    min-height: 0;
    aspect-ratio: 4 / 3;
    border: 0;
  }

  .trust-image-caption {
    left: 26px;
    right: 26px;
    bottom: 24px;
  }

  .trust-image-caption strong {
    max-width: 500px;
    font-size: clamp(24px, 6.7vw, 34px);
  }

  /* Main call to action */

  .cta-band {
    display: grid;
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 40px 28px;
    border-radius: 24px;
  }

  .cta-band h2 {
    font-size: clamp(30px, 8vw, 40px);
    line-height: 1.03;
    text-wrap: balance;
  }

  .cta-band p {
    font-size: 15px;
    line-height: 1.6;
  }

  .cta-band > .btn,
  .cta-band > a.btn,
  .cta-band > button.btn {
    width: 100%;
  }

  /* Footer */

  .footer-backdrop {
    padding-bottom: 12px;
  }

  .site-footer {
    margin: 0 10px;
    padding: 48px 24px 24px;
    border-radius: 26px;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 34px 22px;
    padding-bottom: 36px;
    border-bottom: 0;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-brand p {
    max-width: 440px;
  }

  .footer-col h4 {
    margin-bottom: 14px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding-top: 30px;
  }

  /* Automatic scroll popup */

  .popup-overlay {
    align-items: flex-end;
    padding: 12px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .popup-modal {
    width: 100%;
    max-height: min(86vh, 720px);
    max-height: min(86dvh, 720px);
    grid-template-columns: 1fr;
    overflow-y: auto;
    border-radius: 24px;
  }

  .popup-media {
    order: -1;
    min-height: 230px;
    aspect-ratio: 16 / 9;
  }

  .popup-media-badge {
    top: 16px;
    left: 16px;
  }

  .popup-media-caption {
    left: 20px;
    right: 20px;
    bottom: 18px;
  }

  .popup-media-caption strong {
    font-size: clamp(23px, 6.5vw, 30px);
  }

  .popup-copy {
    padding: 32px 24px 26px;
  }

  .popup-copy h3 {
    padding-right: 30px;
    font-size: clamp(27px, 7vw, 34px);
    text-wrap: balance;
  }

  .popup-copy p {
    font-size: 14px;
    line-height: 1.6;
  }

  .popup-copy .btn {
    width: 100%;
  }

  .popup-close {
    top: 13px;
    right: 13px;
    width: 40px;
    height: 40px;
  }

  /* Guided request popup */

  .site-request-overlay {
    padding: 0;
  }

  .site-request-modal {
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: 1fr;
    border-radius: 0;
  }

  .site-request-intro {
    min-height: 0;
    padding:
      max(28px, env(safe-area-inset-top))
      22px
      24px;
  }

  .site-request-intro h2 {
    max-width: 700px;
    padding-right: 46px;
    font-size: clamp(31px, 8.5vw, 43px);
    line-height: 1.01;
    text-wrap: balance;
  }

  .site-request-intro > p {
    max-width: 640px;
    font-size: 14.5px;
    line-height: 1.55;
  }

  .site-request-progress {
    margin-top: 20px;
    padding-top: 0;
    border-top: 0;
  }

  .site-request-close {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 44px;
    height: 44px;
  }

  .site-request-card {
    min-height: 0;
    padding: 30px 20px max(24px, env(safe-area-inset-bottom));
  }

  .request-step h3 {
    font-size: clamp(27px, 7vw, 35px);
    text-wrap: balance;
  }

  .request-step > p {
    font-size: 14px;
    line-height: 1.55;
  }

  .request-options {
    gap: 9px;
    margin-top: 22px;
  }

  .request-option {
    min-height: 68px;
    padding: 13px 14px;
    border-radius: 14px;
  }

  .request-option strong {
    font-size: 14px;
  }

  .request-option small {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.4;
  }

  .request-nav {
    bottom: calc(-1 * max(24px, env(safe-area-inset-bottom)));
    margin-right: -4px;
    margin-left: -4px;
    padding: 16px 4px max(20px, env(safe-area-inset-bottom));
  }

  /* Chat */

  .chat-launcher {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }

  .chat-panel {
    right: 12px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    max-height: min(72vh, 620px);
    max-height: min(72dvh, 620px);
    border-radius: 20px;
  }

  .chat-head,
  .chat-body,
  .chat-foot {
    padding-right: 18px;
    padding-left: 18px;
  }

  /* Video lightbox */

  .video-lightbox {
    padding: 62px 12px 18px;
  }

  .video-lightbox video {
    max-width: 100%;
    max-height: calc(100dvh - 88px);
    border-radius: 16px;
  }

  .video-lightbox-close {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }
}

@media (max-width: 620px) {
  :root {
    --mobile-gutter: 15px;
    --mobile-section-space: 64px;
  }

  .header-actions > .btn-primary {
    display: none;
  }

  .site-header .wrap {
    width: calc(100% - 18px);
  }

  .hero {
    padding-top: 112px;
  }

  .hero h1 {
    font-size: clamp(39px, 12.2vw, 55px);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats .stat {
    display: grid;
    grid-template-columns: minmax(92px, auto) 1fr;
    align-items: center;
    gap: 12px;
  }

  .stat span {
    margin-top: 0;
  }

  .hero-visual {
    max-height: none;
    aspect-ratio: 4 / 5;
  }

  .work-intro-image,
  .work-card-media,
  .work-card:first-child .work-card-media,
  .trust-panel-visual {
    aspect-ratio: 4 / 3;
  }

  .trust-panel-actions,
  .trust-points {
    grid-template-columns: 1fr;
  }

  .trust-points span {
    font-size: 13px;
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

  .mobile-nav-actions {
    grid-template-columns: 1fr;
  }

  .request-options-compact,
  .request-fields {
    grid-template-columns: 1fr;
  }

  .request-fields .field-wide {
    grid-column: auto;
  }

  .request-nav {
    flex-wrap: wrap;
  }

  .request-nav .btn {
    flex: 1 1 calc(50% - 6px);
  }

  .request-back {
    order: 2;
    width: 100%;
    margin: 0;
    text-align: center;
  }
}

@media (max-width: 400px) {
  :root {
    --mobile-gutter: 12px;
  }

  .site-header .wrap {
    height: 56px;
  }

  .logo-mark {
    width: 80px;
    height: 38px;
  }

  .hero h1 {
    font-size: clamp(36px, 11.8vw, 47px);
  }

  .hero-copy p {
    font-size: 15px;
  }

  .work-intro-image,
  .work-card-media,
  .work-card:first-child .work-card-media,
  .trust-panel-visual {
    aspect-ratio: 1 / 1;
  }

  .trust-panel-copy,
  .popup-copy {
    padding-right: 20px;
    padding-left: 20px;
  }

  .site-request-card {
    padding-right: 15px;
    padding-left: 15px;
  }

  .request-option {
    gap: 11px;
  }

  .request-option input {
    width: 17px;
    height: 17px;
  }

  .site-footer {
    margin: 0 6px;
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 860px) {
  .btn:hover,
  .feature-card:hover,
  .work-card:hover,
  #steps .step:hover,
  .portfolio-card:hover,
  .work-intro-image:hover img,
  .work-card:hover .work-card-media img,
  .trust-panel:hover .trust-panel-image,
  .chat-launcher:hover,
  .popup-close:hover,
  .site-request-close:hover,
  .mobile-nav-close:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 860px) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================================================
   COMPACT MOBILE HERO REFRESH
   Keeps the headline, actions, video, and partner row together.
   =========================================================== */
@media (max-width: 860px) {
  .hero {
    min-height: 100svh;
    padding: 92px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
      radial-gradient(100% 65% at 100% 8%, rgba(33, 111, 243, 0.14), transparent 62%),
      #070708;
  }

  .hero .hero-layout {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 22px;
    padding-top: 14px;
    padding-bottom: 18px;
  }

  .hero-copy {
    max-width: 700px;
  }

  .hero .eyebrow {
    margin-bottom: 10px;
  }

  .hero h1 {
    max-width: 720px;
    font-size: clamp(38px, 10.2vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.052em;
  }

  .hero h1 span {
    display: block;
  }

  .hero-copy p {
    max-width: 630px;
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.52;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
  }

  .hero-visual {
    width: 100%;
    height: auto;
    max-height: none;
    margin: 0;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    box-shadow: 0 28px 62px -34px rgba(0, 0, 0, 0.9);
    isolation: isolate;
  }

  .hero-visual video {
    object-fit: cover;
    object-position: center 34%;
  }

  .hero-video-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 58%, rgba(4, 4, 5, 0.25));
  }

  .hero-play-btn {
    z-index: 2;
    min-height: 44px;
    padding: 7px 16px 7px 7px;
  }

  .hero-play-btn .ic {
    width: 30px;
    height: 30px;
  }

  .hero-partners {
    flex: 0 0 auto;
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.28);
  }

  .hero .logo-marquee {
    width: 100%;
    margin-top: 0;
    padding: 15px 0 16px;
    border-top: 0;
  }

  .hero .logo-track {
    gap: 38px;
  }

  .hero .logo-item {
    font-size: 14px;
  }
}

@media (max-width: 620px) {
  .hero {
    padding-top: 78px;
  }

  .hero .hero-layout {
    gap: 17px;
    padding-top: 10px;
    padding-bottom: 13px;
  }

  .hero h1 {
    font-size: clamp(35px, 10.5vw, 48px);
  }

  .hero-copy p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.46;
  }

  .hero-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
  }

  .hero-actions .btn {
    font-size: 13px;
  }

  .hero-visual {
    aspect-ratio: 16 / 8.7;
    border-radius: 16px;
  }

  .hero .logo-marquee {
    padding-top: 13px;
    padding-bottom: 14px;
  }
}

@media (max-width: 390px), (max-height: 700px) and (max-width: 860px) {
  .hero {
    padding-top: 72px;
  }

  .hero .hero-layout {
    gap: 13px;
    padding-top: 7px;
    padding-bottom: 10px;
  }

  .hero .eyebrow {
    margin-bottom: 7px;
    font-size: 9px;
  }

  .hero h1 {
    font-size: clamp(32px, 9.8vw, 42px);
  }

  .hero-copy p {
    margin-top: 9px;
    font-size: 13px;
    line-height: 1.4;
  }

  .hero-actions {
    margin-top: 13px;
  }

  .hero-actions .btn {
    min-height: 42px;
    padding: 9px 10px;
    font-size: 12px;
  }

  .hero-play-btn {
    min-height: 40px;
    font-size: 12px;
  }

  .hero-partners {
    min-height: 46px;
  }

  .hero .logo-marquee {
    padding-top: 11px;
    padding-bottom: 12px;
  }
}



@media screen and (max-width: 400px) {
  .site-footer {
    width: 100%;
    margin: 0;
    border-radius: 0;
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
  }
  .footer-backdrop {
    padding: 0;
  }
}