/* SLNT — RC soaring club (sky/field). Not Wings Level Advisory. */
@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,600;1,9..144,500&family=Source+Sans+3:wght@400;600;700&display=swap");
:root {
  --sky: #2a6f9a; --sky-deep: #163a54; --horizon: #8ec4dc;
  --grass: #3b7a4c; --grass-dark: #2a5a38; --sand: #f3eee4; --paper: #fffdf8;
  --ink: #1b2a33; --muted: #5b6b74; --sun: #d4a927; --line: #d9d2c4;
  --white: #ffffff; --shadow: 0 10px 30px rgba(22, 58, 84, 0.08);
  --radius: 14px; --max: 1080px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--sand);
  font-family: var(--font-body); font-size: 18px; line-height: 1.65;
  min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); }
a:hover { color: var(--sky-deep); }
h1, h2, h3, h4 {
  font-family: var(--font-display); font-weight: 600; line-height: 1.2;
  color: var(--sky-deep); margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--sky-deep); color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }
.site-header { background: linear-gradient(180deg, var(--sky-deep) 0%, var(--sky) 100%); color: #fff; box-shadow: 0 2px 12px rgba(22, 58, 84, 0.18); position: relative; }
.header-inner { max-width: var(--max); margin: 0 auto; padding: 14px 20px 10px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; min-width: 220px; flex: 1; }
.brand img { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.brand-tag { font-size: 0.82rem; font-style: italic; opacity: 0.85; font-family: var(--font-display); }
.nav-toggle { display: none; background: transparent; border: 1px solid rgba(255,255,255,0.45); color: #fff; border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer; }
.site-nav { padding: 0 12px 10px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; max-width: var(--max); margin: 0 auto; padding: 6px 20px 14px; }
.site-nav a {
  display: block; color: #eef6fb; text-decoration: none; padding: 7px 12px;
  border-radius: 999px; font-size: 0.95rem; font-weight: 600;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a[aria-current="page"], .site-nav a.is-current { background: #fff; color: var(--sky-deep); }
.hero { position: relative; min-height: clamp(420px, 60vh, 620px); overflow: hidden; background: var(--sky-deep); color: #fff; }
.hero-slides { position: absolute; inset: 0; }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero-slides img.is-active { opacity: 1; }
.hero-img { width: 100%; height: 52vh; object-fit: cover; }
.hero-copy, .hero-overlay {
  position: relative; z-index: 2; max-width: var(--max); margin: 0 auto;
  padding: 56px 24px 64px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-overlay {
  background: linear-gradient(90deg, rgba(22,58,84,0.88) 0%, rgba(22,58,84,0.55) 55%, rgba(22,58,84,0.25) 100%);
  min-height: clamp(420px, 60vh, 620px);
}
.hero-copy { position: absolute; inset: auto 0 0; background: linear-gradient(transparent, rgba(20,40,63,0.82)); min-height: auto; }
.hero-overlay h1, .hero-copy h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 0.35em; text-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.hero-overlay p, .hero-copy p { max-width: 34em; font-size: 1.05rem; }
.btn {
  display: inline-block;
  background: var(--sun);
  color: var(--sky-deep) !important;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  width: fit-content;
}
.btn:hover { background: #dcb43a; color: var(--sky-deep) !important; }
.btn-ghost {
  display: inline-block;
  background: transparent;
  border: 1.5px solid currentColor;
  color: inherit;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  width: fit-content;
}
.btn-ghost:hover { opacity: 0.85; }
.hero-overlay .btn, .hero-overlay .btn-ghost { margin: 8px 12px 0 0; }
main { flex: 1; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 28px 20px 48px; }
.page-hero { max-width: var(--max); margin: 0 auto; padding: 48px 20px 8px; }
.page-hero h1 { margin-bottom: 0.35em; }
.eyebrow { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; font-weight: 700; color: var(--grass-dark); margin: 0 0 8px; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 46em; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 20px; }
.stack { display: grid; gap: 16px; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; align-items: center; }
.band { padding: 36px 0 56px; }
.band-alt { background: rgba(255,255,255,0.35); }
.announce { border-left: 5px solid var(--sun); }
.announce .meta { font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--grass-dark); font-weight: 700; margin-bottom: 6px; }
.photo-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.caption { font-size: 0.88rem; color: var(--muted); margin-top: 8px; }
.muted { color: var(--muted); }
.empty-note, .placeholder-note { background: #eef6ea; border: 1px dashed var(--grass); border-radius: var(--radius); padding: 18px 20px; }
.card + .empty-note { margin-top: 16px; }
iframe.cal-frame, .cal-frame { width: 100%; min-height: 640px; height: 640px; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
iframe.cal-frame.agenda { min-height: 420px; height: 420px; }
iframe.scores-frame, iframe.form-frame { width: 100%; min-height: 720px; height: 720px; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); margin: 12px 0 20px; }
.cal-frame iframe { width: 100%; height: 620px; border: 0; }
.field-block { margin-top: 28px; }
.field-block .grid-2 { margin-top: 16px; }
.map-frame { width: 100%; min-height: 380px; height: 380px; border: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.standings-table { width: 100%; border-collapse: collapse; background: var(--paper); }
.standings-table th, .standings-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.standings-table th { background: var(--sky-deep); color: #fff; font-size: 0.85rem; text-transform: uppercase; }
.standings-table.facts th[scope="row"] {
  background: transparent;
  color: var(--sky-deep);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: none;
  font-size: 1rem;
  width: 34%;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .standings-table.facts th[scope="row"] { width: auto; white-space: normal; }
}
.md-body h2, .prose h2 { margin-top: 1.4em; }
.partner h3 { margin-bottom: 0.15em; }
.subhead { margin-top: 1.6em; }
.site-footer { background: var(--sky-deep); color: #d7e6ef; margin-top: auto; padding: 32px 20px 24px; font-size: 0.95rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 24px; }
.site-footer h2, .site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.site-footer a { color: #fff; }
.site-footer p { margin-bottom: 0.5em; }
.footer-copy, .copyright { max-width: var(--max); margin: 22px auto 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; opacity: 0.85; }
.content-error { background: #fdecea; border: 1px solid #e8b4ae; padding: 12px 14px; border-radius: 8px; color: #7a1f16; }
@media (max-width: 860px) {
  .grid-2, .footer-inner, .split { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; margin-left: auto; }
  .site-nav { display: none; flex-direction: column; }
  .site-nav.is-open { display: flex; }
  iframe.cal-frame, .cal-frame { min-height: 480px; height: 480px; }

  body[data-page="home"] .home-flow [data-packet] > .card:nth-child(1) { order: 1; }
  body[data-page="home"] .home-flow [data-packet] > .card:nth-child(2) { order: 2; }
  body[data-page="home"] .home-flow .home-cal { order: 3; }
  body[data-page="home"] .home-flow [data-packet] > .card:nth-child(n+3) { order: 4; }
  body[data-page="home"] .home-cal iframe.cal-frame.agenda {
    height: 360px;
    min-height: 0;
    max-height: 360px;
    overflow: hidden;
  }
}


/* Homepage only: intro full-width, next-up | calendar, remaining cards full-width. */
body[data-page="home"] .home-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px 20px;
  align-items: start;
}
body[data-page="home"] .home-flow [data-packet] {
  display: contents;
}
body[data-page="home"] .home-flow [data-packet] > .card {
  margin-top: 0;
  min-width: 0;
}
body[data-page="home"] .home-flow .home-cal {
  align-self: start;
  min-width: 0;
  min-height: 0;
}
@media (min-width: 861px) {
  body[data-page="home"] .home-flow {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
  body[data-page="home"] .home-flow [data-packet] > .card:nth-child(1) {
    grid-column: 1 / -1;
  }
  body[data-page="home"] .home-flow [data-packet] > .card:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  body[data-page="home"] .home-flow [data-packet] > .card:nth-child(n+3) {
    grid-column: 1 / -1;
  }
  body[data-page="home"] .home-flow .home-cal {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slides img { transition: none; }
  html { scroll-behavior: auto; }
}

/* Packet blocks — additive only. Sky/field stays. */
.event-list { list-style: none; padding: 0; margin: 0 0 20px; }
.event-list li {
  background: var(--paper);
  border-left: 4px solid var(--grass);
  padding: 12px 14px;
  margin: 0 0 10px;
  border-radius: 0 10px 10px 0;
  box-shadow: var(--shadow);
}
.event-list .status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 8px;
  color: var(--sky-deep);
}
.event-list .status.done { color: var(--grass-dark); }
.event-list .status.postponed,
.event-list .status.unknown { color: #b42228; }
.club-card { margin-bottom: 12px; }
.club-card h3 { margin-bottom: 0.2em; }
.prose .btn, #page-content .btn { margin: 4px 0 16px; }
#page-content iframe.cal-frame { margin: 12px 0 20px; }

.recap-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 12px 0 20px; }
.recap-photos img { width: 100%; height: 140px; object-fit: cover; display: block; }
.recap-still { margin: 12px 0 20px; }
.recap-still img { width: 100%; height: auto; max-height: 420px; object-fit: cover; display: block; }
.recap-video-wrap { margin: 12px 0 20px; }
.recap-video { width: 100%; max-height: 420px; border-radius: var(--radius); background: #000; display: block; }

.model-carousel { position: relative; margin: 12px 0 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.model-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 10px; }
.model-track::-webkit-scrollbar { display: none; }
.model-card {
  scroll-snap-align: start;
  flex: 0 0 min(78%, 260px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.model-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 10px; margin: 0 0 10px; }
.model-card h3 { margin: 0 0 0.25em; }
.model-card .muted { margin: 0; }
.model-prev, .model-next {
  width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--sky-deep); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.model-prev:hover, .model-next:hover { background: var(--horizon); }
