/* =========================================================
   {{SITE_NAME}} — FBAR Information Site
   Professional design system
   ========================================================= */

:root {
  /* Palette */
  --navy-900: #0b1f3a;
  --navy-800: #10294c;
  --navy-700: #16345f;
  --navy-600: #1d4276;
  --blue-500: #2563a8;
  --blue-400: #3b82c4;
  --gold-500: #c8952b;
  --gold-400: #e0ad45;
  --slate-900: #1a2233;
  --slate-700: #3c4759;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --green-600: #157347;
  --red-600: #b02a37;

  /* Typography */
  --font-sans: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  /* Layout */
  --maxw: 1140px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 3px rgba(16, 41, 76, 0.08);
  --shadow-md: 0 6px 20px rgba(16, 41, 76, 0.10);
  --shadow-lg: 0 14px 40px rgba(16, 41, 76, 0.14);
  --transition: 0.2s ease;
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--slate-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-500); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--navy-700); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy-900);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.6em;
}
h1 { font-size: 2.35rem; }
h2 { font-size: 1.8rem; margin-top: 1.6em; }
h3 { font-size: 1.3rem; margin-top: 1.4em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.5em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 820px; }

/* ---------- Skip link / a11y ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--gold-500); color: var(--navy-900);
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: var(--slate-300);
  font-size: 0.82rem;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar a { color: var(--gold-400); }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); }
.brand .mark {
  width: 42px; height: 42px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--navy-700), var(--blue-500));
  color: var(--white); display: grid; place-items: center;
  font-weight: 700; font-size: 1.15rem; letter-spacing: 0.5px;
}
.brand .name { font-size: 1.25rem; font-weight: 700; color: var(--navy-900); line-height: 1.1; }
.brand .tag { display: block; font-family: var(--font-sans); font-size: 0.7rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--slate-500); }
.brand:hover { text-decoration: none; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--slate-700); font-size: 0.95rem; font-weight: 600;
  padding: 8px 12px; border-radius: var(--radius-sm); font-family: var(--font-sans);
}
.nav-links a:hover { background: var(--slate-100); color: var(--navy-800); text-decoration: none; }
.nav-links a.active { color: var(--blue-500); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy-800); margin: 4px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-sans); font-weight: 600;
  padding: 12px 24px; border-radius: var(--radius-sm); cursor: pointer;
  border: 2px solid transparent; font-size: 0.98rem; transition: all var(--transition);
}
.btn-primary { background: var(--gold-500); color: var(--navy-900); }
.btn-primary:hover { background: var(--gold-400); text-decoration: none; color: var(--navy-900); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); text-decoration: none; }
.btn-ghost { background: var(--white); color: var(--navy-700); border-color: var(--slate-300); }
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-500); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--blue-500) 130%);
  color: var(--white); padding: 76px 0 84px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(224,173,69,0.18), transparent 70%);
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: 2.8rem; max-width: 760px; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,0.9); max-width: 680px; margin-bottom: 1.8em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: 2px;
  font-size: 0.78rem; font-weight: 700; color: var(--gold-400);
  font-family: var(--font-sans); margin-bottom: 16px;
}

/* ---------- Page header (interior) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white); padding: 54px 0 46px;
}
.page-header h1 { color: var(--white); margin-bottom: 0.3em; }
.page-header p { color: rgba(255,255,255,0.88); max-width: 720px; margin: 0; font-size: 1.08rem; }
.breadcrumbs { font-size: 0.85rem; color: rgba(255,255,255,0.7); margin-bottom: 14px; }
.breadcrumbs a { color: var(--gold-400); }
.breadcrumbs span { margin: 0 6px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--slate-50); }
.section-title { text-align: center; margin-bottom: 12px; }
.section-intro { text-align: center; max-width: 680px; margin: 0 auto 44px; color: var(--slate-700); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .icon {
  width: 52px; height: 52px; border-radius: 12px; margin-bottom: 16px;
  background: var(--slate-100); color: var(--blue-500);
  display: grid; place-items: center; font-size: 1.5rem; font-weight: 700;
}
.card h3 { margin-top: 0; }
.card p { color: var(--slate-700); margin-bottom: 0.6em; }
.card .card-link { font-weight: 600; font-size: 0.95rem; }

/* ---------- Stat row ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.stat { text-align: center; padding: 20px; background: rgba(255,255,255,0.06); border-radius: var(--radius); }
.stat .num { font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--gold-400); }
.stat .label { font-size: 0.85rem; color: rgba(255,255,255,0.82); }

/* ---------- Content article ---------- */
.article { padding: 56px 0; }
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 48px; align-items: start; }
.article-body h2:first-child { margin-top: 0; }
.article-body img { border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 24px 0; }

.callout {
  border-left: 4px solid var(--blue-500); background: var(--slate-50);
  padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 26px 0;
}
.callout.warn { border-color: var(--gold-500); background: #fff8ec; }
.callout.danger { border-color: var(--red-600); background: #fdf2f3; }
.callout strong { color: var(--navy-900); }
.callout p:last-child { margin-bottom: 0; }

/* ---------- Sidebar / TOC ---------- */
.sidebar { position: sticky; top: 96px; }
.sidebar-box {
  background: var(--slate-50); border: 1px solid var(--slate-200);
  border-radius: var(--radius); padding: 22px; margin-bottom: 22px;
}
.sidebar-box h4 { margin-top: 0; font-size: 1.05rem; }
.toc { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 8px; }
.toc a { font-size: 0.92rem; color: var(--slate-700); }
.toc a:hover { color: var(--blue-500); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 24px 0; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.95rem;
  border: 1px solid var(--slate-200); border-radius: var(--radius); overflow: hidden;
}
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--slate-200); }
table.data th { background: var(--navy-800); color: var(--white); font-family: var(--font-sans); font-weight: 600; }
table.data tr:nth-child(even) td { background: var(--slate-50); }
table.data td { color: var(--slate-700); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 28px 0; }
.steps li {
  position: relative; padding: 0 0 26px 62px; border-left: 2px solid var(--slate-200);
  margin-left: 20px;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -21px; top: -4px; width: 40px; height: 40px;
  background: var(--blue-500); color: var(--white); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-serif); font-weight: 700;
}
.steps li h3 { margin: 0 0 6px; }
.steps li p { color: var(--slate-700); margin: 0; }

/* ---------- FAQ / accordion ---------- */
.faq-item { border: 1px solid var(--slate-200); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--white); }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 18px 22px; font-size: 1.05rem; font-weight: 600; color: var(--navy-900);
  font-family: var(--font-serif); display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-q:hover { color: var(--blue-500); }
.faq-q .chev { transition: transform var(--transition); flex: none; color: var(--blue-500); font-size: 1.2rem; }
.faq-item.open .faq-q .chev { transform: rotate(45deg); }
.faq-a { padding: 0 22px; max-height: 0; overflow: hidden; transition: max-height var(--transition), padding var(--transition); }
.faq-item.open .faq-a { padding: 0 22px 20px; max-height: 600px; }
.faq-a p { color: var(--slate-700); margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy-800), var(--blue-500));
  color: var(--white); text-align: center; padding: 56px 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 620px; margin: 0 auto 26px; color: rgba(255,255,255,0.9); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; margin-bottom: 18px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--navy-800); }
.field input, .field select, .field textarea {
  padding: 11px 14px; border: 1px solid var(--slate-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem; color: var(--slate-900); background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(37,99,168,0.15);
}
.field textarea { resize: vertical; min-height: 130px; }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--slate-700); }
.form-note { font-size: 0.85rem; color: var(--slate-500); }
.form-success { display: none; background: #eafaf1; border: 1px solid var(--green-600); color: var(--green-600); padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; }

/* ---------- Prose (legal pages) ---------- */
.prose h2 { border-bottom: 2px solid var(--slate-200); padding-bottom: 8px; }
.prose { max-width: 820px; }
.prose ul { color: var(--slate-700); }
.updated { color: var(--slate-500); font-size: 0.9rem; font-style: italic; margin-bottom: 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: var(--slate-300); padding: 56px 0 0; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; padding-bottom: 40px; }
.site-footer h4 { color: var(--white); font-family: var(--font-sans); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--slate-300); }
.site-footer a:hover { color: var(--gold-400); text-decoration: none; }
.footer-brand .brand .name { color: var(--white); }
.footer-brand p { color: var(--slate-300); max-width: 300px; margin-top: 14px; }
.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0;
  font-size: 0.82rem; color: var(--slate-500); line-height: 1.6;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 0.85rem;
}
.footer-bottom a { color: var(--slate-300); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 3000;
  background: var(--navy-900); color: var(--slate-200); padding: 18px 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2); display: none;
}
.cookie-banner.show { display: block; }
.cookie-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.cookie-inner p { margin: 0; font-size: 0.9rem; max-width: 720px; }
.cookie-inner a { color: var(--gold-400); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-actions .btn { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.badge { display: inline-block; background: var(--slate-100); color: var(--blue-500); font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 1.9rem; }
  .hero h1 { font-size: 2.1rem; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    align-items: stretch; background: var(--white); border-bottom: 1px solid var(--slate-200);
    padding: 10px; gap: 2px; box-shadow: var(--shadow-md); display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band, .hero { text-align: center; }
  .hero-actions { justify-content: center; }
}
