@import url(reset.css);

:root {
  --brown-bark: #6C3F26;
  --toffee-brown: #975935;
  --floral-white: #FAFAEA;
  --bright-gold: #FED920;
  --saffron: #EBB912;
  --baseline-font: 'Space Grotesk', 'Segoe UI', Roboto, Arial, sans-serif;
  --serif-font: 'Bricolage Grotesque', sans-serif;
}

html, body {
  font-family: var(--baseline-font);
}

/*
AUTO GRID
Set the minimum item size with `--auto-grid-min-size` and you'll
get a fully responsive grid with no media queries.
*/
.auto-grid {
--auto-grid-min-size: 16rem;
display: grid;
grid-template-columns: 1fr;
grid-gap: 1rem;
}

@media (min-width: 40rem) {
  .auto-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .auto-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/*
WRAPPER
A utility with a max width that contains child elements and horizontal centers them
*/
.wrapper {
max-width: 65rem;
margin: 0 auto;
padding: 0 1rem;
}


/* Presentational styles */

body {
background: var(--floral-white);
color: var(--brown-bark);
margin: 0;
padding: 0;
line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brown-bark);
  color: var(--floral-white);
  padding: 0.75rem 1rem;
  z-index: 1000;
  border-radius: 0 0 0.35rem 0;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 0;
  outline: 3px solid var(--bright-gold);
  outline-offset: 2px;
}

body > header {
text-align: center;
margin: 1rem 0 0;
padding-bottom: 1rem;
}

.site-title {
margin: 1rem 0 0;
display: flex;
justify-content: center;
align-items: center;
}

.site-logo {
display: block;
width: min(18rem, 70vw);
max-width: 100%;
height: auto;
object-fit: contain;
}

@media (max-width: 40rem) {
  .site-logo {
    width: min(15rem, 82vw);
  }
}

@media (max-width: 24rem) {
  .site-logo {
    width: min(12rem, 88vw);
  }
}

nav {
line-height: 2rem;
padding: 0.5rem 0 0;
margin: 1rem 0 1.5rem;
}

.intro-text {
margin: 2rem auto;
}

@media (prefers-reduced-motion: reduce) {
  .auto-grid li {
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
    background-image: none !important;
  }
}

/* navigation */
nav {
  line-height: 2rem;
  padding: 1rem 0;
  margin: 0.75rem 0 1.5rem;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  list-style: none;
  margin: 0 auto;
  padding: 0;
}

body > header + nav {
  margin-top: 1.5rem !important;
}

nav ul li {
  display: inline-flex;
  padding: 0;
  font-size: 1rem;
}

nav ul li button {
  color: var(--brown-bark);
  border: 1px solid rgba(108,63,38,0.35);
  border-radius: 0.35rem;
  background: rgba(255,255,255,0.9);
  padding: 0.15rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

nav ul li button.active,
nav ul li button:hover,
nav ul li button:focus {
  color: var(--brown-bark);
  background: rgba(108,63,38,0.12);
  border-color: var(--brown-bark);
  transform: translateY(-1px);
}

nav ul li button:focus,
nav ul li button:focus-visible {
  outline: 3px solid var(--bright-gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--floral-white);
}

.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 40rem) {
  nav ul li button {
    padding: 0.55rem 0.85rem;
    font-size: 1rem;
  }
}

/* -------------------------------------------------------- */
/* @group =LINKS (#) */
/* -------------------------------------------------------- */

a,
button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.12);
}

a:focus,
a:focus-visible,
button:focus,
button:focus-visible {
  outline: 3px solid var(--bright-gold);
  outline-offset: 2px;
}

a {
  display: inline-block;
  position: relative;
  color: var(--brown-bark);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
  padding: 0 6px;
}
a:before, a:after {
  will-change: transform;
  content: "";
  display: block; 
  position: absolute;
  z-index: -1;
}
a:before {
  transition: 100ms ease-out 50ms;
  transform-origin: 0 24px;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: rgba(108,63,38,.18);
}
a:after {
  transition: 50ms ease-out;
  transform: scaleX(0);
  transform-origin: left center;
  bottom: 2px;
  right: -12px;
}
a:hover:before {
  transition: 100ms ease-out;
  height: 100%;
  background: rgba(108,63,38,.18);
}
a:hover:after {
  transition: 50ms ease-out 100ms;
  transform: none;
}
a:active:before {
  transition: 100ms ease-in;
  background: rgba(108,63,38,.35);
}
a:active:after {
  transition: 100ms ease-in;
  border-left-color: rgba(108,63,38,.35);
}

/* @end */

section ol {
margin: 2em auto;
line-height: 1.56;
}

/* list-items */
ol {
list-style-type: none;
padding: 0;
}

.auto-grid li {
  /*padding: 1.75rem 0.75rem;*/
  text-align: left;
  background-color: rgba(254,217,32,0.92);
  color: var(--brown-bark);
  position: relative;
  overflow: visible;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  box-shadow: 0 6px 18px rgba(108,63,38,0.16);
  border: 1px solid transparent;
  border-radius: 12px;
}

.auto-grid li:hover,
.auto-grid li:focus-within {
  border-color: var(--brown-bark);
  box-shadow: 0 8px 20px rgba(108,63,38,0.18);
  background-color: rgba(254,217,32,1);
}

.auto-grid li:active {
  border-color: var(--toffee-brown);
  box-shadow: 0 6px 16px rgba(108,63,38,0.16);
}

@media (hover: none) {
  .auto-grid li:hover {
    border-color: var(--brown-bark);
  }

  .auto-grid li:active {
    border-color: var(--toffee-brown);
  }
}

/* Semantic route item styles (article-based content) */
.auto-grid li article {
  padding: 1.4rem 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: auto;
  box-sizing: border-box;
  text-align: left;
  line-height: 1.2;
}

.auto-grid li article header {
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
}

.hill-route-section .auto-grid li article header::before,
.road-route-section .auto-grid li article header::before,
.trail-route-section .auto-grid li article header::before {
  display: block;
  width: 2.4rem;
  height: 2.4rem;
  line-height: 2.4rem;
  text-align: center;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px rgba(108, 63, 38, 0.12);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1rem;
  color: var(--brown-bark);
}

.hill-route-section .auto-grid li article header::before {
  content: "\e52f";
}

.hill-route-section .auto-grid li article.route-icon-bridge header::before {
  content: "\e4c8";
}

.hill-route-section .auto-grid li article.route-icon-skiing header::before {
  content: "\f7c9";
}

.road-route-section .auto-grid li article header::before {
  content: "\f018";
}

.road-route-section .auto-grid li article.route-icon-love header::before {
  content: "\f004";
}

.road-route-section .auto-grid li article.route-icon-hate header::before {
  content: "\f54c";
}

.road-route-section .auto-grid li article.route-icon-donut header::before {
  content: "\f563";
}

.road-route-section .auto-grid li article.route-icon-kevlar header::before {
  content: "\e085";
}

.road-route-section .auto-grid li article.route-icon-beer header::before {
  content: "\f0fc";
}

.road-route-section .auto-grid li article.route-icon-shortcut header::before {
  content: "\f052";
}

.trail-route-section .auto-grid li article header::before {
  content: "\f1bb";
}

.hill-route-section .auto-grid li article.route-icon-bridge:hover header::before,
.hill-route-section .auto-grid li article.route-icon-skiing:hover header::before,
.road-route-section .auto-grid li article.route-icon-love:hover header::before,
.road-route-section .auto-grid li article.route-icon-hate:hover header::before,
.road-route-section .auto-grid li article.route-icon-donut:hover header::before,
.road-route-section .auto-grid li article.route-icon-kevlar:hover header::before,
.road-route-section .auto-grid li article.route-icon-beer:hover header::before,
.road-route-section .auto-grid li article.route-icon-shortcut:hover header::before {
    color: #e71d36;
}

.auto-grid li article h3 {
  margin: 0 0 0.125rem 0;
  font-size: 1rem; /* 16 / 16 = 1rem */
  line-height: 1.08;
  color: var(--brown-bark);
}

.auto-grid li .trailhead,
.auto-grid li .distance {
  font-size: 0.875rem; /* 14 / 16 = 0.875rem */
  opacity: 0.95;
  margin: 0;
}

.auto-grid li article p,
.auto-grid li article .trailhead,
.auto-grid li article .distance {
  margin: 0;
}

.auto-grid li .links,
.auto-grid li .gpx-list {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 1rem 0 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

/* Make links readable on the blue cards */
.auto-grid li a {
  color: var(--brown-bark);
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(108,63,38,0.45);
  border-radius: 0.35rem;
  background: rgba(255,255,255,0.85);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease, transform 180ms ease;
}

.auto-grid li a:before,
.auto-grid li a:after {
  display: none;
}

.auto-grid li a:hover,
.auto-grid li a:focus {
  color: var(--brown-bark);
  background: rgba(255,255,255,1);
  border-color: var(--brown-bark);
  transform: translateY(-1px);
}

.back-to-top {
  margin: 1rem 0 0;
  text-align: right;
}

.back-to-top a {
  font-size: 0.95rem;
}

footer {
clear: both;
text-align: center;
}

footer p {
padding: 1em 0;
}

/* Typography */


body {
font-family: var(--baseline-font);
font-weight: 400;
font-style: normal;
/* font-size: calc(14px + (26 - 14) * ((100vw - 300px) / (1600 - 300))); */
}

h1, h2, h3, h4, h5, h6 {
font-family: var(--serif-font);
}

.serif {
font-family: var(--serif-font);
font-weight: 400;
font-style: italic;
}

html {
font-size: 1rem; /* 16 / 16 = 1rem */
line-height: 1.2em;
}

@media screen and (min-width: 20rem) {
html {
    font-size: calc(1rem + 0.5 * ((100vw - 20rem) / 60));
    line-height: calc(1.2em + 0.6 * ((100vw - 20em) / 60));
  }
}

@media screen and (min-width: 80rem) {
html {
    font-size: 1.375rem;
    line-height: 1.8em;
  }
}

h1, h2, h3, h4, h5, h6, p, ul, ol {
  margin-top: 0;
  margin-bottom: 1rem;
}

h1, h2, h3, h4, h5, h6 {
line-height: 1.1;
}

section h2 {
margin: 1em auto;
font-weight: 900;
}


h1 { font-size: 13vmin }

h2 { 
font-size: calc(1rem + 5vmin);
/*
font-size: calc(0.5rem + 2.5vmin)
(0.5 × 16) + (320 × 0.025) = 8 + 8 = 16px
*/
}

p,
li {
font-size: 2.0vh;
}


