/* Shared styles for the Rewired blog (blog/index.html and every article).
   Change something here once and every article updates. */
:root {
  --blue: #0014FF;
  --blue-dark: #000FBF;
  --blue-soft: #EEF0FF;
  --navy: #0A0F2C;
  --ink: #11152B;
  --muted: #5A6075;
  --line: #E6E8F0;
  --bg-alt: #F6F7FB;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 15, 44, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ink); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 10px; font-family: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: .92rem; }

/* Header */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span { font-family: 'Jost', sans-serif; font-size: 1.45rem; letter-spacing: .2em; color: var(--blue); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--blue); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.menu-btn, .icon-call { display: none; }

/* Blog list page */
.blog-hero { background: var(--navy); color: #fff; padding: 70px 0 60px; }
.blog-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -.02em; margin-bottom: 12px; }
.blog-hero p { color: #C9CEEA; max-width: 620px; font-size: 1.1rem; }
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 60px 0 90px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-decoration: none; transition: transform .25s, box-shadow .25s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card .cat { color: var(--blue); font-weight: 700; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.post-card h2, .post-card h3 { font-size: 1.2rem; line-height: 1.3; margin-bottom: 10px; }
.post-card p { color: var(--muted); font-size: .95rem; margin-bottom: 18px; }
.post-card .read { margin-top: auto; font-weight: 700; color: var(--blue); }

/* Article page */
.crumbs { font-size: .85rem; color: var(--muted); padding: 22px 0 0; }
.crumbs a { text-decoration: none; color: var(--blue); }
.article-head { padding: 26px 0 30px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.article-head .cat { color: var(--blue); font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
.article-head h1 { font-size: clamp(2rem, 4.6vw, 2.9rem); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 16px; }
.article-head .lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 18px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .88rem; color: var(--muted); }
.meta i { color: var(--blue); margin-right: 6px; }

.article { font-size: 1.07rem; padding-bottom: 40px; }
.article h2 { font-size: 1.6rem; line-height: 1.25; margin: 44px 0 14px; letter-spacing: -.01em; }
.article h3 { font-size: 1.2rem; margin: 28px 0 10px; }
.article p { margin-bottom: 18px; color: #2A2F45; }
.article ul, .article ol { margin: 0 0 20px 22px; color: #2A2F45; }
.article li { margin-bottom: 8px; }
.article a { color: var(--blue); font-weight: 600; }
.article strong { color: var(--ink); }
.toc { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 10px; }
.toc b { display: block; margin-bottom: 8px; }
.toc ol { margin-bottom: 0; }
.toc a { text-decoration: none; font-weight: 500; }
.note { border-left: 4px solid var(--blue); background: var(--blue-soft); border-radius: 0 10px 10px 0; padding: 16px 20px; margin: 22px 0; }
.note.warn { border-color: #E8A10C; background: #FFF7E6; }
.note p:last-child { margin-bottom: 0; }

.cta-box { background: var(--navy); color: #fff; border-radius: 18px; padding: 36px; margin: 40px 0; }
.cta-box h2 { color: #fff; font-size: 1.6rem; margin: 0 0 10px; }
.cta-box p { color: #C9CEEA; margin-bottom: 22px; }
.cta-box .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-box a.btn { color: #fff; font-weight: 700; }

.related { border-top: 1px solid var(--line); padding: 40px 0 80px; }
.related h2 { font-size: 1.3rem; margin-bottom: 18px; }
.related .posts { padding: 0; grid-template-columns: repeat(2, 1fr); }

/* Footer */
footer { background: #060920; color: #A9AFCC; padding: 56px 0 30px; font-size: .93rem; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; margin-bottom: 36px; }
.foot h4 { color: #fff; margin-bottom: 14px; font-size: 1rem; }
.foot ul { list-style: none; }
.foot li { margin-bottom: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }
.foot .brand { margin-bottom: 14px; }
.foot .brand span { color: #fff; }
.copy { border-top: 1px solid rgba(255,255,255,.08); padding-top: 22px; font-size: .82rem; }
.mbar { display: none; }

@media (max-width: 1024px) {
  .posts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn { display: none; }
  .menu-btn, .icon-call { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 1.1rem; cursor: pointer; text-decoration: none; }
  .icon-call { background: var(--blue); color: #fff; border-color: var(--blue); }
  .nav-links.open { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: 72px; left: -20px; right: -20px; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; box-shadow: var(--shadow); }
  .nav-links.open a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .posts, .related .posts, .foot { grid-template-columns: 1fr; }
  .cta-box { padding: 26px 20px; }
  .cta-box .btn { width: 100%; }
  .mbar { display: grid; grid-template-columns: 1fr 1fr 1.3fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(10,15,44,.08); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  .mbar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: .95rem; border: 1px solid var(--line); }
  .mbar a.primary { background: var(--blue); color: #fff; border-color: var(--blue); }
  body { padding-bottom: 76px; }
}

/* Comparison tables in articles */
.table-wrap { overflow-x: auto; margin: 10px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.article table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
.article th, .article td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.article thead th { background: var(--navy); color: #fff; font-weight: 700; }
.article tbody th { font-weight: 700; background: var(--bg-alt); white-space: nowrap; }
.article tbody tr:last-child th, .article tbody tr:last-child td { border-bottom: 0; }
