/* =========================================================
   Dastawez Jahan-Numa — design tokens
   Ink & parchment broadsheet, brass-gold cartographic accent
   ========================================================= */
:root {
  --ink:      #14181C;
  --ink-soft: #262B31;
  --paper:    #FAF8F3;
  --paper-2:  #F1ECE0;
  --gold:     #B8862E;
  --gold-lt:  #E4B85A;
  --crimson:  #A31621;
  --rule:     #D8D2C4;
  --muted:    #6B6558;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Source Sans 3', 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--ink);
  color: var(--paper-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .03em;
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 7px; padding-bottom: 7px; gap: 12px; flex-wrap: wrap;
}
.topbar a { color: var(--gold-lt); }
.topbar a:hover { text-decoration: underline; }
.topbar .contact { display: flex; gap: 18px; flex-wrap: wrap; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--crimson); margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(163,22,33,.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(163,22,33,.55); }
  70%  { box-shadow: 0 0 0 6px rgba(163,22,33,0); }
  100% { box-shadow: 0 0 0 0 rgba(163,22,33,0); }
}

/* ---------- Masthead ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead .wrap {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 20px 18px;
}
.masthead .logo-mark { width: 62px; height: 62px; flex: none; }
.masthead .brand-text { flex: 1; }
.masthead h1 {
  margin: 0; font-family: var(--font-display); font-weight: 900;
  font-size: clamp(28px, 4.4vw, 46px); letter-spacing: .01em; color: var(--ink);
}
.masthead .tagline {
  margin: 2px 0 0; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--gold);
}
.masthead .updated {
  text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  min-width: 150px;
}

/* compass-rose divider — signature element */
.rose-divider { height: 14px; background: var(--paper); position: relative; overflow: hidden; }
.rose-divider svg { position: absolute; left: 50%; top: -4px; transform: translateX(-50%); }

/* ---------- Nav ---------- */
nav.mainnav { background: var(--ink); border-top: 3px solid var(--gold); }
nav.mainnav .wrap { display: flex; align-items: center; }
nav.mainnav ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap;
}
nav.mainnav a {
  display: block; padding: 13px 16px; color: var(--paper-2);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,.08);
}
nav.mainnav a:hover, nav.mainnav a.active { background: var(--gold); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; color: var(--paper-2); font-size: 22px; padding: 10px 16px; cursor: pointer; }

/* ---------- Section headings ---------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--ink); margin: 44px 0 18px; padding-bottom: 8px;
}
.section-head h2 {
  font-family: var(--font-display); font-size: 26px; margin: 0; font-weight: 900;
}
.section-head .more { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; color: var(--gold); white-space: nowrap; }
.section-head .more:hover { text-decoration: underline; }
.section-desc { color: var(--muted); margin: -10px 0 20px; font-size: 14.5px; }

.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--crimson); font-weight: 700;
}

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px; padding-top: 30px; }
.hero-lead { border-bottom: 1px solid var(--rule); padding-bottom: 24px; }
.hero-lead .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--ink); border-radius: 2px; margin-bottom: 16px; }
.hero-lead .thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-lead h3 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); line-height: 1.15; margin: 10px 0 10px; font-weight: 900; }
.hero-lead p.summary { color: var(--ink-soft); font-size: 16px; margin: 0 0 10px; }
.byline { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

.hero-side { display: flex; flex-direction: column; gap: 16px; }
.hero-side .side-item { display: flex; gap: 12px; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
.hero-side .side-thumb { width: 92px; height: 68px; flex: none; overflow: hidden; border-radius: 2px; background: var(--ink); }
.hero-side .side-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-side h4 { font-family: var(--font-display); font-size: 16px; line-height: 1.25; margin: 2px 0 4px; font-weight: 700; }

/* ---------- Card grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.card { border-bottom: 1px solid var(--rule); padding-bottom: 16px; }
.card .thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--ink); border-radius: 2px; margin-bottom: 12px; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card a:hover .thumb img { transform: scale(1.045); }
.card h3 { font-family: var(--font-display); font-size: 18px; line-height: 1.28; margin: 0 0 8px; font-weight: 700; }
.card p.summary { font-size: 13.5px; color: var(--muted); margin: 0 0 8px; }
.card .meta { font-family: var(--font-mono); font-size: 11px; color: var(--muted); display: flex; justify-content: space-between; }

/* fallback-logo thumbnails (article has no image) */
.thumb.brandfall { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--ink), var(--ink-soft)); }
.thumb.brandfall img { width: 46%; height: 46%; object-fit: contain; }

/* ---------- Category list page ---------- */
.cat-list { display: flex; flex-direction: column; }
.row-item { display: grid; grid-template-columns: 150px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.row-item .thumb { aspect-ratio: 4/3; overflow: hidden; border-radius: 2px; background: var(--ink); }
.row-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-item h3 { font-family: var(--font-display); font-size: 20px; margin: 0 0 6px; font-weight: 800; }
.row-item p.summary { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 8px; }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: var(--paper-2); margin-top: 60px; }
footer .wrap { padding: 44px 20px 28px; display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 30px; }
footer h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-lt); margin: 0 0 14px; }
footer .about { font-size: 13.5px; color: #C9C4B6; line-height: 1.6; }
footer .logo-mark { width: 46px; height: 46px; margin-bottom: 12px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; font-size: 13.5px; }
footer a:hover { color: var(--gold-lt); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 16px 20px; text-align: center;
  font-family: var(--font-mono); font-size: 11.5px; color: #8b8677;
}

/* ---------- Empty state ---------- */
.empty {
  border: 1px dashed var(--rule); padding: 40px; text-align: center; color: var(--muted);
  font-family: var(--font-mono); font-size: 13px; margin: 30px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .masthead .updated { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  nav.mainnav ul { display: none; flex-direction: column; width: 100%; }
  nav.mainnav ul.open { display: flex; }
  nav.mainnav a { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .row-item { grid-template-columns: 100px 1fr; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
