/*
Theme Name: PathLance Blog
Theme URI: http://localhost/pathlance/blog
Author: PathLance
Description: Custom blog theme that matches the PathLance React site — indigo & gold, server-rendered for SEO.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: pathlance-blog
*/

/* ============================================================
   Design tokens — mirror the React site (indigo + gold).
   ============================================================ */
:root {
  --indigo-950: #101030;
  --indigo-900: #17173f;
  --indigo-800: #212155;
  --indigo-700: #2d2d6c;
  --indigo-200: #c9c9ec;
  --indigo-100: #e6e6f6;
  --indigo-50: #f3f3fb;

  --gold-300: #fcd34d;
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;

  --azure-500: #0ea5e9;
  --azure-600: #0284c7;

  --ink: #101030;
  --slate-900: #17173f;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  --brand-gradient:
    radial-gradient(115% 100% at 80% 8%, #2a2a66 0%, transparent 52%),
    radial-gradient(90% 90% at 15% 0%, #1c1c50 0%, transparent 48%),
    linear-gradient(160deg, #16163e 0%, #101030 58%, #0c0c24 100%);

  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;

  --shadow-soft: 0 1px 2px rgb(11 17 48 / 0.04), 0 8px 24px -8px rgb(11 17 48 / 0.12);
  --shadow-lift: 0 2px 4px rgb(11 17 48 / 0.05), 0 18px 40px -12px rgb(11 17 48 / 0.22);
  --rail: 90rem;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--slate-700);
  background: var(--white);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0; text-wrap: balance; }
a { color: var(--azure-600); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1.15rem; }

.rail { width: 100%; max-width: var(--rail); margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 640px) { .rail { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .rail { padding: 0 2.5rem; } }

:where(a, button, input, textarea):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--azure-500);
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ============================================================
   Header (matches the React navbar)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(226,232,240,0.8);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 6rem; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand > span { display: flex; flex-direction: column; line-height: 1; }
.brand__badge { width: 3rem; height: 3rem; flex: none; border-radius: 1.05rem; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.025em; color: var(--ink); line-height: 1; }
.brand__name span { color: var(--gold-500); }
.brand__tag { margin-top: 0.375rem; font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.2em; color: var(--slate-400); }
.nav__links { display: none; align-items: center; gap: 1.75rem; }
.nav__links a { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; color: var(--slate-500); padding: 0.5rem 0; transition: color .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); }
.nav__links a.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -0.35rem; height: 2px; border-radius: 2px; background: var(--gold-400); }
.nav__actions { display: none; align-items: center; gap: 1.25rem; }
@media (min-width: 1024px) { .nav__links { display: flex; } .nav__actions { display: flex; } }
.nav__phone { display: inline-flex; align-items: center; gap: 0.75rem; }
.nav__phone-icon { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; background: var(--indigo-950); color: var(--gold-400); display: inline-grid; place-items: center; transition: background .2s; }
.nav__phone:hover .nav__phone-icon { background: var(--indigo-900); }
.nav__phone-icon svg { width: 1rem; height: 1rem; }
.nav__phone-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav__phone-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--slate-400); }
.nav__phone-num { font-size: 0.875rem; font-weight: 700; color: var(--ink); }
.nav__divider { width: 1px; height: 2.25rem; background: var(--slate-200); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.875rem;
  border-radius: 999px; padding: 0.85rem 1.6rem; border: 0; cursor: pointer; transition: all .2s;
}
/* Higher specificity than `.footer a` so the button keeps its own text colour. */
a.btn--gold, .btn.btn--gold { background: var(--gold-400); color: var(--indigo-950); box-shadow: var(--shadow-soft); }
a.btn--gold:hover, .btn.btn--gold:hover { background: var(--gold-300); color: var(--indigo-950); box-shadow: var(--shadow-lift); }
a.btn--ghost, .btn.btn--ghost { background: rgba(255,255,255,0.08); color: var(--white); border: 1px solid rgba(255,255,255,0.25); }
a.btn--ghost:hover, .btn.btn--ghost:hover { background: rgba(255,255,255,0.16); color: var(--white); }

/* ============================================================
   Page header band (indigo gradient, like PageHeader.jsx)
   ============================================================ */
.pagehead { position: relative; overflow: hidden; background: var(--indigo-950); color: var(--white); }
.pagehead::before {
  content: ''; position: absolute; inset: 0; background: var(--brand-gradient);
}
/* Image variant: photo behind a dark-left → clear-right scrim. */
.pagehead--image::before { display: none; }
.pagehead__photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.pagehead__scrim { position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #0c0c24 0%, rgba(12,12,36,0.86) 42%, rgba(12,12,36,0.45) 100%),
    linear-gradient(0deg, rgba(12,12,36,0.6) 0%, transparent 55%);
}
.pagehead__grid { position: absolute; inset: 0; opacity: 0.12;
  background-image: linear-gradient(to right, rgb(255 255 255 / 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 56px 56px; }
.pagehead__inner { position: relative; padding: 4rem 0; }
@media (min-width: 1024px) { .pagehead__inner { padding: 5.5rem 0; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.875rem; color: var(--indigo-200); margin-bottom: 1.5rem; }
.crumbs a { color: var(--indigo-200); }
.crumbs a:hover { color: var(--white); }
.crumbs span[aria-current] { color: var(--white); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem; border-radius: 999px;
  background: rgba(255,255,255,0.1); color: var(--gold-300);
  padding: 0.4rem 0.9rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-400); }
.pagehead h1 { color: var(--white); font-weight: 800; font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.02em; margin-top: 1.25rem; max-width: 20ch; }
.pagehead__lede { margin-top: 1.25rem; font-size: 1.125rem; color: var(--indigo-200); max-width: 60ch; }
.pagehead__meta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: 0.9rem; color: var(--indigo-200); }
.pagehead__meta strong { color: #fff; font-weight: 600; }

/* ============================================================
   Content sections
   ============================================================ */
.section { padding: 4rem 0; }
@media (min-width: 1024px) { .section { padding: 5.5rem 0; } }

/* Post grid */
.post-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--white); border: 1px solid var(--slate-200); border-radius: 1.5rem; overflow: hidden;
  box-shadow: var(--shadow-soft); transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--indigo-200); }
.card__media { aspect-ratio: 16 / 10; background: var(--slate-100); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card__media img { transform: scale(1.04); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.card__cat { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--azure-600); }
.card__title { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin-top: 0.6rem; line-height: 1.25; }
.card__title a { color: inherit; }
.card__title a:hover { color: var(--indigo-700); }
.card__excerpt { margin-top: 0.65rem; font-size: 0.9375rem; color: var(--slate-600); flex: 1; }
.card__meta { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--slate-100); display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; color: var(--slate-500); }
.card__more { margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--ink); }
.card__more .arrow { color: var(--gold-500); transition: transform .3s; }
.card:hover .card__more .arrow { transform: translateX(3px); }

/* Single-post layout: article + sticky sidebar */
.post-layout { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .post-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3.5rem; align-items: start; } }
.post-main { min-width: 0; }

.post-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 1024px) { .post-sidebar { position: sticky; top: 7.5rem; } }
.widget { background: var(--white); border: 1px solid var(--slate-200); border-radius: 1.25rem; padding: 1.5rem; box-shadow: var(--shadow-soft); }
.widget__title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--slate-500); margin: 0 0 1rem; }

.widget--cta { position: relative; overflow: hidden; background: var(--indigo-950); border: 0; color: #fff; }
.widget--cta::before { content: ''; position: absolute; inset: 0; background: var(--brand-gradient); }
.widget--cta > * { position: relative; }
.widget--cta h3 { color: #fff; font-size: 1.2rem; font-weight: 800; margin: 0.9rem 0 0; }
.widget--cta p { color: var(--indigo-200); font-size: 0.9rem; margin: 0.6rem 0 1.2rem; }
.widget--cta .btn { width: 100%; }

.recent-post { display: flex; gap: 0.85rem; align-items: center; padding: 0.75rem 0; }
.recent-post + .recent-post { border-top: 1px solid var(--slate-100); }
.recent-post img { width: 3.5rem; height: 3.5rem; border-radius: 0.65rem; object-fit: cover; flex: none; }
.recent-post a { font-family: var(--font-display); font-weight: 600; font-size: 0.875rem; color: var(--ink); line-height: 1.3; }
.recent-post a:hover { color: var(--indigo-700); }
.recent-post .date { display: block; margin-top: 0.25rem; font-size: 0.72rem; font-weight: 400; color: var(--slate-400); }

.cat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.cat-list a { display: flex; justify-content: space-between; padding: 0.4rem 0; font-weight: 600; font-size: 0.9rem; color: var(--slate-600); border-bottom: 1px solid var(--slate-100); }
.cat-list li:last-child a { border-bottom: 0; }
.cat-list a:hover { color: var(--ink); }
.cat-list .count { color: var(--slate-400); font-weight: 500; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.share-row { display: flex; align-items: center; gap: 0.6rem; margin-top: 2.5rem; }
.share-row__label { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--slate-500); margin-right: 0.25rem; }
.share-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--slate-100); color: var(--slate-600); transition: all .2s; }
.share-btn:hover { background: var(--indigo-950); color: #fff; transform: translateY(-2px); }

/* Single article */
.article { max-width: 46rem; margin: 0 auto; }
.post-main .article { max-width: none; margin: 0; }
.article__body { font-size: 1.075rem; line-height: 1.8; color: var(--slate-700); }
.article__body h2 { font-size: 1.7rem; font-weight: 800; color: var(--ink); margin: 2.5rem 0 1rem; }
.article__body h3 { font-size: 1.35rem; font-weight: 700; color: var(--ink); margin: 2rem 0 0.85rem; }
.article__body a { color: var(--azure-600); text-decoration: underline; text-underline-offset: 3px; }
.article__body ul, .article__body ol { margin: 0 0 1.3rem; padding-left: 1.4rem; }
.article__body li { margin-bottom: 0.5rem; }
.article__body img, .article__body figure { border-radius: 1rem; margin: 2rem 0; }
.article__body blockquote {
  margin: 2rem 0; padding: 1.25rem 1.5rem; border-left: 4px solid var(--gold-400);
  background: var(--indigo-50); border-radius: 0 0.75rem 0.75rem 0; color: var(--slate-700); font-style: italic;
}
.article__body pre { background: var(--indigo-950); color: #e6e6f6; padding: 1.25rem; border-radius: 0.75rem; overflow-x: auto; }
.article__body code { font-family: ui-monospace, Menlo, monospace; font-size: 0.9em; }
.article__hero-img { border-radius: 1.5rem; margin: 0 0 2.5rem; box-shadow: var(--shadow-lift); }
.article__tags { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-chip { font-size: 0.8rem; font-weight: 600; color: var(--indigo-800); background: var(--indigo-50); border: 1px solid var(--slate-200); border-radius: 999px; padding: 0.35rem 0.85rem; }

.article-nav { max-width: 46rem; margin: 2.5rem auto 0; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--slate-200); padding-top: 1.5rem; font-family: var(--font-display); font-weight: 600; }
.article-nav a { color: var(--ink); }
.article-nav a:hover { color: var(--gold-600); }

/* Meta row on single */
.post-meta { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; color: var(--indigo-200); font-size: 0.9rem; }
.post-meta .avatar { width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--gold-400); color: var(--indigo-950); display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 0.8rem; }

/* Empty / misc */
.notice { text-align: center; padding: 4rem 1rem; color: var(--slate-500); }
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding: 0 0.5rem; border-radius: 999px; background: var(--slate-100); color: var(--slate-600); font-weight: 600; font-family: var(--font-display); }
.pagination .page-numbers.current { background: var(--indigo-950); color: #fff; }
.pagination a.page-numbers:hover { background: var(--slate-200); }

/* ============================================================
   Footer (matches the React footer)
   ============================================================ */
.site-footer { position: relative; overflow: hidden; background: var(--indigo-950); color: var(--indigo-200); }
.site-footer::before { content: ''; position: absolute; inset: 0; background: var(--brand-gradient); }
.site-footer__grid { position: absolute; inset: 0; opacity: 0.3;
  background-image: linear-gradient(to right, rgb(255 255 255 / 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 56px 56px; }
.site-footer__inner { position: relative; padding: 4rem 0; }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 2.5rem 2rem; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-cols { grid-template-columns: 2fr 1fr 1fr 2fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 1000px) { .footer-brand { grid-column: auto; } }
.footer h3 { color: #fff; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; }
.footer ul { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.9rem; }
.footer a { color: var(--indigo-200); }
.footer a:hover { color: #fff; }
.footer__about { max-width: 26rem; color: #a5a5c8; font-size: 0.9rem; margin-top: 1.25rem; line-height: 1.65; }

.footer-contact { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.9rem; }
.footer-contact a { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--indigo-200); }
.footer-contact a:hover { color: #fff; }
.footer-contact svg { width: 1rem; height: 1rem; color: var(--azure-500); flex: none; }

.offices { list-style: none; margin: 1.25rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1.25rem; font-size: 0.9rem; }
.offices li { display: flex; gap: 0.65rem; }
.offices svg { width: 1.15rem; height: 1.15rem; color: var(--azure-500); flex: none; margin-top: 0.15rem; }
.offices b { display: block; color: #fff; font-weight: 600; }
.offices .sub { color: #a5a5c8; }
.footer__bottom { position: relative; margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.75rem; color: #8a8ab0; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }
.footer__bottom a { color: var(--indigo-200); font-weight: 600; }
.footer__bottom a:hover { color: #fff; }
