/* LAYOUT RULES - v0.1 */

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

section {
  position: relative;
  padding: 0;
  margin: 0;
}

/* BASIC ROW */
.row {
  width: 100%;
  padding: var(--space-3);
  display: flex;
  flex-wrap: wrap;
}

.row.row-containered {
  max-width: 1200px;
  margin: 0 auto;
}

.row.full-width {
  padding: 0;
}

/* CONTAINMENT OVERRIDE */
.row.contained {
  max-width: 1400px; /* default max width */
  margin: 0 auto;
}

/* BASIC COL */
.col {
  width: 100%;
  flex: 0 0 auto;
}

/* 2-COL LAYOUT (mobile-first) */
.row.two-col {
  display: flex;
  flex-direction: column;
}

/* 3-COL LAYOUT (mobile-first) */
.row.three-col {
  display: flex;
  flex-direction: column;
}

/* 4-COL LAYOUT (mobile-first) */
.row.four-col {
  display: flex;
  flex-direction: column;
}

/* 5-COL LAYOUT (mobile-first) */
.row.five-col {
  display: flex;
  flex-direction: column;
}

/* ALIGNMENT UTILITIES */

/* horizontal alignment */
.align-left {
  text-align: left;
  justify-content: flex-start;
}

.align-center,
.align-center p {
  text-align: center;
  justify-content: center;
}

.align-right {
  text-align: right;
  justify-content: flex-end;
}

/* vertical alignment (for flex containers) */
.valign-top {
  align-items: flex-start;
}

.valign-center {
  align-items: center;
}

.valign-bottom {
  align-items: flex-end;
}

.footer {
  padding: var(--space-2);
  font-size: var(--font-size-small);
  color: var(--color-text);
}

.col-text {
  padding: var(--space-4);
}

.col-image {
  padding: var(--space-0);
  max-height: 675px;
  overflow: hidden;
}

.col.col-narrow {
  max-width: 500px;
  margin: 0 auto;
}

.col.col-medium-narrow {
  max-width: 800px;
  margin: 0 auto;
}

.col-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.col-image img.img-pos-top {
  object-position: top;
}

.col-image img.img-pos-bottom {
  object-position: bottom;
}

.nav-logo {
  height: 32px;
}

/* desktop switch */
@media (min-width: 800px) {
  .row.two-col {
    flex-direction: row;
  }
  .row.two-col .col {
    flex: 1 1 0;
    min-width: 0; /* prevents flex items from overflowing */
  }
  .row.three-col {
    flex-direction: row;
  }
  .row.three-col .col {
    flex: 1 1 0;
    min-width: 0;
  }
  .row.four-col {
    flex-direction: row;
  }
  .row.four-col .col {
    flex: 0 0 50%;
    min-width: 0;
  }
  .row.five-col {
    flex-direction: row;
  }
  .row.five-col .col {
    flex: 0 0 50%;
    min-width: 0;
  }
  .col-span-2 {
    flex: 2 1 0;
  }
  .col-span-3 {
    flex: 3 1 0;
  }
}

/* four columns at full width on larger screens */
@media (min-width: 1200px) {
  .row.four-col .col {
    flex: 1 1 0;
  }
  .row.five-col .col {
    flex: 0 0 20%;
  }
}

@media (max-width: 800px) {
  .row.row-reversed {
    flex-direction: column-reverse !important;
  }
}
