/* Castle Hill Corker page: its own look, carried over from the old site
   (styles/corker.css and the parts of Bootstrap 3 it used). Sponsors and the
   staff notice and edit link are in race-page.css. */

/* Base ---------------------------------------------------------------------- */

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

html, body { width: 100%; height: 100%; }
html { font-size: 10px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: "Alegreya Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
  color: #000;
  background: #fff;
}

h1, h2, h3, h4, h5, h6, .h3 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; }
h1, h2, h3, .h3 { margin-top: 20px; margin-bottom: 10px; }
h4, h5, h6 { margin-top: 10px; margin-bottom: 10px; }
h1 { font-size: 36px; font-family: "Frijole", cursive; margin-bottom: 25px; text-align: center; }
h2 { font-size: 30px; font-weight: bold; border-bottom: 1px solid; }
h3, .h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }

p { margin: 0 0 10px; }
ul, ol { margin-top: 0; margin-bottom: 10px; }
img { vertical-align: middle; border: 0; }
iframe { border: 0; }
table { border-collapse: collapse; border-spacing: 0; }
th { text-align: left; }
/* The race details table's label column (the old content set this inline; the site's HTML cleaner drops inline styles) */
#about th[scope="row"] { width: 125px; }
td, th { padding: 0; }

a, a:focus, a:hover, a:active { color: inherit; text-decoration: underline; }

section { display: block; padding: 20px 0; background: #fff; }

.text-center { text-align: center; }

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

/* Layout (Bootstrap's container and single-column grid) -------------------- */

.container { margin: 0 auto; padding: 0 15px; }
.container::after { content: ""; display: table; clear: both; }

@media (min-width: 768px) { .container { width: 750px; } }
@media (min-width: 992px) { .container { width: 970px; } }
@media (min-width: 1200px) { .container { width: 1170px; } }

/* Buttons ------------------------------------------------------------------ */

.btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  line-height: 1.42857143;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  border: 1px solid transparent;
  border-radius: 4px;
}
.btn:hover, .btn:focus { color: #333; text-decoration: none; }
.btn-lg { padding: 10px 16px; font-size: 18px; line-height: 1.3333333; border-radius: 6px; }

.btn-dark { border-radius: 0; color: #ccc; background-color: #222; }
.btn-dark:hover, .btn-dark:focus, .btn-dark:active { color: #fff; }

/* Side menu ---------------------------------------------------------------- */

#menu-toggle {
  z-index: 1;
  position: fixed;
  top: 0;
  right: 0;
  color: white;
  background: rgba(0, 0, 0, 0.52);
  border-radius: 0;
}

.toggle { margin: 5px 5px 0 0; }
.toggle svg { width: 1em; height: 1em; vertical-align: -0.125em; }

#sidebar-wrapper {
  z-index: 1000;
  position: fixed;
  right: 0;
  width: 250px;
  height: 100%;
  margin-right: -250px;
  overflow-y: auto;
  transition: all 0.4s ease 0s;
  background: #fff;
  border-left: 1px solid black;
}
#sidebar-wrapper.active { right: 250px; }

.sidebar-nav { position: absolute; top: 0; width: 250px; margin: 0; padding: 0; list-style: none; }
.sidebar-nav li { text-indent: 20px; line-height: 40px; border-bottom: 1px solid #acacac; }
.sidebar-nav li a { display: block; text-decoration: none; color: #222; }
.sidebar-nav li a:hover { text-decoration: none; color: #000; background: rgba(0, 0, 0, 0.2); }
.sidebar-nav li a:active, .sidebar-nav li a:focus { text-decoration: none; }
.sidebar-nav .toggle { background: none; }

.sidebar-nav > .sidebar-brand { height: 55px; font-size: 18px; line-height: 55px; }
.sidebar-nav > .sidebar-brand a { color: #999; }
.sidebar-nav > .sidebar-brand a:hover { color: #222; background: none; }

.sidebar-nav li.sidebar-close { border-bottom: none; text-indent: 0; line-height: normal; }
.sidebar-nav li.sidebar-close a { float: right; }
.sidebar-nav li.sidebar-close a, .sidebar-nav li.sidebar-close a:hover { display: inline-block; color: #ccc; background: none; }
.sidebar-nav li.sidebar-close::after { content: ""; display: table; clear: both; }

/* Header and intro animation ------------------------------------------------ */

.header {
  display: table;
  position: relative;
  width: 100%;
  height: 100%;
  background: url("/images/corker-bg.jpg") no-repeat center center scroll black;
  background-size: cover;
}

.text-vertical-center {
  position: relative;
  display: table-cell;
  text-align: center;
  vertical-align: middle;
  background-color: #000;
  color: rgba(0, 0, 0, 0);
  /* Intro runs on page render; corker.js adds .show-bg for the final state */
  animation: corker-bg-fade 1s ease-in both, corker-text-fade 1s ease-in 1s both;
}
header.show-bg .text-vertical-center { background-color: rgba(0, 0, 0, 0); color: white; }

.text-vertical-center h1 {
  margin: 0;
  padding: 0;
  font-size: 1em;
  animation: corker-title-zoom 1s ease-out 1s both;
}
header.show-bg .text-vertical-center h1 { font-size: 3em; }

#title-1 { font-size: 0.8em; display: block; }

.text-vertical-bottom {
  position: absolute;
  bottom: 20px;
  left: -2000px;
  width: 100%;
  text-align: center;
  animation: corker-buttons-in 0.5s ease-out 2s both;
}
header.show-bg .text-vertical-bottom { left: 0; }

header a.btn {
  width: 200px;
  font-weight: bold;
  text-transform: uppercase;
  margin: 10px 20px;
  border: solid 2px #a4a3a3;
  color: #fff;
  font-size: 1.5em;
  text-decoration: none;
}
header a.btn:focus, header a.btn:active, header a.btn:hover { color: white; }
header a.btn:hover { text-shadow: 0 0 36px #9691df; }
header a.btn.enter-now { display: block; margin: 0 auto; }

@keyframes corker-bg-fade { from { background-color: #000; } to { background-color: rgba(0, 0, 0, 0); } }
@keyframes corker-text-fade { from { color: rgba(0, 0, 0, 0); } to { color: white; } }
@keyframes corker-title-zoom { from { font-size: 1em; } to { font-size: 3em; } }
@keyframes corker-title-zoom-lg { from { font-size: 1em; } to { font-size: 8em; } }
@keyframes corker-buttons-in { from { left: -2000px; } to { left: 0; } }

@media (min-width: 768px) {
  header.show-bg .text-vertical-center h1 { font-size: 8em; }
  .text-vertical-center h1 { animation-name: corker-title-zoom-lg; }
  header a.btn.enter-now { display: inline-block; }
}

/* Sections ----------------------------------------------------------------- */

/* Fixed photo shown through the gap between the race details and the route map */
#bg-image {
  position: fixed;
  z-index: -1;
  width: 100%;
  height: 100%;
  background: url("/images/chills.jpg") no-repeat center center scroll;
  background-image: image-set(url("/images/chills.webp") type("image/webp"), url("/images/chills.jpg") type("image/jpeg"));
  background-size: cover;
}
section#empty { background: none; height: 300px; }

section#route-map, section#previous { background: #495449; color: white; }

.sponsors-band { background: white; }

h2.section-title {
  font-family: "Frijole", cursive;
  font-size: 36px;
  font-weight: 500;
  margin-bottom: 25px;
  text-align: center;
  border-bottom: none;
}
@media (min-width: 768px) {
  h2.section-title { font-size: 4em; }
}

h3.year { font-size: 30px; border-bottom: 1px solid; font-weight: bold; }
.prev-block { margin-bottom: 10px; }

/* Footers ------------------------------------------------------------------ */

footer { padding: 20px 0; background: white; }
.partner-logos { display: flex; justify-content: space-between; align-items: center; }
.partner-logos .hospice { width: 180px; background: white; }
@media (min-width: 1200px) {
  .partner-logos { margin: 0 97px; } /* the old col-lg-10 col-lg-offset-1 */
}

footer#final-footer { background: #222; color: white; padding: 8px 0; text-transform: uppercase; }
