/*
Theme Name: Gem Research Solutions
Theme URI: https://gemresearchsolutions.com
Author: Gem Research Solutions
Description: High-end enterprise market-research & intelligence theme
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: gem-research
*/

@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --navy:      #0F2741;
  --navy-dk:   #081626;
  --steel:     #1F3A5F;
  /* Accent: electric corporate blue (replaces the former brass-gold).
     Var names kept as --gold/--gold-dk so existing rules recolor automatically.
     --gold      = brighter blue, for use on dark backgrounds
     --gold-dk   = deeper blue,   for use on light backgrounds */
  --gold:      #4F9CF5;
  --gold-dk:   #2D6FE0;
  --bg:        #FFFFFF;
  --surface:   #F4F6F9;
  --surface-2: #E8ECF2;
  --text:      #1B2733;
  --text-soft: #51647A;
  --border:    #E1E5EA;
  --border-dk: rgba(255,255,255,0.12);
  --font-h:    'Libre Caslon Text', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-ui:   'IBM Plex Sans', system-ui, sans-serif;
  --max-w:     1240px;
  --r:         4px;
  --t:         0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1.02rem; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul, ol { list-style: none; }
.hero-split > *, .grid > *, .report-grid > * { min-width: 0; }

/* ─── Utility ────────────────────────────────────────────────────────────────── */
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 2.5rem; }
.eyebrow {
  font-family: var(--font-ui); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dk);
}
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.skip-link { position:absolute; top:-40px; left:0; background:var(--navy); color:#fff; padding:.5rem 1rem; z-index:999; transition:top .2s; }
.skip-link:focus { top:0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-ui); font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.04em; padding: 0.85rem 1.6rem; border-radius: var(--r);
  transition: background var(--t), color var(--t), border-color var(--t); cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--steel); }
.btn-gold { background: var(--gold-dk); color: #fff; }
.btn-gold:hover { background: var(--gold); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--navy); }
.btn-ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.1); }

.cat-label {
  font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dk);
}

/* ─── Header ─────────────────────────────────────────────────────────────────── */
.topline { height: 3px; background: var(--gold); }
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,22,38,0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 2.5rem; display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 2rem; }
.site-logo { display: flex; flex-direction: column; flex-shrink: 0; line-height: 1.05; }
.site-logo-main { font-family: var(--font-h); font-size: 1.35rem; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.site-logo-sub { font-family: var(--font-ui); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-top: 2px; }
.primary-nav { display: flex; align-items: center; gap: 0.3rem; margin-left: auto; }
.primary-nav a { font-family: var(--font-ui); font-size: 0.85rem; font-weight: 500; color: rgba(255,255,255,0.82); padding: 0.5rem 0.85rem; border-radius: var(--r); transition: color var(--t); white-space: nowrap; }
.primary-nav a:hover { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.client-access { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.03em; color: #fff; border: 1px solid rgba(255,255,255,0.28); padding: 0.6rem 1.1rem; border-radius: var(--r); transition: all var(--t); white-space: nowrap; }
.client-access:hover { background: var(--gold-dk); color: #fff; border-color: var(--gold-dk); }
.btn-icon { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; color: #fff; }
.btn-icon svg { width: 22px; height: 22px; }

.mobile-nav { display:none; position:fixed; inset:0; z-index:200; background:var(--bg); padding:5rem 2rem 2rem; flex-direction:column; gap:.25rem; overflow-y:auto; }
.mobile-nav.is-open { display:flex; }
.mobile-nav a { font-family:var(--font-ui); font-size:1.05rem; font-weight:600; color:var(--navy); padding:.85rem 0; border-bottom:1px solid var(--border); }
.mobile-nav-close { position:absolute; top:1rem; right:1.5rem; width:40px; height:40px; display:flex; align-items:center; justify-content:center; font-size:1.5rem; color:var(--navy); }

/* ─── Hero (full-bleed dark photographic) ──────────────────────────────────────── */
.hero {
  position: relative;
  /* sits flush under the dark sticky header for a seamless immersive top */
  margin-top: -79px; padding: 13rem 0 6rem;
  background:
    linear-gradient(102deg, rgba(8,22,38,0.94) 0%, rgba(8,22,38,0.78) 44%, rgba(15,39,65,0.48) 100%),
    #081626 url('images/hero.jpg') center / cover no-repeat;
  border-bottom: none;
}
.hero-copy { max-width: 720px; }
.hero .eyebrow { display: block; margin-bottom: 1.25rem; color: var(--gold); }
.hero-title { font-family: var(--font-h); font-size: clamp(2.5rem, 4.6vw, 4rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.01em; color: #fff; margin-bottom: 1.5rem; }
.hero-lead { font-size: 1.18rem; color: rgba(255,255,255,0.78); line-height: 1.65; margin-bottom: 2.5rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ─── Pillars ────────────────────────────────────────────────────────────────── */
.pillars { padding: 4rem 0; }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.pillar { }
.pillar-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: var(--gold-dk); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 1.25rem; }
.pillar-icon svg { width: 24px; height: 24px; }
.pillar h3 { font-family: var(--font-h); font-size: 1.35rem; font-weight: 700; color: var(--navy); margin-bottom: 0.6rem; }
.pillar p { font-size: 0.95rem; color: var(--text-soft); line-height: 1.6; }

/* ─── Stats Band ─────────────────────────────────────────────────────────────── */
.stats { background: var(--navy); color: #fff; padding: 3.5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-h); font-size: 2.75rem; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 0.6rem; }
.stat-label { font-family: var(--font-ui); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.7); }

/* ─── Section heading ────────────────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-surface { background: var(--surface); }
.section-head { margin-bottom: 3rem; max-width: 640px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { display: block; margin-bottom: 0.85rem; }
.section-title { font-family: var(--font-h); font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 700; line-height: 1.12; color: var(--navy); letter-spacing: -0.01em; }
.section-intro { margin-top: 1rem; color: var(--text-soft); font-size: 1.05rem; }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.section-link { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-dk); white-space: nowrap; }
.section-link:hover { color: var(--navy); }

/* ─── Report Cards ───────────────────────────────────────────────────────────── */
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.25rem; }
.report-card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; transition: box-shadow var(--t), transform var(--t); }
.report-card:hover { box-shadow: 0 16px 40px rgba(16,42,67,0.1); transform: translateY(-3px); }
.report-thumb { aspect-ratio: 16/10; overflow: hidden; }
.report-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.report-card:hover .report-thumb img { transform: scale(1.04); }
.report-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.report-meta-top { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.85rem; }
.report-title { font-family: var(--font-h); font-size: 1.25rem; font-weight: 700; line-height: 1.25; color: var(--navy); margin-bottom: 0.7rem; transition: color var(--t); }
.report-card:hover .report-title { color: var(--gold-dk); }
.report-excerpt { font-size: 0.92rem; color: var(--text-soft); line-height: 1.6; flex-grow: 1; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; margin-bottom: 1.1rem; }
.report-foot { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-ui); font-size: 0.74rem; color: var(--text-soft); padding-top: 1rem; border-top: 1px solid var(--border); }
.report-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }

/* ─── Capabilities ───────────────────────────────────────────────────────────── */
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.cap-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 2rem; display: flex; gap: 1.25rem; align-items: flex-start; transition: border-color var(--t); }
.cap-card:hover { border-color: var(--gold); }
.cap-num { font-family: var(--font-h); font-size: 1.1rem; font-weight: 700; color: var(--gold-dk); flex-shrink: 0; padding-top: 2px; }
.cap-card h3 { font-family: var(--font-h); font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 0.5rem; }
.cap-card p { font-size: 0.93rem; color: var(--text-soft); line-height: 1.6; }

/* ─── Methodology ────────────────────────────────────────────────────────────── */
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; counter-reset: step; }
.method-step { position: relative; padding-top: 2.5rem; border-top: 2px solid var(--gold); }
.method-step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 1rem; left: 0; font-family: var(--font-h); font-size: 1rem; font-weight: 700; color: var(--gold-dk); }
.method-step h3 { font-family: var(--font-h); font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: 0.6rem; }
.method-step p { font-size: 0.95rem; color: var(--text-soft); line-height: 1.6; }

/* ─── CTA Band ───────────────────────────────────────────────────────────────── */
.cta-band { background: var(--navy); color: #fff; padding: 4.5rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; }
.cta-inner h2 { font-family: var(--font-h); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.15; max-width: 22ch; }
.cta-inner p { color: rgba(255,255,255,0.7); margin-top: 0.75rem; max-width: 40ch; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy-dk); color: #fff; }
.footer-main { max-width: var(--max-w); margin: 0 auto; padding: 4.5rem 2.5rem 3rem; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 3rem; }
.footer-logo { font-family: var(--font-h); font-size: 1.3rem; font-weight: 700; color: #fff; display: block; }
.footer-logo-sub { font-family: var(--font-ui); font-size: 0.56rem; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); margin-top: 3px; display: block; }
.footer-about { font-size: 0.9rem; color: rgba(255,255,255,0.55); line-height: 1.65; margin-top: 1.25rem; max-width: 34ch; }
.footer-col-title { font-family: var(--font-ui); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.25rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.65rem; }
.footer-links a { font-family: var(--font-ui); font-size: 0.86rem; color: rgba(255,255,255,0.62); transition: color var(--t); }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--border-dk); }
.footer-bottom-inner { max-width: var(--max-w); margin: 0 auto; padding: 1.5rem 2.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; font-family: var(--font-ui); font-size: 0.74rem; color: rgba(255,255,255,0.4); }

/* ─── Single Report ──────────────────────────────────────────────────────────── */
.report-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 3.5rem 0; }
.report-hero-inner { max-width: 780px; margin: 0 auto; }
.report-hero .breadcrumb { font-family: var(--font-ui); font-size: 0.76rem; color: var(--text-soft); margin-bottom: 1.25rem; }
.report-hero .breadcrumb a:hover { color: var(--gold-dk); }
.report-hero h1 { font-family: var(--font-h); font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 700; line-height: 1.12; color: var(--navy); margin-bottom: 1.5rem; letter-spacing: -0.01em; }
.report-hero-meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-family: var(--font-ui); font-size: 0.82rem; color: var(--text-soft); }
.report-hero-meta a { color: var(--navy); font-weight: 600; }
.report-hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold); }
.single-figure { max-width: 1100px; margin: -2rem auto 0; padding: 0 2.5rem; }
.single-figure img { width: 100%; aspect-ratio: 16/8; object-fit: cover; border-radius: var(--r); }
.single-body { max-width: 740px; margin: 3rem auto; padding: 0 2.5rem; font-size: 1.1rem; line-height: 1.8; color: var(--text); }
.single-body p { margin-bottom: 1.5rem; }
.single-body h2 { font-family: var(--font-h); font-size: 1.7rem; font-weight: 700; color: var(--navy); margin: 2.5rem 0 1rem; }
.single-body h3 { font-family: var(--font-h); font-size: 1.35rem; font-weight: 700; color: var(--navy); margin: 2rem 0 0.75rem; }
.single-body ul, .single-body ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.single-body ul { list-style: disc; } .single-body ol { list-style: decimal; }
.single-body li { margin-bottom: 0.5rem; }
.single-body a { color: var(--gold-dk); text-decoration: underline; text-underline-offset: 3px; }
.single-body blockquote { border-left: 3px solid var(--gold); padding: 0.5rem 1.5rem; margin: 2rem 0; font-family: var(--font-h); font-style: italic; font-size: 1.3rem; color: var(--navy); }
.single-body strong { font-weight: 600; }

.analyst-box { max-width: 740px; margin: 3rem auto; padding: 2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); display: flex; gap: 1.5rem; align-items: flex-start; }
.analyst-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.analyst-box .eyebrow { display: block; margin-bottom: 0.4rem; }
.analyst-box h3 { font-family: var(--font-h); font-size: 1.2rem; font-weight: 700; color: var(--navy); margin-bottom: 0.4rem; }
.analyst-box p { font-size: 0.9rem; color: var(--text-soft); line-height: 1.6; }

/* ─── Archive / Page ─────────────────────────────────────────────────────────── */
.page-head { background: var(--surface); border-bottom: 1px solid var(--border); padding: 4rem 0; }
.page-head .eyebrow { display: block; margin-bottom: 0.75rem; }
.page-head h1 { font-family: var(--font-h); font-size: clamp(2rem, 3.5vw, 2.8rem); font-weight: 700; color: var(--navy); letter-spacing: -0.01em; }
.page-head p { margin-top: 0.85rem; color: var(--text-soft); max-width: 60ch; }
.prose { max-width: 740px; margin: 3rem auto; padding: 0 2.5rem; font-size: 1.08rem; line-height: 1.8; }
.prose h2 { font-family: var(--font-h); font-size: 1.6rem; color: var(--navy); margin: 2rem 0 1rem; }
.prose h3 { font-family: var(--font-h); font-size: 1.3rem; color: var(--navy); margin: 1.5rem 0 0.75rem; }
.prose p { margin-bottom: 1.25rem; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1.25rem; }

/* ─── Authors ────────────────────────────────────────────────────────────────── */
.authors-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.author-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 2.25rem; text-align: center; transition: border-color var(--t); }
.author-card:hover { border-color: var(--gold); }
.author-card img { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; margin: 0 auto 1.1rem; }
.author-card-name { font-family: var(--font-h); font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.author-card-name a:hover { color: var(--gold-dk); }
.author-card-role { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-dk); margin: 0.4rem 0 0.9rem; }
.author-card-bio { font-size: 0.88rem; color: var(--text-soft); line-height: 1.6; }
.author-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 3.5rem 0; }
.author-hero-inner { display: flex; gap: 2rem; align-items: center; }
.author-hero-inner img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-hero h1 { font-family: var(--font-h); font-size: 2rem; font-weight: 700; color: var(--navy); margin: 0.35rem 0 0.75rem; }
.author-hero p { color: var(--text-soft); max-width: 70ch; }

/* ─── Pagination / 404 ───────────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3.5rem; font-family: var(--font-ui); font-size: 0.85rem; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 0.5rem; border: 1px solid var(--border); border-radius: var(--r); color: var(--text); transition: all var(--t); }
.pagination a:hover, .pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.not-found { text-align: center; padding: 7rem 2rem; }
.not-found h1 { font-family: var(--font-h); font-size: 5rem; color: var(--gold); margin-bottom: 1rem; }
.not-found p { color: var(--text-soft); margin-bottom: 2rem; }
.widget-title { font-family: var(--font-ui); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--navy); margin-bottom: 1rem; }

/* ═══ TABLET ═══ */
@media (max-width: 1024px) {
  .primary-nav { display: none; }
  .btn-icon { display: flex; }
  .header-actions .client-access { display: none; }
  .hero { padding: 11rem 0 5rem; }
  .pillars-grid, .method-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .authors-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══ MOBILE ═══ */
@media (max-width: 640px) {
  .wrap, .header-inner, .footer-main, .footer-bottom-inner, .single-body, .single-figure, .prose { padding-left: 1.25rem; padding-right: 1.25rem; }
  .hero { padding: 9rem 0 4rem; }
  .hero-title { font-size: 2.1rem; }
  .section { padding: 3.5rem 0; }
  .report-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-main { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 1.25rem 2rem; }
  .footer-bottom-inner { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .authors-grid { grid-template-columns: 1fr; }
  .author-hero-inner { flex-direction: column; text-align: center; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .report-hero h1 { font-size: 1.75rem; }
  .single-body { font-size: 1.05rem; }
}
