/* Region 4 Fall Festival - public site styles.
   Look carried over from the original site: royal blue page, gold-edged white panel,
   black nav band, flower-garland header. Everything scales with the screen width. */

:root {
  --blue: #0033cc;
  --royal: #003399;
  --navy: #003366;
  --gold: #ffcc33;
  --gold-line: #fdca00;
  --heading-gold: #eaa900;
  --mL: clamp(8px, 4.44vw, 40px);   /* blue margin left of the white panel  */
  --mR: clamp(8px, 3.78vw, 34px);   /* blue margin right of the white panel */
  --u: min(1vw, 9px);               /* 1% of the page width (900px max)     */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--blue);
  color: #000;
  font: 16px/1.6 Arial, Helvetica, sans-serif;
}
img { max-width: 100%; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 900px; margin: 0 auto; position: relative; }

/* ---------- header: garland + logo ---------- */
.top {
  position: relative;
  z-index: 5;
  aspect-ratio: 900 / 236;
  background: url(/img/garland.jpg) right top / 62.22% auto no-repeat;
}
.logo { position: absolute; left: 0; top: 0; width: 43.78%; display: block; }
.logo img { display: block; width: 100%; height: auto; }
.rider {
  position: absolute;
  left: 40%;
  top: 16.1%;
  width: 42.9%;
  height: auto;
  z-index: 8;
  pointer-events: none;
}

/* ---------- white panel ---------- */
.sheet {
  position: relative;
  z-index: 1;
  margin: 0 var(--mR) 0 var(--mL);
  background: #fff;
  border: 3px solid var(--gold-line);
  min-height: 420px;
}
.sheet::after { /* strip of flowers down the right edge */
  content: "";
  position: absolute;
  right: calc(-3px - var(--mR));
  top: 76px;
  width: calc(var(--mR) + 3px);
  height: calc(var(--u) * 36.3);
  background: url(/img/flowers-side.jpg) 0 0 / 100% 100% no-repeat;
  pointer-events: none;
}
.sheet-top {
  height: 26px;
  line-height: 26px;
  text-align: right;
  padding-right: 8px;
  font-size: clamp(11px, 1.7vw, 15px);
}

.band {
  margin: 0 calc(-3px - var(--mR)) 0 calc(-3px - var(--mL));
  background: #010101;
  border-top: 2px solid #cde2ff;
  border-bottom: 2px solid #779af6;
  position: relative;
  z-index: 2;
}
.band ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.band li { position: relative; }
.band li + li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28%;
  height: 44%;
  border-left: 2px solid #5f8ff0;
}
.band a {
  display: block;
  padding: 10px clamp(10px, 2.3vw, 20px);
  color: var(--gold);
  font-size: clamp(15px, 2.45vw, 22px);
  line-height: 1.3;
  text-decoration: none;
}
.band a:hover, .band a[aria-current="page"] { color: #fff; }
.band a:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }

/* ---------- inside pages ---------- */
.inside { padding: clamp(14px, 3vw, 28px) clamp(16px, 4.4vw, 40px) 48px; }
.page-title {
  margin: 6px 0 14px;
  text-align: center;
  color: var(--royal);
  font-size: clamp(24px, 4.4vw, 34px);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.page-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  margin: 12px auto 0;
  background: var(--gold);
  border-radius: 2px;
}

/* ---------- editable text (also used inside the admin editor) ---------- */
.content { font-size: 16px; line-height: 1.65; color: #111; overflow-wrap: anywhere; }
.content > :first-child { margin-top: 0; }
.content p { margin: 0 0 1em; }
.content h1, .content h2, .content h3 { line-height: 1.2; clear: both; }
.content h1 {
  color: var(--heading-gold);
  font-size: clamp(22px, 3.6vw, 28px);
  margin: 1em 0 .45em;
  text-shadow: 1px 1px 0 #7a5400;
}
.content h2 { color: var(--royal); font-size: clamp(19px, 3vw, 23px); margin: 1.3em 0 .45em; }
.content h3 { color: var(--navy); font-size: 19px; margin: 1.5em 0 .4em; padding-bottom: 3px; border-bottom: 2px solid #f4dd8f; }
.content h3.align-center { border-bottom: 0; }
.content a { color: #0033aa; text-decoration: underline; }
.content a:hover { color: #001f7a; }
.content ul, .content ol { margin: 0 0 1em; padding-left: 1.6em; }
.content li { margin: .2em 0; }
.content img { max-width: 100%; height: auto; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.content p.align-right > img:only-child { float: right; margin: 4px 0 14px 22px; }
.content p:has(> img:only-child):not(.align-right) img { vertical-align: bottom; }

/* ---------- home page ---------- */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 37%);
  gap: 0 clamp(12px, 2.4vw, 22px);
  padding: 0 clamp(14px, 3vw, 24px) 40px clamp(14px, 4.4vw, 40px);
}
.home-text { padding-top: calc(var(--u) * 9.5); }
.home-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: calc(var(--u) * 1.8);
  padding-top: calc(var(--u) * 7.2);
}
.photo { margin: 0; border: 3px solid; background: #fff; line-height: 0; }
.photo img { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; display: block; }
.p-blue { border-color: #0030c8; }
.p-gold { border-color: #f5b400; }
.p1 { width: 55%; --ar: 172 / 258; }
.p2 { width: 77%; align-self: flex-start; --ar: 243 / 178; }
.p3 { width: 73%; --ar: 228 / 226; }
.p4 { width: 71%; align-self: center; --ar: 224 / 152; }
.fb-feed { align-self: stretch; margin-top: calc(var(--u) * 1.5); text-align: right; }
.fb-feed iframe { width: 100%; max-width: 340px; border: 0; }

/* ---------- sponsors ---------- */
.sponsors { margin-top: 10px; text-align: center; }
.sp-headline, .sp-featured { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 40px; margin: 22px 0; }
.sp-headline img { display: block; max-width: min(350px, 100%); height: auto; }
.sp-featured img { display: block; max-width: min(250px, 100%); height: auto; }
.sp { display: block; }
a.sp:hover img { opacity: .88; }
.sp-highlight h2 { margin: 26px 0; color: var(--royal); font-size: clamp(20px, 3.2vw, 26px); line-height: 1.3; }
.sp-partners { list-style: none; margin: 22px 0 6px; padding: 0; }
.sp-partners li { margin: .5em 0; color: var(--navy); font-size: clamp(16px, 2.5vw, 19px); font-weight: 700; }
.sponsors a.sp-name { color: inherit; text-decoration: none; }
.sponsors a.sp-name:hover { text-decoration: underline; }
.sp-highlight .sp-name { color: inherit; }

/* ---------- footer ---------- */
.foot { padding: 22px 16px 44px; text-align: center; color: #fff; font-size: 13px; }
.foot p { margin: 0 0 14px; }
.foot a { color: var(--gold); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot a:focus-visible { outline-color: var(--gold); }
.foot .credit img { vertical-align: middle; margin-right: 4px; }

/* ---------- small screens ---------- */
@media (max-width: 719px) {
  .rider { display: none; }
  .sheet::after { display: none; }
  .home-grid { grid-template-columns: 1fr; padding: 0 clamp(14px, 4vw, 24px) 32px; }
  .home-text { padding-top: 20px; }
  .home-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px; padding-top: 8px; }
  .home-side .photo { width: 100%; align-self: auto; }
  .home-side .photo img { aspect-ratio: 1 / 1; }
  .fb-feed { grid-column: 1 / -1; text-align: center; }
  .content p.align-right > img:only-child { float: none; display: block; margin: 0 auto 14px; }
  .align-right:has(> img:only-child) { text-align: center; }
  .band ul { justify-content: center; }
}
@media (min-width: 720px) {
  /* On the home page the rider sits over the middle of the nav band, so the links hug the left. */
  .is-home .band ul { justify-content: flex-start; padding-left: calc(var(--mL) + 3px); }
  .is-home .band li:first-child { display: none; }
  .is-home .band a { padding-left: clamp(8px, 1.6vw, 14px); padding-right: clamp(8px, 1.6vw, 14px); }
}
