/*
  Design notes:
  This inherits mojamoza.com's real brand tokens (gold #bd710d / navy
  #10182f, injected as CSS variables from PHP settings in index.php) rather
  than inventing a new palette -- the brief pins this down explicitly.
  The one deliberate signature moment is the "match reveal": when the AI
  finishes reading the business description, the preview card animates
  into the recommended template's own default colors, so the client
  visually watches their brand appear rather than reading a dropdown
  result. Everything else stays quiet and functional -- this is a tool
  people fill out once, not a page they browse.
*/

:root {
    --primary: #bd710d;
    --secondary: #10182f;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-display: 'Fraunces', Georgia, serif;
    --ink: #1c1917;
    --paper: #fdfbf7;
    --line: #e7e2d8;
    --success: #15803d;
    --error: #b91c1c;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}

.top-bar {
    background: var(--secondary);
    color: #f5f1e6;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar img { height: 34px; }

.top-bar .brand-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}

.top-bar .brand-sub {
    color: #c9bfa3;
    font-size: 0.85rem;
    margin-left: auto;
}

.wizard-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 96px;
}

.wizard-intro h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.75rem);
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--secondary);
}

.wizard-intro p.lede {
    font-size: 1.1rem;
    color: #44403c;
    max-width: 56ch;
    margin: 0 0 32px;
}

/* Progress rail -- a real sequence (step 1 of 5), so numbering is earned here */
.progress-rail {
    display: flex;
    gap: 6px;
    margin-bottom: 40px;
}

.progress-rail .seg {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    transition: background 0.3s ease;
}

.progress-rail .seg.done,
.progress-rail .seg.active { background: var(--primary); }

.step {
    display: none;
    animation: fadeUp 0.35s ease;
}

.step.active { display: block; }

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

.step h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--secondary);
    margin: 0 0 6px;
}

.step p.step-hint {
    color: #6b6459;
    margin: 0 0 24px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--secondary);
    margin: 20px 0 6px;
}

label:first-of-type { margin-top: 0; }

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.15s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(189, 113, 13, 0.15);
}

textarea { min-height: 120px; resize: vertical; }

.field-error { color: var(--error); font-size: 0.85rem; margin-top: 6px; display: none; }

.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 36px;
}

.btn {
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 13px 26px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 0 rgba(0,0,0,0.12);
}

.btn-primary:hover { box-shadow: 0 3px 8px rgba(189, 113, 13, 0.35); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--line);
}

.btn-ghost:hover { border-color: var(--secondary); }

/* --- Matching / AI reveal --- */

.analyzing {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 0;
    color: #6b6459;
}

.analyzing .dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--primary);
    animation: pulse 1.1s ease-in-out infinite;
}
.analyzing .dot:nth-child(2) { animation-delay: 0.15s; }
.analyzing .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
    0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
    40% { opacity: 1; transform: scale(1); }
}

.match-card {
    border-radius: 14px;
    padding: 28px;
    color: #fff;
    background: linear-gradient(135deg, var(--match-primary, var(--primary)) 0%, var(--match-secondary, var(--secondary)) 100%);
    transition: background 0.6s ease;
    box-shadow: 0 10px 30px -12px rgba(0,0,0,0.35);
}

.match-card .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    opacity: 0.85;
}

.match-card h3 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    margin: 8px 0 10px;
}

.match-card p { opacity: 0.92; margin: 0 0 6px; }

.match-card .confidence {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.18);
    padding: 4px 12px;
    border-radius: 999px;
}

.alt-list { margin-top: 20px; }
.alt-list .alt-label { font-size: 0.85rem; color: #6b6459; margin-bottom: 8px; }

.alt-chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    font-size: 0.88rem;
    margin: 0 8px 8px 0;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease;
}
.alt-chip:hover, .alt-chip.selected { border-color: var(--primary); color: var(--primary); font-weight: 600; }

/* --- Color step --- */

.color-modes { display: flex; gap: 12px; margin-bottom: 20px; }

.color-mode-option {
    flex: 1;
    padding: 16px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    font-weight: 600;
    font-size: 0.92rem;
}
.color-mode-option.selected { border-color: var(--primary); background: rgba(189,113,13,0.06); color: var(--primary); }

.color-pickers { display: flex; gap: 20px; }
.color-pickers .swatch-group { flex: 1; }
.color-pickers input[type="color"] { width: 100%; height: 46px; border: 1.5px solid var(--line); border-radius: 8px; padding: 4px; cursor: pointer; }

/* --- Hosting step --- */

.hosting-option {
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}
.hosting-option.selected { border-color: var(--primary); background: rgba(189,113,13,0.05); }
.hosting-option .icon { font-size: 1.3rem; color: var(--primary); width: 28px; }
.hosting-option .title { font-weight: 700; color: var(--secondary); }
.hosting-option .desc { font-size: 0.9rem; color: #6b6459; margin-top: 2px; }

.subfield { margin-top: 14px; padding-left: 42px; }

/* --- Review --- */

.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-row .k { color: #6b6459; font-size: 0.9rem; }
.review-row .v { font-weight: 600; text-align: right; }

.price-banner {
    margin-top: 24px;
    padding: 20px;
    border-radius: 12px;
    background: var(--secondary);
    color: #f5f1e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price-banner .amount { font-family: var(--font-display); font-size: 1.5rem; }
.price-banner .label { font-size: 0.85rem; color: #c9bfa3; }

/* --- Success --- */

.success-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--success); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin-bottom: 20px;
}

.reference-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    background: rgba(189,113,13,0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 8px;
    margin: 12px 0 24px;
}

@media (max-width: 560px) {
    .color-pickers, .btn-row { flex-direction: column; }
    .review-row { flex-direction: column; gap: 2px; }
    .review-row .v { text-align: left; }
}
