/* ==================================================================
   Scaling Africa 100 — Events
   ------------------------------------------------------------------
   Loaded alongside css/styles.css (never instead of it) on the
   events/lagos-2026/ pages, so this file only adds the handful of
   components those pages need beyond what styles.css already
   defines — design tokens, base, buttons, header/nav/footer and the
   .form-field system are all reused as-is, not redeclared here.

   Scaling Africa 100 has its own brand guide (logo, colour palette,
   favicon) distinct from the standalone book's. --color-ink is
   redeclared below to the guide's exact Midnight Navy, and the
   --sa100-* tokens are its full colour set — both additive custom
   properties, so they only ever affect pages that load this file.
   ================================================================== */
:root {
  --color-ink: #041c36;

  --sa100-red: #8e1a1b;
  --sa100-gold: #fac70c;
  --sa100-orange: #e12e20;
  --sa100-green: #7cbd3f;
  --sa100-forest: #0c7940;
  --sa100-ocean: #014b66;
  --sa100-teal: #0d93d2;
  --sa100-pink: #c81859;
  --sa100-navy: #041c36;
}

/* ---------- Brand stripe ----------
   A one-line nod to the logomark's 8-colour gradient, run once across
   the very top of the page — the simplest way to carry that signature
   without tinting large areas of the page itself. */
.brand-stripe {
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--sa100-red),
    var(--sa100-gold),
    var(--sa100-orange),
    var(--sa100-green),
    var(--sa100-forest),
    var(--sa100-ocean),
    var(--sa100-teal),
    var(--sa100-pink)
  );
}

/* ---------- Header lockup: book wordmark + "100" sub-brand suffix ----------
   Reuses the real brand wordmark artwork from assets/brand/ (same file the
   book site's own header uses) instead of a plain text wordmark, so the
   event system reads as the same brand rather than a reskinned one-off. */
.event-wordmark {
  gap: 0.65rem;
}

.event-wordmark__suffix {
  padding-left: 0.65rem;
  border-left: 1px solid var(--color-line-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--color-accent-dark);
}

/* Footer keeps styled text (the wordmark artwork's navy half disappears
   against the dark footer background — see styles.css comment above
   .wordmark img) but still calls out "100" in the brand accent. */
.event-wordmark__accent {
  margin-left: 0.3em;
  color: var(--sa100-green);
}

/* ---------- Hero heading (long event name) ----------
   "Scaling Africa: Youth Leadership Seminar" is far longer than the
   book site's own hero headline, which uses the default
   .heading-display scale (up to 4.5rem) — at that size, inside the
   hero's half-width text column, it broke one word per line. Sized
   down closer to .heading-lg so it wraps as whole phrases instead. */
.hero-heading--compact {
  font-size: clamp(2rem, 3.4vw, 3.2rem);
}

/* ---------- Hero theme tagline ---------- */
.event-theme-line {
  margin-top: 0.6rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--sa100-orange);
}

/* ---------- Badge (e.g. "Complimentary for registered participants") ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  margin: 1rem 0 1.25rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  background: rgba(250, 199, 12, 0.18);
  border: 1px solid rgba(250, 199, 12, 0.45);
  color: #8a6a00;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- "What You'll Gain" carousel ----------
   Five items, so a fixed 3-column grid (like .expect-grid) would leave
   an awkward orphan on its own row. Rather than wrap, this reuses the
   book site's own "What's Inside" horizontal-scroll carousel wholesale
   — .toc-scroll/.toc-scroll__track/.toc-part and the prev/next button
   behaviour are already defined in styles.css and wired up in main.js
   (initTocScroll, keyed off [data-toc-track]/[data-toc-prev/next]), so
   no new CSS or JS is needed here, only the same class names/attributes. */
#gain .expect-card:nth-child(1) .expect-card__number {
  color: var(--sa100-red);
}
#gain .expect-card:nth-child(2) .expect-card__number {
  color: var(--sa100-orange);
}
#gain .expect-card:nth-child(3) .expect-card__number {
  color: var(--sa100-teal);
}
#gain .expect-card:nth-child(4) .expect-card__number {
  color: var(--sa100-forest);
}
#gain .expect-card:nth-child(5) .expect-card__number {
  color: var(--sa100-pink);
}

/* ---------- Light button for dark-background CTA bands ----------
   None of the existing .btn variants are legible on --color-dark-bg:
   .btn--primary is dark-on-dark, .btn--secondary's outline disappears,
   and .btn--amazon is reserved for actual Amazon links. */
.btn--on-dark {
  background: var(--color-bg);
  color: var(--color-ink);
}

.btn--on-dark:hover {
  background: var(--color-accent-soft);
}

/* ---------- Registration / feedback form card ----------
   Gives the two-column field grid a defined, contained surface instead of
   floating directly on the page background, so the grouping reads as
   deliberate rather than merely narrow. */
.form-card {
  padding: clamp(2rem, 4vw, 3rem);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

/* ---------- Event identity strip ---------- */
.event-identity {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--color-line);
}

.event-identity__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.event-identity__text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.event-identity__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
}

.event-identity__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-ink);
}

/* The programme time under the date, filled in from Event Settings. */
.event-identity__sub {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}

.event-identity__sub[hidden] {
  display: none;
}

/* Icon chip — a soft accent-tinted circle behind each badge's icon,
   echoing the .badge pill treatment used elsewhere on this page. Each
   of the four badges gets its own brand colour rather than one colour
   repeated four times. */
.event-identity__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(78, 122, 34, 0.1);
  color: var(--color-accent-dark);
}

.event-identity__icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.event-identity__item:nth-child(1) .event-identity__icon {
  background: rgba(1, 75, 102, 0.1);
  color: var(--sa100-ocean);
}
.event-identity__item:nth-child(2) .event-identity__icon {
  background: rgba(225, 46, 32, 0.1);
  color: var(--sa100-orange);
}
.event-identity__item:nth-child(3) .event-identity__icon {
  background: rgba(250, 199, 12, 0.22);
  color: #8a6a00;
}
.event-identity__item:nth-child(4) .event-identity__icon {
  background: rgba(12, 121, 64, 0.1);
  color: var(--sa100-forest);
}

/* Now that the strip spans the full container width (below the hero's
   two columns, not inside the half-width text column), keep its four
   items on one line, clustered together and centred rather than
   stretched edge to edge or pinned to the left. */
.event-identity--row {
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2.75rem;
}

/* Too narrow for four across, so two across, in columns that line up. */
@media (max-width: 1100px) {
  .event-identity--row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 1.5rem 3rem;
  }
}

/* ---------- Registration status banner ---------- */
.registration-banner {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

.registration-banner--open {
  background: rgba(78, 122, 34, 0.08);
  color: var(--color-accent-dark);
  border: 1px solid rgba(78, 122, 34, 0.22);
}

.registration-banner--closed {
  background: rgba(161, 61, 43, 0.08);
  color: #a13d2b;
  border: 1px solid rgba(161, 61, 43, 0.22);
}

/* ---------- "What to expect" grid ---------- */
.expect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2rem);
}

.expect-card {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.expect-card__number {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-accent-soft);
  margin-bottom: 0.9rem;
}

/* ---------- Placeholder cards (programme / speakers pending) ---------- */
.pending-card {
  padding: clamp(2rem, 4vw, 3rem);
  text-align: center;
  background: var(--color-bg-alt);
  border: 1px dashed var(--color-line-strong);
  border-radius: var(--radius-md);
}

.pending-card__heading {
  margin-bottom: 0.6rem;
}

.pending-card__body {
  max-width: 32rem;
  margin-inline: auto;
}

/* ---------- Registration form outcome panel ---------- */
.registration-result {
  padding: clamp(2rem, 4vw, 2.5rem);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
}

.registration-result__ref {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.registration-result dl {
  margin: 1.25rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  font-size: 0.92rem;
}

.registration-result dt {
  color: var(--color-ink-faint);
}

.registration-result dd {
  margin: 0;
  font-weight: 600;
}

/* The rules above set display, which would otherwise beat [hidden]. */
.registration-result [hidden] {
  display: none;
}

/* Cloudflare's real-person check. Usually invisible; when it does show a
   box, give it room above the submit button. */
.human-check {
  margin-top: 1.25rem;
}

/* ---------- Feedback page: rating + choice controls ---------- */
.rating-select {
  display: flex;
  gap: 0.6rem;
}

.rating-select__option {
  flex: 1;
}

.rating-select__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rating-select__option label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 3.25rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-editorial), background-color 0.2s var(--ease-editorial);
}

.rating-select__option input:checked + label {
  border-color: var(--color-accent);
  background: rgba(78, 122, 34, 0.08);
  color: var(--color-accent-dark);
}

.rating-select__option input:focus-visible + label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.choice-group__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-group__option label {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-editorial), background-color 0.2s var(--ease-editorial);
}

.choice-group__option input:checked + label {
  border-color: var(--color-accent);
  background: rgba(78, 122, 34, 0.08);
  color: var(--color-accent-dark);
}

.choice-group__option input:focus-visible + label {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Honeypot field — never shown to a real visitor ---------- */
.field-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 960px) {
  .expect-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .rating-select {
    gap: 0.4rem;
  }
  .registration-result dl {
    grid-template-columns: 1fr;
  }
}

/* ---------- Events listing page (events/index.php) ----------
   The event cards themselves are in styles.css (.event-listing), shared
   with the main site's Upcoming Events section. */
/* The page you're on, in the header menu. */
.nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
  color: var(--color-ink);
  font-weight: 600;
}

.events-listing {
  padding-block: clamp(3rem, 6vw, 5.5rem);
}

.events-listing__intro {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.events-listing__heading {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 1rem 0 1.1rem;
}

.events-listing__list {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.events-listing__empty {
  max-width: 40rem;
}

.events-listing__empty .btn {
  margin-top: 1.5rem;
}

@media (max-width: 720px) {
  .events-listing__intro {
    text-align: center;
    margin-inline: auto;
  }

  .events-listing__empty {
    margin-inline: auto;
  }
}

/* ---------- Mobile layout ----------
   Three breakpoints, matching where styles.css changes the page:
   899px  the nav becomes a menu button
   960px  two-column sections stack
   720px  phones: headings, short text and actions are centred. Long
          multi-paragraph copy stays left-aligned, which is easier to read. */
@media (max-width: 899px) {
  .header__inner {
    padding-block: 0.55rem;
  }

  .event-wordmark {
    gap: 0.75rem;
  }

  .event-wordmark img {
    height: 38px;
  }

  .event-wordmark__suffix {
    padding-left: 0.75rem;
    font-size: 1.45rem;
  }
}

@media (max-width: 960px) {
  /* Full-width posters and portraits are taller than a tablet screen. */
  .event-artwork,
  .author__frame,
  .purchase-cta__image {
    max-width: 30rem;
    margin-inline: auto;
  }

  /* The book artwork has wide transparent margins, and on desktop it is
     enlarged and pushed right to fill its column. Stacked, that left it off
     centre, so centre it. The clip is on the section, not the image, so the
     book's soft shadow fades out rather than ending in a hard edge. */
  .about-book {
    overflow-x: clip;
  }

  .about-book .grid-split {
    gap: 1.5rem;
  }

  .about-book__visual {
    justify-content: center;
    max-width: 30rem;
    margin-inline: auto;
  }

  .about-book__image {
    width: 118%;
    max-width: 118%;
    margin-inline: -9%;
    margin-bottom: -6%;
  }
}

@media (max-width: 720px) {
  .section-pad {
    padding-block: 3.5rem;
  }

  .hero {
    padding-block: 1.5rem 3rem;
  }

  #book {
    padding-top: 2rem;
  }

  .form-card {
    padding: 1.5rem 1.25rem;
  }

  /* Hero */
  .hero [data-reveal="stagger"],
  .author__copy .eyebrow,
  .about-book__copy {
    text-align: center;
  }

  .hero__actions {
    justify-content: center;
  }

  /* Date, location, admission and venue: one centred stack. */
  .event-identity--row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .event-identity__item {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .event-identity__text {
    align-items: center;
  }

  /* "Inside the Conversation" slider: the card fills the screen with the next
     one peeking in, and the arrows sit underneath. The track runs edge to
     edge; the spacers let the first and last cards reach the centre. */
  .toc-scroll {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 0.75rem;
  }

  .toc-scroll__track {
    order: -1;
    flex: 0 0 auto;
    width: 100vw;
    margin-inline: calc(var(--container-pad) * -1);
    gap: 0.85rem;
    scroll-snap-type: x mandatory;
  }

  .toc-scroll__track::before,
  .toc-scroll__track::after {
    content: "";
    flex: 0 0 calc(8vw - 0.85rem);
  }

  .toc-part {
    width: 84vw;
    scroll-snap-align: center;
  }

  .toc-scroll__nav {
    display: inline-flex;
  }

  /* Number beside the title, description underneath, all centred. */
  #gain .expect-card {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-content: flex-start;
    align-items: baseline;
    column-gap: 0.6rem;
    padding: 1.75rem 1.25rem;
    text-align: center;
  }

  #gain .expect-card__number {
    margin: 0;
    font-size: 1.3rem;
  }

  #gain .expect-card h3 {
    margin: 0;
    font-size: 1.2rem;
  }

  #gain .expect-card p {
    flex: 0 0 100%;
    margin-top: 0.75rem;
  }

  /* Facilitator and book: centred headings over left-aligned copy, the same
     pattern the About and Register sections already use. */
  .author__copy .heading-lg,
  .author__role {
    text-align: center;
  }

  .about-book__copy .body-base {
    text-align: left;
  }

  .badge {
    justify-content: center;
    margin: 0.75rem 0 0.25rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-align: center;
  }

  .feedback-intro {
    text-align: center;
  }

  /* Closing call to action */
  .purchase-cta__inner {
    text-align: center;
  }

  .purchase-cta__lede {
    margin-inline: auto;
  }

  .purchase-cta__actions {
    justify-content: center;
  }

  /* Footer */
  .footer__top {
    align-items: center;
    gap: 2rem;
    text-align: center;
  }

  .footer__tagline {
    margin-inline: auto;
  }

  .footer__nav ul {
    justify-content: center;
    gap: 1rem 1.5rem;
  }

  .footer__bottom {
    align-items: center;
    text-align: center;
  }
}
