/* Jou Nuwe Begin — Krugersdorp
 * Page styles. Every colour, size and space comes from tokens.css.
 * If a value is not in the tokens, it is not in the brand.
 *
 * Mobile-first throughout. A large share of this audience is older and almost
 * all of them arrive from Facebook, Instagram, TikTok or WhatsApp on a phone,
 * on mobile data. Big type, strong contrast, few bytes.
 */

/* Fonts are declared in fonts.css, loaded before this file. Self-hosted so the
 * page depends on nobody else and leaks no visitor to a third party. 68 KB for
 * the lot, latin + latin-ext only. */

/* ---- Reset -------------------------------------------------------------- */

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

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

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

body {
  margin: 0;
  background: var(--jnb-canvas-gradient);
  background-attachment: fixed;
  color: var(--jnb-text);
  font-family: var(--jnb-font-body);
  font-size: var(--jnb-size-body);
  line-height: var(--jnb-lh-body);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p { margin: 0; }

/* ---- Layout ------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--jnb-space-3);
}

.wrap--narrow { max-width: 760px; }

section { padding-block: var(--jnb-gap-section); }

@media (min-width: 768px) {
  .wrap { padding-inline: var(--jnb-space-4); }
  section { padding-block: calc(var(--jnb-space-7) * 1.6); }
}

.stack > * + * { margin-top: var(--jnb-space-3); }

/* A quiet rule, used sparingly to separate sections. */
.hairline { height: 1px; background: var(--jnb-hairline); border: 0; margin: 0; }

/* ---- Section tones ------------------------------------------------------
 * Three surfaces so the page breathes: the slate canvas (default), one deep
 * brand-navy moment (the billing), and a warm paper tone for the sections
 * where someone leans in and reads. The paper value is white warmed a step
 * toward the gold so the jump from #182430 never feels clinical.
 * Components that read the custom properties re-tone themselves. */

.section--deep {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--jnb-navy) 72%, var(--jnb-canvas)) 0%,
    var(--jnb-navy) 100%
  );
}

.section--light {
  --jnb-paper: #F6F4EF;
  --jnb-hairline: color-mix(in srgb, var(--jnb-near-black) 14%, transparent);
  --jnb-text-muted: color-mix(in srgb, var(--jnb-near-black) 64%, transparent);
  background: var(--jnb-paper);
  color: var(--jnb-near-black);
}

.section--light .eyebrow { color: var(--jnb-navy); }

.section--light .lede { color: color-mix(in srgb, var(--jnb-near-black) 80%, transparent); }

.section--light .facts,
.section--light .map {
  background: color-mix(in srgb, var(--jnb-white) 72%, transparent);
}

.section--light .field input {
  color: var(--jnb-near-black);
  background: var(--jnb-white);
}

/* ---- Hero ---------------------------------------------------------------
 * Full-bleed photograph under a navy scrim. The scrim is not decoration —
 * the brand guide requires it wherever type sits on a photo. */

.hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 100svh;
  padding-block: var(--jnb-space-7) var(--jnb-space-6);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

/* Heavier at the foot so the fold reads as a continuation of the page,
 * not a hard edge. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--jnb-canvas) 78%, transparent) 0%,
      color-mix(in srgb, var(--jnb-canvas) 55%, transparent) 34%,
      color-mix(in srgb, var(--jnb-canvas) 82%, transparent) 74%,
      var(--jnb-canvas) 100%);
}

.hero__inner { position: relative; z-index: 1; }

.hero__mark {
  height: 52px;
  width: auto;
  margin-bottom: var(--jnb-space-6);
}

.hero__title {
  font-family: var(--jnb-font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: var(--jnb-size-display-xl);
  line-height: var(--jnb-lh-display-xl);
  letter-spacing: var(--jnb-tr-display-xl);
  /* Three lines on a phone, one on a desktop. */
  max-width: 12ch;
}

/* The city pill — the official city-edition device. The only solid white
 * block in the system, and never wider than the event name above it. */
.hero__pill {
  display: inline-block;
  margin-top: var(--jnb-space-2);
  font-family: var(--jnb-font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: var(--jnb-size-h1);
  line-height: 1;
  letter-spacing: var(--jnb-display-tracking);
  color: var(--jnb-pill-text);
  background: var(--jnb-pill-bg);
  padding: calc(var(--jnb-pill-pad-y-ratio) * 1em) calc(var(--jnb-pill-pad-x-ratio) * 1em);
  border-radius: calc(var(--jnb-pill-radius-ratio) * 1em);
}

.hero__when {
  margin-top: var(--jnb-space-4);
  font-family: var(--jnb-font-display);
  text-transform: uppercase;
  font-size: var(--jnb-size-h1);
  line-height: 1.15;
  letter-spacing: var(--jnb-tr-h1);
}

.hero__lede {
  margin-top: var(--jnb-space-3);
  font-size: var(--jnb-size-body-lg);
  line-height: var(--jnb-lh-body-lg);
  max-width: 34ch;
  color: var(--jnb-text-muted);
}

.hero__cta { margin-top: var(--jnb-space-6); }

.hero__free {
  margin-top: var(--jnb-space-2);
  font-size: var(--jnb-size-body);
  color: var(--jnb-text-muted);
}

@media (min-width: 768px) {
  .hero__title { max-width: none; }
  .hero__lede { font-size: 20px; }
  .hero__mark { height: 64px; }
}

/* ---- The one gold moment ------------------------------------------------
 * Exactly one per composition. If a layout needs a second, the layout is
 * wrong. 56px tall because a lot of these hands are not young. */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--jnb-space-4);
  font-family: var(--jnb-font-body);
  font-weight: 600;
  font-size: var(--jnb-size-body-lg);
  color: var(--jnb-near-black);
  background: var(--jnb-gold);
  border: 0;
  border-radius: var(--jnb-space-1);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.cta:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cta:active { transform: translateY(0); }

.cta:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 3px solid var(--jnb-gold);
  outline-offset: 3px;
}

.cta--block { width: 100%; }

/* Secondary action. Deliberately not gold: the brand guide allows one gold
 * moment per composition, and on this page that moment is "Registreer".
 * Nothing is permitted to compete with it. */
.cta--quiet {
  color: var(--jnb-white);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--jnb-white) 34%, transparent);
}

.cta--quiet:hover {
  filter: none;
  background: color-mix(in srgb, var(--jnb-white) 8%, transparent);
  border-color: color-mix(in srgb, var(--jnb-white) 55%, transparent);
}

/* ---- Section headings --------------------------------------------------- */

.eyebrow {
  font-family: var(--jnb-font-body);
  font-weight: 500;
  font-size: var(--jnb-size-caption);
  line-height: var(--jnb-lh-caption);
  letter-spacing: var(--jnb-tr-caption);
  text-transform: uppercase;
  color: var(--jnb-gold);
  margin-bottom: var(--jnb-space-2);
}

.h1 {
  font-family: var(--jnb-font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: var(--jnb-size-h1);
  line-height: var(--jnb-lh-h1);
  letter-spacing: var(--jnb-tr-h1);
}

.lede {
  font-size: var(--jnb-size-body-lg);
  line-height: var(--jnb-lh-body-lg);
  color: var(--jnb-text-muted);
  max-width: 58ch;
}

/* ---- The essentials -----------------------------------------------------
 * Date, doors, start, venue, price. The reason people came to the page.
 * Nothing here is allowed to be subtle. */

.facts {
  display: grid;
  gap: var(--jnb-space-1);
  border: 1px solid var(--jnb-hairline);
  border-radius: var(--jnb-space-2);
  overflow: hidden;
  background: color-mix(in srgb, var(--jnb-navy) 42%, transparent);
}

.fact {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--jnb-space-1) var(--jnb-space-3);
  padding: var(--jnb-space-3);
  border-bottom: 1px solid var(--jnb-hairline);
}

.fact:last-child { border-bottom: 0; }

.fact__label {
  font-family: var(--jnb-font-body);
  font-weight: 500;
  font-size: var(--jnb-size-caption);
  letter-spacing: var(--jnb-tr-caption);
  text-transform: uppercase;
  color: var(--jnb-text-muted);
  flex: 0 0 100%;
}

.fact__value {
  font-family: var(--jnb-font-display);
  text-transform: uppercase;
  font-size: var(--jnb-size-h2);
  line-height: 1.2;
  letter-spacing: var(--jnb-display-tracking);
}

.fact__note {
  font-family: var(--jnb-font-body);
  font-size: var(--jnb-size-body);
  color: var(--jnb-text-muted);
  flex: 0 0 100%;
}

@media (min-width: 640px) {
  .facts { grid-template-columns: 1fr 1fr; gap: 0; }
  .fact { border-right: 1px solid var(--jnb-hairline); }
  .fact:nth-child(2n) { border-right: 0; }
  .fact--full { grid-column: 1 / -1; }
}

/* ---- The map ------------------------------------------------------------
 * Pinned on the exact entrance the ministry asked people to use. The map is
 * functional, not decorative — no colour filters that would fight Google's
 * own legibility. The frame does the brand work. */

.map {
  border: 1px solid var(--jnb-hairline);
  border-radius: var(--jnb-space-2);
  overflow: hidden;
  background: color-mix(in srgb, var(--jnb-navy) 42%, transparent);
}

.map iframe {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
}

.map__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--jnb-space-2);
  padding: var(--jnb-space-2) var(--jnb-space-3);
  border-top: 1px solid var(--jnb-hairline);
}

.map__hint {
  font-size: var(--jnb-size-body);
  color: var(--jnb-text-muted);
}

/* ---- Two-column text + image ------------------------------------------- */

.split { display: grid; gap: var(--jnb-space-6); align-items: center; }

@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: calc(var(--jnb-space-7) * 1.2); }
  .split--reverse > :first-child { order: 2; }
}

.frame {
  border-radius: var(--jnb-space-2);
  overflow: hidden;
  background: var(--jnb-near-black);
}

.frame img { width: 100%; height: auto; }

/* ---- People on stage ---------------------------------------------------- */

.people { display: grid; gap: var(--jnb-space-4); }

@media (min-width: 640px) { .people { grid-template-columns: 1fr 1fr; } }

.person { display: grid; gap: var(--jnb-space-2); }

.person__photo {
  border-radius: var(--jnb-space-2);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--jnb-near-black);
}

.person__photo img { width: 100%; height: 100%; object-fit: cover; }

.person__name {
  font-family: var(--jnb-font-display);
  text-transform: uppercase;
  font-size: var(--jnb-size-h2);
  letter-spacing: var(--jnb-display-tracking);
}

.person__role { color: var(--jnb-text-muted); font-size: var(--jnb-size-body); }

/* ---- Photo strip -------------------------------------------------------- */

.strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--jnb-space-1);
}

.strip img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }

.strip > * { border-radius: 6px; overflow: hidden; background: var(--jnb-near-black); }

@media (min-width: 768px) {
  .strip { grid-template-columns: repeat(4, 1fr); gap: var(--jnb-space-2); }
  .strip > *:first-child { grid-column: span 2; grid-row: span 2; }
  .strip > *:first-child img { aspect-ratio: 1 / 1; }
}

/* ---- Registration form -------------------------------------------------- */

.form-panel {
  background: color-mix(in srgb, var(--jnb-navy) 55%, transparent);
  border: 1px solid var(--jnb-hairline);
  border-radius: var(--jnb-space-2);
  padding: var(--jnb-space-4);
}

@media (min-width: 640px) { .form-panel { padding: var(--jnb-space-6); } }

.field { display: grid; gap: var(--jnb-space-1); margin-bottom: var(--jnb-space-3); }

.field label {
  font-weight: 600;
  font-size: var(--jnb-size-body);
}

.field .hint { font-size: 14px; color: var(--jnb-text-muted); }

.field input,
.field select {
  font-family: var(--jnb-font-body);
  /* 16px minimum, or iOS zooms the whole page on focus. */
  font-size: var(--jnb-size-body);
  color: var(--jnb-white);
  background: color-mix(in srgb, var(--jnb-near-black) 70%, transparent);
  border: 1px solid var(--jnb-hairline);
  border-radius: var(--jnb-space-1);
  padding: 14px var(--jnb-space-2);
  min-height: 52px;
  width: 100%;
}

.field input::placeholder { color: color-mix(in srgb, var(--jnb-white) 42%, transparent); }

.field input:focus,
.field select:focus { border-color: var(--jnb-gold); outline: none; }

.field--error input,
.field--error select { border-color: #FF8A7A; }

.field__error { font-size: 14px; color: #FF8A7A; }

@media (min-width: 640px) {
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--jnb-space-3); }
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--jnb-space-2);
  align-items: start;
  margin-block: var(--jnb-space-4);
  font-size: 15px;
  line-height: 1.55;
  color: var(--jnb-text-muted);
}

.consent input {
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--jnb-gold);
}

.form-note {
  margin-top: var(--jnb-space-3);
  font-size: 14px;
  color: var(--jnb-text-muted);
}

.form-status { margin-top: var(--jnb-space-3); font-weight: 600; }
.form-status--ok { color: var(--jnb-gold); }
.form-status--bad { color: #FF8A7A; }

/* ---- Sow a seed ---------------------------------------------------------
 * The giving portal. Premium and calm: the gold lives in the panel border
 * and the selected chip, nowhere else. Giving must never look like a
 * condition of coming, so this panel shares nothing with registration. */

.give {
  display: grid;
  gap: var(--jnb-space-4);
  align-items: center;
}

@media (min-width: 900px) {
  .give { grid-template-columns: 1fr 1fr; gap: calc(var(--jnb-space-7) * 1.2); }
}

.give__panel {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--jnb-navy) 62%, transparent),
    color-mix(in srgb, var(--jnb-near-black) 72%, transparent)
  );
  border: 1px solid color-mix(in srgb, var(--jnb-gold) 32%, transparent);
  border-radius: var(--jnb-space-2);
  padding: var(--jnb-space-4);
}

@media (min-width: 640px) { .give__panel { padding: var(--jnb-space-6); } }

.give__label {
  font-weight: 600;
  margin-bottom: var(--jnb-space-2);
}

.give__amounts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--jnb-space-1);
  margin-bottom: var(--jnb-space-3);
}

.chip {
  font-family: var(--jnb-font-body);
  font-size: var(--jnb-size-body);
  font-weight: 600;
  color: var(--jnb-white);
  background: color-mix(in srgb, var(--jnb-near-black) 70%, transparent);
  border: 1px solid var(--jnb-hairline);
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 48px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.chip:hover { border-color: color-mix(in srgb, var(--jnb-gold) 60%, transparent); }

.chip:focus-visible { outline: 2px solid var(--jnb-gold); outline-offset: 2px; }

.chip--on {
  background: var(--jnb-gold);
  border-color: var(--jnb-gold);
  color: var(--jnb-near-black);
}

.give__rand { position: relative; }

.give__rand span {
  position: absolute;
  left: var(--jnb-space-2);
  top: 50%;
  transform: translateY(-50%);
  font-weight: 600;
  color: var(--jnb-text-muted);
}

.give__rand input { padding-left: calc(var(--jnb-space-2) + 22px); }

.give__secure {
  margin-top: var(--jnb-space-2);
  font-size: 14px;
  color: var(--jnb-text-muted);
  text-align: center;
}

/* ---- Venue credit -------------------------------------------------------
 * A courtesy, not a co-brand: small, beside the map, never in a lockup
 * with the JNB mark. */

.venue-credit {
  display: flex;
  align-items: center;
  gap: var(--jnb-space-2);
  color: var(--jnb-text-muted);
  font-size: 15px;
}

.venue-credit img {
  width: 64px;
  height: 64px;
  flex: none;
}

.venue-credit strong { font-weight: 600; color: inherit; }

/* The quiet "give" pill, top right of the hero. A doorway, not a demand. */
.give-pill {
  position: absolute;
  top: var(--jnb-space-3);
  right: var(--jnb-space-3);
  z-index: 2;
  font-family: var(--jnb-font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--jnb-white);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--jnb-white) 28%, transparent);
  background: color-mix(in srgb, var(--jnb-canvas) 45%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.give-pill:hover { border-color: var(--jnb-gold); color: var(--jnb-gold); }

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

.footer {
  padding-block: var(--jnb-space-6);
  border-top: 1px solid var(--jnb-hairline);
  color: var(--jnb-text-muted);
  font-size: 15px;
}

.footer__brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--jnb-space-2);
}

.footer__brand img { opacity: 0.9; }

.footer__legal {
  font-size: var(--jnb-size-caption);
  letter-spacing: 0.06em;
  color: var(--jnb-text-muted);
}

.footer a { color: var(--jnb-white); }

/* ---- Motion (flair, kept quiet) -----------------------------------------
 * Three touches only: a slow settle on the hero, micro-zoom on image hover,
 * and the scroll-reveals driven by js/reveal.js. Everything sits behind
 * prefers-reduced-motion. */

@media (prefers-reduced-motion: no-preference) {
  .hero__media img {
    animation: hero-settle 7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  @keyframes hero-settle {
    from { transform: scale(1.05); }
    to   { transform: scale(1); }
  }

  /* The hero content rises in line by line on load. */
  .hero__inner > * {
    opacity: 0;
    animation: rise-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
  }

  .hero__inner > :nth-child(1) { animation-delay: 0.1s; }
  .hero__inner > :nth-child(2) { animation-delay: 0.2s; }
  .hero__inner > :nth-child(3) { animation-delay: 0.3s; }
  .hero__inner > :nth-child(4) { animation-delay: 0.4s; }
  .hero__inner > :nth-child(5) { animation-delay: 0.5s; }
  .hero__inner > :nth-child(6) { animation-delay: 0.65s; }
  .hero__inner > :nth-child(7) { animation-delay: 0.8s; }

  .give-pill {
    opacity: 0;
    animation: rise-in 0.7s ease 1s forwards;
  }

  @keyframes rise-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }

  .strip img,
  .frame img,
  .person__photo img {
    transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  .strip > *:hover img,
  .frame:hover img,
  .person__photo:hover img {
    transform: scale(1.03);
  }

  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity 0.6s ease,
      transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
  }

  /* Photographs and panels settle in with a touch of scale as well. */
  .frame.reveal,
  .strip > div.reveal,
  .person.reveal,
  .give__panel.reveal,
  .map.reveal {
    transform: translateY(14px) scale(0.97);
    transform-origin: center bottom;
  }

  .reveal--in {
    opacity: 1;
    transform: none;
  }

  /* A short gold dash draws itself in ahead of each section eyebrow.
   * The collapsed state only exists once JS has added .reveal, so the page
   * without JS keeps its dashes. */
  .eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) 0.25s;
    transform-origin: left center;
  }

  .reveal .eyebrow::before { transform: scaleX(0); }
  .reveal--in .eyebrow::before { transform: scaleX(1); }
}

/* ---- Utilities ---------------------------------------------------------- */

.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: var(--jnb-space-2); top: -60px;
  background: var(--jnb-gold); color: var(--jnb-near-black);
  padding: var(--jnb-space-1) var(--jnb-space-2);
  border-radius: var(--jnb-space-1); z-index: 10;
  transition: top 140ms ease;
}

.skip-link:focus { top: var(--jnb-space-2); }
