:root {
    --rayenari-bg: #020712;
    --rayenari-panel: rgba(8, 14, 28, 0.94);
    --rayenari-panel-soft: rgba(2, 7, 18, 0.78);
    --rayenari-border: rgba(255, 255, 255, 0.13);
    --rayenari-border-focus: rgba(255, 191, 31, 0.65);
    --rayenari-text: #f4f6fb;
    --rayenari-muted: #b9c0ce;
    --rayenari-gold: #ffbf1f;
    --rayenari-red: #ff4d4d;
    --rayenari-radius: 18px;
    --rayenari-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, Helvetica, sans-serif;
    color: var(--rayenari-text);
    background:
        linear-gradient(
            180deg,
            rgba(2, 7, 18, 0.62),
            rgba(2, 7, 18, 0.92)
        ),
        url("../rayenari_hero_bg.jpg") center / cover fixed no-repeat;
    background-color: var(--rayenari-bg);
    line-height: 1.55;
}

/* Shared page width */

body > form,
body > h1,
body > p,
.wrap,
.application-page {
    width: min(1100px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}

body > form {
    margin-top: 28px;
    margin-bottom: 70px;
    padding: 32px;
    background: linear-gradient(
        180deg,
        rgba(24, 10, 22, 0.82),
        rgba(8, 14, 28, 0.94)
    );
    border: 1px solid var(--rayenari-border);
    border-radius: var(--rayenari-radius);
    box-shadow: var(--rayenari-shadow);
}

/* Page headings */

body > h1 {
    margin-top: 55px;
    margin-bottom: 12px;
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.1;
}

body > p {
    max-width: 800px;
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    color: var(--rayenari-muted);
}

/* Form sections */

form > h2,
.section h2,
.form-section h2 {
    margin: 34px 0 20px;
    padding-bottom: 10px;
    color: var(--rayenari-gold);
    font-size: 1.35rem;
    line-height: 1.25;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

form > h2:first-child,
.section:first-child h2,
.form-section:first-child h2 {
    margin-top: 0;
}

/* Labels and fields */

label {
    display: block;
    margin-top: 17px;
    margin-bottom: 7px;
    color: var(--rayenari-text);
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    color: var(--rayenari-text);
    background: #0e1526;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #8992a4;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--rayenari-border-focus);
    box-shadow: 0 0 0 3px rgba(255, 191, 31, 0.12);
}

/* File inputs */

input[type="file"] {
    padding: 10px;
}

/* Checkboxes */

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-right: 8px;
    accent-color: var(--rayenari-gold);
}

/* Volunteer availability cards */

.wrap .card {
    background: linear-gradient(
        180deg,
        rgba(24, 10, 22, 0.82),
        rgba(8, 14, 28, 0.94)
    );
    border: 1px solid var(--rayenari-border);
    border-radius: var(--rayenari-radius);
    box-shadow: var(--rayenari-shadow);
}

.wrap {
    padding-top: 40px;
    padding-bottom: 70px;
}

.card {
    padding: 32px;
}

.card h1 {
    margin-top: 0;
    color: var(--rayenari-gold);
}

.card h2 {
    color: var(--rayenari-gold);
}

.card > p:first-of-type {
    color: var(--rayenari-muted);
}

/* Links */

a {
    color: var(--rayenari-gold);
}

a:hover {
    color: #ffd45e;
}

/* Buttons */

button,
input[type="submit"],
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 26px;
    padding: 12px 24px;
    color: #111;
    background: linear-gradient(
        90deg,
        var(--rayenari-red),
        var(--rayenari-gold)
    );
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
input[type="submit"]:hover,
.button:hover {
    filter: brightness(1.08);
}

/* Sponsor / pages using shared structural classes */

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(2, 7, 18, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 191, 31, 0.18);
}

.nav {
    width: min(92%, 1280px);
    margin: 0 auto;
    padding: 14px 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.nav a {
    color: var(--rayenari-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.nav .cta {
    padding: 10px 16px;
    border: 1px solid var(--rayenari-gold);
    border-radius: 10px;
}

.logo {
    display: block;
    width: min(220px, 45vw);
    height: auto;
    margin: 0 auto 22px;
}

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

.check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 10px 0;
}

.check input {
    width: auto;
    flex: 0 0 auto;
    margin-top: 4px;
}

/* Prevent accidental horizontal overflow */

img,
input,
select,
textarea {
    max-width: 100%;
}

/* Keyboard accessibility */

:focus-visible {
    outline: 3px solid rgba(255, 191, 31, 0.45);
    outline-offset: 3px;
}

/* Mobile */

@media (max-width: 800px) {
    body > form,
    body > h1,
    body > p,
    .wrap,
    .application-page {
        width: min(100% - 24px, 1100px);
    }

    body > form,
    .card {
        padding: 22px 18px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .nav {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    body > h1 {
        margin-top: 35px;
        font-size: 2rem;
    }

    body > form,
    .card {
        padding: 18px 15px;
        border-radius: 14px;
    }

    button,
    input[type="submit"],
    .button {
        width: 100%;
    }
}
