/* AVOR access request — tokens and components lifted from the website
   stylesheet (avor_website/docs/assets/css/styles.css). Only the form
   controls are new; they follow the existing vocabulary: 8px radius as on
   the button, 48px height, focus ring in --blue-bright. */

:root {
    --blue-accent: #016F99;
    --blue-dark-alt: #017197;
    --blue-bright: #02ADE7;
    --blue-gradient: 2, 173, 231;
    --blue-light: #B0E0F5;

    --text-dark: #1a1a2e;
    --text-gray: #4a5568;
    --text-light: #718096;

    --white: #ffffff;
    --bg-footer: #f5f7f9;
    --btn-hover: #2d2d4a;

    --border: rgba(26, 26, 46, 0.14);
    --danger: #b3261e;
}

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

body {
    margin: 0;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
}

a { color: var(--blue-accent); text-decoration: none; }
a:hover { color: var(--blue-dark-alt); text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────────────────── */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 4rem;
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}
.logo { height: 40px; width: auto; }

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

.hero {
    padding: 4rem 2rem 3rem;
    text-align: center;
    background: linear-gradient(180deg, var(--white) 0%, rgba(var(--blue-gradient), 0.08) 100%);
}
.hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    text-wrap: pretty;
}
.hero h1 .accent { color: var(--blue-accent); }
.hero p {
    max-width: 620px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: var(--text-gray);
    line-height: 1.7;
}

/* ── Card on the blue wash ──────────────────────────────────────────── */

.panel {
    padding: 4rem 2rem 5rem;
    background: linear-gradient(
        135deg,
        rgba(var(--blue-gradient), 0.20) 0%,
        rgba(var(--blue-gradient), 0.30) 25%,
        rgba(var(--blue-gradient), 0.28) 50%,
        rgba(var(--blue-gradient), 0.22) 75%,
        rgba(var(--blue-gradient), 0.18) 100%
    );
}
.card {
    max-width: 760px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}
.card--narrow { max-width: 640px; text-align: center; }

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

form { display: flex; flex-direction: column; gap: 2.25rem; }

fieldset {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}
legend {
    padding: 0;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-light);
}

.row { display: grid; gap: 1rem; }
.row--person { grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); }
.row--halves { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }

.field { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }
.field > label { font-size: 0.875rem; font-weight: 500; color: var(--text-dark); }
.req { color: var(--blue-accent); }
.hint { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }
.error { font-size: 0.85rem; color: var(--danger); line-height: 1.5; }

input[type="text"], input[type="email"], select {
    height: 48px;
    width: 100%;
    padding: 0 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    appearance: none;
}
select {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='m6 9 6 6 6-6' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}
input::placeholder { color: var(--text-light); }
input:focus-visible, select:focus-visible, .choice input:focus-visible + span {
    outline: none;
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(var(--blue-gradient), 0.15);
}
.field--invalid input, .field--invalid select { border-color: var(--danger); }

/* Segmented control (radio buttons rendered as pills) */
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    color: var(--text-gray);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.choice span:hover { border-color: rgba(26, 26, 46, 0.3); }
.choice input:checked + span {
    background: var(--text-dark);
    border-color: var(--text-dark);
    color: var(--white);
}

/* Fachkreis declaration */
.consent {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--bg-footer);
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.6;
    cursor: pointer;
}
.consent input {
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    flex-shrink: 0;
    accent-color: var(--blue-accent);
    cursor: pointer;
}

/* Honeypot — invisible to humans, inviting to form bots */
.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

button {
    padding: 1rem 2.25rem;
    background: var(--text-dark);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
button:hover {
    background: var(--btn-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--blue-gradient), 0.2);
}

.note { font-size: 0.85rem; color: var(--text-light); text-align: center; line-height: 1.5; }

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(179, 38, 30, 0.07);
    color: var(--danger);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Confirmation page ──────────────────────────────────────────────── */

.stack { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(var(--blue-gradient), 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}
.refbox {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: var(--bg-footer);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    text-align: left;
}
.refbox .value {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 500;
    color: var(--text-dark);
}

/* ── Footer ─────────────────────────────────────────────────────────── */

footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 2rem 4rem;
    background: var(--bg-footer);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.85rem;
    color: var(--text-light);
}
.footer-logo { height: 32px; width: auto; }
.footer-center { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.footer-center .links { display: flex; gap: 1.5rem; }
.footer-center .links a { display: flex; align-items: center; gap: 0.4rem; }
.footer-links { display: flex; gap: 1.5rem; }

/* ── Narrow viewports ───────────────────────────────────────────────── */

@media (max-width: 720px) {
    header { padding: 0.6rem 1.25rem; }
    .logo { height: 32px; }
    .hero { padding: 2.5rem 1.25rem 2rem; }
    .hero p { font-size: 1rem; }
    .panel { padding: 2rem 1rem 3rem; }
    .card { padding: 1.5rem; }
    form { gap: 2rem; }
    fieldset { gap: 1rem; }
    .row--person, .row--halves { grid-template-columns: minmax(0, 1fr); }
    .choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .choices--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .choice span { display: block; padding: 0.75rem 0.4rem; font-size: 0.85rem; text-align: center; }
    button { width: 100%; }
    footer { flex-direction: column; align-items: center; text-align: center; padding: 2rem 1.25rem; }
}

/* Below 400px "Krankenhaus" no longer fits beside two other pills, so the
   three-way control stacks; the two-way one stays side by side. */
@media (max-width: 400px) {
    .choices { grid-template-columns: minmax(0, 1fr); }
    .choices--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
