/* Home screen: keep these styles scoped to the public landing page. */
:root {
    --home-background: #fff;
    --home-blue: #06377f;
    --home-muted: #776c7d;
    --home-accent: #4264e9;
    --home-logo-cyan: #079dd3;
    --home-logo-blue: #2459df;
    --home-logo-purple: #8825e5;
    --home-login-gradient: linear-gradient(105deg, #078fd0 0%, #4c68d6 48%, #a33bd2 100%);
}

* { box-sizing: border-box; }

html { background: var(--home-background); }

body.home-page {
    margin: 0;
    color: var(--home-blue);
    background: var(--home-background);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.35;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.home-decoration {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.home-decoration::before,
.home-decoration::after {
    content: '';
    position: absolute;
    background: var(--home-login-gradient);
    opacity: 0.4;
    border-radius: 50%;
}

.home-decoration::before {
    width: 150px;
    height: 155px;
    left: -100px;
    top: -105px;
    transform: rotate(35deg);
}

.home-decoration::after {
    width: 150px;
    height: 115px;
    right: -105px;
    top: -20px;
    transform: rotate(25deg);
}

.home-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 52px;
}

.home-page .container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.home-page .logo { margin: 0 0 14px; }
.home-page .logo img {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto;
    object-fit: contain;
}

.home-page h1 {
    margin: 0 0 10px;
    color: var(--home-blue);
    font-size: clamp(30px, 9.5vw, 40px);
    line-height: 1.15;
    font-weight: 750;
    letter-spacing: -1px;
}

.home-page .subtitle {
    max-width: 340px;
    margin: 0 auto 18px;
    color: var(--home-muted);
    font-size: 14px;
    line-height: 1.4;
}

.home-page .user-type-selector {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-page .user-type-card {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 12px;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    min-height: 96px;
    padding: 10px;
    border: 1px solid #f7d9c7;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--home-blue);
    text-align: left;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.home-page .user-type-card::after {
    content: '';
    grid-column: 3;
    grid-row: 1 / 3;
    width: 8px;
    height: 8px;
    border-top: 2px solid var(--home-accent);
    border-right: 2px solid var(--home-accent);
    transform: rotate(45deg);
}

.home-page .user-type-icon {
    grid-row: 1 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    color: #1464aa;
    font-size: 38px;
}

.home-page .user-type-icon svg { display: block; }
.home-page .user-type-title {
    align-self: end;
    margin-bottom: 4px;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 750;
}
.home-page .user-type-desc {
    align-self: start;
    color: var(--home-muted);
    font-size: 11px;
    line-height: 1.3;
}

.home-page .user-type-card:hover {
    background: #fff;
    border-color: #a89bdc;
    transform: translateY(-2px);
    box-shadow: 0 5px 16px #4936830d;
}

.home-page .login-section { margin-top: 22px; padding: 0 3px; }
.home-page .login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    border-radius: 30px;
    color: #fff;
    background: var(--home-login-gradient);
    box-shadow: 0 4px 9px #9252b52b;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.home-page .login-btn svg { width: 19px; height: 19px; }
.home-page .login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px #9252b540; }
.home-page .login-btn:active,
.home-page .user-type-card:active { transform: scale(0.98); }
.home-page a:focus-visible { outline: 3px solid var(--home-accent); outline-offset: 4px; }

.home-page .features { margin-top: 12px; }

/* Invisible square access, still available to touch, keyboard and screen readers. */
.home-page #admin-access {
    position: fixed;
    top: calc(30px + env(safe-area-inset-top, 0px));
    right: calc(20px + env(safe-area-inset-right, 0px));
    z-index: 10;
    width: 10px;
    height: 10px;
    opacity: 0;
}
.home-page #admin-access a {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    touch-action: manipulation;
}

/* The shared mobile script adds a fixed slogan footer on every page. */
.home-page > .mobile-nav { display: none; }
.home-page .feature {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    color: #315ed1;
    font-size: 12px;
    font-weight: 550;
}

.home-page .additional-features {
    width: auto;
    margin: 16px 0;
    padding: 0;
    display: grid;
    gap: 0;
}

@media (min-width: 600px) {
    .home-page .container { padding-top: 36px; padding-bottom: 64px; }
    .home-page .logo img { width: 88px; height: 88px; }
    .home-page .subtitle { font-size: 16px; margin-bottom: 26px; }
    .home-page .user-type-card { min-height: 112px; padding: 16px; column-gap: 18px; }
    .home-page .user-type-title { font-size: 19px; }
    .home-page .user-type-desc { font-size: 13px; }
    .home-page .login-btn { min-height: 54px; font-size: 17px; }
    .home-page .feature { font-size: 14px; }
    .home-wave { height: 100px; }
}

@media (prefers-reduced-motion: reduce) {
    .home-page .user-type-card,
    .home-page .login-btn { transition: none; }
}
