/**
 Copyright © 2020 Gamut.nyc. All rights reserved.
 @link        https://gamut.nyc/
 @version     0.2
 @package     Gamut.nyc
 
 https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties
 http://www.w3schools.com/cssref/css3_pr_box-shadow.asp
 https://css-tricks.com/snippets/css/complete-guide-grid/
 https://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048
 https://developer.mozilla.org/en-US/docs/Web/CSS/
 https://learncssgrid.com/
 https://platform-status.mozilla.org/
 https://css-tricks.com/fun-viewport-units/
 https://github.com/Hiswe/vh-check
 http://mediaqueriestest.com/
 https://www.clicktorelease.com/blog/how-to-make-clouds-with-css-3d/

 TODO: add style icon icon-name to divs instead of span. Test if icon-only possible
*/

@font-face { /* https://css-tricks.com/snippets/css/using-font-face/ */
  font-family: 'fgn-icons';
  src: url('/lib/font/fgn-icons/fgn-icons.eot');
  src: url('/lib/font/fgn-icons/fgn-icons.eot?#iefix') format('embedded-opentype'),
       url('/lib/font/fgn-icons/fgn-icons.woff2') format('woff2'),
       url('/lib/font/fgn-icons/fgn-icons.woff') format('woff'),
       url('/lib/font/fgn-icons/fgn-icons.ttf') format('truetype'),
       url('/lib/font/fgn-icons/fgn-icons.svg#fgn-icons') format('svg');
  font-weight: normal;
  font-style: normal;
  font-feature-settings: normal;
  font-stretch: normal;
}

html {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box; /* https://github.com/Schepp/box-sizing-polyfill */
}
*, *:before, *:after {
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
}
html, body {
  min-height: 100%;
  padding: 0;
  margin: 0;
}


/** Common Colors & Fonts */
body {
  color: black;
  background-color: rgb(255, 250, 240);
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: calc(14px + 0.3vw + 0.2vh);
}
main, body > article {
  font-family: 'EB Garamond', 'Book Antiqua', Palatino, 'Times New Roman', Times, serif;
}
body > header, body > footer {
  color: rgb(255, 250, 240);
  background-color: #003478; /* 003478 00225c */
}
main > h1, body > article > h1, main > h2, body > article > h2, main > article > h1 {
  color: #004492;
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
}
body > header a::after { /** animated link underline */
  background-color: #3e88dd;
}
main > ul > li, .blocks > li {
  border-color: #004492;
}
.blocks > li > h1 {
  -webkit-text-stroke-color: #004492;
}
input[type=submit] {
  color: rgb(255, 250, 240);
  background-color: #00225c;
  background-image: linear-gradient(0deg, #004492, #00225c);
  font-size: 107%;
  border-radius: 0.2em;
  padding: 0.4em 0;
  margin: 0.2em 0;
}

/** Common Alignment, Spacing & Sizing */



/** Page grid */
body > header {
  grid-area: header;
}
body > nav {
  grid-area: nav;
}
body > main, body > article {
  grid-area: main;
  overflow: auto;
}
body > aside {
  grid-area: aside;

  /* for now, hide aside */
  grid-area: unset;
  display: none;
}
body > footer {
  grid-area: footer;
  text-align: center;
  white-space: nowrap;
  font-size: 85%;
  line-height: 1.8;
}
body > header, body > footer, body > main, body > article, body > aside, .normalpadding { /** page sides */
  padding: 0 3%;
  padding: 0 expression(4% - 0.5em);
  padding: 0 calc(4vw - 0.5em);
}
main:not(.edge2edge) > .edge2edge, body > article:not(.edge2edge) > .edge2edge {
  /* erase padding specified above */
  margin-left: -3%;
  margin-left: expression(0.5em - 4%);
  margin-left: calc(0.5em - 4vw);
  margin-right: -3%;
  margin-right: expression(0.5em - 4%);
  margin-right: calc(0.5em - 4vw);
}
body {
  width: 100vw;
  height: 100vh; /* fixed at the bottom for mobile browsers */
  display: grid;
  grid-template-columns: 3fr 1fr;
  grid-template-rows: min-content 1fr min-content;
  grid-template-areas:
    "header header"
    "main main"
    "footer footer"; /* "main aside" */ /* "article article . aside" */
}

/** reset built-in styles for semantic use for elements in navigation and / or headers */
nav ul, header ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}
header h1, header h2, header h3, nav h1, nav h2, nav h3 {
  font-weight: inherit;
  font-size: inherit;
  font-style: inherit;
  font-size: 100%;
  margin-top: 0;
  margin-bottom: 0;
}
nav a, header a, footer a {
  text-decoration: none;
  color: inherit;
}

body > header h1, body > header h2, body > header h3 {
  display: inline;
}
body > header img { /** logo */
  vertical-align: middle;
  height: 1.8em;
  padding: 0.3em 0.2em 0.3em 0;
  border: 0;
  position: relative;
  bottom: 0.07em;
  z-index: 12;
}
body > header h1 {
  font-size: 108%;
  position: relative;
  top: 0.06em;
}
body > header a {
  line-height: 2.5em;
  display: inline-block;
  position: relative;
}
body > header a:hover,
body > header a:active {
  text-shadow: 0 0 0.5em rgba(255,255,255,0.6); 
  transition: text-shadow ease 250ms;
}
body > header a::after { /** animated link underline */
  content: '';
  display: block;
  height: 0.2em;
  position: relative;
  bottom: 0.45em;
  transform: scale(0, 1);
  transition: transform ease-in-out 250ms;
}
nav a:hover::after {
  transform: scale(1,1);
}

/** Header nav */
body > header > nav > ul {
  display: -webkit-flex; /* Safari */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
html.ie10 > body > header > nav > ul { /* IE10 */
  -ms-display: flexbox;
  display: flexbox;
  -ms-flex-pack: justify;
}
body > header > nav > ul > li {
  margin: auto 0;
  white-space: nowrap;
}

/** Body Variants */
body > .edge2edge { /** .normalpadding sets these values back to normal */
  padding: 0;
  /* margin: 0; */
}

body.nonsell nav li.sell { /** Shortened top menu sans "selling" items */
  display: none;
}

main.long, article.long, body.long > main > article { /** Display long-form content, not expected to fit on one page */
  -webkit-columns: 56ch;
  -moz-columns: 56ch;
  columns: 56ch;
}
body:not(.long) > main a, body:not(.long) > article a {
  color: inherit;
}


/** Main */
main > h1, body > article > h1 {
  font-size: 170%;
  font-weight: 400;
  padding: 0.6em 0 0.1em 0;
}
main > h2, body > article > h2, main > article > h1 {
  font-weight: 400;
  padding-top: 0;
  margin-top: -0.1em;
}
main > h1 + article > h1, body > article > h1 + article > h1, main > h1 + h2, body > article > h1 + h2 {
  padding-top: 0;
  margin-top: -0.1em;
}


strong, b {
  font-weight: 700;
}


.blocks { /* text in blocks. TODO: handle DL better */
  display: -webkit-flex; /* Safari */
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  /* font-size: 115%;
  font-weight: 300;  */
  list-style-type: none;
  padding-left: 0;
  font-family: 'Montserrat', Helvetica, Arial, sans-serif;
  font-weight: 400;
}
.blocks > li {
  position: relative;
  width: 49.5%; /* 32% */
  text-align: center;
  margin: 0.3em 0;
  border-style: solid;
  border-width: 1px;
  background-color: rgba(255,255,255,0.65);
  min-height: 3em;
}
.blocks > li img {
  width: 100%;
  object-fit: cover;
}
.blocks > li h1 {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translate(-50%, 0);
  -webkit-text-fill-color: white; /* rgba(255,255,255,0.8) */
  -webkit-text-stroke-width: 0.9px;
  opacity: 0.9;
  font-size: 4.2vw;
  text-shadow: 0 0 0.4em rgba(0, 0, 5, 0.5);
  /* font-size: calc(12.8px + 0.3vw + 0.2vh); */
}
.edge2edge .blocks, .edge2edge .blocks > li {
  margin: 0;
}
.edge2edge .blocks > li {
  width: 50%;
  max-height: 45vh;
  border: none;
  overflow: hidden;
}
.edge2edge .feature.blocks > li {
  height: 33.333vw;
}
.feature.blocks > li img {
  will-change: width, margin-top, margin-left;
  animation: grow 60s infinite;
  animation-timing-function: linear;
  animation-direction: alternate;
}
@keyframes grow {
  0% {
    width: 100%;
  }
  100% {
    width: 170%;
    margin-top: -15%;
    margin-left: -35%;
  }
}
.edge2edge .inline > li {
  width: auto;
  flex-grow: 1;
  line-height: 3em;
  padding: 0 0.3em;
  background-color: #3e88dd;
  margin: 0 1px 1px 0;
  /* border: 1px solid blue; */
}
.edge2edge .inline > li:hover {
  background-color: initial;
}
.blocks a {
  text-decoration: none;
}
.blocks a:hover img {
  /* filter: saturate(3);
  filter: brightness(1.1); */
  filter: sepia(0.45);
}

main > img.headshot, article > img.headshot {
  float: left;
  width: 16em;
  padding-right: 1em;
}

img.feature {
  width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
  object-position: 50% 40%;
  max-height: 30vh;
  /* padding: 1em 0; */
}

/** Main nav grid */
main dl > dt {
  text-align: center;
  /* grid-area: nav-name; */
  grid-row: 1;
}

main dl > dd {
  margin-left: 0;
  /* grid-area: nav-descr; */
  grid-row: 2;
  grid-column: 1 / -1;
  visibility: hidden;
}

main dl > dt:first-child + dd {
  visibility: visible;
  z-index: -1;
}


main dl > dt:focus-within + dd,
main dl > dt:focus + dd,
main dl > dt:hover + dd,
main dl > dt:active + dd {
  visibility: visible;
}

main dl {
  display: grid;
  align-content: center;
  grid-gap: 0.5em calc(5vw - 0.8em);
  grid-template-columns: repeat(3, minmax(max-content, 1fr));
}


/** Text Variants */
div.col20 {
  -webkit-columns: 20ch;
  -moz-columns: 20ch;
  columns: 20ch;
}


/** Form */
form {
  display: grid;
  grid-template-columns: max-content 1fr;
  grid-gap: 2vh 1vw;
}
form label {
  display: block;
}
textarea {
  overflow: auto;
}

div.social {
  font-size: 118%;
  line-height: 180%;
  padding: 0.5em 0;
}
div.social .icon:before {
  display: inline-block;
  letter-spacing: 0.2em;
  min-width: 1.2em;
}

/** Icons see http://fontello.com/ */
div.icon:before, a.icon:before, span.icon:before {
  font-family: 'fgn-icons', Arial, Verdana, Helvetica, sans-serif;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  letter-spacing: 0.5em;
}
.ic-help:before { content: '\3f'; } /* '?' */
.ic-facebook-sq:before { content: '\46'; } /* 'F' */
.ic-info-circ:before { content: '\49'; } /* 'I' */
.ic-linkedin-sq:before { content: '\4e'; } /* 'N' */
.ic-twitter-sq:before { content: '\54'; } /* 'T' */
.ic-vimeo-sq:before { content: '\56'; } /* 'V' */
.ic-facebook:before { content: '\66'; } /* 'f' */
.ic-instagram:before { content: '\67'; } /* 'g' */
.ic-info:before { content: '\69'; } /* 'i' */
.ic-linkedin:before { content: '\6e'; } /* 'n' */
.ic-twitter:before { content: '\74'; } /* 't' */
.ic-vimeo:before { content: '\76'; } /* 'v' */
.ic-help-circ:before { content: '\bf'; } /* '¿' */
.ic-mail:before { content: '\234c'; } /* '⍌' */
.ic-camera:before { content: '\2384'; } /* '⎄' */
.ic-print:before { content: '\2399'; } /* '⎙' */
.ic-home:before { content: '\23cf'; } /* '⏏' */
.ic-youtube-sq:before { content: '\23e9'; } /* '⏩' */
.ic-youtube:before { content: '\23ed'; } /* '⏭' */
.ic-youtube-play:before { content: '\23f5'; } /* '⏵' */
.ic-picture:before { content: '\25a4'; } /* '▤' */
.ic-upload:before { content: '\25b2'; } /* '▲' */
.ic-download:before { content: '\25bc'; } /* '▼' */
.ic-FGN-logo:before { content: '\2600'; } /* '☀' */
.ic-phone-sq:before { content: '\260e'; } /* '☎' */
.ic-phone:before { content: '\260f'; } /* '☏' */
.ic-ok:before { content: '\2611'; } /* '☑' */
.ic-trash:before { content: '\2613'; } /* '☓' */
.ic-file-txt:before { content: '\2630'; } /* '☰' */
.ic-file-docx:before { content: '\2636'; } /* '☶' */
.ic-file-pdf:before { content: '\2637'; } /* '☷' */
.ic-FGN-logo-circ:before { content: '\263c'; } /* '☼' */
.ic-calendar:before { content: '\2684'; } /* '⚄' */
.ic-attention:before { content: '\26a0'; } /* '⚠' */
.ic-minus-circ:before { content: '\26d4'; } /* '⛔' */
.ic-basket:before { content: '\26df'; } /* '⛟' */
.ic-court:before { content: '\f19c'; } /* '' */

/* for icon-only display a.icon > span { display: none; } */


/** debug elements */
#debug-message {
  /* white-space: pre-line; */
}


@media
  only screen and (min-width: 721px),
  only screen and (min-height: 1011px) {
    .sub480-show, .sub720-show { /* hide the narrow-only versions */
      display: none;
    }
 }

/** Narrow-screen fixes */
@media
  only screen and (max-width: 640px), /* todo: add rem */
  only screen and (max-width: 800px) and (max-height: 640px) { /* todo: add height and width to both conditions to exclude high area tall/wide windows */

  /* Hide this on screens narrower than 480pix*/
  .sub480-hide {
    display: none;
  }
  /** Only to be shown on screens narrower than 480pix, typically as a shorter substitution for that deleted with .sub480-hide */
  .sub480-show {
    display: initial;
  }

  /** convert top menu to bottom buttons */
  body, html.standard > body, html.ie10 > body {
    background-position: center bottom +4.7em;
  }
  body {
    grid-template-columns: 1fr;
    /* grid-template-rows: min-content 1fr min-content; */
    grid-template-rows: min-content 1fr min-content;
    grid-template-areas:
    "footer"
    "main"
    "header";
  }
  body > footer {
    grid-area: footer;
    /* display: none; */
  }
  body > aside {
    /* for now, hide aside */
    display: none;
  }
  body > main, body > article {
    overflow: auto;
  }
  body > header, body.long > header {
    grid-area: header;
    background-color: transparent;
    background-image: none;
    /* background-color: #8EA8BF;
    background-image: linear-gradient(0deg, #8EA8BF, #8EA8BF 69%, rgba(142, 168, 191, 0.2)); */
  }
  body > header > nav > ul > li {
    font-size: 106%;
    letter-spacing: -0.033ch;
    background-color: #00225c;
    background-image: linear-gradient(0deg, #004492, #00225c);
    width: 32.9%;
    text-align: center;
    padding: 0.2em 0;
    margin: 0.17em 0;
    border-radius: 0.2em;
  }
  body.nonsell > header > nav > ul > li { /** Shortened top menu sans "selling" items */
    letter-spacing: initial;
    width: 49%;
  }
  body > header img {
    height: 1.9em;
  }
  body > header a {
    line-height: 2.2em;
  }
  a.icon:before, span.icon:before { /* TODO: need all these properties? */
    font-family: 'fgn-icons', Arial, Verdana, Helvetica, sans-serif;
    font-style: normal;
    font-weight: normal;
    letter-spacing: 0.25em;
  }

  main > h1, body > article > h1 {
    padding: 0.1em 0;
  }
  main > ul > li {
    width: 49%;
    min-height: 2em;
  }

  .edge2edge .blocks > li h1 {
    font-size: 7vw;
    opacity: 1;
    bottom: 8%;
    -webkit-text-stroke-width: 0.6px;
  }

  #debug-message:after {
    content: '@media Mobile-only fixes matched'
  }
}
@media
  only screen and (max-width: 720px),
  only screen and (max-height: 1010px) { /* todo: add height and width to both conditions to exclude high area tall/wide windows */

  .grid.collapsible {
    grid-template-columns: repeat(auto-fit, minmax(12ch, 1fr));
  }
  /* Hide this on screens narrower than 720pix*/
  .sub720-hide {
    display: none;
  }
  /** Only to be shown on screens narrower than 480pix, typically as a shorter substitution for that deleted with .sub720-hide */
  .sub720-show {
    display: initial;
  }
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  /* IE10 and IE11 CSS styles go here */
}
@media screen and (min-width:0\0) {
  /* IE9 and IE10 rule sets go here */
}


/** Mobile-only fixes */
@media
  only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px) and (max-width: 1000px),
  only screen and (min--moz-device-pixel-ratio: 2) and (min-width: 320px) and (max-width: 1000px),
  only screen and (-o-min-device-pixel-ratio: 2/1) and (min-width: 320px) and (max-width: 1000px),
  only screen and (min-device-pixel-ratio: 2) and (min-width: 320px) and (max-width: 1000px),
  only screen and (min-resolution: 192dpi) and (min-width: 320px) and (max-width: 1000px),
  only screen and (min-resolution: 2dppx) and (min-width: 320px) and (max-width: 1000px) { 

  html, body { /** JavaScript --vh re-computed from window.innerHeight, accountig for mobile browser "chrome" */
    height: calc(var(--vh, 1vh) * 100);
  }

  #debug-message:before {
    content: '@media Narrow-screen fixes matched; '
  }
}