/* ============================================
   FXPathway — Shared Stylesheet
   css/main.css
   ============================================ */

:root {
  --primary: #0052FF;
  --text: #1A1D1F;
  --bg: #F4F7F9;
  --success: #00A76F;
  --warning: #FF6B6B;
}

/* Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

/* Nav */
nav {
  width: 100%;
  max-width: 600px;
  display: flex;
  justify-content: space-between;
  padding: 20px;
  font-size: 14px;
  font-weight: 500;
  box-sizing: border-box;
  margin-bottom: 0;
}
nav a { color: #6F767E; text-decoration: none; transition: color 0.2s; }
nav a:hover { color: var(--primary); }

/* Container */
.container {
  max-width: 600px;
  width: 100%;
  padding: 0 40px 40px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.04);
  margin: 20px 16px 40px 16px;
  box-sizing: border-box;
}

/* Container section spacing */
.container > * + * {
  margin-top: 32px;
}

/* Typography */
h1 { font-size: 2.2rem; letter-spacing: -0.5px; margin-bottom: 8px; color: var(--primary); line-height: 1.2; }
h2 { font-size: 20px; color: var(--text); margin-top: 32px; margin-bottom: 12px; border-bottom: 2px solid #F4F7F9; padding-bottom: 8px; }
h3 { font-size: 16px; color: var(--text); margin-top: 20px; margin-bottom: 8px; }
p { font-size: 15px; line-height: 1.6; color: #6F767E; margin-bottom: 14px; }
p strong { color: var(--text); }
ul, ol { padding-left: 20px; color: #6F767E; font-size: 15px; line-height: 1.7; margin-bottom: 16px; }
li { margin-bottom: 6px; }
li strong { color: var(--text); }
a { color: var(--primary); text-decoration: none; }
.start-link { font-weight: 600; text-decoration: underline; }
.subtitle { font-size: 1.15rem; line-height: 1.6; color: #4A5568; margin-bottom: 24px; }
.note { font-size: 13px; color: #999; margin-top: 6px; }
.meta { font-size: 13px; color: #999; margin-bottom: 28px; }

/* Badges & labels */
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: #E8F0FF;
  color: var(--primary);
  border-radius: 100px;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

/* Callout boxes */
.callout {
  background: #F6F9FF;
  border: 1px solid #DDE7FF;
  padding: 20px 24px;
  border-radius: 12px;
  margin: 20px 0;
}
.callout p { margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }

.callout-green {
  background: #F0FFF8;
  border: 1px solid #B8EDD8;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.callout-green p { margin-bottom: 6px; }
.callout-green p:last-child { margin-bottom: 0; }

.callout-amber {
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.callout-amber p { margin-bottom: 6px; }
.callout-amber p:last-child { margin-bottom: 0; }

.callout-purple {
  background: #F5F0FF;
  border: 1px solid #C4B5FD;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.callout-purple p { margin-bottom: 6px; }
.callout-purple p:last-child { margin-bottom: 0; }

.cta-currenciesdirect {
  display: block;
  text-align: center;
  padding: 14px 22px;
  background: #7C3AED;
  color: white;
  border-radius: 12px;
  font-weight: 600;
  margin-top: 8px;
  text-decoration: none;
  transition: transform 0.15s;
}
.cta-currenciesdirect:hover {
  transform: translateY(-2px);
}

.callout-warning {
  background: #FFFBF0;
  border: 1px solid #FFE4A0;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
}
.callout-warning p { margin-bottom: 6px; }
.callout-warning p:last-child { margin-bottom: 0; }

/* Story / quote box */
.story-box {
  border-left: 4px solid #E8F0FF;
  padding-left: 20px;
  margin: 20px 0;
  font-style: italic;
}

/* CTAs */
.cta {
  display: inline-block;
  padding: 12px 24px;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-top: 8px;
  transition: transform 0.15s;
}
.cta:hover { transform: translateY(-2px); }

.cta-wise {
  display: block;
  text-align: center;
  padding: 12px 24px;
  background: #00B67A;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-top: 8px;
  transition: transform 0.15s;
}
.cta-wise:hover { transform: translateY(-2px); }

.cta-torfx {
  display: block;
  text-align: center;
  padding: 12px 24px;
  background: #D97706;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-top: 8px;
  transition: transform 0.15s;
}
.cta-torfx:hover { transform: translateY(-2px); }

/* Sticky CTA */
.sticky-cta {
  position: sticky;
  bottom: 16px;
  background: white;
  border: 1px solid #DDE7FF;
  border-radius: 14px;
  padding: 14px 20px;
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.sticky-cta p { margin: 0; font-size: 14px; color: var(--text); font-weight: 500; }
.sticky-cta a {
  background: #00B67A;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 12px;
  text-decoration: none;
}

/* Tables */
.comparison-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.comparison-table th, .comparison-table td {
  border: 1px solid #E8ECEF;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  color: #6F767E;
}
.comparison-table th { background: #F4F7F9; font-weight: 600; color: var(--text); font-size: 13px; }

/* Code / calc box */
.calc-box {
  background: #1A1D1F;
  color: #E8F0FF;
  padding: 20px 24px;
  border-radius: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 13px;
  line-height: 2;
  margin: 20px 0;
}
.calc-box .label { color: #6F9CFF; }
.calc-box .result { color: #6FEAA0; font-weight: 600; }
.calc-box .highlight { color: #FFB347; font-weight: 600; }

/* Principle list (about page) */
.principle-list { list-style: none; padding: 0; margin: 0 0 16px 0; }
.principle-list li {
  padding: 12px 0;
  border-bottom: 1px solid #F4F7F9;
  font-size: 15px;
  color: #6F767E;
  line-height: 1.5;
}
.principle-list li:last-child { border-bottom: none; }
.principle-list li strong { color: var(--text); display: block; margin-bottom: 2px; }

/* Provider grid (comparison pages) */
.provider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.provider-card { background: #F6F9FF; border: 1px solid #DDE7FF; border-radius: 12px; padding: 16px; }
.provider-name { font-weight: 700; font-size: 13px; color: var(--primary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.provider-card p { font-size: 14px; margin-bottom: 0; }

/* Scenario blocks */
.scenario { border-left: 4px solid #E8F0FF; padding-left: 20px; margin: 20px 0; }
.scenario-title { font-weight: 600; color: var(--text); font-size: 15px; margin-bottom: 6px; }
.scenario p { font-size: 14px; margin-bottom: 0; }

/* Formula box */
.formula-box {
  background: #1A1D1F;
  color: #E8F0FF;
  padding: 16px 20px;
  border-radius: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.8;
  margin: 16px 0;
}

/* Guide links (homepage) */
.guide-links { margin: 24px 0; background: #F8F9FA; padding: 20px 24px; border-radius: 16px; border: 1px solid #EEE; }
.guide-links p { margin-bottom: 10px; font-size: 15px; color: var(--text); }
.guide-links p:last-child { margin-bottom: 0; }

/* Footer */
footer { max-width: 600px; width: 100%; padding: 24px 16px; box-sizing: border-box; }
footer p { font-size: 12px; margin: 8px 0; color: #777; line-height: 1.4; text-align: center; }

/* Responsive */
@media (max-width: 640px) {
  .container { margin: 12px; padding: 24px; border-radius: 16px; }
  h1 { font-size: 24px; }
  h2 { font-size: 18px; }
  nav { padding: 16px; }
  .provider-grid { grid-template-columns: 1fr; }
  .sticky-cta { flex-direction: column; gap: 10px; }
  .sticky-cta a { margin-left: 0; width: 100%; text-align: center; box-sizing: border-box; }
}

/* XE / Blue callout */
.callout-blue {
  background: #F0F4FF;
  border: 1px solid #C7D7FF;
  padding: 16px 20px;
  border-radius: 12px;
  margin: 20px 0;
}

.cta-xe {
  display: block;
  text-align: center;
  padding: 14px 22px;
  background: #0052FF;
  color: white;
  border-radius: 12px;
  font-weight: 600;
  margin-top: 8px;
  text-decoration: none;
  transition: transform 0.15s;
}

.cta-xe:hover {
  transform: translateY(-2px);
}
