/* =========================================================
   Fortunexdigital — main stylesheet
   Identity: a working ledger / bank passbook, not a template.
   Deep postal-stamp red + white ledger paper, red foil accents.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    /* -- brand: postal-stamp red + red foil -- */
    --primary: #a3121f;
    --primary-dark: #6e0c15;
    --accent: #c41c2a;
    --accent-dark: #6e0c15;
    --brass: #8a0f18;
    --brass-dark: #5c0a10;
    --debit: #7a1015;      /* used sparingly — a used-ink red, not the brand color */

    --ink: #1a1414;
    --muted: #6b6455;
    --bg: #fff5f5;         /* ledger paper white */
    --bg-soft: #fdf2f2;    /* deeper paper, shaded page */
    --border: #f0d3d3;     /* rule lines */

    --radius: 3px;         /* ticket corners, not pill/app corners */
    --shadow: 0 14px 30px rgba(18, 53, 36, .14);
    --maxw: 1140px;

    --font: "IBM Plex Sans", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    --font-display: "Fraunces", Georgia, serif;
    --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background:
        repeating-linear-gradient(
            to bottom,
            transparent, transparent 41px,
            var(--border) 41px, var(--border) 42px
        ),
        var(--bg);
    line-height: 1.7;
    font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--brass-dark); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); font-family: var(--font-display); font-weight: 600; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 10px; top: 10px; background: #fff; padding: 8px 12px; z-index: 1000; border-radius: 6px; }
.muted { color: var(--muted); font-size: .9em; }

/* Small mono "ledger" eyebrow tag — used ahead of section titles to read like
   a bank-statement field label. Encodes what the section actually is. */
.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--brass-dark);
    margin: 0 0 10px;
}
.eyebrow::before { content: "— "; color: var(--border); }

/* Buttons — a stamped ticket, not a soft pill */
.btn-cta, .btn-primary {
    display: inline-block;
    position: relative;
    background: var(--primary);
    color: #fff !important;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 1px solid var(--primary-dark);
    outline: 2px solid transparent;
    outline-offset: 3px;
    box-shadow: 0 1px 0 rgba(255,255,255,.08) inset;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, outline-color .15s ease;
}
.btn-cta:hover, .btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); color: #fff !important; }
.btn-cta:focus-visible, .btn-primary:focus-visible { outline-color: var(--brass); }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary) !important; font-family: var(--font-mono); text-transform: uppercase; font-size: 13px; letter-spacing: .04em; padding: 11px 22px; border-radius: var(--radius); }
.btn-outline:hover { background: var(--primary); color: #fff !important; }

/* A rubber-stamp badge — the one signature flourish. Used once in the hero
   and echoed small on post thumbnails. Keep it rare on purpose. */
.stamp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 108px;
    border: 2px dashed rgba(138,15,24,.85);
    border-radius: 50%;
    transform: rotate(-9deg);
    color: var(--brass);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
    padding: 10px;
    mix-blend-mode: multiply;
}

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 500;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: none;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand img { height: 36px; width: auto; }
.nav-toggle { display: none; background: none; border: none; font-size: 26px; cursor: pointer; color: var(--ink); }
.main-nav ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; }
.main-nav a { color: var(--ink); font-weight: 500; font-size: 14px; padding: 8px 0; display: inline-block; font-family: var(--font-mono); letter-spacing: .02em; }
.main-nav a:hover { color: var(--brass-dark); }
.main-nav .btn-cta { color: #fff !important; padding: 10px 18px; }
.main-nav a .nav-ico { vertical-align: -2px; margin-right: 6px; }
.has-dropdown { position: relative; }
.dropdown {
    position: absolute; top: 100%; left: 0; min-width: 220px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); list-style: none; padding: 6px 0; margin: 10px 0 0;
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s ease;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown li a { display: block; padding: 8px 18px; font-weight: 500; }
.dropdown li a:hover { background: var(--bg-soft); }

/* Hero — the passbook opening spread. A ledger entry, not a gradient banner. */
.hero {
    padding: 88px 0 76px;
    text-align: left;
    border-bottom: 4px solid var(--brass);
    position: relative;
    overflow: hidden;
}
.hero .container { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; max-width: 780px; }
.hero h1 { font-size: clamp(30px, 5vw, 48px); margin: 0; color: var(--ink); font-weight: 600; }
.hero h1::before {
    content: "Deposit Entry №1";
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--brass);
    margin-bottom: 14px;
}
.hero p { font-size: 18px; color: var(--muted); max-width: 560px; margin: 0; }
.optin { display: flex; gap: 10px; flex-wrap: wrap; max-width: 560px; margin: 6px 0 0; align-items: center; }
.optin input { flex: 1 1 240px; padding: 13px 16px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 15px; background: #fff; color: var(--ink); font-family: var(--font-mono); }
.optin input::placeholder { color: var(--muted); }
.optin button { flex: 0 0 auto; }

/* Sections */
.section { padding: 60px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: left; font-size: clamp(24px, 4vw, 32px); margin: 0 0 6px; }
.section-sub { text-align: left; color: var(--muted); margin: 0 0 34px; max-width: 540px; }

/* Featured-on — a strip of press clippings, not a logo wall */
.featured-on { text-align: center; padding: 26px 0; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.featured-on h4 { font-family: var(--font-mono); letter-spacing: .16em; color: var(--muted); font-size: 11px; text-transform: uppercase; margin: 0; font-weight: 500; }
.logo-strip { display: flex; gap: 36px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.logo-strip span { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 18px; color: var(--ink); letter-spacing: .01em; opacity: .75; }

/* Author box — signed at the bottom of the page like a passbook signature */
.author-box { display: flex; gap: 22px; align-items: center; background: #fff; border: 1px solid var(--border); border-left: 3px solid var(--brass); border-radius: var(--radius); padding: 26px; max-width: 580px; margin: 0 auto; box-shadow: var(--shadow); }
.author-box img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg-soft); }
.author-box h3 { margin: 0 0 4px; font-size: 20px; }
.author-box p { margin: 0 0 14px; color: var(--muted); }

/* Category grid — ledger line items, each row a topic to open */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card {
    display: block; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: #fff; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brass); }
.cat-card .thumb {
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    background-color: var(--primary);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.cat-card .thumb::after {
    content: "";
    position: absolute; top: 10px; right: 10px; width: 8px; height: 8px;
    border-radius: 50%; background: var(--brass);
}
.cat-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card .body { padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cat-card .body h3 { margin: 0; font-size: 16px; font-family: var(--font-mono); font-weight: 600; color: var(--ink); }

/* Category archive — identifying image banner */
.cat-hero { margin: 0 0 28px; }
.cat-hero img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius); }

/* Training block — a channel entry, styled like a stub in the book */
.training { background: var(--bg-soft); color: var(--ink); text-align: left; padding: 54px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.training .container { max-width: 620px; }
.training h2 { color: var(--ink); }
.training p { color: var(--muted); margin-bottom: 22px; }

/* Popular posts — statement entries with mono dates, not stock blog cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.post-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .15s ease, transform .15s ease; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.post-card .thumb { aspect-ratio: 16/9; background: var(--accent); display: grid; place-items: center; color: #fff5f5; font-weight: 600; font-family: var(--font-display); padding: 10px; text-align: center; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .meta { color: var(--brass-dark); font-size: 12px; font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.post-card h3 { font-size: 18px; margin: 0; font-family: var(--font-display); font-weight: 600; }
.post-card h3 a { color: var(--ink); }
.post-card .read-more { margin-top: auto; font-weight: 600; color: var(--primary); font-family: var(--font-mono); font-size: 13px; letter-spacing: .02em; text-transform: uppercase; }

/* Big CTA banner — closing entry, stamp red not a gradient poster */
.cta-banner { text-align: left; padding: 54px 0; border-top: 4px solid var(--brass); }
.cta-banner .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-banner h2 { margin: 0 0 6px; }
.cta-banner p { color: var(--muted); margin: 0; }

/* Single post */
.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.article { background: transparent; }
.article .post-hero-img { width: 100%; aspect-ratio: 16/8; border-radius: var(--radius); object-fit: cover; display: block; margin-bottom: 22px; background: var(--primary); }
.article h1 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 10px; }
.article .post-meta { color: var(--muted); margin-bottom: 22px; font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.article-content { font-size: 18px; }
.article-content h2 { margin-top: 34px; font-size: 25px; font-family: var(--font-display); }
.article-content h3 { margin-top: 26px; font-size: 20px; font-family: var(--font-display); }
.article-content p { margin: 16px 0; }
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 22px; }
.article-content blockquote { border-left: 3px solid var(--brass); margin: 20px 0; padding: 8px 18px; background: var(--bg-soft); border-radius: 0; color: var(--muted); font-family: var(--font-display); font-style: italic; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 28px 0; }
.share-row a { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 16px; font-size: 13px; color: var(--ink); font-family: var(--font-mono); }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0; }
.tag-row a { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 14px; font-size: 12px; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .03em; }

/* Sidebar */
.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 20px; }
.widget { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.widget h4 { margin: 0 0 12px; font-size: 15px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 9px 0; border-bottom: 1px dashed var(--border); }
.widget ul li:last-child { border-bottom: none; }
.widget-optin { background: var(--bg-soft); }
.widget-optin h4 { color: var(--ink); }
.widget-optin input { width: 100%; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; color: var(--ink); margin-bottom: 8px; font-family: var(--font-mono); }

/* Author bio footer in post */
.post-author { display: flex; gap: 16px; align-items: center; background: var(--bg-soft); border-radius: var(--radius); border-left: 3px solid var(--brass); padding: 20px; margin: 30px 0; }
.post-author img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.post-author h4 { margin: 0 0 4px; }

/* Related */
.related { margin-top: 30px; }

/* Breadcrumbs */
.breadcrumbs { font-size: 13px; color: var(--muted); padding: 16px 0 0; font-family: var(--font-mono); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span.sep { margin: 0 8px; }

/* Pagination */
.pagination ul { list-style: none; display: flex; gap: 8px; justify-content: center; padding: 0; margin: 30px 0; }
.pagination a { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--ink); font-family: var(--font-mono); font-size: 13px; }
.pagination .active a, .pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Footer */
.site-footer { background: var(--bg); color: var(--ink); padding: 54px 0 24px; margin-top: 40px; border-top: 4px solid var(--brass); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-brand img { height: 34px; }
.footer-col h4 { color: var(--ink); margin: 0 0 14px; font-size: 14px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { padding: 5px 0; }
.footer-col ul li a { color: var(--muted); }
.footer-col ul li a:hover { color: var(--brass); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; font-family: var(--font-mono); color: var(--muted); }
.footer-bottom .legal { list-style: none; display: flex; gap: 16px; padding: 0; margin: 0; }
.footer-bottom .legal a { color: var(--muted); }

/* Cookie banner */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; color: var(--ink); padding: 14px 20px; display: flex; gap: 16px; align-items: center; justify-content: center; flex-wrap: wrap; z-index: 9999; border-top: 1px solid var(--border); box-shadow: 0 -6px 20px rgba(18, 53, 36, .08); }
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; font-size: 13px; }
.cookie-banner a { color: var(--primary); text-decoration: underline; }
.cookie-banner button { background: var(--primary); color: #fff; border: none; padding: 9px 18px; border-radius: var(--radius); cursor: pointer; font-weight: 600; font-family: var(--font-mono); text-transform: uppercase; font-size: 12px; }
.cookie-banner button:hover { background: var(--primary-dark); }

/* Forms (contact, comment, search) */
form.contact, .comment-form, form.search-form { max-width: 640px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.contact label, .comment-form label { display: block; font-weight: 600; margin: 12px 0 6px; font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.contact input, .contact textarea, .comment-form input, .comment-form textarea, .search-form input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 16px; font-family: var(--font); }
.search-form { display: flex; gap: 10px; align-items: flex-end; max-width: 700px; margin: 0 auto 30px; }
.search-form .field { flex: 1; }
.search-results .post-card { margin-bottom: 20px; }

/* Static page */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 30px 0 10px; }
.page-wrap h1 { font-size: clamp(28px, 4vw, 40px); }

/* 404 */
.notfound { text-align: center; padding: 90px 20px; }
.notfound h1 { font-size: 90px; color: var(--primary); margin: 0; font-family: var(--font-mono); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Responsive */
@media (max-width: 900px) {
    .post-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .cat-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cta-banner .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 720px) {
    .nav-toggle { display: block; }
    .main-nav { position: absolute; top: 72px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); display: none; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px; }
    .main-nav li { width: 100%; border-bottom: 1px solid var(--border); }
    .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding-left: 14px; }
    .cat-grid, .post-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .author-box { flex-direction: column; text-align: center; }
    .hero .container { align-items: flex-start; }
}