/* =============================================================================
 * Rakshati Finserv — Marketing site shared styles.
 * Loaded by every page. Grounded ENTIRELY in colors_and_type.css design tokens.
 *
 * Layout grid: 1320px container with 32px gutters. Sections are 96-128px tall.
 * Each home variation extends/overrides this with its own <style> block in head.
 * ========================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-feature-settings: var(--feat-sans);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---------- Container ----------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 760px) { .container { padding: 0 20px; } }

/* ---------- Top nav ------------------------------------------------------- */
/* The nav adapts to the page's tone via a `data-theme` attribute on the <nav>:
   - data-theme="light" (default) → white bg, navy text
   - data-theme="dark"           → translucent navy, light text
   - data-theme="floating"       → transparent over hero, no chrome           */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  height: 68px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.site-nav .container { display: flex; align-items: center; gap: 32px; height: 100%; }

/* Logo lockup */
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--brand-navy);
  flex-shrink: 0;
}
.nav-logo-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--brand-gold-soft) 0%, var(--brand-gold) 100%);
  color: var(--brand-navy);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 19px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 4px 12px -2px rgba(146, 116, 73, 0.35);
}
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; }
.nav-logo-name { font-weight: 700; }
.nav-logo-sub {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--brand-gold); margin-top: 4px;
}
/* Real brand logo image (replaces the gold monogram mark) */
.nav-logo-img { height: 44px; width: auto; display: block; }
.foot-logo-img { height: 52px; }
@media (max-width: 560px) { .nav-logo-img { height: 34px; } }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  margin-left: auto; margin-right: 16px;
}
.nav-links a {
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-2);
  border-radius: 8px;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-links a:hover { background: var(--surface-muted); color: var(--fg); }
.nav-links a[aria-current="page"] { color: var(--primary); background: var(--primary-soft); }

.nav-cta { display: flex; align-items: center; gap: 8px; }

/* Dark theme nav */
.site-nav[data-theme="dark"] { background: rgba(10, 18, 32, 0.85); backdrop-filter: blur(12px); border-bottom-color: rgba(255, 255, 255, 0.06); }
.site-nav[data-theme="dark"] .nav-logo { color: #e8eaef; }
.site-nav[data-theme="dark"] .nav-logo-mark { background: linear-gradient(135deg, var(--brand-gold-soft), var(--brand-gold)); }
.site-nav[data-theme="dark"] .nav-links a { color: #a8b1c2; }
.site-nav[data-theme="dark"] .nav-links a:hover { color: #e8eaef; background: rgba(255, 255, 255, 0.06); }
.site-nav[data-theme="dark"] .nav-links a[aria-current="page"] { color: var(--brand-gold-soft); background: rgba(146, 116, 73, 0.12); }

/* Light theme nav (default) */
.site-nav[data-theme="light"] { background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(12px); border-bottom-color: var(--border); }

/* Floating (no chrome) */
.site-nav[data-theme="floating"] { background: transparent; }
.site-nav[data-theme="floating"].is-scrolled { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(12px); border-bottom-color: var(--border); }

/* ---------- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-lg);
  font-family: var(--font-sans); font-weight: 500; font-size: 13.5px;
  letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: all .15s ease; outline: none;
}
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 14.5px; }
.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary-hover));
  color: var(--primary-foreground);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 1px 2px rgb(16 24 41 / 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 10px -2px rgb(16 24 41 / 0.30); }
.btn-primary:active { transform: translateY(0); }
.btn-gold {
  background: linear-gradient(180deg, var(--brand-gold-soft), var(--brand-gold));
  color: var(--brand-navy);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgb(16 24 41 / 0.25);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 6px 14px -4px rgba(146, 116, 73, 0.45); }
.btn-outline { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-muted); border-color: var(--fg-muted); }
.btn-outline-light { background: transparent; color: #e8eaef; border-color: rgba(255,255,255,0.18); }
.btn-outline-light:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.30); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover { background: var(--surface-muted); }

.btn-arrow { width: 10px; height: 10px; transition: transform .2s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Eyebrow / Section header --------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 600;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--brand-gold);
}
.eyebrow::before {
  content: ''; width: 18px; height: 1.5px;
  background: var(--brand-gold); display: inline-block;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow.muted { color: var(--fg-muted); }
.eyebrow.muted::before { background: var(--fg-muted); }

/* Section header */
.section-head { margin-bottom: 48px; max-width: 760px; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 {
  margin: 0; font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1; letter-spacing: -0.025em;
  color: var(--fg);
}
.section-head h2 em { font-style: normal; color: var(--brand-gold); }
.section-head p {
  margin: 18px 0 0; font-size: 16px; line-height: 1.6;
  color: var(--fg-muted); max-width: 640px;
}

/* ---------- Pills / Tags --------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--radius-4xl);
  font-size: 11.5px; font-weight: 500;
  background: var(--surface-muted); color: var(--fg-2);
  border: 1px solid var(--border);
}
.pill-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--fg-muted); flex-shrink: 0; }
.pill-good .pill-dot { background: var(--good); }
.pill-info .pill-dot { background: var(--info); }
.pill-warn .pill-dot { background: var(--warn); }
.pill-live .pill-dot { background: var(--good); box-shadow: 0 0 0 3px rgb(6 95 70 / 0.18); animation: pulse 2.4s infinite; }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgb(6 95 70 / 0.40); }
  50%      { box-shadow: 0 0 0 6px rgb(6 95 70 / 0); }
}

/* ---------- Card ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--hairline), var(--shadow-xs);
  padding: 24px;
}
.card-lg { padding: 32px; }

/* ---------- Footer -------------------------------------------------------- */
.site-foot {
  background: var(--brand-navy);
  background-image: radial-gradient(120% 80% at 20% 0%, rgba(146, 116, 73, 0.06), transparent 60%);
  color: #c6c1c6;
  padding: 80px 0 32px;
  margin-top: 120px;
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 64px;
}
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-brand { max-width: 320px; }
.foot-brand .nav-logo { color: #e8eaef; }
.foot-brand .nav-logo-sub { color: var(--brand-gold-soft); }
.foot-brand p { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: #8b94a5; }
.foot-col h4 {
  margin: 0 0 16px; font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand-gold-soft);
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { font-size: 13px; color: #c6c1c6; transition: color .15s; }
.foot-col a:hover { color: #fff; }

.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 11.5px; color: #8b94a5;
}
.foot-bottom .reg-marks {
  display: flex; gap: 18px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em;
}
.foot-bottom .reg-marks span strong { color: #c6c1c6; }

/* ---------- Section scaffolding ------------------------------------------ */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
section.dark { background: var(--brand-navy); color: #e8eaef; }
section.dark .section-head h2 { color: #e8eaef; }
section.dark .section-head p { color: #a8b1c2; }
section.cream { background: #faf9f6; }

/* ---------- Money / number ------------------------------------------------ */
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Live ticker --------------------------------------------------- */
.ticker {
  position: relative;
  height: 38px;
  background: var(--brand-navy);
  color: #e8eaef;
  display: flex; align-items: center;
  overflow: hidden;
  border-top: 1px solid rgba(184, 148, 102, 0.20);
  border-bottom: 1px solid rgba(184, 148, 102, 0.20);
}
.ticker-label {
  flex-shrink: 0;
  padding: 0 16px;
  height: 100%;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.22em;
  color: var(--brand-gold-soft);
  font-weight: 700;
  background: linear-gradient(90deg, var(--brand-navy-2), transparent);
  z-index: 2;
}
.ticker-label .pill-dot { background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.20); animation: pulse-green 2s infinite; }
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.50); }
  50%      { box-shadow: 0 0 0 5px rgba(74, 222, 128, 0); }
}
.ticker-track {
  display: flex; gap: 48px;
  animation: marquee 60s linear infinite;
  white-space: nowrap; flex-shrink: 0;
  padding-left: 24px;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-family: var(--font-mono); font-size: 12px;
}
.ticker-item .t-amount { color: #e8eaef; font-weight: 600; }
.ticker-item .t-sector { color: var(--brand-gold-soft); }
.ticker-item .t-state  { color: #8b94a5; }
.ticker-item .t-when   { color: #8b94a5; font-size: 10.5px; letter-spacing: 0.04em; }
.ticker-item .t-up     { color: #4ade80; }

/* ---------- Reveal on scroll --------------------------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1);
}
[data-reveal].is-in { opacity: 1; transform: translateY(0); }
[data-reveal-stagger] > * {
  opacity: 0; transform: translateY(16px);
  transition: opacity .6s cubic-bezier(.2,.6,.2,1), transform .6s cubic-bezier(.2,.6,.2,1);
}
[data-reveal-stagger].is-in > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: .08s; }
[data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: .16s; }
[data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: .24s; }
[data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: .32s; }
[data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: .40s; }
[data-reveal-stagger].is-in > *:nth-child(7) { transition-delay: .48s; }
[data-reveal-stagger].is-in > *:nth-child(8) { transition-delay: .56s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
}

/* ---------- Direction switcher (top-right floating chip) ------------------ */
/* Lets the user jump between the 4 home directions from inside any home page */
.dir-switcher {
  position: fixed; top: 84px; right: 24px; z-index: 100;
  background: var(--surface);
  border-radius: var(--radius-4xl);
  box-shadow: var(--shadow-md);
  padding: 4px;
  display: flex; gap: 2px;
  border: 1px solid var(--border);
  font-size: 11.5px;
}
.dir-switcher a {
  padding: 6px 12px; border-radius: var(--radius-4xl);
  font-weight: 500; color: var(--fg-muted);
  transition: all .15s;
}
.dir-switcher a:hover { color: var(--fg); }
.dir-switcher a[aria-current="page"] { background: var(--brand-navy); color: #fff; }
.dir-switcher.is-dark {
  background: rgba(10, 18, 32, 0.80); border-color: rgba(255,255,255,0.10); backdrop-filter: blur(8px);
}
.dir-switcher.is-dark a { color: rgba(255,255,255,0.60); }
.dir-switcher.is-dark a:hover { color: #fff; }
.dir-switcher.is-dark a[aria-current="page"] { background: var(--brand-gold); color: var(--brand-navy); }

@media (max-width: 880px) { .dir-switcher { display: none; } }
