/* ==========================================================================
   Capital Perspective — shared stylesheet
   ========================================================================== */

:root {
  --bg: #0a0c10;
  --bg-elevated: #12151c;
  --bg-card: #151922;
  --border: #232838;
  --border-soft: #1a1e29;
  --text: #e9e7e0;
  --text-muted: #9aa0ac;
  --text-faint: #656c7a;
  --accent: #c9a961;
  --accent-dim: #8a7642;
  --up: #4caf7d;
  --down: #d9695f;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

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

::selection { background: var(--accent-dim); color: #0a0c10; }

/* ---------------- Ticker tape ---------------- */

.ticker-bar {
  background: #06070a;
  border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  height: 38px;
  display: flex;
  align-items: center;
}

.ticker-bar::before,
.ticker-bar::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.ticker-bar::before { left: 0; background: linear-gradient(90deg, #06070a, transparent); }
.ticker-bar::after { right: 0; background: linear-gradient(270deg, #06070a, transparent); }

.ticker-track {
  display: inline-flex;
  align-items: center;
  animation: ticker-scroll 45s linear infinite;
  will-change: transform;
}

.ticker-bar:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 0 22px;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.ticker-symbol {
  color: var(--text);
  font-weight: 600;
}

.ticker-price {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.ticker-change {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.ticker-change.up { color: var(--up); }
.ticker-change.down { color: var(--down); }

.ticker-note {
  font-size: 11px;
  color: var(--text-faint);
}

/* ---------------- Header / nav ---------------- */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 16px;
}

.brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand .mark {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

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

.main-nav a.active {
  color: var(--text);
  border-bottom: 1px solid var(--accent);
}

.nav-cta {
  border: 1.5px solid var(--text-faint) !important;
  padding: 8px 18px !important;
  border-radius: 3px;
  color: var(--text) !important;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent) !important; }

/* ---------------- Buttons / forms ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #0a0c10;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--sans);
}
.btn:hover { background: transparent; color: var(--accent); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text-faint);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

input[type="email"], input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  font-size: 14px;
  border-radius: 3px;
  font-family: var(--sans);
  outline: none;
}
input[type="email"]:focus, input[type="text"]:focus { border-color: var(--accent); }
input::placeholder { color: var(--text-faint); }

/* ---------------- Hero ---------------- */

.hero {
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}

.hero-tag {
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1.12;
  font-weight: 600;
  margin: 0 0 26px;
  max-width: 760px;
  letter-spacing: -0.01em;
}

.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 40px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- Sections ---------------- */

section.block {
  padding: 76px 0;
  border-bottom: 1px solid var(--border-soft);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 44px;
  gap: 24px;
  flex-wrap: wrap;
}

.section-head .kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
  display: block;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  margin: 0;
}

.section-head .see-all {
  font-size: 13.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  white-space: nowrap;
}
.section-head .see-all:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------- Article cards ---------------- */

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

.article-grid.home-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .article-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--border);
  transform: translateY(-2px);
}

.card .tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 14px;
}

.card h3 {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.35;
  font-weight: 600;
  margin: 0 0 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 20px;
  flex-grow: 1;
}

.card .meta {
  font-size: 12.5px;
  color: var(--text-faint);
  display: flex;
  gap: 10px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

/* Featured / large card variant */
.card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 0;
  overflow: hidden;
}
.card.featured .fig {
  background: linear-gradient(145deg, #1a1f2b, #0d1017);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-soft);
}
.card.featured .fig .glyph {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent-dim);
}
.card.featured .body {
  padding: 30px 30px 30px 0;
  display: flex;
  flex-direction: column;
}
.card.featured h3 { font-size: 26px; }
@media (max-width: 900px) {
  .card.featured { grid-column: span 2; grid-template-columns: 1fr; }
  .card.featured .fig { border-right: none; border-bottom: 1px solid var(--border-soft); min-height: 160px; }
  .card.featured .body { padding: 26px; }
}
@media (max-width: 640px) {
  .card.featured { grid-column: span 1; }
}

/* ---------------- About / split section ---------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
}

.split h2 {
  font-family: var(--serif);
  font-size: 32px;
  margin: 0 0 20px;
}

.split p {
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.75;
}

.pull-quote {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.5;
  color: var(--text);
  border-left: 2px solid var(--accent);
  padding-left: 26px;
  font-style: italic;
}

.stat-row {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.stat-row .stat .num {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--accent);
  font-weight: 600;
}
.stat-row .stat .label {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-top: 4px;
}

/* ---------------- Subscribe box ---------------- */

.subscribe {
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.subscribe::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top, rgba(201,169,97,0.08), transparent 60%);
  pointer-events: none;
}

.subscribe h2 {
  font-family: var(--serif);
  font-size: 30px;
  margin: 0 0 12px;
  position: relative;
}

.subscribe p {
  color: var(--text-muted);
  max-width: 460px;
  margin: 0 auto 30px;
  position: relative;
}

.subscribe-form {
  display: flex;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.subscribe-form input { flex: 1; }

@media (max-width: 520px) {
  .subscribe { padding: 40px 24px; }
  .subscribe-form { flex-direction: column; }
}

.subscribe-fineprint {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 16px;
  position: relative;
}

.form-success {
  display: none;
  color: var(--up);
  font-size: 14px;
  margin-top: 16px;
  position: relative;
}
.form-success.show { display: block; }

/* ---------------- Category filters (articles page) ---------------- */

.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.filter-pill {
  font-size: 13px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  background: transparent;
  font-family: var(--sans);
  transition: all 0.15s ease;
}
.filter-pill:hover { border-color: var(--accent); color: var(--text); }
.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0c10;
  font-weight: 600;
}

/* ---------------- Article reading page ---------------- */

.article-header {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--border-soft);
}

.article-header .wrap {
  max-width: 820px;
  margin: 0 auto;
}

.article-header .tag {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 20px;
}

.article-header h1 {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 22px;
  max-width: 820px;
}

.article-header .dek {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 820px;
  line-height: 1.7;
  margin: 0 0 28px;
}

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  color: var(--text-faint);
}

.byline .avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent-dim), #4a3f22);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: 220px 820px 220px;
  gap: 56px;
  justify-content: center;
  align-items: start;
  margin: 56px auto 0;
  padding: 0 28px;
}

.article-body {
  font-size: 18px;
  line-height: 1.85;
  color: #d8d6cf;
  padding-bottom: 90px;
  min-width: 0;
}

.article-body h2 { scroll-margin-top: 130px; }

.article-body p { margin: 0 0 26px; }

/* ---- Side rails: table of contents + subscribe card ---- */

.article-toc,
.subscribe-rail {
  position: sticky;
  top: 140px;
}

.article-toc {
  border-right: 1px solid var(--border-soft);
  padding-right: 28px;
}

.subscribe-rail {
  border-left: 1px solid var(--border-soft);
  padding-left: 28px;
}

.rail-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

.toc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toc-list a {
  display: block;
  font-size: 13.5px;
  color: var(--text-faint);
  line-height: 1.5;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -14px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc-list a:hover { color: var(--text-muted); }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); }

.rail-copy {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 16px;
}

.rail-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rail-subscribe-form input { width: 100%; padding: 11px 14px; font-size: 13.5px; }
.rail-subscribe-form .btn { width: 100%; padding: 11px 16px; font-size: 13px; }

@media (max-width: 1440px) {
  .article-layout {
    grid-template-columns: 1fr;
    max-width: 820px;
  }
  .article-toc, .subscribe-rail { display: none; }
}

.article-body h2 {
  font-family: var(--serif);
  font-size: 27px;
  margin: 48px 0 20px;
  color: var(--text);
}

.article-body blockquote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.6;
  border-left: 2px solid var(--accent);
  padding-left: 26px;
  margin: 40px 0;
  color: var(--text);
}

.article-body strong { color: var(--text); }

.article-body ul,
.article-body ol {
  margin: 0 0 26px;
  padding-left: 22px;
}

.article-body li {
  margin-bottom: 12px;
  padding-left: 4px;
}

.article-body li::marker {
  color: var(--accent);
}

.article-body li > ul,
.article-body li > ol {
  margin-top: 12px;
  margin-bottom: 0;
}

.article-body .callout {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 22px 26px;
  font-size: 15px;
  color: var(--text-muted);
  margin: 36px 0;
}
.article-body .callout strong { display: block; color: var(--accent); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }

.article-footer {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 28px 80px;
  border-top: 1px solid var(--border-soft);
  padding-top: 40px;
}

.disclaimer {
  font-size: 12.5px;
  color: var(--text-faint);
  line-height: 1.7;
}

/* ---------------- Footer ---------------- */

.site-footer {
  padding: 56px 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand .brand { margin-bottom: 10px; }
.footer-brand p {
  color: var(--text-faint);
  font-size: 13.5px;
  max-width: 320px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 16px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ---------------- Utilities ---------------- */

.badge-soon {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
}

@media (max-width: 720px) {
  .hero h1 { font-size: 38px; }
  .main-nav { gap: 18px; }
  .main-nav a span.label-full { display: none; }
  .section-head h2 { font-size: 26px; }
  .article-header h1 { font-size: 30px; }
}

@media (max-width: 480px) {
  .site-header .wrap { height: 64px; }
  .brand { font-size: 16px; gap: 6px; }
  .brand .mark { font-size: 16px; }
  .main-nav { gap: 10px; flex-shrink: 0; }
  .main-nav a { font-size: 12.5px; }
  .nav-cta { padding: 6px 10px !important; }
}
