/* ===================================================================
   Exness Trading — Design System Core
   styles.css: reset, variables, typography, layout, header, footer
   LIGHT THEME ONLY — Swiss modular
   =================================================================== */

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }
a { text-decoration: none; color: inherit; }

/* ----- Tokens ----- */
:root {
  --bg-base: #f4f6f9;
  --panel: #ffffff;
  --panel-2: #eef1f6;
  --text-light: #141820;
  --bull: #00C582;
  --bear: #FF4A5A;
  --system: #3B82F6;

  --ink-muted: #5a6473;
  --border: #dfe4ec;
  --border-strong: #c7cedb;

  --font-display: "Segoe UI", system-ui, sans-serif;
  --font-body: "Segoe UI", system-ui, sans-serif;

  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1200px;
  --gut: 20px;
  --shadow: 0 1px 3px rgba(20,24,32,.08), 0 6px 24px rgba(20,24,32,.06);
  --shadow-sm: 0 1px 2px rgba(20,24,32,.08);
  --header-h: 64px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ----- Base ----- */
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-light);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
body.brand-exness.theme-light { background: var(--bg-base); }

/* ----- Typography ----- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; color: var(--ink-muted); }
p:last-child { margin-bottom: 0; }
strong { color: var(--text-light); font-weight: 700; }
small { font-size: .82rem; }

/* ----- Layout ----- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.section { padding: 56px 0; }
.section-alt { background: var(--panel-2); }
.section-head { max-width: 760px; margin: 0 0 32px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .eyebrow {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--system);
  margin-bottom: 10px;
}
.section-head p { font-size: 1.05rem; margin-top: 8px; }
.lede { font-size: 1.12rem; color: var(--ink-muted); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  line-height: 1;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--bull);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0,197,130,.3);
}
.btn-primary:hover { background: #00a06a; box-shadow: 0 4px 14px rgba(0,197,130,.36); }
.btn-secondary {
  background: var(--panel);
  color: var(--text-light);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--panel-2); }
.btn-ghost { background: transparent; color: var(--system); border-color: transparent; }
.btn-ghost:hover { color: #2563eb; }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s var(--ease);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -.02em;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand .brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bull); }
.header-logo { display: none; }

#hamburger-btn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0 9px;
}
#hamburger-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-light);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
#hamburger-btn.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger-btn.is-active span:nth-child(2) { opacity: 0; }
#hamburger-btn.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Nav (mobile-first) ----- */
#main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 16px var(--gut) 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .28s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#main-nav.is-open { transform: translateX(0); }

.nav-item { border-bottom: 1px solid var(--border); }
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
}
.has-dropdown > .nav-link::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink-muted);
  transition: transform .2s var(--ease);
}
.nav-item.open > .nav-link::after { transform: rotate(45deg); }
.dropdown {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s var(--ease);
}
.nav-item.open > .dropdown { max-height: 420px; }
.dropdown li a {
  display: block;
  padding: 10px 14px;
  font-size: .92rem;
  color: var(--ink-muted);
  border-radius: var(--radius-sm);
}
.dropdown li a:hover { background: var(--panel-2); color: var(--text-light); }
.nav-cta { margin-top: 16px; }
.nav-cta .btn { width: 100%; }

/* ----- Footer ----- */
.site-footer {
  background: var(--text-light);
  color: #f4f6f9;
  padding: 48px 0 28px;
  margin-top: 0;
}
.site-footer * { color: inherit; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
.footer-brand .brand { color: #f4f6f9; margin-bottom: 12px; }
.footer-brand p { color: #aab2c0; font-size: .9rem; max-width: 320px; }
.footer-col h4 { color: #f4f6f9; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #aab2c0; font-size: .9rem; }
.footer-col a:hover { color: #ffffff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-bottom p { color: #8b94a3; font-size: .82rem; }
.risk-note {
  font-size: .78rem;
  color: #8b94a3;
  line-height: 1.5;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 20px;
}

/* ----- Scroll reveal ----- */
.js-ready .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

/* ----- Utilities ----- */
.text-bull { color: var(--bull); }
.text-bear { color: var(--bear); }
.text-system { color: var(--system); }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.muted { color: var(--ink-muted); }

/* ===================================================================
   Responsive
   =================================================================== */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (min-width: 780px) {
  .section { padding: 76px 0; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

  #hamburger-btn { display: none; }

  #main-nav {
    position: static;
    transform: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    background: transparent;
    border: none;
    padding: 0;
    overflow: visible;
    bottom: auto;
    top: auto;
  }
  .nav-item { border-bottom: none; position: relative; }
  .nav-link { padding: 8px 12px; font-size: .92rem; white-space: nowrap; }
  .has-dropdown > .nav-link::after {
    content: "";
    width: 6px; height: 6px;
    border-right: 2px solid var(--ink-muted);
    border-bottom: 2px solid var(--ink-muted);
    transform: rotate(45deg);
    margin-left: 4px;
    transition: transform .2s var(--ease);
  }
  .nav-item.open > .nav-link::after,
  .nav-item:hover > .nav-link::after { transform: rotate(225deg); }

  .dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 210px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px;
    max-height: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  }
  .nav-item:hover > .dropdown,
  .nav-item.open > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: none;
  }
  .nav-cta { margin-top: 0; margin-left: 10px; }
  .nav-cta .btn { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-ready .reveal { opacity: 1 !important; transform: none !important; }
}


/* agent-nav-patch v1 — #main-nav > .nav-item direct children (no .nav-list) */
.header-logo{font-family:var(--font-display);font-weight:800;font-size:1.35rem;color:var(--brand);text-decoration:none;letter-spacing:-.02em;flex-shrink:0}
.header-logo:hover{text-decoration:none;opacity:.9}
#main-nav .nav-link{white-space:nowrap}
.nav-item.active>.nav-link{color:var(--brand)}
.btn-primary{background:transparent;color:var(--brand);border-color:var(--brand)}
.btn-primary:hover{background:var(--brand);color:var(--brand-ink)}
.btn-sm{padding:.55rem 1rem;font-size:.85rem}
.nav-cta{flex-shrink:0}
@media(min-width:780px){
  #main-nav{display:flex!important;flex:1;align-items:center;justify-content:flex-end;gap:.15rem;min-width:0;margin-left:var(--space-sm)}
  #main-nav .nav-link{font-size:.84rem;padding:.5rem .6rem}
  #main-nav .nav-cta{margin-left:.35rem}
}
@media(min-width:900px){
  #main-nav .nav-link{font-size:.9rem;padding:.55rem .75rem}
}
@media(max-width:779px){
  #main-nav.is-open{display:flex!important;flex-direction:column;align-items:stretch;gap:.2rem}
  #main-nav.is-open .nav-cta{margin-top:var(--space-md);align-self:flex-start}
}
