.home-page {
    width: 100%;
    padding-bottom: 20px;
}

.home-shell {
    width: min(1180px, calc(100% - 24px));
    margin: 0 auto 28px;
    display: grid;
    gap: 18px;
}

.home-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01)),
        var(--secondary-bg-color);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(6px);
}

.home-card::before {
    display: none;
}

body.light-mode .home-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-welcome {
    display: grid;
    gap: 22px;
    padding: 28px 24px;
    justify-items: center;
    align-items: start;
    text-align: center;
    background: var(--secondary-bg-color);
}

body.light-mode .home-welcome {
    background: #ffffff;
}

.home-welcome::before {
    display: none;
}

.home-welcome-header {
    width: 100%;
    max-width: 1200px;
    display: grid;
    gap: 8px;
    justify-items: center;
    text-align: center;
}

.home-title {
    margin: 0;
    max-width: 24ch;
    font-size: clamp(2rem, 4.8vw, 3.2rem);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: -0.02em;
    color: var(--accent-color);
    text-align: center;
    text-wrap: balance;
}

.home-welcome-side {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    justify-content: center;
    align-items: stretch;
}

.home-note-card {
    min-height: 190px;
    padding: 18px;
    border-radius: 16px;
    display: grid;
    gap: 10px;
    align-content: start;
    justify-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.home-note-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.14);
}

body.light-mode .home-note-card {
    background: rgba(0, 0, 0, 0.025);
    border-color: rgba(0, 0, 0, 0.08);
}

.home-note-card-accent {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

body.light-mode .home-note-card-accent {
    background: rgba(0, 0, 0, 0.035);
    border-color: rgba(0, 0, 0, 0.08);
}

.home-note-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 0 auto;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(233, 166, 36, 0.14);
    color: var(--accent-color);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.home-note-card h2 {
    margin: 0;
    max-width: 22ch;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
}

.home-note-card p {
    margin: 0;
    max-width: 30ch;
    color: var(--text-muted-color);
    font-size: 0.94rem;
    line-height: 1.6;
    text-align: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    color: var(--text-color);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.18s ease, background 0.18s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

body.light-mode .btn-secondary {
    border-color: rgba(0, 0, 0, 0.12);
}

.home-section {
    display: grid;
    gap: 14px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.section-head h2 {
    margin: 4px 0 0;
    color: var(--text-color);
    font-size: clamp(1.18rem, 2.5vw, 1.85rem);
    line-height: 1.15;
}

.section-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

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

.section-head-slider {
    align-items: center;
}

.home-slider-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.home-slider-button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.home-slider-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.07);
}

.home-slider-button:disabled {
    opacity: 0.45;
    cursor: default;
}

body.light-mode .home-slider-button {
    border-color: rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
}

.home-slider-shell {
    padding: 18px;
}

.home-slider-viewport {
    overflow: hidden;
    width: 100%;
    touch-action: pan-y;
}

.home-slider-track {
    display: flex;
    gap: 16px;
    transition: transform 0.45s ease;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
}

.home-slide-card {
    flex: 0 0 calc((100% - 32px) / 3);
    min-width: calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
    text-decoration: none;
    color: inherit;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01)),
        rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.home-slide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.22);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012)),
        rgba(255, 255, 255, 0.035);
}

body.light-mode .home-slide-card {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.home-slide-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.home-slide-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: rgba(0, 0, 0, 0.08);
}

.home-slide-body {
    padding: 14px;
    display: grid;
    gap: 8px;
}

.home-slide-title {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.25;
    font-weight: 800;
}

.home-slide-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.home-slide-time {
    color: var(--text-muted-color);
    font-size: 0.9rem;
}

.home-slide-weight {
    color: var(--accent-color);
    font-weight: 900;
    font-size: 0.96rem;
}

.home-slide-empty {
    width: 100%;
    padding: 28px 18px;
    border-radius: 16px;
    text-align: center;
    color: var(--text-muted-color);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

body.light-mode .home-slide-empty {
    border-color: rgba(0, 0, 0, 0.12);
}

.home-slider-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    min-height: 14px;
}

.home-slider-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease;
}

.home-slider-dot.is-active {
    background: var(--accent-color);
    transform: scale(1.12);
}

body.light-mode .home-slider-dot {
    background: rgba(0, 0, 0, 0.16);
}

.home-main-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.home-nav-card {
    text-decoration: none;
    color: inherit;
    padding: 18px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-height: 108px;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.home-nav-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.18);
}

.home-nav-card-primary {
    border-color: rgba(255, 255, 255, 0.08);
}

.home-nav-card-primary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.home-nav-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

body.light-mode .home-nav-icon {
    background: rgba(0, 0, 0, 0.04);
}

.home-nav-icon>img.info-card-icon {
    width: auto !important;
    height: auto !important;
    max-width: 34px !important;
    max-height: 34px !important;
    object-fit: contain;
    display: block;
}

.home-nav-content {
    min-width: 0;
}

.home-nav-content h3,
.home-info-card h3 {
    margin: 0 0 6px;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.2;
}

.home-nav-content p,
.home-info-card p {
    margin: 0;
    color: var(--text-muted-color);
    line-height: 1.5;
    font-size: 0.94rem;
}

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

.home-info-card {
    text-decoration: none;
    color: inherit;
    padding: 18px;
    min-height: 120px;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.home-info-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.035);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.home-card.is-pressed,
.home-slide-card.is-pressed {
    transform: scale(0.985);
}

@media (max-width: 1080px) {
    .home-welcome-side {
        grid-template-columns: 1fr;
        max-width: 720px;
    }

    .home-note-card {
        min-height: 0;
    }

    .home-main-grid,
    .home-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-slide-card {
        flex: 0 0 calc((100% - 16px) / 2);
        min-width: calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
    }
}

@media (max-width: 720px) {
    .home-page {
        padding-bottom: 12px;
    }

    .home-shell {
        width: min(100%, calc(100% - 14px));
        gap: 14px;
        margin-bottom: 18px;
    }

    .home-card {
        border-radius: 16px;
    }

    .home-welcome {
        padding: 18px 16px;
        gap: 16px;
    }

    .home-title {
        max-width: none;
        font-size: clamp(1.7rem, 8vw, 2.3rem);
    }

    .home-welcome-side {
        gap: 12px;
    }

    .home-note-card {
        padding: 15px;
        border-radius: 14px;
    }

    .home-note-card h2 {
        font-size: 0.98rem;
    }

    .home-note-card p {
        font-size: 0.91rem;
    }

    .section-head,
    .section-head-slider {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .section-head h2 {
        font-size: 1.35rem;
    }

    .home-slider-controls {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .home-slider-shell {
        padding: 14px;
    }

    .home-main-grid,
    .home-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .home-nav-card {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px;
        padding: 15px;
        min-height: 88px;
    }

    .home-nav-icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .home-nav-icon>img.info-card-icon {
        max-width: 28px !important;
        max-height: 28px !important;
    }

    .home-nav-content h3,
    .home-info-card h3 {
        font-size: 0.98rem;
    }

    .home-nav-content p,
    .home-info-card p {
        font-size: 0.9rem;
    }

    .home-slider-track {
        gap: 12px;
    }

    .home-slide-card {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
        border-radius: 16px;
    }

    .home-info-card {
        padding: 15px;
        min-height: 96px;
    }

    .home-slider-button {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 420px) {
    .home-shell {
        width: min(100%, calc(100% - 10px));
    }

    .home-welcome {
        padding: 14px;
    }

    .home-title {
        font-size: 1.45rem;
    }

    .home-nav-card,
    .home-info-card {
        padding: 14px;
    }

    .home-nav-card {
        grid-template-columns: 44px minmax(0, 1fr);
    }

    .home-nav-icon {
        width: 44px;
        height: 44px;
    }

    .home-nav-icon>img.info-card-icon {
        max-width: 24px !important;
        max-height: 24px !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .btn-secondary,
    .home-nav-card,
    .home-info-card,
    .home-slide-card,
    .home-slider-button,
    .home-slider-dot,
    .home-slider-track,
    .home-note-card,
    [data-reveal] {
        transition: none;
        animation: none;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}