/**
 * KTM 랜딩 리드폼 — 자기완결 스타일 (외부 토큰 의존 없음)
 * warm·clear 교육 톤 · 다크 기본 + body.light-mode 라이트 대응 · 320/768/1440 반응형
 * 주의: light-mode.css 가 div/p/span/a 색을 !important 로 강제하므로
 *       라이트 모드 의미색(성공/오류/링크)은 더 높은 특이성 + !important 로 재선언한다.
 * @file alt42/viralktm/css/lead-form.css
 */

/* ── 섹션 골격 (다크 기본) ── */
.lead-form-section {
    position: relative;
    padding: 88px 20px;
    background:
        radial-gradient(ellipse 900px 480px at 50% -10%, rgba(251, 146, 60, 0.09), transparent 65%),
        transparent;
    font-family: 'Noto Sans KR', sans-serif;
}

.lead-form-section .section-container {
    max-width: 760px;
    margin: 0 auto;
}

.lead-form-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.lead-form-section .section-title {
    font-size: 2.1rem;
    font-weight: 900;
    line-height: 1.25;
    color: #f7f1e6;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
}

.lead-form-section .section-title .lf-title-accent {
    background: linear-gradient(100deg, #fbbf24, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.lead-form-section .section-subtitle {
    font-size: 1.02rem;
    line-height: 1.65;
    color: #cfc4b2;
    margin: 0;
}

/* ── 카드 ── */
.lead-form-card {
    background: linear-gradient(180deg, rgba(41, 35, 28, 0.96), rgba(28, 24, 20, 0.96));
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

/* ── 폼 레이아웃 ── */
.lead-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 18px;
}

.lf-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.lf-field--full {
    grid-column: 1 / -1;
}

.lf-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ddd2bf;
    letter-spacing: 0.01em;
}

.lf-label .lf-req {
    color: #fb923c;
    font-weight: 900;
    margin-left: 2px;
}

.lf-label .lf-optional {
    color: #9a8d78;
    font-weight: 400;
    font-size: 0.82rem;
}

.lf-input,
.lf-select,
.lf-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.4;
    color: #f5efe4;
    background: #241f1a;
    border: 1.5px solid #463b31;
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
    -webkit-appearance: none;
    appearance: none;
}

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

.lf-input:hover,
.lf-select:hover,
.lf-textarea:hover {
    border-color: #6b5b46;
}

.lf-input:focus,
.lf-select:focus,
.lf-textarea:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
    background: #2a241d;
}

.lf-select {
    background-image:
        linear-gradient(45deg, transparent 50%, #c9b998 50%),
        linear-gradient(135deg, #c9b998 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
    cursor: pointer;
}

.lf-textarea {
    min-height: 110px;
    resize: vertical;
}

.lf-field--error .lf-input,
.lf-field--error .lf-select,
.lf-field--error .lf-textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

/* ── 동의 체크 ── */
.lf-checks {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(251, 191, 36, 0.05);
    border: 1px solid rgba(251, 191, 36, 0.12);
    border-radius: 12px;
}

.lf-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #d8cdba;
    cursor: pointer;
}

.lf-check input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #f59e0b;
    cursor: pointer;
}

.lf-check a {
    color: #fbbf24;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lf-check a:hover {
    color: #fcd34d;
}

.lf-check .lf-optional {
    color: #9a8d78;
    font-size: 0.84rem;
}

/* ── 제출 버튼 ── */
.lf-submit-wrap {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lf-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    font-family: inherit;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #241505;
    background: linear-gradient(100deg, #fbbf24, #fb923c);
    border: none;
    border-radius: 14px;
    padding: 15px 24px;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
    box-shadow: 0 8px 24px rgba(251, 146, 60, 0.28);
}

.lf-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(251, 146, 60, 0.38);
    filter: brightness(1.04);
}

.lf-submit:active {
    transform: translateY(0);
    filter: brightness(0.97);
}

.lf-submit:focus-visible {
    outline: 3px solid rgba(251, 191, 36, 0.55);
    outline-offset: 2px;
}

.lf-submit:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

.lf-submit-note {
    text-align: center;
    font-size: 0.84rem;
    color: #9a8d78;
    margin: 0;
}

/* ── 상태 패널 ── */
.lf-status {
    grid-column: 1 / -1;
    border-radius: 12px;
    padding: 13px 16px;
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 600;
}

.lf-status[hidden] {
    display: none;
}

.lf-status--error {
    color: #fca5a5;
    background: rgba(153, 27, 27, 0.22);
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.lf-status--success {
    color: #86efac;
    background: rgba(22, 101, 52, 0.22);
    border: 1px solid rgba(74, 222, 128, 0.35);
}

/* ── 감사 패널 (성공 후 폼 대체) ── */
.lf-thanks {
    text-align: center;
    padding: 28px 8px;
}

.lf-thanks[hidden] {
    display: none;
}

.lf-thanks-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(120deg, rgba(251, 191, 36, 0.2), rgba(251, 146, 60, 0.2));
    border: 1.5px solid rgba(251, 191, 36, 0.45);
    color: #fbbf24;
    font-size: 1.8rem;
    margin-bottom: 18px;
}

.lf-thanks-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: #f7f1e6;
    margin: 0 0 10px;
}

.lf-thanks-desc {
    font-size: 0.98rem;
    line-height: 1.65;
    color: #cfc4b2;
    margin: 0;
}

/* ── honeypot 시각 은닉 (display:none 금지 — 봇 감지 회피) ── */
.lf-hp {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

/* ══ 라이트 모드 (body.light-mode) — 광역 !important 룰 대응 ══ */
body.light-mode .lead-form-section {
    background:
        radial-gradient(ellipse 900px 480px at 50% -10%, rgba(217, 119, 6, 0.07), transparent 65%),
        #ffffff;
}

body.light-mode .lead-form-section .section-title {
    color: #292018 !important;
}

body.light-mode .lead-form-section .section-title .lf-title-accent {
    background: linear-gradient(100deg, #d97706, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
}

body.light-mode .lead-form-section .section-subtitle {
    color: #6b5d4f !important;
}

body.light-mode .lead-form-card {
    background: #fffaf3;
    border: 1px solid #f0e2cf;
    box-shadow: 0 14px 40px rgba(120, 84, 32, 0.1);
}

body.light-mode .lead-form-section .lf-label {
    color: #4d4033 !important;
}

body.light-mode .lead-form-section .lf-label .lf-req {
    color: #ea580c !important;
}

body.light-mode .lead-form-section .lf-label .lf-optional {
    color: #a8988a !important;
}

body.light-mode .lead-form-section .lf-input,
body.light-mode .lead-form-section .lf-select,
body.light-mode .lead-form-section .lf-textarea {
    color: #292018;
    background: #ffffff;
    border-color: #e5d8c6;
}

body.light-mode .lead-form-section .lf-input::placeholder,
body.light-mode .lead-form-section .lf-textarea::placeholder {
    color: #a8988a;
}

body.light-mode .lead-form-section .lf-input:hover,
body.light-mode .lead-form-section .lf-select:hover,
body.light-mode .lead-form-section .lf-textarea:hover {
    border-color: #d0bfa6;
}

body.light-mode .lead-form-section .lf-input:focus,
body.light-mode .lead-form-section .lf-select:focus,
body.light-mode .lead-form-section .lf-textarea:focus {
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.18);
    background: #fffdf9;
}

body.light-mode .lead-form-section .lf-select {
    background-image:
        linear-gradient(45deg, transparent 50%, #8a7048 50%),
        linear-gradient(135deg, #8a7048 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

body.light-mode .lead-form-section .lf-checks {
    background: #fdf6ec;
    border-color: #f0e2cf;
}

body.light-mode .lead-form-section .lf-check {
    color: #4d4033 !important;
}

body.light-mode .lead-form-section .lf-check a {
    color: #c2570a !important;
}

body.light-mode .lead-form-section .lf-check a:hover {
    color: #9a4207 !important;
}

body.light-mode .lead-form-section .lf-check .lf-optional {
    color: #a8988a !important;
}

body.light-mode .lead-form-section .lf-submit {
    color: #ffffff !important;
    background: linear-gradient(100deg, #ea8c0c, #ea580c);
    box-shadow: 0 8px 22px rgba(234, 88, 12, 0.26);
}

body.light-mode .lead-form-section .lf-submit-note {
    color: #a8988a !important;
}

body.light-mode .lead-form-section .lf-status--error {
    color: #b91c1c !important;
    background: #fef2f2;
    border-color: #fecaca;
}

body.light-mode .lead-form-section .lf-status--success {
    color: #166534 !important;
    background: #ecfdf3;
    border-color: #bbf7d0;
}

body.light-mode .lead-form-section .lf-thanks-title {
    color: #292018 !important;
}

body.light-mode .lead-form-section .lf-thanks-desc {
    color: #6b5d4f !important;
}

body.light-mode .lead-form-section .lf-thanks-icon {
    background: #fdf1de;
    border-color: #f3cf9a;
    color: #d97706 !important;
}

/* ══ 반응형 ══ */
/* ~767px: 1칼럼 */
@media (max-width: 767px) {
    .lead-form-section {
        padding: 64px 16px;
    }

    .lead-form-section .section-title {
        font-size: 1.65rem;
    }

    .lead-form-card {
        padding: 26px 18px;
        border-radius: 16px;
    }

    .lead-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .lf-field {
        grid-column: 1 / -1;
    }
}

/* ~359px: 초소형 */
@media (max-width: 359px) {
    .lead-form-section {
        padding: 48px 12px;
    }

    .lead-form-card {
        padding: 20px 14px;
    }

    .lead-form-section .section-title {
        font-size: 1.45rem;
    }

    .lf-input,
    .lf-select,
    .lf-textarea {
        font-size: 0.95rem;
        padding: 11px 12px;
    }

    .lf-submit {
        font-size: 1rem;
        padding: 13px 18px;
    }
}

/* 1440px~: 여백 확대 */
@media (min-width: 1440px) {
    .lead-form-section {
        padding: 110px 24px;
    }

    .lead-form-card {
        padding: 44px 48px;
    }
}

/* 모션 최소화 선호 */
@media (prefers-reduced-motion: reduce) {
    .lf-input,
    .lf-select,
    .lf-textarea,
    .lf-submit {
        transition: none;
    }

    .lf-submit:hover {
        transform: none;
    }
}
