/* ==========================================================================
   Hume Region Scouts — humescouts.com
   Static site. One stylesheet, no build step, no JavaScript.
   ========================================================================== */

:root {
  --navy:        #123a5a;
  --navy-deep:   #0a2a44;
  --blue:        #0181b6;
  --blue-dark:   #05658d;
  --sky:         #44c8f5;

  --page-bg:     #eef1f3;
  --surface:     #ffffff;
  --rule:        #dde4e9;
  --ink:         #21323f;
  --ink-muted:   #566a78;

  --wrap:        1200px;
  --banner-max:  1024px;

  --sans: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }
a:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
  border-radius: 2px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -120%);
  z-index: 10;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 18px;
  border: 2px solid var(--blue);
  border-radius: 0 0 4px 4px;
  text-decoration: none;
  font-weight: 700;
}
.skip-link:focus { transform: translate(-50%, 0); }

/* --------------------------------------------------------------- masthead */

.masthead {
  background-color: var(--navy);
  background-image: url("../img/header-bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

/* Progressive upgrade: browsers that understand image-set + webp take the
   smaller file, everything else keeps the JPEG declared above. */
@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .masthead {
    background-image: image-set(
      url("../img/header-bg.webp") type("image/webp"),
      url("../img/header-bg.jpg")  type("image/jpeg")
    );
  }
}

.masthead__home { display: block; line-height: 0; }
.masthead__logo { width: 280px; max-width: 70vw; height: auto; }

/* ----------------------------------------------------------------- layout */

.shell {
  max-width: var(--wrap);
  margin: 0 auto;
  background: var(--surface);
  padding: 40px 28px 56px;
}

@media (max-width: 640px) {
  .shell { padding: 28px 18px 40px; }
}

.page-intro { text-align: center; margin: 0 auto 34px; max-width: 60ch; }

h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.35rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 0 0 12px;
  text-wrap: balance;
}

.page-intro p { margin: 0; color: var(--ink-muted); font-size: 1.05rem; }

/* ---------------------------------------------------------------- banners */

.banners {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
}

.banner {
  display: block;
  width: 100%;
  max-width: var(--banner-max);
  line-height: 0;
  border-radius: 2px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.banner:hover,
.banner:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -8px rgba(18, 58, 90, 0.55);
}

/* ----------------------------------------------------------------- venues */

.venues {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1040px;
  margin: 0 auto;
}

.venue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}

.venue:first-child { border-top: 0; padding-top: 6px; }

.venue__media img { width: 100%; border-radius: 3px; }

/* Odd rows put the photo on the left, even rows on the right — the same
   alternation the previous site used. */
.venue:nth-child(even) .venue__media { order: 2; }

.venue h2 {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.venue__facts { margin: 0 0 20px; }

.venue__facts > div {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--rule);
}
.venue__facts > div:last-child { border-bottom: 0; }

.venue__facts dt {
  flex: 0 0 132px;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding-top: 3px;
}

.venue__facts dd { margin: 0; flex: 1 1 auto; }

.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 11px 22px;
  border-radius: 3px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--blue-dark); color: #fff; }

@media (max-width: 720px) {
  .venue { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .venue:nth-child(even) .venue__media { order: 0; }
  .venue__facts dt { flex-basis: 110px; }
}

@media (max-width: 440px) {
  .venue__facts > div { flex-direction: column; gap: 0; }
  .venue__facts dt { flex-basis: auto; }
}

/* --------------------------------------------------------------- calendar */

.calendar-frame {
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  background: var(--surface);
}

.calendar-frame iframe {
  display: block;
  width: 100%;
  height: 1000px;
  border: 0;
}

@media (max-width: 900px) {
  .calendar-frame iframe { height: 78vh; min-height: 520px; }
}

.calendar-fallback {
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  background: var(--navy);
  color: #d5e2ec;
  padding: 40px 20px 30px;
  font-size: 0.94rem;
}

.site-footer a { color: #a8dcf5; }
.site-footer a:hover { color: #fff; }

.site-footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px 40px;
  padding: 0 8px;
}

.site-footer h2 {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7fb0cd;
  margin: 0 0 8px;
  font-weight: 700;
}

.site-footer p { margin: 0 0 6px; line-height: 1.55; }

.site-footer__bottom {
  max-width: var(--wrap);
  margin: 30px auto 0;
  padding: 18px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.85rem;
  color: #8fb3c9;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
