/* ===== SoulDragon — Gold Trading Algo (product page) =====
   Palette: true black ground, warm charcoal surfaces, three golds, ivory text.
   One red (the dragon's) is reserved for stop and sell states only. */
:root {
  --black: #000000;
  --coal: #120f09;
  --coal-2: #1b170e;
  --gold: #d4af37;
  --gold-light: #f2d67a;
  --gold-deep: #8a6a1f;
  --ivory: #f1e9d6;
  --muted: #a1957a;
  --dragon: #e0392b;
  --line: rgba(212, 175, 55, 0.22);
  --line-strong: rgba(212, 175, 55, 0.5);
  --radius: 4px;
  --display: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ivory);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }

.container { width: min(1100px, 92%); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.1;
  letter-spacing: -0.005em;
}
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 2px;
  background: var(--gold); margin-top: 18px;
}
.section-head p { color: var(--muted); margin-top: 18px; max-width: 58ch; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius);
  font-family: var(--body); font-weight: 700; font-size: 0.95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #000; border-color: var(--gold);
}
.btn--primary:hover { background: var(--gold-light); }
.btn--ghost { color: var(--gold); border-color: var(--line-strong); background: transparent; }
.btn--ghost:hover { border-color: var(--gold); background: rgba(212,175,55,0.08); }
.btn--sm { padding: 9px 18px; font-size: 0.88rem; }

/* --- Header --- */
.sd-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.sd-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.sd-brand { display: flex; align-items: center; gap: 12px; }
.sd-brand img { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); }
.sd-brand-name { font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.02em; }
.sd-brand-name b { color: var(--gold); font-weight: 600; }
.sd-nav { display: flex; align-items: center; gap: 4px; }
.sd-nav > a { color: var(--muted); font-weight: 600; font-size: 0.9rem; padding: 8px 12px; border-radius: var(--radius); transition: color .2s; }
.sd-nav > a:hover { color: var(--ivory); }
.sd-nav > .btn { margin-left: 12px; color: #000; }
.sd-nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line-strong);
  background: transparent; border-radius: var(--radius); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.sd-nav-toggle span { display: block; width: 20px; height: 2px; background: var(--gold); }
@media (max-width: 1080px) {
  .sd-nav {
    display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 4px; padding: 24px 4%;
    background: #000; border-top: 1px solid var(--line); overflow-y: auto;
  }
  .sd-nav.open { display: flex; }
  .sd-nav > a { font-size: 1.05rem; padding: 14px 8px; border-bottom: 1px solid var(--line); }
  .sd-nav > .btn { margin: 16px 0 0; }
  .sd-nav-toggle { display: flex; }
}

/* --- Hero --- */
.hero { padding: calc(64px + clamp(48px, 8vw, 96px)) 0 clamp(48px, 7vw, 88px); position: relative; overflow: hidden; }
.hero::before {
  /* one warm glow behind the panel, like lamplight on metal */
  content: ""; position: absolute; right: -10%; top: 10%;
  width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(closest-side, rgba(212,175,55,0.16), transparent 70%);
  pointer-events: none;
}
.hero .container {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center; position: relative;
}
.hero-copy .kicker { color: var(--gold); font-weight: 700; font-size: 0.92rem; margin-bottom: 20px; }
.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.75rem); line-height: 1.05; letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--gold-light); }
.hero .lede { color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.15rem); max-width: 52ch; margin-top: 24px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; margin-top: 40px; border-top: 1px solid var(--line); }
.hero-facts li { padding: 14px 0 12px; font-size: 0.9rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.hero-facts b { display: block; color: var(--ivory); font-weight: 700; }

/* The on-chart panel (screenshot from a live terminal) */
.panel-wrap { position: relative; text-align: left; }
.panel-wrap .emblem {
  width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 20px;
  border: 1px solid var(--line-strong);
  box-shadow: 0 0 40px rgba(212,175,55,0.25);
}
.panel-shot {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(212,175,55,0.12);
}
.panel-note { margin-top: 12px; font-size: 0.8rem; color: var(--muted); }

@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; }
  .panel-wrap { margin-top: 24px; }
  .panel-wrap .emblem { width: 96px; height: 96px; }
}
@media (max-width: 480px) {
  .hero-facts { grid-template-columns: 1fr; }
  .hero-ctas .btn { width: 100%; }
}

/* --- Watch it live (investor access) --- */
.live-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.live-steps { display: grid; gap: 0; counter-reset: none; }
.live-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.live-steps li:first-child { padding-top: 0; }
.live-steps .n { font-family: var(--display); font-size: 1.9rem; line-height: 1; color: var(--gold); }
.live-steps h3 { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.live-steps p { color: var(--muted); font-size: 0.95rem; }
.live-steps a { color: var(--gold-light); border-bottom: 1px solid var(--line-strong); }
.creds { background: var(--coal); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px 28px; position: sticky; top: 88px; }
.creds::before { content: ""; display: block; height: 3px; background: linear-gradient(90deg, var(--gold-light), var(--gold)); margin: -26px -28px 22px; }
.creds h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; margin-bottom: 12px; }
.creds dl { margin: 0; }
.creds div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.creds dt { color: var(--muted); font-size: 0.92rem; }
.creds dd { margin: 0; font-family: var(--mono); font-weight: 600; font-size: 1.05rem; color: var(--gold-light); user-select: all; text-align: right; }
.creds-note { margin-top: 16px; color: var(--muted); font-size: 0.88rem; }
@media (max-width: 860px) { .live-grid { grid-template-columns: 1fr; } .creds { position: static; } }

/* --- How it trades (a real sequence, so it is numbered) --- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step { padding: 28px 24px 30px; border-right: 1px solid var(--line); background: var(--coal); }
.step:last-child { border-right: 0; }
.step .n { font-family: var(--display); font-size: 2.2rem; font-weight: 400; color: var(--gold); line-height: 1; }
.step h3 { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 18px 0 10px; }
.step p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
}

/* --- Risk profiles (a ledger, not cards) --- */
.ledger { border-top: 1px solid var(--line-strong); }
.ledger-row {
  display: grid; grid-template-columns: 1.1fr 0.9fr 2fr; gap: 24px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.ledger-row h3 { font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.ledger-row .acct { color: var(--gold-light); font-weight: 700; }
.ledger-row .acct small { display: block; color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.ledger-row p { color: var(--muted); }
.ledger-row.moderate h3 { color: #ff7ab8; }
.ledger-row.aggressive h3 { color: #b48cff; }
.ledger-row.insane h3 { color: #4fa3ff; }
.ledger-note { margin-top: 20px; color: var(--muted); font-size: 0.9rem; max-width: 70ch; }
@media (max-width: 760px) { .ledger-row { grid-template-columns: 1fr; gap: 8px; } }

/* --- Protection --- */
.guards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px, 5vw, 72px); }
.guard { display: grid; grid-template-columns: 28px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.guard svg { width: 26px; height: 26px; color: var(--gold); margin-top: 2px; }
.guard h3 { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.guard p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 800px) { .guards { grid-template-columns: 1fr; } }

/* --- Live updates (Telegram) --- */
.updates .container {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.chat { display: grid; gap: 14px; }
.msg {
  background: var(--coal); border: 1px solid var(--line); border-radius: 12px 12px 12px 2px;
  padding: 16px 18px; max-width: 520px; font-size: 0.95rem; white-space: pre-line;
}
.msg b { display: block; color: var(--gold-light); margin-bottom: 6px; }
.msg time { display: block; text-align: right; color: var(--muted); font-size: 0.78rem; margin-top: 8px; }
.updates .list { margin-top: 28px; }
.updates .list li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.updates .list li b { color: var(--ivory); font-weight: 700; }
@media (max-width: 900px) { .updates .container { grid-template-columns: 1fr; } }

/* --- Access / CTA --- */
.access { background: var(--coal); }
.access .container {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.access h2 { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; }
.access p { color: var(--muted); margin-top: 18px; max-width: 52ch; }
.access .req { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 28px; background: #000; }
.access .req h3 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; margin-bottom: 14px; }
.access .req li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; display: flex; justify-content: space-between; gap: 16px; }
.access .req li:last-child { border-bottom: 0; }
.access .req li span:last-child { color: var(--gold-light); font-weight: 700; text-align: right; }
.access-steps { margin-top: 26px; }
.access-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.access-steps .n { font-family: var(--display); font-size: 1.7rem; line-height: 1; color: var(--gold); }
.access-steps h3 { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.access-steps p { color: var(--muted); font-size: 0.93rem; margin: 0; max-width: none; }
.access-steps a { color: var(--gold-light); border-bottom: 1px solid var(--line-strong); }
.access-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
@media (max-width: 480px) { .access-ctas .btn { width: 100%; } }
@media (max-width: 900px) { .access .container { grid-template-columns: 1fr; } }

/* --- Master Control (embedded admin console) --- */
.control-frame {
  border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--coal);
  min-height: 320px; overflow: hidden; position: relative;
}
.control-gate { display: grid; place-items: center; text-align: center; gap: 18px; padding: clamp(40px, 6vw, 72px) 20px; }
.control-gate p { color: var(--muted); max-width: 46ch; }
.control-gate .row { flex-wrap: wrap; justify-content: center; }
.control-frame iframe { display: block; width: 100%; height: min(1100px, 88vh); border: 0; background: #000; }
.control-frame.loaded { border-color: var(--gold); }
@media (max-width: 480px) { .control-gate .btn { width: 100%; } }

/* --- Risk warning --- */
.risk { padding: 36px 0; border-top: 1px solid var(--line); }
.risk p { color: var(--muted); font-size: 0.85rem; max-width: 90ch; }
.risk p b { color: var(--ivory); }

/* --- Footer --- */
.sd-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.sd-footer .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.sd-footer p { color: var(--muted); font-size: 0.88rem; }
.sd-footer .brand-line { color: var(--ivory); font-weight: 700; }
.sd-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.sd-footer nav a { color: var(--muted); font-size: 0.88rem; }
.sd-footer nav a:hover { color: var(--gold); }

/* --- Request for EA popup --- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-card {
  position: relative; width: min(460px, 100%); background: var(--coal);
  border: 1px solid var(--gold); border-radius: 6px; padding: 32px 28px 28px; text-align: center;
  box-shadow: 0 0 80px rgba(212,175,55,0.18);
}
.modal-close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border: 0; background: transparent;
  color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: var(--radius);
}
.modal-close:hover { color: var(--ivory); }
.modal-emblem { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 16px; border: 1px solid var(--line-strong); }
.modal-card h3 { font-family: var(--display); font-weight: 600; font-size: 1.45rem; margin-bottom: 10px; }
.modal-card p { color: var(--muted); font-size: 0.95rem; }
.modal-field { display: grid; gap: 6px; text-align: left; margin: 22px 0 14px; }
.modal-field span { font-size: 0.85rem; font-weight: 700; color: var(--ivory); }
.modal-field input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: #000; color: var(--ivory); font-family: var(--body); font-size: 1rem; outline: none;
}
.modal-field input:focus { border-color: var(--gold); }
.modal-card .btn { width: 100%; }
.modal-card .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.modal-note { min-height: 1.4em; margin-top: 12px; font-size: 0.9rem; color: var(--gold-light); }
.modal-note.err { color: var(--dragon); }
body.modal-open { overflow: hidden; }
