/* ============================================================
   MT5 AI Trading - Single page styles + 4 configurable themes
   Themes are selected via [data-theme] on <html>, switched
   from the admin dashboard (php/admin/index.php).
   ============================================================ */

[data-theme="dark-fintech"] {
  --bg: #0a0f1c;
  --bg-soft: #0e1526;
  --surface: #111a2e;
  --surface-2: #16203a;
  --text: #e8edf7;
  --text-muted: #93a0bb;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #f5b301;
  --accent-2: #10b981;
  --grad: linear-gradient(120deg, #f5b301 0%, #10b981 100%);
  --glow: rgba(245, 179, 1, 0.25);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

[data-theme="midnight-neon"] {
  --bg: #05060f;
  --bg-soft: #0a0c1e;
  --surface: #0d1026;
  --surface-2: #151940;
  --text: #e9ecff;
  --text-muted: #8b92c7;
  --border: rgba(255, 255, 255, 0.1);
  --accent: #22d3ee;
  --accent-2: #e879f9;
  --grad: linear-gradient(120deg, #22d3ee 0%, #e879f9 100%);
  --glow: rgba(34, 211, 238, 0.28);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

[data-theme="light-clean"] {
  --bg: #f6f9ff;
  --bg-soft: #eef3fd;
  --surface: #ffffff;
  --surface-2: #f2f6ff;
  --text: #0f1d3a;
  --text-muted: #5a6a8a;
  --border: rgba(15, 29, 58, 0.1);
  --accent: #2563eb;
  --accent-2: #0ea5e9;
  --grad: linear-gradient(120deg, #2563eb 0%, #0ea5e9 100%);
  --glow: rgba(37, 99, 235, 0.15);
  --shadow: 0 20px 50px rgba(37, 99, 235, 0.12);
}

[data-theme="corporate"] {
  --bg: #f3f4f6;
  --bg-soft: #e9ebef;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --text: #101828;
  --text-muted: #667085;
  --border: rgba(16, 24, 40, 0.12);
  --accent: #1e3a8a;
  --accent-2: #0f766e;
  --grad: linear-gradient(120deg, #1e3a8a 0%, #0f766e 100%);
  --glow: rgba(30, 58, 138, 0.14);
  --shadow: 0 20px 50px rgba(16, 24, 40, 0.12);
}

/* ---------------- Base ---------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s ease, color 0.4s ease;
}

.container { width: min(1140px, 92%); margin: 0 auto; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grad);
  color: #0b0e1a;
  box-shadow: 0 10px 24px var(--glow);
}
.btn-primary:hover { box-shadow: 0 14px 30px var(--glow); opacity: 0.95; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.95rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 28, 0.85);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--grad);
  color: #0b0e1a;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 10px;
}
.brand-name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }

.nav-menu { display: flex; align-items: center; gap: 1.6rem; }
.nav-menu a { font-weight: 500; font-size: 0.95rem; opacity: 0.85; }
.nav-menu a:hover { opacity: 1; color: var(--accent); }
.nav-cta { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-banner {
  width: 100%;
  aspect-ratio: 2752 / 768;
  background: var(--bg-soft) url("../img/hero.jpg") no-repeat center / cover;
}

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

.ticker {
  position: relative;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(17, 26, 46, 0.55);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  overflow: hidden;
  padding: 0.7rem 0;
}
.ticker-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: ticker 32s linear infinite;
  white-space: nowrap;
}
.ticker-track span { font-size: 0.88rem; color: var(--text-muted); }
.ticker-track b { color: var(--accent-2); font-weight: 600; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- Sections ---------------- */
.section { padding: 5.5rem 0; }
.section-alt { background: rgba(14, 21, 38, 0.6); }
.section-alt { background: color-mix(in srgb, var(--bg-soft) 60%, transparent); }

.section-head { max-width: 640px; margin-bottom: 2.8rem; }
.section-head h2 { margin: 0.5rem 0 0.8rem; }
.section-head p { color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------------- Services ---------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: var(--shadow);
}

.service-card { transition: transform 0.25s ease, border-color 0.25s ease; }
.service-card:hover { transform: translateY(-6px); border-color: var(--accent); }

.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(245, 179, 1, 0.14);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.card-icon svg { width: 26px; height: 26px; }

.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

.card-link {
  display: inline-block;
  margin-top: 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}
.card-link:hover { text-decoration: underline; }

/* ---------------- Process ---------------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.7rem;
}
.step-num {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
  display: block;
  margin-bottom: 0.8rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------------- Contact / Form ---------------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.6rem;
  align-items: start;
}

.contact-info h2 { margin: 0.5rem 0 0.9rem; }
.contact-info p { color: var(--text-muted); }

.contact-list { list-style: none; margin-top: 1.6rem; display: grid; gap: 0.7rem; }
.contact-list li { display: flex; align-items: center; gap: 0.7rem; font-weight: 500; font-size: 0.95rem; }
.contact-list a { color: var(--accent); font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--grad);
  flex-shrink: 0;
}

.form-card h3 { margin-bottom: 1.4rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }

.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field label { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; }

.field input,
.field select,
.field textarea {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }

.form-card.loading .btn { opacity: 0.6; pointer-events: none; }

.status { display: none; margin-top: 1rem; font-size: 0.9rem; font-weight: 600; padding: 0.7rem 0.9rem; border-radius: 10px; }
.status.success { display: block; color: var(--accent-2); background: rgba(16, 185, 129, 0.12); }
.status.success { display: block; color: var(--accent-2); background: color-mix(in srgb, var(--accent-2) 12%, transparent); }
.status.error { display: block; color: #ef4444; background: rgba(239, 68, 68, 0.12); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding-top: 3.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.4rem;
  padding-bottom: 2.5rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.92rem; margin-top: 1rem; }

.footer-col { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.footer-col a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); }

.social-badges { display: flex; gap: 0.6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.social-badges a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.social-badges a:hover { transform: translateY(-3px); color: var(--accent); border-color: var(--accent); }
.social-badges svg { width: 19px; height: 19px; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.3rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .services-grid, .process-grid { grid-template-columns: 1fr; }
  .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 68px;
    right: 0;
    width: min(78vw, 300px);
    height: calc(100vh - 68px);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
    background: var(--surface);
    border-left: 1px solid var(--border);
    padding: 2rem 1.8rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-cta { margin: 0.5rem 0 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
