/* Page layout for About and Rules */
.page-body {
    overflow: auto;
    background: var(--bg);
}

.page-body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.page-body:has(.home)::before {
    display: none;
}

.page-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.page-back {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s ease;
}

.page-back:hover {
    color: var(--text);
}

.page-back svg {
    width: 20px;
    height: 20px;
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-logo {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    text-decoration: none;
}

.page-logo:hover {
    color: var(--text);
}

.page-main {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    position: relative;
    z-index: 1;
}

.page-content h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.page-content h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
}

.page-content p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.page-content a {
    color: var(--accent);
    text-decoration: none;
}

.page-content a:hover {
    text-decoration: underline;
}

.page-content ul,
.page-content ol {
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.page-content li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.rules-list li {
    margin-bottom: 16px;
}

.btn-page {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--accent);
    color: white !important;
    border-radius: 12px;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.btn-page:hover {
    background: color-mix(in srgb, var(--accent) 88%, var(--text) 12%);
}

.page-cta {
    margin-top: 40px !important;
}

/* ===== HOME ===== */
.home {
    min-height: 100vh;
    background: var(--bg);
    overflow-x: hidden;
}

.home-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.home-logo {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    text-decoration: none;
}

.home-logo:hover {
    color: var(--text);
}

.home-nav {
    display: flex;
    gap: 32px;
}

.home-nav a {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
}

.home-nav a:hover {
    color: var(--text);
}

/* Hero with particles + waves */
.home-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
    overflow: hidden;
}

/* Floating particles */
.home-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.home-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--text-dim);
    border-radius: 50%;
    opacity: 0.4;
    animation: homeParticleFloat 15s ease-in-out infinite;
}

.home-particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 18s; }
.home-particle:nth-child(2) { left: 25%; top: 60%; animation-delay: -2s; animation-duration: 20s; }
.home-particle:nth-child(3) { left: 40%; top: 15%; animation-delay: -4s; animation-duration: 16s; }
.home-particle:nth-child(4) { left: 55%; top: 75%; animation-delay: -1s; animation-duration: 22s; }
.home-particle:nth-child(5) { left: 70%; top: 30%; animation-delay: -3s; animation-duration: 19s; }
.home-particle:nth-child(6) { left: 85%; top: 50%; animation-delay: -5s; animation-duration: 17s; }
.home-particle:nth-child(7) { left: 15%; top: 80%; animation-delay: -6s; animation-duration: 21s; }
.home-particle:nth-child(8) { left: 90%; top: 25%; animation-delay: -7s; animation-duration: 15s; }
.home-particle:nth-child(9) { left: 5%; top: 45%; animation-delay: -8s; animation-duration: 23s; }
.home-particle:nth-child(10) { left: 50%; top: 10%; animation-delay: -9s; animation-duration: 18s; }
.home-particle:nth-child(11) { left: 30%; top: 85%; animation-delay: -10s; animation-duration: 20s; }
.home-particle:nth-child(12) { left: 75%; top: 5%; animation-delay: -11s; animation-duration: 16s; }
.home-particle:nth-child(13) { left: 20%; top: 35%; animation-delay: -12s; animation-duration: 24s; }
.home-particle:nth-child(14) { left: 60%; top: 55%; animation-delay: -13s; animation-duration: 14s; }
.home-particle:nth-child(15) { left: 95%; top: 70%; animation-delay: -14s; animation-duration: 19s; }
.home-particle:nth-child(16) { left: 35%; top: 40%; animation-delay: -15s; animation-duration: 21s; }
.home-particle:nth-child(17) { left: 80%; top: 90%; animation-delay: -16s; animation-duration: 17s; }
.home-particle:nth-child(18) { left: 45%; top: 65%; animation-delay: -17s; animation-duration: 22s; }
.home-particle:nth-child(19) { left: 65%; top: 20%; animation-delay: -18s; animation-duration: 15s; }
.home-particle:nth-child(20) { left: 8%; top: 55%; animation-delay: -19s; animation-duration: 20s; }

@keyframes homeParticleFloat {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(30px, -40px); }
    50% { transform: translate(-20px, 30px); }
    75% { transform: translate(40px, 20px); }
}

/* Waves */
.home-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 140px;
    z-index: 0;
}

.home-waves svg {
    display: block;
    width: 100%;
    height: 100%;
}

.home-wave {
    fill: var(--surface);
    opacity: 0.5;
}

.home-wave-1 {
    animation: homeWave1 8s ease-in-out infinite;
}

.home-wave-2 {
    opacity: 0.3;
    animation: homeWave2 10s ease-in-out infinite;
}

.home-wave-3 {
    opacity: 0.2;
    animation: homeWave3 12s ease-in-out infinite;
}

@keyframes homeWave1 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-30px); }
}

@keyframes homeWave2 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

@keyframes homeWave3 {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-15px); }
}

.home-hero-content {
    position: relative;
    z-index: 1;
}

.home-hero-h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    color: var(--text);
    margin-bottom: 20px;
}

.home-hero-p {
    font-size: 1.2rem;
    color: var(--text-dim);
    max-width: 400px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.home-btn {
    display: inline-block;
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bg);
    background: var(--text);
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}

.home-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ===== HOME V2 ===== */
.home-next {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    padding: 72px 24px 92px;
}

.home-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 999px;
    filter: blur(88px);
    pointer-events: none;
    z-index: 0;
    transform: translate3d(0, var(--drift, 0px), 0);
    animation: homeGlowPulse 8s ease-in-out infinite;
}

.home-glow-a {
    top: 60px;
    left: -140px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 72%);
}

.home-glow-b {
    top: 420px;
    right: -160px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.18) 0%, transparent 72%);
    animation-delay: -3s;
}

@keyframes homeGlowPulse {
    0%, 100% { opacity: 0.58; }
    50% { opacity: 0.95; }
}

.home-bento,
.home-flow,
.home-seo,
.home-cta-band {
    position: relative;
    z-index: 1;
}

.home-bento {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-flow: row dense;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 44px;
}

.home-tile {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.home-tile:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--text) 16%, var(--border));
    background: color-mix(in srgb, var(--surface-hover) 88%, var(--surface) 12%);
}

.home-tile h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    color: var(--text);
}

.home-tile p {
    margin: 0;
    color: var(--text-dim);
    line-height: 1.7;
    font-size: 0.93rem;
}

.home-tile-main {
    grid-column: span 8;
    background:
        linear-gradient(140deg, rgba(99, 102, 241, 0.18), transparent 54%),
        linear-gradient(330deg, rgba(20, 184, 166, 0.14), transparent 52%),
        color-mix(in srgb, var(--surface) 90%, transparent);
    padding: 32px;
    justify-content: center;
    min-height: 318px;
}

.home-kicker {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--text) 20%, var(--border));
    background: color-mix(in srgb, var(--surface-hover) 86%, var(--surface) 14%);
}

.home-tile-main h2 {
    margin: 0 0 16px;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text);
}

.home-tile-main p {
    margin: 0 0 24px;
    max-width: 540px;
    font-size: 1rem;
}

.home-tile-soft {
    grid-column: span 4;
    justify-content: center;
    min-height: 150px;
}

.home-flow {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding: 34px 30px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    margin-bottom: 30px;
}

.home-flow h2 {
    margin: 0 0 24px;
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    color: var(--text);
}

.home-flow-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 14px;
}

.home-flow-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 72%, var(--surface) 28%);
}

.home-flow-num {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text);
    border: 1px solid var(--border);
}

.home-flow-item h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--text);
}

.home-flow-item p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-dim);
}

.home-seo {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding: 38px 34px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    margin-bottom: 38px;
}

.home-seo h2 {
    margin: 0 0 18px;
    font-size: clamp(1.45rem, 3.1vw, 2.2rem);
    line-height: 1.25;
    color: var(--text);
}

.home-seo p {
    margin: 0 0 14px;
    font-size: 0.96rem;
    line-height: 1.78;
    color: var(--text-dim);
}

.home-seo p:last-child {
    margin-bottom: 0;
}

.home-seo a {
    color: var(--text);
    text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent);
}

.home-seo a:hover {
    text-decoration-color: color-mix(in srgb, var(--text) 72%, transparent);
}

.home-cta-band {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 60px 24px;
    border-radius: 24px;
    border: 1px solid var(--border);
    background:
        radial-gradient(ellipse 65% 60% at 50% 25%, rgba(99, 102, 241, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse 55% 48% at 50% 100%, rgba(20, 184, 166, 0.15) 0%, transparent 74%),
        color-mix(in srgb, var(--surface) 90%, transparent);
}

.home-cta-band-label {
    margin: 0 0 10px;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.home-cta-band h2 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--text);
}

.home-cta-band p {
    margin: 0 auto 28px;
    max-width: 620px;
    font-size: 1rem;
    line-height: 1.62;
    color: var(--text-dim);
}

.home-bottom {
    border-top: 1px solid var(--border);
    padding: 28px 32px;
}

.home-bottom-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.home-bottom-logo {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    text-decoration: none;
}

.home-bottom-logo:hover {
    color: var(--text);
}

.home-bottom-nav {
    display: flex;
    gap: 24px;
}

.home-bottom-nav a {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: none;
}

.home-bottom-nav a:hover {
    color: var(--text);
}

.home-bottom-year {
    font-size: 0.8rem;
    color: var(--text-dim);
    opacity: 0.5;
}

.home-reveal {
    opacity: 0;
    transform: translateY(34px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 920px) {
    .home-tile-main {
        grid-column: span 12;
    }

    .home-tile-soft {
        grid-column: span 6;
    }

    .home-bento {
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .home-tile-soft {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .home-next {
        padding-top: 56px;
    }

    .home-glow {
        width: 280px;
        height: 280px;
        filter: blur(70px);
    }

    .home-flow,
    .home-seo {
        padding: 24px 20px;
    }

    .home-cta-band {
        padding: 44px 18px;
    }
}

@media (max-width: 480px) {
    .home-flow-item {
        grid-template-columns: 1fr;
    }

    .home-flow-num {
        width: 38px;
        height: 38px;
    }

    .home-bottom-inner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .home-bottom-year {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .home-nav {
        display: none;
    }
}

/* 404 page */
.page-404 {
    text-align: center;
}

.error-code {
    font-size: 4rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

/* FAQ */
.faq-item {
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.faq-item summary {
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    transition: background 0.15s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary:hover {
    background: var(--surface-hover);
}

.faq-item[open] summary {
    border-bottom: 1px solid var(--border);
}

.faq-item p {
    margin: 0;
    padding: 16px 20px;
}
