/* Phone and tablet refinements. Loaded last, after design.css and pages.css. */

/* Headings and the main area take focus when a view opens; do not draw a ring around them (links and buttons keep theirs). */
[tabindex="-1"]:focus{outline:none}

@media (max-width:900px){
  /* The 3D stage was sticky and tall, so it covered the options scrolling under it. Let it scroll with the page. */
  .lab .stage{position:static}
  /* Larger tap areas without changing the layout (links, footer and contact links). */
  .stitch-link,.footer a,.crow a{position:relative}
  .stitch-link::after,.footer a::after,.crow a::after{content:"";position:absolute;inset:-10px -4px}
  .copy{min-height:44px;min-width:64px}
  .opt{min-height:44px}
  .rng{min-height:44px}
  /* Smallest text up to a readable size. */
  .fbadge,.tag{font-size:12.5px}
  input[type=checkbox]{width:20px;height:20px}
  /* Our work: filter chips in one swipeable row instead of ten wrapped lines, and two photo columns. */
  .filters{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;margin-inline:-16px;padding:0 16px 8px;scrollbar-width:none}
  .filters::-webkit-scrollbar{display:none}
  .filters .chip{flex:none}
  .gallery{columns:2 auto;column-gap:10px}
  .gallery .gi{margin-bottom:10px}
  /* Full-screen menu: readable, tappable shop sub-links, and it scrolls on short screens. */
  .menu{overflow-y:auto}
  .msub{gap:0;margin:0 0 10px 18px}
  .msub a{font-size:1.06rem;min-height:44px;display:flex;align-items:center}
  .menu>a{padding:4px 0}
}

/* ---- 0.1.62 phone pass: trim dead space, tighter rhythm, swipeable chip rows ---- */
@media (max-width:900px){
  .header .wrap{height:64px}
  .section{padding-block:clamp(40px,9vw,64px)}
  .phead{padding-top:96px;padding-bottom:clamp(28px,7vw,48px)}
  .hero{padding-top:92px;padding-bottom:44px}
  .phead .lead{margin-top:16px}
  .cta-row{margin-top:22px}
  .cta-row .btn,.phead .row .btn{flex:1 1 auto;justify-content:center}
  h2{font-size:clamp(2rem,8.6vw,2.8rem)}
  .statement,.cta .big,.quote,.expand .cap h2{font-size:clamp(2.1rem,9vw,3rem)}
  .fact b{font-size:clamp(2.8rem,13vw,3.6rem)}
  .facts{margin-top:32px;gap:20px}
  .fact{padding-top:14px}
  .marquee{padding:12px 0}
  .expand{height:120vh}
  .footer .top{padding-block:44px;gap:28px 20px}
  .footer .base{padding-block:18px}
  .values{margin-top:28px;gap:22px}
  .val{padding-top:16px}
  .val .ic{--s:48px;margin-bottom:12px}
  .step{padding-bottom:20px}
  .steps{gap:24px}
  /* chip rows scroll sideways instead of wrapping into five lines */
  .shopnav,.jstrip{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;margin-inline:-16px;padding:2px 16px 8px;scrollbar-width:none}
  .shopnav::-webkit-scrollbar,.jstrip::-webkit-scrollbar{display:none}
  .shopnav .chip,.jstrip li{flex:none;white-space:nowrap}
  .fbar{top:64px}
}
@media (max-width:640px){
  .cards{margin-top:28px;gap:16px}
  .card .pic{aspect-ratio:16/10}
  .card .body{padding:18px 20px 22px;gap:8px}
  .proc{grid-template-columns:30px minmax(0,1fr);gap:0 12px;margin-top:28px}
  .tile{min-height:200px}
  .tile.a,.tile.b,.tile.c,.tile.d{aspect-ratio:16/11}
  .feat{margin-top:24px;gap:14px}
  .form{padding:22px 18px}
  .crow{padding:16px 0;gap:12px}
}
@media (max-width:560px){
  .fform{grid-template-columns:1fr 1fr;gap:12px;margin-top:18px}
  .fform .fq,.fform .fchecks{grid-column:1/-1}
  .fchecks{gap:4px 16px}
  .fgrid{gap:14px}
  .fcard{padding:16px}
  .frow{flex-wrap:nowrap}
  .frow .btn{flex:1 1 0;justify-content:center;padding:10px 10px;font-size:.82rem;letter-spacing:.06em;text-align:center}
  .prod .pb{padding:16px 18px 20px}
  .pgroup{margin-bottom:36px}
}
.gi.gi-more{display:none}
.gmore{display:flex;margin:22px auto 0;justify-content:center}
@media (min-width:901px){.gmore{display:none}}

/* Mobile menu: safe centring (the old centred flex pushed the first links under the header when the list was taller than the screen),
   smaller type so Home to Contact fit without scrolling, and the phone number as a normal-size link. */
@media (max-width:900px){
  .menu{justify-content:flex-start;padding:calc(76px + env(safe-area-inset-top,0px)) max(var(--gut),env(safe-area-inset-left,0px)) calc(24px + env(safe-area-inset-bottom,0px))}
  .menu>:first-child{margin-top:auto}
  .menu>:last-child{margin-bottom:auto}
  .menu>a{font-size:clamp(1.9rem,9vw,2.5rem);line-height:1.05;padding:7px 0;min-height:48px}
  .msub{margin:0 0 6px 16px;padding-left:14px;border-left:2px dashed rgba(255,255,255,.3)}
  .msub a{font-size:1rem;min-height:42px;letter-spacing:.04em;opacity:.9}
  .menu small{margin-top:18px;font-size:.95rem;line-height:1.5}
  .menu small a{font-size:1.5rem;font-weight:700;display:inline-block;margin-top:4px;transform:none;opacity:1}
}
@media (max-width:900px) and (max-height:700px){
  .menu>a{font-size:1.7rem;min-height:42px;padding:4px 0}
  .msub a{min-height:38px}
}

/* Shop product cards: two per row on phones instead of one 660px-tall card each. */
@media (max-width:560px){
  .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  /* an odd last card spans both columns so there is no empty half-row */
  .shop-grid>:last-child:nth-child(odd),.pgroup .shop-grid>:last-child:nth-child(odd){grid-column:1/-1}
  .shop-grid>:last-child:nth-child(odd) .pic,.shop-grid>:last-child:nth-child(odd) .pic .ph{aspect-ratio:16/9}
  .pgroup .shop-grid>:last-child:nth-child(odd) .pic{aspect-ratio:16/9}
  .prod{border-radius:18px}
  .prod .pic,.prod .pic .ph{aspect-ratio:4/3}
  .prod .pic::after{inset:8px;border-radius:10px}
  .prod .tag{left:10px;top:10px;font-size:.62rem;padding:4px 8px;letter-spacing:.08em}
  .prod .pb{padding:12px 12px 14px;gap:6px}
  .prod .pb h3{font-size:1.2rem}
  .prod .pb p{font-size:.88rem;line-height:1.35;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .prod .pb .mm{display:none}
  .prod .pact{gap:8px;margin-top:auto}
  .prod .pact .btn,.prod .add{--h:42px;padding:0 10px;font-size:.78rem;letter-spacing:.06em;text-align:center}
}

/* Tap areas and the floating quote bar */
@media (max-width:900px){
  .fsrc a{display:inline-block;padding:10px 0}
  body:has(.qbar:not([hidden])) .footer{padding-bottom:84px}
}

/* ---- 0.1.69 desktop and tablet pass: tighter vertical rhythm, fewer big empty bands ---- */
@media (min-width:901px){
  .section{padding-block:clamp(64px,7vw,104px)}
  .phead{padding-top:clamp(120px,12vw,168px);padding-bottom:clamp(40px,5vw,80px)}
  .hero{padding-bottom:clamp(48px,6vw,88px)}
  .facts{margin-top:clamp(36px,5vw,72px)}
  .footer .top{padding-block:clamp(48px,6vw,84px)}
}
/* Process steps: two columns on wide screens so the text is not stranded on the left of an empty row. */
@media (min-width:1100px){
  .steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(28px,3.4vw,52px) clamp(32px,4vw,64px)}
}
/* Tablet: the third division card spans both columns, so make it a wide strip rather than a 700px-tall block. */
@media (min-width:641px) and (max-width:1000px){
  .cards .card:last-child .pic{aspect-ratio:21/9}
}
