@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@600;800&display=swap');


/* ================================= */
/* COLOUR VARIABLES */
/* ================================= */

:root {
    --bg-dark: #082619;
    --accent-green: #10b981;
    --accent-green-dark: #047857;
    --accent-glow: rgba(16, 185, 129, 0.25);

    --gold-primary: #f59e0b;
    --gold-secondary: #d97706;
    --gold-glow: rgba(245, 158, 11, 0.35);

    --text-main: #f8fafc;
    --text-dark: #1f2937;
    --text-muted: #64748b;

    --card-bg: rgba(255, 255, 255, 0.97);
    --border-light: rgba(8, 64, 39, 0.18);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --t-fast: 0.2s ease;
    --t-medium: 0.4s ease;
    --t-title-fade: 0.6s;
}


/* ================================= */
/* GLOBAL */
/* ================================= */

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

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;

    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
}

button,
select,
input,
textarea {
    font: inherit;
    max-width: 100%;
}


/* ================================= */
/* KEYBOARD ACCESSIBILITY */
/* ================================= */

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent-green);
    outline-offset: 3px;
}


/* ================================= */
/* MOVING GREEN HAZE */
/* ================================= */

.hero-haze {
    position: fixed;
    inset: -50%;

    width: 200%;
    height: 200%;

    background: linear-gradient(
        135deg,
        transparent 42%,
        rgba(16, 185, 129, 0.18) 50%,
        transparent 58%
    );

    pointer-events: none;
    z-index: 0;

    animation: hazeSweep 7s ease-in-out infinite alternate;
}


/* ================================= */
/* PAGE WRAPPER */
/* ================================= */

.page-wrapper {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    min-height: 100vh;
    width: 100%;
    max-width: 100%;

    overflow-x: hidden;
}


/* ================================= */
/* TOP RIGHT HOME BUTTON */
/* ================================= */

.brief-form {
    position: fixed;

    top: 1.5rem;
    right: 1.5rem;

    z-index: 100;
}

.brief-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 3.25rem;
    height: 3.25rem;

    border-radius: 50%;

    background: var(--card-bg);
    border: 1px solid var(--border-light);

    color: var(--gold-primary);

    text-decoration: none;

    backdrop-filter: blur(12px);

    cursor: pointer;

    transition:
        transform var(--t-fast),
        background var(--t-fast),
        box-shadow var(--t-fast),
        border-color var(--t-fast);

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.brief-btn:hover {
    background: rgba(245, 158, 11, 0.18);

    border-color: var(--gold-primary);

    transform: translateY(-2px);

    box-shadow: 0 0 25px var(--gold-glow);
}

.brief-icon {
    width: 1.35rem;
    height: 1.35rem;
}

.brief-tooltip {
    position: absolute;

    right: 110%;
    top: 50%;

    transform: translateY(-50%);

    background: var(--card-bg);

    border: 1px solid var(--border-light);

    color: var(--text-dark);

    padding: 0.5rem 0.8rem;

    border-radius: 6px;

    font-size: 0.8rem;
    font-weight: 600;

    white-space: nowrap;

    opacity: 0;
    pointer-events: none;

    transition: opacity var(--t-fast);
}

.brief-form:hover .brief-tooltip,
.brief-btn:focus-visible + .brief-tooltip {
    opacity: 1;
}


/* ================================= */
/* HEADER */
/* ================================= */

.portal-header {
    width: 100%;

    text-align: center;

    padding: 3rem 1.5rem 1.5rem;

    max-width: 900px;

    margin: 0 auto;
}

.hero-title {
    margin: 0 0 0.75rem;

    font-family: var(--font-heading);

    font-size: clamp(3rem, 6vw, 5rem);

    font-weight: 800;

    line-height: 1;

    letter-spacing: -0.03em;

    background: linear-gradient(
        135deg,
        #ffffff 30%,
        var(--text-muted) 100%
    );

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;

    color: transparent;

    opacity: 0;

    animation: fadeUp var(--t-title-fade) ease-out forwards;
}

.hero-tagline {
    margin: 0;

    font-family: var(--font-body);

    font-size: 0.95rem;

    color: var(--text-muted);

    line-height: 1.5;
}


/* ================================= */
/* MAIN JOB LISTINGS */
/* ================================= */

.mainListings {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;

    padding: 1rem 1.5rem 3rem;

    display: flex;
    flex-direction: column;

    gap: 1.5rem;

    flex: 1;
}


/* ================================= */
/* APPLICATION CARD */
/* ================================= */

.card {
    position: relative;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    background: var(--card-bg);

    border: 1px solid var(--border-light);

    border-radius: 20px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);

    backdrop-filter: blur(8px);

    overflow: hidden;

    animation: fadeUp var(--t-title-fade) ease-out forwards;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.card:hover {
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);

    border-color: var(--accent-green);
}


/* ================================= */
/* CARD HEADER */
/* ================================= */

.card-header {
    padding: 1.5rem 2rem;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    user-select: none;

    transition: background-color var(--t-fast);
}

.card-header:hover {
    background: rgba(16, 185, 129, 0.05);
}


/* ================================= */
/* CARD HEADER CONTENT */
/* ================================= */

.header-content {
    min-width: 0;
    flex: 1;
}

.header-content h2 {
    margin: 0 0 0.35rem;

    font-family: var(--font-heading);

    font-size: 1.6rem;

    font-weight: 800;

    color: #084027;

    overflow-wrap: break-word;
}

.header-content .summary {
    margin: 0;

    font-family: var(--font-body);

    font-size: 0.85rem;

    color: var(--gold-secondary);

    letter-spacing: 0.05em;

    text-transform: uppercase;

    font-weight: 600;
}


/* ================================= */
/* EXPAND ICON */
/* ================================= */

.expand-icon {
    flex-shrink: 0;

    font-size: 1.25rem;

    color: var(--gold-primary);

    transition: transform var(--t-medium);
}

.card.expanded .expand-icon {
    transform: rotate(180deg);
}


/* ================================= */
/* APPLICATION LAYOUT */
/* ================================= */

.application-layout {
    display: none;

    padding: 0 2rem 2.25rem;

    border-top: 1px solid rgba(8, 64, 39, 0.15);

    min-width: 0;
}

.card.expanded .application-layout {
    display: grid;

    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);

    gap: 2.5rem;

    padding-top: 2rem;

    animation: fadeIn 0.4s ease-out;
}


/* ================================= */
/* FORM */
/* ================================= */

.form {
    display: flex;
    flex-direction: column;

    gap: 1.25rem;

    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.form-row {
    display: grid;

    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

    gap: 1rem;

    width: 100%;
    min-width: 0;
}

.form-group {
    display: flex;
    flex-direction: column;

    gap: 0.4rem;

    width: 100%;
    max-width: 100%;
    min-width: 0;
}


/* ================================= */
/* LABELS */
/* ================================= */

.card label {
    font-family: var(--font-body);

    font-size: 0.85rem;

    font-weight: 600;

    color: var(--text-dark);
}


/* ================================= */
/* INPUTS */
/* ================================= */

.card input[type="text"],
.card input[type="tel"],
.card input[type="email"],
.card select,
.card textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 0.8rem 1rem;

    background: white;

    border: 1px solid rgba(8, 64, 39, 0.3);

    border-radius: 8px;

    color: var(--text-dark);

    font-family: var(--font-body);

    font-size: 0.95rem;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}


/* ================================= */
/* SELECT OPTIONS */
/* ================================= */

.card select option {
    background-color: white;
    color: var(--text-dark);
}


/* ================================= */
/* INPUT HOVER */
/* ================================= */

.card input:hover,
.card select:hover,
.card textarea:hover {
    border-color: var(--accent-green);
}


/* ================================= */
/* INPUT FOCUS */
/* ================================= */

.card input:focus,
.card select:focus,
.card textarea:focus {
    border-color: var(--accent-green);

    background: white;

    box-shadow:
        0 0 0 3px rgba(16, 185, 129, 0.15);
}


/* ================================= */
/* TEXTAREA */
/* ================================= */

.card textarea {
    resize: vertical;

    min-height: 120px;

    line-height: 1.5;
}


/* ================================= */
/* FILE UPLOAD */
/* ================================= */

.upload-section {
    padding: 1.25rem;

    background: rgba(8, 64, 39, 0.04);

    border: 1.5px dashed rgba(8, 64, 39, 0.3);

    border-radius: 12px;

    text-align: center;

    transition: border-color 0.2s ease;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    overflow: hidden;

    word-break: break-word;
}

.upload-section:hover {
    border-color: var(--gold-primary);
}

.upload-section label {
    display: block;

    margin-bottom: 0.5rem;

    color: var(--text-dark);

    cursor: pointer;
}

.upload-section input[type="file"] {
    font-family: var(--font-body);

    font-size: 0.85rem;

    color: var(--text-muted);

    width: 100%;
    max-width: 100%;
}

.upload-section input[type="file"]::file-selector-button {
    background: rgba(245, 158, 11, 0.1);

    border: 1px solid var(--gold-secondary);

    color: #92400e;

    padding: 0.4rem 0.8rem;

    border-radius: 6px;

    cursor: pointer;

    font-size: 0.8rem;

    font-weight: 600;

    margin-right: 0.8rem;

    transition: all 0.2s ease;
}

.upload-section input[type="file"]::file-selector-button:hover {
    background: var(--gold-primary);

    color: #000;
}


/* ================================= */
/* SUBMIT BUTTON */
/* ================================= */

.submit-btn {
    width: 100%;

    margin-top: 0.5rem;

    min-height: 44px;

    padding: 10px 15px;

    border: none;

    border-radius: 9999px;

    background: linear-gradient(
        135deg,
        var(--gold-primary),
        var(--gold-secondary)
    );

    color: #000;

    font-family: var(--font-body);

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;

    box-shadow: 0 4px 15px var(--gold-glow);
}

.submit-btn:hover {
    transform: translateY(-2px);

    box-shadow: 0 8px 25px var(--gold-glow);

    filter: brightness(1.08);
}


/* ================================= */
/* JOB REQUIREMENTS */
/* ================================= */

.job-requirements {
    border-left: 1px solid rgba(8, 64, 39, 0.25);

    padding-left: 2rem;

    min-width: 0;

    overflow-wrap: break-word;
}

.job-requirements h3 {
    margin-top: 0;

    margin-bottom: 1rem;

    font-family: var(--font-heading);

    font-size: 1.25rem;

    font-weight: 800;

    color: #084027;
}

.job-requirements ul {
    margin: 0;

    padding-left: 1.2rem;

    color: #555;

    min-width: 0;
}

.job-requirements li {
    margin-bottom: 0.85rem;

    line-height: 1.5;

    font-family: var(--font-body);

    font-size: 0.9rem;

    color: #555;

    overflow-wrap: break-word;
}


/* ================================= */
/* FOOTER */
/* ================================= */

footer {
    width: 100%;

    text-align: center;

    padding: 1.5rem 1rem;

    margin-top: auto;

    color: var(--text-muted);

    font-family: var(--font-body);

    font-size: 0.8rem;

    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer small {
    font-size: inherit;

    line-height: 1.5;
}


/* ================================= */
/* ANIMATIONS */
/* ================================= */

@keyframes fadeUp {
    from {
        opacity: 0;

        transform: translateY(20px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;

        transform: translateY(-8px);
    }

    to {
        opacity: 1;

        transform: translateY(0);
    }
}

@keyframes hazeSweep {
    0% {
        transform: translate(-25%, 25%);
    }

    100% {
        transform: translate(25%, -25%);
    }
}


/* ================================= */
/* REDUCE MOTION */
/* ================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;

        scroll-behavior: auto !important;
    }
}


/* ================================= */
/* TABLET */
/* ================================= */

@media (max-width: 820px) {

    .card.expanded .application-layout {
        grid-template-columns: minmax(0, 1fr);

        gap: 2rem;
    }

    .job-requirements {
        border-left: none;

        border-top: 1px dashed rgba(8, 64, 39, 0.25);

        padding-left: 0;

        padding-top: 1.5rem;
    }
}


/* ================================= */
/* MOBILE */
/* ================================= */

@media (max-width: 580px) {

    /* ----------------------------- */
    /* HEADER */
    /* ----------------------------- */

    .portal-header {
        width: 100%;

        padding: 5rem 1rem 1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 2.5rem);

        line-height: 1.1;

        overflow-wrap: break-word;
    }

    .hero-tagline {
        font-size: 0.85rem;

        line-height: 1.5;
    }


    /* ----------------------------- */
    /* JOB LISTINGS */
    /* ----------------------------- */

    .mainListings {
        width: 100%;

        max-width: 100%;

        padding: 1rem 0.75rem 2rem;

        margin: 0;
    }


    /* ----------------------------- */
    /* CARD */
    /* ----------------------------- */

    .card {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        border-radius: 16px;
    }


    /* ----------------------------- */
    /* CARD HEADER */
    /* ----------------------------- */

    .card-header {
        width: 100%;

        padding: 1.15rem 1rem;

        gap: 0.75rem;
    }

    .header-content {
        min-width: 0;

        flex: 1;
    }

    .header-content h2 {
        font-size: 1.25rem;

        line-height: 1.25;

        overflow-wrap: break-word;
    }

    .header-content .summary {
        font-size: 0.72rem;

        line-height: 1.4;
    }

    .expand-icon {
        flex-shrink: 0;
    }


    /* ----------------------------- */
    /* APPLICATION LAYOUT */
    /* ----------------------------- */

    .application-layout,
    .card.expanded .application-layout {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        display: grid;

        grid-template-columns: minmax(0, 1fr);

        gap: 1.5rem;

        padding: 1.25rem 1rem 1.5rem;

        overflow: hidden;
    }


    /* ----------------------------- */
    /* FORM */
    /* ----------------------------- */

    .form {
        width: 100%;

        max-width: 100%;

        min-width: 0;
    }


    /* ----------------------------- */
    /* FORM ROWS */
    /* ----------------------------- */

    .form-row {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        display: grid;

        grid-template-columns: minmax(0, 1fr);

        gap: 1rem;
    }


    /* ----------------------------- */
    /* FORM GROUP */
    /* ----------------------------- */

    .form-group {
        width: 100%;

        max-width: 100%;

        min-width: 0;
    }


    /* ----------------------------- */
    /* LABELS */
    /* ----------------------------- */

    .card label {
        font-size: 0.82rem;

        line-height: 1.3;
    }


    /* ----------------------------- */
    /* INPUTS */
    /* ----------------------------- */

    .card input[type="text"],
    .card input[type="tel"],
    .card input[type="email"],
    .card select,
    .card textarea {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        padding: 0.75rem 0.85rem;

        font-size: 0.9rem;
    }


    /* ----------------------------- */
    /* TEXTAREA */
    /* ----------------------------- */

    .card textarea {
        min-height: 120px;

        max-width: 100%;

        resize: vertical;
    }


    /* ----------------------------- */
    /* FILE UPLOAD */
    /* ----------------------------- */

    .upload-section {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        padding: 1rem;

        overflow: hidden;

        word-break: break-word;
    }

    .upload-section input[type="file"] {
        width: 100%;

        max-width: 100%;

        font-size: 0.78rem;
    }

    .upload-section input[type="file"]::file-selector-button {
        display: block;

        width: 100%;

        max-width: 100%;

        margin: 0 0 0.6rem 0;

        padding: 0.5rem 0.7rem;
    }


    /* ----------------------------- */
    /* SUBMIT BUTTON */
    /* ----------------------------- */

    .submit-btn {
        width: 100%;

        max-width: 100%;

        min-height: 46px;

        font-size: 0.8rem;
    }


    /* ----------------------------- */
    /* JOB REQUIREMENTS */
    /* ----------------------------- */

    .job-requirements {
        width: 100%;

        max-width: 100%;

        min-width: 0;

        border-left: none;

        border-top: 1px dashed rgba(8, 64, 39, 0.25);

        padding-left: 0;

        padding-top: 1.5rem;

        overflow-wrap: break-word;

        word-wrap: break-word;
    }

    .job-requirements h3 {
        font-size: 1.15rem;
    }

    .job-requirements ul {
        width: 100%;

        max-width: 100%;

        padding-left: 1.15rem;

        margin: 0;

        overflow-wrap: break-word;
    }

    .job-requirements li {
        font-size: 0.85rem;

        line-height: 1.5;

        overflow-wrap: break-word;

        word-break: normal;
    }


    /* ----------------------------- */
    /* HOME BUTTON */
    /* ----------------------------- */

    .brief-form {
        top: 0.75rem;

        right: 0.75rem;
    }

    .brief-btn {
        width: 2.8rem;

        height: 2.8rem;
    }

    .brief-icon {
        width: 1.2rem;

        height: 1.2rem;
    }


    /* ----------------------------- */
    /* FOOTER */
    /* ----------------------------- */

    footer {
        padding: 1.25rem 0.75rem;
    }

    footer small {
        font-size: 0.7rem;

        line-height: 1.5;
    }
}