/* Run, Ride, & Rumble site styles.
   Colors: RRR 2027 palette (RRR-2027-Colors-1.pdf). Each color takes the role
   of the 2026 color it replaced in the logo: blue -> forest green,
   cream -> sage, orange -> peach, yellow -> yellow. Cream is kept as the
   light neutral for text and light sections, so the dark sections stay crisp. */

:root {
  --forest: #2b5134;  /* PMS 350C: dark accent, main text */
  --sage: #a9c27f;    /* PMS 577C: light accent, page background */
  --peach: #ff9e6d;   /* PMS 163C: accent */
  --yellow: #ffc844;  /* PMS 1225C: highlight */
  --cream: #f7ead9;   /* not in the 2027 sheet: the light "paper" color for text and light sections */
  --white: #fff;

  --font-heading: "Archivo Black", system-ui, sans-serif;
  /* Live site uses Proxima Nova (Adobe Fonts). Figtree is a close free match. */
  --font-body: "Figtree", "proxima-nova", system-ui, sans-serif;

  --gutter: 4vw;
  --max-width: 1800px;
}

/* Type scale: same sizes and fluid formula Squarespace uses. */
:root { --scale: 1.2vw; }
@media (max-width: 767px) { :root { --scale: calc(.012 * min(100vh, 900px)); } }
h1 { --size: 9.4; }
h2 { --size: 5; }
h3 { --size: 2.2; }
h4 { --size: 1.6; }
p, li, .b-text, .form { --size: 1.2; }
.sqsrte-large { --size: 1.5; }
.sqsrte-small { --size: 1; }
h1, h2, h3, h4, p, li, .sqsrte-large, .sqsrte-small {
  font-size: min(calc((var(--size) - 1) * var(--scale) + 1rem),
                 max(calc((var(--size) - 1) * .012 * var(--max-width) + 1rem), calc(var(--size) * 1rem)));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.8;
  background: var(--cream);
  color: var(--forest);
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 .5em;
}
h1 { line-height: calc(1.4 * (1 + (1 - 9.4) / 25)); }
h2 { line-height: calc(1.4 * (1 + (1 - 5) / 25)); }
p, ul, ol { margin: 0 0 1em; }
.b-text > :last-child { margin-bottom: 0; }
a { color: var(--link); }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.ta-justify { text-align: justify; }
hr { border: 0; border-top: 1px solid currentColor; opacity: .5; margin: 1.5rem 0; }
pre { white-space: pre-wrap; font: inherit; }

/* ---------- Section themes (match Squarespace theme names) ---------- */
/* Peach and yellow are only readable on forest green, so on sage and peach
   backgrounds the accent text falls back to forest. */
.theme-white, .theme-light, .theme-white-bold, .theme-light-bold {
  --bg: var(--cream); --text: var(--forest); --heading: var(--forest); --link: var(--forest);
  --accent: var(--forest); --btn-bg: var(--forest); --btn-text: var(--peach);
}
.theme-bright {
  --bg: var(--peach); --text: var(--forest); --heading: var(--forest); --link: var(--forest);
  --accent: var(--forest); --btn-bg: var(--forest); --btn-text: var(--peach);
}
.theme-bright-inverse {
  --bg: var(--cream); --text: var(--forest); --heading: var(--forest); --link: var(--forest);
  --accent: var(--forest); --btn-bg: var(--peach); --btn-text: var(--forest);
}
.theme-dark, .theme-black, .theme-dark-bold, .theme-black-bold {
  --bg: var(--forest); --text: var(--cream); --heading: var(--cream); --link: var(--peach);
  --accent: var(--peach); --btn-bg: var(--peach); --btn-text: var(--forest);
}
.theme-dark-bold, .theme-black-bold { --heading: var(--peach); }

[class*="theme-"] { background: var(--bg); color: var(--text); }
[class*="theme-"] :is(h1, h2, h3, h4) { color: var(--heading); }
.sqsrte-text-color--accent { color: var(--accent); }
.sqsrte-text-color--lightAccent, .sqsrte-text-color--white { color: var(--cream); }
.sqsrte-text-color--darkAccent, .sqsrte-text-color--black { color: var(--forest); }

/* ---------- Announcement bar + header ---------- */
.announce {
  position: relative;
  background: var(--cream);
  color: var(--forest);
  text-align: center;
  padding: .8rem 3rem;
  font-size: 1rem;
}
.announce p { margin: 0; font-size: .85rem; }
.announce a { color: inherit; }
.announce button {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: inherit; font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.announce.is-hidden { display: none; }

/* Header is always forest with cream words, whatever the first section's theme. */
.site-header { --bg: var(--forest); --text: var(--cream); --heading: var(--cream); }
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.5rem var(--gutter);
  background: var(--bg);
}
.site-title {
  font-family: var(--font-heading);
  font-size: min(calc(1 * var(--scale) + 1rem), 2rem);
  line-height: 1.2;
  color: var(--heading);
  text-decoration: none;
  display: flex; align-items: center; gap: .9rem;
}
.site-mark { height: 2.5rem; width: auto; flex: none; }
@media (max-width: 767px) { .site-mark { height: 2rem; } }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a {
  color: var(--text); text-decoration: none; font-size: 1.05rem; padding: .1em 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: currentColor; }
.site-nav .nav-ig svg { width: 20px; height: 20px; display: block; }
.nav-toggle { display: none; }

@media (max-width: 767px) {
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 7px;
    width: 44px; height: 44px; background: none; border: 0; cursor: pointer; padding: 10px;
  }
  .nav-toggle span { display: block; height: 2px; background: var(--text); }
  .site-header { flex-wrap: wrap; }
  .site-nav {
    display: none; flex-direction: column; align-items: flex-start; gap: .8rem;
    width: 100%; padding: 1rem 0 .5rem;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { font-size: 1.4rem; }
}

/* ---------- Sections ---------- */
.sec { position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.sec.v-top { justify-content: flex-start; }
.sec.v-bottom { justify-content: flex-end; }
.sec.h-small { min-height: 33vh; }
.sec.h-medium { min-height: 66vh; }
.sec.h-large { min-height: 100vh; }
/* Squarespace ignores section height on gallery sections. */
.sec:has(> .sec-inner > .gallery) { min-height: 0; }
.sec-inner:has(> .gallery) { padding-block: 2vw; }
.sec-bg { position: absolute; inset: 0; z-index: 0; }
.sec-bg img { width: 100%; height: 100%; object-fit: cover; }
.sec-bg span { position: absolute; inset: 0; background: #000; }
.sec-inner, .fe-wrap { position: relative; z-index: 1; width: 100%; }
.sec-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 3.3vmax var(--gutter);
}
.sec.w-narrow .sec-inner { max-width: 50vw; }
.sec.w-medium .sec-inner { max-width: 75vw; }
@media (max-width: 767px) { .sec.w-narrow .sec-inner, .sec.w-medium .sec-inner { max-width: none; } }
.fe-wrap { padding: 3.3vmax 0; }

/* Classic 12-column rows */
.row { display: flex; flex-wrap: wrap; margin: 0 -17px; }
.col { flex: 0 0 var(--w); padding: 0 17px; min-width: 0; }
@media (max-width: 767px) { .col { flex-basis: 100%; } }
.row + .row, .col > * + * { margin-top: 17px; }

/* Fluid-engine sections: per-section grid rules are inlined in each page. */
.fluid-engine { --sqs-site-gutter: var(--gutter); --sqs-site-max-width: var(--max-width); }
.fe-block { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.fe-block > .b-image.fill { height: 100%; margin: 0; }
.fe-block > .b-image.fill img, .fe-block > .b-image.fill a { width: 100%; height: 100%; }

/* ---------- Blocks ---------- */
.b-image { margin: 0; }
.b-image img { width: 100%; }
.b-image figcaption { font-size: .9rem; margin-top: .5rem; }
.b-spacer { height: 2rem; }
.b-button { margin: 1rem 0; }
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1rem; line-height: 1.2;
  padding: 1.3rem 2.171rem;
  border-radius: 6.4px;
  background: var(--btn-bg); color: var(--btn-text);
  text-decoration: none; border: 0; cursor: pointer;
}
.btn:hover { opacity: .85; }
.btn-secondary { font-size: 1.1rem; }
.btn-tertiary { background: transparent; color: var(--link); text-decoration: underline; padding-inline: 0; }
.social { display: flex; gap: 1rem; justify-content: center; }
.social a { color: var(--text); }
.social svg { width: 24px; height: 24px; display: block; }
.b-embed iframe { max-width: 100%; }

/* ---------- Galleries ---------- */
.gallery { display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.gallery .g-item img { width: 100%; height: 100%; object-fit: contain; }
.gallery.logos .g-item { aspect-ratio: 5 / 4; }
.gallery.logos.single { grid-template-columns: repeat(2, 1fr); }
.gallery.photos { gap: 7vw; }
.gallery.photos .g-item { aspect-ratio: 4 / 3; display: block; }
.gallery.photos .g-item img { object-fit: cover; }
.gallery.photos .g-item:hover img { opacity: .85; }
@media (max-width: 992px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .gallery, .gallery.photos { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* Squarespace "scaled text": the line is sized to fill its block (see site.js). */
.sqsrte-scaled-text-container { width: 100%; }
.sqsrte-scaled-text { display: block; }
.sqsrte-scaled-text > * { margin: 0; white-space: nowrap; line-height: 1.1; }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(31, 59, 38, .96);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; width: auto; height: auto; }
.lightbox button {
  position: absolute; background: none; border: 0; color: var(--cream);
  font-size: 2.5rem; cursor: pointer; padding: 1rem; line-height: 1;
}
.lightbox .lb-close { top: .5rem; right: .5rem; }
.lightbox .lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }

/* ---------- Forms (Netlify) ---------- */
.form { display: grid; gap: .6rem; max-width: 720px; font-size: 1rem; }
.form label, .form legend { display: block; font-weight: 700; }
.form .req { font-weight: 400; opacity: .7; font-size: .85em; }
.form .desc { display: block; font-weight: 400; font-size: .9em; opacity: .8; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea {
  display: block; width: 100%; margin-top: .3rem; padding: .8rem;
  font: inherit; color: #222; background: #fff; border: 1px solid var(--forest); border-radius: 4px;
}
.form fieldset { border: 0; padding: 0; margin: .4rem 0; }
.form .opt { font-weight: 500; display: flex; gap: .5rem; align-items: baseline; }
.form .row2, .form .row3 { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
.form .row3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 600px) { .form .row2, .form .row3 { grid-template-columns: 1fr; } }
.form .btn { justify-self: start; margin-top: .8rem; }
.form .hp { position: absolute; left: -9999px; }
.form-note { font-style: italic; opacity: .8; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 3rem var(--gutter); }
.site-footer p { margin: 0 0 1rem; }
.site-footer h4 { color: var(--forest); margin-bottom: 1rem; }
@media (max-width: 767px) { .col + .col { margin-top: .8em; } }
