@font-face {
    font-family: "DM Sans";
    src: url("/public/assets/fonts/DMSans-Regular.ttf") format("truetype");
    font-weight: 400;
}

@font-face {
    font-family: "DM Sans";
    src: url("/public/assets/fonts/DMSans-Bold.ttf") format("truetype");
    font-weight: 700;
}

:root {
    --blue: #2f3b91;
    --blue-dark: #171d54;
    --pink: #e40046;
    --ink: #151726;
    --muted: #5c6273;
    --line: #dfe2eb;
    --surface: #f7f8fb;
    --white: #fff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: "DM Sans", Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.site-header,
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand img {
    display: block;
    width: min(210px, 46vw);
    height: auto;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 15px;
    font-weight: 700;
}

.nav-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.nav-link:hover {
    text-decoration: underline;
}

.notice {
    margin: 0;
    padding: 14px clamp(18px, 4vw, 56px);
    color: var(--white);
    background: var(--blue-dark);
}

.notice strong {
    color: #fff;
}

.hero {
    display: grid;
    grid-template-columns: minmax(320px, 34.5%) minmax(0, 65.5%);
    min-height: 620px;
    overflow: hidden;
}

.hero-copy {
    align-self: center;
    max-width: 760px;
    padding: clamp(42px, 7vw, 92px) clamp(18px, 5vw, 72px);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--pink);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    color: var(--blue-dark);
    line-height: 1.05;
}

h1 {
    font-size: clamp(44px, 6vw, 82px);
}

h2 {
    font-size: clamp(28px, 4vw, 44px);
}

.lead {
    max-width: 640px;
    margin: 24px 0 0;
    color: var(--muted);
    font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 2px solid var(--pink);
    border-radius: 6px;
    background: var(--pink);
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
}

.button:hover {
    text-decoration: none;
    filter: brightness(.96);
}

.button.secondary {
    border-color: var(--blue);
    background: transparent;
    color: var(--blue);
}

.text-link {
    display: inline;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.hero-media {
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
}

.hero-media img {
    width: 72%;
    height: 72%;
    object-fit: contain;
    object-position: center;
}

.facts,
.content-grid,
.form-section,
.site-footer,
.admin-shell {
    padding-inline: clamp(18px, 4vw, 56px);
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    padding-top: 1px;
    padding-bottom: 1px;
}

.facts article {
    background: var(--white);
    padding: 32px;
}

.facts span {
    display: block;
    color: var(--blue);
    font-size: 34px;
    font-weight: 700;
}

.facts p {
    margin: 10px 0 0;
    color: var(--muted);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
    gap: 48px;
    padding-top: 76px;
    padding-bottom: 76px;
}

.content-grid p,
.section-heading p {
    color: var(--muted);
    font-size: 18px;
}

.check-list {
    display: grid;
    gap: 12px;
    margin: 26px 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    padding-left: 28px;
    position: relative;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .5em;
    width: 12px;
    height: 12px;
    background: var(--pink);
}

.content-grid aside {
    padding: 28px;
    border-left: 6px solid var(--pink);
    background: var(--surface);
}

.form-section {
    padding-top: 76px;
    padding-bottom: 86px;
    background: var(--surface);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.alert {
    max-width: 960px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border-radius: 6px;
    font-weight: 700;
}

.alert.success {
    background: #e9f8ef;
    color: #13542c;
}

.alert.error {
    background: #ffedf2;
    color: #8a002b;
}

.application-form {
    display: grid;
    gap: 22px;
    max-width: 1040px;
}

fieldset,
.consents,
.login-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

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

legend {
    padding: 0 8px;
    color: var(--blue-dark);
    font-size: 18px;
    font-weight: 700;
}

label {
    display: grid;
    gap: 8px;
    color: var(--blue-dark);
    font-weight: 700;
}

.wide {
    grid-column: 1 / -1;
}

input,
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid #c7ccda;
    border-radius: 6px;
    color: var(--ink);
    background: var(--white);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(47, 59, 145, .18);
}

.invalid {
    border-color: var(--pink);
}

.field-error {
    grid-column: 1 / -1;
    margin: 0;
    color: #8a002b;
    font-weight: 700;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox input {
    flex: 0 0 auto;
    width: 20px;
    min-height: 20px;
    margin-top: 2px;
}

.consents {
    display: grid;
    gap: 14px;
    padding: 22px 24px;
}

.honeypot {
    position: absolute;
    left: -9999px;
}

.submit {
    justify-self: start;
}

.site-footer {
    display: grid;
    gap: 14px;
    padding-top: 40px;
    padding-bottom: 44px;
    border-top: 1px solid var(--line);
}

.publicity-logos {
    width: min(360px, 100%);
    padding: 8px 0;
    overflow: visible;
}

.publicity-logos img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
}

.modal {
    width: min(760px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    padding: 0;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    box-shadow: 0 24px 70px rgba(18, 22, 48, .28);
}

.modal::backdrop {
    background: rgba(18, 22, 48, .56);
}

.modal-panel {
    display: grid;
    max-height: min(760px, calc(100vh - 32px));
    grid-template-rows: auto 1fr;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 26px 18px;
    border-bottom: 1px solid var(--line);
}

.modal-header h2 {
    font-size: clamp(24px, 4vw, 34px);
}

.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    color: var(--blue-dark);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.modal-body {
    overflow: auto;
    padding: 22px 26px 28px;
}

.modal-body h3 {
    margin: 24px 0 8px;
    color: var(--blue-dark);
    font-size: 18px;
}

.modal-body p {
    margin: 0 0 14px;
    color: var(--muted);
}

.admin-page {
    background: var(--surface);
}

.admin-shell {
    padding-top: 28px;
    padding-bottom: 48px;
}

.admin-header {
    position: static;
    margin: -28px calc(clamp(18px, 4vw, 56px) * -1) 28px;
}

.login-box {
    max-width: 520px;
    padding: 28px;
}

.application-form.compact {
    gap: 16px;
}

.admin-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.admin-toolbar h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.admin-toolbar p {
    margin: 6px 0 0;
    color: var(--muted);
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1100px;
    font-size: 14px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--blue-dark);
    background: #f0f2f8;
    font-weight: 700;
}

small {
    color: var(--muted);
}

code {
    padding: 2px 5px;
    border-radius: 4px;
    background: #f0f2f8;
}

@media (max-width: 900px) {
    .site-header,
    .admin-header,
    .admin-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
    }

    .hero-media {
        min-height: 260px;
    }

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

    fieldset {
        grid-template-columns: 1fr;
        padding: 18px;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: 40px;
    }

    .button,
    .submit {
        width: 100%;
    }
}
