/* ===========================================================================
   ImexCars SEO — wizard UX
   Kalm, ruim, leesbaar. Eén stap per scherm.
   =========================================================================== */

:root {
  --ink:        #1c1917;
  --ink-soft:   #57534e;
  --ink-faint:  #a8a29e;

  --bg:         #fafaf9;
  --surface:    #ffffff;
  --line:       #e7e5e4;
  --line-soft:  #f5f5f4;

  --primary:    #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #eef2ff;

  --success:    #16a34a;
  --success-bg: #f0fdf4;

  --warn:       #b45309;
  --warn-bg:    #fffbeb;
  --warn-line:  #fde68a;

  --lock-bg:    #fafaf9;
  --lock-line:  #e7e5e4;

  --shadow-sm:  0 1px 2px rgba(28, 25, 23, .04);
  --shadow:     0 1px 3px rgba(28, 25, 23, .06), 0 1px 2px rgba(28, 25, 23, .04);
  --shadow-lg:  0 10px 30px rgba(28, 25, 23, .08), 0 4px 12px rgba(28, 25, 23, .04);

  --radius:     14px;
  --radius-sm:  10px;
  --radius-pill: 999px;

  --max-width:  680px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss03';
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }

button { font-family: inherit; }

/* ===========================================================================
   Top bar
   =========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 250, 249, .85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.brand-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  display: inline-block;
}
.topbar-actions {
  display: inline-flex;
  gap: 18px;
  font-size: 14px;
}
.topbar-actions a {
  color: var(--ink-soft);
  font-weight: 500;
}
.topbar-actions a:hover { color: var(--ink); }

/* ===========================================================================
   Main view container
   =========================================================================== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px 96px;
}

/* ===========================================================================
   Locked banner (persistent reassurance)
   =========================================================================== */
.locked-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--lock-bg);
  border: 1px solid var(--lock-line);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--ink-soft);
}
.locked-banner .lock-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--line);
  display: grid; place-items: center;
  color: var(--ink-soft);
  font-size: 12px;
  flex-shrink: 0;
}
.locked-banner-text {
  flex: 1;
}
.locked-banner-title { color: var(--ink); font-weight: 600; }
.locked-banner-urls {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ===========================================================================
   Progress
   =========================================================================== */
.progress-block {
  margin-bottom: 32px;
}
.progress-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
}
.progress-step {
  color: var(--ink);
  font-weight: 600;
}
.progress-phase {
  color: var(--ink-soft);
  font-weight: 500;
}
.progress-pct {
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.progress-bar {
  height: 6px;
  background: var(--line-soft);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  border-radius: var(--radius-pill);
  transition: width .4s cubic-bezier(.2,.8,.2,1);
}

/* ===========================================================================
   Step card
   =========================================================================== */
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 40px 36px;
  box-shadow: var(--shadow-sm);
  animation: fadeIn .25s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

.url-flow {
  background: var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 28px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 14px;
}
.url-flow-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.url-flow-value {
  color: var(--ink);
  word-break: break-all;
}
.url-flow-arrow {
  color: var(--ink-faint);
  margin: 8px 0 4px;
  font-size: 18px;
}

.section-block {
  margin: 28px 0;
}
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  color: var(--ink-faint);
  margin-bottom: 12px;
}

.why-text {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
}

.steps-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 12px 0 12px 44px;
  font-size: 16px;
  line-height: 1.55;
  border-bottom: 1px solid var(--line-soft);
}
.steps-list li:last-child { border-bottom: 0; }
.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 13px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.steps-list code {
  background: var(--line-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.stop-block {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 28px 0;
}
.stop-block .section-label {
  color: var(--warn);
}
.stop-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.stop-list li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-size: 15px;
  color: var(--ink);
}
.stop-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warn);
}

/* ===========================================================================
   Action bar
   =========================================================================== */
.actions {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.btn-primary {
  width: 100%;
  background: var(--ink);
  color: white;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .08s, background .15s, box-shadow .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-primary:hover { background: #292524; box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: grid; place-items: center;
  font-size: 13px;
}

.btn-secondary-row {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 18px;
}
.btn-secondary-row a {
  color: var(--ink-faint);
  font-size: 14px;
  font-weight: 500;
}
.btn-secondary-row a:hover { color: var(--ink-soft); }

/* ===========================================================================
   Done state
   =========================================================================== */
.done-card {
  background: var(--success-bg);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 48px 40px;
  text-align: center;
  margin-bottom: 24px;
}
.done-card .done-mark {
  width: 64px; height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--success);
  display: grid; place-items: center;
  color: white;
  font-size: 28px;
}
.done-card h2 {
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--ink);
}
.done-card p {
  color: var(--ink-soft);
  margin: 0 0 24px;
  font-size: 16px;
}
.done-card .btn-primary { max-width: 320px; margin: 0 auto; display: inline-flex; }

/* ===========================================================================
   Overview view
   =========================================================================== */
.overview {
  animation: fadeIn .25s ease-out;
}
.overview h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}
.overview .lede {
  color: var(--ink-soft);
  font-size: 15px;
  margin: 0 0 28px;
}

.phase-group {
  margin-bottom: 28px;
}
.phase-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.phase-group-name {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
}
.phase-group-count {
  font-size: 12px;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}

.overview-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background .12s;
}
.overview-item:hover { background: var(--line-soft); }
.overview-item.done .overview-title { color: var(--ink-faint); text-decoration: line-through; }
.overview-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center;
  font-size: 12px;
  color: transparent;
  flex-shrink: 0;
}
.overview-item.done .overview-check {
  background: var(--success);
  border-color: var(--success);
  color: white;
}
.overview-title {
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink);
}
.overview-arrow {
  color: var(--ink-faint);
  font-size: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}
.back-link:hover { color: var(--ink); }

/* ===========================================================================
   Help modal
   =========================================================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, .5);
  z-index: 50;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px;
  overflow-y: auto;
}
.modal[aria-hidden="false"] { display: flex; }
.modal-card {
  background: white;
  border-radius: var(--radius);
  max-width: 600px;
  width: 100%;
  padding: 32px 36px 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeIn .2s ease-out;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border: 0;
  background: var(--line-soft);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink-soft);
}
.modal-close:hover { background: var(--line); color: var(--ink); }
.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.modal-intro {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 20px;
}
.help-item {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.help-item:last-child { border-bottom: 1px solid var(--line); }
.help-q {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}
.help-q .chev { color: var(--ink-faint); transition: transform .18s; }
.help-item.open .chev { transform: rotate(90deg); }
.help-a {
  display: none;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.help-item.open .help-a { display: block; }

/* ===========================================================================
   Confetti / celebration
   =========================================================================== */
.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
}
.confetti-piece {
  position: absolute;
  width: 8px;
  height: 14px;
  top: -20px;
  opacity: 0;
  animation: fall 1.8s cubic-bezier(.2,.6,.4,1) forwards;
  border-radius: 2px;
}
@keyframes fall {
  0%   { opacity: 0; transform: translateY(0) rotate(0deg); }
  10%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(100vh) rotate(720deg); }
}

/* ===========================================================================
   Mobile
   =========================================================================== */
@media (max-width: 640px) {
  .step { padding: 28px 24px 26px; }
  .step-title { font-size: 24px; }
  body { font-size: 16px; }
  .url-flow { padding: 12px 14px; font-size: 13px; }
  .steps-list li { padding-left: 38px; font-size: 15px; }
  .steps-list li::before { width: 24px; height: 24px; font-size: 12px; top: 14px; }
  .modal-card { padding: 24px 22px; }
}

/* ===========================================================================
   Print — full content, no chrome
   =========================================================================== */
@media print {
  .topbar, .actions, .btn-secondary-row, .modal, .confetti-layer { display: none !important; }
  main { padding: 0; }
  .step { border: 0; box-shadow: none; padding: 0; }
  .locked-banner { break-inside: avoid; }
}
