/* Reelfolio · Onboarding — matches portfolio palette */

:root {
  --bg:        #F7F3EB;
  --bg-alt:    #EFE9DC;
  --card:      #FFFFFF;
  --ink:       #161514;
  --ink-2:     #2B2826;
  --muted:     #6E6862;
  --muted-2:   #948D85;
  --border:    #E2DBCD;
  --border-2:  #D6CDB9;
  --accent:    #B14A2F;
  --accent-ink:#FFFFFF;
  --ok:        #3D6334;
  --ok-bg:     #E6F0E2;
  --serif:     "Instrument Serif", "Cormorant Garamond", "Times New Roman", serif;
  --sans:      "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:      "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --radius:    14px;
  --radius-sm: 8px;
  --maxw:      1180px;
  --shadow-card: 0 1px 2px rgba(22,21,20,.04), 0 0 0 1px var(--border);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 680px; margin: 0 auto; padding: 56px 24px 80px; }

/* ── Header ── */
.ob-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247,243,235,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.ob-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--serif); font-size: 22px; font-style: italic;
  text-decoration: none; color: var(--ink);
  letter-spacing: -.01em;
}
.brand-mark { color: var(--accent); font-style: normal; }

.ob-progress { display: flex; gap: 8px; }
.ob-progress-step {
  width: 24px; height: 24px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px;
  background: var(--bg-alt); color: var(--muted-2);
  border: 1px solid var(--border);
  transition: all .25s ease;
}
.ob-progress-step.is-done {
  background: var(--ink); color: var(--bg); border-color: var(--ink);
}
.ob-progress-step.is-current {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}

/* ── Screen system ── */
.ob-main { min-height: calc(100vh - 60px); }
.ob-screen { display: none; }
.ob-screen.is-active { display: block; animation: fadeIn .35s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Typography ── */
.eyebrow, .step-eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2);
  margin: 0 0 18px;
}
.hero-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 1.0; letter-spacing: -.022em;
  margin: 0 0 24px;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 18px; color: var(--ink-2); max-width: 540px;
  margin: 0 0 36px;
}
.hero-foot {
  margin-top: 24px; font-size: 13px; color: var(--muted);
  font-family: var(--mono); letter-spacing: .04em;
}
.step-title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(40px, 5vw, 60px); line-height: 1.05;
  letter-spacing: -.02em; margin: 0 0 14px;
}
.step-sub {
  font-size: 16px; color: var(--muted); margin: 0 0 36px;
  max-width: 560px;
}

/* ── Buttons ── */
.btn-primary, .btn-ghost {
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  padding: 14px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: all .15s ease; line-height: 1;
}
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) { background: #9c3f27; }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--border-2);
}
.btn-ghost:hover { background: var(--bg-alt); }
.btn-small { padding: 8px 14px; font-size: 13px; }
.btn-big { padding: 16px 28px; font-size: 16px; }
.link {
  background: transparent; border: none; padding: 0;
  color: var(--accent); cursor: pointer;
  font: inherit; text-decoration: underline;
}

.cta-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nav-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 40px; padding-top: 28px;
  border-top: 1px solid var(--border);
}

/* ── Dropzone ── */
.dropzone {
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  background: var(--card); padding: 56px 24px;
  text-align: center; transition: all .2s ease;
}
.dropzone.is-drag {
  border-color: var(--accent); background: #FAF1EC;
}
.dropzone-icon {
  font-size: 28px; color: var(--muted-2);
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: var(--bg-alt); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.dropzone-title { font-size: 18px; font-weight: 500; margin: 0 0 6px; }
.dropzone-sub { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.dropzone-hint {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em;
  color: var(--muted-2); margin: 0;
}

/* ── File list ── */
.file-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.file-thumb {
  width: 56px; height: 40px; border-radius: 4px;
  background: var(--ink); color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px;
  flex-shrink: 0;
}
.file-meta { flex: 1; min-width: 0; }
.file-name { font-size: 14px; font-weight: 500; color: var(--ink); margin: 0 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.file-remove {
  background: transparent; border: none; color: var(--muted);
  font-size: 18px; cursor: pointer; padding: 4px 8px;
}
.file-remove:hover { color: var(--accent); }

/* ── Form fields ── */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px;
}
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.rate-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px;
  margin-bottom: 24px;
}
@media (max-width: 640px) { .rate-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.field-hint {
  text-transform: none; letter-spacing: 0; font-style: italic;
  color: var(--muted-2); font-family: var(--serif); font-size: 13px;
}
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field select, .field textarea {
  font: inherit; font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); padding: 11px 14px;
  width: 100%; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; font-family: var(--sans); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(177,74,47,.12);
}
.input-prefix {
  display: flex; align-items: center;
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input-prefix:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(177,74,47,.12);
}
.input-prefix span {
  padding: 0 0 0 14px; color: var(--muted-2);
  font-family: var(--mono); font-size: 14px;
}
.input-prefix input {
  border: none !important; box-shadow: none !important;
  padding-left: 6px !important; background: transparent !important;
}

.checkbox-row {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-2);
  cursor: pointer; margin-top: 4px;
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Brand lists ── */
.brand-section { margin-bottom: 28px; }
.section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-2);
  margin: 0 0 12px;
}
.brand-list {
  list-style: none; padding: 0; margin: 0 0 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.brand-list:empty + button { margin-top: 0; }
.brand-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 14px;
}
.brand-favicon {
  width: 22px; height: 22px; border-radius: 4px;
  background: var(--bg-alt); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-size: 14px; color: var(--muted);
}
.brand-favicon img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-weight: 500; font-size: 14px; flex: 1; }
.brand-meta { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.brand-remove {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; padding: 4px 8px; font-size: 16px;
}
.brand-remove:hover { color: var(--accent); }

/* ── Portrait ── */
.portrait-row {
  display: grid; grid-template-columns: 200px 1fr; gap: 28px;
  margin-bottom: 36px;
}
@media (max-width: 640px) { .portrait-row { grid-template-columns: 1fr; } }
.portrait-dropzone {
  width: 200px; height: 260px;
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  background: var(--card); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: all .2s ease;
}
.portrait-dropzone.is-drag { border-color: var(--accent); background: #FAF1EC; }
.portrait-dropzone.has-image { border-style: solid; border-color: var(--border); padding: 0; }
.portrait-dropzone img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--muted-2); text-align: center; padding: 16px;
}
.portrait-plus {
  font-size: 28px; width: 44px; height: 44px;
  background: var(--bg-alt); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.portrait-label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.portrait-hint { font-family: var(--mono); font-size: 11px; }
.portrait-side { display: flex; flex-direction: column; gap: 12px; }
.portrait-note {
  font-family: var(--serif); font-style: italic; font-size: 14px;
  color: var(--muted); margin: 0;
}

/* ── Niches ── */
.niches { border: none; padding: 0; margin: 24px 0 0; }
.niches legend { margin-bottom: 14px; padding: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; cursor: pointer;
  background: var(--card); border: 1px solid var(--border-2);
  border-radius: 999px; padding: 8px 16px;
  font-size: 13px; color: var(--ink-2);
  transition: all .15s ease; user-select: none;
}
.chip:hover { border-color: var(--ink); }
.chip input { display: none; }
.chip input:checked + span { color: var(--accent-ink); }
.chip:has(input:checked) {
  background: var(--ink); border-color: var(--ink);
  color: var(--accent-ink);
}

/* ── Build screen ── */
.build-screen { padding-top: 100px; }
.progress-track {
  width: 100%; height: 6px; background: var(--bg-alt);
  border-radius: 3px; overflow: hidden; margin-top: 20px;
}
.progress-fill {
  height: 100%; background: var(--accent);
  width: 0%; transition: width .4s ease;
}
.progress-label {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin: 10px 0 28px;
}
.build-log {
  list-style: none; padding: 16px 18px; margin: 0;
  background: var(--ink); color: #C8C2B8;
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
  border-radius: var(--radius-sm); max-height: 280px; overflow: auto;
}
.build-log li::before { content: "› "; color: var(--accent); }
.build-log li.done::before { content: "✓ "; color: #6FAA5E; }

/* ── Preview ── */
.preview-grid {
  display: grid; grid-template-columns: 380px 1fr; gap: 32px;
  padding: 40px 0 60px;
}
@media (max-width: 980px) { .preview-grid { grid-template-columns: 1fr; } }
.preview-side .step-title { font-size: clamp(34px, 4vw, 48px); }
.publish-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 24px;
}
.url-input {
  display: flex; align-items: center;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--card); overflow: hidden;
}
.url-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(177,74,47,.12); }
.url-prefix {
  padding: 0 0 0 14px;
  font-family: var(--mono); font-size: 13px; color: var(--muted-2);
}
.url-input input {
  border: none !important; box-shadow: none !important;
  padding-left: 4px !important; flex: 1;
  font-family: var(--mono) !important; font-size: 13px !important;
}
.publish-cta { display: flex; gap: 10px; align-items: center; margin-top: 6px; }

.preview-frame {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 12px 32px rgba(22,21,20,.06);
  min-height: 600px;
  display: flex; flex-direction: column;
}
.preview-frame-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.preview-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-2);
}
.preview-url {
  margin-left: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.preview-content { padding: 28px 32px; flex: 1; overflow: auto; }

/* mini-preview blocks inside iframe */
.mp-eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2); margin: 0 0 12px;
}
.mp-name {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 44px; line-height: 1.05; margin: 0 0 8px;
}
.mp-loc { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.mp-pitch { font-size: 16px; color: var(--ink-2); margin: 0 0 24px; max-width: 480px; }
.mp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 28px; }
.mp-stat { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.mp-stat-v { font-family: var(--serif); font-size: 22px; }
.mp-stat-l { font-family: var(--mono); font-size: 10px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; }
.mp-section { margin: 28px 0; }
.mp-section h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-2);
  margin: 0 0 12px;
}
.mp-brands { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-brand-chip {
  background: var(--card); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 999px;
  font-size: 12px; color: var(--ink-2);
}
.mp-reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mp-reel {
  aspect-ratio: 9/16; background: var(--ink);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-family: var(--mono); font-size: 11px;
  position: relative;
}
.mp-reel::after {
  content: "▶"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

/* ── Done ── */
.done-screen { text-align: center; padding-top: 80px; }
.done-mark {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--ok-bg); color: var(--ok);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 20px;
}
.done-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 56px; line-height: 1; margin: 0 0 14px;
}
.done-sub { color: var(--muted); max-width: 460px; margin: 0 auto 28px; }
.done-url {
  display: inline-block; padding: 14px 22px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 16px; color: var(--accent);
  margin-bottom: 24px;
}
.share-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.done-foot { font-family: var(--serif); font-style: italic; color: var(--muted); }
.done-foot a { color: var(--accent); }

/* ── Modal ── */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(22,21,20,.4);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--card); border-radius: var(--radius);
  padding: 28px; max-width: 420px; width: 100%;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 24px 64px rgba(22,21,20,.2);
}
.modal-title {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 24px; margin: 0 0 4px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
