/*
 * Alphathon 2026 modern shell — our own navbar/footer/message chrome for the
 * a_base_2026.html shell. Built on the design tokens defined by the synced
 * Agenthon styles.css (--ink, --muted, --line, --green-deep, --surface, …),
 * which loads before this file. We use OUR OWN class names (a26-*) rather than
 * the upstream .site-header/.site-nav so our auth-carrying navbar never drifts
 * when colleagues edit the external site's CSS.
 */

/* Offset in-page #anchor jumps so targets clear BOTH sticky bars on home
   (main navbar 68px + sub-nav 48px). Harmless on pages without anchors. */
html {
  scroll-padding-top: 124px;
}

/* Home-only "coming soon" notice, above the synced island hero. */
.a26-coming-soon {
  text-align: center;
  padding: 16px 20px;
  font-weight: 800;
  font-size: clamp(15px, 2vw, 18px);
  letter-spacing: 0.02em;
  color: var(--green-deep);
  background: rgba(10, 159, 125, 0.07);
  border-bottom: 1px solid var(--line);
}

/* Home-only sub-nav: section anchors from the synced content (snapshot.nav_items).
   Sticky just below the main navbar; horizontally scrollable on narrow screens. */
.a26-subnav {
  position: sticky;
  top: 68px;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.a26-subnav-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: safe center;
  gap: 24px;
  height: 48px;
  padding: 0 clamp(20px, 4vw, 64px);
  overflow-x: auto;
  white-space: nowrap;
}

.a26-subnav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 0;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.a26-subnav a:hover,
.a26-subnav a:focus-visible {
  color: var(--green-deep);
  border-bottom-color: var(--green);
}

/* Hero heading for the Alphathon-authored pages (About, Compete). Uses <h2>
   (the home hero keeps the giant <h1>); sized clearly above the subtitle but
   smaller than the home title. */
.hero-copy h2 {
  margin: 0 0 12px;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.0;
  letter-spacing: -0.01em;
  font-weight: 800;
  color: var(--ink);
}

/* ---- Header / navbar ---------------------------------------------------- */

.a26-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 68px;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(217, 225, 231, 0.88);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.a26-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  color: var(--ink);
  white-space: nowrap;
}

.a26-brand img {
  height: 30px;
  width: auto;
}

.a26-brand .a26-brand-word {
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.a26-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-left: 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.a26-nav-left,
.a26-nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.a26-nav a {
  color: var(--muted);
  transition: color 160ms ease;
  white-space: nowrap;
}

.a26-nav a:hover,
.a26-nav a:focus-visible,
.a26-nav a.active {
  color: var(--green-deep);
}

.a26-nav .a26-sep {
  width: 1px;
  height: 20px;
  background: var(--line);
}

/* Auth buttons */
.a26-btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-weight: 750;
  font-size: 14px;
}

.a26-btn.solid {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Past Events dropdown — native <details>, no JS needed */
.a26-dd {
  position: relative;
}

.a26-dd > summary {
  list-style: none;
  cursor: pointer;
}

.a26-dd > summary::-webkit-details-marker {
  display: none;
}

.a26-dd > summary::after {
  content: " \25be";
}

.a26-menu {
  position: absolute;
  right: 0;
  margin-top: 10px;
  min-width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
  z-index: 40;
}

.a26-menu a {
  padding: 8px 10px;
  border-radius: 7px;
}

.a26-menu a:hover {
  background: var(--surface-soft);
}

/* Hamburger (mobile only) */
.a26-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
}

.a26-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

/* ---- Messages ----------------------------------------------------------- */

/* Toast messages: fixed bottom-right, auto-dismiss (ported from the old pages,
   no Bootstrap). JS in agenthon2026.js adds .is-hiding then removes the node. */
.a26-toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.a26-toast {
  pointer-events: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  overflow: hidden;            /* clip the coloured header to the rounded corners */
  font-size: 15px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.a26-toast.is-hiding {
  opacity: 0;
  transform: translateY(10px);
}

/* Coloured header bar (so the toast is impossible to miss) */
.a26-toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--blue);     /* default = Notice/info */
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.a26-toast-title { flex: 1; }

.a26-toast-body { padding: 12px 14px; color: var(--ink, #1a1a1a); }

.a26-toast-close {
  flex: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0.9;
}
.a26-toast-close:hover { opacity: 1; }

/* Header colour by message level */
.a26-toast.success .a26-toast-header { background: var(--green); }
.a26-toast.info    .a26-toast-header { background: var(--blue); }
.a26-toast.error   .a26-toast-header { background: var(--coral); }
.a26-toast.warning .a26-toast-header { background: var(--amber); color: #1a1a1a; }
.a26-toast.warning .a26-toast-close  { color: #1a1a1a; }

@media (max-width: 520px) {
  .a26-toasts { left: 16px; right: 16px; width: auto; }
}

/* ---- Content helpers (Alphathon-authored modern sections) --------------- */

.a26-logo-grid {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.a26-logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.a26-logo-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 159, 125, 0.5);
  box-shadow: 0 14px 30px rgba(22, 38, 54, 0.08);
}

.a26-logo-tile img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
}

/* Logos that read small at the default cap (Bloomberg, NVIDIA) — same boxes,
   larger logo. */
.a26-logo-lg img {
  max-height: 80px;
}

/* SQA + CEWIT organizer logos (About) — equally prominent, matched by height. */
.a26-org-logos {
  width: min(1140px, 100%);
  margin: 34px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 8vw, 96px);
  flex-wrap: wrap;
}

.a26-org-logos img {
  height: 84px;
  width: auto;
  max-width: 100%;
}

.a26-note {
  width: min(760px, 100%);
  margin: 24px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.a26-note a {
  color: var(--green-deep);
  font-weight: 700;
}

.a26-cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

/* Author-owned prose blocks reuse the Agenthon intro-grid feel. */
.a26-prose {
  width: min(760px, 100%);
  margin: 0 auto;
  color: var(--muted);
  font-size: 18px;
}

.a26-prose p {
  margin: 0 0 18px;
}

/* Prose links match the green style used elsewhere in authored content
   (.a26-note): green + semibold, with an underline on hover/focus. */
.a26-prose a {
  color: var(--green-deep);
  font-weight: 700;
  text-decoration: none;
}

.a26-prose a:hover,
.a26-prose a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

@media (max-width: 620px) {
  .a26-logo-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
}

/* ---- Footer ------------------------------------------------------------- */

.a26-footer {
  margin-top: 40px;
  padding: 40px clamp(20px, 4vw, 64px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 14px;
}

.a26-footer-inner {
  width: min(1140px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.a26-footer strong {
  color: var(--ink);
}

.a26-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.a26-footer-links a:hover {
  color: var(--green-deep);
}

/* ---- Mobile ------------------------------------------------------------- */

@media (max-width: 860px) {
  .a26-toggle {
    display: block;
  }

  .a26-nav {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin-left: 0;
    padding: 10px 20px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }

  .a26-nav-left,
  .a26-nav-right {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  body.a26-nav-open .a26-nav {
    display: flex;
  }

  .a26-nav a,
  .a26-dd {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .a26-nav .a26-sep {
    display: none;
  }

  .a26-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 4px 0 0 12px;
    margin-top: 4px;
  }

  .a26-btn {
    justify-content: center;
    margin-top: 8px;
  }
}
