/* =====================================================================
   Forma Fabrications: mobile cleanup (phones, up to 760px wide)
   Loaded after site.css and theme-light.css on every page.
   Keeps the dark HUD look, but strips the duplicate labels, serial
   numbers and animated decorations, gives every section a clear break,
   and turns small text links into proper buttons.
   Nothing in here applies on tablets or desktop.
   ===================================================================== */
@media (max-width: 760px) {

  /* ---------- 1. Remove decorative noise ---------- */
  .hud-plate,
  .stamp,
  .spec-line,
  .sec-label,
  .rm-toggle,
  .buy .specs,
  .render-note + .desc-box .db-head,
  .load-tag { display: none !important; }

  .tile::before, .biz-item::before, .fact::before, .faq::before,
  .card .ph::after,
  .shot::after,
  .tile::after, .biz-item::after, .fact::after, .faq::after { display: none !important; }

  /* calmer type: less glow, more breathing room */
  h1, h2 { text-shadow: none !important; }
  .lead { font-size: 16px; line-height: 1.65; }

  /* ---------- 2. Clear section breaks ---------- */
  section.band {
    padding: 56px 0 60px !important;
    border-top: 1px solid var(--line2);
    position: relative;
  }
  section.band::after {          /* short orange tab marking the start of each section */
    content: ""; position: absolute; top: -1px; left: var(--pad); width: 48px; height: 3px;
    background: var(--accent); border-radius: 0 0 2px 2px;
  }
  .band.alt { background: var(--bg2); }
  .sec-head, .biz-head { margin-bottom: 28px !important; gap: 14px !important; }
  .sec-head > div { gap: 8px !important; }
  h2.big, .biz-head h2, #ship-h { font-size: 30px !important; line-height: 1.1 !important; }
  .eyebrow { font-size: 12px; }

  /* ---------- 3. Buttons: bigger, bolder, unmistakable ---------- */
  .btn { min-height: 54px; font-size: 16px; font-weight: 700; }

  /* text links like "Details →" / "See all on sale →" become real buttons.
     On cards that also have "Add to cart", Details is the outlined second choice;
     on shop cards (no quick-add) it becomes the solid main button further down. */
  .card .foot .go {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; padding: 0 16px;
    font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  }
  .sale-head { display: flex; flex-direction: column; align-items: flex-start !important; gap: 14px !important; }
  .sale-head .go {
    display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 0 18px;
    font-weight: 700; white-space: nowrap;
  }

  /* ---------- 4. Hero ---------- */
  .hero { min-height: 600px; }
  .hero-copy .tag { font-size: 11px; }
  .hero-copy p { font-size: 16px; }
  .shop-btn { width: 100%; min-height: 58px; font-size: 17px; }
  .display-bar .btn.ghost { min-height: 48px; padding: 0 18px; white-space: nowrap; }

  /* ---------- 5. Product cards (home + shop): photo, name, price, one button ---------- */
  .card .desc-box,
  .card .custom-cta { display: none !important; }
  .card .chip { font-size: 10px; padding: 4px 9px; left: 10px; top: 10px; }
  .card .body { padding: 16px !important; gap: 10px !important; }
  .card h3 { font-size: 18px; line-height: 1.25; margin: 0; }
  .card .foot { display: flex; flex-direction: row; justify-content: space-between; align-items: center !important; gap: 12px; margin-top: auto; }
  .card .price-line { font-size: 16px; font-weight: 600; color: var(--head); }
  .card .quick-add { display: grid !important; grid-template-columns: 1fr; gap: 10px; }
  .card .quick-add select { min-height: 48px; width: 100%; font-size: 15px; }
  .card .quick-add .btn { width: 100%; }
  .card.is-sale { border-color: var(--red); }

  /* home: the full-armory card gets a real "Browse all" button */
  .armory-card .ph { padding: 18px 12px !important; }
  .armory-card .body p { font-size: 15px; }
  .armory-card .foot { flex-direction: column; align-items: stretch !important; gap: 10px; }
  .armory-card .foot > span:first-child { font-size: 13px; color: var(--dim); text-align: center; }
  .armory-card .foot .go {
    display: flex; align-items: center; justify-content: center; min-height: 56px; color: #111214 !important; font-weight: 700; font-size: 17px;
  }
  .armory-card { border: 2px solid var(--accent) !important; }

  /* ---------- 6. Shop page: 2-up grid, one filter bar ---------- */
  .shop-head { margin-bottom: 20px !important; gap: 10px !important; }
  .shop-head h1 { font-size: 40px; }
  .shop-head .lead { font-size: 15px; }
  .jump-bar { display: none !important; }   /* the filter bar below already does this */
  .sale-head .shop-sec-n { display: none !important; }   /* stray item count next to "Clearance from the workshop" */
  .filters { top: 72px !important; padding: 12px !important; gap: 8px !important; }

  .shop-sec .shop-grid,
  .shop-sec .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .shop-sec-h { font-size: 26px !important; margin: 36px 0 14px !important; padding-top: 22px; border-top: 1px solid var(--line2); }
  .shop-sec .card .ph img, .shop-sec .card .tbd { aspect-ratio: 1 / 1; object-fit: cover; height: auto; }
  .shop-sec .card .body { padding: 12px !important; gap: 8px !important; }
  .shop-sec .card h3 { font-size: 15px; }
  .shop-sec .card .price-line { font-size: 14px; }
  .shop-sec .card .quick-add,
  .shop-sec .card .interest { display: none !important; }   /* finish and "notify me" are on each product page */
  .shop-sec .card .foot { flex-direction: column; align-items: stretch !important; gap: 10px; }
  .shop-sec .card .foot .go { display: flex; min-height: 44px; font-size: 14px; padding: 0 10px; }
  .shop-sec .card .chip { max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shop-sec .card.is-na .chip { display: none !important; }   /* the placeholder already names the item */
  .tbd .tbd-sn, .tbd .tbd-meta { display: none !important; }
  .tbd .tbd-name { font-size: 13px !important; }
  .tbd .tbd-tag { font-size: 9px !important; }

  /* ---------- 7. Home sections ---------- */
  .finish .tabs button { min-height: 60px; }
  /* how it's made: small photo beside each step instead of three full-width photos */
  .step { display: grid !important; grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 14px; align-items: start; }
  .step img { grid-row: 1 / 3; width: 112px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; }
  .step h3 { margin: 2px 0 6px; font-size: 17px; }
  .step p { margin: 0; font-size: 14px; line-height: 1.55; }

  .grid2 .grid2, .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  .tile, .biz-item { padding: 16px !important; }
  .tile p, .biz-item p { font-size: 14px; line-height: 1.5; margin-bottom: 0; }
  .inline-form { display: grid !important; grid-template-columns: 1fr; gap: 10px; }
  .inline-form .btn { width: 100%; }

  .steps-list li { margin-bottom: 14px; }
  .formbox { padding: 20px 16px !important; border-radius: 14px; }
  .form .btn, .formbox button[type="submit"] { width: 100%; }

  .faq { padding: 18px !important; }

  /* ---------- 8. Product pages: name, price and buy button right under the photos ---------- */
  .product { display: flex !important; flex-direction: column; gap: 20px !important; padding-top: 20px !important; }
  .product .gallery { display: contents !important; }
  .product .shot { order: 1; }
  .product .thumbs { order: 2; }
  .product .buy { order: 3; }
  .product .gallery > .desc-box { order: 4; }
  .product .gallery > .note { order: 5; }
  .product .render-note { order: 6; font-size: 12px; opacity: .8; }
  .buy h1 { font-size: 32px !important; line-height: 1.1; }
  .buy .price { font-size: 26px; }
  .buy #order-link { width: 100%; min-height: 58px; font-size: 17px; }
  .custom-cta.big { min-height: 64px !important; padding: 12px 16px !important; }
  .custom-cta.big .cc-txt small { display: none; }
  .viewer-head .stamp { display: none !important; }

  /* ---------- 9. Footer: two neat columns instead of one long stack ---------- */
  footer.site .wrap { display: grid !important; grid-template-columns: 1fr 1fr; gap: 26px 18px !important; }
  footer.site .col:first-child { grid-column: 1 / -1; }
  footer.site .col:last-child { grid-column: 1 / -1; }
}

/* =====================================================================
   Motion on phones: the same effects as desktop, tuned for small screens
   (lighter, shorter, no expensive blur). Everything here switches off
   when the visitor has Reduce Motion on (site.css already handles that).
   ===================================================================== */
@media (max-width: 760px) {

  /* scroll reveals: same slide-up + photo wipe as desktop, minus the blur (heavy on phones) */
  .rv { transform: translateY(22px) !important; filter: none !important; transition-duration: 600ms !important; }
  .rv.in { transform: none !important; }
  .rv .ph img, .rv.step img, .rv .shot img { transition-duration: 700ms !important; }

  /* hero: desktop's scroll parallax on the 3D stage, gentler (CSS scroll-linked; ignored by older browsers) */
  @supports (animation-timeline: scroll()) {
    html:not(.reduce-motion) .hero-stage {
      animation: fm-hero-par linear both;   /* 7vh drift: keeps the 3D model off the hero text */ animation-timeline: scroll(root); animation-range: 0 100vh;
    }
  }

  /* background grid that drifts on scroll, kept but fainter */
  section.band::before { opacity: .55; }

  /* blinking HUD cursor after headings and blinking eyebrow dot: kept, smaller glow */
  h2.big::after, .hero-copy h1::after, .biz-head h2::after, .buy h1::after,
  .cart-page h1::after, .co-summary h1::after, #ship-h::after, .viewer-head h2::after { box-shadow: 0 0 6px rgba(61,180,255,.55); }
  .eyebrow::before { width: 6px; height: 6px; margin-right: 8px; box-shadow: 0 0 6px var(--cyber); }

  /* hero "View this helmet": was running off the right edge; now full width under the dots */
  .display-bar .wrap { flex-direction: column !important; align-items: stretch !important; gap: 12px !important; }
  .display-bar .dots-hit { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 14px !important; width: 100%; }
  .display-bar .btn.ghost { width: 100%; justify-content: center; }

  /* SALE arrows: the swinging arrows stay, but only two per card so the helmet is still visible */
  .sa-card .sa:nth-child(n+3) { display: none; }
  .sa-card .sa { --w: 40px; }


  /* desktop hover lifts become a quick press on touch */
  .btn, .card, .fin-grid button, .tabs button, .filters button, .tactile, .custom-cta, .go {
    transition: transform 140ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
    -webkit-tap-highlight-color: transparent;
  }
  .btn:active, .go:active, .custom-cta:active { transform: scale(.97); }
  .card:active { transform: scale(.985); }
  .fin-grid button:active, .tabs button:active, .filters button:active { transform: scale(.96); }
}
@keyframes fm-hero-par { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, 7vh, 0); } }

/* =====================================================================
   Choosing a finish on a phone: big, easy buttons that sit close to the
   photo, so you can watch the helmet change as you tap.
   ===================================================================== */
@media (max-width: 760px) {

  /* product page: photo, name, price, finish buttons, Add to cart all in the first screen */
  .product .shot img { max-height: 34vh; width: 100%; object-fit: cover; }
  .product .thumbs button { width: 64px; min-width: 64px; height: 42px; }
  .product { gap: 14px !important; }
  .buy { gap: 12px !important; }
  .buy > .eyebrow { order: 1; }
  .buy > h1 { order: 2; font-size: 28px !important; margin: 0; }
  .buy > .sale-inline { order: 2; }
  .buy > .price { order: 3; margin: -4px 0 2px; }
  .buy > div:not(.price) { display: contents !important; }   /* lets the finish description drop below Add to cart */
  #fin-label { order: 4; margin-top: 2px; }
  .buy .fin-grid { order: 4; }
  #fin-desc, #parts-pill { order: 6; }
  .buy > #order-link { order: 5; }
  .buy > .lead { order: 7; font-size: 15px; }
  .buy > .custom-cta { order: 8; }
  .buy > .note { order: 9; }
  .buy > a:last-child { order: 10; }
  #fin-label { font-size: 12px !important; letter-spacing: .1em; text-transform: uppercase; color: var(--dim) !important; font-family: var(--mono); }

  .fin-grid { gap: 10px !important; }
  .fin-grid button {
    position: relative; min-height: 60px; padding: 12px 34px 12px 14px !important;
    border: 2px solid var(--line2) !important; text-align: left;
  }
  .fin-grid button b { font-size: 15px !important; line-height: 1.2; }
  .fin-grid button small { display: block; margin-top: 3px; font-size: 12px; color: var(--dim); line-height: 1.3; }

  .fin-grid button[aria-pressed="true"]::after {   /* check mark on the chosen finish */
    content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
  }
  #fin-desc { font-size: 14px !important; margin: 2px 0 0; }

  /* home "Pick your finish": photo first, then the four buttons right under it, then the facts */
  .wrap.finish { display: flex !important; flex-direction: column; gap: 14px !important; }
  .finish .finish-side, .finish #fin-panel { display: contents !important; }
  /* these wrappers no longer have a box, so their scroll-reveal can't fire: show the photo straight away */
  .finish #fin-panel .shot img { clip-path: none !important; }
  .finish .finish-side > .eyebrow { order: 1; }
  .finish .finish-side > h2 { order: 2; }
  .finish .finish-side > .lead { order: 3; }
  .finish #fin-panel > .shot { order: 4; margin-top: 6px; }
  .finish .finish-side > .tabs { order: 5; }
  .finish #fin-panel > .facts { order: 6; }
  .finish .shot img { max-height: 36vh; width: 100%; object-fit: cover; }
  .finish .tabs { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px !important; }
  .finish .tabs button {
    min-height: 64px !important; padding: 12px 14px !important; text-align: left; border: 2px solid var(--line2) !important;
  }
  .finish .tabs .n { display: none; }
}

/* light theme versions of the few hard-coded colours above */
@media (max-width: 760px) {
  .theme-light .card .foot .go,
  .theme-light .armory-card .foot .go { color: #111214 !important; }
  .theme-light .shop-sec .card.is-na .foot .go { color: var(--head) !important; }
}

/* Long props (Chainsword, Thunder Hammer): upright phone photos get a taller box instead of the 16:9 strip */
@media (max-width: 760px) {
  .product .shot.tall { aspect-ratio: 4 / 5; }
  .product .shot.tall img { max-height: none; height: 100%; object-fit: cover; }
}
