/* Every screen but the desktop's. Phones (max-width 640px): the mountain fills the top with the lit summit on the page
   axis (focus.js anchors the scene's cover fit at --fx, the rules below enlarge the scene's box and move the still, the
   layers and the masks the same way), and centred in the screen the logo, the crest and the menu as ONE column of six
   rows, each parted by a short hairline, in a taller glass panel. Tracking is close (.14-.16em). Portrait tablets,
   phones on their side and screens past 1920 px have their own blocks at the end (the owner's picks of 27.10); a
   landscape screen 641-1920 px wide and over 500 px tall, and a portrait window under 800 px tall, get the page exactly
   as it is. A phone up to 640 px turned on its side (500 px tall or less) gets the side block, not the column. */
/* touch: no browser highlight box on a tap; the links' own glow and the sparks are the feedback */
a,button{-webkit-tap-highlight-color:transparent}
/* the STORE sparks canvas reaches past the strip (landscape phones; a tablet turned on its side, where the canvas keeps
   its old width for ~120 ms and a mobile browser zoomed out to show it); clipped across, the page stays as wide as the
   screen at every width */
nav{overflow-x:clip}
@media (max-width:640px) and (orientation:portrait),(max-width:640px) and (min-height:501px){
  :root{
    --fx:29;                                     /* the summit on the page axis (focus.js reads it) */
    --row:clamp(44px,5.6dvh,50px);               /* a menu row: never under a 44 px touch target */
    --fz:1.35;--fy:11;                           /* the scene's box grows by --fz; the summit sits --fy % from the top */
  }
  .pbg-mtn,.pbg-scene .grp>img,.pbg-scene .snow .sb img{object-position:calc(var(--fx) * 1%) 50%}
  .pbg-scene.gl .m-sky,.pbg-scene.gl .m-nofront{-webkit-mask-position:calc(var(--fx) * 1%) 50%;mask-position:calc(var(--fx) * 1%) 50%}
  /* the mountain fills the top instead of empty sky: the still and the scene lay out in a larger box (the warp, the
     layers, the masks and the fog at full resolution), centred across, the summit (27.6 % down the painting) at --fy */
  .pbg-mtn{
    width:calc(104% * var(--fz));height:calc(106% * var(--fz));
    left:calc(-2% - (var(--fz) - 1) * 52%);
    top:calc(var(--fy) * 1% - 106% * var(--fz) * .276);
  }

  /* the column: centred in the screen above the footer, the summit rising behind the logo */
  main{
    justify-content:safe center;
    gap:9px;
    padding:clamp(16px,4dvh,40px) 16px 14px;
  }
  .brand{width:clamp(100px,29vw,128px)}
  .strap{font-size:9px;letter-spacing:.16em;column-gap:.7em;text-shadow:0 1px 10px rgba(1,10,36,.9)}   /* it now crosses the lit snow */
  .strap .s-l{margin-right:-.16em}
  .rule{width:68vw}

  /* the panel: the same glass strip as on wider screens, taller */
  nav{padding:6px 0}
  .menu{display:flex;flex-direction:column;align-items:stretch;gap:0}
  .m-axis{display:none}
  .m-side{flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:0}
  .menu li{position:relative;justify-content:center}
  /* a short centred hairline above every row but the first (the old "/" separators retired) */
  .menu .m-l li+li::before,.menu .m-r li::before{
    display:block;content:"";position:absolute;top:0;left:50%;
    width:34px;height:1px;margin:0;opacity:1;font-size:0;
    transform:translateX(-50%);
    background:linear-gradient(to right,transparent,rgba(155,200,210,.32),transparent);
    pointer-events:none;
  }
  .menu a{
    justify-content:center;
    min-width:min(240px,70vw);height:var(--row);
    padding:0 12px;
    font-size:13px;letter-spacing:.14em;text-indent:.14em;
  }
  /* the bag hangs left of STORE, so the word itself sits on the axis like the five above it */
  .menu a .ic{margin-left:-24px}
  .menu a:focus-visible{outline-offset:-4px}

  .rule2{width:min(22vw,96px)}
  .motto{font-size:10px;letter-spacing:.16em;text-indent:.16em}

  footer{padding:14px 20px max(16px,env(safe-area-inset-bottom));gap:10px}
  .soc{gap:12px}
  .soc a{padding:12.5px;margin:-8.5px 0}         /* 44 px touch targets; the strip keeps its height */
  .copy{letter-spacing:.16em}
}

/* Portrait tablets and opened foldables (T1 «Столбик»): the phone's framing, a little less enlarged, the summit behind a
   larger crest, and the phone's column of six rows at tablet size. Wider-than-tall screens never match, nor screens under
   800 px tall (a square window has no room for the column; it keeps the desktop's row). */
@media (min-width:641px) and (orientation:portrait) and (min-height:800px){
  :root{--fx:29;--fz:1.2;--fy:13}
  .pbg-mtn,.pbg-scene .grp>img,.pbg-scene .snow .sb img{object-position:calc(var(--fx) * 1%) 50%}
  .pbg-scene.gl .m-sky,.pbg-scene.gl .m-nofront{-webkit-mask-position:calc(var(--fx) * 1%) 50%;mask-position:calc(var(--fx) * 1%) 50%}
  .pbg-mtn{
    width:calc(104% * var(--fz));height:calc(106% * var(--fz));
    left:calc(-2% - (var(--fz) - 1) * 52%);
    top:calc(var(--fy) * 1% - 106% * var(--fz) * .276);
  }
  main{justify-content:safe center;gap:14px;padding:clamp(24px,4vh,48px) 24px 20px}
  .brand{width:clamp(170px,25vw,250px)}
  .strap{font-size:11px;letter-spacing:.2em;column-gap:.8em;text-shadow:0 1px 10px rgba(1,10,36,.9)}
  .strap .s-l{margin-right:-.2em}
  .rule{width:64vw}
  .rule .inf{font-size:15px}
  nav{padding:10px 0}
  .menu{display:flex;flex-direction:column;align-items:stretch;gap:0}
  .m-axis{display:none}
  .m-side{flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:0}
  .menu li{position:relative;justify-content:center}
  .menu li+li::before{display:none}
  .menu .m-l li+li::before,.menu .m-r li::before{
    display:block;content:"";position:absolute;top:0;left:50%;
    width:46px;height:1px;margin:0;opacity:1;font-size:0;
    transform:translateX(-50%);
    background:linear-gradient(to right,transparent,rgba(155,200,210,.32),transparent);
    pointer-events:none;
  }
  .menu a{justify-content:center;min-width:min(340px,60vw);height:58px;padding:0 14px;font-size:17px;letter-spacing:.18em;text-indent:.18em}
  .menu a .ic{width:16px;height:16px;margin-left:-26px}   /* = -(16 + 10): the word on the axis */
  .rule2{width:min(18vw,140px)}
  .motto{font-size:12px;letter-spacing:.2em;text-indent:.2em}
  .soc{gap:26px}
  .soc svg{width:22px;height:22px}
  .copy{font-size:11px}
}

/* Phones on their side (4, and 6 for the small ones): a short screen, so the crest sits closer together and the footer
   folds into one slim line (the icons and the copyright side by side) instead of a quarter of the screen. */
@media (orientation:landscape) and (max-height:500px){
  main{gap:7px;padding:12px 20px}
  .brand{width:118px}
  nav{padding:6px 0}
  .menu a{padding:9px 2px}
  footer{flex-direction:row;justify-content:center;align-items:center;gap:30px;padding:6px 20px 8px}
  .soc{gap:14px}
  .soc a{padding:8px}
}

/* Small phones on their side (6, up to 640 px wide): the row a little tighter (closer letters, the size follows the
   width below 565 px), so the six words stay on one line down to 480 px. */
@media (orientation:landscape) and (max-height:500px) and (max-width:640px){
  .menu{column-gap:8px}
  .m-side{gap:8px}
  .menu a{font-size:min(13px,2.3vw);letter-spacing:.24em;text-indent:.24em;padding:9px 3px}
}

/* Screens past 1920 px (5): the crest, the menu and the footer grow with the width (each size the larger of the 1920
   px value and its share of a 1920 px screen), so a 2560, ultrawide or 4K screen keeps the hero's proportion instead of
   shrinking it to a stamp. At 1920 px and below nothing changes. Each share is capped by the height (X vw -> min(X vw,
   X*4.8 vh)), so a screen up to 4.8:1 is unaffected and a wider window (an ultrawide made short) does not scroll; up to
   500 px of height the side block above keeps the page. */
@media (min-width:1921px) and (orientation:landscape) and (min-height:501px){
  .brand{width:max(150px,min(7.81vw,37.49vh))}
  .strap{font-size:max(9px,min(.469vw,2.251vh))}
  .rule .inf{font-size:max(13px,min(.677vw,3.25vh))}
  .rule2{width:max(150px,min(7.81vw,37.49vh))}
  nav{padding:max(13px,min(.677vw,3.25vh)) 0}
  .menu{column-gap:max(22px,min(1.146vw,5.501vh))}
  .m-side{gap:max(22px,min(1.146vw,5.501vh))}
  .menu li+li::before{font-size:max(14px,min(.729vw,3.499vh));margin-right:max(22px,min(1.146vw,5.501vh))}
  .m-axis{font-size:max(14px,min(.729vw,3.499vh))}
  .menu a{font-size:max(16px,min(.833vw,3.998vh));padding:max(10px,min(.521vw,2.501vh)) 2px}
  .menu .ic{width:max(14px,min(.729vw,3.499vh));height:max(14px,min(.729vw,3.499vh));margin-right:max(10px,min(.521vw,2.501vh))}
  .motto{font-size:max(10px,min(.521vw,2.501vh))}
  footer{gap:max(18px,min(.938vw,4.502vh))}
  .soc{gap:max(30px,min(1.563vw,7.502vh))}
  .soc svg{width:max(19px,min(.99vw,4.752vh));height:max(19px,min(.99vw,4.752vh))}
  .copy{font-size:max(10px,min(.521vw,2.501vh))}
}

/* Windows wider than 4:1 (an ultrawide or a desktop window made short): the cover fit goes by the width there and,
   centred, puts the summit (row 399 of the painting's 1629, 24.5 %) at 50 % - 11.25 % x the ratio of the height, so it
   nears the top at 4:1 and leaves the screen from 4.44:1. Past 4:1 focus.js anchors the fit down so the summit stays where
   a 4:1 window has it, 5 % from the top, and hands the anchor over as --cy (percent of the vertical overflow); the still,
   the picture layers and the masks move the same way here, as the phone's do with --fx. The box keeps its size, so the
   fog and cloud bands, the canvases and the bolt stay as they were. Up to 4:1, a 32:9 screen included, nothing changes. */
@media (min-aspect-ratio:4001/1000){
  .pbg-mtn,.pbg-scene .grp>img,.pbg-scene .snow .sb img{object-position:50% calc(var(--cy,50) * 1%)}
  .pbg-scene.gl .m-sky,.pbg-scene.gl .m-nofront{-webkit-mask-position:50% calc(var(--cy,50) * 1%);mask-position:50% calc(var(--cy,50) * 1%)}
}
