/* ==========================================================================
   FIBERTEK — Responsive layer (designed per breakpoint, not shrunk)
   ========================================================================== */

@media (max-width: 1180px) {
  .nav__link { padding: 0 10px; }
  .brand__word { width: 130px; }
  .hero__stage { left: 34%; right: calc(var(--gutter) + 210px); }

  .footer__grid { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer__grid > :last-child { grid-column: 1 / -1; }
  .cap-row { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.2fr) 120px; }
}

@media (max-width: 1024px) {
  :root { --header-h: 64px; }
  .nav, .header-actions .btn { display: none; }
  .burger { display: block; }
  .site-header.is-scrolled { --header-h: 58px; }

  /* hero becomes a vertical composition */
  .hero { height: auto; min-height: 100svh; max-height: none; display: flex; flex-direction: column; padding-top: var(--header-h); }
  .hero__meta { position: relative; top: auto; padding-top: 14px; order: 0; }
  .hero__stage { position: relative; left: auto; right: auto; top: auto; bottom: auto; height: 46svh; min-height: 300px; max-height: 480px; margin: 8px var(--gutter) 0; order: 1; }
  .hero__laser { top: calc(var(--header-h) + 46svh + 16px); }
  .hero__name { display: none; }
  .hero__selector { position: relative; right: auto; top: auto; transform: none; order: 2; width: auto; margin: 18px var(--gutter) 0; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0; }
  .sel { grid-template-columns: 1fr; gap: 2px; padding: 12px 6px 10px 0; border-left: 0; border-top: 1px solid var(--line-d-2); transform: translateY(8px); }
  .sel__bar { left: 0; top: -1px; width: 100%; height: 1px; transform: scaleX(0); transform-origin: left; }
  .sel.is-active .sel__bar { transform: scaleX(1); }
  @keyframes selProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .hero.is-autoplay .sel.is-active .sel__bar { animation-name: selProgressX; }
  .sel__t { font-size: .78rem; }
  .hero__copy { position: relative; bottom: auto; order: 3; margin-top: 22px; }
  .hero__copy-inner { max-width: 620px; }
  .hero__readout { position: relative; right: auto; bottom: auto; order: 4; margin: 24px var(--gutter) 32px; gap: 18px; }
  .readout { min-width: 0; flex: 1; }
  .callout__line { width: 28px; }
  .hero__scroll { display: none; }

  .intro, .story-gold, .story-cut, .warranty, .faq, .enquiry, .overview, .specs-wrap, .contact-grid, .locate, .about-hero, .cta__inner, .phero__inner, .section-head, .story-mark__head { grid-template-columns: minmax(0, 1fr); }
  .faq__head, .specs-wrap__head { position: static; }
  .story-gold__visual { max-width: 620px; }
  .journey { grid-template-columns: minmax(0, 1fr); }
  .journey__stage { min-height: 380px; border-right: 0; border-bottom: 1px solid var(--line-d); }
  .story-sol { grid-template-columns: minmax(0, 1fr); }
  .story-mark__duo { grid-template-columns: minmax(0, 1fr); }
  .duo-item, .duo-item + .duo-item { padding: 24px 0; border-left: 0; }
  .duo-item + .duo-item { border-top: 1px solid var(--line-d-2); }
  .pd-hero__inner { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 28px; }
  .pd-hero__visual { order: -1; height: clamp(280px, 48vh, 440px); }
  .pd-hero__thumbs { right: 0; top: auto; bottom: 0; transform: none; grid-auto-flow: row; }
  .features { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .app-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .related { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .about-hero__emblem { justify-self: start; max-width: 320px; }
  .cap-row { grid-template-columns: 44px minmax(0, 1fr) 110px; }
  .cap-row p { grid-column: 2 / 3; grid-row: 2; }
  .cap-row__img { grid-row: 1 / 3; grid-column: 3; height: 88px; }
  .ap-index { grid-template-columns: minmax(0, 1fr); }
  .ap-nav { position: sticky; top: 58px; z-index: 30; display: flex; overflow-x: auto; gap: 0; border-left: 0; border-bottom: 1px solid var(--line-l-2); background: rgba(248,246,242,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .ap-nav::-webkit-scrollbar { display: none; }
  .ap-nav a { flex-shrink: 0; padding: 12px 12px; font-size: .85rem; }
  .ap-nav a.is-active::before { left: 12px; right: 12px; top: auto; bottom: -1px; width: auto; height: 1px; }
  .masonry { columns: 2; }
  .cat-row, .cat-row:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .cat-row:nth-child(even) .cat-row__media { order: 0; border-left: 0; }
  .cat-row__media { border-right: 0; border-bottom: 1px solid var(--line-l); min-height: 280px; }
  .cat-row__media img { max-height: 250px; }
}
@keyframes selProgressX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 720px) {
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why, .why:not(:nth-child(3n+1)) { padding: 18px 0; border-left: 0; }
  .ap-group { grid-template-columns: minmax(0, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .wcard { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .story-sol__machines { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .feat-cols { columns: 1; }
  .duo-item { grid-template-columns: 0.8fr 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  :root { --sec: 56px; --sec-sm: 40px; }
  .brand__emblem { width: 38px; }
  .brand__word { width: 118px; }
  .hero__meta span:last-child { display: none; }
  .hero__stage { height: 40svh; min-height: 260px; }
  .hero__laser { top: calc(var(--header-h) + 40svh + 22px); }
  .hero__readout { flex-wrap: wrap; gap: 0; }
  .readout { flex: 1 1 33%; padding-right: 8px; }
  .readout dd { font-size: .88rem; }
  .callout { display: none; }
  .callout.callout--keep { display: flex; }
  .hero__ctas .btn { flex: 1 1 auto; }
  .sel__t { font-size: .72rem; }
  .sel__n { font-size: .6rem; }

  .intro__facts, .adv-list { grid-template-columns: minmax(0, 1fr); }
  .intro__fact:nth-child(odd), .adv-list li:nth-child(even) { border-right: 0; border-left: 0; padding-left: 0; }
  .intro__fact:nth-child(even) { padding-left: 0; }
  .journey__tabs { grid-template-columns: repeat(2, 1fr); }
  .jtab:nth-child(2) { border-right: 0; }
  .jtab:nth-child(-n+2) { border-bottom: 1px solid var(--line-d); }
  .journey__stage { min-height: 320px; }
  .spec-mini { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .story-sol__machines { grid-template-columns: minmax(0, 1fr); }
  .duo-item { grid-template-columns: minmax(0, 1fr); }
  .duo-item__img { max-height: 260px; aspect-ratio: auto; height: 240px; }
  .features, .features--list { grid-template-columns: minmax(0, 1fr); }
  .app-tiles { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .related { grid-template-columns: minmax(0, 1fr); }
  .form { grid-template-columns: minmax(0, 1fr); }
  .contact-line { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .cat-row__specs { grid-template-columns: minmax(0, 1fr); }
  .cat-row__specs div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-l); }
  .masonry { columns: 2; column-gap: 8px; }
  .m-item { margin-bottom: 8px; }
  .m-item figcaption { opacity: 1; transform: none; font-size: .75rem; padding: 18px 10px 8px; }
  .m-item figcaption span { display: none; }
  .wtable td:not(.w) { display: none; }
  .apps-track { grid-auto-columns: 78%; }
  .pd-hero__readout .readout { padding: 14px 16px 16px 0; margin-right: 16px; }
  .pd-thumb { width: 52px; height: 52px; }
  .spec-table th { width: 46%; font-size: .64rem; }
  .spec-table { font-size: .9rem; }
  .spec-table--multi { min-width: 520px; }
  .lb-prev, .lb-next { top: auto; bottom: -64px; transform: none; }
  .lightbox__stage { padding-bottom: 70px; }
  .lb-prev { left: calc(50% - 58px); }
  .lb-next { right: calc(50% - 58px); }
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .fab { right: 14px; bottom: 14px; }
  .fab a { width: 48px; height: 48px; }
  .cap-row { grid-template-columns: 34px minmax(0, 1fr); }
  .cap-row__img { grid-column: 1 / -1; grid-row: auto; justify-content: flex-start; height: 110px; order: -1; }
  .cap-row p { grid-column: 1 / -1; grid-row: auto; }
  .story-gold__tag { right: 0; bottom: 0; }
}

@media (max-width: 380px) {
  .brand__word { width: 100px; }
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; }
  .masonry { columns: 1; }
}

@media (hover: none) {
  .m-item figcaption { opacity: 1; transform: none; }
}

/* mobile hero: keep the horizon, laser line and product floor aligned */
@media (max-width: 1024px) {
  .hero { --laser-y: calc(var(--header-h) + 38px + clamp(300px, 46svh, 480px)); }
  .hero__laser { top: var(--laser-y); }
  .hero__bg img { width: 240vw; left: -70vw; top: calc(var(--laser-y) - 240vw * 0.2953); }
}
@media (max-width: 640px) {
  .hero { --laser-y: calc(var(--header-h) + 38px + clamp(260px, 40svh, 480px)); }
}
