/*
 * contact.css — Samatva Solutions · Contact page
 * ────────────────────────────────────────────────
 * Layered on style.css + about.css (design tokens + shared components)
 *
 * SECTIONS:
 *   1.  Hero strip (.ct-hero)
 *   2.  Main split layout (.ct-main / .ct-grid)
 *   3.  Form card + step indicator
 *   4.  Fieldsets, inputs, labels
 *   5.  Service picker cards
 *   6.  Validation states + char counter
 *   7.  Action row (back + submit buttons)
 *   8.  Success state
 *   9.  Info panel (right column)
 *  10.  Responsive breakpoints
 */


/* ═══════════════════════════════════════════════
   1. HERO STRIP
   ─────────────────────────────────────────────
   Compact header matching site #e8f0fc palette.
   Two columns: intro text | trust badges
   ═══════════════════════════════════════════════ */

.ct-hero {
    background: #e8f0fc;
    /* same as main hero left panel */
    padding: 4rem 0 3.5rem;
}

.ct-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.ct-hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #0d1117;
    margin: 0.75rem 0 1rem;
}

.ct-hero-sub {
    font-size: 1rem;
    color: #374151;
    line-height: 1.7;
    max-width: 400px;
}

.ct-hero-sub strong {
    color: #1B4FD8;
    font-weight: 700;
}

/* Trust badge list */
.ct-trust {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.ct-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: #ffffff;
    border: 1px solid #dce9f8;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    transition: box-shadow 0.2s ease;
}

.ct-trust-item:hover {
    box-shadow: 0 4px 14px rgba(27, 79, 216, 0.10);
}

.ct-trust-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #e8f0fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1B4FD8;
}

.ct-trust-item>div>strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0d1117;
    margin-bottom: 0.1rem;
}

.ct-trust-item>div>p {
    font-size: 0.8125rem;
    color: #6B7280;
    line-height: 1.4;
}


/* ═══════════════════════════════════════════════
   2. MAIN SPLIT LAYOUT
   ─────────────────────────────────────────────
   50/50 grid on desktop. Form left, info right.
   ═══════════════════════════════════════════════ */

.ct-main {
    padding: 4rem 0 5rem;
    background: #f8fafc;
}

.ct-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    /* form wider, info panel fixed width */
    gap: 2rem;
    align-items: flex-start;
}


/* ═══════════════════════════════════════════════
   3. FORM CARD + STEP INDICATOR
   ═══════════════════════════════════════════════ */

.ct-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.5rem 2.5rem 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Step progress bar at top of form */
.ct-steps-indicator {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2.5rem;
}

.ct-step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.ct-step--active {
    opacity: 1;
}

.ct-step--done {
    opacity: 1;
}

.ct-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #6B7280;
    font-size: 0.8125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.ct-step--active .ct-step-num {
    background: #1B4FD8;
    color: #ffffff;
}

.ct-step--done .ct-step-num {
    background: #15803d;
    color: #ffffff;
}

.ct-step-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

/* Connecting line between steps */
.ct-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 0.75rem;
    border-radius: 9999px;
    position: relative;
    overflow: hidden;
}

.ct-step-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    /* animated via JS to 100% on step complete */
    background: #1B4FD8;
    transition: width 0.4s ease;
}

.ct-step-line.ct-step-line--done::after {
    width: 100%;
}


/* ═══════════════════════════════════════════════
   4. FIELDSETS, INPUTS, LABELS
   ═══════════════════════════════════════════════ */

.ct-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.ct-fieldset-legend {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin-bottom: 1.75rem;
}

.ct-legend-num {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1B4FD8;
}

.ct-fieldset-legend>*:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0d1117;
}

/* Individual field wrapper */
.ct-field {
    margin-bottom: 1.4rem;
}

.ct-field:last-of-type {
    margin-bottom: 0;
}

.ct-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.45rem;
}

.ct-label abbr {
    text-decoration: none;
    color: #1B4FD8;
    margin-left: 0.1rem;
}

.ct-optional {
    font-size: 0.775rem;
    font-weight: 400;
    color: #222222;
    margin-left: 0.25rem;
}

/* Text / email / url / tel inputs */
.ct-input {
    display: block;
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-family: var(--ff-base, 'Inter', sans-serif);
    font-size: 0.9375rem;
    color: #0d1117;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    appearance: none;
}

.ct-input::placeholder {
    color: #9CA3AF;
    font-size: 0.875rem;
}

/* Focus ring — WCAG 2.4.7 */
.ct-input:focus {
    border-color: #1B4FD8;
    box-shadow: 0 0 0 3px rgba(27, 79, 216, 0.15);
}

/* Textarea */
.ct-textarea {
    resize: vertical;
    min-height: 130px;
    line-height: 1.6;
}

/* Hint text */
.ct-hint {
    display: block;
    font-size: 0.8rem;
    color: #333333;
    margin-top: 0.35rem;
}

/* Error message */
.ct-err {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #b91c1c;
    margin-top: 0.35rem;
}

/* Input error state */
.ct-input.ct-input--error {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

/* Char count footer row */
.ct-field-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.35rem;
}

.ct-char-count {
    font-size: 0.75rem;
    color: #222222;
    transition: color 0.2s ease;
}

.ct-char-count.ct-char-count--warn {
    color: #b45309;
}


/* ═══════════════════════════════════════════════
   5. SERVICE PICKER CARDS
   ─────────────────────────────────────────────
   Visual radio buttons styled as click-to-select cards.
   Hidden native radio input, styled via parent label.
   ═══════════════════════════════════════════════ */

.ct-service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.ct-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 0.5rem;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    user-select: none;
}

/* Hide native radio — keep it accessible via keyboard */
.ct-service-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ct-service-icon {
    font-size: 1.4rem;
    line-height: 1;
}

.ct-service-name {
    font-size: 0.775rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

/* Hover */
.ct-service-card:hover {
    border-color: #a5b4fc;
    background: #eff6ff;
}

/* Checked state — selected card */
.ct-service-card:has(input:checked) {
    border-color: #1B4FD8;
    background: #e8f0fc;
    box-shadow: 0 0 0 3px rgba(27, 79, 216, 0.15);
}

.ct-service-card:has(input:checked) .ct-service-name {
    color: #1B4FD8;
}

/* Focus-visible on the label (keyboard nav) */
.ct-service-card:focus-within {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}


/* ═══════════════════════════════════════════════
   6. ACTION ROW — Back + Submit
   ═══════════════════════════════════════════════ */

.ct-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Back button — ghost style */
.ct-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    font-family: var(--ff-base, 'Inter', sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    padding: 0.5rem 0.25rem;
    border-radius: 8px;
    transition: color 0.2s ease;
}

.ct-back-btn:hover {
    color: #1B4FD8;
}

.ct-back-btn:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* Continue button (step 1) */
.ct-next-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    background: #1B4FD8;
    color: #ffffff;
    font-family: var(--ff-base, 'Inter', sans-serif);
    font-size: 0.9375rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.ct-next-btn:hover {
    background: #1239a6;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(27, 79, 216, 0.30);
}

.ct-next-btn:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

/* Submit button — primary */
.ct-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    background: #1B4FD8;
    color: #ffffff;
    font-family: var(--ff-base, 'Inter', sans-serif);
    font-size: 0.9375rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    flex: 1;
    justify-content: center;
}

.ct-submit-btn:hover {
    background: #1239a6;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(27, 79, 216, 0.30);
}

.ct-submit-btn:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 3px;
}

/* Loading state */
.ct-submit-btn.ct-submit-btn--loading {
    pointer-events: none;
    opacity: 0.75;
}

.ct-submit-btn.ct-submit-btn--loading .ct-submit-label::after {
    content: '…';
}


/* ═══════════════════════════════════════════════
   7. SUCCESS STATE
   ─────────────────────────────────────────────
   IMPORTANT: The [hidden] rule below must come
   BEFORE .ct-success so that the HTML `hidden`
   attribute (display:none) wins over the class-
   level display:flex when the element is hidden.
   Without this, display:flex overrides [hidden]
   and the success card appears on page load.
   ═══════════════════════════════════════════════ */

/* Enforce HTML hidden attribute — never let a
   class-level display override it */
[hidden] {
    display: none !important;
}

.ct-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 3rem 1rem;
    gap: 1rem;
}

.ct-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f0fdf4;
    border: 2px solid #86efac;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #15803d;
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes successPop {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ct-success-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0d1117;
}

.ct-success-msg {
    font-size: 1rem;
    color: #6B7280;
    line-height: 1.65;
    max-width: 340px;
}

.ct-success-msg strong {
    color: #0d1117;
}

.ct-success-home {
    margin-top: 0.5rem;
    background: #1B4FD8 !important;
    color: #ffffff !important;
    border-color: #1B4FD8 !important;
}

.ct-success-home:hover {
    background: #1239a6 !important;
    border-color: #1239a6 !important;
}

@media (prefers-reduced-motion: reduce) {
    .ct-success-icon {
        animation: none;
    }
}


/* ═══════════════════════════════════════════════
   8. INFO PANEL (right column)
   ═══════════════════════════════════════════════ */

.ct-info-col {
    position: sticky;
    /* sticks as user scrolls the form */
    top: calc(72px + 1.5rem);
    /* header height + gap */
}

.ct-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem 1.75rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.ct-info-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0d1117;
    margin-bottom: 1.25rem;
}

/* Contact list */
.ct-contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
    list-style: none;
    padding-left: 0;
}

.ct-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.ct-contact-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #e8f0fc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1B4FD8;
}

.ct-contact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000000;
    margin-bottom: 0.2rem;
}

.ct-contact-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1B4FD8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ct-contact-value:hover {
    color: #1239a6;
    text-decoration: underline;
}

.ct-contact-value:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 3px;
}

/* What happens next steps */
.ct-next-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0d1117;
    margin-bottom: 1rem;
}

.ct-next-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    list-style: none;
    padding: 0;
}

.ct-next-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}

.ct-next-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1B4FD8;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.05rem;
}


/* ═══════════════════════════════════════════════
   9. RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════ */

/* ── Tablet ≤ 900px ── */
@media (max-width: 900px) {
    .ct-hero-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .ct-trust {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .ct-grid {
        grid-template-columns: 1fr;
        /* info panel moves below form */
    }

    .ct-info-col {
        position: static;
        /* no sticky on tablet — natural flow */
    }
}

/* ── Mobile ≤ 600px ── */
@media (max-width: 600px) {
    .ct-hero {
        padding: 3rem 0 2.5rem;
    }

    .ct-hero-title {
        font-size: 1.9rem;
    }

    .ct-trust {
        grid-template-columns: 1fr;
    }

    .ct-form-card {
        padding: 1.5rem 1.25rem 2rem;
        border-radius: 14px;
    }

    .ct-service-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ct-action-row {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .ct-back-btn {
        width: 100%;
        justify-content: center;
    }
}