/* baseline reset (auto-injected) */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
ul, ol { list-style: none; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ─── CSS Custom Properties ─────────────────────────────────────── */
:root {
  --color-primary: #075985;
  --color-accent: #ED7119;
  --color-background: #FFF8EE;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-muted: #929292;
  --color-accent-dark: #C25B0A;
  --color-primary-dark: #054266;
  --color-win-green: #1B7A4A;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-card: 0 4px 24px rgba(7,89,133,0.13);
  --shadow-btn: 0 4px 16px rgba(237,113,25,0.35);

  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ─── Base ───────────────────────────────────────────────────────── */
html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
}

body {
  background-image: url('../images/hero-bg.webp');
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* soft overlay so text stays readable over the bg photo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(7,89,133,0.55) 0%,
    rgba(0,0,0,0.25) 50%,
    rgba(237,113,25,0.30) 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* ─── Layout Shell ───────────────────────────────────────────────── */
.main {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content__wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
}

/* ─── Header ─────────────────────────────────────────────────────── */
.header {
  background: rgba(7,89,133,0.92);
  backdrop-filter: blur(6px);
  padding: 10px 16px;
  text-align: center;
  border-bottom: 3px solid var(--color-accent);
}

.header .content__wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: center;
  align-items: center;
}

.header__text {
  font-size: clamp(12px, 2.5vw, 15px);
  color: #FFFFFF;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}

.header__date {
  font-weight: 700;
  white-space: nowrap;
  color: var(--color-accent);
}

[dir=rtl] .header__text  { direction: rtl; }
[dir=rtl] .header__date  { direction: rtl; }

/* ─── Content / Survey section ───────────────────────────────────── */
.content {
  padding: 24px 0 8px;
  flex: 1;
}

.survey {
  background: rgba(255,255,255,0.93);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 36px) clamp(24px, 4vw, 40px);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.survey::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
}

.survey__date {
  font-size: clamp(13px, 2vw, 16px);
  color: var(--color-text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

[dir=rtl] .survey__date  { text-align: right; }
[dir=rtl] .survey__title { text-align: right; }
[dir=rtl] .survey__text  { text-align: right; }

.survey__title {
  font-size: clamp(22px, 4.5vw, 32px);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 8px;
  line-height: 1.2;
  text-wrap: balance;
}

.survey__text {
  font-size: clamp(14px, 2vw, 16px);
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 6px;
  overflow-wrap: break-word;
}

.survey-container {
  margin-top: 28px;
  width: 100%;
  position: relative;
}

/* ─── Survey Step ────────────────────────────────────────────────── */
.step {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 24px 20px 28px;
  box-shadow: 0 2px 12px rgba(7,89,133,0.10);
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

.step.step__final {
  background-color: transparent;
  padding: 0;
  box-shadow: none;
}

.step__body {
  margin-bottom: 20px;
}

.step__question {
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.35;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.step__answers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: stretch;
}

/* ─── Answer Buttons ─────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  font-size: clamp(15px, 2.5vw, 18px);
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--color-accent) 0%, #C25B0A 100%);
  color: #FFFFFF;
  box-shadow: var(--shadow-btn);
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
  letter-spacing: 0.03em;
  user-select: none;
  -webkit-user-select: none;
  text-align: center;
  overflow-wrap: break-word;
  min-width: 0;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(237,113,25,0.45);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ─── AI Wheel Shell ─────────────────────────────────────────────── */
.mystery-box-ai-wheel {
  --ai-wheel-label-color: #FFFFFF;
  --ai-wheel-label-bg: transparent;
  --ai-wheel-label-pad: 0.2em 0.5em;
  --ai-wheel-image-size: 28cqmin;
  --ai-wheel-pointer-color: #ED7119;
  --ai-wheel-ring-color: #ED7119;
  --ai-wheel-ring-width: 6px;
  --ai-wheel-glow: 0 0 18px rgba(237,113,25,0.55);

  position: relative;
  display: grid;
  place-items: center;
  width: clamp(260px, 88vw, 382px);
  aspect-ratio: 1 / 1;
  margin: 24px auto 8px;
}

.mystery-box-ai-wheel[hidden] {
  display: none;
}

.mystery-box-ai-wheel__spin {
  grid-area: 1 / 1;
  z-index: 4;
  width: clamp(54px, 18cqmin, 80px);
  height: auto;
  pointer-events: none;
}

/* ─── Wheel section wrapper ──────────────────────────────────────── */
.wheel-section {
  padding-bottom: 16px;
}

/* ─── Comments ───────────────────────────────────────────────────── */
.comments {
  padding: 24px 0;
}

.comments__item {
  background: rgba(255,255,255,0.93);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 20px 20px 16px;
}

.comments__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.comments__count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--color-primary);
}

.count {
  padding: 2px 8px;
  background-color: #f2f4f7;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

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

.sort__text {
  cursor: pointer;
}

.comments__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Comment Card ───────────────────────────────────────────────── */
.comment__card {
  background: var(--color-background);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  position: relative;
}

.comment__header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-accent);
}

[dir=rtl] .avatar { margin-right: 0; margin-left: 8px; }

.user-info {
  flex: 1;
  min-width: 0;
}

.username {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  display: block;
  color: var(--color-primary);
  overflow-wrap: break-word;
}

.comment__text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  overflow-wrap: break-word;
}

.time__ago {
  font-size: 12px;
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--color-text-muted);
}

[dir=rtl] .time__ago { right: auto; left: 12px; }

.comment__footer {
  display: flex;
  align-items: center;
  margin-top: 6px;
  margin-left: 48px;
}

[dir=rtl] .comment__footer { margin-left: 0; margin-right: 48px; }

.like__count {
  cursor: pointer;
  font-size: 12px;
  color: var(--color-text-muted);
}

.reply {
  cursor: pointer;
  margin-left: 8px;
  font-size: 12px;
  color: var(--color-primary);
  font-weight: 600;
}

[dir=rtl] .reply { margin-left: 0; margin-right: 8px; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.footer {
  background: rgba(7,89,133,0.92);
  backdrop-filter: blur(6px);
  padding: 14px 16px;
  margin-top: auto;
}

.footer__content__wrapper {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
}

.copyright {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
}

/* ─── Confetti ───────────────────────────────────────────────────── */
@keyframes snow {
  0%   { background-position: 0 0, 0 0, 0 0; }
  50%  { background-position: 500px 500px, 100px 400px, -200px 300px; }
  100% { background-position: 500px 1000px, 200px 800px, -200px 600px; }
}

.confetti {
  display: none;
  animation: snow 13s linear infinite;
  background-image:
    url('../images/confetti-1.webp'),
    url('../images/confetti-2.webp'),
    url('../images/confetti-3.webp');
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: none;
}

/* ─── Modals ─────────────────────────────────────────────────────── */
.hidden {
  display: none !important;
}

#modal-first,
#modal-try,
#modal-congrats {
  display: none;
}

.overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  padding: 16px;
  box-sizing: border-box;
}

.overlay--congrats {
  background-image: url('../images/reveal-bg.webp');
  background-size: cover;
  background-position: center;
  background-color: rgba(7,89,133,0.65);
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.28);
  padding: clamp(24px, 5vw, 40px) clamp(20px, 5vw, 36px);
  width: 100%;
  max-width: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

/* Modal First */
.modal-first {
  border-top: none;
}

.modal-first__title {
  font-size: clamp(18px, 3.5vw, 24px);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.3;
  text-wrap: balance;
  margin-top: 8px;
}

.modal-first__img {
  width: clamp(120px, 50%, 180px);
  height: auto;
  object-fit: contain;
  margin: 4px auto;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 8px 20px rgba(237,113,25,0.35));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-first__img { animation: none; }
}

.modal-first__text {
  font-size: clamp(13px, 2vw, 15px);
  color: var(--color-text);
  line-height: 1.6;
  overflow-wrap: break-word;
}

.modal-first__btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  min-height: 52px;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent) 0%, #C25B0A 100%);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  letter-spacing: 0.05em;
  transition: transform 200ms ease, box-shadow 200ms ease;
  margin-top: 4px;
  user-select: none;
  -webkit-user-select: none;
}

.modal-first__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(237,113,25,0.5);
}

.modal-first__btn:active {
  transform: translateY(0);
}

.modal-first__btn:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .modal-first__btn { transition: none; }
}

/* Modal Try / Congrats */
.modal-text {
  gap: 12px;
}

.modal-text__title {
  font-size: clamp(22px, 4.5vw, 32px);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.2;
  text-wrap: balance;
}

.modal-congrats .modal-text__title {
  color: #FFD700;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.modal-congrats {
  background: rgba(7,50,80,0.92);
}

.modal-congrats .modal-text__text {
  color: rgba(255,255,255,0.92);
}

.modal-congrats::before {
  background: linear-gradient(90deg, #FFD700, var(--color-accent));
}

.modal-text__text {
  font-size: clamp(14px, 2.5vw, 17px);
  color: var(--color-text);
  line-height: 1.6;
  overflow-wrap: break-word;
}

.modal-text__btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  min-height: 52px;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: 800;
  border: none;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent) 0%, #C25B0A 100%);
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  letter-spacing: 0.05em;
  transition: transform 200ms ease, box-shadow 200ms ease;
  margin-top: 4px;
  user-select: none;
  -webkit-user-select: none;
}

.modal-try .modal-text__btn {
  background: linear-gradient(135deg, var(--color-primary) 0%, #043a5e 100%);
  box-shadow: 0 4px 16px rgba(7,89,133,0.35);
}

.modal-text__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(237,113,25,0.5);
}

.modal-text__btn:active {
  transform: translateY(0);
}

.modal-text__btn:focus-visible {
  outline: 3px solid #FFD700;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .modal-text__btn { transition: none; }
}

/* Modal Close */
.modal__close {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.07);
  border: none;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 400;
  color: #555;
  cursor: pointer;
  transition: background 150ms ease;
  z-index: 10;
}

.modal__close:hover {
  background: rgba(0,0,0,0.15);
}

.modal__close--light {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.1);
}

.modal__close--light:hover {
  background: rgba(255,255,255,0.2);
}

/* ─── Desktop enhancements ───────────────────────────────────────── */
@media (min-width: 768px) {
  .content {
    padding: 32px 0 16px;
  }
  .survey {
    padding: 40px 48px 44px;
  }
  .step {
    padding: 28px 32px 36px;
  }
  .mystery-box-ai-wheel {
    width: 382px;
  }
}

@media (min-width: 1200px) {
  .survey__title {
    font-size: 34px;
  }
}

html,
body {
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}


/* Nigeria testimonial tweaks */
.comment__card .avatar,
.avatar {
    object-fit: cover;
    border-radius: 50%;
}
.comment__text {
    line-height: 1.28;
}
.like__count {
    color: #6b7280;
}
