@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary: #231f20;
    --accent: #bd1117;
    --accent-dark: #9e0b0f;
    --accent-light: #fbe3e4;
    --border: #dedede;
    --muted: #6d6e71;
    --bg: #f7f7f7;
    --white: #ffffff;
    --danger: #dc2626;
    --warning: #d97706;
}

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

body.intake-body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--primary);
    line-height: 1.5;
    min-height: 100vh;
}

.intake-header {
    background: #ffffff;
    color: #231f20;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #dedede;
}

.intake-header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.intake-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #231f20;
}
.intake-logo img { height: 3.25rem; width: auto; display: block; }

.intake-logo-mark {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--accent);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.intake-logo-text { font-weight: 700; font-size: 1.1rem; }

.intake-header-phone {
    color: #414042;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.intake-header-phone:hover { color: #bd1117; }

.intake-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1rem;
}

.intake-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.intake-hero .badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-dark);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.intake-hero p {
    color: var(--muted);
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.intake-time-estimate {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--muted);
    background: white;
    border: 1px solid var(--border);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.intake-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Progress bar */
.intake-progress-wrap {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.intake-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.intake-progress-bar {
    height: 6px;
    background: #dedede;
    border-radius: 999px;
    overflow: hidden;
}

.intake-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #df1920);
    border-radius: 999px;
    transition: width 0.35s ease;
    width: 0%;
}

.intake-steps-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.intake-step-pill {
    font-size: 0.68rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #eeeeef;
    color: var(--muted);
    border: 1px solid transparent;
}

.intake-step-pill.active {
    background: var(--accent-light);
    color: var(--accent-dark);
    border-color: #f7c4c6;
    font-weight: 600;
}

.intake-step-pill.done {
    background: #ecfdf5;
    color: #047857;
}

/* Form card */
.intake-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);
}

.intake-step {
    display: none;
    padding: 1.75rem 1.75rem 1.25rem;
    animation: fadeIn 0.3s ease;
}

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

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

.intake-step-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.intake-step-desc {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.intake-section-note {
    background: #fdf2f2;
    border: 1px solid #f7c4c6;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: #9e0b0f;
    margin-bottom: 1.25rem;
}

.intake-section-note.warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

/* Form fields */
.intake-grid {
    display: grid;
    gap: 1rem;
}

.intake-grid-2 { grid-template-columns: 1fr 1fr; }
.intake-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 640px) {
    .intake-grid-2, .intake-grid-3 { grid-template-columns: 1fr; }
}

.intake-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #414042;
    margin-bottom: 0.35rem;
}

.intake-field label .req { color: var(--danger); }

.intake-field input[type="text"],
.intake-field input[type="email"],
.intake-field input[type="tel"],
.intake-field input[type="date"],
.intake-field input[type="number"],
.intake-field input[type="file"],
.intake-field select,
.intake-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--primary);
    background: white;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.intake-field input:focus,
.intake-field select:focus,
.intake-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(13 148 136 / 0.12);
}

.intake-field textarea { min-height: 5rem; resize: vertical; }

.intake-field .hint {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.25rem;
}

.intake-field.has-error input,
.intake-field.has-error select,
.intake-field.has-error textarea {
    border-color: var(--danger);
}

.intake-error-msg {
    font-size: 0.72rem;
    color: var(--danger);
    margin-top: 0.25rem;
    display: none;
}

.intake-field.has-error .intake-error-msg { display: block; }

/* Checkbox / radio groups */
.intake-checkgroup {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.intake-checkitem {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.intake-checkitem:hover { border-color: var(--accent); background: #fdf2f2; }

.intake-checkitem input { accent-color: var(--accent); }

.intake-checkitem.checked {
    border-color: var(--accent);
    background: var(--accent-light);
}

.intake-yesno {
    display: flex;
    gap: 0.5rem;
}

.intake-yesno label {
    flex: 1;
    text-align: center;
    padding: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}

.intake-yesno input { display: none; }

.intake-yesno input:checked + span {
    display: block;
}

.intake-yesno label:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent-dark);
    font-weight: 600;
}

/* Repeatable blocks */
.intake-repeatable {
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.intake-repeatable-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.75rem;
}

.intake-btn-add {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: 1px dashed var(--accent);
    border-radius: 0.65rem;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.intake-btn-add:hover { background: var(--accent-light); }

.intake-btn-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: var(--danger);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

/* Navigation buttons */
.intake-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.75rem 1.5rem;
    border-top: 1px solid var(--border);
    background: #fafbfc;
    gap: 0.75rem;
}

.intake-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: all 0.15s;
}

.intake-btn-secondary {
    background: white;
    border: 1px solid var(--border);
    color: var(--primary);
}

.intake-btn-secondary:hover { background: #eeeeef; }

.intake-btn-primary {
    background: var(--accent);
    color: white;
}

.intake-btn-primary:hover { background: var(--accent-dark); }

.intake-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.intake-save-hint {
    font-size: 0.72rem;
    color: var(--muted);
}

/* Review summary */
.intake-review-section {
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.intake-review-section h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.intake-review-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid #eeeeef;
    gap: 1rem;
}

.intake-review-row:last-child { border-bottom: none; }

.intake-review-row .key { color: var(--muted); flex-shrink: 0; }
.intake-review-row .val { font-weight: 500; text-align: right; word-break: break-word; }

/* Success state */
.intake-success {
    text-align: center;
    padding: 3rem 2rem;
}

.intake-success-icon {
    width: 4rem;
    height: 4rem;
    background: #ecfdf5;
    color: #059669;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1rem;
}

/* Hub page cards */
.intake-hub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

@media (max-width: 700px) {
    .intake-hub-grid { grid-template-columns: 1fr; }
}

.intake-hub-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.intake-hub-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.08);
    transform: translateY(-2px);
}

.intake-hub-card .icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.85rem;
}

.intake-hub-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.35rem; }
.intake-hub-card p { font-size: 0.85rem; color: var(--muted); flex: 1; }

.intake-hub-card .cta {
    margin-top: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
}

.intake-hub-card .tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.tag-new { background: #dbeafe; color: #1d4ed8; }
.tag-renewal { background: #fef3c7; color: #b45309; }
.tag-personal { background: #e0e7ff; color: #4338ca; }
.tag-commercial { background: #ffedd5; color: #c2410c; }

/* JotForm embed */
.jotform-embed-wrap {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    min-height: 600px;
}

.jotform-embed-wrap iframe {
    width: 100%;
    min-height: 900px;
    border: none;
}

.intake-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.intake-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.25rem 0;
}

.intake-subsection-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #58595b;
    margin: 1rem 0 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #eeeeef;
}

.intake-conditional { display: none; }
.intake-conditional.show { display: block; }
/* Accessibility + compliance additions (2026-11-18) */
.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; }
.intake-clear-btn { margin-left:auto; background:none; border:1px solid var(--border, #d1d5db); border-radius:999px; padding:0.2rem 0.75rem; font-size:0.75rem; font-weight:600; color:var(--accent, #9e0b0f); cursor:pointer; }
.intake-clear-btn:hover, .intake-clear-btn:focus-visible { background:#fdf2f2; }
.intake-progress-label { flex-wrap:wrap; gap:0.5rem; align-items:center; }
.intake-consent { font-size:0.8rem; line-height:1.45; color:var(--muted, #58595b); margin:1.25rem 0 0; }
.intake-consent a, .intake-license a { color:var(--accent, #9e0b0f); text-decoration:underline; }
.intake-license { margin-top:0.5rem; font-size:0.75rem; }
