/* ============================================================
   Lead Form Page — Pinnacle Roofing Pros
   Brand: Oswald headlines · Roboto body · #01BF5A accent green
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
.lf-page {
    --lf-bg:          #f5f5f7;
    --lf-surface:     #ffffff;
    --lf-card:        #ffffff;
    --lf-card-border: rgba(0,0,0,0.08);
    --lf-green:       #01BF5A;
    --lf-green-dark:  #00A34D;
    --lf-green-glow:  rgba(1,191,90,0.12);
    --lf-text:        #0a0a0a;
    --lf-text-muted:  #52525B;
    --lf-text-dim:    #71717A;
    --lf-error:       #dc2626;
    --lf-error-bg:    rgba(220,38,38,0.06);
    --lf-border:      #E4E4E7;
    --lf-input-bg:    #ffffff;
    --lf-input-focus: rgba(1,191,90,0.08);
    --lf-radius:      6px;
    --lf-radius-lg:   12px;
    --lf-font-head:   'Oswald', sans-serif;
    --lf-font-body:   'Roboto', sans-serif;
}

/* ── Reset / scope ────────────────────────────────────────── */
.lf-page *,
.lf-page *::before,
.lf-page *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.lf-page {
    background: var(--lf-bg);
    color: var(--lf-text);
    font-family: var(--lf-font-body);
    line-height: 1.6;
    min-height: 60vh;
}

/* ── Hero split ───────────────────────────────────────────── */
.lf-hero {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 3fr;
    min-height: calc(100vh - 80px);
    overflow: hidden;
    max-width: 1440px;
    margin-inline: auto;
}

/* Diagonal background split */
.lf-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, #eaeaed 52%, var(--lf-surface) 52%);
    z-index: 0;
}

/* Geometric roof-ridge accent line */
.lf-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(0deg);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--lf-green) 20%, var(--lf-green) 80%, transparent 100%);
    opacity: 0.25;
    z-index: 1;
    pointer-events: none;
}

/* ── Left panel — brand content ───────────────────────────── */
.lf-panel-left {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px 64px 80px 48px;
}

/* Subtle background pattern on left */
.lf-panel-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            -55deg,
            transparent,
            transparent 40px,
            rgba(1,191,90,0.025) 40px,
            rgba(1,191,90,0.025) 41px
        );
    z-index: -1;
    pointer-events: none;
}

/* Green top accent bar */
.lf-accent-bar {
    width: 56px;
    height: 4px;
    background: var(--lf-green);
    border-radius: 2px;
    margin-bottom: 28px;
}

.lf-eyebrow {
    font-family: var(--lf-font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lf-green);
    margin-bottom: 16px;
}

.lf-headline {
    font-family: var(--lf-font-head);
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--lf-text);
    margin-bottom: 24px;
}

.lf-headline em {
    font-style: normal;
    color: var(--lf-green);
}

.lf-subhead {
    font-family: var(--lf-font-body);
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--lf-text-muted);
    line-height: 1.7;
    max-width: 420px;
    margin-bottom: 48px;
}

/* Trust badges */
.lf-trust {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lf-trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lf-trust-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(1,191,90,0.12);
    border: 1px solid rgba(1,191,90,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lf-trust-icon svg {
    width: 16px;
    height: 16px;
    stroke: var(--lf-green);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lf-trust-text {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--lf-text-muted);
}

.lf-trust-text strong {
    display: block;
    color: var(--lf-text);
    font-weight: 500;
    font-size: 0.92rem;
}

/* ── Right panel — form ───────────────────────────────────── */
.lf-panel-right {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px 60px 40px;
}

/* ── Form card ────────────────────────────────────────────── */
.lf-card {
    width: 100%;
    max-width: 480px;
    background: var(--lf-card);
    border: 1px solid var(--lf-card-border);
    border-radius: var(--lf-radius-lg);
    padding: 44px 40px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.06),
        0 12px 32px rgba(0,0,0,0.09);
    position: relative;
    overflow: hidden;
    /* Entry animation */
    animation: lf-card-in 0.6s cubic-bezier(0.22,1,0.36,1) both;
    animation-delay: 0.15s;
}

@keyframes lf-card-in {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Green top edge glow on card */
.lf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--lf-green), transparent);
    border-radius: var(--lf-radius-lg) var(--lf-radius-lg) 0 0;
}

.lf-card-title {
    font-family: var(--lf-font-head);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--lf-text);
    margin-bottom: 6px;
}

.lf-card-sub {
    font-size: 0.875rem;
    color: var(--lf-text-dim);
    margin-bottom: 32px;
    line-height: 1.5;
}

/* ── Form layout ──────────────────────────────────────────── */
.lf-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.lf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.lf-field:last-of-type {
    margin-bottom: 0;
}

.lf-label {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lf-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.lf-required {
    color: var(--lf-green);
    font-size: 0.85em;
}

.lf-optional {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--lf-text-dim);
    text-transform: none;
    letter-spacing: 0;
    margin-left: 4px;
}

.lf-input,
.lf-textarea {
    background: var(--lf-input-bg);
    border: 1px solid var(--lf-border);
    border-radius: var(--lf-radius);
    color: var(--lf-text);
    font-family: var(--lf-font-body);
    font-size: 0.94rem;
    font-weight: 300;
    padding: 11px 14px;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.lf-input::placeholder,
.lf-textarea::placeholder {
    color: #a1a1aa;
}

.lf-input:hover,
.lf-textarea:hover {
    border-color: #d1d1d6;
}

.lf-input:focus,
.lf-textarea:focus {
    border-color: var(--lf-green);
    background: var(--lf-input-focus);
    box-shadow: 0 0 0 3px rgba(1,191,90,0.12);
}

.lf-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.55;
}

/* Field error state */
.lf-field.has-error .lf-input,
.lf-field.has-error .lf-textarea {
    border-color: var(--lf-error);
    background: var(--lf-error-bg);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.lf-field-error {
    font-size: 0.75rem;
    color: var(--lf-error);
    display: none;
    margin-top: 2px;
    animation: lf-shake 0.35s ease;
}

.lf-field.has-error .lf-field-error {
    display: block;
}

@keyframes lf-shake {
    0%, 100% { transform: translateX(0); }
    25%       { transform: translateX(-5px); }
    75%       { transform: translateX(5px); }
}

/* ── Submit button ────────────────────────────────────────── */
.lf-submit-wrap {
    margin-top: 28px;
}

.lf-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--lf-green);
    color: #0a0a0a;
    border: none;
    border-radius: var(--lf-radius);
    font-family: var(--lf-font-head);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.lf-btn:hover:not(:disabled) {
    background: var(--lf-green-dark);
    box-shadow: 0 8px 24px rgba(1,191,90,0.3);
    transform: translateY(-1px);
}

.lf-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Loading spinner */
.lf-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #0a0a0a;
    border-radius: 50%;
    animation: lf-spin 0.65s linear infinite;
    display: none;
    flex-shrink: 0;
}

@keyframes lf-spin {
    to { transform: rotate(360deg); }
}

.lf-btn.is-loading .lf-btn-spinner  { display: block; }
.lf-btn.is-loading .lf-btn-text     { opacity: 0.7; }

/* ── Form states (success / error) ───────────────────────── */
.lf-form-message {
    display: none;
    padding: 16px 18px;
    border-radius: var(--lf-radius);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-top: 20px;
    animation: lf-fade-in 0.35s ease;
}

@keyframes lf-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lf-form-message.is-success {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(1,191,90,0.08);
    border: 1px solid rgba(1,191,90,0.25);
    color: #166534;
}

.lf-form-message.is-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--lf-error-bg);
    border: 1px solid rgba(220,38,38,0.25);
    color: var(--lf-error);
}

.lf-form-message svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.lf-form-message strong {
    display: block;
    margin-bottom: 2px;
    font-weight: 500;
}

/* ── Success overlay (full card) ──────────────────────────── */
.lf-success-overlay {
    display: none;
    position: absolute;
    inset: 0;
    background: var(--lf-card);
    border-radius: var(--lf-radius-lg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 40px;
    z-index: 10;
    animation: lf-fade-in 0.4s ease;
}

.lf-success-overlay.is-visible {
    display: flex;
}

.lf-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(1,191,90,0.12);
    border: 2px solid rgba(1,191,90,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.lf-success-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--lf-green);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: lf-check-draw 0.5s ease 0.2s forwards;
}

@keyframes lf-check-draw {
    to { stroke-dashoffset: 0; }
}

.lf-success-title {
    font-family: var(--lf-font-head);
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--lf-text);
    margin-bottom: 10px;
}

.lf-success-body {
    font-size: 0.9rem;
    color: var(--lf-text-muted);
    line-height: 1.65;
    max-width: 320px;
}

/* ── Disclaimer / privacy note ────────────────────────────── */
.lf-disclaimer {
    margin-top: 14px;
    font-size: 0.72rem;
    color: var(--lf-text-dim);
    line-height: 1.5;
    text-align: center;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
    .lf-hero {
        grid-template-columns: 1fr;
        min-height: unset;
    }

    .lf-hero::before {
        background: #eaeaed;
    }

    .lf-hero::after {
        display: none;
    }

    .lf-panel-left {
        padding: 60px 32px 40px;
    }

    .lf-panel-right {
        padding: 0 24px 64px;
    }

    .lf-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .lf-panel-left {
        padding: 48px 20px 36px;
    }

    .lf-panel-right {
        padding: 0 16px 52px;
    }

    .lf-card {
        padding: 32px 24px;
    }

    .lf-row {
        grid-template-columns: 1fr;
    }

    .lf-headline {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .lf-trust {
        display: none;
    }
}

/* ── Left panel entry animations ──────────────────────────── */
.lf-accent-bar   { animation: lf-slide-in 0.5s cubic-bezier(0.22,1,0.36,1) both; animation-delay: 0.0s; }
.lf-eyebrow      { animation: lf-slide-in 0.5s cubic-bezier(0.22,1,0.36,1) both; animation-delay: 0.08s; }
.lf-headline     { animation: lf-slide-in 0.5s cubic-bezier(0.22,1,0.36,1) both; animation-delay: 0.14s; }
.lf-subhead      { animation: lf-slide-in 0.5s cubic-bezier(0.22,1,0.36,1) both; animation-delay: 0.2s; }
.lf-trust        { animation: lf-slide-in 0.5s cubic-bezier(0.22,1,0.36,1) both; animation-delay: 0.28s; }

@keyframes lf-slide-in {
    from { opacity: 0; transform: translateX(-18px); }
    to   { opacity: 1; transform: translateX(0); }
}
