/* Public applicant pages (form + thank-you). Requires brand.css. Mobile-first. */

[hidden] { display: none !important; }

/* ---------- Layout ---------- */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-footer { margin-top: auto; }

.hero {
    background: linear-gradient(to bottom left, #1f73bb 0%, #12428a 40%, #0b2a66 75%, #0a2057 100%);
    padding: 12px 16px 64px;
    text-align: center;
}

.hero-logo {
    display: block;
    width: min(400px, 86%);
    height: auto;
    margin: 0 auto;
    /* Fade the banner's own gradient into the hero; the logo spans roughly 22-78% across and 10-94% down. */
    -webkit-mask-image:
        linear-gradient(to right, transparent 0, #000 20%, #000 80%, transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 7%, #000 95%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, transparent 0, #000 20%, #000 80%, transparent 100%),
        linear-gradient(to bottom, transparent 0, #000 7%, #000 95%, transparent 100%);
    mask-composite: intersect;
}

.page {
    width: 100%;
    max-width: 820px;
    margin: -44px auto 0;
    padding: 0 12px 48px;
    position: relative;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.intro {
    padding: 24px 20px;
    border-top: 4px solid var(--apello-blue);
}

.intro h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.2;
    color: var(--apello-navy);
}

.intro p { margin: 0 0 10px; }

.eyebrow {
    margin: 0 0 6px !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--apello-blue);
}

.req-note {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 0 !important;
}

.req { color: var(--danger); font-weight: 700; }

/* ---------- Sections ---------- */

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 20px;
    background: var(--apello-navy);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .01em;
}

.section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    font-size: 14px;
    font-weight: 900;
}

.section-body {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 20px;
}

/* ---------- Fields ---------- */

.field { margin: 0; padding: 0; border: 0; min-width: 0; }

.field-label {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    font-weight: 700;
    color: var(--apello-navy);
    line-height: 1.4;
}

.field-help {
    margin: -2px 0 10px;
    font-size: 14px;
    color: var(--text-muted);
}

.input {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

.input[type="date"] { min-height: 48px; }

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

.input::placeholder { color: #9aa3ae; }

.input:hover { border-color: #b9c0c9; }

.input:focus {
    outline: none;
    border-color: var(--apello-blue);
    box-shadow: 0 0 0 3px rgba(30, 99, 196, .18);
}

.field.has-error .input { border-color: var(--danger); }

.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(214, 69, 69, .18); }

.field-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--danger);
}

.field-error::before {
    content: "!";
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}
/* ---------- Radio tiles ---------- */

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.option { position: relative; display: block; cursor: pointer; }

.option input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.option-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 12px 16px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-weight: 700;
    color: var(--text);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
    user-select: none;
}

.option-dot {
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid #aab2bd;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.option:hover .option-tile { border-color: var(--apello-blue); }

.option input:checked + .option-tile {
    border-color: var(--apello-blue);
    background: var(--apello-blue-light);
    color: var(--apello-navy);
    box-shadow: 0 0 0 1px var(--apello-blue);
}

.option input:checked + .option-tile .option-dot {
    border-color: var(--apello-blue);
    box-shadow: inset 0 0 0 5px var(--apello-blue);
}

.option input:focus-visible + .option-tile {
    outline: 3px solid rgba(30, 99, 196, .35);
    outline-offset: 2px;
}

.field.has-error .option-tile { border-color: #e9a3a3; }

.callout-highlight {
    padding: 18px;
    border: 2px solid var(--danger);
    border-radius: var(--radius);
    background: var(--danger-bg);
}

.callout-highlight .field-label {
    color: #8f1d1d;
    font-size: 17px;
    font-weight: 900;
}

/* ---------- Content blocks ---------- */

.notice {
    padding: 16px 18px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.notice p { margin: 0 0 10px; }

.notice ul { margin: 0 0 10px; padding-left: 22px; }

.notice li + li { margin-top: 6px; }

.notice > :last-child { margin-bottom: 0; }

.notice-warning {
    color: var(--danger);
    font-weight: 700;
}

.notice:has(> .notice-stop:only-child) {
    padding: 0;
    background: none;
    border: 0;
}

.notice-stop {
    position: relative;
    margin: 0;
    padding: 18px 18px 18px 86px;
    min-height: 92px;
    display: flex;
    align-items: center;
    background: var(--danger-bg);
    border: 2px solid var(--danger);
    border-left-width: 6px;
    border-radius: var(--radius);
    color: #8f1d1d;
    font-size: 18px;
    line-height: 1.35;
}

.notice-stop::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 56px;
    height: 56px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpolygon points='29,2 71,2 98,29 98,71 71,98 29,98 2,71 2,29' fill='%23c62828'/%3E%3Cpolygon points='31.5,8 68.5,8 92,31.5 92,68.5 68.5,92 31.5,92 8,68.5 8,31.5' fill='none' stroke='white' stroke-width='4'/%3E%3Ctext x='50' y='61' font-family='Arial,Helvetica,sans-serif' font-size='29' font-weight='bold' fill='white' text-anchor='middle'%3ESTOP%3C/text%3E%3C/svg%3E") center / contain no-repeat;
}

.passage {
    margin: 0;
    background: var(--apello-blue-light);
    border-left: 5px solid var(--apello-blue);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 16px 18px 6px;
}

.passage-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--apello-blue-dark);
}

.passage-label svg { width: 18px; height: 18px; }

.passage-text p {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--apello-navy);
}

/* ---------- File uploads ---------- */

.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 22px 16px;
    background: var(--surface-alt);
    border: 2px dashed #b8c3d3;
    border-radius: var(--radius);
    transition: border-color .15s, background-color .15s;
}

.dropzone.is-dragover {
    border-color: var(--apello-blue);
    background: var(--apello-blue-light);
}

.field.has-error .dropzone { border-color: var(--danger); }

.dropzone-icon { width: 30px; height: 30px; color: var(--apello-blue); }

.dropzone-text { margin: 0; font-size: 15px; color: var(--text-muted); }

.dropzone-hint {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.field-file.is-compact .dropzone { padding: 16px 12px; }

.field-file.is-compact .dropzone-icon { width: 24px; height: 24px; }

.field-file.is-compact .dropzone-hint { font-size: 12px; }

.field-file { display: flex; flex-direction: column; }

.field-file .field-error { order: 3; }

.field-file.has-file:not(.is-multiple) .file-list { order: 1; margin-top: 0; }

.field-file.has-file:not(.is-multiple) .dropzone {
    order: 2;
    margin-top: 8px;
    padding: 0;
    align-items: flex-start;
    background: none;
    border: 0;
}

.field-file.has-file:not(.is-multiple) .btn-choose {
    min-height: 34px;
    padding: 5px 12px;
    font-size: 14px;
}

.field-file.has-file:not(.is-multiple) .dropzone-icon,
.field-file.has-file:not(.is-multiple) .dropzone-text,
.field-file.has-file:not(.is-multiple) .dropzone-hint { display: none; }

.field-file.is-full .dropzone { display: none; }

@media (hover: none) {
    .dropzone-text { display: none; }
}

.file-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.file-list:not(:empty) { margin-top: 10px; }

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.file-item + .file-item { margin-top: 8px; }

.file-item.is-error { border-color: var(--danger); background: var(--danger-bg); }

.file-item.is-done { border-color: #b7e0c7; }

.file-status-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--apello-blue-light);
    color: var(--apello-blue);
}

.file-status-icon svg { width: 16px; height: 16px; }

.file-item.is-done .file-status-icon { background: var(--success-bg); color: var(--success); }

.file-item.is-error .file-status-icon { background: #fbdcdc; color: var(--danger); }

.file-main { flex: 1; min-width: 0; }

.file-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    font-size: 15px;
}

.file-size { flex: none; font-size: 13px; color: var(--text-muted); }

.progress {
    height: 6px;
    margin-top: 7px;
    background: #e3e8ef;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: var(--apello-blue);
    border-radius: 3px;
    transition: width .2s;
}

.file-item.is-done .progress,
.file-item.is-error .progress { display: none; }

.file-message { margin-top: 3px; font-size: 13px; color: var(--text-muted); }

.file-item.is-done .file-message { color: var(--success); font-weight: 700; }

.file-item.is-error .file-message { color: var(--danger); font-weight: 700; }

.file-actions { flex: none; display: flex; gap: 6px; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 20px;
    font: inherit;
    font-weight: 700;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}

.btn:focus-visible {
    outline: 3px solid rgba(30, 99, 196, .4);
    outline-offset: 2px;
}

.btn:disabled { cursor: not-allowed; }

.btn-primary {
    background: var(--apello-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30, 99, 196, .3);
}

.btn-primary:hover:not(:disabled) { background: var(--apello-blue-dark); }

.btn-primary:disabled { background: #8aa6cf; box-shadow: none; }

.btn-secondary {
    background: #fff;
    color: var(--apello-blue);
    border-color: var(--apello-blue);
}

.btn-secondary:hover { background: var(--apello-blue-light); }

.btn-lg { min-height: 56px; padding: 14px 32px; font-size: 18px; width: 100%; }

.btn-small {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 13px;
    background: #fff;
    color: var(--text);
    border-color: var(--border);
}

.btn-small:hover { border-color: var(--text-muted); }

.btn-small.btn-retry { color: var(--apello-blue); border-color: var(--apello-blue); }

.link-button {
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--apello-blue);
    background: none;
    border: 0;
    text-decoration: underline;
    cursor: pointer;
}

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.btn.is-loading .spinner { display: inline-block; }

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

.submit-area { margin-top: 8px; text-align: center; }

.submit-status {
    min-height: 1.5em;
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------- Banners ---------- */

.banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 15px;
}
.banner-error { background: var(--danger-bg); border-color: #f0b4b4; color: #8f1d1d; }

.banner-info { background: var(--apello-blue-light); border-color: #bcd2f0; color: var(--apello-navy); }

.banner .btn { min-height: 36px; padding: 6px 14px; }

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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

/* ---------- Thank-you ---------- */

.thanks {
    padding: 36px 22px;
    text-align: center;
    border-top: 4px solid var(--success);
}

.thanks h1 {
    margin: 12px 0 6px;
    font-size: 30px;
    font-weight: 900;
    color: var(--apello-navy);
}

.thanks p { max-width: 560px; margin: 0 auto 14px; }

.thanks-lead { font-size: 18px; color: var(--text-muted); }

.thanks-check {
    width: 88px;
    height: 88px;
    margin: 0 auto;
    color: var(--success);
    animation: pop .45s ease-out both;
}

.thanks-check svg { width: 100%; height: 100%; }

@keyframes pop {
    from { transform: scale(.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.thanks-ref {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    margin: 10px auto 14px;
    padding: 14px 28px;
    background: var(--apello-blue-light);
    border: 1px dashed var(--apello-blue);
    border-radius: var(--radius);
}

.thanks-ref-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--apello-blue-dark);
}

.thanks-ref-value {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: .06em;
    color: var(--apello-navy);
    font-variant-numeric: tabular-nums;
}

.thanks-note { font-size: 14px; color: var(--text-muted); }

.thanks-contact { font-size: 15px; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--apello-navy);
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
}

.footer-inner {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.footer-inner strong { color: #fff; font-size: 15px; }

.site-footer a { color: #fff; text-decoration: none; }

.site-footer a:hover { text-decoration: underline; }

/* ---------- Larger screens ---------- */

@media (min-width: 640px) {
    .hero { padding: 16px 24px 76px; }
    .page { margin-top: -52px; padding: 0 20px 64px; }
    .intro { padding: 30px 32px; }
    .intro h1 { font-size: 32px; }
    .section-title { padding: 16px 28px; font-size: 20px; }
    .section-body { padding: 28px; }
    .file-grid { grid-template-columns: 1fr 1fr; }
    .btn-lg { width: auto; min-width: 280px; }
    .thanks { padding: 48px 40px; }
    .footer-inner { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
