/* ==========================================================================
   神奈川県サッカー協会 第1種社会人部会 - メインスタイルシート
   ========================================================================== */

/* ── CSS変数（Customizerで上書き可能） ── */
:root {
    --blue-deep:    #0a1628;
    --blue-mid:     #0d3a6e;
    --blue-bright:  #1565c0;
    --blue-accent:  #2196f3;
    --green-main:   #00c853;
    --green-light:  #69f0ae;
    --white:        #ffffff;
    --gray-mid:     #b0bec5;
    --text-main:    #e8edf3;
    --text-sub:     #90a4ae;

    /* Customizerから注入されるCSS変数にフォールバック */
    --color-primary: var(--blue-bright);
    --color-accent:  var(--green-main);
    --color-bg:      var(--blue-deep);
    --color-text:    var(--text-main);
}

/* ── リセット ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN',
                 'Yu Gothic', 'Meiryo', sans-serif;
    background: var(--color-bg, var(--blue-deep));
    color: var(--color-text, var(--text-main));
    overflow-x: hidden;
}

/* グリッド背景 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 80px),
        repeating-linear-gradient(0deg,  rgba(255,255,255,0.015) 0 1px, transparent 1px 80px);
    pointer-events: none;
    z-index: 0;
}

/* ── ナビゲーション ── */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10,22,40,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.nav-emblem {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--blue-bright), var(--green-main));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.nav-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.04em;
}

.nav-title span {
    display: block;
    font-size: 10px;
    font-weight: 300;
    color: var(--color-accent, var(--green-main));
    letter-spacing: 0.12em;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub);
    text-decoration: none;
    letter-spacing: 0.06em;
    transition: color 0.2s;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--color-accent, var(--green-main));
    transition: width 0.25s;
}

.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    background: var(--color-accent, var(--green-main)) !important;
    color: var(--blue-deep) !important;
    font-weight: 700 !important;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 12px !important;
    letter-spacing: 0.08em !important;
    transition: opacity 0.2s, transform 0.2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { opacity: 0.85 !important; transform: translateY(-1px); }

/* ── ハンバーガーボタン ── */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px; height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.nav-hamburger span {
    display: block;
    width: 100%; height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── モバイルドロワー ── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(10,22,40,0.98);
    backdrop-filter: blur(16px);
    z-index: 99;
    flex-direction: column;
    padding: 32px 28px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}

.mobile-menu.open { transform: translateX(0); }

.mobile-menu a {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    letter-spacing: 0.04em;
    transition: color 0.2s, padding-left 0.2s;
}

.mobile-menu a:hover { color: var(--color-accent, var(--green-main)); padding-left: 8px; }

.mobile-menu .mobile-cta {
    margin-top: 28px;
    background: var(--color-accent, var(--green-main));
    color: var(--blue-deep) !important;
    border-radius: 8px;
    text-align: center;
    padding: 16px !important;
    border-bottom: none !important;
    font-size: 16px !important;
}

/* ── ヒーロー ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 50%, rgba(21,101,192,0.25) 0%, transparent 65%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(0,200,83,0.12) 0%, transparent 60%),
        linear-gradient(160deg, #0a1628 0%, #0d1e35 60%, #0a1628 100%);
}

.hero-ball {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    width: 600px; height: 600px;
    opacity: 0.06;
    animation: rotate-slow 30s linear infinite;
}

@keyframes rotate-slow {
    from { transform: translateY(-50%) rotate(0deg); }
    to   { transform: translateY(-50%) rotate(360deg); }
}

.hero-field {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 200px;
    overflow: hidden;
    opacity: 0.08;
}
.hero-field::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px; height: 200px;
    border: 2px solid white;
    border-bottom: none;
    border-radius: 200px 200px 0 0;
}
.hero-field::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px; height: 180px;
    background: white;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 120px 80px 80px;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,200,83,0.15);
    border: 1px solid rgba(0,200,83,0.4);
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--color-accent, var(--green-main));
    margin-bottom: 28px;
    animation: fade-up 0.6s ease both;
}

.hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--color-accent, var(--green-main));
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.3); }
}

.hero-en {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(14px, 2vw, 18px);
    letter-spacing: 0.3em;
    color: var(--blue-accent);
    display: block;
    margin-bottom: 8px;
    animation: fade-up 0.7s 0.1s ease both;
}

.hero-title {
    font-size: clamp(36px, 5.5vw, 68px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
    animation: fade-up 0.7s 0.15s ease both;
}

.hero-title .accent { color: var(--color-accent, var(--green-main)); }

.hero-desc {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-sub);
    max-width: 480px;
    margin-bottom: 48px;
    animation: fade-up 0.7s 0.25s ease both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    animation: fade-up 0.7s 0.3s ease both;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── ボタン ── */
.btn-primary {
    background: linear-gradient(135deg, var(--color-accent, var(--green-main)), #00b248);
    color: var(--blue-deep);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
    padding: 14px 36px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 24px rgba(0,200,83,0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,200,83,0.45);
}

.btn-secondary {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-main);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.08em;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.3);
}

/* ── 統計バー ── */
.stats-bar {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.04);
    border-top: 1px solid rgba(255,255,255,0.07);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 28px 80px;
    display: flex;
    justify-content: center;
}

.stat-item {
    flex: 1;
    max-width: 200px;
    text-align: center;
    padding: 0 32px;
    border-right: 1px solid rgba(255,255,255,0.08);
}
.stat-item:last-child { border-right: none; }

.stat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 44px;
    color: var(--color-accent, var(--green-main));
    line-height: 1;
    letter-spacing: 0.04em;
}
.stat-num span { font-size: 24px; color: var(--green-light); }
.stat-label { font-size: 11px; font-weight: 500; color: var(--text-sub); letter-spacing: 0.1em; margin-top: 6px; }

/* ── セクション共通 ── */
.section {
    position: relative;
    z-index: 2;
    padding: 80px 80px;
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-accent, var(--green-main));
    text-transform: uppercase;
    margin-bottom: 6px;
}

.section-title { font-size: 32px; font-weight: 900; letter-spacing: -0.01em; }

.section-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--blue-accent);
    text-decoration: none;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(33,150,243,0.4);
    transition: gap 0.2s;
}
.section-link:hover { gap: 10px; }

/* ── ニュースリスト ── */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
}

.news-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 28px;
    background: rgba(13,26,48,0.6);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.news-item:hover { background: rgba(21,101,192,0.2); }

.news-date {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 16px;
    letter-spacing: 0.08em;
    color: var(--text-sub);
    min-width: 90px;
}

.news-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    border-radius: 3px;
    min-width: 80px;
    text-align: center;
    text-transform: uppercase;
}

.tag-news         { background: rgba(33,150,243,0.2);  color: #64b5f6; border: 1px solid rgba(33,150,243,0.3); }
.tag-tournament   { background: rgba(0,200,83,0.15);   color: #69f0ae; border: 1px solid rgba(0,200,83,0.3); }
.tag-registration { background: rgba(255,152,0,0.15);  color: #ffcc02; border: 1px solid rgba(255,152,0,0.3); }
.tag-important    { background: rgba(244,67,54,0.15);  color: #ef9a9a; border: 1px solid rgba(244,67,54,0.3); }

.news-text  { font-size: 14px; flex: 1; color: var(--text-main); }
.news-arrow { color: var(--text-sub); font-size: 16px; transition: transform 0.2s, color 0.2s; }
.news-item:hover .news-arrow { transform: translateX(4px); color: var(--color-accent, var(--green-main)); }

/* ── カードグリッド ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 32px;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-bright), var(--color-accent, var(--green-main)));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,0.4); border-color: rgba(33,150,243,0.3); }
.card:hover::before { transform: scaleX(1); }

.card-icon   { font-size: 36px; margin-bottom: 20px; display: block; }
.card-title  { font-size: 18px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.card-desc   { font-size: 13px; color: var(--text-sub); line-height: 1.7; }
.card-action { margin-top: 24px; font-size: 12px; font-weight: 600; color: var(--blue-accent); letter-spacing: 0.08em; display: flex; align-items: center; gap: 6px; }

/* ── リーグ順位表 ── */
.league-preview {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    overflow: hidden;
}

.league-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: rgba(21,101,192,0.15);
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.league-name {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.league-tag {
    font-size: 10px;
    background: var(--blue-accent);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 560px; }

table { width: 100%; border-collapse: collapse; }

thead th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-sub);
    text-transform: uppercase;
    padding: 12px 16px;
    text-align: center;
    background: rgba(0,0,0,0.2);
}
thead th:first-child { text-align: left; padding-left: 28px; }

tbody tr { border-top: 1px solid rgba(255,255,255,0.05); transition: background 0.15s; }
tbody tr:hover { background: rgba(255,255,255,0.04); }

tbody td { padding: 14px 16px; font-size: 14px; text-align: center; color: var(--text-sub); }
tbody td:first-child { text-align: left; padding-left: 28px; display: flex; align-items: center; gap: 12px; }

.rank { font-family: 'Bebas Neue', sans-serif; font-size: 20px; min-width: 28px; color: var(--text-sub); }
.rank-1 { color: #ffd700; }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }
.team-name { font-weight: 600; color: var(--text-main); font-size: 14px; }
.pts { font-weight: 700; color: var(--white); }

/* ── フッター ── */
.site-footer {
    position: relative;
    z-index: 2;
    background: rgba(0,0,0,0.4);
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner { padding: 48px 80px 32px; }

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p { font-size: 13px; color: var(--text-sub); line-height: 1.8; margin-top: 16px; }

.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-accent, var(--green-main));
    margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a  { font-size: 13px; color: var(--text-sub); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 12px;
    color: var(--text-sub);
}

.footer-badge { color: var(--color-accent, var(--green-main)); font-weight: 600; }

/* ── スクロールリビール ── */
.reveal { opacity: 1; transform: none; transition: opacity 0.7s ease, transform 0.7s ease; }

body.js-loaded .reveal            { opacity: 0; transform: translateY(30px); }
body.js-loaded .reveal.visible    { opacity: 1; transform: translateY(0); }

/* ── ページネーション ── */
.nav-links a, .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px; height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-sub);
    transition: background 0.2s, color 0.2s;
    margin: 0 3px;
}
.page-numbers.current { background: var(--color-accent, var(--green-main)); color: var(--blue-deep); border-color: transparent; }
.nav-links a:hover, .page-numbers:hover:not(.current) { background: rgba(255,255,255,0.12); color: var(--white); }

/* ── entry-content ── */
.entry-content h2 { font-size: 22px; font-weight: 700; margin: 40px 0 16px; color: var(--text-main); }
.entry-content h3 { font-size: 18px; font-weight: 700; margin: 32px 0 12px; color: var(--text-main); }
.entry-content p  { margin-bottom: 20px; }
.entry-content ul, .entry-content ol { padding-left: 24px; margin-bottom: 20px; }
.entry-content li { margin-bottom: 8px; }
.entry-content a  { color: var(--blue-accent); }
.entry-content a:hover { text-decoration: underline; }

/* ── page-main ── */
.page-main { min-height: 100vh; }
.page-hero  { position: relative; z-index: 1; }

/* ==========================================================================
   レスポンシブ
   ========================================================================== */

/* タブレット */
@media (max-width: 900px) {
    .nav-inner { padding: 0 20px; }
    .nav-links  { display: none; }
    .nav-hamburger { display: flex; }
    .mobile-menu   { display: flex; }

    .hero-content { padding: 100px 24px 60px; }
    .hero-ball    { width: 350px; height: 350px; right: -80px; }

    .stats-bar { padding: 24px 16px; flex-wrap: wrap; justify-content: center; }
    .stat-item {
        flex: 1 1 50%; max-width: none;
        padding: 16px 12px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .stat-item:nth-child(1),
    .stat-item:nth-child(3) { border-right: 1px solid rgba(255,255,255,0.08); }
    .stat-item:nth-child(3),
    .stat-item:nth-child(4) { border-bottom: none; }

    .section      { padding: 48px 24px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .cards-grid   { grid-template-columns: 1fr 1fr; gap: 14px; }

    .news-item  { flex-wrap: wrap; gap: 8px; padding: 16px; }
    .news-date  { min-width: auto; }
    .news-text  { width: 100%; order: 3; font-size: 13px; }
    .news-arrow { margin-left: auto; }

    .footer-inner { padding: 40px 24px 24px; }
    .footer-grid  { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

    .page-hero { padding: 100px 24px 48px !important; }
}

/* スマートフォン */
@media (max-width: 600px) {
    .nav-title      { font-size: 11px; }
    .nav-title span { font-size: 9px; }

    .hero-content   { padding: 88px 20px 48px; }
    .hero-ball      { display: none; }
    .hero-badge     { font-size: 10px; padding: 4px 12px; }
    .hero-en        { font-size: 11px; letter-spacing: 0.2em; }
    .hero-actions   { flex-direction: column; gap: 12px; }
    .btn-primary,
    .btn-secondary  { justify-content: center; text-align: center; width: 100%; padding: 14px 20px; }

    .stat-num       { font-size: 34px; }
    .stat-num span  { font-size: 18px; }

    .section        { padding: 40px 16px; }
    .section-title  { font-size: 24px; }

    .cards-grid     { grid-template-columns: 1fr; }

    .news-tag       { min-width: 60px; font-size: 9px; }

    thead th        { font-size: 9px; padding: 10px; }
    tbody td        { font-size: 12px; padding: 12px 10px; }
    tbody td:first-child { padding-left: 16px; gap: 8px; }
    .rank           { font-size: 16px; min-width: 20px; }
    .team-name      { font-size: 12px; }

    .footer-grid    { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom span:first-child { font-size: 10px; }

    .reg-section-inner {
        flex-direction: column !important;
        padding: 36px 20px !important;
        gap: 24px !important;
    }
    .reg-section-inner > div:last-child { min-width: unset !important; width: 100%; }
}
