/* ─────────────────────────────────────────
   ClipForge — onboarding portal styles
   Fonts: Syne (display) + Satoshi (body)
   Aesthetic: dark cinematic, amber accent
   ───────────────────────────────────────── */

/* ── Variables ── */
:root {
  --bg: #0c0c10;
  --surface: #16161c;
  --surface-2: #1e1e26;
  --border: #2a2a36;
  --text: #f0ede8;
  --text-muted: #7a7a8c;
  --accent: #f5a623;
  --accent-dim: rgba(245, 166, 35, 0.12);
  --danger: #e05c5c;
  --success: #3ecf8e;
  --radius: 10px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Satoshi', sans-serif;
  --transition: 0.22s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.2; }
h3 { font-size: 1.1rem; }
p { color: var(--text-muted); }

/* ── Layout helpers ── */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.container--wide { max-width: 900px; }

/* ── Header ── */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 64px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.logo-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.header-badge {
  font-size: 0.7rem;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Onboarding page ── */
.onboarding-header { margin-bottom: 48px; }
.onboarding-header .eyebrow {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.onboarding-header h1 { margin-bottom: 12px; }
.onboarding-header p { font-size: 1.05rem; max-width: 480px; }

/* ── Form card ── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
}
.form-grid {
  display: grid;
  gap: 28px;
}
.form-row {
  display: grid;
  gap: 20px;
}
@media (min-width: 540px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; }
}

/* ── Field label ── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
}
.field-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Inputs ── */
.input, .textarea, .select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 16px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.textarea {
  resize: vertical;
  min-height: 100px;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7a8c' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
.input--error, .textarea--error {
  border-color: var(--danger);
}
.field-error {
  font-size: 0.8rem;
  color: var(--danger);
}

/* ── Color inputs ── */
.color-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.color-picker-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}
.color-swatch {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 2px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.color-swatch input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
}
.color-swatch-display {
  width: 100%;
  height: 100%;
}
.color-hash {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Logo URL field ── */
.logo-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── Submit button ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn--primary {
  background: var(--accent);
  color: #0c0c10;
  width: 100%;
  font-size: 1rem;
}
.btn--primary:hover {
  background: #ffb83d;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.3);
}
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--surface-2); }

/* ── Form footer ── */
.form-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.form-footer .privacy-note {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ── Loading state ── */
.form-loading {
  display: none;
  align-items: center;
  gap: 10px;
}
.form-loading.active { display: flex; }
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(12, 12, 16, 0.3);
  border-top-color: #0c0c10;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Success page ── */
.success-hero {
  text-align: center;
  padding: 80px 0 60px;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: rgba(62, 207, 142, 0.1);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.success-icon svg { width: 36px; height: 36px; }
.success-hero h1 { margin-bottom: 14px; }
.success-hero p { font-size: 1.05rem; max-width: 440px; margin: 0 auto 40px; }

.next-steps {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 40px;
}
.next-steps h3 {
  margin-bottom: 24px;
  color: var(--text);
}
.step-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.step-num {
  width: 28px;
  height: 28px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-body strong { display: block; margin-bottom: 2px; color: var(--text); }
.step-body span { font-size: 0.85rem; color: var(--text-muted); }

.dashboard-link-wrap { text-align: center; }

/* ── Dashboard ── */
.dashboard-header {
  margin-bottom: 48px;
}
.dashboard-header .eyebrow {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.dashboard-header h1 { margin-bottom: 10px; }
.client-meta {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.meta-chip {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.meta-chip strong { color: var(--text); }

/* Status card */
.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}
.status-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 10px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}
.status-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Progress bar */
.progress-section { margin-top: 28px; }
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.progress-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}
.progress-pct { font-size: 0.85rem; color: var(--accent); font-weight: 700; }
.progress-track {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffb83d);
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-stages {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}
.stage { text-align: center; }
.stage-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  display: inline-block;
  margin-bottom: 6px;
}
.stage.done .stage-dot { background: var(--success); }
.stage.active .stage-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}
.stage-label { font-size: 0.7rem; color: var(--text-muted); }
.stage.done .stage-label, .stage.active .stage-label { color: var(--text); }

/* Client info card */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}
.info-card h3 { margin-bottom: 20px; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.info-item {}
.info-item .info-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 6px;
}
.info-item .info-value {
  font-size: 0.95rem;
  color: var(--text);
}
.brand-colors {
  display: flex;
  gap: 8px;
  align-items: center;
}
.color-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-banner p {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.cta-banner strong { color: var(--text); }

/* ── Error/validation ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  margin-bottom: 20px;
}
.alert--error {
  background: rgba(224, 92, 92, 0.1);
  border: 1px solid rgba(224, 92, 92, 0.3);
  color: var(--danger);
}