/* notems presentation layer, loaded AFTER nm-member.css by membersiteheader.jspf.

   PART 1  Photographic framing (platform-wide).  Applies to every member site and every publication with no template change:
             - the photo strip under the homepage hero            (#myMosaic.nmm-strip .nmm-tile)
             - the primary image of a notem / product / event      (.nmm-media .nmm-feat a)
             - the thumbnails below it                             (.nmm-media a.nmm-th)
           Reusable classes for any new template:  .nm-frame (thumbnail frame)  .nm-frame--lg (primary image frame)
           Every value is a custom property, so a site, a section or one element can restyle the frame by setting them:
             --nmx-frame-w  --nmx-frame-r  --nmx-frame-color  --nmx-frame-shadow  --nmx-frame-shadow-hover  --nmx-gap  --nmx-tile-h
           Not touched: logos, icons, avatars, buttons, card images, document previews, and anything that is not listed above.

   PART 2  Soft hero-to-content transition (platform-wide, subtle).

   PART 3  Premium page components (opt-in; they only apply where the page carries these classes).
             .nmx-premium  cinematic hero treatment on <main>      .nmx-fade  stronger overlap transition on the gallery section
             .nmx-orbs     dimensional category icons              .nmx-heading  editorial section heading                       */

/* ================= PART 1: frame tokens ================= */
body.nm-member{
  --nmx-frame-w:5px;--nmx-frame-r:16px;--nmx-frame-color:#fff;
  --nmx-frame-shadow:0 10px 24px -6px rgba(7,18,43,.36),0 3px 8px rgba(7,18,43,.16);
  --nmx-frame-shadow-hover:0 14px 28px -6px rgba(7,18,43,.46),0 4px 10px rgba(7,18,43,.22);
  --nmx-gap:10px;--nmx-tile-h:clamp(120px,9vw,156px)}

/* One shared look.  The first selector is the reusable class; the rest attach the same class to the existing markup. */
html body.nm-member .nm-frame,
html body.nm-member #myMosaic.nmm-strip .nmm-tile,
html body.nm-member .nmm-media a.nmm-th.nmm-th{
  box-sizing:border-box;border:var(--nmx-frame-w) solid var(--nmx-frame-color)!important;border-radius:var(--nmx-frame-r)!important;
  background:#dfe4ec;box-shadow:var(--nmx-frame-shadow);overflow:hidden!important;
  transition:transform .2s ease,box-shadow .2s ease}
html body.nm-member .nm-frame img,
html body.nm-member #myMosaic.nmm-strip .nmm-tile img,
html body.nm-member .nmm-media a.nmm-th.nmm-th img{
  border-radius:calc(var(--nmx-frame-r) - var(--nmx-frame-w))!important;object-fit:cover}
html body.nm-member .nm-frame:hover,html body.nm-member .nm-frame:focus-visible,
html body.nm-member #myMosaic.nmm-strip .nmm-tile:hover,html body.nm-member #myMosaic.nmm-strip .nmm-tile:focus-visible,
html body.nm-member .nmm-media a.nmm-th.nmm-th:hover,html body.nm-member .nmm-media a.nmm-th.nmm-th:focus-visible{
  transform:translateY(-3px);box-shadow:var(--nmx-frame-shadow-hover)}

/* Primary publication image: a slightly wider mat and a softer, larger shadow.  Size and aspect ratio stay as the template set them
   (the border sits inside the existing box, the photo is still object-fit:contain, never cropped). */
html body.nm-member .nm-frame--lg,
html body.nm-member .nmm-media .nmm-feat a{
  box-sizing:border-box;border:calc(var(--nmx-frame-w) + 1px) solid var(--nmx-frame-color)!important;border-radius:calc(var(--nmx-frame-r) + 2px)!important;
  box-shadow:var(--nm-feat-shadow,0 18px 38px -14px rgba(7,18,43,.40),0 4px 12px rgba(7,18,43,.14));overflow:hidden!important}
html body.nm-member .nmm-media .nmm-feat img{border-radius:calc(var(--nmx-frame-r) - var(--nmx-frame-w) + 1px)!important}
html body.nm-member .nmm-media .nmm-feat figcaption{margin-top:12px}

@media (prefers-reduced-motion:reduce){
  html body.nm-member .nm-frame,html body.nm-member #myMosaic.nmm-strip .nmm-tile,html body.nm-member .nmm-media a.nmm-th.nmm-th{transition:none}
  html body.nm-member .nm-frame:hover,html body.nm-member #myMosaic.nmm-strip .nmm-tile:hover,html body.nm-member .nmm-media a.nmm-th.nmm-th:hover{transform:none}}

/* ---- homepage strip: even tiles, room for the shadows (the strip scrolls sideways, so it clips them unless padded) */
html body.nm-member #myMosaic.nmm-strip{gap:var(--nmx-gap);align-items:stretch;padding:10px max(40px,calc((100% - 1440px) / 2 + 40px)) 28px;scroll-padding:0 40px;scroll-snap-type:x proximity}
html body.nm-member #myMosaic.nmm-strip .nmm-tile{height:var(--nmx-tile-h);min-width:96px;max-width:240px;flex:1 1 0}
html body.nm-member #myMosaic.nmm-strip .nmm-tile img{width:100%;height:100%;object-position:50% 28%}

/* ---- notem thumbnails: keep the existing column counts, add breathing room for frame and shadow */
html body.nm-member .nmm-media .nmm-thumbs.nmm-thumbs{gap:var(--nmx-gap)!important;margin-top:14px!important;padding:2px 2px 12px!important}
html body.nm-member .nmm-media a.nmm-th.nmm-th{min-width:0}
html body.nm-member .nmm-media a.nmm-th.nmm-th .nmm-play{z-index:1}

/* ---- publication pages only (.nmm-media): about 25% lighter shadows and 5px more space between photographs.
   Scoped to .nmm-media, so the homepage strip (#myMosaic.nmm-strip) keeps the tokens above untouched. */
html body.nm-member .nmm-media{
  --nmx-frame-shadow:0 10px 24px -6px rgba(7,18,43,.27),0 3px 8px rgba(7,18,43,.12);
  --nmx-frame-shadow-hover:0 14px 28px -6px rgba(7,18,43,.35),0 4px 10px rgba(7,18,43,.17);
  --nm-feat-shadow:0 18px 38px -14px rgba(7,18,43,.30),0 4px 12px rgba(7,18,43,.105);
  --nmx-gap:15px}

/* ---- publication pages: no tinted panel behind the photographs (frames sit directly on the white page) */
html body.nm-member .nmm-art .nmm-art-main,
html body.nm-member .nmm-art .nmm-media,
html body.nm-member .nmm-art .nmm-media .nmm-thumbs,
html body.nm-member .nmm-art .nmm-media .nmm-feat{background:transparent!important;box-shadow:none}

/* ---- tablet */
@media (max-width:980px){body.nm-member{--nmx-tile-h:clamp(110px,15vw,148px)}}
/* ---- phone */
@media (max-width:700px){
  body.nm-member{--nmx-frame-w:4px;--nmx-frame-r:14px;--nmx-gap:8px}
  html body.nm-member #myMosaic.nmm-strip{padding:8px 16px 22px;scroll-padding:0 16px}
  html body.nm-member #myMosaic.nmm-strip .nmm-tile{flex:0 0 auto;width:calc(var(--r,1.4) * 112px);min-width:0;max-width:none;height:128px}
  html body.nm-member .nmm-media{--nmx-gap:13px}
  html body.nm-member .nmm-media .nmm-thumbs.nmm-thumbs{gap:var(--nmx-gap)!important}
}

/* ================= PART 2: soft transition from hero to content (every member homepage) =================
   A light blue-gray wash under the strip that fades to the page color, so the white frames lift off it.  Pages that carry
   .nmx-fade (premium) use the stronger overlap version in Part 3 instead. */
body.nm-member{--nmx-std-overlap:56px}
body.nm-member .nmm-gallery:not(.nmx-fade){
  position:relative;z-index:3;margin-top:calc(var(--nmx-std-overlap) * -1);padding-bottom:6px;
  background:linear-gradient(180deg,rgba(135,150,176,0) 0,#8f9db5 var(--nmx-std-overlap),#e6eaf1 68%,#fff 100%)}
/* the hero keeps its text clear of the overlap */
body.nm-member .nmm-hero:has(+ .nmm-gallery:not(.nmx-fade)) .nmm-hero-in{padding-bottom:calc(44px + var(--nmx-std-overlap))}
body.nm-member .nmm-hero:has(+ .nmm-gallery:not(.nmx-fade)) .nmm-sig{bottom:calc(16% + var(--nmx-std-overlap) * .5)}
@media (max-width:980px){body.nm-member{--nmx-std-overlap:44px}}
@media (max-width:700px){body.nm-member{--nmx-std-overlap:32px}}

/* ================= PART 3: premium page components (opt-in) ================= */
body.nm-member .nmx-premium{
  --nmx-navy:#07122b;--nmx-navy-2:#0d2147;--nmx-amber:255,150,40;
  --nmx-overlap:64px;--nmx-edge:#8796b0}

/* ---- hero: cinematic navy grade, warm amber light, text kept legible */
body.nm-member .nmx-premium .nmm-hero{background:linear-gradient(135deg,var(--nmx-navy) 0%,var(--nmx-navy-2) 100%)}
body.nm-member .nmx-premium .nmm-hero-bg{filter:saturate(1.12) contrast(1.06) brightness(.96)}
body.nm-member .nmx-premium .nmm-hero::before{
  background:
   radial-gradient(46% 70% at 74% 52%,rgba(var(--nmx-amber),.30),transparent 70%),
   radial-gradient(30% 50% at 96% 14%,rgba(255,190,90,.18),transparent 72%),
   linear-gradient(180deg,rgba(7,18,43,.28),rgba(7,18,43,0) 35%),
   linear-gradient(180deg,rgba(135,150,176,0) calc(100% - var(--nmx-overlap) * 1.6),var(--nmx-edge) 100%)}
body.nm-member .nmx-premium .nmm-hero--img::after{
  background:
   linear-gradient(90deg,rgba(5,12,32,.90) 0%,rgba(7,18,43,.72) 30%,rgba(10,26,64,.28) 56%,rgba(10,26,64,0) 100%),
   linear-gradient(180deg,rgba(7,18,43,0) 62%,rgba(7,18,43,.55) 100%)}
body.nm-member .nmx-premium .nmm-hero-in{padding-bottom:calc(34px + var(--nmx-overlap))}
body.nm-member .nmx-premium .nmm-sig{bottom:calc(14% + var(--nmx-overlap) * .5)}
body.nm-member .nmx-premium .nmm-hero .nmm-btn{box-shadow:0 6px 18px -6px rgba(0,0,0,.55)}
body.nm-member .nmx-premium .nmm-hero a.nmm-btn--ghost-light{background:rgba(7,18,43,.45);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}

/* ---- graduated overlap: transparent over the hero, muted blue-gray behind the photos, light gray, then white */
body.nm-member .nmx-fade{
  --nmx-fade-1:var(--nmx-edge,#8796b0);--nmx-fade-2:#e6eaf1;--nmx-fade-3:#fff;
  position:relative;z-index:3;margin-top:calc(var(--nmx-overlap,64px) * -1);padding:0 0 30px;
  background:linear-gradient(180deg,rgba(135,150,176,0) 0,var(--nmx-fade-1) var(--nmx-overlap,64px),var(--nmx-fade-2) 68%,var(--nmx-fade-3) 100%)}

/* ---- dimensional category icons */
body.nm-member .nmx-orbs{--nmx-orb:90px;--nmx-orb-glyph:36px;--nmx-orb-underline:34px;gap:14px 8px;margin-bottom:24px}
body.nm-member .nmx-orbs li{flex:1 1 0;min-width:64px}
body.nm-member .nmx-orbs .nmm-chip{
  width:var(--nmx-orb);height:var(--nmx-orb);font-size:var(--nmx-orb-glyph);color:#fff;
  background:radial-gradient(circle at 32% 24%,color-mix(in srgb,var(--c) 72%,#fff) 0,var(--c) 52%,color-mix(in srgb,var(--c) 82%,#000) 100%);
  box-shadow:inset 0 1px 1px rgba(255,255,255,.35),0 12px 22px -8px color-mix(in srgb,var(--c) 70%,transparent),0 4px 10px rgba(13,21,48,.12)}
body.nm-member .nmx-orbs .nmm-chip i{width:1em;text-align:center;line-height:1;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}
body.nm-member .nmx-orbs .nmm-chip-l{margin-top:12px;font:600 16px/1.2 var(--nmm-font)}
body.nm-member .nmx-orbs .nmm-chip-l::after{width:var(--nmx-orb-underline);height:4px;margin-top:9px;border-radius:3px}

/* ---- editorial heading: widely spaced capitals between two thin rules */
body.nm-member .nmx-heading{display:flex;align-items:center;gap:16px;margin:0 0 20px;font:600 13px/1.2 var(--nmm-font);letter-spacing:.32em;text-transform:uppercase;color:var(--nmx-heading-color,var(--nmm-ink))}
body.nm-member .nmx-heading::before,body.nm-member .nmx-heading::after{content:"";flex:1 1 0;height:1px;background:var(--nmx-heading-rule,currentColor);opacity:.28}
body.nm-member .nmx-heading--mobile,body.nm-member .nmx-orbs li.nmx-heading--mobile{display:none}

/* ---- spacing (premium page only) */
body.nm-member .nmx-premium .nmm-ed-sec{padding-top:6px}

@media (max-width:980px){
  body.nm-member .nmx-premium{--nmx-overlap:48px}
  body.nm-member .nmx-orbs{--nmx-orb:72px;--nmx-orb-glyph:29px}
}
@media (max-width:700px){
  body.nm-member .nmx-premium{--nmx-overlap:36px}
  body.nm-member .nmx-orbs li.nmx-heading--mobile{display:flex;flex:1 0 100%;grid-column:1/-1;width:100%;min-width:0;flex-direction:row;margin:0 0 4px}
  body.nm-member .nmx-orbs{--nmx-orb:64px;--nmx-orb-glyph:26px;display:grid;grid-template-columns:repeat(auto-fit,minmax(76px,1fr));justify-items:center;gap:18px 8px}
  body.nm-member .nmx-orbs .nmm-chip-l{font-size:14px}
  body.nm-member .nmx-premium .nmm-sig{bottom:auto;margin-bottom:calc(28px + var(--nmx-overlap))}
}
body.nm-member .nmx-premium,body.nm-member .nmx-fade{max-width:100%}
