:root {
    --bg: #f4efe6;
    --surface: #fbf8f2;
    --surface-strong: #fffdf8;
    --ink: #14233b;
    --ink-soft: rgba(20, 35, 59, 0.7);
    --line: rgba(20, 35, 59, 0.14);
    --navy: #14233b;
    --brass: #b98b2f;
    --brass-soft: rgba(185, 139, 47, 0.16);
    --rose: #9f4c3d;
    --rose-soft: rgba(159, 76, 61, 0.12);
    --shadow: 0 28px 70px rgba(20, 35, 59, 0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    font-family: "Manrope", system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(185, 139, 47, 0.14), transparent 28%),
        linear-gradient(180deg, #f7f2e8 0%, #f0e8db 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.04;
    background-image:
        linear-gradient(rgba(20, 35, 59, 0.15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 35, 59, 0.15) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 85%);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 248, 242, 0.8);
    backdrop-filter: blur(16px);
}

.topbar-brand,
.topbar-event {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.topbar-divider {
    width: 1px;
    height: 14px;
    background: var(--line);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    min-height: calc(100vh - 58px);
    min-height: calc(100svh - 58px);
    min-height: calc(100dvh - 58px);
}

.hero,
.panel {
    padding: clamp(24px, 4vw, 48px);
}

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.hero-card {
    max-width: 520px;
    padding-top: clamp(36px, 10vh, 110px);
}

label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 7px;
    color: rgba(20, 35, 59, 0.7);
}

.required-mark {
    color: var(--rose);
}

.bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 20px 0 26px;
}

.bar {
    display: block;
    background: linear-gradient(90deg, var(--brass), rgba(185, 139, 47, 0.24));
}

.bar-1 { width: 34%; height: 2px; }
.bar-2 { width: 56%; height: 4px; }
.bar-3 { width: 82%; height: 7px; }

h1 {
    margin: 0;
    font-family: "Fraunces", serif;
    font-size: clamp(2.8rem, 7vw, 5.2rem);
    line-height: 0.94;
    letter-spacing: -0.04em;
    max-width: 8ch;
}

.hero-copy {
    margin: 22px 0 0;
    max-width: 40ch;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--ink-soft);
}

.hero-qr {
    width: 256px;
    margin-top: 28px;
    margin-left: auto;
    margin-right: auto;
    padding: 18px;
    border: 1px solid rgba(159, 76, 61, 0.55);
    background: rgba(255, 253, 248, 0.6);
    box-shadow: 0 20px 40px rgba(20, 35, 59, 0.06);
    text-align: center;
}

.hero-qr-label {
    margin: 0 0 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.hero-qr img {
    display: block;
    width: 100%;
    height: auto;
    background: #ffffff;
}

.panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

#career-form,
#success-message {
    width: 100%;
    max-width: 560px;
    background: rgba(255, 253, 248, 0.9);
    border: 1px solid rgba(20, 35, 59, 0.12);
    box-shadow: var(--shadow);
    padding: clamp(20px, 3vw, 34px);
}

.field {
    margin-bottom: 16px;
}

.upload-section {
    margin-bottom: 20px;
}

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

.upload-card {
    padding: 16px;
    border-radius: 20px;
    border: 1px solid rgba(20, 35, 59, 0.1);
    background: rgba(255, 255, 255, 0.55);
}

.upload-card.has-file {
    border-color: rgba(185, 139, 47, 0.55);
    box-shadow: 0 0 0 4px rgba(185, 139, 47, 0.1);
}

.upload-card label {
    margin-bottom: 8px;
}

.visually-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

input,
select,
textarea,
button {
    font: inherit;
}

input:not([type="file"]),
select,
textarea {
    width: 100%;
    border: 1px solid rgba(20, 35, 59, 0.14);
    background: var(--surface-strong);
    color: var(--ink);
    padding: 15px 16px;
    border-radius: 16px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
    resize: vertical;
    min-height: 118px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--brass);
    box-shadow: 0 0 0 4px var(--brass-soft);
}

input.invalid,
select.invalid,
textarea.invalid {
    border-color: var(--rose);
    box-shadow: 0 0 0 4px var(--rose-soft);
}

.file-trigger {
    width: auto;
    margin-top: 0;
    padding: 12px 22px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
    box-shadow: none;
}

.file-status {
    margin: 10px 0 0;
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.45;
    word-break: break-word;
}

.message {
    margin-top: 4px;
    border-radius: 18px;
    padding: 16px 18px;
    line-height: 1.5;
}

.message h2 {
    margin: 0 0 8px;
    font-family: "Fraunces", serif;
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.message p {
    margin: 0;
}

.message.error {
    color: #7e2f26;
    background: rgba(159, 76, 61, 0.1);
    border: 1px solid rgba(159, 76, 61, 0.24);
}

.message.success {
    color: var(--ink);
    background: rgba(185, 139, 47, 0.08);
    border: 1px solid rgba(185, 139, 47, 0.24);
}

button[type="submit"],
#reset-btn {
    width: 100%;
    margin-top: 18px;
    padding: 16px 22px;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

button[type="submit"] {
    background: var(--navy);
    color: #fffaf1;
    box-shadow: 0 16px 30px rgba(20, 35, 59, 0.18);
}

#reset-btn {
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
}

button:hover {
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.hidden {
    display: none;
}

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-bottom: 4px;
    }

    .hero-card {
        max-width: 100%;
        padding-top: 16px;
    }

    h1 {
        max-width: 10ch;
    }

    .hero-qr {
        width: 224px;
        margin-top: 22px;
    }
}

@media (max-width: 640px) {
    .topbar {
        padding: 12px 18px;
        gap: 10px;
    }

    .topbar-brand,
    .topbar-event {
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    .hero,
    .panel {
        padding: 18px;
    }

    .hero-copy {
        margin-top: 16px;
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .hero-qr {
        display: none;
    }

    #career-form,
    #success-message {
        padding: 18px;
        border-radius: 24px;
    }

    input:not([type="file"]),
    select,
    textarea {
        padding: 14px 15px;
        border-radius: 14px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }

    .upload-card {
        padding: 14px;
        border-radius: 18px;
    }

    .file-trigger {
        width: 100%;
        margin-bottom: 0;
    }

    button[type="submit"],
    #reset-btn {
        min-height: 54px;
        padding: 15px 20px;
    }
}
