@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-light: #eff6ff;
    --text: #0f172a;
    --text-2: #475569;
    --text-3: #94a3b8;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
    --t: .2s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── Hero ─────────────────────────── */
.hero {
    text-align: center;
    padding: 64px 24px 48px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0284c7 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #bae6fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-sub {
    color: rgba(255, 255, 255, .7);
    font-size: .95rem;
    margin-top: 10px;
    position: relative;
}

/* ── Grid ─────────────────────────── */
.main {
    max-width: 960px;
    margin: -28px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 24px 22px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform var(--t), box-shadow var(--t);
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .1);
}

.tc-emoji {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.tc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tc-desc {
    font-size: .85rem;
    color: var(--text-2);
    flex: 1;
}

.tc-arrow {
    margin-top: 14px;
    font-size: .8rem;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tc-arrow::after {
    content: '→';
    transition: transform var(--t);
}

.tool-card:hover .tc-arrow::after {
    transform: translateX(4px);
}

/* ── Ad slot ──────────────────────── */
.ad-slot {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    color: var(--text-3);
    font-size: .75rem;
    grid-column: 1 / -1;
}

/* ── Footer ───────────────────────── */
footer {
    text-align: center;
    padding: 20px;
    font-size: .75rem;
    color: var(--text-3);
}

/* ── RWD ──────────────────────────── */
@media (max-width: 480px) {
    .hero {
        padding: 48px 18px 40px;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}