/*
Theme Name: Ledger Business
Theme URI: https://businesstomark.com
Author: Business To Mark
Description: A clean, editorial WordPress theme built to showcase Business category articles only. Ledger-inspired design with a scrolling topic ticker, bold serif headlines, and a distraction-free reading layout.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: ledger-business
*/

/* ===========================================================
   DESIGN TOKENS
   =========================================================== */
:root {
  --ink:        #10223B;   /* headlines, header bg */
  --ink-soft:   #33425C;   /* secondary text on light */
  --paper:      #EFF1EC;   /* page background (cool, not cream) */
  --paper-card: #FFFFFF;   /* card background */
  --rule:       #D7DAD2;   /* hairline dividers */
  --gold:       #B8892B;   /* brass accent - category tags, links */
  --gold-dark:  #8C6820;
  --teal:       #1E6E62;   /* secondary accent - hover states */
  --paper-dark: #E4E6E0;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-dark); }

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

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

/* ===========================================================
   MASTHEAD
   =========================================================== */
.site-masthead {
  background: var(--ink);
  color: #fff;
  padding: 22px 0 18px;
}
.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.01em;
  color: #fff;
}
.site-logo:hover { color: #fff; opacity: 0.85; }
.site-logo span { color: var(--gold); }
.site-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9AA6BB;
  margin-top: 2px;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0; padding: 0;
}
.primary-nav a {
  color: #D9DEE8;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.primary-nav a:hover { color: var(--gold); }

/* Signature element: scrolling topic ticker */
.topic-ticker {
  background: var(--gold);
  color: var(--ink);
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid rgba(0,0,0,0.08);
}
.ticker-track {
  display: inline-flex;
  gap: 40px;
  padding: 9px 0;
  animation: ticker-scroll 34s linear infinite;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ticker-track span::before { content: "▪"; margin-right: 10px; opacity: 0.55; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* ===========================================================
   FEATURED / HERO
   =========================================================== */
.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.08;
  font-weight: 600;
  margin: 10px 0 16px;
  letter-spacing: -0.01em;
}
.hero-excerpt {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 18px;
}
.hero-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-image {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--ink) 0%, #1c3358 100%);
  border-radius: 2px;
}

/* ===========================================================
   ARTICLE GRID
   =========================================================== */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 44px 0 22px;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}
.section-heading .rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
  margin-left: 18px;
}
.section-heading .view-all {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-left: 18px;
  white-space: nowrap;
}
.section-heading .view-all:hover { color: var(--gold-dark); }

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 50px;
}
.article-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.article-card .thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--paper-dark), var(--rule));
}
.article-card .body { padding: 18px 20px 22px; }
.article-card .cat {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
}
.article-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
  margin: 8px 0 10px;
}
.article-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 10px;
}
.article-card .date {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #8A93A3;
}

/* ===========================================================
   SINGLE POST (with sidebar)
   =========================================================== */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  padding: 48px 24px 70px;
  align-items: start;
}
.single-article {
  max-width: 100%;
  margin: 0;
  padding: 0;
}
.single-article .cat {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.single-article h1 {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.15;
  margin: 12px 0 16px;
}
.single-article .meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.single-article .entry-content { font-size: 18px; line-height: 1.75; }
.single-article .entry-content p { margin: 0 0 20px; }
.single-article .entry-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 36px 0 14px;
}
.featured-image {
  width: 100%;
  aspect-ratio: 16/8;
  overflow: hidden;
  border-radius: 3px;
  margin-bottom: 28px;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
@media (max-width: 600px) {
  .featured-image { aspect-ratio: 4/3; }
}

/* --- Sidebar --- */
.site-sidebar {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.widget {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 20px 22px;
}
.widget h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}
.widget-list { list-style: none; margin: 0; padding: 0; }
.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.widget-list li:last-child { border-bottom: none; padding-bottom: 0; }
.widget-list a { font-size: 14px; font-weight: 500; line-height: 1.4; }
.widget-date { font-family: var(--font-mono); font-size: 11px; color: #8A93A3; }
.widget-cats li { flex-direction: row; justify-content: space-between; align-items: center; }
.widget-cats a { font-size: 14px; }
.widget-cats span { font-family: var(--font-mono); font-size: 11.5px; color: #8A93A3; }

.widget-newsletter { background: var(--ink); border-color: var(--ink); }
.widget-newsletter h4 { color: #fff; border-bottom-color: var(--gold); }
.widget-newsletter p { color: #B9C2D4; font-size: 13.5px; margin: 0 0 14px; }
.nl-form { display: flex; flex-direction: column; gap: 8px; }
.nl-form input {
  padding: 10px 12px; border: 1px solid #2C3F63; border-radius: 2px;
  background: #16264A; color: #fff; font-family: var(--font-body); font-size: 13.5px;
}
.nl-form input::placeholder { color: #6E7C99; }
.nl-form button {
  padding: 10px; border: none; border-radius: 2px;
  background: var(--gold); color: var(--ink); font-weight: 700;
  font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; cursor: pointer;
}
.nl-form button:hover { background: var(--gold-dark); color: #fff; }

@media (max-width: 900px) {
  .single-layout { grid-template-columns: 1fr; }
  .site-sidebar { position: static; }
}


/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer {
  background: var(--ink);
  color: #9AA6BB;
  margin-top: 60px;
  padding: 34px 0;
  font-size: 13px;
}
.site-footer a { color: #D9DEE8; }
.site-footer a:hover { color: var(--gold); }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 32px; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .primary-nav ul { gap: 16px; }
}
@media (max-width: 560px) {
  .article-grid { grid-template-columns: 1fr; }
  .masthead-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Accessibility: visible focus */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
