/* ==========================================================================
   InvestGuide — corporate theme
   ========================================================================== */

:root {
  --navy-950: #071426;
  --navy-900: #0a1f38;
  --navy-800: #0f2d52;
  --navy-700: #143c6b;
  --navy-600: #1d4f8b;
  --accent: #00b578;
  --accent-600: #009a63;
  --accent-soft: #e6f7f0;
  --gold: #f6b93b;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #16263a;
  --muted: #5a6b80;
  --border: #e5eaf1;
  --shadow-sm: 0 1px 2px rgba(15, 45, 82, .06), 0 1px 3px rgba(15, 45, 82, .08);
  --shadow-md: 0 12px 32px rgba(15, 45, 82, .10);
  --shadow-lg: 0 24px 60px rgba(15, 45, 82, .16);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1140px;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Sora', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { color: var(--accent-600); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-900); line-height: 1.2; margin: 0 0 .5em; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy-900); }
.brand:hover { color: var(--navy-900); }
.brand-mark {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-600));
  color: #fff; box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand-tag { font-size: 12px; color: var(--muted); }

.nav-group { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--muted); font-weight: 500; font-size: 15px; position: relative; padding: 6px 0; }
.site-nav a:hover { color: var(--navy-900); }
.site-nav a.active { color: var(--navy-900); }
.site-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.lang-switch { display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; }
.lang-switch a { padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang-switch a:hover { color: var(--navy-900); }
.lang-switch a.active { background: var(--navy-800); color: #fff; }

.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 9px; background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.menu-toggle span { display: block; height: 2px; background: var(--navy-900); border-radius: 2px; transition: .2s; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(0, 181, 120, .35), transparent 60%),
    radial-gradient(800px 400px at -10% 110%, rgba(246, 185, 59, .22), transparent 55%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800) 60%, var(--navy-700));
  padding: 88px 0 110px;
}
.hero h1 { color: #fff; font-size: clamp(32px, 5vw, 54px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 16px; max-width: 760px; }
.hero-eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
.hero-sub { color: rgba(255, 255, 255, .85); font-size: 18px; max-width: 640px; margin: 0 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 15px; transition: .18s; border: 1px solid transparent; cursor: pointer; }
.btn--primary { background: var(--accent); color: #04251a; }
.btn--primary:hover { background: var(--accent-600); color: #04251a; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 181, 120, .35); }
.btn--ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateY(-1px); }

/* Stats */
.stats-band {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); margin-top: -48px; position: relative; z-index: 5;
}
.stat { padding: 26px 20px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-num { display: block; font-family: var(--font-head); font-size: 34px; font-weight: 800; color: var(--navy-900); }
.stat-label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; margin-top: 4px; }

/* Sections */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: 28px; margin: 0; }
.link-more { color: var(--accent-600); font-weight: 600; font-size: 15px; white-space: nowrap; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d6e2f0; }

.category-card { display: flex; align-items: center; gap: 16px; padding: 22px; }
.category-card .card-mono {
  width: 46px; height: 46px; flex: none; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-600);
  font-family: var(--font-head); font-weight: 800; font-size: 20px;
}
.category-card h3 { font-size: 17px; margin: 0 0 4px; }
.card-meta { margin: 0; color: var(--muted); font-size: 13.5px; }

.article-card { display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 16/10; background: linear-gradient(135deg, #e8eef6, #f4f7fb); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.card-body h3 { font-size: 18px; line-height: 1.35; margin: 0; }
.card-excerpt { margin: 0; color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.pill { display: inline-flex; align-items: center; width: fit-content; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-600); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.pill:hover { background: var(--accent); color: #04251a; }

/* Page hero (list / term / section) */
.page-hero {
  color: #fff; padding: 56px 0 66px;
  background:
    radial-gradient(700px 300px at 90% -20%, rgba(0, 181, 120, .32), transparent 60%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
}
.page-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; }
.page-hero-sub { color: rgba(255, 255, 255, .78); font-size: 16px; margin: 0; }

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--accent-600); }
.breadcrumb .sep { color: #c3cdda; }
.breadcrumb--light a { color: #7fe6c1; }
.breadcrumb--light { color: rgba(255, 255, 255, .75); }

/* Article single */
.article-single { max-width: 960px; padding-top: 40px; }
.article-header { margin: 8px 0 28px; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.article-date { color: var(--muted); font-size: 13.5px; }
.article-header h1 { font-size: clamp(28px, 4.4vw, 42px); margin: 0 0 14px; letter-spacing: -.01em; }
.article-deck { font-size: 18px; color: var(--muted); margin: 0; max-width: 760px; }
.article-hero { margin: 0 0 32px; }
.article-hero img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-md); }

.article-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.article-toc { position: sticky; top: 90px; padding: 18px 18px 18px 0; border-right: 1px solid var(--border); }
.article-toc h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
.article-toc nav ul { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.article-toc nav li { margin: 6px 0; }
.article-toc nav a { color: var(--muted); }
.article-toc nav a:hover { color: var(--accent-600); }
.article-toc nav ul ul { padding-left: 12px; border-left: 1px solid var(--border); }

/* Content typography */
.content { font-size: 17px; line-height: 1.8; color: #22344a; }
.content h2 { font-size: 26px; margin: 44px 0 14px; }
.content h3 { font-size: 20px; margin: 32px 0 12px; }
.content p { margin: 0 0 18px; }
.content ul, .content ol { margin: 0 0 20px; padding-left: 24px; }
.content li { margin: 6px 0; }
.content strong { color: var(--navy-900); }
.content a { color: var(--accent-600); text-decoration: underline; text-underline-offset: 2px; }
.content blockquote { margin: 24px 0; padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #12233a; }
.content code { background: #eef2f7; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.content pre { background: var(--navy-950); color: #e6edf5; padding: 18px; border-radius: var(--radius-sm); overflow-x: auto; }
.content pre code { background: transparent; color: inherit; }
.content table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; }
.content th, .content td { border: 1px solid var(--border); padding: 10px 12px; text-align: left; }
.content th { background: #eef3f9; }

/* FAQ */
.faq { margin-top: 44px; border-top: 1px solid var(--border); padding-top: 30px; }
.faq h2 { font-size: 24px; margin-bottom: 18px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface); overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 16px 18px; font-weight: 600; color: var(--navy-900); list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--accent-600); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin: 0; padding: 0 18px 18px; color: var(--muted); }

/* Translations */
.translations { margin-top: 34px; padding: 18px 20px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.translations h4 { margin: 0 0 8px; font-size: 14px; }
.translations ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.translations a { font-weight: 600; color: var(--accent-600); }

/* Footer */
.site-footer { background: var(--navy-950); color: #c7d3e3; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding: 56px 20px 40px; }
.footer-brand p { margin: 14px 0 0; max-width: 340px; font-size: 14.5px; color: #93a5bd; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-mark { background: linear-gradient(135deg, var(--navy-600), var(--accent-600)); }
.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 9px 0; font-size: 14.5px; }
.footer-col a { color: #93a5bd; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 22px 20px; }
.footer-bottom p { margin: 0; font-size: 13.5px; color: #7c8fa8; }

/* 404 */
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.page-404 .site-main { flex: 1; }
.error-page { display: flex; align-items: center; justify-content: center; text-align: center; padding: 90px 20px; }
.error-code { font-family: var(--font-head); font-size: clamp(90px, 18vw, 180px); font-weight: 800; line-height: 1; margin: 0; background: linear-gradient(135deg, var(--accent), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-inner h1 { font-size: 30px; margin: 8px 0 12px; }
.error-text { color: var(--muted); margin: 0 0 26px; }

/* Menu toggle open state */
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Focus / reduced motion */
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-toc { position: static; border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 14px; }
}
@media (max-width: 760px) {
  .menu-toggle { display: flex; }
  .nav-group {
    display: none; flex-direction: column; align-items: stretch; gap: 14px;
    position: absolute; left: 0; right: 0; top: 100%; padding: 18px 20px 22px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav-group.open { display: flex; }
  .site-nav { flex-direction: column; gap: 14px; }
  .lang-switch { flex-wrap: wrap; justify-content: flex-start; }
  .brand-tag { display: none; }
  .header-inner { flex-wrap: wrap; }
  .hero { padding: 64px 0 96px; }
  .stats-band { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid var(--border); }
  .card-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}



