/* ==============================================================
   brief.css — стили страницы брифа
   ============================================================== */

.brief-page {
    background: var(--bg-subtle);
    min-height: calc(100vh - 57px);
    padding: 48px 0 80px;
    position: relative;
    overflow: hidden;
}
.brief-page::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(255, 92, 0, 0.04) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
.brief-container {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === HEADER === */
.brief-head {
    text-align: center;
    margin-bottom: 32px;
}
.brief-head .section-label {
    justify-content: center;
    display: flex;
    margin-bottom: 16px;
}
.brief-head h1 {
    font-family: 'Inter Tight', sans-serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-bottom: 12px;
}
.brief-head h1 em {
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
}
.brief-head p {
    font-size: 15px;
    color: var(--muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.55;
}

/* === PROGRESS === */
.brief-progress {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.brief-progress-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    white-space: nowrap;
}
.brief-progress-text strong {
    color: var(--accent);
    font-weight: 600;
}
.brief-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--border-subtle);
    border-radius: 2px;
    overflow: hidden;
}
.brief-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    width: 0%;
}

/* === STEP CARD === */
.brief-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.brief-step {
    display: none;
    animation: stepFade 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.brief-step.active { display: block; }
@keyframes stepFade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-meta {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 12px;
}
.step-title {
    font-family: 'Inter Tight', sans-serif;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    line-height: 1.2;
    margin-bottom: 8px;
}
.step-desc {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 28px;
    line-height: 1.55;
}

/* === FORM FIELDS === */
.field {
    margin-bottom: 20px;
}
.field-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: -0.005em;
}
.field-label .required {
    color: var(--accent);
    margin-left: 2px;
}
.field-hint {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.4;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea {
    min-height: 96px;
    resize: vertical;
    font-family: 'Inter', sans-serif;
    line-height: 1.55;
}
input::placeholder, textarea::placeholder {
    color: var(--muted-2);
}

/* === RADIO / CHECKBOX CARDS === */
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.options-grid.two-col {
    grid-template-columns: 1fr 1fr;
}
@media (max-width: 540px) {
    .options-grid.two-col { grid-template-columns: 1fr; }
}

.option-card {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px 14px 44px;
    background: var(--bg);
    transition: all 0.15s ease;
    display: block;
}
.option-card:hover {
    border-color: var(--muted-3);
    background: var(--bg-subtle);
}
.option-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.option-card .option-indicator {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--muted-3);
    border-radius: 50%;
    background: var(--bg);
    transition: all 0.15s ease;
}
.option-card .option-indicator::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s ease;
}
/* Checkbox-вариант */
.option-card.check .option-indicator {
    border-radius: 4px;
}
.option-card.check .option-indicator::after {
    width: 10px;
    height: 6px;
    background: transparent;
    border-left: 1.5px solid #fff;
    border-bottom: 1.5px solid #fff;
    border-radius: 0;
    transform: translate(-50%, -75%) rotate(-45deg) scale(0);
}

.option-card input:checked ~ .option-indicator {
    background: var(--accent);
    border-color: var(--accent);
}
.option-card input:checked ~ .option-indicator::after {
    transform: translate(-50%, -50%) scale(1);
}
.option-card.check input:checked ~ .option-indicator::after {
    transform: translate(-50%, -75%) rotate(-45deg) scale(1);
}
.option-card:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.option-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.3;
    letter-spacing: -0.005em;
}
.option-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
    margin-top: 3px;
}

/* === Type select cards (с описанием) === */
.type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.type-card-select {
    cursor: pointer;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    background: var(--bg);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.type-card-select::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}
.type-card-select:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
}
.type-card-select.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.type-card-select input { position: absolute; opacity: 0; }
.type-icon {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}
.type-name {
    font-family: 'Inter Tight', sans-serif;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 6px;
}
.type-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}
@media (max-width: 540px) {
    .type-grid { grid-template-columns: 1fr; }
}

/* === Contact method tabs === */
.contact-method {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: var(--bg-subtle);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 12px;
}
.contact-method label {
    cursor: pointer;
    padding: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-radius: 6px;
    transition: all 0.15s ease;
}
.contact-method input { display: none; }
.contact-method label:has(input:checked) {
    background: var(--bg);
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* === NAV BUTTONS === */
.brief-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}
.brief-nav .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}
.brief-nav .btn-back:hover {
    color: var(--ink);
    background: var(--bg-subtle);
}
.brief-nav .btn-back svg { width: 14px; height: 14px; }
.brief-nav .btn-back.hidden { visibility: hidden; }

.brief-nav .btn-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    background: var(--ink);
    color: var(--bg);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.brief-nav .btn-next:hover {
    background: #1F1F1F;
    transform: translateY(-1px);
}
.brief-nav .btn-next:disabled {
    background: var(--muted-3);
    cursor: not-allowed;
    transform: none;
}
.brief-nav .btn-next svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}
.brief-nav .btn-next:hover:not(:disabled) svg {
    transform: translateX(2px);
}

/* === Honeypot === */
.honeypot {
    position: absolute;
    left: -10000px;
    top: -10000px;
    visibility: hidden;
}

/* === ERROR STATES === */
.field-error input,
.field-error textarea,
.field-error select {
    border-color: #DC2626;
}
.field-error-msg {
    font-size: 12px;
    color: #DC2626;
    margin-top: 4px;
}

/* === Submit state === */
.brief-loader {
    display: none;
    text-align: center;
    padding: 40px 20px;
}
.brief-loader.active { display: block; }
.brief-loader-spin {
    width: 32px;
    height: 32px;
    margin: 0 auto 16px;
    border: 2.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.brief-loader p {
    font-size: 14px;
    color: var(--muted);
}

/* === THANKS PAGE === */
.thanks-page {
    background: var(--bg-subtle);
    min-height: calc(100vh - 57px);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}
.thanks-page::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(255, 92, 0, 0.06) 0%, transparent 65%);
    pointer-events: none;
}
.thanks-card {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 56px 40px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.thanks-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}
.thanks-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}
.thanks-card .section-label {
    justify-content: center;
    display: flex;
    margin-bottom: 16px;
}
.thanks-card h1 {
    font-family: 'Inter Tight', sans-serif;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 12px;
}
.thanks-card h1 em {
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
}
.thanks-card > p {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 32px;
}
.thanks-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 20px 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 32px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.05em;
}
.thanks-meta span { display: flex; align-items: center; gap: 6px; }
.thanks-meta span::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--success);
}
.thanks-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 540px) {
    .brief-card { padding: 28px 22px; }
    .step-title { font-size: 21px; }
    .thanks-card { padding: 40px 28px; }
    .thanks-card h1 { font-size: 26px; }
}
