/*
 * CoCoLab
 * Written to https://codeguide.co/ conventions.
 *
 * Colours come from the CoCoLab logo:
 *   blue  #014c72  (CoCoLab)
 *   green #709c4f  (Community Computer Lab)
 *   ink   #2f292b  (Keele)
 */

:root {
  --blue: #014c72;
  --blue-dark: #013a57;
  --green: #709c4f;
  --green-dark: #5a7f3f;
  --ink: #2f292b;
  --muted: #5d585a;
  --paper: #fff;
  --paper-alt: #f2f6f8;
  --line: #d9e2e7;
}


/*
 * Base
 */

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

body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
}

h1,
h2,
h3 {
  margin-top: 0;
  margin-bottom: .5em;
  font-weight: 800;
  line-height: 1.2;
  color: var(--blue);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.25rem;
}

p,
ul {
  margin-top: 0;
  margin-bottom: 1em;
}

a {
  color: var(--blue);
  text-decoration-color: var(--green);
  text-underline-offset: .15em;
}

a:hover,
a:focus {
  color: var(--green-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0;
}

figure img {
  border-radius: .5rem;
}

figcaption {
  margin-top: .5rem;
  font-size: .9375rem;
  color: var(--muted);
}

address {
  margin-bottom: 1em;
  font-style: normal;
}

@media (max-width: 40em) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.625rem;
  }
}


/*
 * Layout
 */

.container {
  width: 100%;
  max-width: 72rem;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.narrow {
  max-width: 46rem;
}

.section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.section-alt {
  background-color: var(--paper-alt);
}

.section-intro {
  max-width: 46rem;
  margin-bottom: 2rem;
  font-size: 1.125rem;
  color: var(--muted);
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 48em) {
  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}


/*
 * Header
 */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background-color: rgba(255, 255, 255, .95);
}

.site-header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-top: .75rem;
  padding-bottom: .75rem;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

.logo-keele {
  font-size: .875rem;
  font-style: italic;
  font-weight: 700;
  color: var(--ink);
}

.logo-name {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blue);
}

.logo-tagline {
  font-size: .75rem;
  color: var(--green);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}

.site-nav a {
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  text-decoration: underline;
}


/*
 * Hero
 */

.hero {
  padding-top: 3rem;
  padding-bottom: 3rem;
  background-color: var(--paper-alt);
}

.hero-inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 3rem;
  align-items: center;
}

.lead {
  font-size: 1.25rem;
}

.hero-image img {
  box-shadow: 0 1rem 2rem rgba(1, 76, 114, .15);
}

@media (max-width: 48em) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}


/*
 * Buttons
 */

.button {
  display: inline-block;
  padding: .75rem 1.25rem;
  margin-top: .5rem;
  margin-right: .5rem;
  font-weight: 800;
  color: var(--paper);
  text-decoration: none;
  border: 2px solid var(--blue);
  border-radius: 2rem;
  background-color: var(--blue);
}

.button:hover,
.button:focus {
  color: var(--paper);
  border-color: var(--blue-dark);
  background-color: var(--blue-dark);
}

.button-secondary {
  color: var(--blue);
  background-color: transparent;
}

.button-secondary:hover,
.button-secondary:focus {
  color: var(--paper);
}


/*
 * Facts strip
 */

.facts {
  padding-top: 2rem;
  padding-bottom: 2rem;
  color: var(--paper);
  background-color: var(--blue);
}

.facts-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.fact-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  color: #b9d6a3;
}

.fact-label {
  display: block;
  margin-top: .25rem;
}

@media (max-width: 48em) {
  .facts-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}


/*
 * Cards and lists
 */

.card {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: .5rem;
  background-color: var(--paper);
}

.card :last-child {
  margin-bottom: 0;
}

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

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .25rem;
}

.checklist li::before {
  position: absolute;
  top: 0;
  left: 0;
  font-weight: 800;
  color: var(--green);
  content: "✓";
}


/*
 * Photos
 */

.photo-row,
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.photo-row img,
.gallery img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}


/*
 * Quote
 */

.quote {
  max-width: 46rem;
  padding: 1.5rem 2rem;
  margin: 2.5rem auto 0;
  font-size: 1.125rem;
  border-left: 4px solid var(--green);
  border-radius: 0 .5rem .5rem 0;
  background-color: var(--paper);
}

.quote p {
  font-style: italic;
}

.quote footer {
  font-weight: 700;
  color: var(--blue);
}


/*
 * Contact
 */

.section-contact {
  text-align: center;
  background-color: var(--paper-alt);
}

.contact-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: center;
  font-size: 1.375rem;
  font-weight: 800;
}


/*
 * Footer
 */

.site-footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  font-size: .9375rem;
  color: #dbe6ec;
  background-color: var(--ink);
}

.site-footer p {
  margin-bottom: .25rem;
}

.site-footer a {
  color: var(--paper);
}
