/* Public Sector Tools — Civic Design System */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f8fafb;
    --bg-alt: #eef2f6;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;
    --bg-dark-card: #1e293b;
    --border: #d4dbe4;
    --border-hover: #94a3b8;
    --ink: #0f172a;
    --ink-light: #475569;
    --ink-muted: #94a3b8;
    --accent: #0d6e6e;
    --accent-hover: #0a5c5c;
    --accent-light: #e6f7f7;
    --accent-glow: rgba(13,110,110,.08);
    --navy: #1e3a5f;
    --navy-light: #eef3f9;
    --gold: #c2880d;
    --gold-light: #fef8eb;
    --green: #16764e;
    --green-light: #e8f5ee;
    --red: #c53030;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --serif: 'Source Serif 4', Georgia, serif;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.1);
    --max-width: 1080px;
}

*, *::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); line-height: 1.6; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: translateX(0); } }
.fade-up { animation: fadeUp .6s ease both; }
.fade-up-d1 { animation-delay: .1s; }
.fade-up-d2 { animation-delay: .2s; }
.fade-up-d3 { animation-delay: .3s; }

/* ── Nav ── */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.88); backdrop-filter: blur(16px) 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: 60px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .95rem; }
.logo-mark { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, var(--navy), var(--accent)); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: white; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a { padding: 8px 16px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink-light); font-size: .88rem; font-weight: 500; transition: all .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--bg-alt); }
.nav-hamburger { display: none; background: none; border: none; color: var(--ink-muted); cursor: pointer; padding: 6px; }

/* ── Hero ── */
.hero { position: relative; text-align: center; padding: 72px 24px 56px; background: linear-gradient(180deg, #f0f6fb 0%, var(--bg) 100%); overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -100px; right: -100px; width: 500px; height: 500px; border-radius: 50%; background: radial-gradient(circle, rgba(13,110,110,.06), transparent 70%); pointer-events: none; }
.hero::after { content: ''; position: absolute; bottom: -80px; left: -80px; width: 400px; height: 400px; border-radius: 50%; background: radial-gradient(circle, rgba(30,58,95,.04), transparent 70%); pointer-events: none; }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; color: var(--ink); line-height: 1.15; margin-bottom: 12px; position: relative; letter-spacing: -.02em; }
.hero p { color: var(--ink-light); font-size: 1.05rem; max-width: 540px; margin: 0 auto; position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 18px; border-radius: 24px; background: var(--accent-light); border: 1px solid rgba(13,110,110,.12); color: var(--accent); font-size: .78rem; font-weight: 600; margin-bottom: 20px; position: relative; }
.hero-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── Tool Grid ── */
.tool-grid { max-width: var(--max-width); margin: 0 auto; padding: 0 24px 48px; display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.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; box-shadow: var(--shadow-sm); }
.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; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; 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-size: 1rem; font-weight: 700; line-height: 1.3; }
.tool-badge-new { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--accent-light, rgba(14,116,84,.12)); 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(--accent-light, rgba(14,116,84,.12)); color: var(--accent); padding: 3px 8px; border-radius: 100px; flex-shrink: 0; }
.tool-card p { font-size: .84rem; 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(--surface, rgba(0,0,0,.04)); 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: 12px; padding: 3px 10px; border-radius: 20px; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ── Tool Pages ── */
.tool-hero { padding: 32px 24px 24px; text-align: center; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #f0f6fb, var(--bg)); }
.tool-hero h1 { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 700; margin-bottom: 4px; }
.tool-hero p { color: var(--ink-light); font-size: .9rem; }
.tool-container { max-width: 860px; margin: 0 auto; padding: 28px 24px 64px; }
.tool-container.wide { max-width: 1000px; }

/* ── Cards & Inputs ── */
.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: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: white; color: var(--ink); transition: border .2s; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
button, .btn { font-family: inherit; font-size: .88rem; font-weight: 600; padding: 10px 20px; 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 12px rgba(13,110,110,.2); }
.btn-secondary { background: var(--bg-alt); color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }

/* ── Footer ── */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,.7); 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 p { font-size: .85rem; color: rgba(255,255,255,.5); margin-top: 10px; line-height: 1.6; }
.footer-col h4 { color: white; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.footer-col ul { list-style: none; }
.footer-col a { color: rgba(255,255,255,.55); font-size: .85rem; display: block; padding: 4px 0; transition: color .15s; }
.footer-col a:hover { color: white; }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding: 20px 24px; border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; }
.footer-bottom p { font-size: .78rem; color: rgba(255,255,255,.35); }

/* ── Blog Cards ── */
.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(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.blog-card h3 { font-size: .95rem; 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); }
.blog-card .meta { font-size: .75rem; color: var(--ink-muted); margin-bottom: 8px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: white; border-bottom: 1px solid var(--border); padding: 12px; flex-direction: column; box-shadow: var(--shadow-md); }
    .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; }
    section { padding: 48px 0; }
}

/* Focus Visible - Keyboard Accessibility */
*:focus-visible {
  outline: 2px solid var(--accent, #58a6ff);
  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, #58a6ff);
  outline-offset: 2px;
}

.skip-link:focus {
  outline: 2px solid var(--accent, #58a6ff);
  outline-offset: 2px;
}

/* Screen reader only - visually hidden but accessible */
.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(--serif); font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 700; line-height: 1.25; margin-bottom: 12px; letter-spacing: -.02em; }
.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(--serif); font-size: 1.25rem; font-weight: 700; margin: 2em 0 .6em; padding-top: 1em; border-top: 1px solid var(--border); letter-spacing: -.01em; }
.blog-article h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.blog-article h3 { font-size: 1.05rem; font-weight: 600; margin: 1.5em 0 .5em; }
.blog-article p { color: var(--ink-light); margin-bottom: 1em; line-height: 1.8; }
.blog-article strong { color: var(--ink); font-weight: 600; }
.blog-article ul, .blog-article ol { margin: 0 0 1em 1.5em; color: var(--ink-light); line-height: 1.8; }
.blog-article li { margin-bottom: .4em; }
.blog-article a { color: var(--accent); text-decoration: none; }
.blog-article a:hover { color: var(--accent-hover); }
.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-light); }
.blog-article code { background: var(--bg-alt); padding: 2px 8px; border-radius: 5px; font-size: .85em; color: var(--accent); }
.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-light); }

/* ── Content Section (legal pages) ── */
.content-section { max-width: 720px; margin: 0 auto; padding: 0 24px 64px; }
.content-section h2 { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; margin: 1.8em 0 .5em; }
.content-section p { color: var(--ink-light); 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(--serif); font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; margin-bottom: 8px; letter-spacing: -.02em; }
.blog-hero p { color: var(--ink-light); font-size: 1rem; max-width: 520px; margin: 0 auto; }
