/*
 * GHAR.TV — INTELLIGENCE LISTING PAGES
 * listing.css — shared styles for analysis, market, investment,
 * legal, infrastructure, reports, ranking section pages
 */

@font-face {
  font-family: 'Gazpacho';
  src: url('/twfonts/Gazpacho-Bold.woff2') format('woff2'),
       url('/twfonts/Gazpacho-Bold.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #ffffff; --ink: #111111; --ink2: #4b5563; --faint: #9ca3af;
  --rule: #e8e8e8; --accent: #ee324b; --surface: #f7f7f7; --white: #fff;
  --ff-display: 'Gazpacho', Georgia, serif;
  --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.4,0,.2,1); --maxw: 1280px;
  --sh-sm: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-sans); background: var(--bg); color: var(--ink);
  line-height: 1.8; overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ── NAV (mobile-first) ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--rule); box-shadow: var(--sh-sm);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo { display: flex; align-items: baseline; flex-shrink: 0; }
.nav-logo-w {
  font-family: var(--ff-display); font-size: 20px; font-weight: 700;
  color: var(--ink); letter-spacing: -.5px; line-height: 1;
}
.nav-logo-img { height: 28px; width: auto; display: block; }
.nav-logo-tld { color: var(--accent); }
.nav-logo-tag {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-left: 10px;
}
.nav-links { display: none; align-items: center; gap: 4px; list-style: none; flex: 1; }
.nav-links a {
  font-size: 13.5px; font-weight: 500; color: var(--ink2);
  padding: 6px 11px; border-radius: 7px; transition: background .18s, color .18s;
}
.nav-links a:hover { background: var(--surface); color: var(--ink); }
.nav-links a.active { background: var(--surface); color: var(--ink); font-weight: 600; }
.nav-right { display: none; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-btn-ghost {
  font-size: 13px; font-weight: 500; color: var(--ink2);
  padding: 7px 14px; border-radius: 7px;
  border: 1.5px solid rgba(17,17,17,.15); transition: border-color .18s, color .18s;
}
.nav-btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.nav-btn-solid {
  font-size: 13px; font-weight: 600; letter-spacing: .01em; color: #fff;
  padding: 8px 18px; border-radius: 7px; background: var(--ink);
  transition: background .18s, transform .18s;
}
.nav-btn-solid:hover { background: var(--accent); transform: translateY(-1px); }
.nav-hamburger {
  display: flex; flex-direction: column; gap: 5px;
  padding: 6px; background: none; border: none; z-index: 901;
}
.nav-hamburger span {
  display: block; width: 20px; height: 1.5px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* SUB-NAV */
.subnav {
  position: fixed; top: 56px; left: 0; right: 0; z-index: 890;
  background: var(--white); border-bottom: 1px solid var(--rule);
}
.subnav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 16px; height: 42px;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; scrollbar-width: none;
}
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav-link {
  font-size: 12.5px; font-weight: 500; color: var(--ink2);
  padding: 6px 13px; border-radius: 6px; white-space: nowrap;
  transition: background .16s, color .16s;
}
.subnav-link:hover { background: var(--surface); color: var(--ink); }
.subnav-link.active { background: var(--ink); color: var(--white); font-weight: 600; }

/* MOBILE MENU */
.mob-menu {
  position: fixed; inset: 0; background: var(--white); z-index: 895;
  transform: translateX(100%); transition: transform .4s var(--ease);
  padding: 80px 28px 40px; overflow-y: auto;
}
.mob-menu.open { transform: none; }
.mob-links { list-style: none; }
.mob-links a {
  display: block; padding: 15px 0; min-height: 44px;
  font-family: var(--ff-display); font-size: 24px; font-weight: 700;
  color: var(--ink); border-bottom: 1px solid var(--rule);
}
.mob-links a:hover, .mob-links .mob-accent { color: var(--accent); }

/* PAGE */
.page-wrap { padding-top: 98px; }
.cont { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* BREADCRUMB */
.bc { padding: 14px 0 0; display: flex; align-items: center; gap: 8px; }
.bc a { font-size: 12px; color: var(--faint); font-weight: 500; }
.bc a:hover { color: var(--ink); }
.bc-sep { font-size: 11px; color: var(--faint); }
.bc-cur { font-size: 12px; color: var(--ink); font-weight: 600; }

/* HERO — simple: title + description only */
.hero {
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--rule);
}
.hero__title {
  font-family: var(--ff-display);
  font-size: clamp(28px, 4vw, 48px); font-weight: 700;
  line-height: 1.08; letter-spacing: -.025em;
  color: var(--ink); margin-bottom: 16px;
}
.hero__desc {
  font-size: 15px; line-height: 1.75; color: var(--ink2);
  max-width: 640px;
}

/* BODY GRID: main + sidebar */
.body-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 32px; padding: 32px 0 64px;
}

/* COVER STORY — light card */
.cover {
  background: var(--surface); border: 1.5px solid var(--rule); border-radius: 16px;
  overflow: hidden; margin-bottom: 15px;
}
.cover__img {
  width: 100%; aspect-ratio: 21/9; object-fit: cover;
  display: block;
}
.cover__inner { padding: 28px 24px; }
.cover__eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 16px;
}
.cover__title {
  font-family: var(--ff-display);
  font-size: clamp(20px, 2.2vw, 28px); font-weight: 700;
  color: var(--ink); line-height: 1.26; letter-spacing: -.025em;
  margin-bottom: 14px;
}
.cover__title a { color: inherit; text-decoration: none; transition: opacity .2s; }
.cover__title a:hover { opacity: .7; }
.cover__excerpt {
  font-size: 14px; line-height: 1.72; color: var(--ink2);
  margin-bottom: 24px;
}
.cover__foot {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.cover__meta {
  font-size: 12px; color: var(--faint); font-weight: 500;
}

/* POST CARDS — 2-column grid */
.posts { display: grid; grid-template-columns: 1fr; gap: 16px; }

.post-card {
  display: flex; flex-direction: column;
  border: 1.5px solid var(--rule); border-radius: 14px;
  position: relative; overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .25s;
}
.post-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 0;
  background: var(--accent); transition: height .28s var(--ease);
}
.post-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transform: translateY(-3px); border-color: rgba(17,17,17,.2);
}
.post-card:hover::after { height: 3px; }

.post-card__img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  display: block;
  background: var(--surface);
}
.post-card__body {
  padding: 20px 24px 24px;
  display: flex; flex-direction: column; flex: 1;
}
.post-card__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 12px;
}
.post-card__cat {
  font-size: 10px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
}
.post-card__date {
  font-size: 11px; font-weight: 500; color: var(--faint);
}
.post-card__title {
  font-family: var(--ff-display);
  font-size: 17px; font-weight: 700; color: var(--ink);
  line-height: 1.35; letter-spacing: -.012em;
  margin-bottom: 10px;
}
.post-card__summary {
  font-size: 13.5px; line-height: 1.7; color: var(--ink2);
  margin-bottom: 16px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card__foot {
  display: flex; align-items: center; justify-content: space-between;
}
.post-card__read-time {
  font-size: 11px; font-weight: 500; color: var(--faint);
}
.post-card__cta {
  font-size: 13px; font-weight: 600; color: var(--ink);
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .18s, gap .18s;
}
.post-card:hover .post-card__cta { color: var(--accent); gap: 7px; }

/* SIDEBAR */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-cta {
  background: var(--ink); border-radius: 14px; padding: 28px 24px;
}
.sidebar-cta__eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 10px;
}
.sidebar-cta__title {
  font-family: var(--ff-display);
  font-size: 18px; font-weight: 700; color: var(--white);
  line-height: 1.3; margin-bottom: 10px;
}
.sidebar-cta__desc {
  font-size: 13px; line-height: 1.65; color: rgba(255,255,255,.5);
  margin-bottom: 20px;
}
.sidebar-cta__btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: var(--white);
  padding: 10px 22px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  min-height: 44px; width: 100%;
  justify-content: center;
  transition: transform .2s var(--ease);
}
.sidebar-cta__btn:hover { transform: translateY(-2px); }

/* LOAD MORE */
.post-card.is-hidden { display: none; }
.load-more {
  text-align: center; padding: 32px 0 0;
}
.load-more__btn {
  font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 12px 32px; border-radius: 8px;
  border: 1.5px solid var(--rule); background: var(--white);
  min-height: 44px;
  transition: border-color .18s, background .18s;
}
.load-more__btn:hover { border-color: var(--ink); background: var(--surface); }
.load-more.is-hidden { display: none; }

/* FOOTER */
.footer { background: var(--ink); padding: 36px 0; margin-top: 64px; }
.ft-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
}
.ft-top {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  padding-bottom: 22px; margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ft-logo-img { height: 28px; width: auto; filter: brightness(0) invert(1); }
.ft-tagline { font-size: 12px; color: rgba(255,255,255,.35); margin-top: 4px; }
.ft-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.ft-nav a {
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,.5);
  padding: 6px 12px; border-radius: 6px;
}
.ft-nav a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.ft-bot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.ft-bot p { font-size: 11px; color: rgba(255,255,255,.22); }
.ft-bot-links { display: flex; gap: 18px; }
.ft-bot-links a { font-size: 11.5px; color: rgba(255,255,255,.25); }
.ft-bot-links a:hover { color: rgba(255,255,255,.5); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s cubic-bezier(0,0,.2,1), transform .6s cubic-bezier(0,0,.2,1); }
.reveal.revealed { opacity: 1; transform: none; }

/* ══ TABLET (≥744px) ══ */
@media (min-width: 744px) {
  .subnav-inner { padding: 0 32px; height: 46px; }
  .cont { padding: 0 32px; }
  .hero { padding: 36px 0 32px; }
  .cover { border-radius: 20px; }
  .cover__inner { padding: 36px 40px; }
  .posts { grid-template-columns: 1fr 1fr; }
  .body-grid { padding: 40px 0 64px; gap: 40px; }
  .cover__foot { justify-content: flex-start; }
  .ft-inner { padding: 0 32px; }
}

/* ══ DESKTOP (≥1024px) — nav links visible ══ */
@media (min-width: 1024px) {
  .nav-inner { padding: 0 32px; height: 62px; gap: 32px; }
  .nav-links { display: flex; }
  .nav-right { display: flex; }
  .nav-hamburger { display: none; }
  .subnav { top: 62px; }
  .page-wrap { padding-top: 108px; }
  .body-grid {
    grid-template-columns: 1fr 300px;
    gap: 48px; align-items: start;
  }
  .sidebar {
    position: sticky; top: 124px;
  }
}

/* ── Accessibility ── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.revealed { transition: none !important; opacity: 1 !important; transform: none !important; }
  .post-card { transition: none !important; }
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}
