/* Base element styles and shared UI utilities.
   Utility classes use the `ui-` prefix and are consumed by js/site.js. */

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background-color: #fff;
  font-family: Lato, sans-serif;
  font-size: 14px;
  line-height: 20px;
  color: #333;
}

img {
  max-width: 100%;
  vertical-align: middle;
  display: inline-block;
}

/* Typography defaults
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: bold;
  margin-bottom: 10px;
}

h1 {
  font-size: 38px;
  line-height: 44px;
  margin-top: 20px;
}

h2 {
  font-size: 32px;
  line-height: 36px;
  margin-top: 20px;
}

h3 {
  font-size: 24px;
  line-height: 30px;
  margin-top: 20px;
}

h4 {
  font-size: 18px;
  line-height: 24px;
  margin-top: 10px;
}

h5 {
  font-size: 14px;
  line-height: 20px;
  margin-top: 10px;
}

h6 {
  font-size: 12px;
  line-height: 18px;
  margin-top: 10px;
}

p {
  margin-top: 0;
  margin-bottom: 10px;
}

blockquote {
  margin: 0 0 10px 0;
  padding: 10px 20px;
  border-left: 5px solid #e2e2e2;
  font-size: 18px;
  line-height: 22px;
}

figure {
  margin: 0;
  margin-bottom: 10px;
}

figcaption {
  margin-top: 5px;
  text-align: center;
}

ul,
ol {
  margin-top: 0;
  margin-bottom: 10px;
  padding-left: 40px;
}

/* Layout utilities
   ========================================================================== */

.ui-block {
  display: block;
}

.ui-inline-block {
  max-width: 100%;
  display: inline-block;
}

.ui-hidden {
  display: none;
}

.ui-container {
  margin-left: auto;
  margin-right: auto;
  max-width: 940px;
}

.ui-container:before,
.ui-container:after {
  content: " ";
  display: table;
  grid-column-start: 1;
  grid-row-start: 1;
  grid-column-end: 2;
  grid-row-end: 2;
}

.ui-container:after {
  clear: both;
}

@media screen and (max-width: 991px) {
  .ui-container {
    max-width: 728px;
  }
}

@media screen and (max-width: 479px) {
  .ui-container {
    max-width: none;
  }
}

/* Buttons and forms
   ========================================================================== */

.ui-button {
  display: inline-block;
  padding: 9px 15px;
  background-color: #3898ec;
  color: white;
  border: 0;
  line-height: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
}

input.ui-button {
  -webkit-appearance: button;
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;
}

button,
[type='button'],
[type='reset'] {
  border: 0;
  cursor: pointer;
  -webkit-appearance: button;
}

label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.ui-form {
  margin: 0 0 15px;
}

.ui-form-done {
  display: none;
  padding: 20px;
  text-align: center;
  background-color: #dddddd;
}

.ui-form-fail {
  display: none;
  margin-top: 10px;
  padding: 10px;
  background-color: #ffdede;
}

.ui-input,
.ui-select {
  display: block;
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #333333;
  vertical-align: middle;
  background-color: #ffffff;
  border: 1px solid #cccccc;
}

.ui-input::placeholder,
.ui-select::placeholder {
  color: #999;
}

.ui-input:focus,
.ui-select:focus {
  border-color: #3898ec;
  outline: 0;
}

textarea.ui-input,
textarea.ui-select {
  height: auto;
}

/* Navigation
   ========================================================================== */

.ui-nav {
  position: relative;
  background: #dddddd;
  z-index: 1000;
}

.ui-nav:before,
.ui-nav:after {
  content: " ";
  display: table;
  grid-column-start: 1;
  grid-row-start: 1;
  grid-column-end: 2;
  grid-row-end: 2;
}

.ui-nav:after {
  clear: both;
}

.ui-nav-brand {
  position: relative;
  float: left;
  text-decoration: none;
  color: #333333;
}

.ui-nav-link {
  position: relative;
  display: inline-block;
  vertical-align: top;
  text-decoration: none;
  color: #222222;
  padding: 20px;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
}

.ui-nav-link.ui--current {
  color: #0082f3;
}

.ui-nav-menu {
  position: relative;
}

.ui-nav-button {
  position: relative;
  float: right;
  padding: 18px;
  font-size: 24px;
  display: none;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  user-select: none;
}

.ui-nav-button:focus {
  outline: 0;
}

/* The menu collapses behind the toggle on small screens. The descendant
   selector keeps these rules ahead of the single-class layout rules in
   alexanderbrand-design.css. */
@media screen and (max-width: 767px) {
  .ui-nav .ui-nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    min-width: 200px;
    background: #fff;
    border-bottom: 1px solid #f5f6f7;
    text-align: center;
  }

  .ui-nav .ui-nav-menu.is-open {
    display: block;
  }

  .ui-nav .ui-nav-button {
    display: block;
  }
}

/* Image lightbox
   ========================================================================== */

.ui-lightbox {
  cursor: zoom-in;
}

.ui-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5vmin;
  background: #000000e6;
  cursor: zoom-out;
}

.ui-lightbox-backdrop img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
