/* myTradAI — shared styles. Brand from app logo:
   navy #0D1330, blue #2F6BFF→#5B8DF7, teal #3EDBC8 */

:root {
  --bg: #0A0F26;
  --bg-raised: #101736;
  --surface: #141C40;
  --surface-2: #1A2350;
  --border: rgba(148, 168, 255, 0.14);
  --border-strong: rgba(148, 168, 255, 0.28);
  --text: #EDF1FA;
  --text-2: #A8B3D6;
  --text-3: #7C89B4;
  --blue: #2F6BFF;
  --blue-2: #5B8DF7;
  --teal: #3EDBC8;
  --bull: #34D399;
  --bear: #F87171;
  --grad: linear-gradient(135deg, #2F6BFF 0%, #5B8DF7 100%);
  --grad-text: linear-gradient(100deg, #6FA1FF 0%, #3EDBC8 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 12px 40px rgba(4, 8, 30, 0.55);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 15, 38, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span { font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -0.01em; }
.brand span em { font-style: normal; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-2); font-weight: 500; font-size: 0.95rem; padding: 8px 2px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
/* .nav-links a (0,1,1) beats .btn-sm (0,1,0) — restore the CTA pill's padding */
.nav-links a.btn { padding: 10px 24px; color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; flex-shrink: 0;
  min-height: 48px; padding: 12px 26px;
  border-radius: 999px; border: 0; cursor: pointer;
  font-family: inherit; font-size: 1rem; font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(47, 107, 255, 0.35); position: relative; overflow: hidden; }
.btn-primary:hover { box-shadow: 0 12px 32px rgba(47, 107, 255, 0.5); }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg); transition: left 500ms ease; pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { border-color: var(--blue-2); background: rgba(47, 107, 255, 0.08); }
.btn-sm { min-height: 44px; padding: 10px 20px; font-size: 0.95rem; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-tight { padding: 64px 0; }

.kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 1.15rem; font-weight: 700; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-2); max-width: 46em; }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 141, 247, 0.45);
  box-shadow: 0 18px 44px rgba(4, 8, 30, 0.6), 0 0 0 1px rgba(47, 107, 255, 0.15);
}
.card:hover .icon-chip { transform: scale(1.12) rotate(-4deg); }
.icon-chip { transition: transform 250ms ease; }
.card h3 { margin: 14px 0 8px; }
.card p { color: var(--text-2); font-size: 0.97rem; }
.icon-chip {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(47, 107, 255, 0.14);
  color: var(--blue-2);
}
.icon-chip.teal { background: rgba(62, 219, 200, 0.12); color: var(--teal); }
.icon-chip svg { width: 24px; height: 24px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  background: var(--bg-raised);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: var(--text-2); font-size: 0.95rem; }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { color: var(--text-3); font-size: 0.92rem; max-width: 34em; margin-top: 14px; }
.disclaimer {
  border-top: 1px solid var(--border);
  padding-top: 28px;
  color: var(--text-3); font-size: 0.85rem; max-width: 62em;
}
.disclaimer strong { color: var(--text-2); }
.copyright { margin-top: 18px; color: var(--text-3); font-size: 0.85rem; }

/* ---------- Legal pages ---------- */
.legal { padding: 72px 0; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
.legal .updated { color: var(--text-3); font-size: 0.9rem; margin-bottom: 40px; }
.legal h2 { font-size: 1.35rem; margin: 44px 0 12px; }
.legal h3 { font-size: 1.05rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 22px; margin: 12px 0; }
.legal li { margin-bottom: 8px; }
.legal .notice {
  background: var(--surface); border: 1px solid var(--border-strong);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius-sm); padding: 18px 22px; margin: 24px 0;
}
.legal .notice p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  section { padding: 64px 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--blue); color: #fff; padding: 10px 18px; z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
