/* ZANOG brand: crimson + charcoal, carried over from nog.net.za / events portal */
:root {
  --brand: #a9002e;
  --brand-dark: #7c0122;
  --charcoal: #3a3335;
  --bg: #faf8f8;
  --card: #ffffff;
  --text: #2b2627;
  --muted: #6f686a;
  --border: #e8e2e3;
  --success: #167a3d;
  --error: #b42318;
  --info: #1f6581;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
.container { max-width: 1080px; margin: 0 auto; padding: 0 1rem; }
a { color: var(--brand); }
h1, h2, h3 { color: var(--brand-dark); line-height: 1.25; }
main { min-height: 60vh; }
main > .container { padding: 1.75rem 1rem 3rem; }

/* ---------- Top bar (contact + socials) ---------- */
.top-bar { background: var(--charcoal); }
.top-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .3rem 1rem; }
.top-mail { color: #d8d2d3; text-decoration: none; font-size: .85rem; }
.top-mail:hover { color: #fff; }
.top-socials { display: flex; align-items: center; gap: .4rem; }

/* Social icon chips (top bar, footer, participate page) */
.soc { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: inherit; }
.soc-icon {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%; background: var(--soc-color); color: #fff;
}
.soc-icon svg { width: 14px; height: 14px; display: block; }
.soc:hover .soc-icon { filter: brightness(1.2); }
.soc-label { font-size: .92rem; }

/* ---------- Header + navigation ---------- */
.site-header { background: #fff; border-bottom: 3px solid var(--brand); position: sticky; top: 0; z-index: 50; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1rem; }
.brand img { height: 46px; width: auto; display: block; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--charcoal); cursor: pointer; }
.site-nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }
.site-nav > a, .nav-drop > button {
  display: block; padding: .5rem .7rem; border: none; background: none; cursor: pointer;
  color: var(--charcoal); text-decoration: none; font-weight: 500; font-size: .95rem; border-radius: 6px;
}
.site-nav > a:hover, .nav-drop > button:hover, .nav-drop.open > button { color: var(--brand); background: #faf3f5; }
.site-nav > a.active, .nav-drop.active-group > button { color: var(--brand); }
.site-nav > a.featured-event { color: var(--brand); font-weight: 600; }
.caret { font-size: .7rem; }
.nav-drop { position: relative; }
.drop-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 15rem;
  background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--brand);
  border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(43, 38, 39, .12); padding: .35rem 0; z-index: 60;
}
.nav-drop:hover .drop-menu, .nav-drop.open .drop-menu, .nav-drop:focus-within .drop-menu { display: block; }
.drop-menu a { display: block; padding: .5rem .9rem; color: var(--charcoal); text-decoration: none; font-size: .92rem; }
.drop-menu a:hover { background: #faf3f5; color: var(--brand); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; flex-direction: column; align-items: stretch; width: 100%; flex-basis: 100%; padding-bottom: .5rem; }
  .site-nav.open { display: flex; }
  .nav-row { flex-wrap: wrap; }
  .nav-drop:hover .drop-menu { display: none; } /* tap only on mobile */
  .nav-drop.open .drop-menu { display: block; position: static; box-shadow: none; border-radius: 0;
    border-left: 3px solid var(--brand); border-top: 1px solid var(--border); margin: 0 .5rem; }
  .nav-drop > button { width: 100%; text-align: left; }
}

/* ---------- Home hero ---------- */
.hero {
  /* Text sits over the dark left side of the photo; keep the right (the
     speaker) nearly clear so the photo reads, with a hint of brand crimson. */
  background: linear-gradient(100deg,
      rgba(30, 26, 27, .88) 0%, rgba(30, 26, 27, .72) 38%,
      rgba(74, 8, 26, .38) 68%, rgba(124, 1, 34, .18) 100%),
    url('img/hero.jpg') center 12%/cover;
  color: #fff;
}
.hero h1, .hero p { text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.hero-inner { padding: 4.5rem 1rem; max-width: 1080px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.7rem); margin: 0 0 .5rem; }
.hero p { max-width: 42rem; font-size: 1.08rem; margin: 0 0 1.5rem; color: #f4e9ec; }
.hero .btn-primary { font-size: 1.05rem; padding: .65rem 1.4rem; }

/* Page hero: photo banner with the page title. The overlay is deliberately
   light (only a bottom fade for legibility) so the photo stays visible. */
.page-hero { position: relative; background-size: cover; background-position: center 30%; }
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26, 22, 23, .08) 45%, rgba(26, 22, 23, .72));
}
.page-hero .container {
  position: relative; display: flex; align-items: flex-end;
  min-height: clamp(220px, 34vw, 420px); padding-top: 2.5rem; padding-bottom: 1.1rem;
}
.page-hero h1 { color: #fff; margin: 0; text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }

/* Featured event banner */
.event-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--brand-dark); color: #fff; border-radius: 10px; padding: 1rem 1.4rem; margin: 1.75rem auto 0;
}
.event-banner .when { color: #eccdd6; font-size: .95rem; }
.event-banner h2 { color: #fff; margin: 0 0 .2rem; font-size: 1.3rem; }

/* Stats strip (events per year etc, from current site) */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin: 2rem 0; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 10px; text-align: center; padding: 1.25rem .75rem; }
.stat .n { font-size: 2rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .9rem; }

/* Card grid (home shortcuts, other services) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem;
  text-decoration: none; color: var(--text); display: block;
  transition: box-shadow .15s ease, border-color .15s ease;
}
a.card:hover { box-shadow: 0 4px 12px rgba(169, 0, 46, .12); border-color: var(--brand); }
.card h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }

/* Photo strip */
.photo-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.photo-strip img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; display: block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: .5rem 1rem; border-radius: 6px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  text-decoration: none; cursor: pointer; font-size: 1rem;
}
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: #fff; border-color: #fff; color: var(--brand-dark); font-weight: 600; }
.btn-light:hover { background: #f4e9ec; }

/* ---------- Content pages ---------- */
.page-narrow { max-width: 800px; }
.lead { font-size: 1.08rem; color: var(--charcoal); }
.notice { background: #fff4e0; color: #92610c; border: 1px solid #f0d9a6; border-radius: 8px; padding: .75rem 1rem; margin: 1rem 0; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem 1.5rem; margin: 1rem 0; }
ul.spaced li { margin-bottom: .5rem; }

/* Tables (looking glass list etc.) */
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.table th, .table td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--border); }
.table th { background: #f5f0f1; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* Definition-style fact blocks (speed test nodes) */
.facts { display: grid; grid-template-columns: 9rem 1fr; gap: .25rem .75rem; margin: 0; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.muted { color: var(--muted); }
.section-title { margin-top: 2.25rem; }

/* ---------- Sponsors page (data pulled from the events portal) ---------- */
.sponsor-logos { display: flex; flex-wrap: wrap; gap: 1rem; align-items: stretch; justify-content: center; margin: 1rem 0 1.75rem; }
.sponsor {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: .9rem 1.2rem; min-width: 10rem; min-height: 4.5rem;
  text-decoration: none; transition: box-shadow .15s ease, border-color .15s ease;
}
a.sponsor:hover { box-shadow: 0 4px 12px rgba(169, 0, 46, .12); border-color: var(--brand); }
.sponsor img { max-height: 56px; max-width: 160px; display: block; }
.patron-logos .sponsor img { max-height: 72px; max-width: 200px; }
.sponsor-name { font-weight: 600; color: var(--charcoal); }
.tier-group h3 {
  font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 1.25rem 0 .25rem;
}

/* Socials block inside a panel (participate page) */
.panel-socials { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.panel-socials .soc-label { color: var(--charcoal); font-weight: 500; }
.panel-socials .soc:hover .soc-label { color: var(--brand); }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: #d8d2d3; margin-top: 2rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 1.5rem; padding: 2rem 1rem 1rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-logo { height: 40px; width: auto; background: #fff; border-radius: 6px; padding: 4px 8px; }
.site-footer h4 { color: #fff; margin: .2rem 0 .6rem; font-size: .95rem; }
.site-footer a { display: block; color: #d8d2d3; text-decoration: none; padding: .15rem 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-socials .soc { display: flex; align-items: center; }
.footer-socials .soc:hover { text-decoration: none; }
.footer-socials .soc-icon { width: 22px; height: 22px; }
.footer-socials .soc-icon svg { width: 12px; height: 12px; }
.site-footer .muted { color: #b5adaf; }
.copyright { border-top: 1px solid #4a4345; padding: .9rem 1rem; margin-top: 1rem; color: #b5adaf; }
