/* ============================================
   Astume Lab — Design System
   White & Cute theme with pastel accents 🌸
   ============================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fef7f0;
    --bg-card: #ffffff;
    --bg-card-hover: #fff5ee;
    --bg-elevated: #fdf2e9;

    --text-primary: #3d3028;
    --text-secondary: #7a6b5d;
    --text-muted: #b0a194;

    --accent-primary: #f28ba8;
    --accent-secondary: #8ecae6;
    --accent-tertiary: #b8a9e8;
    --accent-gradient: linear-gradient(135deg, #f28ba8 0%, #f7c59f 50%, #b8a9e8 100%);
    --accent-gradient-hover: linear-gradient(135deg, #e87a9a 0%, #f0b88f 50%, #a899d8 100%);

    --border-subtle: rgba(210, 180, 160, 0.2);
    --border-light: rgba(210, 180, 160, 0.35);

    --shadow-sm: 0 2px 12px rgba(180, 140, 120, 0.08);
    --shadow-md: 0 8px 32px rgba(180, 140, 120, 0.12);
    --shadow-lg: 0 16px 48px rgba(180, 140, 120, 0.15);
    --shadow-glow: 0 4px 20px rgba(242, 139, 168, 0.15);

    --font-sans: 'Zen Maru Gothic', 'Noto Sans JP', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --container-width: 1200px;
    --section-padding: 100px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* cute polka dot pattern */
    background-image: radial-gradient(circle, rgba(242,139,168,0.06) 1px, transparent 1px),
                      radial-gradient(circle, rgba(184,169,232,0.05) 1px, transparent 1px);
    background-size: 32px 32px, 48px 48px;
    background-position: 0 0, 16px 24px;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
a:hover { color: #e06888; }

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-smooth);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}
.logo:hover { color: var(--text-primary); }
.logo-icon { font-size: 1.5rem; }
.logo-accent { color: var(--accent-primary); }

.main-nav {
    display: flex;
    gap: 32px;
}
.nav-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width var(--transition-smooth);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { width: 100%; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 40%, rgba(242,139,168,0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 30%, rgba(142,202,230,0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(184,169,232,0.08) 0%, transparent 40%);
    animation: heroPulse 8s ease-in-out infinite alternate;
}

@keyframes heroPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(242,139,168,0.1);
    border: 1px solid rgba(242,139,168,0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-primary);
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--text-primary);
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.btn {
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(242,139,168,0.25);
}
.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px rgba(242,139,168,0.35);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-light);
}
.btn-ghost:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.stat { text-align: center; }
.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Sections Common --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
    padding: 4px 14px;
    background: rgba(242,139,168,0.08);
    border-radius: 100px;
}
.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.categories, .popular-articles, .latest-articles, .about {
    padding: var(--section-padding) 0;
}

.categories { background: var(--bg-secondary); }
.popular-articles { background: var(--bg-primary); }
.latest-articles { background: var(--bg-secondary); }
.about { background: var(--bg-primary); }

/* --- Category Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.category-card {
    display: block;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    transition: all var(--transition-smooth);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
    z-index: 0;
}
.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(242,139,168,0.3);
    box-shadow: var(--shadow-glow);
    color: var(--text-primary);
}
.category-card:hover::before { opacity: 0.04; }

.category-card > * { position: relative; z-index: 1; }

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}
.category-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.category-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.category-count {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
}

/* --- Article Grid --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-sm);
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(242,139,168,0.25);
}

.article-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.article-image {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 20px 20px 0 0;
}
.article-image-text {
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    text-align: center;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.article-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.article-body { padding: 28px; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.article-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    padding: 4px 10px;
    background: rgba(242,139,168,0.1);
    border-radius: 100px;
}
.article-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.article-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.article-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}
.article-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-primary);
    padding: 6px 16px;
    border: 1px solid rgba(242,139,168,0.3);
    border-radius: 100px;
    display: inline-block;
    transition: all var(--transition-fast);
}
.article-link:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* --- Latest List --- */
.latest-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.latest-item {
    display: grid;
    grid-template-columns: 100px 100px 1fr;
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-card);
    border-radius: 16px;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}
.latest-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateX(4px);
    border-color: rgba(242,139,168,0.2);
}

.latest-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.latest-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    padding: 4px 10px;
    background: rgba(242,139,168,0.08);
    border-radius: 100px;
    text-align: center;
}
.latest-title {
    font-size: 0.95rem;
    font-weight: 500;
}

/* --- About --- */
.about-inner { max-width: 700px; margin: 0 auto; }
.about-content p {
    color: var(--text-secondary);
    margin-top: 20px;
    font-size: 1rem;
}
.about-values {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}
.value {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    font-weight: 500;
}
.value-icon { font-size: 1.3rem; }

/* --- Footer --- */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 60px 0 30px;
}

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

.footer-brand .logo-text { font-size: 1.2rem; }
.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 12px;
}

.footer-links h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.footer-links a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 6px 0;
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--accent-primary); }

.footer-disclosure {
    padding: 20px 24px;
    background: rgba(242,139,168,0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    margin-bottom: 30px;
}
.footer-disclosure p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}
.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .menu-toggle { display: flex; }

    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .hero { padding: 100px 20px 60px; }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 1.6rem; }

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

    .article-grid { grid-template-columns: 1fr; }
    .article-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .latest-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .latest-category { justify-self: start; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .hero-cta { flex-direction: column; align-items: center; }
}
