/* 
   Polygon Branding - Brief Styles
   Refactored from brief.html
*/

:root {
  --bg: #0A0A0A;
  --card: #111111;
  --card-hover: #161616;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);
  --accent: #6366F1;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --accent-dim: rgba(99, 102, 241, 0.12);
  --text: #FFFFFF;
  --text-2: #A1A1AA;
  --text-3: #52525B;
  --success: #22C55E;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--bg);
}

.wrapper {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Ambient bg */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* PROGRESS */
.progress-container {
  margin-bottom: 32px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-fraction {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.progress-track {
  height: 3px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366F1, #818CF8);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #818CF8;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.8);
}

.steps-dots {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  justify-content: center;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  width: 20px;
  border-radius: 3px;
}

.dot.done {
  background: rgba(99, 102, 241, 0.4);
}

/* CARD */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03), 0 32px 80px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
}

/* STEP */
.step {
  display: none;
}

.step.active {
  display: block;
  animation: stepIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.step-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 20px;
}

.step-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.step-desc {
  color: var(--text-2);
  font-size: 14px;
  margin-bottom: 36px;
}

/* FORM ELEMENTS */
.field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field-group.single {
  grid-template-columns: 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card input,
.card select,
.card textarea {
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 14px 16px !important;
  outline: none !important;
  transition: all 0.25s ease;
  width: 100%;
}

.card input:focus,
.card select:focus,
.card textarea:focus {
  border-color: var(--border-focus);
  background: rgba(99, 102, 241, 0.04);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.card select option {
  background: #111111;
  color: #FFFFFF;
}

.card input.error,
.card select.error,
.card textarea.error {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.error-msg {
  font-size: 11px;
  color: #F87171;
  font-weight: 500;
  display: none;
  margin-top: -4px;
}

.error-msg.show {
  display: block;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.card select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2352525B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* OBJECTIVE CARDS */
.obj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.obj-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
}

.obj-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.obj-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px var(--accent-glow);
  transform: translateY(-2px);
}

.obj-card .icon { font-size: 28px; margin-bottom: 10px; display: block; }
.obj-card .name { font-size: 13px; font-weight: 600; color: var(--text-2); }
.obj-card.selected .name { color: var(--text); }

/* STYLE CARDS */
.style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.style-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.02);
  user-select: none;
  position: relative;
  overflow: hidden;
}

.style-card:hover { border-color: rgba(99, 102, 241, 0.3); transform: translateY(-2px); }

.style-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 24px var(--accent-glow);
  transform: translateY(-2px);
}

.style-card .check {
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; opacity: 0;
  transition: opacity 0.2s ease;
}
.style-card.selected .check { opacity: 1; }

.style-preview { height: 56px; border-radius: 6px; margin-bottom: 12px; overflow: hidden; }

/* Previews Styles... */
.preview-minimal { background: #fafafa; display: flex; gap: 4px; align-items: center; padding: 8px; }
.preview-minimal .bar { height: 6px; border-radius: 3px; background: #e5e5e5; }
.preview-minimal .bar:nth-child(1) { width: 30%; background: #111; }

.preview-corp { background: #1a1f3a; display: flex; flex-direction: column; padding: 10px; gap: 5px; }
.preview-corp .bar { height: 5px; border-radius: 2px; background: rgba(255, 255, 255, 0.15); }
.preview-corp .bar:first-child { width: 50%; background: #4B6BFB; }

.preview-elegant { background: linear-gradient(135deg, #1a1208, #2d1f0a); display: flex; flex-direction: column; justify-content: flex-end; padding: 10px; }
.preview-elegant .bar { height: 4px; border-radius: 2px; background: rgba(212, 175, 55, 0.5); }
.preview-elegant .bar:first-child { width: 60%; background: #D4AF37; margin-bottom: 5px; }

.preview-modern { background: linear-gradient(135deg, #0f0f23, #1e1b4b); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.preview-modern .dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-modern .dot:nth-child(1) { background: #6366F1; }
.preview-modern .dot:nth-child(2) { background: #8B5CF6; width: 16px; height: 16px; }

.preview-tech { background: #050a05; border: 1px solid rgba(0, 255, 136, 0.2); display: flex; flex-direction: column; padding: 10px; gap: 4px; }
.preview-tech .line { height: 3px; border-radius: 1px; background: rgba(0, 255, 136, 0.2); }
.preview-tech .line:first-child { width: 45%; background: #00FF88; }

.preview-creative { background: linear-gradient(135deg, #FF6B6B, #4ECDC4, #45B7D1); display: flex; align-items: flex-end; padding: 8px; gap: 4px; }
.preview-creative .bar { border-radius: 3px 3px 0 0; background: rgba(255, 255, 255, 0.7); }
.preview-creative .bar:nth-child(1) { width: 20%; height: 30px; }

/* COLOR PICKER */
.color-section { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 8px; }
.color-label { font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.2s ease; position: relative; }
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--bg); }

.swatch-custom {
  width: 32px; height: 32px; border-radius: 50%; border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  font-size: 16px; color: var(--text-3); transition: all 0.2s ease; position: relative; overflow: hidden;
}
.swatch-custom input[type="color"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* DROPZONE */
.drop-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.dropzone { border: 1.5px dashed var(--border); border-radius: var(--radius-sm); padding: 28px 16px; text-align: center; cursor: pointer; transition: all 0.25s ease; position: relative; overflow: hidden; }
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); background: var(--accent-dim); }
.dropzone.has-file { border-color: rgba(34, 197, 94, 0.4); background: rgba(34, 197, 94, 0.05); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone-icon { font-size: 24px; display: block; margin-bottom: 8px; }
.dropzone-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.dropzone-sub { font-size: 11px; color: var(--text-3); }
.dropzone-filename { font-size: 11px; color: var(--success); font-weight: 600; margin-top: 6px; word-break: break-all; display: none; }
.dropzone.has-file .dropzone-filename { display: block; }
.dropzone.has-file .dropzone-sub { display: none; }

/* CONTACT FIELDS */
.contact-flag { display: flex; align-items: center; gap: 0; }
.phone-prefix { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); padding: 14px 14px; font-size: 14px; color: var(--text-2); font-weight: 600; white-space: nowrap; font-family: var(--font); }
.contact-flag input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* BUTTONS */
.btn-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.btn-row.first { justify-content: flex-end; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px; border-radius: 10px; font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer; border: none; outline: none; transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1); position: relative; overflow: hidden; letter-spacing: -0.01em; }
.btn-back { background: rgba(255, 255, 255, 0.04); color: var(--text-2); border: 1px solid var(--border); }
.btn-next { background: linear-gradient(135deg, #6366F1, #818CF8); color: white; box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3), 0 4px 24px rgba(99, 102, 241, 0.3); }

/* FINAL SCREEN */
.btn-pay { width: 100%; padding: 18px; font-size: 16px; font-weight: 800; background: linear-gradient(135deg, #6366F1, #818CF8); color: white; border: none; border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font); letter-spacing: -0.02em; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.4), 0 8px 32px rgba(99, 102, 241, 0.35); display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; overflow: hidden; }
#final-screen { display: none; animation: stepIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
#final-screen.show { display: block; }
.final-header { text-align: center; padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.final-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2); border-radius: 99px; padding: 6px 14px; font-size: 11px; font-weight: 700; color: #4ADE80; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 20px; }
.final-title { font-size: clamp(24px, 4vw, 36px); font-weight: 800; letter-spacing: -0.04em; background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 8px; }
.final-sub { color: var(--text-2); font-size: 14px; }

/* FEATURES */
.features-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.feature-row { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: rgba(34, 197, 94, 0.05); border: 1px solid rgba(34, 197, 94, 0.12); border-radius: var(--radius-sm); animation: slideIn 0.4s ease both; }
.feature-check { width: 22px; height: 22px; background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; }
.feature-text { font-size: 14px; font-weight: 500; }

/* RESPONSIVE */
@media (max-width: 680px) {
  .card { padding: 28px 22px; }
  .field-group { grid-template-columns: 1fr; }
  .obj-grid, .style-grid { grid-template-columns: repeat(2, 1fr); }
  .drop-zones { grid-template-columns: 1fr; }
}

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.shake { animation: shake 0.4s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
