/* Mercandi Trading — site styles */

/* Self-hosted fonts (Latin subset, variable weight) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0C1B26;
  --navy: #10283A;
  --navy-2: #173549;
  --paper: #F5F3EE;
  --tint: #ECE9E2;
  --surface: #FFFFFF;
  --text: #16242F;
  --muted: #56636D;
  --line: rgba(12, 27, 38, 0.12);
  --accent: #2FA7BF;          /* graphics on light */
  --accent-ink: #177387;      /* text/links on light */
  --accent-bright: #5CCBDF;   /* accents on dark */
  --on-dark: #EEF2F4;
  --on-dark-muted: #A9B8C2;
  --line-dark: rgba(238, 242, 244, 0.14);

  --display: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --container: 1200px;
  --gutter: 24px;
  --radius: 14px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { margin: 0; color: inherit; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

h1 { font-size: clamp(40px, 5.6vw, 68px); }
h2 { font-size: clamp(32px, 3.8vw, 48px); }

h3 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 18px;
}
.eyebrow-light { color: var(--accent-bright); }

.lede {
  font-size: clamp(18px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--muted);
}

.large {
  font-size: clamp(19px, 1.8vw, 22px);
  line-height: 1.55;
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-accent { background: var(--accent-bright); color: var(--ink); }
.btn-accent:hover { background: #7ED8E8; }
.btn-ghost { color: var(--on-dark); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: rgba(238, 242, 244, 0.4); }
.btn-light { background: var(--on-dark); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-small { height: 40px; padding: 0 18px; font-size: 15px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 27, 38, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.site-header.scrolled { border-bottom-color: var(--line-dark); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--on-dark);
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 40px; height: 40px; }
.brand-node { fill: var(--accent-bright); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.brand-sub {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.62em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a:not(.btn) {
  color: var(--on-dark-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color .2s;
}
.site-nav a:not(.btn):hover { color: var(--on-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  margin-right: -10px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle-bar {
  position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: var(--on-dark);
  transition: transform .25s, top .25s;
}
.nav-toggle-bar:nth-of-type(2) { top: 18px; }
.nav-toggle-bar:nth-of-type(3) { top: 25px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(2) { top: 21.5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-of-type(3) { top: 21.5px; transform: rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 78% 20%, rgba(47, 167, 191, 0.14), transparent 60%),
    linear-gradient(180deg, var(--ink) 0%, var(--navy) 100%);
  color: var(--on-dark);
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(48px, 8vw, 104px));
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero h1 { max-width: 15ch; }
.hero .lede { color: var(--on-dark-muted); margin-top: 26px; max-width: 34em; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.hero-map { margin: 0; }
.hero-map svg { width: 100%; height: auto; overflow: visible; }

.route-base { stroke: rgba(159, 195, 212, 0.22); stroke-width: 1.2; }
.route-flow {
  stroke: var(--accent-bright);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  animation: flow 3.2s linear infinite;
  opacity: .9;
}
@keyframes flow { to { stroke-dashoffset: -48; } }

.nodes circle { fill: var(--on-dark); }
.labels text {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  fill: var(--on-dark-muted);
}
.hub-core { fill: var(--accent-bright); }
.hub-ring { fill: none; stroke: var(--accent-bright); stroke-opacity: .5; stroke-width: 1; }
.hub-pulse {
  fill: var(--accent-bright);
  opacity: .35;
  transform-origin: 182px 125px;
  animation: pulse 2.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: .4; }
  100% { transform: scale(3.4); opacity: 0; }
}
.hub-label {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--on-dark);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(56px, 8vw, 96px) 0 0;
  border-top: 1px solid var(--line-dark);
}
.facts > div {
  padding: 26px 24px 34px 0;
}
.facts > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line-dark);
}
.facts dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.facts dd {
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--on-dark);
  line-height: 1.45;
}

/* Sections */
.section { padding: clamp(80px, 10vw, 136px) 0; }
.section-tint { background: var(--tint); }
.section-dark {
  background: var(--navy);
  color: var(--on-dark);
}
.section-dark .lede { color: var(--on-dark-muted); }

.section-head { max-width: 640px; margin-bottom: clamp(44px, 5vw, 64px); }
.section-head-wide { max-width: 760px; }
.section-head .lede { margin-top: 22px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.split-head p:not(.eyebrow) { margin-top: 22px; color: var(--muted); }
.split-body > * + * { margin-top: 22px; }
.split-body p:not(.large) { color: var(--muted); }

.pillars {
  list-style: none;
  padding: 0;
  margin-top: 36px !important;
  border-top: 1px solid var(--line);
}
.pillars li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.pillars strong { color: var(--text); font-weight: 600; }

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 30px;
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(12, 27, 38, 0.35);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 44px;
}
.icon {
  width: 44px; height: 44px;
  fill: none;
  stroke: var(--accent-ink);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-num {
  font-family: var(--display);
  font-size: 18px;
  color: var(--muted);
}
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 16px; }
.tags {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-ink);
  background: rgba(47, 167, 191, 0.1);
  padding: 5px 11px;
  border-radius: 999px;
}

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
}
.steps li {
  position: relative;
  padding: 30px 24px 0 0;
}
.steps li::before {
  content: "";
  position: absolute;
  top: -4px; left: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-bright);
}
.step-num {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  color: var(--accent-bright);
  margin-bottom: 14px;
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--on-dark-muted); font-size: 15.5px; }

.audiences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: clamp(56px, 7vw, 88px);
}
.audience {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 32px 32px 34px;
  background: rgba(255, 255, 255, 0.02);
}
.audience h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.audience ul { list-style: none; margin: 0; padding: 0; }
.audience li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark-muted);
}
.audience li::before {
  content: "";
  position: absolute;
  left: 2px; top: 23px;
  width: 12px; height: 1.5px;
  background: var(--accent-bright);
}

/* Markets */
.markets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  border-top: 1px solid var(--line);
}
.markets li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(21px, 2vw, 26px);
  line-height: 1.25;
}
.markets li::before {
  content: "";
  flex: none;
  position: relative;
  top: -0.2em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Compliance */
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
}
.principle {
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}
.principle h3 { margin-bottom: 10px; }
.principle p { color: var(--muted); font-size: 16px; }

/* Contact */
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.contact .lede { margin-top: 22px; max-width: 30em; }

.contact-details { margin: 40px 0 0; }
.contact-details > div {
  padding: 20px 0;
  border-top: 1px solid var(--line-dark);
}
.contact-details dt {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 8px;
}
.contact-details dd { margin: 0; color: var(--on-dark); line-height: 1.55; }
.contact-email {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--on-dark);
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent-bright); }

.contact-form {
  background: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: calc(var(--radius) + 4px);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field span {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-dark-muted);
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--on-dark);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:hover,
.field textarea:hover { border-color: rgba(238, 242, 244, 0.3); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-bright);
  background: rgba(255, 255, 255, 0.06);
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 6px;
}
.form-foot .btn { border: 0; cursor: pointer; font-family: inherit; }
.form-note { font-size: 14px; color: var(--on-dark-muted); flex: 1 1 220px; }
.form-note a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--on-dark-muted);
  padding: 44px 0;
  border-top: 1px solid var(--line-dark);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}
.brand-footer .brand-mark { width: 32px; height: 32px; }
.brand-footer .brand-name { font-size: 14px; }
.brand-footer .brand-sub { font-size: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-nav a { color: var(--on-dark-muted); font-size: 14px; }
.footer-nav a:hover { color: var(--on-dark); }
.footer-legal {
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
  font-size: 13.5px;
  line-height: 1.6;
}
.footer-legal p + p { margin-top: 4px; }
.footer-legal strong { color: var(--on-dark); font-weight: 600; letter-spacing: 0.02em; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route-flow, .hub-pulse { animation: none; }
  .hub-pulse { opacity: 0; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .card, .card:hover { transition: none; transform: none; }
}

/* Responsive */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line-dark); }
  .steps li { padding: 0 0 36px 32px; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li::before { top: 6px; left: -4px; }
  .step-num { margin-bottom: 6px; }
  .steps p { max-width: 36em; }
}

@media (max-width: 920px) {
  :root { --header-h: 64px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--ink);
    border-bottom: 1px solid var(--line-dark);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .site-nav.open { opacity: 1; transform: none; visibility: visible; }
  .site-nav a:not(.btn) {
    padding: 14px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--line-dark);
  }
  .site-nav .btn { margin-top: 20px; justify-content: center; height: 48px; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-map { margin: 8px -8px 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--line-dark); }

  .split, .contact-inner { grid-template-columns: 1fr; }
  .audiences { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .cards, .principles, .markets { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts > div, .facts > div + div { padding: 18px 0 20px; border-left: 0; }
  .facts > div + div { border-top: 1px solid var(--line-dark); }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .labels text { font-size: 15px; }
  .hub-label { font-size: 17px; }
  .audience, .contact-form { padding: 26px 22px; }
  .field-row { grid-template-columns: 1fr; }
  .card-top { margin-bottom: 32px; }
}

/* Inner pages (privacy, thank-you) */
.page-head {
  background: linear-gradient(180deg, var(--ink) 0%, var(--navy) 100%);
  color: var(--on-dark);
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + clamp(48px, 7vw, 88px)) 0 clamp(48px, 6vw, 72px);
}
.page-head h1 { font-size: clamp(36px, 4.6vw, 56px); }
.page-head p:not(.eyebrow) { margin-top: 16px; color: var(--on-dark-muted); }

.prose { max-width: 720px; padding: clamp(56px, 7vw, 88px) 0; }
.prose h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  margin: 44px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 20px; margin: 12px 0 0; }
.prose li + li { margin-top: 6px; }
.prose ul + p { margin-top: 14px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose .btn { margin-top: 32px; }
.prose .btn-dark { background: var(--navy); color: var(--on-dark); }
.prose .btn-dark:hover { background: var(--ink); }
