/* ------------------------------------------------------------------
   Mobile layer — phones and small tablets only (≤ 1023px).
   Desktop is untouched: nothing in this file applies above 1023px.
   The site's root font-size is 62.5%, so 1rem = 10px throughout.
   ------------------------------------------------------------------ */
@media (max-width: 1023px) {

  /* --- guard rails ------------------------------------------------ */
  html, body { overflow-x: hidden; }
  body { padding-bottom: 8.4rem; }            /* room for the sticky bar */

  /* The giant F·B·D wordmark is a fixed watermark pinned to the vertical
     centre of the viewport. On desktop it is the brand statement; on a
     phone it is a stray letter sitting on top of body copy and the quote
     form. The header already carries the FBD lockup, so hide it here. */
  .header-logo__svg,
  .header-logo__placeholder { display: none !important; }

  /* the menu is a difference-blend overlay on desktop; on a phone that
     inverts whatever is behind it and reads as clutter. Make it opaque. */
  .nav { mix-blend-mode: normal !important; background: #000 !important; color: #fff !important; }
  .nav .nav-item__link, .nav .footer-content, .nav .footer-content a { color: #fff !important; }
  .nav .nav__list { padding-top: 7rem; }
  .nav .nav__footer { padding-bottom: 2rem; }

  /* --- fixed brand mark (top-left) ---------------------------------- */
  .mb-brand {
    position: fixed; top: 1.2rem; left: 1.6rem; z-index: 850;
    display: flex; align-items: center; gap: .8rem; text-decoration: none;
    padding: .5rem .9rem .5rem .5rem; border-radius: 999px;
    background: rgba(255,255,255,.88);
    -webkit-backdrop-filter: blur(1rem); backdrop-filter: blur(1rem);
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
  }
  .mb-brand img { height: 2.4rem; width: auto; display: block; }
  .mb-brand span { font-family: -apple-system,"SF Pro Text",InterWeb,sans-serif; font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; color: #000; }
  body:has(.nav--open) .mb-brand { opacity: 0; pointer-events: none; }
  /* the home hero already paints its own lockup on the first tile; on
     phones that hero is hidden, so the mark is needed on every page. */

  /* --- sticky quote bar ------------------------------------------- */
  .mb-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 450;
    padding: 1rem 1.6rem calc(1rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: saturate(160%) blur(1.4rem);
    backdrop-filter: saturate(160%) blur(1.4rem);
    border-top: 1px solid rgba(0,0,0,.08);
    display: flex; gap: 1rem; align-items: center;
    transform: translateY(0);
    transition: transform .35s cubic-bezier(.32,.94,.6,1), opacity .35s;
  }
  .mb-bar__btn {
    flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
    min-height: 5.2rem; padding: 0 2rem; border-radius: 999px;
    background: #000; color: #fff; text-decoration: none;
    font-family: "Pretendard","Pretendard Variable",InterWeb,-apple-system,"SF Pro Text",sans-serif;
    font-size: 1.7rem; font-weight: 700; letter-spacing: -.01em;
    -webkit-tap-highlight-color: transparent;
  }
  .mb-bar__btn:active { transform: scale(.98); }
  .mb-bar__sub {
    flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    min-height: 5.2rem; padding: 0 1.6rem; border-radius: 999px;
    border: 1.5px solid #000; color: #000; text-decoration: none;
    font-family: InterWeb,sans-serif; font-size: 1.3rem; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase;
  }
  /* out of the way whenever the form or the menu is up */
  body:has(.qm-overlay.is-open) .mb-bar,
  body:has(.nav--open) .mb-bar { transform: translateY(130%); }

  /* --- HOME: replace the pinned client-name hero -------------------- */
  .home > .home-hero { display: none !important; }

  .mb-hero {
    position: relative; height: 100svh; min-height: 56rem; overflow: hidden;
    background: #000; color: #fff;
  }
  .mb-hero__video {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  }
  .mb-hero__shade {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%,
                                        rgba(0,0,0,0) 45%, rgba(0,0,0,.78) 100%);
  }
  .mb-hero__body {
    position: absolute; left: 0; right: 0; bottom: 0;
    /* clear the sticky bar so the hero's own buttons stay tappable */
    padding: 0 2rem calc(9.6rem + env(safe-area-inset-bottom));
  }
  .mb-hero__eyebrow {
    display: flex; align-items: center; gap: 1rem;
    font-family: InterWeb,sans-serif; font-size: 1.1rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-bottom: 1.4rem;
  }
  .mb-hero__eyebrow img { height: 2.2rem; width: auto; filter: brightness(0) invert(1); }
  .mb-hero__title {
    margin: 0 0 1.2rem; font-family: "Pretendard","Pretendard Variable",InterWeb,-apple-system,sans-serif;
    font-size: 3.6rem; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; word-break: keep-all;
  }
  .mb-hero__title small {
    display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -.01em;
    opacity: .82; margin-bottom: .6rem;
  }
  .mb-hero__sub {
    margin: 0 0 2.2rem; font-family: "Pretendard","Pretendard Variable",-apple-system,sans-serif;
    font-size: 1.5rem; line-height: 1.55; font-weight: 400; opacity: .9; word-break: keep-all;
  }
  .mb-hero__actions { display: flex; gap: 1rem; }
  .mb-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 5rem; padding: 0 2.2rem; border-radius: 999px; text-decoration: none;
    font-family: "Pretendard","Pretendard Variable",InterWeb,-apple-system,sans-serif;
    font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }
  .mb-btn--solid { background: #fff; color: #000; flex: 1 1 auto; }
  .mb-btn--ghost { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }
  .mb-btn--dark  { background: #000; color: #fff; flex: 1 1 auto; }
  .mb-btn--line  { border: 1.5px solid #000; color: #000; }

  /* trust strip under the hero */
  .mb-trust {
    padding: 1.6rem 0; border-bottom: 1px solid rgba(0,0,0,.08); overflow: hidden; white-space: nowrap;
    font-family: InterWeb,sans-serif; font-size: 1.2rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  }
  .mb-trust__track { display: inline-flex; gap: 3.2rem; padding-left: 2rem; animation: mb-marquee 26s linear infinite; }
  .mb-trust__track span::before { content: "·"; margin-right: 3.2rem; opacity: .35; }
  .mb-trust__track span:first-child::before { content: none; margin: 0; }
  @keyframes mb-marquee { to { transform: translateX(-50%); } }

  /* the home "elevate your brand" block: tighten it up on phones */
  .home-about__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

  /* --- PRODUCTS: dedicated mobile page ------------------------------ */
  .mb-product-page .about > *:not(footer) { display: none !important; }
  .mb-product-page .door-drawings,
  .mb-product-page .creativity-photos,
  .mb-product-page .quote-cta { display: none !important; }

  .mb-product {
    font-family: "Pretendard","Pretendard Variable",InterWeb,-apple-system,"SF Pro Text",sans-serif;
    color: #000; word-break: keep-all;
  }
  .mb-product section { padding: 3.2rem 2rem; }
  .mb-product section + section { border-top: 1px solid rgba(0,0,0,.08); }

  .mb-p-hero { padding-top: 9rem !important; }
  .mb-p-hero__eyebrow {
    font-family: InterWeb,sans-serif; font-size: 1.1rem; font-weight: 700;
    letter-spacing: .14em; text-transform: uppercase; opacity: .55; margin-bottom: 1rem;
  }
  .mb-p-hero__title { margin: 0 0 1rem; font-size: 4.4rem; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
  .mb-p-hero__title span { font-family: InterWeb,sans-serif; }
  .mb-p-hero__lead { margin: 0 0 2rem; font-size: 1.7rem; line-height: 1.5; font-weight: 500; }
  .mb-p-hero__media {
    position: relative; margin: 0 -2rem 2.2rem; aspect-ratio: 4 / 5; background: #f4f4f4; overflow: hidden;
  }
  .mb-p-hero__media video { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
  .mb-p-hero__actions { display: flex; gap: 1rem; }

  .mb-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 0 2rem 3.2rem !important; }
  .mb-kpi { border: 1px solid rgba(0,0,0,.1); border-radius: 1.4rem; padding: 1.4rem 1.2rem; }
  .mb-kpi__n { font-family: InterWeb,sans-serif; font-size: 2.4rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
  .mb-kpi__n small { font-size: 1.2rem; letter-spacing: 0; margin-left: .2rem; }
  .mb-kpi__l { margin-top: .6rem; font-size: 1.15rem; opacity: .6; line-height: 1.3; }

  .mb-h { margin: 0 0 1.4rem; font-family: InterWeb,sans-serif; font-size: 1.2rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .55; }
  .mb-chips { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; padding: 0; list-style: none; }
  .mb-chips li { padding: .9rem 1.4rem; border-radius: 999px; background: #f2f2f2; font-size: 1.4rem; font-weight: 500; }
  .mb-list { margin: 0; padding: 0; list-style: none; }
  .mb-list li { display: flex; gap: 1.2rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 1.5rem; line-height: 1.4; }
  .mb-list li:last-child { border-bottom: 0; }
  .mb-list img { width: 2.4rem; height: 2.4rem; flex: 0 0 auto; margin-top: .1rem; }

  .mb-spec { margin: 0; }
  .mb-spec div { display: grid; grid-template-columns: 11rem 1fr; gap: 1.2rem; padding: 1.1rem 0; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 1.45rem; line-height: 1.4; }
  .mb-spec div:last-child { border-bottom: 0; }
  .mb-spec dt { margin: 0; opacity: .55; }
  .mb-spec dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
  .mb-note { margin: 1.4rem 0 0; font-size: 1.25rem; line-height: 1.5; opacity: .6; }

  .mb-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .mb-doors figure { margin: 0; }
  .mb-doors img { width: 100%; height: auto; display: block; background: #fff; }
  .mb-doors figcaption { margin-top: .8rem; font-family: InterWeb,sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .6; text-align: center; }

  .mb-gallery { display: flex; gap: 1rem; margin: 0 -2rem; padding: 0 2rem; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .mb-gallery::-webkit-scrollbar { display: none; }
  .mb-gallery img { flex: 0 0 78%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 1.4rem; scroll-snap-align: start; background: #eee; }

  .mb-copy p { margin: 0 0 1.2rem; font-size: 1.55rem; line-height: 1.6; }
  .mb-copy p:last-child { margin-bottom: 0; }

  .mb-cta { background: #000; color: #fff; border-radius: 2rem; padding: 2.6rem 2.2rem; }
  .mb-cta h3 { margin: 0 0 .8rem; font-size: 2.2rem; line-height: 1.25; font-weight: 800; letter-spacing: -.02em; }
  .mb-cta p { margin: 0 0 2rem; font-size: 1.45rem; line-height: 1.5; opacity: .8; }
  .mb-cta .mb-btn--solid { width: 100%; }
  .mb-cta__alt { display: block; margin-top: 1.4rem; text-align: center; font-size: 1.3rem; color: #fff; opacity: .7; text-decoration: underline; }

  /* --- ABOUT: dedicated mobile page --------------------------------- */
  .mb-about-page .about > *:not(footer) { display: none !important; }
  .mb-lines p { margin: 0; font-size: 2.1rem; line-height: 1.45; font-weight: 700; letter-spacing: -.02em; }
  .mb-lines p:nth-child(6), .mb-lines p:nth-child(10) { margin-bottom: 1.6rem; }
  .mb-sign { margin: 2rem 0 0; font-family: -apple-system,"SF Pro Text",InterWeb,sans-serif; font-size: 1.6rem; font-weight: 700; }
  .mb-lead { font-size: 1.9rem !important; font-weight: 700; line-height: 1.4 !important; letter-spacing: -.02em; }
  .mb-gallery--wide { margin-top: .4rem; margin-bottom: 2rem; }
  .mb-gallery--wide img { flex-basis: 84%; aspect-ratio: 16 / 10; }
  .mb-gallery--tall { margin-bottom: 2rem; }
  .mb-gallery--tall img { flex-basis: 62%; aspect-ratio: 2 / 3; }
  .mb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
  .mb-card { display: block; text-decoration: none; color: #000; border: 1px solid rgba(0,0,0,.1); border-radius: 1.6rem; padding: 1.2rem; }
  .mb-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; display: block; }
  .mb-card__t { margin-top: 1rem; font-family: InterWeb,sans-serif; font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
  .mb-card__s { margin-top: .3rem; font-size: 1.2rem; opacity: .6; }

  /* footer: the desktop margin above it is 18rem; phones don't need that */
  .mb-product-page .footer, .mb-about-page .footer { margin-top: 4rem !important; }
  .footer a, .footer-content a { display: inline-block; padding: .4rem 0; }
}
