:root {
    --color-bg: #08090d;
    --color-bg-soft: #101116;
    --color-panel: rgba(18, 19, 25, 0.72);
    --color-panel-strong: rgba(24, 25, 32, 0.9);
    --color-border: rgba(255, 255, 255, 0.12);
    --color-text: #f7f4ef;
    --color-muted: #b9b2a8;
    --color-orange: #ff9f2f;
    --color-dango: #f6d36f;
    --color-matcha: #7ee7f2;
    --color-sakura: #ff7aa8;
    --color-cyan: #7ee7f2;
    --shadow-glow: 0 0 28px rgba(255, 159, 47, 0.34);
    --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.3);
    --container: 1180px;
    --header-height: 82px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    font-family: "Noto Sans JP", system-ui, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

body.is-loading {
    overflow: hidden;
}

body.nav-open {
    overflow: hidden;
}

img,
video,
canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

.sr-only,
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    z-index: 2000;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    padding: 12px 16px;
    clip: auto;
    border-radius: 8px;
    background: #fff;
    color: #111;
}

/* Loading */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 159, 47, 0.2), transparent 34%),
        linear-gradient(145deg, #050506 0%, #11131a 52%, #050506 100%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-screen__inner {
    display: grid;
    justify-items: center;
    gap: 16px;
}

.loading-screen__mark {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loading-screen__mark span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    box-shadow: 0 0 24px currentColor;
    animation: dangoBounce 1s ease-in-out infinite;
}

.loading-screen__mark span:nth-child(1) {
    color: var(--color-sakura);
    background: var(--color-cyan);
}

.loading-screen__mark span:nth-child(2) {
    color: var(--color-text);
    background: var(--color-text);
    animation-delay: 0.12s;
}

.loading-screen__mark span:nth-child(3) {
    color: var(--color-matcha);
    background: var(--color-matcha);
    animation-delay: 0.24s;
}

.loading-screen__logo {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
}

.loading-screen__text {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.86rem;
    text-transform: uppercase;
}

@keyframes dangoBounce {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Background */
.site-background {
    position: fixed;
    inset: 0;
    z-index: -10;
    overflow: hidden;
    background:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        radial-gradient(circle at 22% 16%, rgba(255, 159, 47, 0.2), transparent 30%),
        radial-gradient(circle at 78% 32%, rgba(255, 159, 190, 0.14), transparent 34%),
        #08090d;
    background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

.site-background__image {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background:
        linear-gradient(135deg, transparent 0 24%, rgba(255, 159, 47, 0.22) 24% 25%, transparent 25% 100%),
        linear-gradient(45deg, transparent 0 42%, rgba(126, 231, 242, 0.12) 42% 43%, transparent 43% 100%);
    transform: scale(1.06);
}

.particle-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.site-background__glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    filter: blur(72px);
    opacity: 0.26;
    animation: floatGlow 14s ease-in-out infinite alternate;
}

.site-background__glow--orange {
    left: 4%;
    bottom: 10%;
    background: var(--color-orange);
}

.site-background__glow--sakura {
    top: 18%;
    right: 2%;
    background: var(--color-sakura);
    animation-delay: -5s;
}

@keyframes floatGlow {
    to {
        transform: translate3d(40px, -32px, 0) scale(1.08);
    }
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    background: rgba(8, 9, 13, 0.82);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.site-header__inner {
    width: min(100% - 40px, var(--container));
    min-height: var(--header-height);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
}

.site-logo__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-glow);
}

.site-logo__text {
    font-size: 1.16rem;
}

.global-nav__list {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.global-nav__link {
    display: block;
    padding: 10px 13px;
    border-radius: 8px;
    color: rgba(247, 244, 239, 0.78);
    font-size: 0.92rem;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.global-nav__link:hover,
.global-nav__link:focus-visible,
.global-nav__link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
}

.nav-toggle__line {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle__line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Shared sections */
.section {
    width: min(100% - 40px, var(--container));
    margin: 0 auto;
    padding: 96px 0;
}

.section__header {
    max-width: 740px;
    margin-bottom: 42px;
}

.section-kicker {
    margin: 0 0 14px;
    color: var(--color-orange);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.section-title {
    margin: 0;
    font-size: 2.55rem;
    line-height: 1.22;
}

.section-description {
    margin: 18px 0 0;
    max-width: 680px;
    color: var(--color-muted);
    line-height: 1.9;
}

.section--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
    align-items: center;
    gap: 48px;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Hero */
.hero-section {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: calc(var(--header-height) + 64px) 20px 92px;
    overflow: hidden;
}

.hero-section__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(135deg, rgba(255, 159, 47, 0.22), transparent 28%),
        linear-gradient(225deg, rgba(255, 159, 190, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(8, 9, 13, 0.1), #08090d 92%),
        url("assets/hero-dangosmp.jpg") center / cover;
}

.hero-section__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.38;
    filter: saturate(1.06) contrast(1.08);
}

.hero-section__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 159, 47, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(8, 9, 13, 0.18), #08090d 96%);
}

.hero-section__content {
    width: min(100%, 900px);
    text-align: center;
}

.hero-section__title {
    margin: 0;
    font-size: 5rem;
    line-height: 1;
    font-weight: 900;
    text-shadow:
        0 0 20px rgba(255, 159, 47, 0.62),
        0 0 52px rgba(126, 231, 242, 0.2);
}

.hero-section__lead {
    margin: 22px 0 0;
    color: rgba(247, 244, 239, 0.9);
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 36px;
}

.button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button--primary {
    color: #17100a;
    background: linear-gradient(135deg, var(--color-dango), var(--color-orange) 52%, var(--color-sakura));
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 0 32px rgba(255, 159, 47, 0.44);
}

.button--ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.button__shine {
    position: absolute;
    inset: -40% auto -40% -35%;
    width: 30%;
    transform: rotate(18deg);
    background: rgba(255, 255, 255, 0.46);
    filter: blur(8px);
    animation: buttonShine 3.2s ease-in-out infinite;
}

@keyframes buttonShine {
    0%,
    38% {
        left: -35%;
    }
    100% {
        left: 120%;
    }
}

.server-panel {
    width: min(100%, 640px);
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 12px;
}

.server-panel__ip,
.server-panel__status {
    min-height: 86px;
    padding: 16px 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(14, 15, 20, 0.72);
    color: #fff;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-card);
}

.server-panel__ip {
    cursor: pointer;
    text-align: left;
}

.server-panel__label,
.server-panel__hint {
    display: block;
    color: var(--color-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.server-panel__value {
    display: block;
    margin: 5px 0;
    color: #fff;
    font-size: 1.35rem;
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    display: grid;
    justify-items: center;
    gap: 8px;
    transform: translateX(-50%);
    color: rgba(247, 244, 239, 0.72);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.scroll-cue__arrow {
    width: 16px;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
}

.scroll-cue__arrow::after {
    content: "";
    display: block;
    width: 4px;
    height: 4px;
    margin: 6px auto 0;
    border-radius: 50%;
    background: var(--color-orange);
    animation: scrollDot 1.5s ease-in-out infinite;
}

@keyframes scrollDot {
    to {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* Cards */
.feature-grid,
.stats-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-card,
.stat-card,
.news-card__link,
.world-card {
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
}

.feature-card {
    min-height: 224px;
    padding: 28px;
    overflow: hidden;
}

.feature-card::before,
.stat-card::before,
.news-card__link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 159, 47, 0.18), transparent 42%, rgba(255, 159, 190, 0.12));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.feature-card:hover::before,
.stat-card:hover::before,
.news-card__link:hover::before {
    opacity: 1;
}

.feature-card:hover,
.stat-card:hover,
.news-card__link:hover {
    border-color: rgba(255, 159, 47, 0.42);
}

.feature-card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.45rem;
}

.feature-card__title {
    position: relative;
    margin: 0 0 12px;
    font-size: 1.2rem;
}

.feature-card__text {
    position: relative;
    margin: 0;
    color: var(--color-muted);
    line-height: 1.8;
}

/* About */
.about-section__content p {
    color: var(--color-muted);
    line-height: 1.95;
}

.about-list {
    display: grid;
    gap: 12px;
    padding: 0;
    margin: 28px 0 0;
    list-style: none;
}

.about-list li {
    position: relative;
    padding-left: 28px;
    color: rgba(247, 244, 239, 0.9);
}

.about-list li::before {
    content: "";
    position: absolute;
    top: 0.58em;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-orange);
    box-shadow: 0 0 18px var(--color-orange);
}

.world-card {
    overflow: hidden;
    aspect-ratio: 16 / 12;
}

.world-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background:
        linear-gradient(135deg, rgba(255, 159, 47, 0.25), transparent),
        linear-gradient(45deg, #191b23, #302531);
}

.world-card__badge {
    position: absolute;
    right: 18px;
    bottom: 18px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: rgba(8, 9, 13, 0.72);
    color: #fff;
    font-weight: 900;
    backdrop-filter: blur(12px);
}

/* Statistics */
.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
    min-height: 164px;
    padding: 26px;
}

.stat-card__label,
.stat-card__note {
    position: relative;
    display: block;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-card__value {
    position: relative;
    display: block;
    margin: 12px 0;
    color: var(--color-dango);
    font-size: 2rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.gallery-item {
    position: relative;
    min-height: 250px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-bg-soft);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: saturate(1.16);
}

.gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72));
}

.gallery-item__caption {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1;
    color: #fff;
    font-weight: 900;
    text-align: left;
}

/* News and CTA */
.news-card {
    min-height: 100%;
}

.news-card__link {
    display: block;
    min-height: 260px;
    padding: 26px;
}

.news-card__category,
.news-card__date,
.news-card__title,
.news-card__text {
    position: relative;
}

.news-card__category {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 159, 47, 0.14);
    color: var(--color-dango);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.news-card__date {
    display: block;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.news-card__title {
    margin: 12px 0;
    font-size: 1.18rem;
    line-height: 1.55;
}

.news-card__text {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.8;
}

.discord-cta {
    width: min(100% - 40px, var(--container));
}

.discord-cta__inner {
    padding: 64px;
    border: 1px solid rgba(255, 159, 47, 0.28);
    border-radius: 8px;
    background:
        radial-gradient(circle at 12% 24%, rgba(255, 159, 47, 0.28), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(255, 159, 190, 0.18), transparent 34%),
        rgba(18, 19, 25, 0.78);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
    text-align: center;
}

.discord-cta__title {
    margin: 0;
    font-size: 2.4rem;
}

.discord-cta__text {
    max-width: 680px;
    margin: 18px auto 28px;
    color: var(--color-muted);
    line-height: 1.9;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--color-border);
    background: rgba(5, 6, 8, 0.72);
}

.site-footer__inner {
    width: min(100% - 40px, var(--container));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;
}

.footer-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-nav a {
    color: var(--color-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
    color: #fff;
}

.site-footer__copyright {
    margin: 0;
    color: var(--color-muted);
}

/* Gallery modal */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: grid;
    place-items: center;
    padding: 28px;
    background: rgba(0, 0, 0, 0.84);
    backdrop-filter: blur(10px);
}

.gallery-modal[hidden] {
    display: none;
}

.gallery-modal__image {
    max-width: min(100%, 1080px);
    max-height: 82vh;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.62);
}

.gallery-modal__close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.7rem;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 980px) {
    .nav-toggle {
        display: block;
    }

    .global-nav {
        position: fixed;
        top: var(--header-height);
        left: 20px;
        right: 20px;
        padding: 18px;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: rgba(8, 9, 13, 0.94);
        box-shadow: var(--shadow-card);
        backdrop-filter: blur(18px);
        transform: translateY(-16px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    }

    .global-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .global-nav__list {
        display: grid;
        gap: 4px;
    }

    .global-nav__link {
        padding: 14px;
    }

    .section--split,
    .feature-grid,
    .news-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-title {
        font-size: 2.15rem;
    }

    .hero-section__title {
        font-size: 4rem;
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 72px;
    }

    .site-header__inner,
    .section,
    .discord-cta,
    .site-footer__inner {
        width: min(100% - 28px, var(--container));
    }

    .site-logo__icon {
        width: 38px;
        height: 38px;
    }

    .hero-section {
        padding-top: calc(var(--header-height) + 48px);
    }

    .hero-section__title {
        font-size: 3.1rem;
    }

    .hero-section__lead {
        font-size: 1.08rem;
    }

    .hero-actions,
    .server-panel {
        display: grid;
        grid-template-columns: 1fr;
    }

    .button,
    .server-panel__ip,
    .server-panel__status {
        width: 100%;
    }

    .section {
        padding: 82px 0;
    }

    .section-title,
    .discord-cta__title {
        font-size: 1.75rem;
    }

    .section--split,
    .feature-grid,
    .stats-grid,
    .gallery-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .feature-card,
    .stat-card,
    .news-card__link {
        min-height: auto;
        padding: 22px;
    }

    .gallery-item,
    .gallery-item img {
        min-height: 220px;
    }

    .discord-cta__inner {
        padding: 38px 20px;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .footer-nav {
        justify-content: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}
