/*
 * UNOC homepage "Progress with purpose" section redesign
 * Enqueued after unoc-enhancements.css to override the previous treatment.
 */

/* ------------------------------------------------------------------
   Section shell
   ------------------------------------------------------------------ */
.unoc-purpose {
  background: #1A191A;
  color: #FFFFFF;
}

/* Remove any legacy decorative wiring that may still be generated. */
.unoc-purpose .thread-svg,
.unoc-purpose .drop-wrap,
.unoc-purpose .drop-photo,
.unoc-purpose .drop-glow,
.unoc-purpose .drop-icon,
.unoc-purpose .flag-bands,
.unoc-purpose .spark-burst,
.unoc-purpose .badge {
  display: none !important;
}

/* ------------------------------------------------------------------
   Hero header
   ------------------------------------------------------------------ */
.unoc-purpose .purpose-hero {
  position: relative;
  background: #1A191A;
  color: #FFFFFF;
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}

.unoc-purpose .purpose-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.unoc-purpose .purpose-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}

.unoc-purpose .section-heading.narrow {
  max-width: none;
}

.unoc-purpose .purpose-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--unoc-font-brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--unoc-yellow);
}

.unoc-purpose .purpose-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--unoc-yellow);
}

.unoc-purpose h2 {
  margin: 0;
  font-family: var(--unoc-font-brand);
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #FFFFFF;
}

.unoc-purpose h2 .accent {
  color: var(--unoc-yellow);
}

.unoc-purpose .purpose-side {
  padding-left: 0;
  border-left: none;
}

.unoc-purpose .purpose-side p {
  margin: 0;
  font-family: var(--unoc-font-body);
  font-size: clamp(0.9375rem, 1.1vw, 1.0625rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

/* ------------------------------------------------------------------
   Cards grid
   ------------------------------------------------------------------ */
.unoc-purpose .commit-grid-wrap {
  position: relative;
  background: #1A191A;
  padding: 0 0 clamp(4rem, 8vw, 7rem);
}

.unoc-purpose .commit-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.2vw, 1.75rem);
}

.unoc-purpose .commit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border-radius: var(--unoc-radius-lg, 18px);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.unoc-purpose .commit-card:hover,
.unoc-purpose .commit-card:focus-visible {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px -20px rgba(0, 0, 0, 0.35);
}

.unoc-purpose .commit-card:focus-visible {
  outline: 2px solid var(--unoc-yellow);
  outline-offset: 4px;
}

/* Card colour themes */
.unoc-purpose .commit-card.c1 {
  background: #242325;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.unoc-purpose .commit-card.c2 {
  background: #FFFFFF;
  color: #1A191A;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.unoc-purpose .commit-card.c3 {
  background: var(--unoc-yellow);
  color: #1A191A;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Top row: number + icon */
.unoc-purpose .card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: auto;
}

.unoc-purpose .card-num {
  font-family: var(--unoc-font-brand);
  font-weight: 700;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.85;
  letter-spacing: -0.03em;
  opacity: 0.16;
  user-select: none;
}

.unoc-purpose .commit-card.c3 .card-num {
  opacity: 0.22;
}

.unoc-purpose .card-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  color: currentColor;
  opacity: 0.92;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.unoc-purpose .card-icon svg {
  width: 100%;
  height: 100%;
}

.unoc-purpose .commit-card:hover .card-icon,
.unoc-purpose .commit-card:focus-visible .card-icon {
  transform: scale(1.14) rotate(5deg);
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
}

.unoc-purpose .commit-card.c1:hover .card-icon,
.unoc-purpose .commit-card.c1:focus-visible .card-icon {
  filter: drop-shadow(0 8px 14px rgba(255, 200, 8, 0.18));
}

/* Body */
.unoc-purpose .card-body {
  position: relative;
  z-index: 2;
  margin-top: 2rem;
}

.unoc-purpose .card-body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--unoc-font-brand);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.6vw, 1.625rem);
  line-height: 1.15;
  color: currentColor;
}

.unoc-purpose .card-body p {
  margin: 0 0 1.5rem;
  font-family: var(--unoc-font-body);
  font-size: clamp(0.875rem, 0.95vw, 0.9375rem);
  line-height: 1.65;
  color: currentColor;
  opacity: 0.84;
  max-width: 34ch;
}

.unoc-purpose .card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--unoc-font-brand);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: currentColor;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: currentColor;
  transition: opacity 0.2s ease;
}

.unoc-purpose .card-cta:hover {
  opacity: 0.75;
}

/* Circular arrow button */
.unoc-purpose .card-arrow {
  position: absolute;
  right: clamp(1.25rem, 2vw, 2rem);
  bottom: clamp(1.25rem, 2vw, 2rem);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid currentColor;
  color: currentColor;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.unoc-purpose .card-arrow svg {
  width: 18px;
  height: 18px;
}

.unoc-purpose .commit-card.c1 .card-arrow:hover {
  background: #FFFFFF;
  color: #1A191A;
  transform: rotate(45deg);
}

.unoc-purpose .commit-card.c2 .card-arrow:hover,
.unoc-purpose .commit-card.c3 .card-arrow:hover {
  background: #1A191A;
  color: #FFFFFF;
  transform: rotate(45deg);
}

/* ------------------------------------------------------------------
   Reveal animations
   ------------------------------------------------------------------ */
.unoc-purpose .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.unoc-purpose .reveal.in,
.unoc-purpose .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .unoc-purpose .purpose-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: start;
  }

  .unoc-purpose .purpose-side {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
  }

  .unoc-purpose .commit-grid {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .unoc-purpose .commit-card {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .unoc-purpose h2 {
    font-size: clamp(1.75rem, 9vw, 2.5rem);
  }

  .unoc-purpose .card-icon {
    width: 48px;
    height: 48px;
  }

  .unoc-purpose .card-num {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
}
