:root {
    --bg: #05070c;
    --glass: rgba(8, 10, 20, 0.62);
    --text: #e8edf5;
    --muted: #c1c7d4;
    --accent: #5ad1ff;
    --accent-2: #6cf3c5;
    --border: rgba(255, 255, 255, 0.18);
    --shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
    --max-width: 1180px;
}

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

body {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

/* Kill native blue styling on any remaining buttons */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    background-color: transparent !important;
    border: none !important;
    color: inherit !important;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 12px;
    padding: 10px 14px;
    background: var(--accent);
    color: #041019;
    border-radius: 10px;
    z-index: 20;
    text-decoration: none;
    font-weight: 700;
    box-shadow: var(--shadow);
}

.skip-link:focus {
    left: 16px;
}

.overlay {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 32px 24px 30px;
    isolation: isolate;
}

.overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(5, 7, 12, 0.9) 22%, rgba(5, 7, 12, 0.62) 60%),
        url('assets/chg.jpg') center/cover no-repeat;
    z-index: -2;
}

.overlay::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 24%, rgba(90, 209, 255, 0.14), transparent 40%),
        radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.12), transparent 42%);
    z-index: -1;
}

.site-header {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    position: relative;
    overflow: hidden;
}

.logo::before {
    content: \"C\";
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #041019;
    font-weight: 800;
    letter-spacing: 0.08em;
    border-radius: 10px;
    font-size: 1rem;
}

.content {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px 28px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: left;
}

.eyebrow {
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 8px;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
}

.lead {
    margin: 0;
    color: var(--muted);
    max-width: 760px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 1px solid var(--border) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text) !important;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.button.primary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35) !important;
}

.button.primary:hover,
.button.primary:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    background: rgba(255, 255, 255, 0.12) !important;
}

.button.ghost {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.button.ghost:hover,
.button.ghost:focus-visible {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

footer {
    width: 100%;
    max-width: var(--max-width);
    margin: 32px auto 0;
    padding: 10px 0 4px;
    text-align: center;
    color: var(--muted);
    text-shadow: 0 1px 4px #000;
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-socials a,
.icon-button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: grid;
    place-items: center;
    transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.footer-socials img {
    width: 24px !important;
    height: 24px !important;
}

.footer-socials a:hover,
.footer-socials a:focus-visible,
.icon-button:hover,
.icon-button:focus-visible {
    transform: translateY(-2px) scale(1.03);
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.7);
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 30;
}

.modal.is-open {
    display: flex;
}

.modal-content {
    background: rgba(10, 12, 20, 0.85);
    backdrop-filter: blur(14px) saturate(130%);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    border: 1px solid var(--border);
    padding: 26px 28px 24px;
    border-radius: 18px;
    width: min(520px, 100%);
    color: var(--text);
    box-shadow: var(--shadow);
    text-align: left;
    position: relative;
    margin: 0 12px;
}

.modal-content h2 {
    margin: 6px 0 14px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
}

.modal-content input,
.modal-content textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.modal-content textarea {
    min-height: 140px;
    resize: vertical;
}

.modal-content input::placeholder,
.modal-content textarea::placeholder {
    color: rgba(231, 233, 240, 0.8);
}

.modal-content input:focus,
.modal-content textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(90, 209, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
}

.modal-content button {
    align-self: flex-start;
}

.modal-content .button,
.modal-content button {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
    padding: 12px 18px !important;
    border-radius: 999px !important;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: auto;
    height: auto;
    padding: 6px 8px;
    border: none !important;
    background: transparent !important;
    color: var(--muted) !important;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 120ms ease, color 120ms ease;
}

.close:hover,
.close:focus-visible {
    color: var(--text);
    transform: scale(1.04);
}

.form-status {
    margin: 0;
    color: var(--text);
}

.sr-only {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

body.no-scroll {
    overflow: hidden;
}

.toast-container {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 40;
    pointer-events: none;
}

.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(15, 18, 28, 0.9);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    color: var(--text);
    font-weight: 600;
    text-align: center;
    animation: toast-in 150ms ease, toast-out 400ms ease 3.2s forwards;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    to { opacity: 0; transform: translateY(-4px); }
}

@media (max-width: 900px) {
    .overlay {
        padding: 26px 18px 24px;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .content {
        padding: 24px 20px;
    }

    .actions {
        flex-direction: column;
        align-items: flex-start;
    }

    footer {
        margin-top: 22px;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    .logo-text {
        letter-spacing: 0.05em;
    }

    .content {
        text-align: left;
    }
}

@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;
    }
}
