/* ==========================================================================
   Finwealth — Design tokens (from Finwealth_Brand_Identity.pptx)
   ========================================================================== */
:root {
  --emerald: #0C3D30;
  --emerald-dark: #0A2A2D;
  --navy: #0B1F3A;
  --midnight: #14305A;
  --gold: #C3A24E;
  --platinum: #DEDED7;
  --silver: #B7BDC2;
  --sage: #7FA591;
  --bg: #FBFBF8;
  --surface: #FFFFFF;
  --ink: #1B1E1D;
  --gray: #6B716C;
  --line: #E3E4DE;
  --market-up: #1B7A4D;
  --market-down: #B3372C;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Be Vietnam Pro", -apple-system, "Segoe UI", Arial, sans-serif;

  --container: 1160px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--emerald);
}
p { margin: 0 0 1em; }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 96px 0; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: block;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--gray); font-size: 17px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--emerald); color: var(--bg); }
.btn-primary:hover { background: var(--emerald-dark); }
.btn-gold { background: var(--gold); color: var(--emerald-dark); }
.btn-gold:hover { background: #ad8c3f; }
.btn-outline { background: transparent; color: var(--emerald); border-color: var(--emerald); }
.btn-outline:hover { background: var(--emerald); color: var(--bg); }
.btn-outline-light { background: transparent; color: var(--bg); border-color: rgba(251,251,248,0.4); }
.btn-outline-light:hover { background: rgba(251,251,248,0.12); border-color: var(--bg); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,251,248,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 30px; height: 30px; }
.logo span {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  color: var(--emerald);
  letter-spacing: 0.01em;
}
.main-nav { display: flex; align-items: center; gap: 36px; }
.main-nav a {
  font-size: 15px; font-weight: 500; color: var(--ink);
  position: relative; padding: 4px 0;
  transition: color 0.2s ease;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--gold); transition: right 0.25s ease;
}
.main-nav a:hover { color: var(--emerald); }
.main-nav a:hover::after { right: 0; }
.main-nav a.is-active { color: var(--emerald); font-weight: 600; }
.main-nav a.is-active::after { right: 0; background: var(--emerald); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--emerald);
  position: relative; transition: all 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   About / Pillars
   ========================================================================== */
.about-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
.pillar-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 36px 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(12,61,48,0.1);
  border-color: var(--sage);
}
.pillar-card .num {
  font-family: var(--font-serif); font-size: 15px; color: var(--gold);
  font-weight: 600; margin-bottom: 18px; display: block;
}
.pillar-card h3 { font-size: 21px; margin-bottom: 12px; }
.pillar-card p { color: var(--gray); font-size: 15px; margin: 0; }

.about-alt { background: var(--emerald); color: var(--bg); }
.about-alt h2, .about-alt .eyebrow { color: var(--bg); }
.about-alt .eyebrow { color: var(--gold); }
.about-alt .section-head p { color: rgba(251,251,248,0.72); }
.about-alt .pillar-card {
  background: rgba(251,251,248,0.05); border-color: rgba(251,251,248,0.15);
}
.about-alt .pillar-card h3 { color: var(--bg); }
.about-alt .pillar-card p { color: rgba(251,251,248,0.68); }

/* ==========================================================================
   Reports
   ========================================================================== */
.reports-toolbar {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  justify-content: space-between; margin-bottom: 32px;
}
.reports-filters { display: flex; gap: 12px; flex-wrap: wrap; }
.reports-filters select, .reports-filters input {
  font-family: var(--font-sans); font-size: 14px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
}
.reports-list { display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.report-row {
  background: var(--surface); display: grid;
  grid-template-columns: 120px 1fr auto; gap: 20px; align-items: center;
  padding: 20px 24px; transition: background 0.2s ease;
}
.report-row:hover { background: rgba(127,165,145,0.14); }
.report-row .date { font-family: var(--font-serif); color: var(--emerald); font-weight: 600; font-size: 15px; }
.report-row .title { font-weight: 600; font-size: 15.5px; }
.report-row .summary { color: var(--gray); font-size: 14px; margin-top: 4px; }
.report-row .dl {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600;
  color: var(--emerald); border: 1px solid var(--line); padding: 9px 16px; border-radius: var(--radius);
  white-space: nowrap;
}
.report-row .dl:hover { background: var(--emerald); color: var(--bg); border-color: var(--emerald); }
.reports-empty { text-align: center; padding: 60px 20px; color: var(--gray); }
.reports-teaser-note {
  font-size: 14px; color: var(--gray); text-align: center; margin-top: 28px;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start;
}
.zalo-card {
  background: var(--navy); color: var(--bg); border-radius: 12px;
  padding: 40px; text-align: center;
}
.zalo-card img { width: 56px; height: 56px; margin: 0 auto 20px; }
.zalo-card h3 { color: var(--bg); font-size: 22px; }
.zalo-card p { color: rgba(251,251,248,0.72); font-size: 15px; }
.contact-info-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-info-list li {
  display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-list .ico {
  flex: none; width: 22px; height: 22px; stroke: var(--emerald); margin-top: 2px;
}
.contact-info-list .label { display: block; color: var(--gray); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }
.placeholder-note { color: #a33; font-style: italic; }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { font-size: 13.5px; font-weight: 600; color: var(--emerald); }
.contact-form input, .contact-form textarea {
  font-family: var(--font-sans); font-size: 15px; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 13px; color: var(--gray); }

/* CTA band */
.cta-band { background: var(--navy); color: var(--bg); text-align: center; }
.cta-band h2 { color: var(--bg); }
.cta-band p { color: rgba(251,251,248,0.72); font-size: 17px; max-width: 560px; margin: 0 auto 32px; }
.cta-band .hero-actions { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--emerald-dark); color: rgba(251,251,248,0.75); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo img { width: 26px; height: 26px; }
.footer-logo span { font-family: var(--font-serif); color: var(--bg); font-size: 19px; font-weight: 600; }
.footer-col h4 { color: var(--bg); font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14.5px; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(251,251,248,0.12); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  font-size: 13px; color: rgba(251,251,248,0.5);
}
.disclaimer {
  font-size: 12.5px; color: rgba(251,251,248,0.45); max-width: 900px; margin: 0 0 24px; line-height: 1.7;
}

/* ==========================================================================
   Page hero (interior pages)
   ========================================================================== */
.page-hero {
  position: relative; overflow: hidden;
  padding: 64px 0 48px;
  background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 50%, var(--emerald-dark) 100%);
  background-size: 220% 220%;
  animation: heroGradientShift 16s ease-in-out infinite;
  border-bottom: 1px solid rgba(195,162,78,0.25);
}
.page-hero::before {
  content: ""; position: absolute; inset: -50%;
  background-image:
    repeating-linear-gradient(45deg, rgba(195,162,78,0.06) 0px, rgba(195,162,78,0.06) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(-45deg, rgba(251,251,248,0.04) 0px, rgba(251,251,248,0.04) 1px, transparent 1px, transparent 42px);
  animation: gridDrift 34s linear infinite;
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero h1 { font-size: clamp(30px, 4vw, 42px); color: var(--bg); }
.page-hero p { color: rgba(251,251,248,0.72); font-size: 17px; max-width: 640px; }

@keyframes heroGradientShift {
  0%, 100% { background-position: 0% 40%; }
  50% { background-position: 100% 60%; }
}
@keyframes gridDrift {
  from { transform: translate(0, 0); }
  to { transform: translate(42px, 42px); }
}

/* Rising gold particles — injected by js/main.js (initHeroParticles) */
.hero-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.hero-particles span {
  position: absolute; bottom: -12px; border-radius: 50%;
  background: var(--gold); opacity: 0;
  box-shadow: 0 0 6px 1px rgba(195,162,78,0.55);
  animation: heroParticleRise linear infinite;
}
@keyframes heroParticleRise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  12% { opacity: 0.9; }
  85% { opacity: 0.35; }
  100% { transform: translateY(-180px) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .page-hero, .page-hero::before { animation: none; }
  .hero-particles { display: none; }
}

/* ==========================================================================
   Homepage — news portal layout (news feed + market board sidebar)
   ========================================================================== */
.home-layout {
  display: grid;
  grid-template-columns: 4fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 48px 0 96px;
}
.updated-note {
  font-size: 13px; color: var(--gray); margin-bottom: 24px;
}
.updated-note .dot { color: var(--gold); margin: 0 6px; }

.news-feed { display: flex; flex-direction: column; gap: 4px; }
.news-card {
  display: block; padding: 22px 20px; margin: 0 -20px; border-bottom: 1px solid var(--line);
  border-radius: 8px; transition: background 0.2s ease, transform 0.2s ease;
}
.news-card:first-child { }
.news-card:hover { background: var(--platinum); transform: translateX(4px); }
.news-card-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px;
}
.news-source {
  font-weight: 700; color: var(--emerald); text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--surface); padding: 3px 9px; border-radius: 3px;
}
.news-time { color: var(--gray); }
.news-card h3 {
  font-size: 19px; margin: 0 0 8px; color: var(--ink); font-family: var(--font-serif); font-weight: 600;
  transition: color 0.2s ease;
}
.news-card:hover h3 { color: var(--emerald); text-decoration: underline; }
.news-card p { color: var(--gray); font-size: 14.5px; margin: 0; }
.news-loading, .news-error {
  padding: 40px 0; color: var(--gray); text-align: center; font-size: 15px;
}
.news-error a { color: var(--emerald); font-weight: 600; text-decoration: underline; }

.board-sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.board-panel {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden;
}
.board-panel-head {
  padding: 14px 16px; background: var(--emerald); color: var(--bg);
  display: flex; align-items: baseline; justify-content: space-between;
}
.board-panel-head span {
  font-family: var(--font-serif); font-weight: 600; font-size: 14.5px;
}
.board-panel-head .market-period {
  font-family: var(--font-sans); font-weight: 500; font-size: 11.5px;
  color: rgba(251,251,248,0.6); text-transform: uppercase; letter-spacing: 0.04em;
}
.board-panel-body { padding: 4px; }
.board-note { font-size: 12px; color: var(--gray); padding: 0 4px; }
.board-cta {
  display: block; text-align: center; padding: 14px; border-radius: 8px;
  background: var(--gold); color: var(--emerald-dark); font-weight: 600; font-size: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}
.board-cta:hover { background: #ad8c3f; transform: translateY(-2px); }

/* Market board (custom-built VN-Index chart + large-cap stock list) */
.market-panel { background: var(--midnight); border-color: var(--midnight); }
.market-panel .board-panel-head { background: transparent; padding-bottom: 0; }
.market-loading, .market-error { padding: 24px 16px; color: rgba(251,251,248,0.6); font-size: 13px; text-align: center; }

.market-head { padding: 10px 16px 4px; color: var(--bg); }
.market-head-symbol { font-size: 12px; letter-spacing: 0.06em; color: rgba(251,251,248,0.55); text-transform: uppercase; }
.market-head-value { font-family: var(--font-serif); font-size: 28px; font-weight: 600; line-height: 1.15; }
.market-head-change { font-size: 13.5px; font-weight: 600; margin-top: 2px; }
.market-head-change.up { color: #6FCF97; }
.market-head-change.down { color: #F2A0A0; }

.market-chart-wrap { position: relative; margin: 10px 0 4px; padding: 0 8px; }
.market-svg { display: block; width: 100%; aspect-ratio: 16 / 9; cursor: crosshair; }
.market-tooltip {
  position: absolute; transform: translate(-50%, -130%);
  background: var(--bg); color: var(--ink); font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 4px; white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.market-stocks { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid rgba(251,251,248,0.12); }
.market-stock-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 16px; font-size: 13px; color: var(--bg);
  border-bottom: 1px solid rgba(251,251,248,0.08); transition: background 0.2s ease;
}
.market-stock-row:last-child { border-bottom: none; }
.market-stock-row:hover { background: rgba(251,251,248,0.06); }
.ms-symbol { font-weight: 700; letter-spacing: 0.02em; }
.ms-price { font-family: var(--font-serif); font-weight: 600; text-align: right; }
.ms-change { text-align: right; font-weight: 600; font-size: 12px; white-space: nowrap; }
.ms-change span { font-weight: 500; opacity: 0.85; }
.ms-change.up { color: #6FCF97; }
.ms-change.down { color: #F2A0A0; }

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .report-row { grid-template-columns: 1fr; }
  .report-row .dl { justify-self: start; }
  .home-layout { grid-template-columns: 1fr; }
  .board-sidebar { position: static; order: -1; }
}
@media (max-width: 760px) {
  .main-nav { position: fixed; top: 76px; right: 0; left: 0; height: calc(100vh - 76px); background: var(--bg); flex-direction: column;
    padding: 32px 24px; gap: 24px; transform: translateX(100%); transition: transform 0.25s ease; z-index: 90; }
  .main-nav.is-open { transform: translateX(0); }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  section { padding: 64px 0; }
}
