/* ============================================
   AP HUB — SEASON 2 SHARED THEME
   Liquid Glass / Frosted White
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.55);
    --bg-glass-heavy: rgba(255, 255, 255, 0.80);
    --border-glass: rgba(255, 255, 255, 0.6);
    --border-subtle: rgba(0, 0, 0, 0.06);
    --text-primary: #1a1a2e;
    --text-secondary: #555770;
    --text-muted: #8e90a6;
    --accent-cyan: #00d4ff;
    --accent-lime: #6bff6b;
    --accent-purple: #a855f7;
    --accent-gradient: linear-gradient(135deg, #00d4ff, #a855f7, #6bff6b);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.12);
    --glass-blur: blur(20px);
    --glass-blur-heavy: blur(40px);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

/* ---- Dark Mode Overrides ---- */
html.dark {
    --bg-primary: #0c0c14;
    --bg-secondary: #14141f;
    --bg-glass: rgba(20, 20, 32, 0.65);
    --bg-glass-heavy: rgba(20, 20, 32, 0.85);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --text-primary: #e8e8f0;
    --text-secondary: #a0a0b8;
    --text-muted: #6e6e88;
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    --card-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.4);
}

html.dark ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); }
html.dark .s2-nav-links a:hover,
html.dark .s2-nav-links button:hover { background: rgba(255,255,255,0.06); }
html.dark .s2-feature:hover { box-shadow: 0 20px 60px rgba(0,0,0,0.4); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* Mesh BG */
.mesh-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1; overflow: hidden; pointer-events: none;
}
.mesh-bg .orb {
    position: absolute; border-radius: 50%; filter: blur(100px);
    opacity: 0.3; animation: orbFloat 18s ease-in-out infinite;
}
.mesh-bg .orb:nth-child(1) { width: 500px; height: 500px; background: var(--accent-cyan); top: -10%; right: -5%; }
.mesh-bg .orb:nth-child(2) { width: 400px; height: 400px; background: var(--accent-purple); bottom: -15%; left: -8%; animation-delay: -6s; }
.mesh-bg .orb:nth-child(3) { width: 350px; height: 350px; background: var(--accent-lime); top: 40%; left: 50%; animation-delay: -12s; }

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 20px) scale(0.95); }
}

/* Glass Utilities */
.glass {
    background: var(--bg-glass); backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--border-glass);
}
.glass-heavy {
    background: var(--bg-glass-heavy); backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy); border: 1px solid var(--border-glass);
}

/* Sub-page Nav Bar */
.s2-nav {
    position: sticky; top: 0; z-index: 100;
    padding: 16px 32px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}
.s2-nav-brand {
    font-family: var(--font-heading); font-weight: 700; font-size: 18px;
    color: var(--text-primary); text-decoration: none; display: flex; align-items: center; gap: 8px;
}
.s2-nav-brand .badge {
    font-size: 9px; font-weight: 700; background: var(--accent-gradient);
    color: white; padding: 3px 8px; border-radius: 6px;
}
.s2-nav-links { display: flex; gap: 8px; align-items: center; }
.s2-nav-links a, .s2-nav-links button {
    padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--text-secondary); text-decoration: none; border: none; background: transparent;
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.s2-nav-links a:hover, .s2-nav-links button:hover {
    background: rgba(0,0,0,0.04); color: var(--text-primary);
}
.s2-nav-links a.active { background: var(--text-primary); color: white; }

/* Page Container */
.s2-page {
    max-width: 1000px; margin: 0 auto; padding: 48px 24px 80px;
}

/* Section Title */
.s2-title {
    font-family: var(--font-heading); font-size: clamp(28px, 4vw, 42px);
    font-weight: 700; margin-bottom: 12px; line-height: 1.1;
}
.s2-title .gradient-text {
    background: var(--accent-gradient); -webkit-background-clip: text;
    -webkit-text-fill-color: transparent; background-clip: text;
}
.s2-subtitle {
    font-size: 15px; color: var(--text-muted); margin-bottom: 40px;
    line-height: 1.6; max-width: 600px;
}

/* Info Cards */
.s2-card {
    border-radius: var(--radius-lg); padding: 32px;
    margin-bottom: 16px; box-shadow: var(--card-shadow);
}
.s2-card h3 {
    font-family: var(--font-heading); font-size: 18px;
    font-weight: 700; margin-bottom: 12px;
}
.s2-card p, .s2-card li {
    font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.s2-card ul, .s2-card ol { padding-left: 20px; margin-top: 8px; }
.s2-card li { margin-bottom: 6px; }
.s2-card a { color: var(--accent-cyan); text-decoration: none; font-weight: 600; }
.s2-card a:hover { text-decoration: underline; }

/* Announcement Cards */
.s2-announce {
    border-radius: var(--radius-lg); padding: 28px 32px;
    margin-bottom: 16px; box-shadow: var(--card-shadow);
    border-left: 4px solid var(--accent-cyan);
    transition: transform 0.25s;
}
.s2-announce:hover { transform: translateX(4px); }
.s2-announce .date {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 8px;
}
.s2-announce h4 {
    font-family: var(--font-heading); font-size: 20px;
    font-weight: 700; margin-bottom: 10px;
}
.s2-announce p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.s2-announce .notice {
    margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px;
}

/* Grid for features */
.s2-grid {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Feature Card (hoverable) */
.s2-feature {
    border-radius: var(--radius-lg); padding: 28px;
    box-shadow: var(--card-shadow); transition: all 0.3s;
    cursor: pointer;
}
.s2-feature:hover {
    transform: translateY(-6px); box-shadow: var(--card-shadow-hover);
}
.s2-feature h4 {
    font-family: var(--font-heading); font-size: 16px;
    font-weight: 700; margin-bottom: 8px;
}
.s2-feature p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.s2-feature .icon {
    width: 48px; height: 48px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; margin-bottom: 16px;
}

/* Stats Row */
.s2-stats {
    display: flex; gap: 32px; flex-wrap: wrap;
    margin: 24px 0;
}
.s2-stat {
    text-align: center;
}
.s2-stat .value {
    font-family: var(--font-heading); font-size: 28px; font-weight: 700;
}
.s2-stat .label {
    font-size: 11px; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.5px; margin-top: 4px;
}

/* CTA Buttons */
.s2-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 28px; border-radius: 999px;
    font-size: 14px; font-weight: 700; color: white;
    text-decoration: none; border: none; cursor: pointer;
    transition: all 0.25s;
}
.s2-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }
.s2-btn:active { transform: scale(0.97); }
.s2-btn-gradient { background: var(--accent-gradient); }
.s2-btn-cyan { background: var(--accent-cyan); }
.s2-btn-purple { background: var(--accent-purple); }

/* Footer (sub-pages) */
.s2-footer {
    margin-top: 64px; padding: 32px 24px;
    border-top: 1px solid var(--border-subtle);
    text-align: center; font-size: 12px; color: var(--text-muted);
}

/* Fade-in animation */
.fade-up {
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.5s ease forwards;
}
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }

/* Responsive */
@media (max-width: 768px) {
    .s2-nav { padding: 12px 16px; }
    .s2-nav-links a span { display: none; }
    .s2-page { padding: 32px 16px 60px; }
    .s2-grid { grid-template-columns: 1fr; }
    .s2-stats { gap: 20px; }
}
