/* =============================================
   NBV Customer Survey — Stylesheet
   National Bank of Vanuatu
   Version: 2.0
   ============================================= */

/* ---------- CSS Custom Properties ---------- */
:root {
  --primary-color: #0c7e42;
  --primary-light: #10a556;
  --primary-dark: #096b37;
  --primary-deep: #064d28;
  --accent-gold: #D4A843;
  --accent-gold-hover: #C49A38;

  --bg-body: #F4F7F5;
  --bg-card: #FFFFFF;
  --bg-field: #F0F5F2;
  --bg-sand: #E8EFE9;

  --text-primary: #1A2E23;
  --text-secondary: #4A6355;
  --text-muted: #7A9488;
  --text-white: #FFFFFF;

  --border-light: rgba(12, 126, 66, 0.08);
  --border-field: rgba(12, 126, 66, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 50px;

  --shadow-card: 0 2px 20px rgba(12, 126, 66, 0.06);
  --shadow-card-hover: 0 6px 32px rgba(12, 126, 66, 0.1);
  --shadow-btn: 0 4px 20px rgba(12, 126, 66, 0.25);
  --shadow-btn-hover: 0 8px 32px rgba(12, 126, 66, 0.35);

  --gradient-primary: linear-gradient(135deg, rgba(12, 126, 66, 0.9) 0%, rgba(16, 165, 86, 0.9) 100%);
  --gradient-solid: linear-gradient(135deg, #0c7e42 0%, #10a556 100%);
  --gradient-dark: linear-gradient(135deg, #064d28 0%, #0c7e42 100%);

  --transition-fast: 0.2s ease;
  --transition-med: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'roboto', sans-serif;
  background: #000000 var(--bg-body);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Hero Header ---------- */
.survey-hero {
  background: #000000;
  padding: 2.5rem 1.5rem 4.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.survey-hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -120px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.survey-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 48px;
  background: var(--bg-body);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* ========== Logo Container ========== */
.logo-container {
  float: left;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  background-color: var(--primary-light);
  box-sizing: border-box;
}

.logo-container img {
  height: 64px;
  width: auto;
  transition: transform var(--transition-fast);
}

/* Logo */
.hero-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  animation: fadeDown 0.5s ease-out;
}

.hero-logo img {
  height: 64px;
  width: auto;
  transition: transform var(--transition-fast);
}

.hero-logo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 220px;
  height: 64px;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}

.hero-logo-placeholder svg {
  width: 20px;
  height: 20px;
  opacity: 0.7;
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  animation: fadeDown 0.5s ease-out 0.1s both;
}

.hero-badge svg {
  width: 14px;
  height: 14px;
}

.survey-hero h1 {
  font-family: 'Fraunces', serif;
  color: var(--text-white);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 600;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
  animation: fadeDown 0.5s ease-out 0.15s both;
}

.survey-hero p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  font-weight: 400;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeDown 0.5s ease-out 0.25s both;
}

.hero-stats {
  display: inline-flex;
  gap: 2rem;
  margin-top: 1.5rem;
  animation: fadeDown 0.5s ease-out 0.35s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-white);
}

.hero-stat-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ---------- Progress Bar ---------- */
.progress-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 14px 1.5rem;
}

.progress-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 48px;
}

.progress-track {
  flex: 1;
  height: 6px;
  background: var(--bg-sand);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-solid);
  border-radius: 10px;
  width: 0%;
  transition: width var(--transition-slow);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  border-radius: 0 10px 10px 0;
}

.progress-percent {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  min-width: 32px;
  text-align: right;
}

/* ---------- Form Container ---------- */
.form-container {
  max-width: 680px;
  margin: -0.5rem auto 3rem;
  padding: 0 1.5rem;
}

/* ---------- Section Cards ---------- */
.section-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2.2rem 2.2rem 2.4rem;
  margin-bottom: 1.2rem;
  border: 1px solid var(--border-light);
  opacity: 0;
  transform: translateY(20px);
  transition: box-shadow var(--transition-med), transform var(--transition-med);
}

.section-card.visible {
  opacity: 1;
  transform: translateY(0);
  animation: cardSlideIn 0.5s ease-out forwards;
}

.section-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 1.6rem;
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient-solid);
  color: var(--text-white);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(12, 126, 66, 0.2);
}

.section-header-text {
  flex: 1;
}

.section-title {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  color: var(--primary-deep);
  font-weight: 600;
  line-height: 1.3;
}

.section-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

/* ---------- Field Groups ---------- */
.field-group {
  margin-bottom: 1.6rem;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.field-label .required {
  color: var(--primary-light);
  margin-left: 2px;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 400;
}

/* ---------- Select & Input ---------- */
.form-select,
.form-input,
.form-textarea {
  width: 100%;
  padding: 13px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: var(--bg-field);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237A9488' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary-color);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(12, 126, 66, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-select::placeholder,
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* ---------- Radio Pill Options ---------- */
.options-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.option-pill {
  position: relative;
}

.option-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.option-pill label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-field);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.option-pill label:hover {
  background: var(--bg-sand);
  border-color: rgba(12, 126, 66, 0.2);
  color: var(--text-primary);
}

.option-pill input[type="radio"]:checked + label {
  background: var(--gradient-solid);
  color: var(--text-white);
  border-color: transparent;
  box-shadow: 0 3px 14px rgba(12, 126, 66, 0.25);
}

.option-pill input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ---------- Likert Scale ---------- */
.likert-scale {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--bg-sand);
  background: var(--bg-card);
}

.likert-option {
  flex: 1;
  position: relative;
}

.likert-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.likert-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 6px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-right: 1px solid var(--bg-sand);
  min-height: 78px;
  line-height: 1.3;
}

.likert-option:last-child label {
  border-right: none;
}

.likert-option label:hover {
  background: var(--bg-field);
  color: var(--text-secondary);
}

.likert-option input[type="radio"]:checked + label {
  background: var(--gradient-solid);
  color: var(--text-white);
  font-weight: 600;
}

.likert-option input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--primary-color);
  outline-offset: -2px;
}

.likert-emoji {
  font-size: 1.4rem;
  margin-bottom: 4px;
  line-height: 1;
}

/* ---------- Checkbox Cards ---------- */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.checkbox-card {
  position: relative;
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.checkbox-card label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-field);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.checkbox-card label:hover {
  border-color: rgba(12, 126, 66, 0.2);
  background: var(--bg-sand);
  color: var(--text-primary);
}

.checkbox-card input[type="checkbox"]:checked + label {
  border-color: var(--primary-color);
  background: rgba(12, 126, 66, 0.06);
  color: var(--primary-dark);
  font-weight: 600;
}

.checkbox-card input[type="checkbox"]:focus-visible + label {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.checkbox-icon {
  width: 22px;
  height: 22px;
  border: 2px solid var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.checkbox-card input[type="checkbox"]:checked + label .checkbox-icon {
  background: var(--gradient-solid);
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(12, 126, 66, 0.2);
}

.checkbox-icon svg {
  width: 12px;
  height: 12px;
  stroke: var(--text-white);
  stroke-width: 3;
  fill: none;
  opacity: 0;
  transform: scale(0.5);
  transition: all var(--transition-fast);
}

.checkbox-card input[type="checkbox"]:checked + label .checkbox-icon svg {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Submit Section ---------- */
.submit-section {
  text-align: center;
  padding: 1.5rem 0 2rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 52px;
  background: var(--gradient-solid);
  color: var(--text-white);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-med);
  box-shadow: var(--shadow-btn);
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.15) 100%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-btn-hover);
}

.submit-btn:hover::before {
  opacity: 1;
}

.submit-btn:active {
  transform: translateY(-1px);
}

.submit-btn svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.submit-btn:hover svg {
  transform: translateX(3px);
}

.submit-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 14px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.submit-note svg {
  width: 14px;
  height: 14px;
  stroke: var(--text-muted);
}

/* ---------- Success Overlay ---------- */
.success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 77, 40, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.success-overlay.active {
  display: flex;
}

.success-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 440px;
  width: 100%;
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.success-icon {
  width: 72px;
  height: 72px;
  background: var(--gradient-solid);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
  box-shadow: 0 6px 24px rgba(12, 126, 66, 0.3);
}

.success-icon svg {
  width: 34px;
  height: 34px;
  stroke: var(--text-white);
  stroke-width: 2.5;
  fill: none;
}

.success-card h2 {
  font-family: 'Fraunces', serif;
  color: var(--primary-deep);
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.success-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.6;
}

.success-close-btn {
  margin-top: 1.5rem;
  display: inline-flex;
  padding: 10px 30px;
  background: var(--bg-field);
  border: none;
  border-radius: var(--radius-pill);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.success-close-btn:hover {
  background: var(--bg-sand);
}

/* ---------- Footer ---------- */
.survey-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--bg-sand);
  background: var(--bg-card);
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.8rem;
}

.footer-logo-placeholder {
  height: 32px;
  width: 120px;
  border: 1.5px dashed var(--border-field);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.survey-footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.8;
}

.survey-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.survey-footer a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ---------- Animations ---------- */
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .survey-hero {
    padding: 2rem 1.2rem 4rem;
  }

  .hero-stats {
    gap: 1.5rem;
  }

  .section-card {
    padding: 1.6rem 1.4rem 1.8rem;
    border-radius: var(--radius-md);
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .likert-option label {
    font-size: 0.62rem;
    padding: 12px 3px;
    min-height: 68px;
  }

  .likert-emoji {
    font-size: 1.15rem;
  }

  .form-container {
    padding: 0 1rem;
  }
}

@media (max-width: 380px) {
  .hero-stats {
    flex-direction: column;
    gap: 0.6rem;
  }

  .options-grid {
    gap: 6px;
  }

  .option-pill label {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}
