*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: #f4f2f1;
  color: rgb(17, 17, 17);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
}

/* ── Visually hidden (screen reader only) ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header, .progress-bar, .wizard { position: relative; z-index: 1; }

/* ── Header ── */
.header {
  width: 100%;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header a { text-decoration: none; }
.header img { height: 37px; }
.header-buttons { display: flex; gap: 10px; align-items: center; }
.header-btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.header-btn-outline {
  background: none;
  border: 1px solid #111111;
  color: #111111;
}
.header-btn-filled {
  background: #111111;
  border: 1px solid #111111;
  color: #fff;
}

/* ── Progress Bar (pinned to bottom) ── */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.progress-step {
  width: 48px;
  height: 5px;
  border-radius: 3px;
  background: rgb(210, 207, 203);
  transition: background 0.3s;
}
.progress-step.active {
  background: #111111;
}
.progress-step.done {
  background: #111111;
}

/* ── Container ── */
.wizard {
  width: 100%;
  max-width: 720px;
  padding: 0 24px 80px;
  flex: 1;
  margin-top: 20px;
}

.step { display: none; animation: fadeIn 0.35s ease; }
.step.active { display: block; }

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

h1 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
}

h2 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 8px;
}
.subtitle {
  color: rgb(100, 100, 100);
  font-size: 15px;
  margin-bottom: 32px;
}

/* ── Language Grid ── */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.lang-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-size: 14px;
  font-weight: 500;
}
.lang-card:hover { border-color: rgb(210, 207, 203); }
.lang-card.selected {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}
.lang-card .flag { font-size: 22px; }

/* ── Search ── */
.search-wrapper {
  position: relative;
  margin-bottom: 32px;
}
.search-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 42px;
  border: 2px solid rgb(220, 218, 215);
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrapper input:focus { border-color: #111111; }
.search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: rgb(160, 160, 160);
  font-size: 16px;
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgb(220, 218, 215);
  border-radius: 12px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.search-results.open { display: block; }
.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}
.search-result-item:hover { background: rgb(246, 245, 244); }
.search-result-item:first-child { border-radius: 12px 12px 0 0; }
.search-result-item:last-child { border-radius: 0 0 12px 12px; }

/* ── Form Fields ── */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgb(220, 218, 215);
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus { border-color: #111111; }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ── Style Guide Cards ── */
.sg-section-title {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
  margin-top: 28px;
}
.sg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.sg-card {
  background: #fff;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 24px 18px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}
.sg-card:hover { border-color: rgb(210, 207, 203); }
.sg-card.selected {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}
.sg-card-icon {
  font-size: 32px;
  margin-bottom: 10px;
  display: block;
}
.sg-card-name {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.sg-card-desc {
  font-size: 12px;
  color: rgb(120, 120, 120);
  line-height: 1.4;
}
.sg-card-preview {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(100, 100, 100);
  cursor: pointer;
}
.sg-card-preview:hover { color: #111111; }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: #fff;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: rgb(160, 160, 160);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s;
}
.modal-close:hover { background: rgb(245, 244, 242); color: #111; }
.modal-icon { font-size: 36px; margin-bottom: 12px; }
.modal h2 {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 4px;
}
.modal-tagline {
  font-size: 14px;
  color: rgb(100, 100, 100);
  margin-bottom: 20px;
}
.modal-rule {
  margin-bottom: 16px;
}
.modal-rule-label {
  font-weight: 700;
  font-size: 13px;
  color: rgb(80, 80, 80);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.modal-rule-text {
  font-size: 14px;
  line-height: 1.55;
  color: rgb(50, 50, 50);
}
.modal-example {
  background: rgb(246, 245, 244);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: rgb(60, 60, 60);
}
.modal-example strong { color: #111; }
.modal-select-btn {
  margin-top: 24px;
  width: 100%;
  display: flex;
  justify-content: center;
}

@media (max-width: 600px) {
  .sg-grid { grid-template-columns: 1fr; }
  .modal { padding: 24px 20px; }
}

/* ── File Upload ── */
.upload-zone {
  border: 2px dashed rgb(200, 198, 195);
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
  margin-bottom: 16px;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: #111111;
  background: rgba(17, 17, 17, 0.02);
}
.upload-zone .upload-icon {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
}
.upload-zone p {
  font-size: 15px;
  color: rgb(100, 100, 100);
}
.upload-zone p strong {
  color: #111111;
  text-decoration: underline;
  cursor: pointer;
}
.upload-zone .formats {
  font-size: 14px;
  color: rgb(120, 120, 120);
  margin-top: 8px;
}
.file-info {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 2px solid rgb(220, 218, 215);
  border-radius: 12px;
  margin-bottom: 24px;
}
.file-info.visible { display: flex; }
.file-info .file-icon { font-size: 24px; }
.file-info .file-details { flex: 1; }
.file-info .file-name { font-weight: 600; font-size: 14px; }
.file-info .file-size { font-size: 12px; color: rgb(120, 120, 120); }
.file-info .file-remove {
  background: none;
  border: none;
  font-size: 18px;
  color: rgb(160, 160, 160);
  cursor: pointer;
  padding: 4px;
}
.file-info .file-remove:hover { color: #111111; }

/* ── Success ── */
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #111111;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 36px;
  color: #fff;
}
.email-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.email-row input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid rgb(220, 218, 215);
  border-radius: 12px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.email-row input:focus { border-color: #111111; }

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background: #111111;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  width: auto;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  background: none;
  border: 2px solid #111111;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #111111;
  cursor: pointer;
  transition: background 0.2s;
  box-sizing: border-box;
}
.btn-back:hover { background: rgba(17, 17, 17, 0.05); }

.btn-row {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
}

/* ── Thank You ── */
.thank-you {
  display: none;
  text-align: center;
  animation: fadeIn 0.35s ease;
}
.thank-you.active { display: block; }
.thank-you p { color: rgb(100, 100, 100); font-size: 15px; margin-top: 8px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .header { padding: 16px 20px; }
  .wizard { padding: 0 16px 40px; }
  h2 { font-size: 22px; }
  .lang-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .lang-card { padding: 12px; font-size: 13px; }
  .email-row { flex-direction: column; }
}
