/* ============================================================================
   START YOUR PROJECT — 3-step wizard (start.html)
   Gulf Operator aesthetic: tokens only, gap-border grid, gold sweep hovers,
   12px max radius. Step transitions are wrapped in prefers-reduced-motion.
   ========================================================================== */

/* ── Hero ─────────────────────────────────────────────────────────────── */
.sp-hero {
    padding: 160px var(--page-x, 48px) 24px;
    background: var(--bg);
}
.sp-hero-inner {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}
.sp-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(38px, 6vw, 72px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--text-primary);
    margin: 18px 0 20px;
}
.sp-hero-sub {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
}
.sp-hero-arabic {
    font-family: var(--font-arabic);
    font-weight: 300;
    font-size: 15px;
    color: var(--text-faint);
    margin-top: 18px;
}

/* ── Wizard shell ─────────────────────────────────────────────────────── */
.sp-wizard-section {
    padding: 40px var(--page-x, 48px) 110px;
    background: var(--bg);
}
.sp-wizard {
    max-width: 880px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px 44px 44px;
}

/* Progress header */
.sp-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 36px;
}
.sp-progress-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}
.sp-progress-track {
    display: flex;
    gap: 6px;
    flex: 1;
    max-width: 320px;
}
.sp-progress-seg {
    height: 2px;
    flex: 1;
    background: var(--border-hi);
    position: relative;
    overflow: hidden;
}
.sp-progress-seg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
}
.sp-progress-seg.is-active::after,
.sp-progress-seg.is-done::after { transform: scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
    .sp-progress-seg::after { transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); }
}

/* Steps */
.sp-steps { position: relative; }
.sp-step { display: none; }
.sp-step.is-active { display: block; }
@media (prefers-reduced-motion: no-preference) {
    .sp-step.is-active { animation: spStepIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
    .sp-steps.is-back .sp-step.is-active { animation-name: spStepInBack; }
    @keyframes spStepIn {
        from { opacity: 0; transform: translateX(24px); }
        to   { opacity: 1; transform: translateX(0); }
    }
    @keyframes spStepInBack {
        from { opacity: 0; transform: translateX(-24px); }
        to   { opacity: 1; transform: translateX(0); }
    }
}

.sp-step-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin: 0 0 10px;
}
.sp-step-hint {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 26px;
}

/* Step 1 — service cards (gap-border grid) */
.sp-services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 26px;
}
.sp-service {
    appearance: none;
    background: var(--surface);
    border: 0;
    padding: 26px 22px 24px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}
.sp-service::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
}
@media (prefers-reduced-motion: no-preference) {
    .sp-service::after { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
    .sp-service { transition: background 0.25s ease; }
}
.sp-service:hover, .sp-service:focus-visible { background: var(--surface-hi); outline: none; }
.sp-service:hover::after, .sp-service:focus-visible::after { transform: scaleX(1); }
.sp-service.is-selected { background: var(--surface-hi); }
.sp-service.is-selected::after { transform: scaleX(1); }
.sp-service i {
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 4px;
}
.sp-service-name {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
}
.sp-service-desc {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* Step 2 — textarea + chips */
.sp-textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border-hi);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.6;
    padding: 16px 18px;
    resize: vertical;
    min-height: 120px;
}
.sp-textarea::placeholder { color: var(--text-faint); }
.sp-textarea:focus { outline: none; border-color: var(--gold-border, rgba(201,168,76,0.18)); }

.sp-timeline { margin-top: 22px; }
.sp-timeline-label {
    display: block;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.sp-timeline-label em { font-style: normal; color: var(--text-faint); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-chip {
    appearance: none;
    background: transparent;
    border: 1px solid var(--border-hi);
    border-radius: 100px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
    padding: 10px 18px;
    cursor: pointer;
    min-height: 44px;
}
@media (prefers-reduced-motion: no-preference) {
    .sp-chip { transition: border-color 0.25s ease, color 0.25s ease; }
}
.sp-chip:hover { border-color: var(--gold-border, rgba(201,168,76,0.18)); color: var(--text-primary); }
.sp-chip.is-selected {
    border-color: var(--gold);
    color: var(--gold);
}

/* Step 3 — contact fields */
.sp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.sp-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border-hi);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    padding: 15px 18px;
    min-height: 44px;
}
.sp-input::placeholder { color: var(--text-faint); }
.sp-input:focus { outline: none; border-color: var(--gold-border, rgba(201,168,76,0.18)); }

/* Nav row (back / continue) */
.sp-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 30px;
}
.sp-back {
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    padding: 12px 8px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sp-back:hover { color: var(--text-primary); }
.sp-next, .sp-submit {
    appearance: none;
    background: var(--gold);
    border: 0;
    border-radius: 8px;
    color: #080808;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    padding: 14px 28px;
    cursor: pointer;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
@media (prefers-reduced-motion: no-preference) {
    .sp-next, .sp-submit { transition: opacity 0.25s ease; }
    .sp-next i, .sp-submit i { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
}
.sp-next:hover, .sp-submit:hover { opacity: 0.9; }
.sp-next:hover i { transform: translateX(3px); }
.sp-submit:disabled { opacity: 0.55; cursor: wait; }

/* Errors + status */
.sp-field-error {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    border-left: 2px solid var(--gold);
    padding-left: 12px;
    margin: 16px 0 0;
}
.sp-status {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
    margin: 18px 0 0;
    min-height: 1em;
}
.sp-status.is-error { color: var(--text-primary); }

/* Step 4 — success */
.sp-done { text-align: left; }
.sp-done-mark {
    width: 48px; height: 48px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 18px;
    margin-bottom: 22px;
}
.sp-next-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 8px 0 30px;
}
.sp-next-step { background: var(--surface); padding: 24px 22px; }
.sp-next-num {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}
.sp-next-step p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-muted);
    margin: 0;
}
.sp-done-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; }
.sp-done-wa {
    background: var(--gold);
    color: #080808;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    padding: 14px 26px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}
.sp-done-wa:hover { opacity: 0.9; }
.sp-done-alt {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sp-done-alt:hover { color: var(--text-primary); }

/* Secondary paths under the wizard */
.sp-alt {
    max-width: 880px;
    margin: 34px auto 0;
    text-align: center;
}
.sp-alt p {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 0 10px;
}
.sp-alt a {
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--gold-border, rgba(201,168,76,0.18));
    padding-bottom: 1px;
}
.sp-alt a:hover { color: var(--gold); }
.sp-alt a i { font-size: 11px; margin-left: 4px; }
.sp-alt-demo { font-size: 13px; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sp-services { grid-template-columns: repeat(2, 1fr); }
    .sp-next-steps { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sp-hero { padding: 130px var(--page-x-mobile, 24px) 16px; }
    .sp-wizard-section { padding: 24px var(--page-x-mobile, 24px) 90px; }
    .sp-wizard { padding: 26px 20px 30px; }
    .sp-services { grid-template-columns: 1fr; }
    .sp-service { padding: 20px 18px; }
    .sp-field-row { grid-template-columns: 1fr; }
    .sp-progress { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 26px; }
    .sp-progress-track { width: 100%; max-width: none; }
    .sp-nav-row { flex-direction: column-reverse; align-items: stretch; }
    .sp-next, .sp-submit { justify-content: center; }
    .sp-back { justify-content: center; }
    .sp-done-actions { flex-direction: column; align-items: stretch; text-align: center; }
    .sp-done-wa { justify-content: center; }
    .sp-done-alt { justify-content: center; }
}
