/* ════════════════════════════════════════════
   OptiChain Solutions — shared styles
   Used by articles.html and all article pages.
   (index.html keeps its own inline styles.)
════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Tokens ── */
:root {
  --navy:       #0C1A2E;
  --navy-mid:   #142440;
  --navy-card:  #0F2038;
  --navy-light: #1A3A5C;
  --amber:      #E8890C;
  --amber-lt:   #F5A73A;
  --white:      #FFFFFF;
  --off-white:  #F3F5F8;
  --text-muted: #94A3B8;
  --text-dark:  #1E293B;
  --text-mid:   #475569;
  --border-dk:  rgba(255,255,255,0.07);
  --border-lt:  #E2E8F0;
  --radius:     12px;
  --radius-sm:  8px;
}

/* ── Base ── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { line-height: 1.75; }
a { color: var(--amber); text-decoration: none; transition: color .2s; }
a:hover { color: var(--amber-lt); }
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  padding: 14px 0;
  background: rgba(12, 26, 46, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-dk);
  transition: background .3s;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 800; color: var(--white);
  letter-spacing: -0.02em;
}
.brand-logo { height: 38px; width: auto; display: block; }
.f-brand .brand-logo { height: 42px; }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: .875rem; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-cta {
  background: var(--amber); color: var(--navy) !important;
  padding: 8px 20px; border-radius: var(--radius-sm);
  font-weight: 700 !important; font-size: .875rem !important;
}
.nav-cta:hover { background: var(--amber-lt) !important; }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px; transition: .3s;
}
.mobile-nav {
  display: none; position: fixed;
  top: 63px; left: 0; right: 0; z-index: 199;
  background: rgba(12,26,46,.98);
  border-bottom: 1px solid var(--border-dk);
  padding: 8px 24px 24px;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; }
.mobile-nav li { border-bottom: 1px solid var(--border-dk); }
.mobile-nav a { display: block; padding: 14px 0; color: var(--text-muted); font-size: 1rem; }
.mobile-nav a:hover { color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 13px 26px;
  border-radius: var(--radius-sm); font-weight: 700;
  font-size: .9rem; transition: .2s;
}
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: var(--amber-lt); color: var(--navy); transform: translateY(-1px); }
.btn-ghost { border: 1px solid rgba(255,255,255,.18); color: var(--white); }
.btn-ghost:hover { border-color: rgba(255,255,255,.4); color: var(--white); transform: translateY(-1px); }

/* ── Section chrome ── */
.eyebrow {
  display: inline-block; color: var(--amber);
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin-bottom: 10px;
}
.section-title { margin-bottom: 14px; }
.section-sub { font-size: 1rem; color: var(--text-muted); max-width: 620px; margin-bottom: 52px; }

/* ════════════════════════════════════════════
   ARTICLES — listing page
════════════════════════════════════════════ */
.blog-head {
  padding: 148px 0 40px;
  position: relative; overflow: hidden;
}
.blog-head::before {
  content: '';
  position: absolute; top: -20%; right: -8%;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(232,137,12,.1) 0%, transparent 68%);
  pointer-events: none;
}
.blog-wrap { padding-bottom: 96px; position: relative; z-index: 1; }

.post-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.post-card {
  display: flex; flex-direction: column;
  background: var(--navy-card); border: 1px solid var(--border-dk);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232,137,12,.35);
  box-shadow: 0 12px 32px rgba(0,0,0,.28);
}
.post-thumb {
  aspect-ratio: 16 / 9; width: 100%;
  background: linear-gradient(135deg, #142440 0%, #0C1A2E 100%);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border-dk);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb .ph-mark { height: 46px; width: auto; opacity: .9; }
.post-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.post-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.post-tag {
  background: rgba(232,137,12,.1); color: var(--amber);
  border: 1px solid rgba(232,137,12,.2);
  padding: 3px 9px; border-radius: 4px;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.post-date { font-size: .74rem; color: var(--text-muted); }
.post-card h3 { color: var(--white); margin-bottom: 10px; font-size: 1.12rem; line-height: 1.35; }
.post-card p { color: var(--text-muted); font-size: .9rem; margin-bottom: 18px; }
.post-more {
  margin-top: auto; font-size: .82rem; font-weight: 700;
  color: var(--amber); display: inline-flex; align-items: center; gap: 6px;
}
.post-card:hover .post-more { gap: 10px; }

.blog-empty {
  border: 1px dashed var(--border-dk); border-radius: var(--radius);
  padding: 56px 24px; text-align: center; color: var(--text-muted);
}

/* ════════════════════════════════════════════
   ARTICLE — single post
════════════════════════════════════════════ */
.article-head { padding: 132px 0 8px; }
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 26px;
}
.back-link:hover { color: var(--amber); }
.article {
  max-width: 760px; margin: 0 auto; padding: 0 24px 96px;
}
.article-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.article h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 20px; }
.article-lede {
  font-size: 1.15rem; color: var(--text-muted); line-height: 1.7;
  padding-bottom: 28px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border-dk);
}
.article-hero {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); margin: 8px 0 32px;
  border: 1px solid var(--border-dk);
}
.article-body { font-size: 1.03rem; color: #C9D3E0; }
.article-body h2 { color: var(--white); font-size: 1.5rem; margin: 40px 0 14px; }
.article-body h3 { color: var(--white); font-size: 1.18rem; margin: 30px 0 10px; }
.article-body p { margin-bottom: 20px; }
.article-body a { color: var(--amber); text-decoration: underline; text-underline-offset: 3px; }
.article-body ul, .article-body ol { margin: 0 0 22px 22px; }
.article-body li { margin-bottom: 9px; }
.article-body strong { color: var(--white); }
.article-body blockquote {
  border-left: 3px solid var(--amber);
  padding: 6px 0 6px 22px; margin: 26px 0;
  color: var(--white); font-size: 1.15rem; font-style: italic;
}
.article-body img { max-width: 100%; border-radius: var(--radius); margin: 24px 0; }
.article-footer {
  margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border-dk);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.share-row { display: flex; gap: 10px; align-items: center; }
.share-row span { font-size: .8rem; color: var(--text-muted); }
.share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-dk);
  color: var(--white); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 600;
}
.share-btn:hover { background: rgba(232,137,12,.14); border-color: rgba(232,137,12,.35); color: var(--white); }

/* ── Footer ── */
footer {
  background: #060E1A;
  border-top: 1px solid var(--border-dk);
  padding: 60px 0 28px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 44px; margin-bottom: 44px;
}
.f-brand p { color: var(--text-muted); font-size: .84rem; max-width: 260px; margin-top: 14px; }
.f-col h5 {
  color: var(--white); font-size: .76rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px;
}
.f-col ul { list-style: none; }
.f-col li { margin-bottom: 9px; }
.f-col a { color: var(--text-muted); font-size: .84rem; }
.f-col a:hover { color: var(--amber); }
.f-col span { color: #475569; font-size: .84rem; }
.footer-bottom {
  border-top: 1px solid var(--border-dk); padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: .78rem; color: #475569; }

/* ── Responsive ── */
@media (max-width: 960px) {
  .post-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 600px) {
  .post-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .blog-head { padding: 120px 0 32px; }
  .article-head { padding: 112px 0 4px; }
}

/* ════════════════════════════════════════════
   ARTICLES LISTING — featured card
════════════════════════════════════════════ */
.post-grid { gap: 20px; }

/* Tighter vertical rhythm on the listing. Scoped to .blog-head so the
   home page keeps its own spacing. */
.blog-head { padding: 128px 0 0; }
.blog-head .section-sub { margin-bottom: 34px; }
.blog-wrap { padding-bottom: 80px; }

/* The cover art is 16:9 with the headline figure near the left edge.
   The thumb keeps that ratio so object-fit never crops the number off. */
.post-card.featured {
  grid-column: 1 / -1;
  flex-direction: row; align-items: stretch;
  margin-bottom: 2px;
}
.post-card.featured .post-thumb {
  width: 52%; flex: 0 0 52%;
  aspect-ratio: 16 / 9; min-height: 0;
  border-bottom: none; border-right: 1px solid var(--border-dk);
}
.post-card.featured .post-thumb img { width: 100%; height: 100%; object-fit: contain; }
.post-card.featured .post-body {
  padding: 36px 40px; justify-content: center; overflow: hidden;
}
.post-card.featured h3 { font-size: 1.6rem; line-height: 1.24; margin-bottom: 12px; }
.post-card.featured p {
  font-size: .98rem; line-height: 1.6; max-width: 52ch; margin-bottom: 18px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card.featured .post-more { font-size: .88rem; }

.post-thumb img { transition: transform .4s ease; }
.post-card:hover .post-thumb img { transform: scale(1.04); }
/* No zoom on the featured cover. Scaling it would push the figure past the edge. */
.post-card.featured:hover .post-thumb img { transform: none; }

@media (max-width: 900px) {
  .post-card.featured { flex-direction: column; }
  .post-card.featured .post-thumb {
    width: 100%; flex: none; aspect-ratio: 16 / 9;
    border-right: none; border-bottom: 1px solid var(--border-dk);
  }
  .post-card.featured .post-body { padding: 26px; overflow: visible; }
  .post-card.featured h3 { font-size: 1.3rem; }
  /* Stacked, so there is no height to fight. Show the whole excerpt. */
  .post-card.featured p { font-size: .92rem; display: block; overflow: visible; }
}

/* ── Responsive video embed (article body) ── */
.video-embed {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  margin: 26px 0 10px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border-dk); background: #000;
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-cap { font-size: .84rem; color: var(--text-muted); margin-bottom: 26px; }

/* ── In-article CTA band ── */
.cta-band {
  background: var(--navy-card); border: 1px solid rgba(232,137,12,.22);
  border-radius: var(--radius); padding: 30px 32px; margin: 38px 0 30px;
}
.cta-band h3 { color: var(--white); font-size: 1.22rem; margin-bottom: 8px; }
.cta-band p { color: var(--text-muted); font-size: .95rem; margin-bottom: 20px; }
.cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }
