/* Everyday Tools — Dark Utility Design System */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --bg: #0a0c10;
    --bg-raised: #12151c;
    --bg-card: #161a24;
    --bg-card-hover: #1c2130;
    --bg-input: #12151c;
    --border: #1e2433;
    --border-hover: #2d3548;
    --border-accent: #3b82f6;
    --ink: #f1f3f8;
    --ink-secondary: #b0b8cc;
    --ink-light: #b0b8cc;
    --ink-muted: #636d83;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: rgba(59,130,246,.08);
    --accent-glow: rgba(59,130,246,.12);
    --coral: #f43f5e;
    --coral-light: rgba(244,63,94,.08);
    --red: #ef4444;
    --red-soft: rgba(239,68,68,.1);
    --green: #22c55e;
    --green-light: rgba(34,197,94,.08);
    --green-soft: rgba(34,197,94,.1);
    --amber: #f59e0b;
    --amber-light: rgba(245,158,11,.08);
    --amber-soft: rgba(245,158,11,.1);
    --purple: #a855f7;
    --purple-light: rgba(168,85,247,.08);
    --purple-soft: rgba(168,85,247,.1);
    --cyan: #06b6d4;
    --cyan-soft: rgba(6,182,212,.1);
    --rose: #f43f5e;
    --rose-soft: rgba(244,63,94,.1);
    --bg-alt: var(--bg-raised);
    --bg-dark: var(--bg);
    --bg-dark-card: var(--bg-card);
    --display: 'Bricolage Grotesque', system-ui, sans-serif;
    --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
    --shadow-md: 0 8px 24px rgba(0,0,0,.4);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
    --shadow-glow: 0 0 40px rgba(59,130,246,.08);
    --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink-secondary);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #60a5fa; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.fade-up { animation: fadeUp .6s cubic-bezier(.22,.61,.36,1) both; }
.fade-up-d1 { animation-delay: .1s; }
.fade-up-d2 { animation-delay: .2s; }
.fade-up-d3 { animation-delay: .3s; }

/* ── Noise texture ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px;
}

/* ── Nav ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10,12,16,.85);
    backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--display);
    font-weight: 700;
    font-size: .95rem;
    letter-spacing: -.02em;
}
.logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 2px 12px rgba(59,130,246,.25);
}
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-xs);
    text-decoration: none;
    color: var(--ink-muted);
    font-size: .88rem;
    font-weight: 500;
    transition: all .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-card); }
.nav-links a.active { color: var(--ink); background: var(--bg-card); }
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--ink-muted);
    cursor: pointer;
    padding: 6px;
}

/* ── Hero ── */
.hero {
    position: relative;
    text-align: center;
    padding: 80px 24px 64px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, rgba(59,130,246,.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 70% 80%, rgba(139,92,246,.05) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(6,182,212,.03) 0%, transparent 60%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(30,36,51,.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30,36,51,.4) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 0%, transparent 70%);
}
.hero h1 {
    font-family: var(--display);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.1;
    margin-bottom: 16px;
    position: relative;
    letter-spacing: -.04em;
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    color: var(--ink-muted);
    font-size: 1.08rem;
    max-width: 540px;
    margin: 0 auto;
    position: relative;
    line-height: 1.7;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 100px;
    background: rgba(34,197,94,.06);
    border: 1px solid rgba(34,197,94,.15);
    color: var(--green);
    font-size: .78rem;
    font-weight: 600;
    margin-bottom: 24px;
    position: relative;
    letter-spacing: .01em;
}

/* ── Tool Grid ── */
.tool-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 56px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    position: relative;
    z-index: 1;
}
.tool-card {
    display: flex;
    gap: 18px;
    padding: 24px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--ink);
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.tool-card:hover {
    border-color: var(--tool-color, var(--accent));
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--ink);
}
.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--bg-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.tool-card-body { flex: 1; min-width: 0; }
.tool-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.tool-card-header h3 {
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--ink);
}
.tool-badge-new {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--accent-light);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 100px;
    flex-shrink: 0;
}
.tool-badge-popular {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--green-soft);
    color: var(--green);
    padding: 3px 8px;
    border-radius: 100px;
    flex-shrink: 0;
}
.tool-card p {
    font-size: .85rem;
    color: var(--ink-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}
.tool-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tool-category {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-muted);
    background: var(--bg-raised);
    padding: 4px 10px;
    border-radius: 4px;
}
.tool-arrow {
    font-size: 1.1rem;
    color: var(--tool-color, var(--accent));
    transition: transform .2s;
}
.tool-card:hover .tool-arrow { transform: translateX(4px); }
.tool-card .tag {
    display: inline-block;
    margin-top: 14px;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: .67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ── Tool Pages ── */
.tool-hero {
    padding: 36px 24px 28px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-raised), var(--bg));
}
.tool-hero h1 {
    font-family: var(--display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 4px;
    letter-spacing: -.02em;
}
.tool-hero p { color: var(--ink-muted); font-size: .9rem; }
.tool-container { max-width: 800px; margin: 0 auto; padding: 24px 24px 64px; }
.tool-container.wide { max-width: 1000px; }

/* ── Cards & Forms ── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
input, select, textarea {
    font-family: inherit;
    font-size: .9rem;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--ink);
    transition: border .2s, box-shadow .2s;
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
input::placeholder, textarea::placeholder { color: var(--ink-muted); }
select option { background: var(--bg-card); color: var(--ink); }
button, .btn {
    font-family: inherit;
    font-size: .88rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all .2s;
}
.btn-primary {
    background: var(--accent);
    color: white;
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59,130,246,.3);
}
.btn-secondary {
    background: var(--bg-raised);
    color: var(--ink-secondary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--ink); }

/* ── Footer ── */
.site-footer {
    background: var(--bg-raised);
    border-top: 1px solid var(--border);
    color: var(--ink-muted);
    padding: 48px 0 0;
    margin-top: auto;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}
.footer-brand .nav-logo { margin-bottom: 8px; }
.footer-brand p { font-size: .85rem; color: var(--ink-muted); line-height: 1.65; }
.footer-col h4 {
    color: var(--ink-secondary);
    font-family: var(--display);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col a {
    color: var(--ink-muted);
    font-size: .85rem;
    display: block;
    padding: 4px 0;
    transition: color .15s;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}
.footer-bottom p { font-size: .78rem; color: var(--ink-muted); }
.footer-bottom a { color: var(--ink-muted); }
.footer-bottom a:hover { color: var(--ink-secondary); }

/* ── Blog Grid ── */
.blog-grid {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 64px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all .25s;
}
.blog-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.blog-card h3 { font-family: var(--display); font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.blog-card h3 a { color: var(--ink); text-decoration: none; }
.blog-card h3 a:hover { color: var(--accent); }
.blog-card p { font-size: .82rem; color: var(--ink-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-raised);
        border-bottom: 1px solid var(--border);
        padding: 12px;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        backdrop-filter: blur(20px);
    }
    .nav-links.open { display: flex; }
    .nav-hamburger { display: block; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .tool-grid { grid-template-columns: 1fr; }
    .tool-card { gap: 14px; }
    .hero { padding: 56px 24px 48px; }
    .hero h1 { font-size: 2rem; }
}

/* ── Focus Visible ── */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 3px;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.skip-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Blog Articles ── */
.blog-article-hero { text-align: center; padding: 48px 24px 28px; }
.blog-article-hero h1 {
    font-family: var(--display);
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -.03em;
    color: var(--ink);
}
.blog-article-hero .meta { font-size: .82rem; color: var(--ink-muted); }
.blog-article { max-width: 720px; margin: 0 auto; padding: 0 24px 64px; }
.blog-article h2 {
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink);
    margin: 2em 0 .6em;
    padding-top: 1em;
    border-top: 1px solid var(--border);
    letter-spacing: -.02em;
}
.blog-article h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.blog-article h3 {
    font-family: var(--display);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ink);
    margin: 1.5em 0 .5em;
}
.blog-article p { color: var(--ink-secondary); margin-bottom: 1em; line-height: 1.85; }
.blog-article strong { color: var(--ink); font-weight: 600; }
.blog-article ul, .blog-article ol { margin: 0 0 1em 1.5em; color: var(--ink-secondary); line-height: 1.85; }
.blog-article li { margin-bottom: .4em; }
.blog-article a { color: var(--accent); }
.blog-article a:hover { color: #60a5fa; }
.blog-article table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .88rem; }
.blog-article th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ink-muted);
}
.blog-article td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--ink-secondary); }
.blog-article code {
    background: var(--bg-card);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: .85em;
    color: var(--accent);
    border: 1px solid var(--border);
}
.blog-article pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    overflow-x: auto;
    margin: 1.2em 0;
    font-size: .85rem;
    line-height: 1.6;
}
.blog-article pre code { background: none; padding: 0; color: var(--ink-secondary); border: none; }

/* ── Content Section (legal pages) ── */
.content-section { max-width: 720px; margin: 0 auto; padding: 0 24px 64px; }
.content-section h2 {
    font-family: var(--display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    margin: 1.8em 0 .5em;
}
.content-section p { color: var(--ink-secondary); margin-bottom: 1em; line-height: 1.75; }
.content-section a { color: var(--accent); }

/* ── Blog Index ── */
.blog-hero { text-align: center; padding: 48px 24px 32px; }
.blog-hero h1 {
    font-family: var(--display);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -.03em;
    color: var(--ink);
}
.blog-hero p { color: var(--ink-muted); font-size: 1rem; max-width: 520px; margin: 0 auto; }
