/*
 * hub-dsi.css
 * Styles for the DSI / Cali Fund Knowledge Hub article.
 * Requires: /css/main.css (tokens), hub.css (base article styles)
 * Loaded only on: knowledge/dsi-cali-fund-abs.html
 */

/* ── HERO — image version ───────────────────────────────
   Overrides hub.css .article-hero (solid-bg version) with
   a full-bleed image hero using Ken Burns + dark overlay.
   ─────────────────────────────────────────────────────── */

.article-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end;
  padding: 0;              /* override hub.css padding */
  background: var(--deep-navy);
  overflow: hidden;
}

/* Remove hub.css gradient underline */
.article-hero::after { display: none; }

.article-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

@keyframes ken-burns-zoom {
  from { transform: scale(1);    }
  to   { transform: scale(1.09); }
}

.ken-burns {
  animation: ken-burns-zoom 32s ease-in-out infinite alternate;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 22, 40, 0.92) 0%,
    rgba(10, 22, 40, 0.55) 50%,
    rgba(10, 22, 40, 0.22) 100%
  );
}

.article-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(4rem, 6vw, 5.5rem) clamp(1.25rem, 5vw, 4rem) 1.75rem;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(184, 216, 245, 0.65);
  margin-bottom: 1rem;
}

.article-breadcrumb a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.article-breadcrumb a:hover { color: var(--pure-white); }

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--deep-navy);
  background: rgba(200, 169, 74, 0.88);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 500;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--pure-white);
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 800px;
}

.article-standfirst {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 300;
  color: rgba(184, 216, 245, 0.85);
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.article-date,
.article-read-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(184, 216, 245, 0.5);
}

/* ── ARTICLE LAYOUT (two-col: TOC + content) ─────────── */

.article-main {
  background: var(--off-white, #f8fafc);
}

.article-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem clamp(1.25rem, 5vw, 3rem) 3.5rem;
  align-items: start;
}

/* ── TABLE OF CONTENTS ────────────────────────────────── */

.article-toc {
  position: sticky;
  top: 80px;
  background: var(--pure-white);
  border: 1px solid var(--ice-blue);
  border-radius: var(--radius-lg, 12px);
  padding: 1.25rem 1.4rem;
}

.toc-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sapphire);
  display: block;
  margin-bottom: 0.85rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li { margin-bottom: 0.35rem; }

.toc-list a {
  display: block;
  font-size: 0.78rem;
  color: var(--slate);
  text-decoration: none;
  line-height: 1.45;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.toc-list a:hover {
  background: var(--pale-blue, #e8f2fb);
  color: var(--ocean-blue);
}

/* ── ARTICLE CONTENT ──────────────────────────────────── */

.article-content {
  min-width: 0; /* prevent grid blowout */
}

/* Suppress main.css generic `section { padding-block }` on article & FAQ sections */
.article-section,
.faq-section,
.doc-control,
.related-articles {
  padding-block: 0;
}

.article-section {
  margin-bottom: 2rem;
}

.article-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: var(--deep-navy);
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--ice-blue);
  line-height: 1.3;
}

/* First section: no top border */
.article-section:first-child h2 {
  border-top: none;
  padding-top: 0;
}

.article-section h3 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ocean-blue);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 2rem 0 0.65rem;
}

.article-section p {
  margin-bottom: 1.1rem;
  line-height: 1.8;
  color: var(--slate);
}

.article-section p:last-child { margin-bottom: 0; }

.article-section a {
  color: var(--ocean-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-section a:hover { color: var(--sapphire); }

/* ── CALLOUT VARIANTS ─────────────────────────────────── */
/* hub.css has a basic .callout; we extend with variants  */

.callout.callout-insight,
.callout.callout-key {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--pale-blue, #e8f2fb);
  border-left: 4px solid var(--sapphire);
  border-radius: 0 12px 12px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
}

.callout.callout-key {
  border-left-color: var(--gold);
  background: rgba(200, 169, 74, 0.07);
}

.callout-icon {
  font-size: 1.2rem;
  color: var(--sapphire);
  flex-shrink: 0;
  line-height: 1.5;
  font-weight: 600;
}

.callout.callout-key .callout-icon { color: var(--gold); }

.callout-body { flex: 1; }

.callout-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sapphire);
  margin-bottom: 0.45rem;
}

/* Override .callout-body p { margin: 0 } for the label */
.callout-body .callout-label { margin-bottom: 0.45rem; }

.callout.callout-key .callout-label { color: var(--gold); }

.callout-body p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--slate);
}

/* ── DATA CARDS ───────────────────────────────────────── */

.data-card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--ice-blue);
  border: 1px solid var(--ice-blue);
  border-radius: 12px;
  overflow: hidden;
  margin: 1.75rem 0;
}

.data-card {
  background: var(--pure-white);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.data-card-mono {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--ocean-blue);
  line-height: 1;
}

.data-card-label {
  font-size: 0.75rem;
  color: var(--slate);
  line-height: 1.4;
}

/* ── COMPARISON TABLE ─────────────────────────────────── */

.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.75rem 0;
  border-radius: 12px;
  border: 1px solid var(--ice-blue);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.comparison-table thead th {
  background: var(--ocean-blue);
  color: var(--pure-white);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
}

.comparison-table thead th:first-child {
  background: var(--deep-navy);
}

.comparison-table tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--ice-blue);
  color: var(--slate);
  vertical-align: top;
  line-height: 1.5;
}

.comparison-table tbody tr:last-child td { border-bottom: none; }

.comparison-table tbody tr:nth-child(odd)  td { background: var(--pure-white); }
.comparison-table tbody tr:nth-child(even) td { background: var(--pale-blue, #e8f2fb); }

.comparison-table tbody td:first-child {
  font-weight: 600;
  color: var(--deep-navy);
}

/* ── ARTICLE LIST ─────────────────────────────────────── */

.article-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 0.75rem 0 1.25rem;
}

.article-list li {
  margin-bottom: 0.6rem;
  line-height: 1.75;
  color: var(--slate);
}

/* ── SOURCES ──────────────────────────────────────────── */

.article-sources h2 {
  border-top: 2px solid var(--ice-blue);
}

.sources-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-top: 1rem;
}

.sources-list li {
  font-size: 0.84rem;
  color: var(--slate);
  margin-bottom: 0.7rem;
  line-height: 1.6;
}

.sources-list a {
  color: var(--sapphire);
  text-decoration: none;
  word-break: break-all;
}

.sources-list a:hover { text-decoration: underline; }

/* ── RELATED ARTICLES ─────────────────────────────────── */

.related-articles {
  background: var(--deep-navy);
  padding: clamp(2rem, 4vw, 2.75rem) 0;
}

.related-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
}

.related-heading {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

/* Override hub.css .related-grid inside .related-articles */
.related-articles .related-grid {
  max-width: none;
}

/* Override hub.css .related-card inside .related-articles  */
.related-articles .related-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  text-decoration: none;
}

.related-articles .related-card h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pure-white);
  line-height: 1.45;
  flex: 1;
}

.related-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.related-arrow {
  font-size: 0.9rem;
  color: rgba(184, 216, 245, 0.45);
  align-self: flex-end;
}

/* ── RESPONSIVE ───────────────────────────────────────── */

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

  .article-toc {
    display: none;
  }

  .article-hero {
    min-height: 300px;
  }
}

@media (max-width: 640px) {
  .article-hero {
    min-height: 260px;
  }

  .data-card-row {
    grid-template-columns: 1fr;
  }

  .comparison-table {
    font-size: 0.78rem;
  }

  .comparison-table thead th,
  .comparison-table tbody td {
    padding: 0.6rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .article-title {
    font-size: 1.45rem;
  }
}

/* ── CALLOUT COLOR VARIANTS (for dsi-cali-fund.html) ── */

.callout.callout-blue {
  background: var(--pale-blue, #e8f2fb);
  border-left-color: var(--sapphire, #2E7BC4);
}
.callout.callout-green {
  background: rgba(58,154,92,0.08);
  border-left-color: #3A9A5C;
}
.callout.callout-navy {
  background: var(--deep-navy, #0A1628);
  border-left-color: var(--sky-blue, #5BA8E8);
  color: var(--off-white, #F8FAFC);
}
.callout-title {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.6rem;
  margin-top: 0;
  color: inherit;
}
.callout.callout-blue .callout-title { color: var(--sapphire); }
.callout.callout-green .callout-title { color: #3A9A5C; }
.callout.callout-navy .callout-title { color: var(--sky-blue, #5BA8E8); }
.callout-list {
  margin: 0.75rem 0 0 0;
  padding-left: 1.25rem;
}
.callout-list li {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: inherit;
}

/* ── DATA PANEL (metric display) ──────────────────────── */

.data-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
  padding: 2rem;
  background: var(--pale-blue, #E8F2FB);
  border-radius: 8px;
}
.data-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.data-value {
  font-family: var(--font-display, 'DM Serif Display', Georgia, serif);
  font-size: 2.5rem;
  color: var(--ocean-blue, #1B4F8A);
  line-height: 1;
}
.data-label {
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size: 0.85rem;
  color: var(--slate, #3A4A5C);
  line-height: 1.4;
}

/* ── ARTICLE CONTAINER / LEAD ─────────────────────────── */

.article-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.25rem, 5vw, 2rem) 4rem;
}
.article-lead {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--ice-blue, #B8D8F5);
}
.article-lead p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--slate);
  margin-bottom: 1.1rem;
}
.article-lead p:last-child { margin-bottom: 0; }

/* ── IMAGE HERO OVERRIDES (dsi-cali-fund.html) ─────────── */
/* hub-dsi.css above overrides .article-hero to absolute-pos.
   Here we add the named sub-elements the new article uses.  */

.article-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.38;
}
.article-hero .hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3rem,5vw,4.5rem) clamp(1.25rem,5vw,3rem) 2rem;
  width: 100%;
}
.article-category-stamp {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold, #C8A94A);
  display: inline-block;
  margin-bottom: 1rem;
}
.article-hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--pure-white, #ffffff);
  line-height: 1.2;
  margin-bottom: 1rem;
  max-width: 750px;
}
.article-hero-deck {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(184,216,245,0.85);
  line-height: 1.65;
  max-width: 650px;
  margin-bottom: 1.5rem;
}
.meta-date, .meta-read, .meta-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(184,216,245,0.5);
}
.meta-sep { color: rgba(184,216,245,0.3); }

/* ── DOCUMENT CONTROL TABLE ───────────────────────────── */

.doc-control {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--ice-blue, #B8D8F5);
}
.doc-control h3 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sapphire);
  margin-bottom: 1rem;
}
.doc-control-table {
  width: 100%;
  font-size: 0.84rem;
  border-collapse: collapse;
}
.doc-control-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--ice-blue, #B8D8F5);
  color: var(--slate);
}
.doc-control-table td:first-child {
  font-weight: 600;
  color: var(--deep-navy);
  white-space: nowrap;
  padding-left: 0;
  width: 160px;
}
.doc-control-table a { color: var(--ocean-blue); text-decoration: none; }
.doc-control-table a:hover { text-decoration: underline; }

/* ── SOURCES SECTION ──────────────────────────────────── */

.sources-intro {
  font-size: 0.84rem;
  color: var(--slate);
  margin-bottom: 1rem;
  font-style: italic;
}

/* ── RELATED READING CARD ELEMENTS ───────────────────── */
/* (hub-dsi.css has .related-card base; add new sub-elements) */

.related-card-category {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.related-card-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pure-white, #ffffff);
  line-height: 1.4;
  margin-top: 0.35rem;
}
.related-card-excerpt {
  font-size: 0.82rem;
  color: rgba(184,216,245,0.65);
  line-height: 1.55;
  margin-top: 0.4rem;
}

/* ── FAQ HERO ─────────────────────────────────────────── */

.faq-hero {
  background: var(--ocean-blue, #1B4F8A);
  padding: 5rem 2rem 3rem;
}
.faq-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}
.faq-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: #ffffff;
  margin: 0.75rem 0 1rem;
  line-height: 1.2;
}
.faq-hero-deck {
  font-size: 1.05rem;
  color: var(--ice-blue, #B8D8F5);
  max-width: 680px;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.faq-audience-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tab-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  background: transparent;
  color: rgba(255,255,255,0.8);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}
.tab-btn:hover,
.tab-btn.active {
  background: var(--gold, #C8A94A);
  border-color: var(--gold, #C8A94A);
  color: var(--deep-navy, #0A1628);
}

/* ── FAQ BODY ─────────────────────────────────────────── */

.faq-main {
  background: var(--off-white, #F8FAFC);
}
.faq-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem clamp(1.25rem, 5vw, 2rem) 5rem;
}
.faq-section {
  margin-bottom: 3rem;
}
.faq-section-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sapphire, #2E7BC4);
  border-bottom: 1px solid var(--ice-blue, #B8D8F5);
  padding-bottom: 0.6rem;
  margin-bottom: 1.25rem;
}
.faq-item {
  border-bottom: 1px solid var(--ice-blue, #B8D8F5);
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body, 'Outfit', sans-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--deep-navy, #0A1628);
  padding: 1rem 0;
  cursor: pointer;
  gap: 1rem;
  line-height: 1.5;
}
.faq-question:hover { color: var(--ocean-blue, #1B4F8A); }
.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1.5px solid var(--sapphire, #2E7BC4);
  border-radius: 50%;
  position: relative;
  display: inline-block;
}
.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  background: var(--sapphire, #2E7BC4);
  border-radius: 1px;
  top: 50%;
  left: 50%;
}
.faq-icon::before {
  width: 8px;
  height: 1.5px;
  transform: translate(-50%, -50%);
}
.faq-icon::after {
  width: 1.5px;
  height: 8px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s;
}
.faq-question[aria-expanded="true"] .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq-answer {
  padding: 0 0 1.25rem;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--slate, #3A4A5C);
}
.faq-answer p {
  margin-bottom: 0.75rem;
}
.faq-answer p:last-child { margin-bottom: 0; }
.faq-answer a { color: var(--ocean-blue); text-decoration: underline; }
.faq-answer strong { color: var(--deep-navy); }

@media (max-width: 600px) {
  .article-container { padding: 2rem 1.25rem 3.5rem; }
  .faq-container     { padding: 2rem 1.25rem 4rem; }
  .faq-hero          { padding: 4rem 1.25rem 2.5rem; }
  .data-panel        { padding: 1.25rem; gap: 1rem; }
  .data-value        { font-size: 2rem; }
}
