/* ── Tokens ─────────────────────────────────────────────── */
:root {
    --navy:      #0D1B2A;
    --slate:     #1E3A5F;
    --accent:    #2563EB;
    --amber:     #D97706;
    --surface:   #F1F5F9;
    --muted:     #64748B;
    --white:     #F8FAFC;
    --border:    #CBD5E1;
    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'Archivo', Inter, system-ui, sans-serif;
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--navy);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Navbar ─────────────────────────────────────────────── */
.site-nav {
    background: var(--navy);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 0.875rem 0;
}

.site-nav .navbar-brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--white);
    letter-spacing: -0.01em;
    text-decoration: none;
}

.site-nav .navbar-brand span {
    color: var(--accent);
}

.site-nav .product-label {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-left: 1rem;
    margin-left: 1rem;
    border-left: 1px solid rgba(255,255,255,0.12);
}

.nav-link-item {
    color: rgba(248,250,252,0.7) !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.15s;
    text-decoration: none;
}

.nav-link-item:hover,
.nav-link-item.active {
    color: var(--white) !important;
}

.nav-link-item.active {
    color: var(--white) !important;
}

/* ── Page Hero ──────────────────────────────────────────── */
.page-hero {
    background: var(--navy);
    padding: 4rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

/* Subtle grid texture */
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
            linear-gradient(rgba(37,99,235,0.06) 1px, transparent 1px),
            linear-gradient(90deg, rgba(37,99,235,0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

.hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.hero-title em {
    font-style: italic;
    color: rgba(248,250,252,0.55);
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(248,250,252,0.6);
    max-width: 44ch;
    line-height: 1.65;
    margin-bottom: 0;
}

.hero-stat {
    text-align: right;
}

.hero-stat .stat-number, .hero-stat .stat-author {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 3.5rem;
    color: var(--white);
    line-height: 1;
    letter-spacing: -0.03em;
}

.hero-stat .stat-label {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.25rem;
}

.hero-stat .stat-author {
    margin-top: 1rem;
    font-size: 2rem;
    font-weight: 400;
}

/* ── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.875rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.9rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.filter-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-pill.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Article Grid ───────────────────────────────────────── */
.articles-section {
    padding: 3rem 0 5rem;
}

/* ── Article Card ───────────────────────────────────────── */
.article-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    box-shadow: 0 8px 32px rgba(13,27,42,0.10);
    transform: translateY(-2px);
}

/* The "attestation stamp" signature motif */
.article-card::after {
    content: '';
    position: absolute;
    bottom: -28px;
    right: -28px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(37,99,235,0.08);
    pointer-events: none;
}

.article-card.featured::after {
    width: 120px;
    height: 120px;
    bottom: -40px;
    right: -40px;
    border-color: rgba(37,99,235,0.10);
}

.card-header-band {
    height: 4px;
    background: var(--accent);
    flex-shrink: 0;
}

.article-card.featured .card-header-band {
    height: 5px;
    background: linear-gradient(90deg, var(--accent), #60a5fa);
}

.card-body-inner {
    padding: 1.75rem 1.75rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tag-compliance  { background: #EFF6FF; color: #1D4ED8; }
.tag-guide       { background: #FEF3C7; color: #92400E; }
.tag-attestation { background: #ECFDF5; color: #065F46; }
.tag-audit       { background: #FDF4FF; color: #6B21A8; }

.card-date {
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: auto;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.article-card.featured .card-title {
    font-size: 1.5rem;
}

.card-excerpt {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1.5rem;
}

.card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--surface);
    background: var(--surface);
    gap: 0.5rem;
}

.read-time {
    font-size: 0.75rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.read-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.15s;
}

.read-link:hover {
    gap: 0.6rem;
    color: var(--accent);
}

/* ── Sidebar ────────────────────────────────────────────── */
.sidebar-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget-title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.topic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topic-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--surface);
    font-size: 0.875rem;
}

.topic-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.topic-list a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.15s;
}

.topic-list a:hover { color: var(--accent); }

.topic-count {
    font-size: 0.75rem;
    color: var(--muted);
    background: var(--surface);
    border-radius: 9999px;
    padding: 0.1rem 0.55rem;
}

.cta-widget {
    background: var(--navy);
    border: none;
    position: relative;
    overflow: hidden;
}

.cta-widget::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid rgba(37,99,235,0.25);
    pointer-events: none;
}

.cta-widget::after {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 1.5px solid rgba(37,99,235,0.4);
    pointer-events: none;
}

.cta-widget .sidebar-widget-title { color: rgba(248,250,252,0.45); }

.cta-widget-heading {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.cta-widget p {
    font-size: 0.825rem;
    color: rgba(248,250,252,0.6);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-cta:hover { background: #1D4ED8; color: #fff; }

/* ── Section Divider ────────────────────────────────────── */
.section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--navy);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2.5rem 0;
}

.footer-brand {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--white);
}

.footer-brand span { color: var(--accent); }

.footer-copy {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.4rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
}

.footer-links a {
    font-size: 0.8rem;
    color: rgba(248,250,252,0.45);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--white); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 767px) {
    .hero-stat { text-align: left; margin-top: 1.5rem; }
    .footer-links { justify-content: flex-start; margin-top: 1rem; }
    .filter-bar .d-flex { flex-wrap: wrap; gap: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .article-card { transition: none; }
}