/* ============================================================
   Raven Wick Lane — Design System (Composio-inspired dark theme)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --void-black:    #0f0f0f;
    --pure-black:    #000000;
    --charcoal:      #2c2c2c;
    --pure-white:    #ffffff;
    --ghost-white:   rgba(255,255,255,0.6);
    --whisper-white: rgba(255,255,255,0.5);
    --phantom-white: rgba(255,255,255,0.2);
    --cobalt:        #0007cd;
    --cyan:          #00ffff;
    --signal-blue:   #0089ff;
    --ocean-blue:    #0096ff;
    --bm-12: rgba(255,255,255,0.12);
    --bm-10: rgba(255,255,255,0.10);
    --bm-08: rgba(255,255,255,0.08);
    --bm-06: rgba(255,255,255,0.06);
    --bm-04: rgba(255,255,255,0.04);
    --shadow-hard: rgba(0,0,0,0.15) 4px 4px 0px 0px;
    --shadow-soft: rgba(0,0,0,0.5) 0px 8px 32px;
    --font-sans:   ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --r-sm:  2px;
    --r-md:  4px;
    --r-pill: 37px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--void-black);
    color: var(--pure-white);
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 8px 24px;
    border-radius: var(--r-pill);
    border: none;
    cursor: pointer;
    transition: opacity 0.18s, background 0.18s, border-color 0.18s;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.5;
}
.btn-primary { background: var(--pure-white); color: oklch(0.145 0 0); }
.btn-primary:hover { opacity: 0.88; }
.btn-cyan {
    background: rgba(0,255,255,0.12);
    color: oklch(0.145 0 0);
    border: 1px solid var(--ocean-blue);
}
.btn-cyan:hover { background: rgba(0,255,255,0.2); }
.btn-ghost {
    background: transparent;
    color: var(--ghost-white);
    border: 1px solid var(--charcoal);
    padding: 8px 20px;
}
.btn-ghost:hover { border-color: var(--signal-blue); color: var(--pure-white); }
.btn-ghost-blue {
    background: transparent;
    color: var(--ghost-white);
    border: 1px solid var(--signal-blue);
    padding: 8px 20px;
}
.btn-ghost-blue:hover { background: rgba(0,137,255,0.1); color: var(--pure-white); }

/* ── Cookie Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--pure-black);
    border-top: 1px solid var(--bm-12);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p { color: var(--ghost-white); font-size: 0.875rem; line-height: 1.6; }
.cookie-banner p a { color: var(--signal-blue); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ── Navbar ── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: var(--void-black);
    border-bottom: 1px solid var(--bm-06);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 32px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo-mark { font-size: 1.25rem; }
.logo-text { font-family: var(--font-mono); font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.3px; }
.logo-accent { color: var(--cyan); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links li a { font-size: 1rem; color: var(--ghost-white); transition: color 0.15s; }
.nav-links li a:hover { color: var(--pure-white); }
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none; border: none; cursor: pointer;
    padding: 8px; width: 40px; height: 40px;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--pure-white); border-radius: 1px; transition: all 0.2s; }

/* ── Sections ── */
.section { padding: 96px 0; }
.section-dark {
    position: relative;
    background: var(--pure-black);
    border-top: 1px solid var(--bm-06);
    border-bottom: 1px solid var(--bm-06);
}
.section-glow {
    position: absolute; top: 50%; left: 0;
    transform: translateY(-50%);
    width: 500px; height: 500px;
    background: radial-gradient(ellipse at left center, rgba(0,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.section-label {
    font-family: var(--font-mono);
    font-size: 0.75rem; letter-spacing: 0.7px;
    text-transform: uppercase; color: var(--cyan); margin-bottom: 14px;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400; line-height: 1.0;
    color: var(--pure-white); margin-bottom: 24px;
}
.section-intro {
    font-size: 1.125rem; line-height: 1.6;
    color: var(--ghost-white); max-width: 700px; margin-bottom: 56px;
}

/* ── Hero ── */
.hero { position: relative; padding: 100px 0 80px; overflow: hidden; }
.hero-glow {
    position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
    width: 800px; height: 400px;
    background: radial-gradient(ellipse at center, rgba(0,255,255,0.07) 0%, transparent 70%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-overline {
    font-family: var(--font-mono); font-size: 0.75rem;
    letter-spacing: 0.7px; text-transform: uppercase;
    color: var(--ghost-white); margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 400; line-height: 0.87;
    color: var(--pure-white); margin-bottom: 28px;
}
.hero-subtitle {
    font-size: 1.125rem; line-height: 1.6;
    color: var(--ghost-white); max-width: 640px;
    margin: 0 auto 36px;
}
.hero-actions {
    display: flex; align-items: center; justify-content: center;
    gap: 14px; flex-wrap: wrap; margin-bottom: 56px;
}
.hero-stats {
    display: inline-flex; align-items: center;
    background: var(--pure-black);
    border: 1px solid var(--bm-10); border-radius: var(--r-md); overflow: hidden;
}
.stat-item { display: flex; flex-direction: column; align-items: center; padding: 18px 36px; gap: 4px; }
.stat-num { font-family: var(--font-mono); font-size: 1.75rem; font-weight: 500; letter-spacing: -0.5px; }
.stat-label { font-size: 0.75rem; color: var(--ghost-white); letter-spacing: 0.3px; }
.stat-divider { width: 1px; height: 48px; background: var(--bm-10); flex-shrink: 0; }

/* ── Cards ── */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-bottom: 56px; }
.card {
    background: var(--void-black);
    border: 1px solid var(--bm-10); border-radius: var(--r-md);
    padding: 28px 24px; box-shadow: var(--shadow-hard);
    transition: border-color 0.2s;
}
.card:hover { border-color: var(--bm-12); }
.card-icon { font-size: 1.5rem; margin-bottom: 14px; }
.card-title { font-size: 1.25rem; font-weight: 500; line-height: 1.2; color: var(--pure-white); margin-bottom: 12px; }
.card-body { font-size: 0.9375rem; line-height: 1.63; color: var(--ghost-white); margin-bottom: 16px; }
.card-tag {
    font-family: var(--font-mono); font-size: 0.6875rem;
    letter-spacing: 0.55px; text-transform: uppercase;
    color: var(--cyan); border: 1px solid rgba(0,255,255,0.2);
    border-radius: var(--r-sm); padding: 2px 8px; display: inline-block;
}

/* ── Article Cards (index) ── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.article-card {
    background: var(--pure-black);
    border: 1px solid var(--bm-10); border-radius: var(--r-md);
    overflow: hidden; box-shadow: var(--shadow-hard);
    transition: border-color 0.2s, transform 0.15s;
    display: flex; flex-direction: column;
}
.article-card:hover { border-color: var(--signal-blue); transform: translateY(-2px); }
.article-card-img { width: 100%; height: 220px; object-fit: cover; }
.article-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.article-card-tag {
    font-family: var(--font-mono); font-size: 0.6875rem;
    letter-spacing: 0.55px; text-transform: uppercase;
    color: var(--cyan);
}
.article-card-title { font-size: 1.25rem; font-weight: 500; line-height: 1.2; color: var(--pure-white); }
.article-card-excerpt { font-size: 0.9375rem; line-height: 1.63; color: var(--ghost-white); flex: 1; }
.article-card-link {
    font-family: var(--font-mono); font-size: 0.8125rem;
    color: var(--signal-blue); letter-spacing: -0.28px;
    margin-top: 8px;
}
.article-card:hover .article-card-link { text-decoration: underline; }

/* ── Article page ── */
.article-header { padding: 80px 0 48px; border-bottom: 1px solid var(--bm-06); }
.article-header .container { max-width: 820px; }
.article-meta { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.article-meta-tag {
    font-family: var(--font-mono); font-size: 0.6875rem;
    letter-spacing: 0.55px; text-transform: uppercase;
    color: var(--cyan); border: 1px solid rgba(0,255,255,0.2);
    border-radius: var(--r-sm); padding: 2px 8px;
}
.article-meta-date { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ghost-white); letter-spacing: -0.28px; }
.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400; line-height: 0.95;
    color: var(--pure-white); margin-bottom: 20px;
}
.article-lead { font-size: 1.125rem; line-height: 1.6; color: var(--ghost-white); }

.article-body { padding: 56px 0 80px; }
.article-body .container { max-width: 820px; }
.article-body h2 { font-size: 1.75rem; font-weight: 400; line-height: 1.1; color: var(--pure-white); margin: 48px 0 16px; }
.article-body h3 { font-size: 1.25rem; font-weight: 500; line-height: 1.2; color: var(--pure-white); margin: 32px 0 12px; }
.article-body p { font-size: 0.9375rem; line-height: 1.63; color: var(--ghost-white); margin-bottom: 18px; }
.article-body ul { margin: 0 0 18px 0; }
.article-body ul li {
    font-size: 0.9375rem; line-height: 1.63; color: var(--ghost-white);
    padding: 5px 0 5px 20px; position: relative;
    border-bottom: 1px solid var(--bm-04);
}
.article-body ul li:last-child { border-bottom: none; }
.article-body ul li::before { content: '→'; position: absolute; left: 0; color: var(--cyan); font-size: 0.75rem; top: 7px; }
.article-body a { color: var(--signal-blue); text-decoration: underline; text-underline-offset: 3px; }

.article-img-wrap { margin: 36px 0; border: 1px solid var(--bm-08); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-soft); }
.article-img-wrap img { width: 100%; height: auto; object-fit: cover; max-height: 460px; }
.article-img-cap { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ghost-white); padding: 10px 16px; background: var(--pure-black); border-top: 1px solid var(--bm-06); letter-spacing: -0.28px; }

/* ── Related articles ── */
.related-section { padding: 56px 0; border-top: 1px solid var(--bm-06); }
.related-section h2 { font-size: 1.5rem; font-weight: 400; color: var(--pure-white); margin-bottom: 32px; }

/* ── Sorting table ── */
.table-wrap { overflow-x: auto; border: 1px solid var(--bm-10); border-radius: var(--r-md); box-shadow: var(--shadow-soft); margin: 28px 0; }
.data-table { width: 100%; border-collapse: collapse; background: var(--pure-black); font-size: 0.9375rem; }
.data-table th {
    font-family: var(--font-mono); font-size: 0.75rem;
    letter-spacing: 0.5px; text-transform: uppercase;
    color: var(--ghost-white); padding: 14px 20px;
    text-align: left; border-bottom: 1px solid var(--bm-10);
    background: rgba(255,255,255,0.02);
}
.data-table td { padding: 12px 20px; border-bottom: 1px solid var(--bm-06); color: var(--ghost-white); line-height: 1.5; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bm-04); }

/* Tags */
.tag { font-family: var(--font-mono); font-size: 0.6875rem; padding: 2px 8px; border-radius: var(--r-sm); white-space: nowrap; }
.tag-blue   { color: #60c0ff; border: 1px solid rgba(96,192,255,0.3); }
.tag-grey   { color: var(--ghost-white); border: 1px solid var(--bm-10); }
.tag-yellow { color: #ffe680; border: 1px solid rgba(255,230,128,0.3); }
.tag-green  { color: #80ff9a; border: 1px solid rgba(128,255,154,0.3); }
.tag-red    { color: #ff8080; border: 1px solid rgba(255,128,128,0.3); }

/* ── CTA block ── */
.cta-block { padding: 72px 0; text-align: center; border-top: 1px solid var(--bm-06); }
.cta-title { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 400; line-height: 1.0; color: var(--pure-white); margin-bottom: 16px; }
.cta-body { font-size: 1rem; line-height: 1.63; color: var(--ghost-white); max-width: 600px; margin: 0 auto 32px; }
.cta-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Page layout (about/privacy/terms) ── */
.page-header { padding: 80px 0 48px; }
.page-header .container { max-width: 760px; }
.page-title { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 400; line-height: 1.0; color: var(--pure-white); margin-bottom: 16px; }
.page-meta { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ghost-white); letter-spacing: -0.28px; }
.page-body { padding: 0 0 80px; }
.page-body .container { max-width: 760px; }
.page-body h2 { font-size: 1.25rem; font-weight: 500; color: var(--pure-white); margin: 36px 0 10px; line-height: 1.2; }
.page-body p { font-size: 0.9375rem; line-height: 1.63; color: var(--ghost-white); margin-bottom: 14px; }
.page-body a { color: var(--signal-blue); text-decoration: underline; text-underline-offset: 3px; }

/* ── Footer ── */
.footer { background: var(--pure-black); border-top: 1px solid var(--bm-08); padding: 48px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-nav a { font-size: 0.875rem; color: var(--ghost-white); transition: color 0.15s; }
.footer-nav a:hover { color: var(--pure-white); }
.footer-contact a { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--signal-blue); text-decoration: underline; text-underline-offset: 3px; }
.footer-copy { font-size: 0.8125rem; color: var(--ghost-white); }
.footer-disclaimer { font-size: 0.75rem; color: var(--whisper-white); max-width: 600px; line-height: 1.63; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .section { padding: 64px 0; }
    .hero { padding: 64px 0 56px; }
    .hero-title { line-height: 1.0; }
    .nav-links {
        display: none;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--pure-black); border-bottom: 1px solid var(--bm-08);
        flex-direction: column; align-items: flex-start; gap: 0; padding: 16px 0;
    }
    .nav-links.open { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links li a { display: block; padding: 12px 24px; border-bottom: 1px solid var(--bm-04); }
    .nav-toggle { display: flex; }
    .nav-inner { position: relative; }
    .hero-stats { flex-direction: column; }
    .stat-divider { width: 80%; height: 1px; }
    .stat-item { padding: 14px 24px; }
    .cards-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { text-align: center; justify-content: center; }
    .cookie-banner { flex-direction: column; align-items: flex-start; }
}
