/* --- ヒーローセクション --- */
.main-hero {
    min-height: calc(100vh - var(--header-height));
    width: 100%;
}

.hero-content {
    position: relative;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.7)), url("../assets/images/backgrounds/gs_dark.png");
    background-size: cover;
    background-position: center;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 10% 64px;
    box-sizing: border-box;
}

.hero-content h1 {
    font-family: 'Raleway', sans-serif;
    font-size: clamp(2rem, 6vw, 5rem);
    margin: 0 0 10px 0;
    font-weight: 900;
}

.hero-scroll-link {
    position: absolute;
    bottom: 45px;
    left: 50%;
    display: inline-flex;
    align-items: center;
    width: max-content;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    text-decoration: none;
    transform: translateX(-50%);
}

.hero-scroll-window {
    position: relative;
    display: inline-block;
    height: 1.6em;
    overflow: hidden;
    line-height: 1.6;
    transition: width 0.5s ease;
}

.hero-scroll-current,
.hero-scroll-next {
    position: absolute;
    top: 0;
    left: 50%;
    white-space: nowrap;
    transition: transform 0.5s ease;
}

.hero-scroll-current {
    transform: translate(-50%, 0);
}

.hero-scroll-window.is-resetting .hero-scroll-current,
.hero-scroll-window.is-resetting .hero-scroll-next {
    transition: none;
}

.hero-scroll-next {
    transform: translate(-50%, 100%);
}

.hero-scroll-window.is-changing .hero-scroll-current {
    transform: translate(-50%, -100%);
}

.hero-scroll-window.is-changing .hero-scroll-next {
    transform: translate(-50%, 0);
}

.hero-scroll-link:hover {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
}

.hero-scroll-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

.hero-scroll-arrow {
    position: absolute;
    right: calc(100% + 8px);
    display: inline-block;
    opacity: 0.75;
    animation: hero-scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes hero-scroll-bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(4px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-scroll-arrow {
        animation: none;
    }

    .hero-scroll-current,
    .hero-scroll-next {
        transition: none;
    }

    .hero-scroll-window {
        transition: none;
    }
}

.hero-content p {
    font-size: 1.3rem;
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.hero-content .important {
    font-size: 0.875rem;
    margin: 10px 0 0 0;
    padding: 25px 0 0 0;
    color: rgba(255, 255, 255, 0.5);
    max-width: 600px;
}

.hero-content p a {
    margin: 0 0 30px 0;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    text-decoration: underline;
}

.hero-content p a:hover {
    color: #fff;
    text-decoration: underline;
}

/* --- Features セクション --- */
.features-section ul {
    list-style: none;
    padding: 0;
}

.features-section li {
    padding: 10px;
    margin-top: 20px;
    border-left: 4px solid var(--accent-purple);
    transition: transform 0.3s;
}

.feature-description {
    margin: 5px 0 0 0;
    color: #a1a1aa;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 600px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.category-card {
    background: #18181b;
    border: 1px solid #27272a;
    padding: 20px;
}

.category-card h3 {
    margin: 8px 0;
    font-size: 1.2rem;
    color: #fff;
}

.category-card p {
    font-size: 0.9rem;
    color: #a1a1aa;
    margin: 0;
}

/* チャンネル構造 */
.channels-container {
    background: #121214;
    border: none;
}

.channel-group-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 16px;
}

.channel-group {
    margin-bottom: 20px;
}

.channel-group:last-child {
    margin-bottom: 0;
}

.group-label {
    font-size: 0.85rem;
    color: #71717a;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

/* チャンネルリストアイテム */
.channel-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 10px;
    background: #18181b;
    margin-bottom: 5px;
    gap: 10px;
}

.channel-name {
    font-weight: bold;
    color: #e4e4e7;
    font-size: 0.95rem;
    min-width: 140px;
}

.channel-desc {
    font-size: 0.85rem;
    color: #a1a1aa;
    flex: 1;
}

.channel-desc a {
    color: #60a5fa;
    text-decoration: underline;
}

/* --- Works セクション --- */
.works-section > p {
    margin: 0 0 18px;
    color: #a1a1aa;
}

.works-scroll {
    overflow-x: auto;
    padding: 4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.works-scroll::-webkit-scrollbar {
    display: none;
}

.works-scroll:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.works-list {
    display: flex;
    gap: 16px;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
}

.work-card {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #18181b;
    border: 1px solid #34343b;
    scroll-snap-align: start;
}

.work-thumbnail {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-bottom: 1px solid #34343b;
}

.work-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

.work-thumbnail span {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 7px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-family: 'Raleway', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

.work-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px 16px 16px;
}

.work-card h3 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 1.05rem;
}

.work-author {
    margin: -4px 0 8px;
    color: #71717a;
    font-size: 0.8rem;
}

.work-author span {
    color: #c4b5fd;
}

.work-description {
    margin: 0;
    color: #a1a1aa;
    font-size: 0.88rem;
    line-height: 1.7;
}

.work-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
}

.work-card-content .work-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid #6c52ff;
    background: #6c52ff;
    color: #fff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transform: none;
    filter: none;
    box-shadow: none;
    transition: background-color 160ms ease, border-color 160ms ease, filter 160ms ease;
}

.work-card-content .work-link:hover:not(:disabled) {
    border-color: #8b78ff;
    background: #8b78ff;
    color: #fff;
    transform: none;
    filter: none;
    box-shadow: none;
}

.work-card-content .work-link:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}

.work-card-content .work-link-github {
    width: 38px;
    padding: 8px;
}

.work-link-github img {
    display: block;
    width: 18px;
    height: 18px;
}

.work-card-content .work-link-disabled,
.work-card-content .work-link-disabled:disabled {
    border-color: #3f3f46;
    background: #27272a;
    color: #71717a;
    cursor: not-allowed;
}

.works-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 14px;
}

.works-arrow,
.works-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #34343b;
    background: #18181b;
    color: #d4d4d8;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.works-arrow {
    width: 38px;
    height: 34px;
    font-size: 1rem;
}

.works-dots {
    display: flex;
    align-items: center;
    gap: 10px;
}

.works-dot {
    width: 26px;
    height: 30px;
    border-color: transparent;
    background: transparent;
    color: #71717a;
    font-size: 0.8rem;
}

.works-arrow:hover:not(:disabled),
.works-dot:hover {
    border-color: var(--accent-purple);
    background: #27272a;
    color: #fff;
}

.works-arrow:disabled {
    color: #52525b;
    cursor: default;
}

.works-arrow:focus-visible,
.works-dot:focus-visible {
    outline: 2px solid #93c5fd;
    outline-offset: 3px;
}

.works-dot[aria-pressed="true"] {
    color: #a78bfa;
}

@media (min-width: 769px) and (max-width: 939px) {
    .works-scroll {
        overflow: visible;
    }

    .works-list {
        width: 100%;
    }

    .work-card {
        flex: 1 1 0;
        min-width: 0;
    }

    .works-controls {
        display: none;
    }
}

@media (min-width: 940px) {
    .works-scroll {
        margin-right: calc((900px - 100vw) / 2 + 20px);
        overflow: visible;
    }

    .works-list {
        width: 100%;
    }

    .work-card {
        flex: 1 1 0;
        max-width: 420px;
    }

    .works-controls {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 0 6% 48px;
        align-items: center;
        text-align: center;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
        margin-bottom: 12px;
    }

    .hero-content p {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 24px;
        max-width: 100%;
    }

    .hero-content .join-button,
    .hero-content a[href*="discord.gg"]:not(.hero-scroll-link) {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        padding: 14px 20px;
        font-size: 1rem;
        box-sizing: border-box;
    }

    .hero-scroll-link {
        left: 50%;
        white-space: nowrap;
    }

    .work-card {
        flex-basis: min(82vw, 320px);
    }
}
