/* =========================================================
   QuantOdyssey Labs — dark theme with Claude orange accent
   ========================================================= */
:root {
  --bg: #0d0d0d;
  --bg-alt: #121212;
  --surface: #171717;
  --surface-2: #1e1e1e;
  --border: #2a2a2a;
  --text: #ececec;
  --muted: #9b9b9b;
  --accent: #d97757;          /* Claude orange */
  --accent-hover: #e38a6c;
  --accent-soft: rgba(217, 119, 87, 0.12);
  --up: #d97757;
  --radius: 14px;
  --maxw: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.6em; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }
.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8em 1.5em;
  background: var(--accent); color: #0d0d0d;
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid var(--accent); border-radius: 999px;
  cursor: pointer; transition: background .2s, transform .2s, color .2s;
  font-family: inherit;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 0.5em 1.1em; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(13, 13, 13, 0.6);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(13, 13, 13, 0.85); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 38px; width: auto; }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--muted); font-size: 0.93rem; transition: color .2s; }
.nav-links a:not(.btn):hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 120px 0 80px; overflow: hidden; }
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
}
.hero::after {
  content: ""; position: absolute; width: 600px; height: 600px; right: -150px; top: 10%;
  background: radial-gradient(circle, rgba(217,119,87,0.18), transparent 65%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 500; color: var(--text);
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  margin-bottom: 28px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.6rem); font-weight: 700; margin-bottom: 0.2em; }
.tagline { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--text); font-weight: 500; margin-bottom: 1.2em; }
.lead { font-size: 1.08rem; max-width: 34em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }

/* ---------- Chart cards (code-drawn visuals) ---------- */
.chart-card {
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.02) inset;
}
.chart-head { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 10px; }
.chart-head .up { color: var(--up); }
#heroChart { width: 100%; height: 300px; display: block; }
.chart-foot { display: flex; justify-content: space-between; color: var(--muted); border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.chart-foot b { color: var(--text); font-weight: 500; margin-left: 6px; }

.equity-line {
  fill: none; stroke: var(--accent); stroke-width: 2.2;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  animation: draw 2.6s ease-out forwards;
}
.equity-area { fill: url(#areaGrad); opacity: 0; animation: fade 1.2s 1.6s forwards; }
.grid-line { stroke: var(--border); stroke-width: 1; }
.candle-up { fill: #3a3a3a; stroke: #4a4a4a; }
.candle-down { fill: transparent; stroke: #3a3a3a; }
.wick { stroke: #3d3d3d; stroke-width: 1; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-label {
  font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 14px;
}
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-sub { font-size: 1.05rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .25s, transform .25s;
}
.stat:hover { border-color: rgba(217,119,87,0.5); transform: translateY(-2px); }
.stat-num { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 0.9rem; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; transition: border-color .25s, transform .25s, background .25s;
}
.card:hover { border-color: rgba(217,119,87,0.55); transform: translateY(-4px); background: var(--surface-2); }
.card p { font-size: 0.95rem; margin: 0; }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft);
  display: grid; place-items: center; margin-bottom: 20px;
}
.card-icon svg, .reg-badge svg, .contact-line svg {
  width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.pipeline { display: flex; align-items: center; margin-top: 64px; gap: 0; }
.step { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 140px; }
.step-num {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--accent); color: var(--accent); background: var(--bg);
  font-size: 0.9rem;
}
.step-name { font-size: 0.92rem; font-weight: 500; }
.step-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--accent), var(--border)); margin-bottom: 30px; }

/* Experience */
.exp-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.heatmap { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.heatmap div { aspect-ratio: 1; border-radius: 4px; background: var(--accent); transition: opacity .6s; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 34px; color: var(--text); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97757' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Regulatory */
.reg-card {
  display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  padding: 48px; position: relative; overflow: hidden;
}
.reg-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent);
}
.reg-badge {
  width: 84px; height: 84px; border-radius: 20px; background: var(--accent-soft);
  display: grid; place-items: center;
}
.reg-badge svg { width: 42px; height: 42px; stroke-width: 1.5; }
.reg-body p { max-width: 46em; }
.reg-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 48px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.reg-meta div { display: flex; flex-direction: column; gap: 4px; }
.meta-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.meta-value { font-weight: 600; color: var(--text); }
.meta-value.mono { font-size: 0.95rem; color: var(--accent); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
.contact-info { margin-top: 28px; }
.contact-line { display: inline-flex; align-items: center; gap: 12px; color: var(--text); transition: color .2s; }
.contact-line:hover { color: var(--accent); }
.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px);
  padding: 36px;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.95rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239b9b9b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { display: none; }
.form-status { margin: 14px 0 0; font-size: 0.92rem; min-height: 1.4em; }
.form-status.ok { color: #7fc99a; }
.form-status.err { color: #e57373; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 48px 0 36px; background: var(--bg-alt); }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--accent); }
.disclaimer { font-size: 0.8rem; line-height: 1.6; max-width: 70em; color: #777; }
.copyright { font-size: 0.82rem; color: #666; margin: 0; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-inner, .about-grid, .exp-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .exp-visual { order: 2; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 80px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 24px 20px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 16px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .cards, .stats, .field-row { grid-template-columns: 1fr; }
  .pipeline { flex-direction: column; align-items: flex-start; gap: 0; }
  .step { flex-direction: row; gap: 16px; }
  .step-line { width: 1px; height: 28px; flex: none; margin: 0 0 0 26px; background: linear-gradient(180deg, var(--accent), var(--border)); }
  .reg-card { grid-template-columns: 1fr; padding: 32px 24px; gap: 24px; }
  .reg-meta { grid-template-columns: 1fr; gap: 18px; }
  .contact-form { padding: 24px; }
  #heroChart { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .equity-line { animation: none; stroke-dashoffset: 0; }
  .equity-area { animation: none; opacity: 1; }
}
