/* ============================================================
   MALKA ADVANCE — Design tokens & base styles
   Navy + champagne gold, premium fintech
   ============================================================ */

:root {
  /* Palette — navy base */
  --bg-0: #07090f;
  --bg-1: #0a0e1a;
  --bg-2: #0f1424;
  --bg-3: #161c30;
  --line: rgba(212, 160, 86, 0.16);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(212, 160, 86, 0.32);

  /* Accents */
  --gold: #d4a056;
  --gold-soft: #e8c590;
  --gold-deep: #a47836;
  --ivory: #f4ede0;
  --ivory-dim: #c9c0ad;
  --mute: #7a8599;
  --mute-2: #4a5266;

  /* Status */
  --green: #6ec28d;
  --red: #d97757;

  /* Typography */
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing scale */
  --gutter: clamp(20px, 4vw, 48px);
  --section-pad: clamp(80px, 10vw, 160px);
  --max-w: 1320px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-1);
  color: var(--ivory);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

/* Density variants */
body[data-density="compact"] {
  --section-pad: clamp(56px, 7vw, 110px);
}
body[data-density="roomy"] {
  --section-pad: clamp(110px, 13vw, 200px);
}

/* Light mode */
body[data-mode="light"] {
  --bg-0: #f7f3eb;
  --bg-1: #faf6ee;
  --bg-2: #f0ead9;
  --bg-3: #e6dec8;
  --line: rgba(20, 28, 50, 0.12);
  --line-soft: rgba(20, 28, 50, 0.06);
  --line-strong: rgba(164, 120, 54, 0.4);
  --ivory: #131a2c;
  --ivory-dim: #3a4257;
  --mute: #5a6480;
  --mute-2: #8a92a8;
  --gold: #a47836;
  --gold-soft: #8a6429;
  --gold-deep: #6e4f1d;
}

/* Palette: emerald variant */
body[data-palette="emerald"] {
  --bg-0: #06120e;
  --bg-1: #081a14;
  --bg-2: #0c2620;
  --bg-3: #103730;
  --gold: #c8a85a;
  --gold-soft: #d8c08a;
  --gold-deep: #8a6f30;
  --line: rgba(200, 168, 90, 0.16);
}

/* Palette: monochrome */
body[data-palette="mono"] {
  --gold: #e8e1cf;
  --gold-soft: #f4ede0;
  --gold-deep: #b6ad96;
  --line: rgba(232, 225, 207, 0.18);
  --line-strong: rgba(232, 225, 207, 0.36);
}

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
  color: var(--ivory);
}

p { margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.eyebrow-mute {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}

.italic { font-style: italic; }

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container-wide {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: var(--section-pad) 0; position: relative; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 200ms cubic-bezier(.2,.8,.2,1);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #1a1208;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(212, 160, 86, 0.5);
}

.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--gold);
}

.btn-arrow::after {
  content: "→";
  font-family: var(--font-mono);
  transition: transform 200ms;
}
.btn-arrow:hover::after { transform: translateX(3px); }

.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-lg { padding: 18px 28px; font-size: 15px; }

/* Tag/chip */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(212, 160, 86, 0.08);
  color: var(--gold);
  border: 1px solid var(--line);
}
.tag-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 28px;
}

/* Text helpers */
.t-mute { color: var(--mute); }
.t-dim { color: var(--ivory-dim); }
.t-gold { color: var(--gold); }
.t-mono { font-family: var(--font-mono); }
.t-display { font-family: var(--font-display); }

/* Grid hairline pattern */
.hairlines {
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* Marquee */
.marquee {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 64px;
  animation: marquee 40s linear infinite;
  flex-shrink: 0;
  padding-right: 64px;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* Numeric display */
.numeric {
  font-family: var(--font-display);
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.04em;
}

/* Divider */
.rule {
  height: 1px;
  width: 100%;
  background: var(--line-soft);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* Selection */
::selection { background: var(--gold); color: #1a1208; }

/* Focus */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
