/* Preset logotype, centered in the hero between the header and footer.
   Mirrors the app's treatment: tinted as a template image when the asset
   metadata carries a color, rendered as-is when it does not. */

#preset_logotype {
  display: block;
  width: 60%;
  max-width: 300px;
  margin: 0 auto;
}

#preset_logotype img {
  display: block;
  width: 100%;
  height: auto;
  
  filter: drop-shadow(0px 1px 2px rgb(0 0 0 / 0.35));
}

/* The tint filter itself is emitted inline in the page (it carries the per-preset
   color); here we just chain it in ahead of the shadow. */
#preset_logotype.tinted img {
  -webkit-filter: url(#preset_tint) drop-shadow(0px 1px 2px rgb(0 0 0 / 0.35));
          filter: url(#preset_tint) drop-shadow(0px 1px 2px rgb(0 0 0 / 0.35));
}

#preset_tint_svg {
  position: absolute;
  width: 0;
  height: 0;
}

#preset_logotype.fallback {
  text-align: center;
  color: #F7F4F1;
}

#preset_logotype.fallback h1 {
  font-size: 1.65em;
}

#preset_package {
  width: auto;
  height: 50px;
  margin-left: -18px;
  margin-right: -9px;
  vertical-align: middle;
}

#main_content.preset .four_grid {
  padding-right: 70px;
  padding-bottom: 21px;
}

/* --- Signature cameras -------------------------------------------------- */

/* Cameras have three sample photos, not four -- a 2x2 would leave a ragged 2+1.
   Mirrors #main_content .four_grid in style_v2.css, one row wider. */
#main_content .three_grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 14px;
  row-gap: 14px;
}

#main_content .three_grid img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background-color: #ccc;
  filter: drop-shadow(0px 1px 1px rgb(0 0 0 / 0.4));
}

/* The camera body sits where a preset's logotype would, centred in the hero square. */
#preset_case {
  display: block;
  width: 80%;
  max-width: 420px;
  margin: 0 auto;
}

#preset_case img {
  display: block;
  width: 100%;
  height: auto;
  
  filter: drop-shadow(0px 2px 6px rgb(0 0 0 / 0.45));
}

#main_content.camera .three_grid {
  padding-bottom: 21px;
}

@media only screen and (max-width: 680px) {
  /* #hero_footer is .only_desktop, so on mobile #hero_message is left with just the
     header and the logotype -- and its `justify-content: space-between` pins the
     logotype to the bottom. Take it out of the flex flow and center it on #hero
     (position: relative at this breakpoint) so it sits dead centre of the square. */
  #preset_logotype {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    
    width: 55%;
    max-width: 240px;
  }
  
  #main_content.preset .four_grid,
  #main_content.camera .three_grid {
    padding-right: 0;
  }
  
  /* Same bottom-pinning issue as #preset_logotype above -- see that comment. */
  #preset_case {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    
    width: 78%;
    max-width: 340px;
  }

}
