/* ==========================================================================
   MAXYM4LNY® — sub-pages: Releases, Behind the Brand, Gallery.
   Built only from the tokens and components already defined in style.css
   (--bg, --fg, --dim, --acid, --line, .section, .sec-head, .cover, .btn-*).
   ========================================================================== */

/* [hidden] must win over component display rules (filtering uses it). */
[data-cat][hidden]{display:none !important}

/* Sub-pages start below the fixed header, like the store pages do. */
.pg-section{padding-top:calc(56px + clamp(46px,8vh,110px))}

/* --- category filter ------------------------------------------------------ */
.flt-bar{
  display:none; /* needs JS; without it every item stays visible */
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:clamp(30px,5vh,56px);
}
.js .flt-bar{display:flex}
.flt{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:11px 18px;
  border:1px solid var(--line-soft);
  font-family:var(--f-display);
  font-size:10px;
  font-weight:600;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--dim);
  transition:border-color .5s var(--ease),color .5s var(--ease);
}
.flt:hover{color:var(--fg);border-color:var(--line)}
.flt[aria-pressed="true"]{border-color:var(--acid);color:var(--fg)}
.flt-n{
  font-size:9px;
  letter-spacing:.08em;
  color:var(--dimmer);
  font-variant-numeric:tabular-nums;
}
.flt[aria-pressed="true"] .flt-n{color:var(--acid)}

/* --- releases ------------------------------------------------------------- */
.rel-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));
  gap:clamp(40px,5vw,72px) clamp(18px,2.4vw,40px);
}
.rel-card .cover img{transition:transform 1.2s var(--ease)}
.rel-card:hover .cover img{transform:scale(1.035)}
.rel-title{
  margin-top:16px;
  font-family:var(--f-display);
  font-size:clamp(17px,1.7vw,24px);
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1.05;
  text-transform:uppercase;
  overflow-wrap:anywhere;
}
.rel-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.rel-link{
  font-family:var(--f-display);
  font-size:9.5px;
  font-weight:600;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--dim);
  border:1px solid var(--line-soft);
  padding:9px 13px;
  white-space:nowrap;
  transition:border-color .5s var(--ease),color .5s var(--ease);
}
.rel-link:hover{border-color:var(--acid);color:var(--acid)}

/* --- gallery -------------------------------------------------------------- */
.gal-grid{
  column-count:3;
  column-gap:clamp(12px,1.6vw,24px);
}
.gal-item{
  break-inside:avoid;
  margin:0 0 clamp(12px,1.6vw,24px);
}
.gal-item a{
  display:block;
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  background:var(--bg-2);
  cursor:zoom-in;
}
.gal-item img{
  width:100%;
  height:auto;
  opacity:.88;
  transition:transform 1.2s var(--ease),opacity .7s var(--ease);
}
.gal-item a:hover img,
.gal-item a:focus-visible img{transform:scale(1.03);opacity:1}
.gal-item figcaption{margin-top:10px}

/* --- lightbox ------------------------------------------------------------- */
body.lb-open{overflow:hidden}
.lb{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(5,5,5,.985);
  padding:clamp(56px,9vh,84px) clamp(14px,6vw,96px);
}
.lb[hidden]{display:none}
.lb-fig{
  margin:0;
  max-width:100%;
  max-height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
  min-height:0;
}
.lb-img{
  max-width:100%;
  max-height:calc(100vh - 190px);
  max-height:calc(100dvh - 190px);
  width:auto;
  height:auto;
  object-fit:contain;
  border:1px solid var(--line-soft);
}
.lb-cap{text-align:center;max-width:70ch}
.lb-cap[hidden]{display:none}
.lb-btn{
  position:absolute;
  font-family:var(--f-display);
  font-size:10px;
  font-weight:600;
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--dim);
  padding:12px 14px;
  border:1px solid var(--line-soft);
  background:rgba(5,5,5,.6);
  transition:border-color .4s var(--ease),color .4s var(--ease);
}
.lb-btn:hover,
.lb-btn:focus-visible{border-color:var(--acid);color:var(--fg)}
.lb-close{top:clamp(12px,2.4vh,22px);right:clamp(12px,2.4vw,24px)}
.lb-prev,
.lb-next{top:50%;transform:translateY(-50%)}
.lb-prev{left:clamp(8px,2vw,24px)}
.lb-next{right:clamp(8px,2vw,24px)}
.lb-count{position:absolute;top:clamp(18px,3vh,30px);left:clamp(14px,2.4vw,24px)}
.lb.is-single .lb-prev,
.lb.is-single .lb-next{display:none}

/* --- behind the brand: archive ------------------------------------------- */
.story-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px 18px}
.feat{
  display:grid;
  grid-template-columns:1.25fr .75fr;
  gap:clamp(24px,5vw,90px);
  align-items:end;
  margin-bottom:clamp(60px,10vh,130px);
}
.feat-img{
  position:relative;
  display:block;
  aspect-ratio:4/3;
  border:1px solid var(--line);
  background:var(--bg-2);
  overflow:hidden;
}
.feat-img::after{
  content:"";
  position:absolute;
  inset:10px;
  border:1px solid var(--line-soft);
  pointer-events:none;
  z-index:3;
}
.feat-img img,
.feat-img .ph{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform 1.4s var(--ease);
}
.feat:hover .feat-img img{transform:scale(1.025)}
.feat-title{
  margin-top:clamp(16px,2.6vh,28px);
  font-family:var(--f-display);
  font-weight:900;
  font-size:clamp(30px,4.4vw,70px);
  line-height:.9;
  letter-spacing:-.05em;
  text-transform:uppercase;
  overflow-wrap:anywhere;
}
.feat-title a{transition:color .5s var(--ease)}
.feat-title a:hover{color:var(--acid)}
.feat-excerpt{
  margin-top:clamp(16px,2.6vh,26px);
  max-width:46ch;
  font-size:14px;
  line-height:1.8;
  color:var(--dim);
}
.feat-copy .btn-outline{margin-top:clamp(22px,3.6vh,38px)}

.st-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:clamp(40px,5vw,76px) clamp(18px,2.4vw,44px);
}
.st-link{display:block}
.st-img{
  position:relative;
  aspect-ratio:4/5;
  border:1px solid var(--line);
  background:var(--bg-2);
  overflow:hidden;
  margin-bottom:16px;
}
.st-img img,
.st-img .ph{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:.85;
  transition:transform 1.2s var(--ease),opacity .7s var(--ease);
}
.st-card:hover .st-img img{transform:scale(1.035);opacity:1}
.st-title{
  font-family:var(--f-display);
  font-size:clamp(16px,1.5vw,21px);
  font-weight:800;
  letter-spacing:-.025em;
  line-height:1.08;
  text-transform:uppercase;
  margin-bottom:10px;
  transition:color .5s var(--ease);
  overflow-wrap:anywhere;
}
.st-card:hover .st-title{color:var(--acid)}
.st-excerpt{
  font-size:13px;
  line-height:1.75;
  color:var(--dim);
  margin-bottom:12px;
  max-width:44ch;
}

/* --- behind the brand: single story -------------------------------------- */
.story-head{
  margin-top:clamp(34px,6vh,64px);
  margin-bottom:clamp(30px,5vh,56px);
}
.story-title{
  margin-top:clamp(14px,2.4vh,24px);
  max-width:18ch;
  font-family:var(--f-display);
  font-weight:900;
  font-size:clamp(34px,6.4vw,108px);
  line-height:.88;
  letter-spacing:-.052em;
  text-transform:uppercase;
  overflow-wrap:anywhere;
}
.story-hero{
  position:relative;
  margin:0 0 clamp(40px,7vh,84px);
  border:1px solid var(--line);
  background:var(--bg-2);
  overflow:hidden;
}
.story-hero img{
  width:100%;
  height:auto;
  max-height:80vh;
  object-fit:cover;
}

.story-body{font-size:16px;line-height:1.85;color:rgba(244,244,242,.82)}
.story-body > *{max-width:68ch;margin:0}
.story-body > * + *{margin-top:1.5em}
.story-body a{color:var(--fg);border-bottom:1px solid rgba(var(--acid-rgb),.8);transition:color .4s var(--ease)}
.story-body a:hover{color:var(--acid)}
.story-body h2,
.story-body h3,
.story-body h4{
  font-family:var(--f-display);
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1.05;
  text-transform:uppercase;
  color:var(--fg);
  margin-top:2.2em;
}
.story-body h2{font-size:clamp(22px,2.8vw,38px)}
.story-body h3{font-size:clamp(18px,2vw,26px)}
.story-body h4{font-size:15px;letter-spacing:.02em}
.story-body ul,
.story-body ol{padding-left:1.3em}
.story-body li + li{margin-top:.4em}
.story-body blockquote{
  margin-left:0;
  padding:.2em 0 .2em 1.4em;
  border-left:2px solid var(--acid);
  font-family:var(--f-display);
  font-size:clamp(18px,2.2vw,28px);
  font-weight:600;
  letter-spacing:-.02em;
  line-height:1.3;
  color:var(--fg);
}
.story-body blockquote p + p{margin-top:.8em}
.story-body cite{display:block;margin-top:1em;font-size:11px;font-style:normal;letter-spacing:.2em;text-transform:uppercase;color:var(--dim)}
.story-body hr{border:0;border-top:1px solid var(--line-soft);margin-block:2.4em}

/* Images, galleries and embeds break out of the reading column. */
.story-body > figure,
.story-body > .wp-block-image,
.story-body > .wp-block-gallery,
.story-body > .wp-block-embed,
.story-body > .wp-block-video,
.story-body > .gallery{max-width:none}
.story-body img{height:auto;border:1px solid var(--line)}
.story-body figure img{width:100%}
.story-body figcaption,
.story-body .wp-element-caption{
  margin-top:10px;
  font-family:var(--f-display);
  font-size:10px;
  font-weight:600;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--dim);
  line-height:1.6;
}
.story-body .wp-block-gallery.has-nested-images{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));
  gap:clamp(10px,1.4vw,20px);
}
.story-body .wp-block-gallery.has-nested-images figure.wp-block-image{
  width:auto;
  margin:0;
  flex:none;
  display:block;
}
.story-body .wp-block-gallery.has-nested-images figure.wp-block-image img{height:100%;object-fit:cover}
.story-body .gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));
  gap:clamp(10px,1.4vw,20px);
}
.story-body .gallery-item{margin:0}
.story-body .gallery-icon img{width:100%}
.story-body [data-lb-zoom]{cursor:zoom-in}
.story-body iframe,
.story-body video{max-width:100%;border:0}
.story-body .wp-block-embed__wrapper{position:relative}
.story-body .wp-has-aspect-ratio iframe{position:absolute;inset:0;width:100%;height:100%}

.story-videos{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));
  gap:clamp(24px,3.4vw,56px);
  margin-top:clamp(40px,7vh,84px);
}
.vid-embed{position:relative;aspect-ratio:16/9;border:1px solid var(--line);background:var(--bg-2);overflow:hidden}
.vid-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

.story-nav{margin-top:clamp(56px,9vh,112px)}

/* --- responsive ----------------------------------------------------------- */
@media (max-width:1180px){
  .st-grid{grid-template-columns:repeat(2,1fr)}
  .gal-grid{column-count:2}
}
@media (max-width:980px){
  .feat{grid-template-columns:1fr;align-items:start}
}
@media (max-width:620px){
  .st-grid{grid-template-columns:1fr}
  .gal-grid{column-gap:10px}
  .flt{padding:10px 14px}
  .flt-bar{gap:8px}
  .lb{padding:64px 10px 70px}
  .lb-prev,
  .lb-next{top:auto;bottom:14px;transform:none}
  .lb-prev{left:14px}
  .lb-next{right:14px}
  .lb-img{max-height:calc(100vh - 220px);max-height:calc(100dvh - 220px)}
  .story-body{font-size:15px}
  .story-videos{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){
  .gal-item img,
  .rel-card .cover img,
  .feat-img img,
  .st-img img{transition:none}
}
