/* Arkansas Bike Trails: all styling for every page.
   Colors, fonts and components mirror the original Divi build. */

:root {
  --forest: #1e3a2a;
  --forest-dark: #14281d;
  --forest-card: #2b4534;
  --copper: #c77b45;
  --copper-dark: #9f5d2f;
  --wood: #8a5a33;
  --wood-light: #a9744b;
  --wood-dark: #7c5232;
  --tan: #e4bd94;
  --cream: #fdfbf7;
  --paper: #f4eee3;
  --sand: #eae1d0;
  --ink: #2c2822;
  --ink-soft: #5d554a;
  --night: #24201a;
  --header: #aaddbc;

  --font-body: "Barlow", Arial, sans-serif;
  --font-head: "Barlow Condensed", Arial, sans-serif;
  --wrap: 1100px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  /* Keep the footer at the bottom on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* The hidden attribute always wins over a component's display rule */
[hidden] { display: none !important; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; }
h1, h2, h3 { font-family: var(--font-head); text-transform: uppercase; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--forest); color: var(--cream);
  padding: 10px 16px; border-radius: 4px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }

/* ---------- Eyebrow labels ---------- */

.eyebrow {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0 0 14px;
}
.on-dark .eyebrow { color: var(--tan); }
.accent { color: var(--copper); }

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

.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  padding: 0.6em 1em;
  border-radius: 5px;
  color: #fff;
  background: var(--forest);
  box-shadow: 0 3px 0 var(--forest-dark);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--forest-dark); }
.btn-copper { background: var(--copper); box-shadow: 0 3px 0 var(--copper-dark); }
.btn-copper:hover { box-shadow: 0 5px 0 var(--copper-dark); }
.btn-outline { background: transparent; box-shadow: none; border: 2px solid #fff; }
.btn-outline:hover { box-shadow: none; background: rgba(255, 255, 255, 0.08); }

.btn-row { display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: center; }
.btn-row.center { justify-content: center; }
.center { text-align: center; }

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

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 32px; min-height: 84px;
}
.logo img { width: 230px; height: auto; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 26px; }
.nav a {
  font-size: 15px; font-weight: 600; text-decoration: none;
  color: rgba(0, 0, 0, 0.65);
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--forest); }
.nav a[aria-current="page"] { color: var(--forest); border-bottom-color: var(--copper); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 8px; cursor: pointer;
  color: var(--forest);
}
.nav-toggle svg { display: block; }

@media (max-width: 860px) {
  .site-header .bar { padding: 6px 20px; min-height: 72px; }
  .logo img { width: 190px; }
  .nav-toggle { display: block; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--header);
    border-top: 3px solid var(--forest);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    display: none;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .nav a { display: block; padding: 12px 0; font-size: 17px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }
  .nav a[aria-current="page"] { border-bottom-color: rgba(0, 0, 0, 0.08); }
}

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

.section { padding: 70px 0; }
.section-paper { background: var(--paper); }
.section-cream { background: var(--cream); }
.section-sand { background: var(--sand); }
.section-forest { background: var(--forest); color: #fff; }
.raised { position: relative; z-index: 2; box-shadow: 0 12px 18px -6px rgba(0, 0, 0, 0.3); }

.h2 { font-size: 50px; font-weight: 700; margin-bottom: 26px; }
.lead { font-size: 19px; color: var(--ink-soft); }
.on-dark .lead { color: rgba(255, 255, 255, 0.75); }
.narrow { max-width: 720px; }
.narrow.center { margin-inline: auto; }

@media (max-width: 640px) {
  .section { padding: 54px 0; }
  .h2 { font-size: 40px; }
}

/* ---------- Home: hero + signpost ---------- */

.hero { padding: 70px 0 50px; background: var(--paper); }
.hero .wrap { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: center; }
.hero h1 {
  font-size: 76px; font-weight: 800; line-height: 1.05;
  color: var(--forest); margin-bottom: 36px;
}
.hero .lead { max-width: 540px; color: var(--ink); margin-bottom: 30px; }

.signpost { position: relative; padding: 1px 0 90px 46px; width: 380px; }
.signpost::before {
  content: "";
  position: absolute; left: 180px; top: 0; bottom: 0; width: 16px;
  background: linear-gradient(90deg, var(--wood-dark), var(--wood-light) 45%, var(--wood-dark));
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 4px 6px 14px rgba(36, 32, 26, 0.25);
}
.plank {
  position: relative; display: block;
  max-width: 340px; margin: 30px 0;
  padding: 16px 24px 16px 30px;
  background: linear-gradient(180deg, var(--wood-light), var(--wood-dark));
  color: #f4eee3;
  font-family: var(--font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.64;
  text-decoration: none;
  border-radius: 4px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.18), inset 0 -3px 0 rgba(0, 0, 0, 0.22), 6px 8px 18px rgba(36, 32, 26, 0.28);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 0 100%);
  /* Each sign rests at its own tilt and swivels around the post (--pivot = where the post crosses it) */
  --tilt: 0deg;
  --pivot: 142px;
  transform: rotate(var(--tilt));
  transform-origin: var(--pivot) 50%;
  transition: filter 0.15s ease;
}
.plank small { display: block; font-size: 12px; letter-spacing: 0.24em; font-weight: 600; opacity: 0.75; }
.plank span { font-size: 24px; }
.plank:hover, .plank:focus-visible { filter: brightness(1.08); animation: swivel 1.4s ease-out; }
.plank-left {
  clip-path: polygon(22px 0, 100% 0, 100% 100%, 22px 100%, 0 50%);
  padding: 16px 20px 16px 34px;
  margin-left: 24px; margin-right: 90px;
  background: linear-gradient(180deg, var(--copper), var(--copper-dark));
  --pivot: 118px;
}
.plank:nth-child(1) { --tilt: -1deg; }
.plank:nth-child(2) { --tilt: -2deg; }
.plank:nth-child(3) { --tilt: 4.5deg; }

/* Turns on the post, swings back past center, and settles: like a sign nudged on its post */
@keyframes swivel {
  0%   { transform: perspective(700px) rotateY(0deg) rotate(var(--tilt)); }
  20%  { transform: perspective(700px) rotateY(-6deg) rotate(var(--tilt)); }
  45%  { transform: perspective(700px) rotateY(3.5deg) rotate(var(--tilt)); }
  68%  { transform: perspective(700px) rotateY(-1.5deg) rotate(var(--tilt)); }
  86%  { transform: perspective(700px) rotateY(0.5deg) rotate(var(--tilt)); }
  100% { transform: perspective(700px) rotateY(0deg) rotate(var(--tilt)); }
}

@media (max-width: 1080px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero h1 { font-size: 62px; }
  .signpost { margin: 0 auto; }
}
@media (max-width: 640px) {
  .hero { padding-top: 48px; }
  .hero h1 { font-size: 46px; text-wrap: balance; }
  .signpost { width: 100%; max-width: 340px; padding-left: 0; padding-bottom: 40px; }
  .signpost::before { left: 50%; margin-left: -8px; }
  .plank { max-width: 300px; --pivot: 55%; }
  .plank-left { margin-left: 30px; margin-right: 0; --pivot: 46%; }
  .plank span { font-size: 21px; }
  .btn-row { gap: 16px; }
}

/* ---------- Home: problem cards ---------- */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5%; margin: 48px 0 56px; }
.card {
  background: var(--forest-card);
  padding: 26px;
  border: 1px solid var(--copper);
  border-top-width: 4px;
  border-radius: 8px;
}
.card h3 { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.card p { font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, 0.75); margin: 0; }
.pull {
  font-family: var(--font-head); font-weight: 700; font-size: 28px;
  letter-spacing: 1px; text-transform: uppercase; text-align: center; margin: 0;
}
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; gap: 20px; }
  .pull { font-size: 24px; }
}

/* ---------- Home: guide / about ---------- */

.about { display: grid; grid-template-columns: 396px 1fr; gap: 60px; align-items: start; }
.about img { border-radius: 6px; box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3); }
.about .h2 { color: var(--ink); }
.about p { font-size: 18px; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; gap: 36px; }
  .about img { max-width: 360px; }
}

.info-quote {
  max-width: 708px; margin: 32px auto 0;
  background: #fff; color: var(--ink);
  border-left: 5px solid #c1841f;
  border-radius: 12px;
  padding: 24px 30px;
  font-size: 18px; text-align: left;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

/* ---------- Trailhead cards (home) ---------- */

.trailheads { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; margin-top: 56px; }
.trailhead-col { display: flex; flex-direction: column; gap: 36px; align-items: center; }
.trailhead {
  width: 100%; flex: 1;
  background: var(--cream);
  border: 1px solid rgba(36, 32, 26, 0.1);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 10px 34px rgba(36, 32, 26, 0.08);
}
.trailhead-top { padding: 26px; color: var(--cream); }
.trailhead-top.riders { background: var(--forest); }
.trailhead-top.beginners { background: var(--copper); }
.trailhead-top small {
  display: block; font-family: var(--font-head); font-weight: 600;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.trailhead-top h3 { font-size: 27px; font-weight: 800; line-height: 1.05; }

.steps { list-style: none; margin: 0; padding: 30px 26px; }
.step { display: flex; gap: 18px; position: relative; padding-bottom: 26px; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 2px;
  background: repeating-linear-gradient(180deg, var(--wood) 0 6px, transparent 6px 12px);
}
.step:last-child::before { display: none; }
.step-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  background: var(--sand); border: 2px solid var(--wood);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--wood); line-height: 1;
}
.step h4 { font-size: 17px; font-weight: 700; margin: 4px 0 6px; }
.step p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) {
  .trailheads { grid-template-columns: 1fr; gap: 48px; }
}

/* ---------- Final call to action ---------- */

.final {
  padding: 70px 0;
  background: radial-gradient(ellipse at 0% 100%, rgba(138, 90, 51, 0.45), transparent 55%), var(--night);
  color: #fff; text-align: center;
}
.final.forest { background: var(--forest); }
.final .h2 { margin-bottom: 20px; }
.final .lead { max-width: 560px; margin: 0 auto 1em; }
.final .btn-row { margin-top: 44px; }

/* ---------- Beginners page ---------- */

.page-hero { padding: 70px 0 80px; text-align: center; }
.page-hero h1 { font-size: 70px; font-weight: 800; line-height: 1.05; color: var(--forest); max-width: 720px; margin: 0 auto 22px; }
.page-hero .lead { max-width: 720px; margin: 0 auto 36px; }
@media (max-width: 640px) {
  .page-hero h1 { font-size: 46px; }
}

.callout {
  margin: 0 0 22px; padding: 16px 22px;
  border-left: 4px solid var(--copper);
  background: var(--paper);
  border-radius: 0 8px 8px 0;
  font-weight: 700; font-size: 17px;
}
.section-forest-head .h2 { color: var(--forest); }

.checklist {
  list-style: none; margin: 0 auto; padding: 0; max-width: 880px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 32px; text-align: left;
}
.checklist li { display: flex; gap: 12px; font-size: 16px; line-height: 1.5; }
.checklist li::before {
  content: "\2713"; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--copper); color: #fff;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 640px) {
  .checklist { grid-template-columns: 1fr; }
}

.steps-row {
  list-style: none; margin: 0 0 44px; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; text-align: left;
}
.steps-row .step-num { width: 40px; height: 40px; font-size: 18px; margin-bottom: 14px; }
.steps-row h3 { font-family: var(--font-body); text-transform: none; font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.steps-row p { font-size: 15px; line-height: 1.55; color: var(--ink-soft); margin: 0; }
@media (max-width: 780px) {
  .steps-row { grid-template-columns: 1fr; }
}

/* ---------- Gallery page ---------- */

.gallery-hero { padding: 64px 0 48px; text-align: center; }
.gallery-hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--tan); }
.gallery-hero h1 { font-size: 44px; font-weight: 800; line-height: 1.05; margin: 12px auto 18px; max-width: 640px; }
.gallery-hero p { font-size: 17px; color: rgba(253, 251, 247, 0.8); max-width: 760px; margin: 0 auto 6px; }
.photo-count {
  display: inline-block; margin-top: 22px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--copper); color: #fff;
  padding: 7px 16px; border-radius: 999px;
}
@media (max-width: 640px) {
  .gallery-hero h1 { font-size: 32px; }
}

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px;
}
.gallery a { display: block; border-radius: 6px; overflow: hidden; background: var(--sand); }
.gallery img {
  width: 100%; aspect-ratio: 400 / 284; object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery a:hover img { transform: scale(1.04); }
.gallery-empty { text-align: center; color: var(--ink-soft); padding: 40px 0; }
.gallery:not(:empty) + .gallery-empty { display: none; }

.lightbox {
  border: 0; padding: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
.lightbox::backdrop { background: rgba(20, 18, 14, 0.94); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 56px 72px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 4px; }
.lightbox-caption { color: rgba(255, 255, 255, 0.75); font-size: 15px; margin-top: 12px; text-align: center; }
.lightbox button {
  position: absolute; background: rgba(255, 255, 255, 0.12); color: #fff;
  border: 0; border-radius: 50%; width: 48px; height: 48px;
  font-size: 26px; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-inner { padding: 64px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
}

/* ---------- 404 ---------- */

.not-found { padding: 110px 0; text-align: center; }
.not-found h1 { font-size: 64px; font-weight: 800; color: var(--forest); margin-bottom: 18px; }

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

.site-footer {
  background: var(--night); color: var(--tan);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 26px 0; text-align: center; font-size: 14px; line-height: 1.6;
}
.site-footer p { margin: 0; }
.site-footer nav { margin-bottom: 8px; }
.site-footer nav a { color: var(--tan); text-decoration: none; margin: 0 10px; opacity: 0.85; }
.site-footer nav a:hover { opacity: 1; text-decoration: underline; }
