.home-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background: var(--bg);
    color: var(--ink);
    position: relative;
}

.home-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.home-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(240, 244, 248, 0.88) 0%,
        rgba(240, 244, 248, 0.45) 40%,
        rgba(240, 244, 248, 0.78) 100%
    );
    z-index: 2;
    pointer-events: none;
}

.home-grid-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.home-grid-track {
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    pointer-events: auto;
}

.home-grid-block {
    position: absolute;
    display: grid;
    gap: 14px;
    box-sizing: border-box;
    opacity: 0.62;
}

.home-event-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 108px;
    height: 100%;
    padding: 12px 12px 14px;
    border-radius: var(--radius);
    border: 1px solid rgba(28, 45, 74, 0.12);
    text-decoration: none;
    color: var(--course-header-text, #000);
    pointer-events: auto;
    cursor: pointer;
    position: relative;
    z-index: 3;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    overflow: hidden;
    isolation: isolate;
}

.home-event-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

.home-event-card:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 24px rgba(28, 45, 74, 0.22);
    opacity: 1;
    z-index: 4;
    border-bottom: none;
}

.home-card-type,
.home-card-title {
    position: relative;
    z-index: 1;
}

.home-card-type {
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 6px;
    padding: 2px 7px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.12);
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-card-title {
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-foreground {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    pointer-events: none;
}

.home-search-wrap {
    width: min(560px, 100%);
    pointer-events: auto;
}

.home-kicker {
    margin: 0 0 10px;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent2);
}

.home-title {
    margin: 0 0 24px;
    font-family: var(--serif);
    font-size: clamp(28px, 6vw, 44px);
    font-weight: 400;
    line-height: 1.15;
    color: var(--ink);
}

.home-title em {
    font-style: italic;
    color: var(--accent);
}

.home-search-box {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 8px 32px rgba(28, 45, 74, 0.1);
}

.home-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 300;
    color: var(--ink);
    background: var(--surface-solid);
    outline: none;
    transition: border-color 0.2s;
}

.home-search-input:focus {
    border-color: var(--accent2);
}

.home-search-status {
    min-height: 18px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 300;
    color: var(--ink3);
}

.home-search-status.error {
    color: #a33;
}

.home-search-results {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    max-height: min(50vh, 360px);
    overflow-y: auto;
}

.home-search-results:not([hidden]) {
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.home-search-result {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 8px;
    cursor: pointer;
    background: var(--surface);
    transition: border-color 0.15s, background 0.15s;
}

.home-search-result:hover {
    border-color: var(--accent2);
    background: var(--bg2);
}

.home-search-result-title {
    font-family: var(--serif);
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 4px;
}

.home-search-result-meta {
    font-size: 12px;
    font-weight: 300;
    color: var(--ink3);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.home-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 18px;
}

.home-link {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--ink2);
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
}

.home-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.home-page .saved-basket-fab {
    z-index: 20;
}

@media (max-width: 768px) {
    .home-foreground {
        align-items: flex-start;
        padding-top: 12vh;
    }

    .home-event-card {
        min-height: 96px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-grid-track {
        transform: none !important;
    }
}
