/* SERI Scholarship — /apply. Builds on join.css (sj-* components). */

.sa-wrap {
    max-width: 1080px; margin: 0 auto; padding: 4px 16px 40px;
    display: grid; gap: 22px;
}

/* Header: SERI × partner */
.sa-brands { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sa-x { color: var(--sj-muted); font-size: 18px; line-height: 1; }
.sa-partner { font-family: var(--sj-display); font-weight: 700; font-size: 13px; line-height: 1.15; color: var(--sj-ink); max-width: 150px; }
.sa-partner-logo { display: block; height: 30px; width: auto; }
@media (max-width: 420px) {
    .sj-top { padding: 14px 16px; gap: 10px; }
    .sj-logo img { height: 26px; }
    .sa-partner { font-size: 11.5px; max-width: 110px; }
    .sj-call span { display: none; }
    .sj-call { padding: 9px; }
}

/* Hero: ink panel, orange used as light */
.sa-hero {
    position: relative; overflow: hidden;
    display: grid; gap: 22px;
    padding: 26px 20px 20px; border-radius: 26px;
    background:
        radial-gradient(520px 300px at 100% 0%, rgba(232, 81, 2, .35), transparent 65%),
        radial-gradient(400px 260px at 0% 100%, rgba(232, 81, 2, .14), transparent 70%),
        #0d0b0a;
    color: #f5efe8;
}
.sa-hero .sj-badge { background: rgba(232, 81, 2, .16); color: #ff8a4c; }
.sa-hero h1 {
    font-family: var(--sj-display); font-weight: 800;
    font-size: clamp(32px, 8vw, 56px); line-height: 1.08; letter-spacing: -.01em;
    margin: 16px 0 10px; color: #fff;
}
.sa-hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #ff7a33, #e85102);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sa-sub { margin: 0 0 18px; font-size: 17px; color: #efe6dc; font-weight: 500; }
.sa-sub span { display: block; font-size: 13.5px; color: #a8a097; font-weight: 400; margin-top: 2px; }

.sa-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sa-stats li {
    padding: 12px 10px; border-radius: 14px;
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09);
}
.sa-stats b { display: block; font-family: var(--sj-display); font-size: 24px; line-height: 1; color: #ff8a4c; }
.sa-stats span { display: block; font-size: 13px; color: #f5efe8; margin-top: 6px; font-weight: 600; }
.sa-stats small { display: block; font-size: 11px; color: #a8a097; font-weight: 400; }
.sa-deadline { display: inline-flex; align-items: center; gap: 8px; margin: 16px 0 0; font-size: 14px; color: #ffcfb3; }
.sa-deadline svg { width: 16px; height: 16px; color: #ff8a4c; }

/* Video (or placeholder). 9:16 is narrow and centred; 16:9 fills the column. */
.sa-hero-media { display: flex; justify-content: center; }
.sa-video {
    position: relative; width: 100%; border-radius: 18px; overflow: hidden;
    background: #000; border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 24px 60px -24px rgba(232, 81, 2, .55);
}
.sa-video--16-9 { aspect-ratio: 16 / 9; }
.sa-video--9-16 { aspect-ratio: 9 / 16; max-width: 300px; }
.sa-video iframe, .sa-video video, .sa-video-lite, .sa-video-lite img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sa-video video { object-fit: cover; background: #000; }
.sa-video-lite { padding: 0; cursor: pointer; background: #000; }
.sa-video-start {
    position: absolute; inset: 0; padding: 0; border: 0; cursor: pointer;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35));
}
.sa-video-start .sa-play { transition: transform .2s; }
.sa-video-start:hover .sa-play { transform: scale(1.08); }
.sa-video-start[hidden] { display: none; }
.sa-video-lite img { object-fit: cover; opacity: .9; transition: opacity .2s; }
.sa-video-lite:hover img { opacity: 1; }
.sa-play {
    position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
    border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, #ff6b35, #e85102); color: #fff;
    box-shadow: 0 10px 30px rgba(232, 81, 2, .6);
}
.sa-play svg { width: 26px; height: 26px; fill: currentColor; stroke: none; margin-left: 3px; }
.sa-video-ph {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
    padding: 20px; text-align: center; color: #f5efe8;
    background:
        radial-gradient(circle at 50% 45%, rgba(232, 81, 2, .28), transparent 55%),
        repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 12px, transparent 12px 24px),
        #141110;
}
.sa-video-ph .sa-play { opacity: .85; }
.sa-video-ph b { font-size: 15px; }
.sa-video-ph small { font-size: 12px; color: #a8a097; }

.sa-hero-text h1 { margin-bottom: 8px; }
.sa-hero-text .sa-sub { margin-bottom: 0; }
.sa-hero-meta { display: grid; gap: 14px; }
.sa-hero-meta .sa-deadline { margin: 0; }
.sa-jump { width: 100%; text-decoration: none; }
.sa-jump svg { width: 18px; height: 18px; }

@media (min-width: 900px) {
    .sa-wrap { padding-top: 16px; gap: 28px; }
    .sa-hero { padding: 44px 48px 48px; column-gap: 48px; row-gap: 30px; }
    .sa-jump { width: auto; justify-self: start; padding: 0 26px; }

    /* Landscape video: headline + stats on top, video full width below */
    .sa-hero--wide {
        grid-template-columns: minmax(0, 1fr) 400px;
        grid-template-areas: "text meta" "media media";
        align-items: end;
    }
    .sa-hero--wide .sa-video { max-width: none; }

    /* Vertical video: text and stats on the left, video on the right */
    .sa-hero--tall {
        grid-template-columns: 1.15fr .85fr;
        grid-template-areas: "text media" "meta media";
        align-content: center;
    }
    .sa-hero--tall .sa-hero-text { align-self: end; }
    .sa-hero--tall .sa-hero-meta { align-self: start; }
    .sa-video--9-16 { max-width: 320px; }

    .sa-hero-text { grid-area: text; }
    .sa-hero-media { grid-area: media; }
    .sa-hero-meta { grid-area: meta; }
}

/* Intro */
.sa-intro { max-width: 760px; margin: 0 auto; font-size: 16px; color: #374151; }
.sa-intro p { margin: 0 0 10px; }
.sa-intro strong { color: var(--sj-ink); }

/* Form card */
.sa-card, .sa-closed { width: 100%; max-width: 760px; margin: 0 auto; }
.sa-closed { text-align: center; }
.sa-closed h2 { font-family: var(--sj-display); margin: 0 0 8px; }
.sa-closed p { color: #374151; margin: 0 0 18px; }
.sa-lead { margin: 0 0 6px; font-weight: 600; color: var(--sj-ink); }
.sa-lead span { display: block; font-weight: 400; font-size: 13.5px; color: var(--sj-muted); }

.sa-part { padding-top: 26px; margin-top: 22px; border-top: 1px solid var(--sj-line); }
.sa-part:first-of-type { border-top: 0; margin-top: 8px; padding-top: 8px; }
.sa-part-title {
    margin: 0 0 18px; font-family: var(--sj-display); font-size: 20px; line-height: 1.25; color: var(--sj-ink);
}
.sa-part-title span {
    display: inline-block; margin-bottom: 6px; padding: 3px 10px; border-radius: 999px;
    background: var(--sj-soft); color: var(--sj-orange); font-family: var(--sj-font); font-size: 12px; font-weight: 700;
}
.sa-part-title small { display: block; font-family: var(--sj-font); font-weight: 500; font-size: 13px; color: var(--sj-muted); margin-top: 2px; }

.sa-field { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.sa-field .sj-q { position: relative; padding-left: 34px; }
.sa-num {
    position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 8px;
    display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700;
    background: var(--sj-ink); color: #fff;
}
.sa-opt { font-style: normal; font-weight: 500; font-size: 11.5px; color: var(--sj-orange); white-space: nowrap; }
.sa-hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--sj-muted); line-height: 1.35; }
.sa-sublabel { display: block; font-size: 12.5px; font-weight: 600; color: #4b5563; margin-bottom: 6px; }
.sa-loc { display: grid; gap: 12px; }
.sa-loc .sj-field { margin: 0; }
@media (min-width: 560px) { .sa-loc { grid-template-columns: 1fr 1fr; } .sa-loc [data-field="area"] { grid-column: 1 / -1; } }

.sj-chips--grid { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 360px) { .sj-chips--grid { grid-template-columns: 1fr; } }

/* Textareas */
.sa-field textarea {
    width: 100%; min-height: 116px; padding: 12px 14px; resize: vertical;
    font: inherit; font-size: 16px; line-height: 1.5; color: var(--sj-ink);
    background: #fafafa; border: 1.5px solid var(--sj-line); border-radius: 12px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.sa-field textarea::placeholder { color: #a8a29e; }
.sa-field textarea:focus { outline: none; border-color: var(--sj-orange); background: #fff; box-shadow: 0 0 0 4px rgba(232,81,2,.12); }
.sa-count { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-top: 6px; }
.sa-count > span { font-size: 12px; color: var(--sj-muted); white-space: nowrap; margin-left: auto; }
.sa-count.is-near > span { color: #b45309; }
.sa-count.is-ok > span b { color: #15803d; }

/* Checkbox confirmations */
.sa-checks .sa-check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px; border: 1.5px solid var(--sj-line); border-radius: 14px; transition: border-color .2s, background .2s; }
.sa-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--sj-orange); cursor: pointer; }
.sa-check span { font-size: 14.5px; font-weight: 600; color: var(--sj-ink); line-height: 1.4; }
.sa-check small { display: block; font-weight: 400; font-size: 12.5px; color: var(--sj-muted); margin-top: 3px; }
.sa-check:has(input:checked) { border-color: var(--sj-orange); background: var(--sj-soft); }

/* Per-field messages */
.sa-msg { margin: 6px 0 0; font-size: 13px; color: var(--sj-error); min-height: 0; }
.sa-msg:empty { display: none; }
.sa-field.is-invalid input, .sa-field.is-invalid select, .sa-field.is-invalid textarea,
.sa-field.is-invalid .sj-chip span, .sa-field.is-invalid .sa-check,
.sa-loc .is-invalid input, .sa-loc .is-invalid select { border-color: #f4a7a0; }
.sa-field.is-invalid .sa-num { background: var(--sj-error); }

/* Notes */
.sa-notes {
    margin: 26px 0 20px; padding: 18px 18px 14px; border-radius: 16px;
    background: #fbf7f3; border: 1px solid #efe4da;
}
.sa-notes h3 { margin: 0 0 10px; font-size: 15px; color: var(--sj-ink); }
.sa-notes h3 span { font-weight: 500; font-size: 12.5px; color: var(--sj-muted); margin-left: 6px; }
.sa-notes ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sa-notes li { position: relative; padding-left: 18px; font-size: 14px; color: #374151; }
.sa-notes li::before { content: ''; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--sj-orange); }

.sa-submit { width: 100%; }
.sa-ref { margin: 0 0 14px; padding: 14px; border-radius: 14px; background: var(--sj-soft); }
.sa-ref b { display: block; font-family: var(--sj-display); font-size: 26px; color: var(--sj-orange); letter-spacing: .04em; margin: 4px 0; }

.sa-wrap > .sj-foot { width: 100%; max-width: 1080px; }
