/* Motif: Exam Success — checkmarks, progress rings, step connectors */

/* ---------- Animated checkmark for hero ---------- */
@keyframes motif-checkmark-draw {
  0% { stroke-dashoffset: 48; }
  100% { stroke-dashoffset: 0; }
}

@keyframes motif-ring-fill {
  0% { stroke-dashoffset: 283; }
  100% { stroke-dashoffset: 28; }
}

@keyframes motif-fade-in {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- Hero accent: animated checkmark + progress ring ---------- */
.motif-hero-accent {
  position: relative;
  overflow: hidden;
}

.motif-hero-accent::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 5%;
  width: 180px;
  height: 180px;
  transform: translateY(-50%);
  opacity: 0.09;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Ccircle cx='60' cy='60' r='45' fill='none' stroke='%23ffffff' stroke-width='6' stroke-dasharray='283' stroke-dashoffset='28' stroke-linecap='round' transform='rotate(-90 60 60)'/%3E%3Cpath d='M38 60 L53 75 L82 45' fill='none' stroke='%23ffffff' stroke-width='6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ---------- Inline animated progress ring + checkmark component ---------- */
.motif-check-ring {
  display: inline-block;
  width: 64px;
  height: 64px;
  animation: motif-fade-in 0.5s ease-out;
}

.motif-check-ring svg {
  width: 100%;
  height: 100%;
}

.motif-check-ring .ring {
  fill: none;
  stroke: var(--accent, #d97706);
  stroke-width: 4;
  stroke-dasharray: 283;
  stroke-dashoffset: 28;
  stroke-linecap: round;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: motif-ring-fill 1.2s ease-out forwards;
}

.motif-check-ring .check {
  fill: none;
  stroke: var(--primary, #1e3a5f);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: motif-checkmark-draw 0.5s 0.6s ease-out forwards;
}

/* ---------- Section divider: step-line connector ---------- */
.motif-divider {
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.motif-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent, #d97706) 15%,
    var(--accent, #d97706) 85%,
    transparent
  );
  opacity: 0.25;
}

.motif-divider::after {
  content: "";
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface, #fff);
  border: 2px solid var(--accent, #d97706);
  box-shadow: 0 0 0 4px var(--surface, #fff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8 L7 11 L12 5' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}

/* ---------- Progress bar accent ---------- */
.motif-progress-bar {
  width: 100%;
  max-width: 400px;
  height: 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
  position: relative;
}

.motif-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: var(--progress, 90%);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary, #1e3a5f), var(--accent, #d97706));
  transition: width 1s ease-out;
}

/* ---------- Step connector line (vertical) ---------- */
.motif-step-connector {
  width: 2px;
  min-height: 40px;
  margin: 0 auto;
  background: repeating-linear-gradient(
    180deg,
    var(--accent, #d97706) 0,
    var(--accent, #d97706) 6px,
    transparent 6px,
    transparent 12px
  );
  opacity: 0.35;
}

/* ---------- Icons: checkmark and progress ---------- */
.motif-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.motif-icon--check {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23166534' stroke-width='1.8'/%3E%3Cpath d='M7 12 L10.5 15.5 L17 8.5' fill='none' stroke='%23166534' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.motif-icon--progress {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23e5e7eb' stroke-width='3'/%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='%23166534' stroke-width='3' stroke-dasharray='57' stroke-dashoffset='8' stroke-linecap='round' transform='rotate(-90 12 12)'/%3E%3C/svg%3E");
}

/* ---------- Background decoration: scattered small checkmarks ---------- */
.motif-bg-checks {
  position: relative;
}

.motif-bg-checks::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Cpath d='M25 42 L33 50 L55 28' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 80px 80px;
}
