@font-face {
  font-family: 'open_sansregular';
  src: url("/assets/fonts/OpenSans-Regular-webfont.ttf");
}

@font-face {
  font-family: 'open_sansbold';
  src: url("/assets/fonts/OpenSans-Bold-webfont.ttf");
}

@font-face {
  font-family: 'source_serif_regular';
  src: url("/assets/fonts/SourceSerif4-Regular.ttf");
}

@font-face {
  font-family: 'source_serif_light';
  src: url("/assets/fonts/SourceSerif4-Light.ttf");
}

@font-face {
  font-family: 'source_serif_bold';
  src: url("/assets/fonts/SourceSerif4-Bold.ttf");
}

:root {
  --measure: 70ch;
  --space-unit: 1em;
  --space-xxs:  calc(0.25 * var(--space-unit));
  --space-xs:   calc(0.5 * var(--space-unit));
  --space-sm:   calc(0.75 * var(--space-unit));
  --space-md:   calc(1.25 * var(--space-unit));
  --space-lg:   calc(2 * var(--space-unit));
  --space-xl:   calc(3.25 * var(--space-unit));
  --space-xxl:  calc(5.25 * var(--space-unit));

  --cotech-white: white;
  --cotech-black: #000000;
  --cotech-light-grey: #646464;
  --cotech-dark-grey: #222222;
  --cotech-blue: #2DA9D7;
}

* {
  max-inline-size: var(--measure);
}

html,
body,
div,
header,
nav,
main,
footer,
section {
  max-inline-size: none;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  --space: 3rem;
}

p, li, a {
  font-family: "open_sansregular", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  color: var(--cotech-white);
  font-weight: 300;
  line-height: 1.4;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "source_serif_light", Palatino, Palladio, "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style", "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond", "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook", "Century Schoolbook L", Georgia, serif;
  color: var(--cotech-white);
  line-height: 1.2;
  font-weight: 400;
}

h1, h2 {
  border-left: 4px solid var(--cotech-blue);
  padding-left: var(--space-xs);
}

h3.title {
  font-family: "open_sansregular", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  color: var(--cotech-white);
  font-weight: 700;
}

h1 {
  font-size: 2.625rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.625rem;
}

h3.title {
  font-size: 1.25rem;
}

p.large {
  font-size: 1.375rem;
}

p.intro {
  font-size: 1.125rem;
}

p, li, a {
  font-size: 0.875rem;
}

@media (min-width: 420px) {
  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 3.25rem;
  }

  h3 {
    font-size: 2.5rem;
  }

  h3.title {
    font-size: 1.5rem;
  }

  p.large {
    font-size: 1.875rem;
  }

  p.intro {
    font-size: 1.25rem;
  }

  p, li, a {
    font-size: 1rem;
  }
}

ul.services {
  list-style: none;
  padding-left: 0;
}

ul.services li {
  padding-left: var(--space-md);
  position: relative;
}

ul.services li::before {
  content: "−";
  color: var(--cotech-blue);
  position: absolute;
  left: 0;
}

strong {
  font-family: "open_sansbold", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}

body {
  background-color: var(--cotech-black);
}

img {
  object-fit: contain;
}

img.greyscale {
  filter: grayscale(100) brightness(120%);
}

img.rounded {
  border-radius: var(--space-sm);
}

img.rectangle {
  aspect-ratio: 2;
  object-fit: cover;
}

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

/* opt-in crop focus, for cover images whose subject isn't in the middle.
   object-position takes x then y, so these shift the crop horizontally only. */
img.cover.focus-right {
  object-position: 70% 50%;
}

img.cover.focus-left {
  object-position: 30% 50%;
}

img.stretch {
  object-fit: cover;
  object-position: 0px 0px;
  height: 100%;
}

section, footer, header {
  padding: var(--space-md);
  max-inline-size: 1144px;
  margin-left: auto;
  margin-right: auto;
}

.w-full {
  width: 100%;
}

.box {
  background: linear-gradient(180deg, rgba(45, 169, 215, 0.2) 0%, rgba(255, 255, 255, 0.05) 100%);
  border: 1px solid var(--cotech-dark-grey);
  border-radius: var(--space-sm);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media screen and (width > 480px) {
  .box {
    padding: var(--space-lg);
  }
}

.stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.stack > * {
  margin-block: 0;
}

.stack > * + * {
  margin-block-start: var(--space, 1.4rem);
}

.switcher {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.large-only {
  display: none;
}

.w-two-thirds {
  width: 66%;
}

@media screen and (width > 480px) {
  .large-only {
    display: inline;
  }
}

.btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--cotech-white);
  color: var(--cotech-black);
  text-decoration: none;
  font-family: "open_sansbold", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  border: 1px solid var(--cotech-white);
  border-radius: var(--space-sm);
  width: fit-content;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn::after {
  content: " →";
}

.btn:hover {
  border: 1px solid var(--cotech-white);
  background: var(--cotech-black);
  color: var(--cotech-white);
}

.grid {
  display: grid;
  grid-gap: var(--space-md);
  grid-template-columns: 1fr;
  align-items: stretch;
}

.grid__link {
  display: flex;
  height: 100%;
}

.grid-dense {
  grid-template-columns: 1fr 1fr;
}

.grid-uneven {
  grid-gap: var(--space-lg);
}

@media (min-width: 420px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-three {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .grid-dense {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }

  .grid-uneven {
    grid-template-columns: 3fr 2fr;
  }
}

.work__title {
  margin-block-end: var(--space-xs);
  font-family: "open_sansbold", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
}

.header {
  display: flex;
  padding: var(--space-lg) var(--space-md);
  align-items: center;
  justify-content: space-between;
}

.header a {
  text-decoration: none;
  text-transform: uppercase;
}

.header a:hover {
  text-decoration: underline;
}

.header_logo-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header_menu-list {
  font-family: 'open_sansbold';
  list-style-type: none;
  display: flex;
  /* wrap whole items onto new rows rather than squeezing the logo off the header */
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-xs) var(--space-md);
  font-size: 1rem;
  letter-spacing: 0.05em;
  /* opt out of the global 70ch measure so the row can grow with the viewport */
  max-inline-size: none;
}

.header_menu-list li,
.header_menu-list a {
  max-inline-size: none;
  white-space: nowrap;
}

.header_menu-list a {
  font-family: 'open_sansbold';
}

.header_burger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--cotech-white);
}

.header_close-icon {
  display: none;
}

@media screen and (width < 768px) {
  .header {
    position: relative;
  }

  .header_burger-btn {
    display: flex;
    gap: var(--space-xs);
    border: 2px solid var(--cotech-white);
    border-radius: var(--space-sm);
  }

  .header_menu-list {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--cotech-black);
    flex-direction: column;
    /* full-height overlay: never break the column into a second column */
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: var(--space-lg);
    font-size: 1.5rem;
    z-index: 1000;
    transform: translateX(-100%);
  }

  .header_menu-list.active {
    transform: translateX(0);
  }

  .header_burger-btn.active .header_burger-icon {
    display: none;
  }

  .header_burger-btn.active .header_close-icon {
    display: block;
  }

  .header_burger-btn {
    position: relative;
    z-index: 1001;
  }
}

footer {
  h3 {
    border-left: none;
    padding-left: 0;
  }
}

@media screen and (width > 480px) {
  footer {
    .container {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
    }

    .reverse {
      flex-direction: row-reverse;
    }
  }
}

.padded {
  padding: var(--space-sm);
}

.padded-xl {
  padding: var(--space-xl);
}

.coop-info-box {
  position: relative;
  padding: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--cotech-white);
  border-radius: var(--space-sm);
  border: 2px solid var(--cotech-light-grey);
  max-width: var(--measure);
}

.coop-info-box__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--cotech-white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.coop-info-box__close img {
  transition: transform 0.3s ease;
}

.coop-info-box__close:hover img {
  transform: rotate(90deg);
}

@media screen and (width > 480px) {
  .coop-info-box__close {
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
  }
}

.coop-info-box__close a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.coop-info-box__content {
  padding: var(--space-lg);
}

.coop-info-box__content strong {
  color: var(--cotech-black);
}

.coop-info-box__content h2 {
  color: var(--cotech-black);
}

.coop-info-box__body {
  filter: invert(100%);
}

.coop-info-box__body blockquote {
  padding-left: var(--space-sm);
  border-left: 2px solid var(--cotech-white);
}

.coop-info-box .btn {
  filter: invert(100%);
}

.coop-info-box h2 {
  border-left: none;
  padding-left: 0;
}

.coop-info-box__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--cotech-black);
}

#coop-dialog {
  max-width: 800px;
  max-height: 90vh;
  margin-left: var(--space-sm);
  margin-right: var(--space-sm);
  border: none;
  border-radius: var(--space-sm);
  padding: 0;
  background: rgba(0, 0, 0, 0.7);
}

@media screen and (width > 480px) {
  #coop-dialog {
    margin-left: auto;
    margin-right: auto;
  }
}

#coop-dialog::backdrop {
  background: rgba(0, 0, 0, 0.7);
}

.coop-dialog-container {
  overflow-y: auto;
}

#members .grid__link:hover .box {
  background: black;
  border-color: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--cotech-dark-grey);
  font-family: "open_sansregular", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  vertical-align: top;
  color: var(--cotech-white);
}

table td:first-child {
  white-space: nowrap;
  color: var(--cotech-blue);
  font-family: "open_sansbold", sans-serif;
}
