/* Faculty Representative Application
   ---------------------------------------------------------------------------
   Adapted from the standalone developer package. The original was a full-page
   layout: a sticky 100vh brand column beside the form. That cannot survive
   inside base.html, which already supplies a header and footer — a sticky
   full-height panel would fight the site header and the footer would land
   inside the scroll. So the brand column becomes a normal hero band and the
   form keeps the card structure, which was the good part.

   Palette is taken from the site (--primary-color / --secondary-color in
   main.css) rather than the package's own navy/red, so this page does not read
   as a third-party embed. */

.rep-page {
    --rep-navy: #0e415b;
    --rep-deep: #07344b;
    --rep-red: #e13732;
    --rep-teal: #13a8a1;
    --rep-ink: #173544;
    --rep-muted: #637883;
    --rep-line: #d9e2e3;
    --rep-cream: #f5f2ec;
    background: var(--rep-cream);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.rep-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem);
    background: var(--rep-deep);
    color: #fff;
}

/* Decorative only: aria-hidden in the markup, and pointer-events:none so the
   orbs can never swallow a click on the CTA. */
.rep-hero__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: .85;
}

.rep-hero__orb--red {
    width: 230px;
    height: 230px;
    right: -110px;
    top: 12%;
    background: var(--rep-red);
}

.rep-hero__orb--teal {
    width: 180px;
    height: 180px;
    left: -95px;
    bottom: -40px;
    background: var(--rep-teal);
}

.rep-hero__inner {
    position: relative;
    z-index: 1;
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2.5rem);
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.rep-hero__logo {
    width: min(100%, 230px);
    margin-bottom: clamp(1.5rem, 4vw, 2.25rem);
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff;
}

.rep-hero__logo img {
    display: block;
    width: 100%;
    height: auto;
}

.rep-hero__eyebrow {
    margin: 0 0 .9rem;
    color: #78ded9;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.rep-hero__title {
    margin: 0;
    font-size: clamp(2.1rem, 4.4vw, 3.4rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.03em;
}

.rep-hero__lead {
    max-width: 34rem;
    margin: 1.15rem 0 0;
    color: #d1e3ea;
    font-size: 1rem;
    line-height: 1.6;
}

.rep-perks {
    display: grid;
    gap: .7rem;
}

.rep-perk {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: .8rem;
    align-items: start;
    padding: .85rem 1rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
}

.rep-perk__num {
    color: #6fe0d9;
    font-weight: 800;
}

.rep-perk__title {
    display: block;
    font-size: .92rem;
    font-weight: 700;
}

.rep-perk__sub {
    display: block;
    margin-top: .2rem;
    color: #bed5de;
    font-size: .78rem;
    line-height: 1.45;
}

/* ── Form shell ───────────────────────────────────────────────────────────── */

.rep-form-section {
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}

.rep-form-wrap {
    width: min(100%, 900px);
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

.rep-heading {
    margin-bottom: 1.9rem;
}

.rep-heading__chip {
    display: inline-block;
    padding: .5rem .75rem;
    border-radius: 99px;
    background: #dff5f3;
    color: #087972;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.rep-heading h2 {
    margin: .9rem 0 .55rem;
    color: var(--rep-deep);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    line-height: 1.08;
    letter-spacing: -.025em;
}

.rep-heading p {
    max-width: 42rem;
    margin: 0;
    color: var(--rep-muted);
    line-height: 1.6;
}

.rep-form {
    display: grid;
    gap: 1.1rem;
}

.rep-card {
    padding: clamp(1.35rem, 3vw, 1.95rem);
    border: 1px solid var(--rep-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(12, 72, 101, .06);
}

.rep-card__head {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    margin-bottom: 1.35rem;
}

.rep-card__num {
    display: grid;
    flex: 0 0 35px;
    height: 35px;
    place-items: center;
    border-radius: 50%;
    background: var(--rep-red);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
}

.rep-card__head h3 {
    margin: 0;
    color: var(--rep-deep);
    font-size: 1.2rem;
}

.rep-card__head p {
    margin: .25rem 0 0;
    color: var(--rep-muted);
    font-size: .82rem;
}

/* ── Role picker ──────────────────────────────────────────────────────────── */

.rep-roles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.rep-role {
    position: relative;
    min-height: 112px;
    padding: 1.05rem;
    border: 1px solid var(--rep-line);
    border-radius: 9px;
    background: #fbfcfc;
    cursor: pointer;
}

/* :has() carries the checked state. Browsers without it still show the radio
   itself, so the control stays usable — only the highlight is lost. */
.rep-role:has(input:checked) {
    border-color: var(--rep-navy);
    background: #eef6f8;
    box-shadow: inset 0 0 0 1px var(--rep-navy);
}

/* Keyboard focus must be visible on the card, not just the 16px radio. */
.rep-role:has(input:focus-visible) {
    outline: 2px solid var(--rep-teal);
    outline-offset: 2px;
}

.rep-role input {
    position: absolute;
    right: 15px;
    top: 15px;
    accent-color: var(--rep-navy);
}

[dir="rtl"] .rep-role input {
    right: auto;
    left: 15px;
}

.rep-role strong,
.rep-role small {
    display: block;
    padding-right: 22px;
}

[dir="rtl"] .rep-role strong,
[dir="rtl"] .rep-role small {
    padding-right: 0;
    padding-left: 22px;
}

.rep-role strong {
    color: var(--rep-deep);
    font-size: .88rem;
}

.rep-role small {
    margin-top: .55rem;
    color: var(--rep-muted);
    font-size: .76rem;
    line-height: 1.45;
}

/* ── Fields ───────────────────────────────────────────────────────────────── */

.rep-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.05rem;
}

.rep-field {
    display: grid;
    gap: .45rem;
    margin-top: 1.05rem;
}

.rep-grid .rep-field {
    margin-top: 0;
}

.rep-field label {
    font-size: .82rem;
    font-weight: 700;
}

.rep-field label em {
    color: var(--rep-red);
    font-style: normal;
}

.rep-field input,
.rep-field select,
.rep-field textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cad7da;
    border-radius: 8px;
    background: #fff;
    color: var(--rep-ink);
    font: inherit;
    outline: 0;
}

.rep-field textarea {
    min-height: 96px;
    resize: vertical;
}

.rep-field input:focus,
.rep-field select:focus,
.rep-field textarea:focus {
    border-color: var(--rep-teal);
    box-shadow: 0 0 0 3px rgba(19, 168, 161, .13);
}

.rep-field input[aria-invalid="true"],
.rep-field select[aria-invalid="true"],
.rep-field textarea[aria-invalid="true"] {
    border-color: var(--rep-red);
}

.rep-field small {
    color: #7d8e96;
    font-size: .7rem;
}

.rep-field-error {
    display: none;
    color: #a92320;
    font-size: .72rem;
    font-weight: 600;
}

.rep-field-error.is-shown {
    display: block;
}

/* Off-screen rather than display:none — a hidden input is not submitted by
   some browsers, and the honeypot only works if bots can see and fill it. */
.rep-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ── Consent ──────────────────────────────────────────────────────────────── */

.rep-consent {
    display: grid;
    gap: .8rem;
    padding: 1.35rem clamp(1.35rem, 3vw, 1.95rem);
    border: 1px solid #b9d5d4;
    border-radius: 12px;
    background: #edf8f7;
}

.rep-consent label {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: .65rem;
    align-items: start;
    color: #294b59;
    font-size: .78rem;
    line-height: 1.55;
    cursor: pointer;
}

.rep-consent input {
    margin-top: 2px;
    accent-color: var(--rep-teal);
}

.rep-consent a {
    color: #08736e;
    font-weight: 700;
}

.rep-turnstile {
    margin-top: .35rem;
}

/* ── Messages and submit ──────────────────────────────────────────────────── */

.rep-message {
    display: none;
    padding: .9rem 1rem;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 700;
}

.rep-message.is-error {
    display: block;
    border-left: 4px solid var(--rep-red);
    background: #fff0ef;
    color: #a92320;
}

[dir="rtl"] .rep-message.is-error {
    border-left: 0;
    border-right: 4px solid var(--rep-red);
}

.rep-submit {
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: var(--rep-red);
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(225, 55, 50, .2);
    transition: background .2s ease;
}

.rep-submit:hover {
    background: #c62a26;
}

.rep-submit:disabled {
    opacity: .65;
    cursor: wait;
}

/* ── Success ──────────────────────────────────────────────────────────────── */

.rep-success {
    display: none;
    padding: clamp(2.25rem, 6vw, 4rem);
    border: 1px solid var(--rep-line);
    border-top: 5px solid var(--rep-teal);
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.rep-success.is-visible {
    display: block;
}

.rep-success__tick {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 0 auto 1.25rem;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rep-navy), #1a6b8a);
    color: #fff;
    font-size: 2rem;
}

.rep-success h2 {
    margin: .5rem 0;
    color: var(--rep-deep);
    font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

.rep-success p {
    color: var(--rep-muted);
    line-height: 1.65;
}

.rep-code {
    max-width: 390px;
    margin: 1.6rem auto 0;
    padding: 1.25rem;
    border: 1px dashed #8bb2bf;
    border-radius: 9px;
    background: #f3f8f9;
}

.rep-code span {
    display: block;
    color: var(--rep-muted);
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.rep-code strong {
    display: block;
    margin-top: .5rem;
    color: var(--rep-navy);
    font-size: 1.45rem;
    letter-spacing: .08em;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
    .rep-hero__inner {
        grid-template-columns: 1fr;
    }

    .rep-perks {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 680px) {
    .rep-perks {
        grid-template-columns: 1fr;
    }

    .rep-grid,
    .rep-roles {
        grid-template-columns: 1fr;
    }

    .rep-role {
        min-height: 0;
    }
}
