/* ============================
   apply-page.css
   Page-specific styles for apply.html (지원하기)
   ============================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --bg: #faf9f7;
    --bg2: #f5f2ed;
    --tx: #1a1714;
    --tx2: #6b635a;
    --tx3: #9e958b;
    --ac: #8b6f47;
    --ac2: #a78b5f;
    --ac-light: rgba(139, 111, 71, .08);
    --fn: 'Pretendard Variable', -apple-system, sans-serif;
    --ease: cubic-bezier(.4, 0, .2, 1);
    --radius: 20px;
    --danger: #d63031;
}

html {
    scroll-behavior: smooth
}

body {
    font-family: var(--fn);
    background: var(--bg);
    color: var(--tx);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    min-height: 100vh;
    word-break: keep-all;
    overflow-wrap: break-word
}

/* ====== LAYOUT ====== */
.page-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px 80px
}

.logo-bar {
    text-align: center;
    margin-bottom: 40px
}

.logo-bar a {
    text-decoration: none;
    color: var(--tx);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -.02em;
    display: inline-flex;
    align-items: center;
    gap: 10px
}

.logo-bar a .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0
}

.logo-bar a span {
    color: var(--tx3);
    font-weight: 400;
    font-size: 16px
}

/* ====== STEP INDICATOR ====== */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 48px
}

.step {
    display: flex;
    align-items: center;
    gap: 0
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    border: 2px solid rgba(139, 111, 71, .2);
    color: var(--tx3);
    background: #fff;
    transition: all .3s var(--ease);
    flex-shrink: 0
}

.step-circle.active {
    border-color: var(--ac);
    background: var(--ac);
    color: #fff
}

.step-circle.done {
    border-color: var(--ac);
    background: var(--ac-light);
    color: var(--ac)
}

.step-label {
    font-size: 11px;
    color: var(--tx3);
    text-align: center;
    margin-top: 6px;
    white-space: nowrap
}

.step-label.active {
    color: var(--ac);
    font-weight: 600
}

.step-connector {
    width: 40px;
    height: 2px;
    background: rgba(139, 111, 71, .15);
    margin: 0 4px;
    flex-shrink: 0;
    transition: background .3s
}

.step-connector.done {
    background: var(--ac)
}

.step-col {
    display: flex;
    flex-direction: column;
    align-items: center
}

/* ====== FORM CARD ====== */
.form-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid rgba(139, 111, 71, .06);
    box-shadow: 0 2px 24px rgba(139, 111, 71, .04);
    padding: 40px 36px;
    margin-bottom: 24px
}

.form-card h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
    margin-bottom: 6px
}

.form-card .subtitle {
    font-size: 14px;
    color: var(--tx2);
    margin-bottom: 32px
}

/* ====== FORM ELEMENTS ====== */
.field {
    margin-bottom: 24px
}

.field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--tx)
}

.field label .req {
    color: var(--danger);
    margin-left: 2px
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid rgba(139, 111, 71, .15);
    border-radius: 12px;
    font-family: var(--fn);
    font-size: 14px;
    color: var(--tx);
    background: #fff;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
    outline: none;
    -webkit-appearance: none;
    appearance: none
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--ac);
    box-shadow: 0 0 0 3px var(--ac-light)
}

.field input.error,
.field select.error,
.field textarea.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(214, 48, 49, .08)
}

.field textarea {
    resize: vertical;
    min-height: 100px
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%239e958b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px
}

.field .char-count {
    text-align: right;
    font-size: 11px;
    color: var(--tx3);
    margin-top: 4px
}

.field .error-msg {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    display: none
}

.field .hint {
    font-size: 12px;
    color: var(--tx3);
    margin-top: 4px
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1.5px solid rgba(139, 111, 71, .12);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--tx2);
    cursor: pointer;
    transition: all .2s var(--ease);
    background: #fff
}

.checkbox-group label:hover {
    border-color: var(--ac);
    background: var(--ac-light)
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--ac);
    cursor: pointer
}

.checkbox-group label:has(input:checked) {
    border-color: var(--ac);
    background: var(--ac-light);
    color: var(--ac);
    font-weight: 600
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1.5px solid rgba(139, 111, 71, .12);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--tx2);
    cursor: pointer;
    transition: all .25s var(--ease);
    background: #fff
}

.radio-group label:hover {
    border-color: var(--ac);
    transform: translateX(4px)
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ac);
    cursor: pointer;
    flex-shrink: 0
}

.radio-group label:has(input:checked) {
    border-color: var(--ac);
    background: var(--ac-light);
    color: var(--ac);
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(139, 111, 71, .08)
}

/* ====== BUTTONS ====== */
.btn-row {
    display: flex;
    gap: 12px;
    margin-top: 32px
}

.btn-primary {
    flex: 1;
    padding: 16px;
    background: var(--ac);
    color: #fff;
    font-family: var(--fn);
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all .3s var(--ease)
}

.btn-primary:hover {
    background: var(--ac2);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(139, 111, 71, .2)
}

.btn-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none
}

.btn-secondary {
    padding: 16px 24px;
    background: #fff;
    color: var(--tx2);
    font-family: var(--fn);
    font-size: 14px;
    font-weight: 600;
    border: 1.5px solid rgba(139, 111, 71, .15);
    border-radius: 14px;
    cursor: pointer;
    transition: all .2s var(--ease)
}

.btn-secondary:hover {
    border-color: var(--ac);
    color: var(--ac)
}

/* ====== SECTIONS ====== */
.form-section {
    display: none;
    animation: fadeIn .4s var(--ease)
}

.form-section.active {
    display: block
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/* ====== COMPLETION ====== */
.completion {
    text-align: center;
    padding: 60px 20px
}

.completion .check-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--ac);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: #fff;
    animation: scaleIn .5s var(--ease)
}

@keyframes scaleIn {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.completion h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 12px
}

.completion p {
    font-size: 15px;
    color: var(--tx2);
    line-height: 1.8;
    margin-bottom: 8px
}

.completion .back-link {
    display: inline-block;
    margin-top: 32px;
    padding: 14px 32px;
    background: var(--ac-light);
    color: var(--ac);
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    transition: all .2s var(--ease)
}

.completion .back-link:hover {
    background: var(--ac);
    color: #fff
}

/* ====== SPINNER ====== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    vertical-align: middle;
    margin-right: 8px
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

/* ====== HONEYPOT (anti-bot) ====== */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    z-index: -1;
    pointer-events: none;
}

/* ====== PRIVACY CONSENT ====== */
.consent-section {
    margin-top: 28px;
    padding: 20px;
    background: var(--bg2);
    border-radius: 14px;
    border: 1px solid rgba(139, 111, 71, .08);
}

.consent-section h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--tx);
}

.consent-section .consent-text {
    font-size: 12px;
    color: var(--tx2);
    line-height: 1.7;
    margin-bottom: 16px;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.consent-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ac);
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.consent-check label {
    font-size: 13px;
    color: var(--tx);
    cursor: pointer;
    line-height: 1.5;
}

.consent-check label .req-tag {
    color: var(--danger);
    font-weight: 600;
    font-size: 11px;
}

.consent-check label .opt-tag {
    color: var(--tx3);
    font-weight: 400;
    font-size: 11px;
}

/* ====== RESPONSIVE ====== */
@media (max-width:600px) {
    .page-wrap {
        padding: 32px 16px 60px
    }

    .form-card {
        padding: 28px 20px
    }

    .form-card h2 {
        font-size: 19px
    }

    .step-connector {
        width: 24px
    }

    .step-circle {
        width: 30px;
        height: 30px;
        font-size: 12px
    }

    .step-label {
        font-size: 10px
    }

    .btn-row {
        flex-direction: column-reverse
    }

    .checkbox-group {
        flex-direction: column
    }
}