/* ===== DiFilter Landing ===== */
:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #4f46e5;
    --primary-2: #667eea;
    --primary-dark: #4338ca;
    --success: #16a34a;
    --success-bg: #ecfdf5;
    --success-text: #166534;
    --border: #e5e7eb;
    --radius: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
    --shadow-lg: 0 24px 60px -12px rgba(79, 70, 229, .22);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

[hidden] {
    display: none !important;
}

img,
svg {
    display: inline-block;
    vertical-align: middle;
}

button,
input {
    font: inherit;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
    white-space: nowrap;
}

.btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff;
    box-shadow: 0 6px 18px -6px rgba(79, 70, 229, .45);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -6px rgba(79, 70, 229, .55);
}

.btn-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: #c7d2fe;
    background: #fbfbff;
}

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

.btn-success:hover {
    background: #15803d;
}

.btn-sm {
    padding: 9px 16px;
    font-size: .9rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .09);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand-logo {
    border-radius: 8px;
}

.brand-name {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: .08em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    transition: color .15s ease;
}

.nav-links a:hover {
    color: var(--primary);
}

/* ===== Hero ===== */
.hero {
    background:
        radial-gradient(52rem 34rem at 108% -12%, rgba(102, 126, 234, .30), transparent 60%),
        radial-gradient(34rem 26rem at -8% 112%, rgba(79, 70, 229, .14), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    max-width: 828px;
    margin: 0 auto;
    padding-top: 24px;
    padding-bottom: 48px;
}

.hero-copy h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.35rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 18px 0 0;
    color: var(--text);
}

.hero-copy .lead {
    font-size: 1.15rem;
    color: var(--muted);
    max-width: 36rem;
    margin: 18px 0 24px;
}

.hero-list {
    list-style: none;
    margin: 0 0 24px;
}

.hero-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #334155;
}

.hero-list li::before {
    content: '✓';
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--success);
    font-size: .75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Candidate benefits */
.candidate-benefits__tag {
    display: block;
    margin-bottom: 10px;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.candidate-benefits__note {
    margin: 0 0 26px;
    font-size: .9rem;
    color: var(--muted);
}

/* Phone mock */
.hero-visual {
    display: flex;
    justify-content: center;
}

.phone-card {
    width: min(360px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.phone-card__head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red { background: #f87171; }
.dot-yellow { background: #fbbf24; }
.dot-green { background: #34d399; }

.phone-card__url {
    margin-left: 10px;
    color: var(--muted);
    font-size: .8rem;
    letter-spacing: .02em;
}

.phone-card__body {
    padding: 20px;
}

.mini-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

.mini-input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font-size: .95rem;
    color: var(--text);
    margin-bottom: 14px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.chip-ok {
    background: var(--success-bg);
    color: var(--success-text);
}

.chip-icon {
    flex: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--success);
    color: #fff;
    font-size: .7rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.kv {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: .9rem;
}

.kv span {
    color: var(--muted);
}

.kv b {
    font-weight: 600;
    text-align: right;
}

.text-ok {
    color: var(--success) !important;
}

.phone-card__cta {
    margin: 16px 0 6px;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff;
    font-weight: 600;
    font-size: .92rem;
}

.mini-note {
    text-align: center;
    color: var(--muted);
    font-size: .78rem;
    margin-top: 4px;
}

/* ===== Checker ===== */
.checker {
    padding: 72px 0 32px;
    scroll-margin-top: 84px;
}

.checker-card {
    max-width: 780px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.checker-head {
    text-align: center;
    margin-bottom: 26px;
}

.checker-head h2,
.section-head h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    letter-spacing: -0.01em;
}

.checker-head p {
    max-width: 540px;
    margin: 10px auto 0;
}

.muted {
    color: var(--muted);
    font-size: 1rem;
}

.search-row {
    display: flex;
    gap: 10px;
}

.search-row input {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.search-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.phone-error {
    color: #dc2626;
    font-size: .9rem;
    margin-top: 10px;
}

/* ===== Результат проверки кандидата ===== */
.result-box {
    margin-top: 24px;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    background: #fbfcff;
}

.result-line {
    font-size: 1.05rem;
    font-weight: 700;
}

.result-ok {
    color: var(--success);
}

.result-warn {
    color: #b45309;
}

.result-name {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 10px 0 0;
}

.result-facts {
    margin-top: 10px;
}

.result-box .kv:last-child {
    border-bottom: none;
}

.result-summary {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #eef2ff;
}

.result-summary-label {
    display: block;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.result-summary p {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
    color: #1e1b4b;
}

.result-box .note {
    margin-top: 14px;
}

.result-box .muted {
    margin: 8px 0 0;
}

.note .result-privacy-text {
    margin: 6px 0 0;
    font-size: .92rem;
    font-weight: 400;
}

.result-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.note {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: .95rem;
    line-height: 1.5;
}

.note-warn {
    background: var(--warn-bg, #fffbeb);
    border: 1px solid var(--warn-border, #f59e0b);
    color: #78350f;
}

/* ===== How it works ===== */
.how {
    padding: 56px 0 84px;
    scroll-margin-top: 84px;
}

.section-head {
    text-align: center;
    margin-bottom: 40px;
}

.section-head h2 {
    margin-top: 12px;
}

.how-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 980px;
    margin: 0 auto;
    align-items: stretch;
}

.how-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 84px;
}

.how-card--candidate {
    background: #eef2ff;
}

.how-card--employer {
    background: #f8fafc;
}

.how-tag {
    align-self: flex-start;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .1);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 20px;
}

.steps {
    list-style: none;
    margin: 0 0 24px;
    flex: 1;
}

.steps li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.step-num {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-2), var(--primary));
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.steps p {
    margin: 0;
    color: #334155;
    font-size: 1rem;
    line-height: 1.5;
}

/* ===== Footer ===== */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 22px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.brand-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--text);
}

.footer-inner p {
    margin: 0;
    color: var(--muted);
    font-size: .85rem;
}

/* Focus */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-2);
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 920px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 56px 24px 64px;
    }

    .hero-copy .lead {
        max-width: 40rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-links {
        display: none;
    }

    .nav {
        gap: 16px;
        height: 60px;
    }

    .checker {
        padding: 48px 0 24px;
    }

    .how {
        padding: 40px 0 60px;
    }

    .how-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hero-grid {
        padding-top: 40px;
        padding-bottom: 48px;
    }

    .hero-copy h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .checker-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .search-row {
        flex-direction: column;
    }

    .search-row .btn {
        width: 100%;
    }

    .phone-card {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* ===== Inner pages (applicant, profile, send-invite) ===== */
.page {
    padding: 48px 0 88px;
    min-height: calc(100vh - 69px);
}

.page-inner {
    max-width: 660px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
    margin-bottom: 14px;
    transition: color .15s ease;
}

.back-link:hover {
    color: var(--primary);
}

.page-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--shadow-md);
}

.page-head {
    margin-bottom: 26px;
}

.page-head h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    letter-spacing: -0.015em;
    line-height: 1.15;
    margin: 14px 0 10px;
}

.page-head .muted {
    margin: 0;
}

/* Fields */
.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: .92rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="url"],
.field textarea,
.field select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

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

.field select {
    cursor: pointer;
}

.field input[readonly] {
    background: #f1f5f9;
    color: var(--muted);
    cursor: not-allowed;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .12);
}

.field-help {
    margin-top: 7px;
    color: var(--muted);
    font-size: .85rem;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 22px;
}

.checkbox-row input {
    flex: none;
    width: 19px;
    height: 19px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-row label {
    font-size: .95rem;
    color: #334155;
    cursor: pointer;
    line-height: 1.45;
}

.btn-wide {
    width: 100%;
}

/* Success panel */
.success-panel {
    text-align: center;
    padding: 6px 0 2px;
}

.success-panel h2 {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.success-panel .muted {
    margin: 6px 0 12px;
}

.success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--success-bg);
    color: var(--success);
    font-size: 1.7rem;
    font-weight: 800;
}

.profile-link {
    margin: 4px 0 16px;
}

.profile-link a {
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
}

/* States */
.center-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    padding: 40px 0;
}

.error-text {
    color: #dc2626;
    font-weight: 600;
    font-size: 1.05rem;
}

/* Profile card */
.profile-card {
    text-align: center;
}

.avatar-big {
    width: 72px;
    height: 72px;
    font-size: 2.2rem;
}

.profile-name {
    margin: 4px 0 12px;
    font-size: clamp(1.6rem, 4vw, 2rem);
}

.profile-summary {
    margin: 0 0 16px;
    font-size: clamp(1.15rem, 2.6vw, 1.4rem);
    line-height: 1.45;
    font-weight: 600;
    color: #1a1a2e;
}

.profile-status {
    display: inline-flex;
    justify-content: center;
    margin-bottom: 22px;
}

.profile-rows {
    text-align: left;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 18px;
    margin-bottom: 20px;
}

.note-info {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
}

.note p {
    margin: 0 0 6px;
}

.note a {
    color: var(--primary);
}

.profile-code a {
    color: var(--primary);
    font-weight: 600;
    word-break: break-all;
}

@media (max-width: 560px) {
    .page {
        padding: 24px 0 64px;
    }

    .page-card {
        padding: 24px 18px;
        border-radius: 18px;
    }

    .back-link {
        margin-bottom: 12px;
    }
}

.chip-warn {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* ===== Role chooser ===== */
.role-hero {
    padding: 64px 0 96px;
}

.role-head {
    max-width: 640px;
    margin: 0 auto 44px;
    text-align: center;
}

.role-head h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.1rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin: 14px 0 0;
}

.role-head .lead {
    margin: 16px auto 0;
    font-size: 1.12rem;
    color: var(--muted);
    max-width: 34rem;
}

.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 940px;
    margin: 0 auto;
    align-items: stretch;
}

.role-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, .35);
}

.role-card--employer {
    background: #f8fafc;
}

.role-card--employee {
    background: #eef2ff;
}

.role-card__tag {
    align-self: flex-start;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(79, 70, 229, .1);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 18px;
}

.role-card h2 {
    margin: 0 0 12px;
    color: var(--text);
}

.role-card p {
    margin: 0 0 18px;
    color: #334155;
    line-height: 1.55;
}

.role-card__list {
    list-style: none;
    margin: 0 0 26px;
    padding: 0;
    flex: 1;
}

.role-card__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: #334155;
}

.role-card__list li::before {
    content: '✓';
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dcfce7;
    color: var(--success);
    font-size: .75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.role-card__cta {
    align-self: flex-start;
}

.how-grid--single {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
}

@media (max-width: 768px) {
    .role-grid {
        grid-template-columns: 1fr;
    }

    .role-hero {
        padding: 48px 0 72px;
    }
}
