/* =========================================================
   Transwire.in — shared styles
   Palette: red / black / off-white  |  Vibe: modern fintech
   ========================================================= */

:root {
  --red:        #E5202A;
  --red-600:    #C81923;
  --red-50:     #FFF1F2;
  --ink:        #0A0A0B;
  --ink-700:    #1F1F23;
  --ink-500:    #4A4A52;
  --ink-400:    #71717A;
  --line:       #E7E5E0;
  --line-soft:  #F1EFEA;
  --bg:         #FAF8F4;
  --bg-card:    #FFFFFF;
  --bg-ink:     #0A0A0B;
  --green:      #1F8A5B;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 2px rgba(10,10,11,.04), 0 0 0 1px rgba(10,10,11,.04);
  --shadow:    0 6px 24px -10px rgba(10,10,11,.18), 0 0 0 1px rgba(10,10,11,.05);
  --shadow-lg: 0 30px 60px -20px rgba(10,10,11,.25), 0 0 0 1px rgba(10,10,11,.06);

  --max:    1240px;
  --gutter: clamp(20px, 4vw, 48px);

  --font-display: "Poppins", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; scroll-padding-top: 100px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ───────── Buttons ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  transition: transform .15s ease, background .2s, color .2s, box-shadow .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--red);
  color: white;
  box-shadow: 0 6px 16px -6px rgba(229,32,42,.5);
}
.btn-primary:hover { background: var(--red-600); box-shadow: 0 10px 22px -6px rgba(229,32,42,.55); }

.btn-dark {
  background: var(--ink);
  color: white;
}
.btn-dark:hover { background: #1c1c20; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: white; }

.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }

/* ───────── Header / Navbar ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,248,244,.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(250,248,244,.95);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img { height: 40px; width: auto; }
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  position: relative;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-700);
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--ink); background: rgba(10,10,11,.04); }
.nav-links a.active { color: var(--red); }
.nav-cta { display: flex; gap: 14px; align-items: center; }

/* ───────── RBI spinning seal ───────── */
.rbi-badge {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rbi-badge-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: rbi-spin 9s linear infinite;
}
.rbi-badge-ring text {
  font-family: var(--font-display);
  font-size: 8.6px;
  font-weight: 700;
  letter-spacing: 0.02em;
  fill: var(--ink);
  text-transform: uppercase;
}
.rbi-badge-core {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px -2px rgba(229,32,42,.6);
}
.rbi-badge:hover .rbi-badge-ring { animation-duration: 3.5s; }
@keyframes rbi-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .rbi-badge-ring { animation: none; }
}

/* ───────── Mobile hamburger ───────── */
.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: white;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-mobile-only { display: none; }

.has-dd { position: relative; }
.dd-icon { display: inline-block; margin-left: 4px; font-size: 10px; opacity: .6; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 280px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s, transform .18s;
}
.has-dd:hover .dropdown,
.has-dd:focus-within .dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown a {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: 10px;
  gap: 2px;
}
.dropdown a:hover { background: var(--bg); }
.dropdown a strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.dropdown a span { font-size: 12.5px; color: var(--ink-400); }

/* ───────── Sections ───────── */
section { padding: clamp(40px, 5vw, 64px) 0; }
.section-tight { padding: clamp(32px, 4vw, 48px) 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--red-50);
  color: var(--red-600);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 4px rgba(229,32,42,.18);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,32,42,.4); }
  50%      { box-shadow: 0 0 0 6px rgba(229,32,42,0); }
}

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 {
  font-size: clamp(34px, 4.4vw, 56px);
  margin-top: 16px;
}
.section-head p {
  margin-top: 16px;
  font-size: 18px;
  color: var(--ink-500);
}

/* ───────── Footer ───────── */
.footer {
  position: relative;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(229,32,42,.16), transparent 42%),
    radial-gradient(90% 80% at 100% 0%, rgba(229,32,42,.07), transparent 50%),
    linear-gradient(180deg, #111114 0%, #0A0A0B 100%);
  color: #C7C7CC;
  padding: 80px 0 32px;
  margin-top: 0;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(229,32,42,.7), transparent);
}
.footer .container { position: relative; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.1fr;
  gap: 48px;
}
.footer h4 {
  color: white;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: 14.5px; color: #9A9AA0; transition: color .15s; }
.footer a:hover { color: white; }
.footer-brand img {
  height: 30px;
  filter: brightness(0) invert(1);
  margin-bottom: 18px;
}
.footer-brand p { font-size: 14px; color: #9A9AA0; max-width: 280px; line-height: 1.6; }
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #C7C7CC;
  transition: background .18s, border-color .18s, color .18s, transform .15s;
}
.footer-social a svg { width: 18px; height: 18px; }
.footer-social a:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateY(-2px);
}
.footer-bottom {
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #6F6F76;
}
.regulatory-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  font-size: 12px;
}

/* ───────── Utility ───────── */
.muted { color: var(--ink-400); }
.divider { height: 1px; background: var(--line); width: 100%; }
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
}

/* fade-in-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  nav#primaryNav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 10px var(--gutter) 18px;
    display: none;
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }
  nav#primaryNav.open { display: block; }
  .nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: stretch;
    width: 100%;
  }
  .nav-links > li { width: 100%; }
  .nav-links a {
    padding: 13px 12px;
    border-radius: 10px;
    font-size: 16px;
  }
  .nav-mobile-only { display: block; border-top: 1px solid var(--line-soft); margin-top: 6px; padding-top: 6px; }
  .nav-links .has-dd .dropdown {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border: 0;
    background: transparent;
    min-width: 0;
    padding: 2px 0 6px 12px;
  }
  .dropdown a { padding: 9px 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .footer-brand, .footer-col { display: flex; flex-direction: column; align-items: center; }
  .footer-social { justify-content: center; }
  .btn { height: 46px; padding: 0 18px; }
  .rbi-badge { width: 32px; height: 32px; }
  .nav { gap: 12px; }
  .nav-cta { gap: 8px; }
  .brand img { height: 26px; }
}
