/* Styles for the static blog pages built by scripts/build-blog.js.
   The header and footer copy the look of src/components/Navigation.vue and
   Footer.vue; the colours are the ones in src/assets/scss/_variables.scss. */

:root {
  --yellow: #ff9d00;
  --darkgrey: #707070;
  --lightgrey: #ededed;
  --text: #222;
  --muted: #707070;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #fff;
  color: var(--text);
  font-family: 'proxima-nova', 'Open Sans', 'Gill Sans MT', 'Gill Sans', Corbel, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #000;
}

a:hover {
  opacity: 0.8;
}

/* Header ------------------------------------------------------------------ */

.site-navigation {
  border-top: 1em var(--yellow) solid;
  padding: 50px 5%;
}

.navigation-content {
  max-width: 2000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.site-navigation .logo {
  display: block;
  height: 65px;
  width: auto;
}

.site-navigation .links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-navigation .link {
  font-weight: 600;
  text-decoration: none;
}

.site-navigation .button {
  background: #000;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 15px;
}

/* On phones the text links live in the footer only, as in the app */
@media (max-width: 500px) {
  .site-navigation .link {
    display: none;
  }
}

@media (max-width: 900px) {
  .site-navigation {
    padding: 30px 3%;
  }

  .site-navigation .logo {
    height: 35px;
  }

  .site-navigation .links {
    gap: 14px;
    font-size: 15px;
  }

  .site-navigation .button {
    padding: 10px;
  }
}

/* Articles ---------------------------------------------------------------- */

.blog {
  padding: 0 16px 80px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
}

.post-body h1 {
  font-size: 2.4em;
  line-height: 1.15;
  margin: 0.25em 0 0.75em;
}

.post-body h2 {
  font-size: 1.5em;
  line-height: 1.25;
  margin: 1.5em 0 0.5em;
}

.post-body h3 {
  font-size: 1.2em;
  margin: 1.25em 0 0.5em;
}

.post-body img {
  margin: 1.75rem 0;
  border-radius: 2px;
}

.post-body blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 4px solid var(--yellow);
  color: var(--muted);
  font-style: italic;
}

.post-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.post-cta {
  margin-top: 3em;
  padding: 20px 24px;
  background: var(--lightgrey);
  border-left: 6px solid var(--yellow);
}

.post-cta p {
  margin: 0;
}

/* Blog index -------------------------------------------------------------- */

.post-list {
  list-style: none;
  padding: 0;
}

.post-list-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--lightgrey);
}

.post-list-item h2 {
  margin: 0.25rem 0;
}

.post-list-item h2 a {
  text-decoration: none;
}

.post-list-item.has-thumb {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.post-list-text {
  flex: 1;
  min-width: 0;
}

.post-thumb {
  flex: none;
  width: 160px;
  aspect-ratio: 4 / 3;
  margin-top: 0.35rem;
}

.post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .post-body h1 {
    font-size: 1.8em;
  }

  .post-list-item.has-thumb {
    gap: 1rem;
  }

  .post-thumb {
    width: 96px;
  }
}

/* Footer ------------------------------------------------------------------ */

.site-footer {
  color: #fff;
  background-color: var(--darkgrey);
  border-top: 1em var(--yellow) solid;
  padding: 20px 16px;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 50px;
}

.site-footer .logo {
  height: 35px;
  width: auto;
}

.site-footer .links {
  margin-top: 65px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}

.site-footer a {
  color: #fff;
}

.site-footer .credits {
  margin-top: 50px;
  font-size: 15px;
}
