/* Insider Avenue — shared site chrome & components.
   Tokens, reset, nav, ticker, footer, and reusable card/section styles.
   Page-specific layout lives in each page's own <style>. */

:root {
  --navy: #1B2A3B;
  --navy-2: #243548;
  --navy-3: #2E4560;
  --gold: #C9A96E;
  --gold-deep: #B8986A;
  --cream: #F4F1EC;
  --steel: #8DA4B8;
  --slate: #6B7C8D;
  --ink: #1B2A3B;
  --line-light: #D8D3CA;

  --gutter: clamp(24px, 6.5vw, 96px);
  --maxw: 1320px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------- NAV ---------------- */
.nav-bar { background: var(--navy); position: relative; z-index: 30; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: clamp(64px, 8vw, 80px); flex-wrap: nowrap; }
.nav-logo { font-size: clamp(22px, 2.4vw, 27px); font-weight: 500; color: var(--cream); letter-spacing: -1px; white-space: nowrap; text-decoration: none; }
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: clamp(20px, 2.6vw, 36px); align-items: center; }
.nav-link { font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); cursor: pointer; text-decoration: none; white-space: nowrap; transition: color 0.15s; }
.nav-link:hover, .nav-link.active { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-subscribe { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--gold); color: var(--gold); padding: 10px 22px; border-radius: 4px; cursor: pointer; background: transparent; white-space: nowrap; transition: background 0.15s; }
.nav-subscribe:hover { background: rgba(201,169,110,0.1); }
.nav-toggle { display: none; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 5px; flex-shrink: 0; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gold); border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.gold-bar { height: 3px; background: var(--gold); }

/* ---------------- TICKER ---------------- */
.ticker-bar { background: var(--navy-2); }
.ticker { padding: 12px var(--gutter); display: flex; align-items: center; gap: clamp(14px, 2vw, 24px); overflow: hidden; max-width: var(--maxw); margin: 0 auto; }
.ticker-label { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); white-space: nowrap; font-weight: 500; flex-shrink: 0; }
.ticker-track { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 40px), transparent 100%); }
.ticker-scroll { display: flex; width: max-content; animation: ticker-marquee 38s linear infinite; }
.ticker:hover .ticker-scroll { animation-play-state: paused; }
@keyframes ticker-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-item { font-size: clamp(14px, 1.4vw, 16px); color: var(--steel); white-space: nowrap; padding-right: 16px; }
.ticker-link { color: var(--steel); text-decoration: none; transition: color 0.15s; }
.ticker-link:hover { color: var(--gold); }
.ticker-sep { color: var(--gold); margin: 0 12px; }

/* ---------------- SHARED COMPONENTS ---------------- */
.tag { display: inline-block; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; background: #E8E2D9; color: #5A4520; padding: 5px 12px; border-radius: 4px; font-weight: 500; }

.section-header { display: flex; align-items: center; gap: clamp(12px, 2vw, 18px); margin-bottom: clamp(22px, 3vw, 28px); }
.section-title { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy); font-weight: 600; white-space: nowrap; }
.section-rule { flex: 1; height: 1px; background: var(--gold); }
.section-all { font-size: 15px; color: var(--gold); white-space: nowrap; cursor: pointer; text-decoration: none; }
.section-all:hover { text-decoration: underline; }

/* Article/video thumbnail cards (reused for "related" grids) */
.thumb-card { background: #fff; border: 1px solid var(--line-light); border-radius: 6px; overflow: hidden; cursor: pointer; text-decoration: none; display: flex; flex-direction: column; transition: box-shadow 0.15s, transform 0.15s; }
.thumb-card:hover { box-shadow: 0 4px 18px rgba(27,42,59,0.1); transform: translateY(-2px); }
.thumb-img { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--slate); }
.thumb-body { padding: clamp(14px, 1.6vw, 18px); flex: 1; }
.thumb-tag { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #8A6F3E; font-weight: 600; margin-bottom: 8px; }
.thumb-title { font-size: clamp(17px, 1.7vw, 20px); font-weight: 500; color: var(--navy); line-height: 1.3; margin-bottom: 10px; letter-spacing: -0.3px; text-wrap: pretty; }
.thumb-meta { font-size: 14px; color: var(--slate); }

/* Pill buttons used for share / save / actions */
.pill-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; letter-spacing: 0.01em; color: var(--navy); background: #fff; border: 1px solid var(--line-light); border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; font-family: inherit; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.pill-btn:hover { border-color: var(--gold); color: #8A6F3E; }
.pill-btn svg { width: 16px; height: 16px; }

/* ---------------- FOOTER ---------------- */
.footer-bar { background: var(--navy); border-top: 3px solid var(--gold); }
.footer { padding-block: clamp(36px, 4.5vw, 44px) clamp(24px, 3vw, 28px); }
.footer-top { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: clamp(28px, 4.5vw, 56px); margin-bottom: clamp(26px, 3vw, 32px); }
.footer-logo { font-size: 24px; font-weight: 500; color: var(--cream); letter-spacing: -0.8px; margin-bottom: 10px; }
.footer-logo span { color: var(--gold); }
.footer-tagline { font-size: 16px; color: var(--slate); line-height: 1.5; }
.footer-topics-label { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; font-weight: 600; }
.footer-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-pill { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 16px; border-radius: 4px; background: rgba(244,241,236,0.07); color: var(--steel); border: 1px solid var(--navy-3); cursor: pointer; font-weight: 500; text-decoration: none; transition: background 0.15s, color 0.15s; }
.footer-pill:hover { background: rgba(201,169,110,0.1); color: var(--gold); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--navy-3); padding-top: 22px; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: clamp(16px, 2vw, 24px); flex-wrap: wrap; }
.footer-link { font-size: 15px; color: var(--slate); cursor: pointer; text-decoration: none; transition: color 0.15s; }
.footer-link:hover { color: var(--gold); }
.footer-copy { font-size: 15px; color: #4A5C6A; }

/* ---------------- LISTING PAGES (All Articles / All Videos) ---------------- */
.page-head { padding-block: clamp(32px, 4.5vw, 56px) clamp(18px, 2.4vw, 26px); }
.page-eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: #8A6F3E; font-weight: 600; margin-bottom: 14px; }
.page-title { font-size: clamp(32px, 5vw, 54px); font-weight: 500; letter-spacing: -1.2px; color: var(--navy); line-height: 1.08; margin-bottom: clamp(12px, 1.6vw, 18px); }
.page-sub { font-size: clamp(16px, 1.7vw, 20px); color: #4A5C6A; line-height: 1.55; max-width: 60ch; text-wrap: pretty; }

.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: clamp(22px, 3vw, 30px); border-bottom: 1px solid var(--line-light); }
.chip { font-size: 13px; letter-spacing: 0.04em; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line-light); color: var(--navy); cursor: pointer; font-family: inherit; transition: border-color 0.15s, color 0.15s, background 0.15s; white-space: nowrap; }
.chip:hover { border-color: var(--gold); color: #8A6F3E; }
.chip.active { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.filter-count { margin-left: auto; font-size: 14px; color: var(--slate); white-space: nowrap; }

.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 26px); padding-block: clamp(28px, 3.5vw, 42px); }
body[data-density="compact"] .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid .thumb-card[hidden] { display: none; }

/* Play overlay + duration badge for video thumbnails inside .thumb-img */
.thumb-img { position: relative; }
.play-badge { width: 50px; height: 50px; border-radius: 50%; background: rgba(201,169,110,0.95); display: flex; align-items: center; justify-content: center; transition: transform 0.15s; }
.thumb-card:hover .play-badge { transform: scale(1.08); }
.play-badge .tri { width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 15px solid var(--navy); margin-left: 3px; }
.dur-badge { position: absolute; bottom: 10px; right: 10px; font-size: 13px; color: var(--cream); background: rgba(0,0,0,0.72); padding: 3px 9px; border-radius: 3px; font-weight: 500; }

@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-density="compact"] .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .card-grid, body[data-density="compact"] .card-grid { grid-template-columns: 1fr; }
  .filter-count { width: 100%; margin-left: 0; order: -1; }
}

/* ---------------- RESPONSIVE (shared) ---------------- */
@media (max-width: 900px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy-2); border-top: 1px solid var(--navy-3);
    padding: 8px var(--gutter) 16px;
    box-shadow: 0 16px 30px rgba(0,0,0,0.3);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    max-height: calc(100dvh - 64px); overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 15px 4px; border-bottom: 1px solid rgba(46,69,96,0.6); font-size: 15px; }
  .nav-link:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }
  .nav-subscribe { padding: 9px 16px; }
}

@media (max-width: 720px) {
  .ticker-item { font-size: 14px; }
}

@media (max-width: 480px) {
  .nav-subscribe { display: none; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .ticker-scroll { animation: none; }
}
