:root {
    --bg: #f4f4f5;
    --surface: #ffffff;
    --ink: #111111;
    --muted: #6b6b70;
    --line: #e4e4e7;
    --line-strong: #d4d4d8;
    --focus: #111111;
    --error: #b42318;
    --shadow: 0 1px 0 rgba(17, 17, 17, 0.02);
    --shadow-hover: 0 14px 36px rgba(17, 17, 17, 0.08);
    --radius: 16px;
    --radius-btn: 8px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Vazirmatn, Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

[hidden] {
    display: none !important;
}

.page,
.landing-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    max-width: 100%;
}

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-header-inner {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.site-logo {
    width: 64px;
    height: 30px;
    display: block;
    border-radius: var(--radius-btn);
    background: #111;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 2px #111, inset 7px 7px 0 0 #fff;
}

.site-logo.is-image {
    object-fit: contain;
    background: transparent;
    box-shadow: none;
}

.site-brand-text strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.site-brand-text span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
}

.step-meta {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.progress-wrap {
    width: 100%;
    height: 2px;
    background: var(--surface);
}

.progress-wrap[hidden] {
    display: none !important;
}

.progress-track {
    height: 2px;
    background: var(--line);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--ink);
    transition: width 0.25s ease;
}

.form-main {
    flex: 1;
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 40px 32px 72px;
}

.alert {
    background: var(--surface);
    border: 1px solid #f0c8c4;
    color: var(--error);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}

.wizard,
.empty-card,
.thanks-card,
.intro-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
}

.wizard {
    position: relative;
    overflow: hidden;
    max-width: 100%;
}

.intro-card {
    padding: 40px 32px;
}

.intro-card .btn {
    margin-top: 8px;
}

.step {
    display: none;
}

.step.is-active {
    display: block;
}

.step-kicker {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.step h1,
.thanks-card h1,
.empty-card h1,
.intro-card h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.step-desc,
.empty-card p,
.thanks-card p,
.intro-card .step-desc {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.85;
}

.field {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.req {
    color: var(--error);
    margin-right: 4px;
}

.field-input {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--ink);
    font: inherit;
    border-radius: var(--radius-sm);
    padding: 11px 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input:focus {
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.field-input.is-invalid,
.choice-list.is-invalid {
    border-color: #e3a39d;
}

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

.field-help {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.field-error {
    margin: 8px 0 0;
    color: var(--error);
    font-size: 13px;
}

.choice-list {
    display: grid;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
}

.choice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.choice-item:hover {
    border-color: var(--line-strong);
}

.choice-item:has(input:checked) {
    border-color: var(--ink);
    background: #fafafa;
}

.choice-item input {
    accent-color: #111;
}

.yesno-list {
    grid-template-columns: 1fr 1fr;
}

.other-wrap,
.detail-wrap {
    margin-top: 10px;
}

.wizard-nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.btn {
    font: inherit;
    border: 0;
    cursor: pointer;
    border-radius: var(--radius-btn);
    padding: 10px 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
    background: var(--ink);
    color: #fff;
}

.btn-primary:hover {
    background: #2a2a2a;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
    border-color: #bdbdbf;
    background: #fafafa;
}

.hp-clip {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: 0;
    inset-inline-start: 0;
    top: 0;
    pointer-events: none;
}

.site-footer {
    margin-top: auto;
    width: 100%;
    border-top: 1px solid var(--line);
}

.site-footer-inner {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.thanks-card,
.empty-card {
    text-align: center;
    padding: 56px 32px;
}

.thanks-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-btn);
    background: #111;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 20px;
}

.thanks-card .btn,
.empty-card .btn {
    margin-top: 8px;
}

@media (max-width: 760px) {
    .site-header-inner,
    .form-main,
    .site-footer-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    .form-main {
        padding-top: 28px;
        padding-bottom: 56px;
    }

    .wizard,
    .empty-card,
    .thanks-card,
    .intro-card {
        padding: 24px 20px;
    }

    .step h1,
    .thanks-card h1,
    .intro-card h1,
    .empty-card h1 {
        font-size: 22px;
    }

    .site-brand-text span {
        max-width: 46vw;
    }

    .wizard-nav {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }

    .yesno-list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .progress-bar,
    .btn,
    .choice-item,
    .field-input {
        transition: none;
    }
}
