* {
    box-sizing: border-box;
}

:root {
    --blue: #003f4f;
    --blue-deep: #06191f;
    --beige: #f4ead2;
    --gold: #c9a45c;
    --white: #fff;
    --glass: rgba(5, 20, 25, .64);
    --glass-strong: rgba(5, 20, 25, .78);
    --border: rgba(255, 255, 255, .22);
}

body {
    background: linear-gradient(135deg, rgba(0, 63, 79, .82), rgba(6, 25, 31, .91)), url("/kaiserhof-portal-bg.png") center / cover fixed no-repeat;
    color: var(--white);
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    min-height: 100vh;
}

body.admin-portal {
    background: linear-gradient(135deg, rgba(7, 35, 42, .91), rgba(2, 14, 18, .96)), url("/kaiserhof-portal-bg.png") center / cover fixed no-repeat;
}

body::before {
    background: radial-gradient(circle at top right, rgba(244, 234, 210, .24), transparent 34%), radial-gradient(circle at bottom left, rgba(201, 164, 92, .2), transparent 30%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

.page {
    margin: 0 auto;
    padding: 34px 0 28px;
    position: relative;
    width: min(1180px, calc(100% - 32px));
    z-index: 1;
}

.topbar {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(5, 20, 25, .48);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 15px 18px;
}

.brand {
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-decoration: none;
}

.brand strong {
    font-size: 22px;
    letter-spacing: -.03em;
}

.brand span {
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}

.toplinks {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: flex-end;
}

.toplinks a {
    background: rgba(244, 234, 210, .1);
    border: 1px solid rgba(244, 234, 210, .18);
    border-radius: 999px;
    color: var(--beige);
    font-size: 13px;
    font-weight: 800;
    padding: 8px 11px;
    text-decoration: none;
}

.toplinks .login-link {
    background: var(--beige);
    color: #102027;
}

.hero {
    max-width: 900px;
    padding: 68px 0 34px;
}

.admin-hero {
    padding-bottom: 25px;
}

.badge {
    background: rgba(244, 234, 210, .14);
    border: 1px solid rgba(244, 234, 210, .28);
    border-radius: 999px;
    color: var(--beige);
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 18px;
    padding: 9px 15px;
}

.hero h1 {
    font-size: clamp(42px, 7vw, 78px);
    letter-spacing: -.065em;
    line-height: .98;
    margin: 0;
    text-shadow: 0 8px 28px rgba(0, 0, 0, .38);
}

.subtitle {
    color: rgba(255, 255, 255, .84);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.55;
    margin: 20px 0 0;
    max-width: 740px;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .42);
}

.portal-section {
    margin-top: 14px;
}

.section-heading {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-heading h2,
.access-panel h2 {
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -.04em;
    margin: 4px 0 0;
}

.section-heading > p {
    color: rgba(255, 255, 255, .7);
    margin: 0;
}

.section-kicker {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

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

.card {
    backdrop-filter: blur(12px);
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 25px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    color: var(--white);
    display: block;
    min-height: 220px;
    overflow: hidden;
    padding: 22px 22px 48px;
    position: relative;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.card:hover,
.card:focus-visible {
    background: var(--glass-strong);
    border-color: rgba(201, 164, 92, .72);
    transform: translateY(-5px);
}

.card.featured {
    border-color: rgba(201, 164, 92, .58);
}

.card-top {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
}

.icon,
.access-icon {
    background: rgba(244, 234, 210, .16);
    border-radius: 18px;
    color: var(--beige);
    display: grid;
    font-size: 28px;
    height: 54px;
    place-items: center;
    width: 54px;
}

.card-tag {
    background: rgba(201, 164, 92, .17);
    border: 1px solid rgba(201, 164, 92, .34);
    border-radius: 999px;
    color: #f2d895;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    padding: 6px 9px;
    text-transform: uppercase;
}

.card h3 {
    font-size: 22px;
    letter-spacing: -.03em;
    margin: 17px 0 9px;
}

.card p {
    color: rgba(255, 255, 255, .74);
    line-height: 1.48;
    margin: 0;
}

.arrow {
    bottom: 17px;
    color: var(--gold);
    font-size: 27px;
    font-weight: 900;
    position: absolute;
    right: 20px;
}

.access-panel {
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(5, 20, 25, .55);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: grid;
    gap: 18px;
    grid-template-columns: auto 1fr auto;
    margin-top: 26px;
    padding: 21px;
}

.access-panel p {
    color: rgba(255, 255, 255, .73);
    line-height: 1.5;
    margin: 7px 0 0;
}

.primary-btn {
    background: var(--beige);
    border-radius: 999px;
    color: #102027;
    font-weight: 900;
    padding: 13px 17px;
    text-decoration: none;
    white-space: nowrap;
}

.primary-btn span {
    color: #8a681f;
    margin-left: 6px;
}

.admin-card {
    background: rgba(5, 20, 25, .76);
    min-height: 230px;
}

.login-note {
    bottom: 21px;
    color: #f1d996;
    font-size: 12px;
    font-weight: 900;
    left: 22px;
    position: absolute;
    text-transform: uppercase;
}

.security-note {
    background: rgba(244, 234, 210, .12);
    border: 1px solid rgba(244, 234, 210, .22);
    border-radius: 15px;
    color: rgba(255, 255, 255, .78);
    line-height: 1.5;
    margin-top: 22px;
    padding: 14px 16px;
}

.footer {
    backdrop-filter: blur(10px);
    background: rgba(5, 20, 25, .52);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
    color: rgba(255, 255, 255, .82);
    line-height: 1.7;
    margin-top: 30px;
    padding: 20px;
    text-align: center;
}

.footer a {
    color: var(--beige);
    font-weight: 800;
    text-decoration: none;
}

.footer strong {
    color: var(--beige);
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    body,
    body.admin-portal {
        background-attachment: scroll;
    }

    .page {
        padding-top: 16px;
        width: min(100% - 22px, 1180px);
    }

    .topbar,
    .section-heading {
        align-items: stretch;
        display: flex;
        flex-direction: column;
    }

    .toplinks {
        justify-content: flex-start;
    }

    .hero {
        padding: 43px 5px 27px;
    }

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

    .card {
        min-height: 190px;
    }

    .access-panel {
        grid-template-columns: auto 1fr;
    }

    .access-panel .primary-btn {
        grid-column: 1 / -1;
        text-align: center;
    }
}
