/* ===========================================================================
   AuthSpoke — shared blog styles. Component-style, matches the marketing site
   (index.html) design language: same tokens, header, footer, buttons, cards.
   Used by the blog dashboard and every article page.
   =========================================================================== */

:root {
  --ink:        #0a1024;
  --ink-2:      #0f1733;
  --navy:       #13265a;
  --brand:      #3b5bfd;
  --brand-2:    #7b61ff;
  --cyan:       #22d3ee;
  --emerald:    #10b981;
  --emerald-d:  #0e9f70;
  --bg:         #f6f8fc;
  --surface:    #ffffff;
  --text:       #0b1430;
  --muted:      #586a8e;
  --muted-2:    #8a99b8;
  --line:       #e7ecf5;
  --line-dark:  rgba(255,255,255,0.10);
  --radius:     14px;
  --radius-lg:  22px;
  --shadow-sm:  0 1px 2px rgba(16,28,64,.06), 0 4px 14px rgba(16,28,64,.06);
  --shadow-md:  0 10px 30px rgba(16,28,64,.10);
  --shadow-lg:  0 24px 60px rgba(10,16,36,.22);
  --header-h:   72px;
  --maxw:       1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0; color: var(--text); background: var(--bg);
  overflow-x: hidden; -webkit-font-smoothing: antialiased; line-height: 1.65;
}
h1, h2, h3, h4 { font-family: 'Inter', sans-serif; letter-spacing: -0.022em; line-height: 1.14; margin: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: var(--maxw); margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.logo { display: flex; align-items: center; gap: .7rem; font-family: 'IBM Plex Sans', sans-serif;
        font-weight: 700; font-size: 1.4rem; color: var(--ink); letter-spacing: -.02em; }
.logo img { height: 32px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: #33415c; font-weight: 500; font-size: .96rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--brand); }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-weight: 600; font-size: .95rem; border-radius: 999px; cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, color .2s; border: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm  { padding: .6rem 1.2rem; }
.btn-md  { padding: .85rem 1.7rem; font-size: 1rem; }
.btn-primary { background: linear-gradient(135deg, var(--emerald), var(--emerald-d)); color: #fff; box-shadow: 0 8px 22px rgba(16,185,129,.32); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(16,185,129,.42); }
.btn-brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color:#fff; box-shadow: 0 8px 22px rgba(59,91,253,.30); }
.btn-brand:hover { box-shadow: 0 12px 30px rgba(59,91,253,.42); }
.btn-ghost { background: rgba(59,91,253,.08); color: var(--brand); }
.btn-ghost:hover { background: rgba(59,91,253,.14); }
.btn-outline-light { background: rgba(255,255,255,.08); color:#fff; border:1px solid rgba(255,255,255,.28); }
.btn-outline-light:hover { background: rgba(255,255,255,.16); }
.signin { color:#33415c; font-weight:600; font-size:.95rem; }
.signin:hover { color: var(--brand); }
.menu-btn { display:none; background:none; border:none; cursor:pointer; padding:8px; }
.menu-btn span { display:block; width:24px; height:2px; background:var(--ink); margin:5px 0; border-radius:2px; }

/* ---------- Dark hero (dashboard + article header) ---------- */
.post-hero {
  position: relative; margin-top: var(--header-h); color: #eaf0ff; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 80% -10%, rgba(123,97,255,.42), transparent 60%),
    radial-gradient(820px 460px at 6% 10%, rgba(34,211,238,.18), transparent 55%),
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
.post-hero::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(1100px 540px at 55% 0%, #000, transparent 75%);
}
.post-hero .wrap { position: relative; z-index: 1; padding: 4.5rem 24px 4rem; }
.hero-icon {
  width: 64px; height: 64px; border-radius: 18px; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(59,91,253,.30), rgba(123,97,255,.34));
  border: 1px solid rgba(123,97,255,.45); color: #cdd8ff; margin-bottom: 1.4rem;
}
.hero-icon svg { width: 34px; height: 34px; }
.post-hero .eyebrow { color:#b9c6ff; background: rgba(123,97,255,.16); border:1px solid rgba(123,97,255,.35); padding:.4rem .9rem; border-radius:999px; }
.post-hero h1 { font-size: 2.9rem; font-weight: 800; margin: 1.1rem 0 0; max-width: 880px; letter-spacing:-.025em; }
.post-hero h1 .grad { background: linear-gradient(100deg,#8aa0ff,#c4b5ff 50%,#7df0ff); -webkit-background-clip:text; background-clip:text; color:transparent; }
.post-hero .sub { font-size: 1.2rem; color:#b8c4e2; max-width: 720px; margin: 1.2rem 0 0; }
.post-meta { display:flex; gap:1.2rem; align-items:center; flex-wrap:wrap; margin-top: 1.8rem; color:#9fb0d6; font-size:.9rem; }
.post-meta .dot { width:4px; height:4px; border-radius:50%; background:#5f6f9c; }
.breadcrumb { margin-bottom: 1.4rem; font-size:.9rem; color:#9fb0d6; }
.breadcrumb a { color:#b9c6ff; } .breadcrumb a:hover { color:#fff; }

/* ---------- Article body ---------- */
.post-body { max-width: 760px; margin: 0 auto; padding: 3.5rem 24px 1rem; }
.post-body .lead { font-size: 1.3rem; line-height: 1.6; color: var(--text); font-weight: 500; margin: 0 0 2rem; }
.post-body h2 { font-size: 1.85rem; font-weight: 800; margin: 2.8rem 0 1rem; }
.post-body h3 { font-size: 1.3rem; font-weight: 700; margin: 2rem 0 .7rem; }
.post-body p { font-size: 1.08rem; color: #2c3a59; margin: 0 0 1.2em; }
.post-body ul, .post-body ol { font-size: 1.08rem; color:#2c3a59; padding-left: 1.3em; margin: 0 0 1.4em; }
.post-body li { margin-bottom: .55em; }
.post-body strong { color: var(--text); font-weight: 700; }
.post-body a:not(.btn) { color: var(--brand); font-weight: 600; }
.post-body a:not(.btn):hover { text-decoration: underline; }
.post-body img { border-radius: var(--radius); box-shadow: var(--shadow-md); margin: 1.8rem auto; }
.post-body blockquote {
  margin: 1.8rem 0; padding: 1rem 1.5rem; border-left: 4px solid var(--brand);
  background: #eef2fe; border-radius: 0 10px 10px 0; color: var(--navy); font-size: 1.12rem; font-weight: 500;
}
.post-body pre {
  background: #0e1530; color:#dbe3ff; border-radius: 12px; padding: 1.1rem 1.3rem; overflow-x:auto;
  margin: 1.5rem 0; font-size: .9rem; line-height: 1.6; font-family: 'IBM Plex Sans', ui-monospace, monospace;
}
.post-body code { font-family: ui-monospace, 'IBM Plex Sans', monospace; font-size: .92em; color: #b4267a; background: #f4eef6; padding: .12em .4em; border-radius: 5px; }
.post-body pre code { color: inherit; background: none; padding: 0; }

/* Callout box */
.callout {
  background: linear-gradient(135deg, rgba(59,91,253,.06), rgba(123,97,255,.08));
  border: 1px solid #e0e7fd; border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 1.8rem 0;
}
.callout .ct { display:flex; align-items:center; gap:.6rem; font-weight:800; color:var(--brand); margin-bottom:.5rem; font-size:.95rem; }
.callout p { margin: 0; font-size: 1.02rem; color: var(--navy); }

/* Feature checklist */
.checks { list-style:none !important; padding:0 !important; display:grid; grid-template-columns:1fr 1fr; gap:.7rem 1.6rem; margin: 1.4rem 0 1.8rem !important; }
.checks li { position:relative; padding-left: 1.9rem; font-size:1.02rem; color:#2c3a59; }
.checks li::before { content:""; position:absolute; left:0; top:.15em; width:20px; height:20px; border-radius:6px;
  background: rgba(16,185,129,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-11'/%3E%3C/svg%3E") center/13px no-repeat; }

/* Inline stat row */
.stat-row { display:grid; grid-template-columns: repeat(3,1fr); gap:1.2rem; margin: 2rem 0; }
.stat-row .s { background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding:1.3rem; text-align:center; box-shadow: var(--shadow-sm); }
.stat-row .s b { display:block; font-size:1.7rem; font-weight:800; background:linear-gradient(120deg,var(--brand),var(--brand-2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.stat-row .s span { color: var(--muted); font-size:.9rem; }

/* ---------- CTA band ---------- */
.post-cta {
  position:relative; overflow:hidden; border-radius:24px; margin: 3.5rem auto; max-width: 920px;
  background:
    radial-gradient(640px 300px at 85% 10%, rgba(123,97,255,.5), transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, #2a2f8f 60%, var(--ink) 100%);
  color:#fff; text-align:center; padding: 3rem 2rem;
}
.post-cta h2 { font-size: 1.9rem; font-weight: 800; }
.post-cta p { color:#dfe6ff; max-width: 560px; margin: .9rem auto 1.6rem; font-size: 1.05rem; }
.post-cta .acts { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }

/* ---------- Dashboard grid ---------- */
.posts-section { padding: 3.5rem 0 1rem; }
.posts-section .sec-title { font-size:.78rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--brand); margin-bottom:1.2rem; }
.post-grid { display:grid; grid-template-columns: repeat(3,1fr); gap:1.4rem; }
.post-card {
  display:flex; flex-direction:column; background: var(--surface); border:1px solid var(--line);
  border-radius: var(--radius-lg); overflow:hidden; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color:#d6dffb; }
.post-card .thumb { height: 168px; background: linear-gradient(135deg, var(--ink), var(--ink-2)); display:flex; align-items:center; justify-content:center; position:relative; }
.post-card .thumb img { width:100%; height:100%; object-fit:cover; }
.post-card .thumb .ic { width:56px; height:56px; border-radius:16px; display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, rgba(59,91,253,.30), rgba(123,97,255,.34)); border:1px solid rgba(123,97,255,.4); color:#cdd8ff; }
.post-card .thumb .ic svg { width:30px; height:30px; }
.post-card .pc-body { padding: 1.4rem 1.5rem 1.6rem; display:flex; flex-direction:column; flex-grow:1; }
.post-card .cat { font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color: var(--brand-2); margin-bottom:.6rem; }
.post-card h3 { font-size: 1.18rem; font-weight: 700; line-height:1.3; margin-bottom:.6rem; }
.post-card h3 a:hover { color: var(--brand); }
.post-card p { color: var(--muted); font-size:.96rem; margin:0 0 1.2rem; flex-grow:1; }
.post-card .more { color: var(--brand); font-weight:700; font-size:.92rem; display:inline-flex; align-items:center; gap:.4rem; }
.post-card.feature { grid-column: 1 / -1; flex-direction:row; }
.post-card.feature .thumb { width: 42%; min-height: 240px; }
.post-card.feature .pc-body { justify-content:center; }
.post-card.feature h3 { font-size: 1.7rem; }
.post-card.feature p { font-size: 1.05rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color:#9fb0d6; padding: 4rem 0 2rem; margin-top: 4rem; }
.foot-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap:2.5rem; }
.foot-brand .logo { color:#fff; margin-bottom:1rem; }
.foot-brand p { color:#8295bd; font-size:.95rem; max-width:300px; }
.site-footer h5 { color:#fff; font-size:.95rem; font-weight:700; margin:0 0 1.1rem; }
.site-footer ul { list-style:none; padding:0; margin:0; }
.site-footer ul li { margin-bottom:.7rem; }
.site-footer ul li a { color:#9fb0d6; font-size:.94rem; transition:color .2s; }
.site-footer ul li a:hover { color:#fff; }
.foot-bottom { border-top:1px solid var(--line-dark); margin-top:3rem; padding-top:1.6rem; display:flex; justify-content:space-between; flex-wrap:wrap; gap:1rem; font-size:.88rem; color:#7888ad; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .post-card.feature { flex-direction:column; } .post-card.feature .thumb { width:100%; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .signin { display:none; }
  .menu-btn { display:block; }
  .nav-links.open { display:flex; flex-direction:column; position:absolute; top:var(--header-h); left:0; right:0; background:#fff; padding:1.2rem 24px; gap:1.1rem; border-bottom:1px solid var(--line); box-shadow:var(--shadow-md); }
  .post-hero h1 { font-size: 2.1rem; }
  .post-body .lead { font-size: 1.15rem; }
  .post-body h2 { font-size: 1.5rem; }
  .post-grid { grid-template-columns: 1fr; }
  .checks { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
