/* MarketFace — shared stylesheet
   Aesthetic: refined fintech terminal. Near-black surfaces, ledger-style
   typography, restrained ticker green/red accents. No gimmicks. */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500;600&family=Geist:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0d10;
  --bg-elev: #11161b;
  --bg-elev-2: #161c22;
  --border: #1f262d;
  --border-strong: #2a333c;
  --text: #e8ecef;
  --text-muted: #8a94a0;
  --text-dim: #5a6470;
  --up: #34d399;       /* market green */
  --down: #f87171;     /* market red */
  --accent: #e8ecef;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* subtle radial vignette for atmosphere */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(52, 211, 153, 0.04), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(248, 113, 113, 0.025), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* —— Typography ———————————————————————————————————— */

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-top: 2.5em; }
h3 { font-size: 1.15rem; margin-top: 2em; font-weight: 600; }

p { margin: 0 0 1em; color: var(--text); }
p.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 60ch; }

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color 0.15s ease, color 0.15s ease;
}
a:hover { border-color: var(--up); color: var(--up); }

code, .mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92em;
}

ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.4em; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3em 0;
}

/* —— Layout ———————————————————————————————————————— */

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

.narrow { max-width: 760px; }

/* —— Header / nav ——————————————————————————————————— */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  border: none;
}
.brand:hover { color: var(--text); }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border-strong);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--up);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
}
.nav-links a {
  color: var(--text-muted);
  border: none;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); }

@media (max-width: 560px) {
  .nav-links { gap: 18px; font-size: 0.85rem; }
  .nav-links a:last-child { display: none; }
}

/* —— Hero ———————————————————————————————————————— */

.hero {
  padding: clamp(60px, 10vw, 120px) 0 clamp(40px, 6vw, 80px);
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: var(--bg-elev);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--up);
  box-shadow: 0 0 8px var(--up);
}

.hero h1 .accent-up { color: var(--up); font-style: italic; }

/* Ticker strip — subtle, decorative */
.ticker {
  margin-top: 56px;
  padding: 14px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  overflow: hidden;
}
.ticker .tk { white-space: nowrap; }
.ticker .tk .sym { color: var(--text); font-weight: 500; margin-right: 8px; }
.ticker .tk .up { color: var(--up); }
.ticker .tk .down { color: var(--down); }

/* —— Features grid ————————————————————————————————— */

section.section { padding: clamp(60px, 8vw, 100px) 0; }

.section-head { margin-bottom: 48px; max-width: 56ch; }
.section-head .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature {
  background: var(--bg-elev);
  padding: 28px;
  transition: background 0.2s ease;
}
.feature:hover { background: var(--bg-elev-2); }

.feature .idx {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.feature h3 {
  margin: 0 0 8px;
  font-family: 'Geist', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.feature p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* —— Disclaimer card —————————————————————————————— */

.disclaimer {
  margin: 60px 0 0;
  padding: 24px 28px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--down);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--text-muted);
}
.disclaimer strong { color: var(--text); font-weight: 600; }

/* —— Document pages (privacy/terms/support) —————— */

.doc {
  padding: 60px 0 100px;
}
.doc .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.doc h2:first-of-type { margin-top: 1.5em; }
.doc p, .doc li { color: var(--text); }
.doc li { color: var(--text-muted); }
.doc strong { color: var(--text); }

.doc .toc {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 32px 0;
  font-size: 0.93rem;
}
.doc .toc-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.doc .toc ol {
  margin: 0;
  padding-left: 1.4em;
  columns: 2;
  column-gap: 32px;
}
.doc .toc li { margin-bottom: 6px; }
.doc .toc a { color: var(--text-muted); border: none; }
.doc .toc a:hover { color: var(--up); }

@media (max-width: 600px) {
  .doc .toc ol { columns: 1; }
}

/* FAQ for support page */
.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  padding: 0;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: '−'; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .answer { padding: 18px 22px; color: var(--text-muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* Contact block */
.contact-block {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin: 32px 0;
}
.contact-block .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.contact-block .email {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--up);
  border: none;
}

/* —— Footer ———————————————————————————————————————— */

footer.site {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 80px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
}
.foot-brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--text);
}
.foot-brand .small {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-dim);
  margin-top: 4px;
}
.foot-links {
  display: flex;
  gap: 24px;
  font-size: 0.9rem;
}
.foot-links a {
  color: var(--text-muted);
  border: none;
}
.foot-links a:hover { color: var(--text); }

/* —— Helpers —————————————————————————————————————— */

.note {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Skip-link / a11y */
.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-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--bg-elev);
  color: var(--text);
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  z-index: 100;
}
.skip-link:focus { left: 16px; }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
