/*
===============================================================================
   Normalization / Reset
-------------------------------------------------------------------------------
*/

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

body {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  display: block;
  margin: 0;
  padding: 0;
}

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

pre,
code {
  display: block;
  margin: 0;
}

button,
input {
  font: inherit;
  margin: 0;
  color: inherit;
  border: 0;
  outline: none;
}

input:focus {
  outline: none;
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  padding: 0;
  border: 0;
}


/*
===============================================================================
   Typography
-------------------------------------------------------------------------------
*/

@font-face {
  font-family: 'Klinic Slab';
  font-weight: 500;
  font-style: normal;
  src: url('/assets/klinicslabmedium.woff') format('woff');
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Roboto", sans-serif;
  font-size: 100%;
  font-weight: 500;
  line-height: 1.5;
  color: #657b83;
  -webkit-font-kerning: normal;
     -moz-font-feature-settings: 'frac', 'liga';
          font-feature-settings: 'frac', 'liga';
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Klinic Slab';
  font-weight: 500;
}

.title {
  font-weight: 700;
}

.alpha {
  font-size: 5rem;
  line-height: 1;
}

.beta {
  font-size: 3rem;
  line-height: 3rem;
}

.gamma {
  font-size: 2rem;
  line-height: 1.5;
}

.delta {
  font-size: 1.5rem;
  line-height: 2rem;
}

.epsilon {
  font-size: 1rem;
  line-height: 1.5rem;
}

.zeta {
  font-size: 0.75rem;
  line-height: 1.5rem;
}

p {
  margin: 0;
}

p + p {
  margin-top: 0.5rem;
}

.delta p + p {
  margin-top: 1rem;
}

code {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 16px;
  text-align: left;
}

pre > code::before, .sh > code::before {
  content: '$ ';
}

.title-wrap > a {
  text-decoration: none;
}

.title > .delta {
  padding-left: 0.5ex; /* A touch of optical alignment between H and C */
}

.title > .alpha {
  line-height: 4rem;
}

.slogan,
.summary {
  font-weight: 500;
  text-align: center;
}

.summary {
  font-family: 'Klinic Slab';
}

.summary a {
  text-decoration: none;
}

.install,
.credits {
  text-align: center;
}

.blurb > h2,
.install > h2 {
  font-weight: 500;
}

.menu > a {
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.search-item,
.search-bar,
#search-input {
  text-align: center;
}

.cask-source {
  text-align: left;
}

@media all and (max-width: 800px) {
  .blurb > h2 {
    text-align: center;
  }
}


/*
===============================================================================
    Color
-------------------------------------------------------------------------------
*/

a {
  color: #93a1a1;
}

.base-bg {
  background-color: #fdf6e3;
}

.base-copy {
  color: #657b83;
}

.darker {
  color: #586e75;
}

.lighter {
  color: #93a1a1;
}

.ale {
  color: #b58900;
}

.highlight-bg {
  background-color: #eee8d5;
}

.cyan {
  color: #2aa198;
}

code {
  color: #839496;
}

.sh {
  background-color: #073642;
}

input::-webkit-input-placeholder,
input::-moz-placeholder {
  color: #93a1a1;
}

input[type="text"]:disabled::-webkit-input-placeholder {
  color: #e6e2d0;
}

input[type="text"]:disabled::-moz-placeholder {
  color: #e6e2d0;
}


/*
===============================================================================
    Layout
-------------------------------------------------------------------------------
*/

.spacing {
  margin-top: 1.5rem;
}

body > .spacing:first-child {
  margin-top: 0.75rem;
}

body > .spacing:last-child {
  margin-top: 3rem;
}

.column-main {
  max-width: 60rem;
  margin-right: auto;
  margin-left: auto;
}

.column-secondary {
  max-width: 40rem;
}

.title-wrap {
  display: -webkit-flex;
  display:         flex;
  -webkit-justify-content: center;
          justify-content: center;
}

header > h1 {
  display: inline-block;
}

.slogan {
  padding-bottom: 0.125rem;
}

.intro {
  margin-top: 1.5rem;
}

.summary {
  max-width: 86ex;
  margin: 0 auto;
  padding: 1.5rem;
}

.overview {
  margin-top: 4.5rem;
}

section {
  margin: 3rem auto;
}

.flex-column {
  display: -webkit-flex;
  display:         flex;
  -webkit-justify-content: space-between;
          justify-content: space-between;
  -webkit-align-content: flex-start;
          align-content: flex-start;
  -webkit-align-items: flex-start;
          align-items: flex-start;
}

.blurb,
.sh {
  width: 48%;
}

.sh {
  position: relative;
  margin-top: 0.8rem;
  margin-bottom: 0.2rem;
  padding: 1rem;
}

.sh-copy-btn {
  position: absolute;
  right: 16px;
  top: 16px;
  height: 32px;
  cursor: pointer;
  text-decoration: none;
  background-color: #fdf6e3;
  border: 1px solid #eee8d5;
  border-radius: 2px;
}

.sh-copy-btn:hover {
  background-color: #eee8d5;
}

.svg-clippy {
  position: relative;
  top: -3px;
  right: -2px;
  width: 18px;
  height: 20px;
  fill: #586e75;
}

.install {
  padding: 1.5rem 0 3rem 0;
}

.install > .sh {
  width: 80ex;
  margin: 0.5rem auto 0 auto;
}

.menu {
  display: -webkit-flex;
  display:         flex;
  margin: 3rem auto;
  -webkit-justify-content: space-around;
          justify-content: space-around;
  -webkit-align-content: center;
          align-content: center;
  -webkit-align-items: center;
          align-items: center;
}

.menu > a {
  display: block;
}

.menu > .textual {
  line-height: 3rem;
  width: 6rem;
  height: 3rem;
}

.octocat {
  width: 4.5rem;
}

.credits {
  padding: 0.75rem;
  border-top: 2px solid #eee8d5;
}

.off-canvas {
  position: absolute;
  width: 100%;
  margin-left: -120%;
  top: 0;
}

.pages-wrap {
  position: relative;
}

.search-item {
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
}

.search-item > .command {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease 0.2s;
}

.command > .sh {
  width: 100%;
}

.command > .cask-source {
  float: left;
  margin-left: 1rem;
}

.search-item:hover > .command {
  max-height: 7.5rem;
}

#search-input {
  padding: 0.75rem;
}

.no-basis {
  margin-right: auto;
  margin-left: auto;
  -webkit-flex-basis: auto;
  flex-basis: auto;
  -webkit-justify-content: center;
  justify-content: center;
}

#search-view.flex-column {
  -webkit-flex-wrap: wrap;
          flex-wrap: wrap;
}

@media all and (max-width: 1024px) {
  .column-main {
    max-width: 92%;
  }
}

@media all and (max-width: 800px) {
  .overview {
    margin-top: 3rem;
  }

  section {
    margin: 1.5rem auto;
  }

  .flex-column {
    -webkit-flex-wrap: wrap;
            flex-wrap: wrap;
  }

  .sh,
  .blurb,
  .search-item {
    -webkit-flex-basis: 100%;
            flex-basis: 100%;
  }

  .flex-column > .sh {
    margin-top: 1rem;
    margin-bottom: 0;
    order: 2;
  }

  .blurb {
    margin-top: 0.5rem;
    order: 1;
  }

  .install {
    margin-top: 3rem;
  }

  .install > .sh {
    max-width: 92%;
  }
}


/*
===============================================================================
    Fancification
-------------------------------------------------------------------------------
*/

#search-page,
#landing-page {
  transition: margin 0.5s;
}

.sh,
.intro,
.install,
.menu > .textual,
.search-item {
  border-radius: 2px;
}

.menu > a {
  transition: all 0.4s;
}

.menu > .textual {
  border: 1px solid #eee8d5;
}

.github {
  border-radius: 50%;
}

.menu > a:hover {
  background-color: #eee8d5;
  color: #586e75;
}

input.highlight-bg {
  background-color: rgba(238, 232, 213, 0.3);
}
