/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  min-height: 100vh;
}

/* ── Header ── */
.site-header {
  background: linear-gradient(135deg, #1a3a5c 0%, #0f2440 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
}
.header-logo { height: 48px; object-fit: contain; }
.header-divider { width: 1px; height: 38px; background: rgba(255,255,255,0.25); margin: 0 4px; }
.header-title { font-size: 16px; font-weight: 700; letter-spacing: 0.2px; }
.header-sub { font-size: 12px; color: #a8c4e0; margin-top: 2px; }
.progress-bar-wrap { height: 4px; background: rgba(255,255,255,0.15); }
.progress-bar { height: 4px; background: #e8701a; transition: width 0.4s ease; width: 0%; }

/* ── Form Container ── */
.form-container { max-width: 760px; margin: 0 auto; padding: 32px 16px 80px; }

/* ── Sections ── */
.form-section { display: none; animation: fadeIn 0.3s ease; }
.form-section.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.section-label {
  display: inline-block;
  background: #e8701a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: #1a3a5c;
  margin-bottom: 28px;
  border-bottom: 2px solid #e8701a;
  padding-bottom: 12px;
}

/* ── Fields ── */
.field-group { margin-bottom: 24px; }
.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a3a5c;
  margin-bottom: 6px;
  line-height: 1.5;
}
.field-hint { font-size: 12px; color: #6b7280; margin-bottom: 8px; line-height: 1.5; }
.req { color: #e8701a; }

.field-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  color: #1a1a2e;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-top: 4px;
}
.field-input:focus { outline: none; border-color: #1a3a5c; box-shadow: 0 0 0 3px rgba(26,58,92,0.1); }
.field-input.error { border-color: #dc2626; }
textarea.field-input { resize: vertical; margin-bottom: 4px; }

.word-count { font-size: 11px; color: #9ca3af; display: block; text-align: right; margin-bottom: 8px; }
.word-count.over { color: #dc2626; font-weight: 600; }

.field-error {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  margin-top: 6px;
  display: block;
  min-height: 16px;
  padding: 0;
  animation: errorFadeIn 0.2s ease;
}
@keyframes errorFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.field-input.error {
  border-color: #dc2626 !important;
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

/* ── Radio ── */
.radio-group { display: flex; gap: 16px; margin-top: 8px; }
.radio-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  font-weight: 500;
  background: #fff;
}
.radio-opt:hover { border-color: #1a3a5c; background: #f0f5ff; }
.radio-opt input[type="radio"] { accent-color: #1a3a5c; width: 16px; height: 16px; }

/* ── Checkboxes ── */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.check-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  background: #fff;
}
.check-opt:hover { border-color: #1a3a5c; background: #f0f5ff; }
.check-opt input[type="checkbox"] { accent-color: #1a3a5c; width: 15px; height: 15px; }
.others-text { margin-top: 10px; }

/* ── Fellow Section ── */
.fellow-section { background: #f8faff; border: 1.5px solid #c7d7f0; border-radius: 12px; padding: 24px; margin: 20px 0; }
.fellow-badge {
  display: inline-block;
  background: #1a3a5c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}
.fellow-badge-2 { background: #e8701a; }

/* ── Buttons ── */
.btn-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 32px; }
.btn-primary {
  background: #1a3a5c;
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover { background: #0f2440; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: #9ca3af; cursor: not-allowed; transform: none; }
.btn-secondary {
  background: transparent;
  color: #1a3a5c;
  border: 1.5px solid #1a3a5c;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.btn-secondary:hover { background: #f0f5ff; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,0.6);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.modal-backdrop.hidden { display: none; }
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-header { padding: 24px 28px 16px; border-bottom: 1px solid #e5e7eb; }
.modal-header h2 { font-family: 'Playfair Display', serif; font-size: 22px; color: #1a3a5c; }
.modal-header p { font-size: 13px; color: #6b7280; margin-top: 4px; }
.modal-body { padding: 20px 28px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 28px; border-top: 1px solid #e5e7eb; display: flex; gap: 12px; justify-content: flex-end; }

/* Preview table */
.preview-section { margin-bottom: 20px; }
.preview-section h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #e8701a; margin-bottom: 10px; }
.preview-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.preview-row:last-child { border-bottom: none; }
.preview-label { width: 40%; color: #6b7280; font-weight: 500; flex-shrink: 0; }
.preview-value { color: #1a1a2e; font-weight: 500; }

/* ── Success Modal ── */
.success-modal { align-items: center; text-align: center; padding: 48px 32px; }
.success-icon {
  width: 72px; height: 72px;
  background: #16a34a;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 20px;
}
.success-modal h2 { font-family: 'Playfair Display', serif; font-size: 24px; color: #1a3a5c; margin-bottom: 8px; }
.success-modal p { font-size: 14px; color: #6b7280; margin-bottom: 12px; }
.unique-id {
  font-size: 28px;
  font-weight: 700;
  color: #e8701a;
  background: #fff8f3;
  border: 2px dashed #e8701a;
  border-radius: 10px;
  padding: 12px 32px;
  margin: 12px 0;
  letter-spacing: 2px;
}
.success-note { font-size: 13px; color: #9ca3af; max-width: 400px; }

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

/* ── Responsive ── */
@media (max-width: 600px) {
  .section-title { font-size: 20px; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }
  .btn-row { flex-direction: column-reverse; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
  .preview-row { flex-direction: column; gap: 2px; }
  .preview-label { width: 100%; }
}

/* ── Intro Screen ── */
.intro-screen {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px 80px;
  background: #f0f2f5;
}
.intro-card {
  background: #fff;
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  padding: 48px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
.intro-badge {
  display: inline-block;
  background: #e8701a;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.intro-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  color: #1a3a5c;
  line-height: 1.25;
  margin-bottom: 16px;
}
.intro-lead {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 0;
}
.intro-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 28px 0;
}
.intro-about p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.75;
}
.intro-meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.intro-meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8faff;
  border: 1.5px solid #dce8f5;
  border-radius: 10px;
  padding: 12px 16px;
  flex: 1;
  min-width: 160px;
}
.intro-meta-icon { font-size: 22px; }
.intro-meta-label { font-size: 11px; color: #9ca3af; font-weight: 500; margin-bottom: 2px; }
.intro-meta-value { font-size: 13px; color: #1a3a5c; font-weight: 700; }

.intro-ready { background: #fffbf5; border: 1.5px solid #fde8c8; border-radius: 12px; padding: 24px; }
.intro-ready-title { font-size: 14px; font-weight: 700; color: #1a3a5c; margin-bottom: 16px; }
.intro-checklist { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.intro-checklist li { display: flex; gap: 12px; align-items: flex-start; }
.check-icon { color: #e8701a; font-size: 12px; margin-top: 3px; flex-shrink: 0; }
.intro-checklist li div { display: flex; flex-direction: column; gap: 2px; }
.intro-checklist li strong { font-size: 13px; color: #1a1a2e; font-weight: 600; }
.intro-checklist li span { font-size: 12px; color: #6b7280; line-height: 1.5; }

.intro-note {
  background: #f0f5ff;
  border-left: 4px solid #1a3a5c;
  border-radius: 6px;
  padding: 14px 18px;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.6;
}

.btn-start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 28px;
  background: #1a3a5c;
  color: #fff;
  border: none;
  padding: 16px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.2px;
}
.btn-start:hover { background: #0f2440; transform: translateY(-1px); }
.btn-start:active { transform: translateY(0); }
.btn-arrow { font-size: 20px; }

@media (max-width: 600px) {
  .intro-card { padding: 28px 20px; }
  .intro-title { font-size: 26px; }
  .intro-meta-row { flex-direction: column; }
  .btn-start { font-size: 15px; }
}

.intro-logo { height: 64px; object-fit: contain; display: block; margin-bottom: 20px; }

.btn-pdf {
  margin-top: 16px;
  background: transparent;
  color: #1a3a5c;
  border: 2px solid #1a3a5c;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s;
}
.btn-pdf:hover { background: #1a3a5c; color: #fff; }
