/* Peter Adams - static site styles.
   Recreates the original Bootstrap 4 look (cards, navbar) without Bootstrap,
   jQuery or any external requests. Fonts are self-hosted. */

/* Oswald (SIL Open Font License) */
@font-face { font-family: "Oswald"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/oswald-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/oswald-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/oswald-latin-500-normal.woff2") format("woff2"); }

:root {
  --dark-red: #891536;
  --medium-red: #AD5B72;
  --light-red: #DCB9C3;
  --bg: #f8f9fa;
  --text: #212529;
  --grey: gray;
  --border: rgba(0, 0, 0, .125);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

p, h1, h2, h3, h4, h5, li, label, th, td, button, address {
  font-family: "Oswald", sans-serif;
}

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

a { color: var(--grey); text-decoration: none; }
a:hover { color: #565656; text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--medium-red);
  outline-offset: 2px;
}

.skip { position: absolute; left: -999px; top: 0; background: var(--dark-red); color: #fff; padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 15px; }

/* Navbar */
.navbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: .5rem 0; }
.navbar-brand { display: inline-block; padding: .3125rem 0; margin-right: 1rem; }
.navbar-brand img { display: block; width: 200px; height: auto; }
.navbar { position: relative; }
.nav-menu { margin-left: auto; }

/* Hamburger button: a <details> summary, so it works with no JavaScript */
.navbar-toggler {
  display: block; list-style: none; cursor: pointer;
  padding: .25rem .75rem; line-height: 1; font-size: 1.25rem;
  border: 1px solid rgba(0, 0, 0, .1); border-radius: .25rem; background: transparent;
}
.navbar-toggler::-webkit-details-marker { display: none; }
.navbar-toggler:hover { border-color: rgba(0, 0, 0, .25); }
.navbar-toggler-icon {
  display: block; width: 1.5em; height: 1.5em;
  background:
    linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)) 0 20% / 100% 2px no-repeat,
    linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)) 0 50% / 100% 2px no-repeat,
    linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)) 0 80% / 100% 2px no-repeat;
}
.nav {
  position: absolute; z-index: 20; top: 100%; right: 1rem; min-width: 15rem;
  display: flex; flex-direction: column; margin: .25rem 0 0; padding: .5rem 0; list-style: none;
  background: #fff; border: 1px solid var(--border); border-radius: .25rem;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
.nav a { display: block; padding: .5rem 1.25rem; color: var(--grey); font-family: "Oswald", sans-serif; }
.nav a:hover { color: #565656; background: #f1f1f1; text-decoration: none; }
.nav a[aria-current="page"] { color: #333; }

/* Promo banner: the one panel that changes regularly */
.promo {
  background: var(--dark-red); color: #fff; text-align: center;
  margin: 0 0 .5rem; padding: 1.25em 2.375em;
  font-family: "Oswald", sans-serif; font-weight: 500; font-size: 1.5rem; line-height: 1.2;
}
.spacer-10 { height: 10px; }
.spacer-20 { height: 20px; }

/* Cards */
.card-deck { display: flex; flex-direction: column; margin: 0; }
.card-deck .card { margin-bottom: 15px; }
@media (min-width: 576px) {
  .card-deck { flex-flow: row wrap; margin-left: -15px; margin-right: -15px; }
  .card-deck .card { flex: 1 0 0%; margin: 0 15px 15px; min-width: 0; }
}

.card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid var(--border); border-radius: .25rem; overflow: hidden; }
.card-img-top { width: 100%; height: auto; }
.card-header { margin: 0; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); font-size: 1.25rem; font-weight: 500; line-height: 1.2; }
.card-body { flex: 1 1 auto; padding: 1.25rem; }
.card-title { margin: 0 0 .75rem; font-size: 1.25rem; font-weight: 500; line-height: 1.2; }
.card-text { margin: 0 0 1rem; }
.card-text:last-child { margin-bottom: 0; }

.pa-boxdarkred { background: var(--dark-red); color: #fff; }
.pa-boxmediumred { background: var(--medium-red); color: #fff; }
.pa-boxlightred { background: var(--light-red); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Details table with icons */
.table-borderless { width: 100%; border-collapse: collapse; margin: 0; }
.table-borderless td { padding: .75rem; vertical-align: top; border: 0; }
.table-borderless td:first-child { width: 1%; white-space: nowrap; padding-right: .25rem; }
.table-borderless svg { width: 1.25rem; height: 1.25rem; display: block; fill: none; stroke: #444; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: .15rem; }

/* Brands */
.row-brands { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 1rem 2rem; }
.row-brands > div { text-align: center; padding: .5rem 0; }

/* Light grey note under the cards */
.note { background: #eee; color: #313131; padding: 1.25em 2.375em; margin: 0 0 1rem; }
.note p { margin: 0; }
.note p + p { margin-top: 1rem; }
.note a { color: #313131; text-decoration: underline; }

/* Content pages */
.page { padding-top: 2rem; padding-bottom: 1rem; }
.page .content { max-width: 900px; }
.page h1 { font-size: 2rem; font-weight: 500; margin: 0 0 1rem; line-height: 1.2; }
.page h3 { font-size: 1.75rem; font-weight: 500; margin: 2rem 0 .5rem; line-height: 1.2; }
.page h4 { font-size: 1.5rem; font-weight: 500; margin: 1.75rem 0 .5rem; line-height: 1.2; }
.page p, .page ul { margin: 0 0 1rem; }
.page address { font-style: normal; margin: 0 0 1rem; }
.page li { margin-bottom: .25rem; }

/* Buttons */
.btn {
  display: inline-block; background: var(--dark-red); color: #fff;
  padding: .5rem 1.25rem; border: 0; border-radius: .25rem;
  font: 400 1rem/1.5 "Oswald", sans-serif; letter-spacing: .02em; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #6d1029; color: #fff; text-decoration: none; }

/* Contact form */
form.contact { display: grid; gap: 1rem; margin-top: 1.5rem; max-width: 700px; }
form.contact label { display: block; margin-bottom: .35rem; font-weight: 500; }
form.contact .row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { form.contact .row { grid-template-columns: 1fr 1fr; } }
form.contact input[type="text"], form.contact input[type="email"], form.contact input[type="tel"], form.contact textarea {
  width: 100%; padding: .5rem .75rem; font: 400 1rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: #495057;
  background: #fff; border: 1px solid #ced4da; border-radius: .25rem;
}
form.contact textarea { min-height: 170px; resize: vertical; }
.req { color: #a12525; }
.hint { color: #6c757d; font-size: .95rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* spam trap, hidden from people */

/* Footer */
#site-footer { padding: 2rem 0 2.5rem; }
#site-footer p { margin: 0; font-weight: 300; }

@media print {
  .nav, #site-footer, .btn, .skip { display: none; }
  body { background: #fff; }
}
