/* ==========================================================================
   Beauty & The Biz Scholarship portal
   Change --brand to match OPM branding; every tint and shade derives from it.
   ========================================================================== */

:root {
    --brand: #7a2e5d;
    --brand-dark: color-mix(in srgb, var(--brand) 78%, #000);
    --brand-tint: color-mix(in srgb, var(--brand) 8%, #fff);
    --brand-tint-2: color-mix(in srgb, var(--brand) 16%, #fff);
    --accent: #c8a27a;

    --ink: #2a1f26;
    --muted: #6b6069;
    --line: #e6dde3;
    --bg: #faf7f8;
    --surface: #fff;
    --error: #b42318;
    --error-bg: #fef3f2;
    --success: #1f7a4d;
    --success-bg: #ecfdf3;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(42, 31, 38, .05), 0 6px 24px rgba(42, 31, 38, .06);
    --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 35%, transparent);

    --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; }
main:focus { outline: none; }
code { font-size: .9em; background: var(--brand-tint); padding: .1em .35em; border-radius: 4px; }

:focus-visible { outline: none; box-shadow: var(--focus); }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 100;
    background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }
[hidden] { display: none !important; }

/* ---------- Header / hero / footer ---------- */

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: 880px; margin: 0 auto; padding: .85rem 1rem; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.brand__logo { max-height: 44px; width: auto; }
.brand__mark {
    font-family: var(--font-display); font-weight: 700; letter-spacing: .08em;
    background: var(--brand); color: #fff; padding: .2rem .55rem; border-radius: 6px; font-size: .95rem;
}
.brand__name { font-weight: 500; letter-spacing: .02em; }

.hero {
    background:
        radial-gradient(circle at 85% 15%, color-mix(in srgb, var(--accent) 45%, transparent) 0, transparent 45%),
        linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    text-align: center;
}
.hero__inner { max-width: 880px; margin: 0 auto; padding: 2.5rem 1rem 2.75rem; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 700; color: color-mix(in srgb, var(--accent) 55%, #fff); margin-bottom: .75rem; }
.hero h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); margin-bottom: .6rem; }
.hero__sub { font-size: clamp(1rem, 3.6vw, 1.15rem); margin: 0; opacity: .95; }
.hero__sub .sep { margin: 0 .4rem; opacity: .6; }
@media (max-width: 559px) {
    .hero__sub-part { display: block; }
    .hero__sub .sep { display: none; }
}

.site-footer { background: var(--ink); color: #e9e1e6; margin-top: 3rem; }
.site-footer__inner { max-width: 880px; margin: 0 auto; padding: 2rem 1rem; text-align: center; font-size: .92rem; }
.site-footer__brand { margin-bottom: .5rem; }
.site-footer__brand em { color: var(--accent); font-style: normal; }
.site-footer__contact { font-style: normal; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem .6rem; }
.site-footer a { color: #fff; }
.site-footer .dot { opacity: .5; }

/* ---------- Progress indicator ---------- */

.progress {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.progress__list {
    list-style: none; margin: 0 auto; padding: .6rem .5rem; max-width: 880px;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: .25rem;
    counter-reset: step;
}
.progress__item { position: relative; }
.progress__item + .progress__item::before {
    content: ""; position: absolute; top: 18px; right: calc(50% + 20px); left: calc(-50% + 20px);
    height: 2px; background: var(--line);
}
.progress__item.is-complete + .progress__item::before { background: var(--brand); }
.progress__link {
    display: flex; flex-direction: column; align-items: center; gap: .25rem;
    text-decoration: none; color: var(--muted); font-size: .75rem; font-weight: 500;
    padding: .1rem; border-radius: var(--radius-sm); min-height: 44px;
}
.progress__num {
    position: relative; z-index: 1;
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    background: var(--surface); border: 2px solid var(--line); font-weight: 700; color: var(--muted);
    transition: background .2s, border-color .2s, color .2s;
}
.progress__item.is-current .progress__link { color: var(--brand); }
.progress__item.is-current .progress__num { border-color: var(--brand); color: var(--brand); }
.progress__item.is-complete .progress__num { background: var(--brand); border-color: var(--brand); color: #fff; font-size: 0; }
.progress__item.is-complete .progress__num::before { content: "✓"; font-size: .95rem; }
.progress__item.has-error .progress__num { border-color: var(--error); color: var(--error); }

@media (max-width: 380px) { .progress__label { font-size: .68rem; } }

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

.container { max-width: 880px; margin: 0 auto; padding: 1.5rem 1rem 0; }
.container--narrow { max-width: 620px; padding-top: 3rem; }
.intro { color: var(--muted); text-align: center; margin-bottom: 1.5rem; }

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .card { padding: 2rem; } }

.card__header { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.card__header h2 { margin: 0; font-size: clamp(1.25rem, 4.5vw, 1.55rem); }
.card__num {
    flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
    background: var(--brand-tint-2); color: var(--brand); font-family: var(--font-body); font-weight: 700; font-size: 1rem;
}
.card__lede { color: var(--muted); margin-top: -.25rem; }

.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 1rem; }
.grid > * { grid-column: 1 / -1; min-width: 0; }
@media (min-width: 640px) {
    .col-half { grid-column: span 3; }
    .col-city { grid-column: span 3; }
    .col-state { grid-column: span 2; }
    .col-zip { grid-column: span 1; }
    .col-sig { grid-column: span 4; }
    .col-date { grid-column: span 2; }
}
@media (min-width: 480px) and (max-width: 639px) {
    .col-state, .col-zip { grid-column: span 3; }
}

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

.field { margin-bottom: 1.15rem; border: 0; padding: 0; min-width: 0; }
.field > label, .field legend {
    display: block; font-weight: 600; margin-bottom: .4rem; padding: 0; font-size: .97rem;
}
.field-hint { color: var(--muted); font-size: .88rem; margin: -.15rem 0 .5rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"],
input[type="number"], input[type="password"], input[type="search"], select, textarea {
    width: 100%; min-height: 48px; padding: .7rem .85rem;
    font: inherit; font-size: 1rem; color: var(--ink);
    background: var(--surface); border: 1.5px solid #d5c9d0; border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
input[type="date"] { -webkit-appearance: auto; appearance: auto; }
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236b6069' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.25rem;
}
textarea { min-height: 150px; resize: vertical; line-height: 1.55; }
input:hover, select:hover, textarea:hover { border-color: #b9a9b3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--focus); }
input.is-readonly, input[readonly] { background: var(--bg); color: var(--muted); cursor: default; }
::placeholder { color: #a99ca4; }

.signature-input { font-family: var(--font-display); font-size: 1.15rem !important; font-style: italic; }

.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.has-error input:focus, .has-error select:focus, .has-error textarea:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .2); }
.field-error {
    color: var(--error); font-size: .9rem; font-weight: 500; margin: .4rem 0 0;
    display: flex; gap: .35rem; align-items: flex-start;
}
.field-error::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--error); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; margin-top: .15rem; }

/* Radio tiles */
.choices { display: grid; gap: .55rem; grid-template-columns: 1fr; }
@media (min-width: 480px) {
    .choices--two .choices, .choices--three .choices, .choices--four .choices { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
    .choices--four .choices { grid-template-columns: repeat(4, 1fr); }
    .choices--three .choices { grid-template-columns: repeat(3, 1fr); }
}
.choice {
    display: flex; align-items: center; gap: .65rem; min-height: 50px;
    padding: .65rem .85rem; border: 1.5px solid #d5c9d0; border-radius: var(--radius-sm);
    background: var(--surface); cursor: pointer; font-weight: 500; line-height: 1.3;
    transition: border-color .15s, background .15s;
}
.choice:hover { border-color: var(--brand); }
.choice input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-dark); }
.choice:has(input:focus-visible) { box-shadow: var(--focus); }
.has-error .choice { border-color: color-mix(in srgb, var(--error) 55%, #fff); }

.other-field { margin-top: .85rem; padding-left: 1rem; border-left: 3px solid var(--brand-tint-2); }

/* Essays */
.essay > label { font-weight: 600; }
.essay__num { color: var(--brand); }
.essay__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.essay__meta .field-error { margin-right: auto; }
.char-count { margin: .4rem 0 0 auto; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.char-count.is-near { color: #b54708; }
.char-count.is-full { color: var(--error); font-weight: 700; }

/* Video callout */
.callout {
    background: var(--brand-tint); border-left: 4px solid var(--brand); border-radius: var(--radius-sm);
    padding: 1rem 1.15rem; margin-bottom: 1.25rem;
}
.callout__title { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-dark); margin-bottom: .35rem; }
.callout p:last-child { margin-bottom: 0; }

/* Certification */
.certification-text {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 1rem 1.15rem; font-size: .97rem;
}
.field > .checkbox {
    display: inline-flex; margin-bottom: 0; align-items: center; gap: .7rem; min-height: 48px; cursor: pointer;
    font-weight: 600; padding: .4rem .9rem .4rem .7rem; border: 1.5px solid #d5c9d0; border-radius: var(--radius-sm);
}
.checkbox:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.checkbox input { width: 22px; height: 22px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.checkbox:has(input:focus-visible) { box-shadow: var(--focus); }

/* Honeypot: off-screen for people, still present for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Error summary */
.error-summary {
    background: var(--error-bg); border: 1.5px solid var(--error); border-radius: var(--radius);
    padding: 1rem 1.25rem; margin-bottom: 1.25rem; color: var(--ink);
}
.error-summary:focus { outline: none; box-shadow: 0 0 0 3px rgba(180, 35, 24, .25); }
.error-summary__title { font-weight: 700; color: var(--error); margin-bottom: .4rem; }
.error-summary__title:last-child { margin-bottom: 0; }
.error-summary__list { margin: 0; padding-left: 1.2rem; }
.error-summary__list a { color: var(--error); }

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

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    min-height: 48px; padding: .7rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
    font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); color: #fff; }
.btn--secondary { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn--secondary:hover { background: var(--brand-tint); }
.btn--ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn--ghost:hover { background: var(--brand-tint); border-color: var(--brand-tint-2); }
.btn--small { min-height: 38px; padding: .4rem .9rem; font-size: .9rem; }
.btn--large { min-height: 56px; padding: .9rem 2.4rem; font-size: 1.1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .75; cursor: progress; }

.submit-row { text-align: center; margin: 1.75rem 0 0; }
.btn--submit { width: 100%; max-width: 380px; min-height: 58px; font-size: 1.1rem; box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); }
.submit-note { color: var(--muted); font-size: .88rem; margin-top: .75rem; }

.spinner {
    display: none; width: 20px; height: 20px; border-radius: 50%;
    border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff;
    animation: spin .7s linear infinite;
}
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

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

.thanks { text-align: center; padding: 2.5rem 1.25rem; }
@media (min-width: 640px) { .thanks { padding: 3rem 2.5rem; } }
.thanks__icon {
    width: 72px; height: 72px; margin: 0 auto 1.25rem; border-radius: 50%;
    display: grid; place-items: center; background: var(--brand-tint-2); color: var(--brand);
}
.thanks h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
.thanks__message { font-size: 1.15rem; }
.thanks__sub { color: var(--muted); margin-bottom: 1.75rem; }
