/* ANC Sedibeng Region - Local Government Elections 2026 countdown
   Brand colours from the ANC colour chart: black #030000, green #00A65A, gold #FFCB03 */

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

:root {
  --ink:    #030000;
  --green:  #00A65A;
  --gold:   #FFCB03;

  --led-on:  #5CFF86;
  --led-off: #0C2A19;

  --display: "Archivo Black", "Arial Black", Impact, system-ui, sans-serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --curve-h: clamp(42px, 5.2vw, 76px);
}

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

body {
  margin: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.poster {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1400px;
  margin: 0 auto;
  overflow: hidden;
}

/* hero */

.hero {
  --emblem: clamp(116px, 16vw, 190px);
  background: var(--ink);
  text-align: center;
  padding: clamp(22px, 3.6vw, 46px) clamp(16px, 4vw, 40px) clamp(6px, 1.2vw, 16px);
}

.hero__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4vw, 18px);
}

.emblem {
  display: block;
  width: var(--emblem);
  height: auto;
}

/* the strapline sits under the emblem, its ends flush with where the logo
   finishes at the bottom (the flagpole on the left, the C on the right) */
.hero__region {
  display: block;
  position: relative;
  left: calc(var(--emblem) * .105);
  width: calc(var(--emblem) * .752);
  height: auto;
}

/* stage */

.stage {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* the chevron tile is opaque, so the flat gold only shows if it fails to load */
  background: var(--gold) url("assets/anc-pattern.svg") repeat;
  background-size: 1407.44px 1407.44px;
  overflow: hidden;
  isolation: isolate;
}

.curve {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--curve-h);
  display: block;
  pointer-events: none;
}
.curve--top    { top: 0; }
.curve--bottom { bottom: 0; }

.stage__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding:
    calc(var(--curve-h) + clamp(14px, 2.4vw, 34px))
    clamp(16px, 4vw, 40px)
    calc(var(--curve-h) + clamp(14px, 2.4vw, 34px));
}

/* countdown */

.timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.8vw, 26px);
}

.led {
  flex: 1 1 auto;
  max-width: 820px;
  position: relative;
  overflow: hidden;
  border-radius: clamp(8px, 1.1vw, 15px);
  padding: clamp(9px, 1.5vw, 21px) clamp(13px, 2.3vw, 33px);
  background-color: #04120A;
  background-image: radial-gradient(rgba(120, 255, 160, .10) 1px, transparent 1.4px);
  background-size: 6px 6px;
  box-shadow:
    inset 0 0 0 2px #123021,
    inset 0 0 0 5px #08170E,
    0 16px 34px rgba(0, 0, 0, .32);
}

.led::before {                       /* glass reflection */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 42%);
}

.led::after {                        /* LED beading */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .58) 52%);
  background-size: 6px 6px;
  mix-blend-mode: multiply;
}

.led__screen { position: relative; z-index: 2; }

.led__screen svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.seg-off path { fill: var(--led-off); }
.seg-on path,
.seg-on rect { fill: var(--led-on); }

.led--done .seg-on path,
.led--done .seg-on rect { fill: var(--gold); }

/* hours-to-go badges */

.badges {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: .22em;
}

.badge {
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  border-radius: .3em;
  padding: .32em .58em;
  font-size: clamp(17px, 2.7vw, 40px);
}

.badge--hours {
  background: var(--green);
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.badge--togo {
  background: #fff;
  color: var(--ink);
}

/* banner */

.banner {
  margin: clamp(20px, 3.2vw, 44px) auto 0;
  background: var(--ink);
  color: var(--gold);
  border-radius: clamp(10px, 1.5vw, 26px);
  padding: clamp(12px, 2.1vw, 30px) clamp(16px, 3.4vw, 54px);
  text-align: center;
  font-family: var(--display);
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: .004em;
  font-size: clamp(21px, 4.9vw, 60px);
}

/* pills */

.pills {
  margin-top: clamp(16px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pill {
  font-family: var(--display);
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  padding: .26em .9em;
  border-radius: clamp(8px, 1.1vw, 20px);
  font-size: clamp(19px, 4.4vw, 54px);
  max-width: 100%;
}

.pill--green { background: var(--green); color: #fff; }
.pill--white { background: #fff; color: var(--ink); margin-top: -.13em; padding-inline: 1.1em; }

.meta {
  margin: clamp(16px, 2.4vw, 30px) 0 0;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: clamp(10px, 1.35vw, 15px);
  font-weight: 800;
  color: rgba(3, 0, 0, .55);
}

/* videos */

.videos { margin-top: clamp(30px, 4.4vw, 62px); }

.videos__title {
  margin: 0 0 clamp(16px, 2.2vw, 30px);
  font-family: var(--display);
  text-transform: uppercase;
  text-align: center;
  letter-spacing: .02em;
  color: var(--ink);
  font-size: clamp(18px, 3.1vw, 34px);
  line-height: 1;
}

.videos__title::after {                 /* green rule */
  content: "";
  display: block;
  width: clamp(48px, 6.5vw, 86px);
  height: 5px;
  margin: .55em auto 0;
  border-radius: 3px;
  background: var(--green);
}

.videos__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(12px, 1.7vw, 22px);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}

.video {
  background: var(--ink);
  border-radius: clamp(8px, 1.1vw, 14px);
  overflow: hidden;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  transition: transform .18s ease, box-shadow .18s ease;
}
.video:hover { transform: translateY(-3px); box-shadow: 0 16px 28px rgba(0, 0, 0, .26); }

.video__thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(130% 130% at 50% 0%, #16281C 0%, #04120A 72%);
}

.video__thumb::before {                 /* placeholder texture */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg, rgba(255, 255, 255, .05) 0 2px, rgba(255, 255, 255, 0) 2px 9px
  );
}

.video__img {                           /* YouTube thumbnail, cropped past its letterbox */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video__len {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 2;
  padding: .2em .5em;
  border-radius: 4px;
  background: rgba(3, 0, 0, .78);
  color: #fff;
  font-size: clamp(10px, 1.05vw, 12px);
  font-weight: 700;
  letter-spacing: .02em;
}

.video__num {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: .22em .6em;
  border-radius: 999px;
  background: rgba(3, 0, 0, .6);
  color: var(--gold);
  font-family: var(--display);
  font-size: clamp(10px, 1.05vw, 12px);
  letter-spacing: .08em;
}

.video__play {
  --s: clamp(42px, 5vw, 62px);
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--s);
  height: var(--s);
  z-index: 2;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
  transition: transform .18s ease, background .18s ease;
}
.video__play::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 0;
  height: 0;
  border-left: calc(var(--s) * .30) solid #fff;
  border-top: calc(var(--s) * .19) solid transparent;
  border-bottom: calc(var(--s) * .19) solid transparent;
  transform: translateX(calc(var(--s) * .05));
}
.video__thumb:hover .video__play,
.video__thumb:focus-visible .video__play { transform: scale(1.08); background: #00B864; }

.video__thumb:focus-visible { outline: 3px solid var(--green); outline-offset: -3px; }

.video__caption {
  margin: 0;
  padding: clamp(9px, 1.1vw, 14px) clamp(11px, 1.3vw, 16px);
  color: #fff;
  font-size: clamp(11px, 1.25vw, 14px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
}

/* lead card: the full documentary, across the whole row */

.video--lead { grid-column: 1 / -1; }

@media (min-width: 701px) {
  .video--lead {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
  }
  .video--lead .video__caption {
    padding: clamp(16px, 2.4vw, 32px);
    font-family: var(--display);
    font-weight: 400;
    text-transform: uppercase;
    font-size: clamp(17px, 2.2vw, 26px);
    line-height: 1.15;
  }
}

/* footer */

.foot { background: var(--ink); }

.foot__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vw, 64px);
  padding: clamp(22px, 3.4vw, 50px) clamp(18px, 4vw, 40px) clamp(14px, 2.2vw, 28px);
}

.anniv { display: block; width: clamp(82px, 10.5vw, 122px); height: auto; }

.womens { display: flex; align-items: center; gap: .45em; }

.womens__70 {
  font-family: var(--display);
  font-size: clamp(38px, 6.2vw, 72px);
  line-height: .82;
  color: var(--green);
  transform: skewX(-8deg);
}

.womens__txt {
  display: flex;
  flex-direction: column;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.34;
  font-size: clamp(10px, 1.3vw, 16px);
}
.womens__txt i { font-style: normal; color: var(--gold); }

/* the VOTE ANC artwork is transparent and sits straight on the black footer */
.vote { line-height: 0; }
.vote img { display: block; width: clamp(138px, 19vw, 250px); height: auto; }

/* decorative triangle band */
.strip {
  height: 22px;
  background-repeat: repeat-x;
  background-size: auto 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='22' viewBox='0 0 80 22'%3E%3Crect width='80' height='22' fill='%23030000'/%3E%3Cpath d='M1 22 L20 2 L39 22 Z' fill='%23FFCB03'/%3E%3Cpath d='M41 22 L60 2 L79 22 Z' fill='%2300A65A'/%3E%3C/svg%3E");
}

.credit {
  margin: 0;
  background: #fff;
  color: var(--ink);
  text-align: center;
  padding: clamp(8px, 1.2vw, 14px) 16px;
  font-size: clamp(11px, 1.5vw, 15px);
  font-weight: 600;
  letter-spacing: .01em;
}
.credit strong { font-weight: 800; }

/* responsive */

@media (max-width: 700px) {
  .timer { flex-direction: column; gap: 12px; }
  .led { width: 100%; max-width: none; }
  .badges { flex-direction: row; }
  .pill--white { padding-inline: .9em; }
}

@media (max-width: 560px) {
  .videos__grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 148px), 1fr));
    gap: 10px;
  }
  .video__caption { padding: 8px 10px; }
}

@media (max-width: 420px) {
  .foot__inner { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
