/* ============================================================
   logomentary.com — canonical chrome stylesheet
   Shared by every non-home page (legal, blog, landing, future).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ------------------------------------------------------------
   Design tokens
   ------------------------------------------------------------ */
:root {
    --bg: #0a0a0a;
    --bg-card: #161616;
    --bg-elevated: #111111;
    --text: #f0f0f0;
    --text-muted: #888888;
    --accent: #c8ff00;
    --accent-fg: #0a0a0a;
    --accent-hover: #a3cc00;
    --border: #222222;
    --radius: 12px;
}

/* ------------------------------------------------------------
   Reset / baseline
   ------------------------------------------------------------ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    z-index: 1000;
    width: auto;
    height: auto;
    padding: 12px 20px;
    background: var(--accent);
    color: var(--accent-fg);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 8px;
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* ------------------------------------------------------------
   Buttons (reusable across chrome and content)
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: var(--accent-fg);
    font-weight: 600;
    font-size: .9rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s;
    font-family: inherit;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 255, 0, .25);
    background: var(--accent-hover);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 8px 30px rgba(200, 255, 0, .1);
}

/* ------------------------------------------------------------
   HEADER / NAV — scoped to `header nav` so article-level
   <nav class="toc"> and <nav class="breadcrumbs"> don't inherit
   fixed positioning.
   ------------------------------------------------------------ */
header nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 0;
    transition: background .3s, backdrop-filter .3s, padding .3s;
}

header nav.scrolled {
    background: rgba(10, 10, 10, .85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

header nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

header .logo span { color: var(--accent); }

header .nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

header .nav-links a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .2s;
}

header .nav-links a:hover { color: var(--text); }

header .nav-links .btn {
    color: var(--accent-fg);
}

header .hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

header .hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: .3s;
    display: block;
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 99;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
}

.mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.8rem;
    cursor: pointer;
}

/* ------------------------------------------------------------
   FIXED-NAV COMPENSATION — blog / legal / landing pages mark
   <body class="pbn-blog-page"> so main content clears the fixed
   header. Nav height = 14 + 14 + ~24 (scrolled) ≈ 52px; use 88px
   to leave breathing room.
   ------------------------------------------------------------ */
body.pbn-blog-page > main {
    padding-top: 88px;
}

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
footer {
    border-top: 1px solid var(--border);
    padding: 60px 0 40px;
    background: var(--bg);
    color: var(--text);
}

footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

footer .footer-brand .logo {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--text);
}

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

footer .footer-brand p {
    color: var(--text-muted);
    font-size: .9rem;
    margin-top: 12px;
    max-width: 280px;
    line-height: 1.6;
}

footer .footer-partner {
    margin-top: 20px !important;
    max-width: 320px;
}

footer .footer-partner a {
    color: var(--text);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(200, 255, 0, 0.35);
    text-underline-offset: 3px;
    transition: color .2s, text-decoration-color .2s;
}

footer .footer-partner a:hover {
    color: var(--accent);
    text-decoration-color: var(--accent);
}

footer .footer-col h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    margin-bottom: 16px;
    font-size: .95rem;
    color: var(--text);
}

footer .footer-col ul { list-style: none; margin: 0; padding: 0; }

footer .footer-col li { margin-bottom: 10px; }

footer .footer-col a {
    color: var(--text-muted);
    font-size: .9rem;
    transition: color .2s;
}

footer .footer-col a:hover { color: var(--text); }

footer .footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    font-size: .85rem;
    color: var(--text-muted);
    gap: 24px;
    flex-wrap: wrap;
}

footer .footer-socials {
    display: flex;
    gap: 20px;
}

footer .footer-socials a {
    color: var(--text-muted);
    transition: color .2s;
}

footer .footer-socials a:hover { color: var(--accent); }

/* ------------------------------------------------------------
   ARTICLE / BLOG-POST CONTAINER
   ------------------------------------------------------------ */
.article-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    color: var(--text);
}

.article-container h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    color: var(--text);
}

.article-container .meta {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.article-container .meta a { color: var(--accent); }

.article-container .featured-image {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 0 40px;
    border: 1px solid var(--border);
}

.article-container .featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-container .content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
}

.article-container .content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 56px 0 16px;
    line-height: 1.25;
    color: var(--text);
}

.article-container .content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 40px 0 12px;
    line-height: 1.3;
    color: var(--text);
}

.article-container .content h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 32px 0 10px;
    color: var(--text);
}

.article-container .content p { margin: 0 0 20px; }

.article-container .content ul,
.article-container .content ol {
    margin: 0 0 24px;
    padding-left: 28px;
}

.article-container .content li { margin-bottom: 8px; }

.article-container .content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(200, 255, 0, .35);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s;
}

.article-container .content a:hover { text-decoration-color: var(--accent); }

.article-container .content img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 32px 0;
    border: 1px solid var(--border);
}

.article-container .content blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 0 8px 20px;
    margin: 28px 0;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.05rem;
}

.article-container .content pre {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    font-size: .9rem;
    line-height: 1.6;
    margin: 24px 0;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
    color: var(--text);
}

.article-container .content code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: .9em;
    font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
    color: var(--accent);
}

.article-container .content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
}

.article-container .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: .95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-container .content th,
.article-container .content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-container .content th {
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
}

.article-container .content tr:last-child td { border-bottom: none; }

.article-container .content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* ------------------------------------------------------------
   TOC / BREADCRUMBS — reset so they don't inherit any nav rules
   that may have leaked from ancestor selectors.
   ------------------------------------------------------------ */
nav.toc {
    position: static;
    z-index: auto;
    width: auto;
    top: auto;
    left: auto;
    right: auto;
    padding: 24px;
    margin: 32px 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: none;
    backdrop-filter: none;
}

nav.toc h2,
nav.toc .toc-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 16px;
}

nav.toc ul,
nav.toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav.toc li { margin-bottom: 8px; }

nav.toc a {
    color: var(--text-muted);
    font-size: .95rem;
    transition: color .2s;
}

nav.toc a:hover { color: var(--accent); }

nav.breadcrumbs {
    position: static;
    z-index: auto;
    width: auto;
    top: auto;
    left: auto;
    right: auto;
    padding: 0;
    margin: 0 0 24px;
    background: transparent;
    border: none;
    font-size: .85rem;
    color: var(--text-muted);
    transition: none;
    backdrop-filter: none;
}

nav.breadcrumbs a {
    color: var(--text-muted);
    transition: color .2s;
}

nav.breadcrumbs a:hover { color: var(--accent); }

nav.breadcrumbs .sep {
    margin: 0 8px;
    color: var(--border);
}

/* ------------------------------------------------------------
   TAGS / CHIPS
   ------------------------------------------------------------ */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: .8rem;
    color: var(--text-muted);
    transition: border-color .2s, color .2s;
}

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

/* ------------------------------------------------------------
   SHARE BUTTONS — bottom inline row (36px circular icons)
   ------------------------------------------------------------ */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.share-buttons .share-label {
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-right: 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: .92;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4);
}

.share-btn svg { width: 16px; height: 16px; fill: currentColor; display: block; }

.share-btn-x  { background: #000000; }
.share-btn-fb { background: #1877F2; }
.share-btn-li { background: #0A66C2; }
.share-btn-wa { background: #25D366; }
.share-btn-tg { background: #229ED9; }

/* ------------------------------------------------------------
   SHARE POPOVER — BBC-style top-of-article share dropdown
   ------------------------------------------------------------ */
.share-popover-wrap {
    position: relative;
    display: inline-block;
}

.share-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50px;
    color: var(--text);
    font-family: inherit;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, color .2s;
}

.share-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.share-toggle svg { width: 14px; height: 14px; fill: currentColor; }

.share-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
    padding: 8px;
    z-index: 50;
}

.share-popover[hidden] { display: none; }

.share-pop-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text);
    font-size: .9rem;
    transition: background .15s;
    text-decoration: none;
}

.share-pop-item:hover { background: var(--bg-elevated); }

.share-pop-item .share-pop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #fff;
    flex-shrink: 0;
}

.share-pop-item .share-pop-icon svg { width: 13px; height: 13px; fill: currentColor; }

.share-pop-x  .share-pop-icon { background: #000000; }
.share-pop-fb .share-pop-icon { background: #1877F2; }
.share-pop-li .share-pop-icon { background: #0A66C2; }
.share-pop-wa .share-pop-icon { background: #25D366; }
.share-pop-tg .share-pop-icon { background: #229ED9; }

/* ------------------------------------------------------------
   RELATED POSTS
   ------------------------------------------------------------ */
.related-posts {
    margin: 64px 0 32px;
    padding-top: 48px;
    border-top: 1px solid var(--border);
}

.related-posts h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--text);
    letter-spacing: -0.01em;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform .3s, border-color .3s;
    color: var(--text);
}

.related-card:hover {
    transform: translateY(-3px);
    border-color: #333;
}

.related-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
}

.related-card p {
    color: var(--text-muted);
    font-size: .85rem;
    line-height: 1.5;
}

/* ------------------------------------------------------------
   BLOG LIST GRID
   ------------------------------------------------------------ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin: 40px 0 60px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .3s, box-shadow .3s, border-color .3s;
    color: var(--text);
    text-decoration: none;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: #333;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}

.post-card-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: var(--bg-elevated);
    position: relative;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-image-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px;
    background:
        linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%),
        radial-gradient(circle at 80% 20%, rgba(200, 255, 0, .08) 0%, transparent 50%);
    background-blend-mode: normal;
    position: relative;
}

.post-card-image-fallback::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(45deg,
            transparent 0, transparent 20px,
            rgba(200, 255, 0, .03) 20px, rgba(200, 255, 0, .03) 40px);
    pointer-events: none;
}

.post-card-image-fallback .ph-cat {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    position: relative;
    z-index: 1;
}

.post-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.cat-link {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    text-decoration: none;
}

.cat-link:hover { color: var(--accent-hover); }

.post-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0;
}

.post-card-meta {
    font-size: .8rem;
    color: var(--text-muted);
}

.post-card-excerpt {
    font-size: .92rem;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* ------------------------------------------------------------
   CATEGORY PILLS (above blog grid)
   ------------------------------------------------------------ */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 32px;
    padding-bottom: 4px;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background .2s, border-color .2s, color .2s;
    text-decoration: none;
    white-space: nowrap;
}

.cat-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.cat-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-fg);
}

/* ------------------------------------------------------------
   PAGINATION
   ------------------------------------------------------------ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 48px 0;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .9rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .2s, color .2s, background .2s;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-fg);
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
    footer .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    header .nav-links { display: none; }
    header .hamburger { display: flex; }
    body.pbn-blog-page > main { padding-top: 76px; }
    footer .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    footer .footer-bottom { flex-direction: column; align-items: flex-start; }
    .categories { overflow-x: auto; flex-wrap: nowrap; margin-left: -8px; padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 640px) {
    .posts-grid { grid-template-columns: 1fr; gap: 20px; }
    .related-grid { grid-template-columns: 1fr; }
    .article-container { padding: 32px 20px 64px; }
    .article-container .content h2 { font-size: 1.5rem; margin-top: 40px; }
    .article-container .content h3 { font-size: 1.2rem; }
}
