/* ==========================================================================
   XBT — Trader Micro-App Suite · "Terminal 24 Pro" identity
   Self-contained. No external requests. System font stack.
   ========================================================================== */

:root {
  /* Backgrounds */
  --bg:        #0B0F17;   /* page navy */
  --surface-1: #0D1420;   /* card */
  --surface-2: #121927;   /* raised surface */
  --border:    #232D3F;   /* hairline */

  /* Accents */
  --amber:     #F5A623;   /* key highlights / CTAs — sparingly */
  --amber-dim: rgba(245, 166, 35, 0.14);
  --teal:      #31B8A8;   /* secondary */
  --teal-dim:  rgba(49, 184, 168, 0.16);

  /* Text */
  --text:      #E8EDF5;   /* primary */
  --muted:     #8A96A8;   /* muted */

  /* Semantic (journal win/loss only) */
  --green:     #2FBF71;
  --red:       #E5484D;

  --radius:    12px;
  --radius-sm: 9px;
  --maxw:      1160px;

  --mono: ui-monospace, "Cascadia Code", "Cascadia Mono", Consolas,
          "SFMono-Regular", "Roboto Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Apple Color Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;               /* body never scrolls sideways */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle single radial wash — restrained, not a giant hero gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(920px 460px at 78% -8%, rgba(49, 184, 168, 0.06), transparent 70%),
    radial-gradient(820px 420px at 8% 2%, rgba(245, 166, 35, 0.05), transparent 68%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3 { text-wrap: balance; line-height: 1.15; margin: 0; }

::selection { background: var(--amber-dim); color: var(--text); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

/* Eyebrow / mono label — uppercase, tracked, monospace */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 14px;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Visible keyboard focus */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 200;
}
.skip-link:focus { left: 16px; }

/* ---------------------------------------------------------------- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 23, 0.82);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--text);
}
.wordmark .tick {
  width: 10px; height: 10px; border-radius: 3px;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-dim);
}
.wordmark small {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.header-spacer { flex: 1; }

/* Keep the header on one line on small screens */
@media (max-width: 560px) {
  .wordmark small { display: none; }
}
@media (max-width: 380px) {
  .header-inner { gap: 10px; }
  .header-cta { padding-inline: 12px; }
}

/* Language toggle (segmented) */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-1);
}
.lang-toggle button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--amber-dim);
  color: var(--amber);
}
.lang-toggle button:hover { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
}
.btn:hover { border-color: #33415a; transform: translateY(-1px); }
.btn-accent {
  background: var(--amber);
  color: #1a1204;
  border-color: var(--amber);
}
.btn-accent:hover { background: #ffb840; border-color: #ffb840; }

.header-cta { display: inline-flex; }

/* ------------------------------------------------------------------ Hero -- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 64px); }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--amber); }
.hero .lede {
  max-width: 65ch;
  font-size: clamp(16px, 2.1vw, 19px);
  color: var(--muted);
  margin: 0 0 30px;
}
.hero .lede strong { color: var(--text); font-weight: 600; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px 7px 11px;
}
.chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  flex: none;
}
.chip:nth-child(2n) .dot { background: var(--amber); }

/* ------------------------------------------------------- Section scaffold -- */
.section { padding: clamp(46px, 7vw, 80px) 0; }
.section-head { max-width: 68ch; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 {
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.section-head p { color: var(--muted); max-width: 65ch; margin: 0; }

/* --------------------------------------------------------------- App grid -- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .app-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .app-grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color .18s, transform .18s, background .18s;
}
.card:hover { border-color: #2e3b52; transform: translateY(-2px); }

/* Flagship super app spans full width and gets emphasis */
.card.flagship {
  grid-column: 1 / -1;
  background:
    linear-gradient(180deg, rgba(245,166,35,0.05), transparent 40%),
    var(--surface-2);
  border-color: #33415a;
}
.card.flagship .card-body { max-width: 68ch; }

.card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.app-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.app-sub {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 3px;
}

.badge-flag {
  position: absolute;
  top: 16px; right: 16px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid rgba(245,166,35,0.35);
  border-radius: 999px;
  padding: 4px 10px;
}

.feature-list { list-style: none; margin: 4px 0 0; padding: 0; }
.feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 9px;
  line-height: 1.5;
}
.feature-list li:last-child { margin-bottom: 0; }
.feature-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--teal);
}
.feature-list li strong { color: var(--text); font-weight: 600; }
.feature-list li .win { color: var(--green); font-weight: 600; }
.feature-list li .loss { color: var(--red); font-weight: 600; }

.flagship .feature-list {
  columns: 2;
  column-gap: 32px;
}
@media (max-width: 640px) { .flagship .feature-list { columns: 1; } }

/* App icon tile — duotone: navy tile, amber glyph, teal dot */
.app-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  flex: none;
  background: linear-gradient(160deg, #10192a, #0a1120);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.app-icon svg { width: 30px; height: 30px; }
.flagship .app-icon { width: 60px; height: 60px; border-radius: 15px; }
.flagship .app-icon svg { width: 34px; height: 34px; }

/* Duotone SVG parts */
.glyph { fill: var(--amber); }
.glyph-stroke { stroke: var(--amber); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.accent-dot { fill: var(--teal); }
.accent-stroke { stroke: var(--teal); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ----------------------------------------------------------- Why XBT band -- */
.why {
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
@media (max-width: 860px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .why-grid { grid-template-columns: 1fr; } }
.why-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.why-ico {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
}
.why-ico svg { width: 21px; height: 21px; }
.why-item h3 { font-size: 15.5px; font-weight: 700; }
.why-item p { color: var(--muted); font-size: 14px; margin: 0; }

/* ------------------------------------------------------------- Download -- */
.download-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 40px);
  text-align: center;
}
.download-card h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin-bottom: 10px; }
.download-card p { color: var(--muted); max-width: 56ch; margin: 0 auto 26px; }

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 18px;
  min-width: 210px;
  text-align: left;
  position: relative;
}
.store-badge .store-ico { width: 26px; height: 26px; flex: none; }
.store-badge .store-txt small {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.store-badge .store-txt span { font-size: 15px; font-weight: 700; color: var(--text); }
.store-badge .soon {
  position: absolute;
  top: -9px; right: 12px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  background: #14100a;
  border: 1px solid rgba(245,166,35,0.4);
  border-radius: 999px;
  padding: 2px 8px;
}
.store-badge.later { opacity: 0.62; }
.store-badge.later .soon {
  color: var(--muted);
  border-color: var(--border);
  background: var(--surface-2);
}
.download-note {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

/* -------------------------------------------------------------- Footer -- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 48px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 40px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  align-items: center;
  font-size: 14px;
}
.footer-links a { color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-links .sep { color: var(--border); }
.copyright {
  width: 100%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding-top: 6px;
}

/* Bilingual visibility — default English */
[data-tr] { display: none; }
html[lang="tr"] [data-en] { display: none; }
html[lang="tr"] [data-tr] { display: inline; }
/* Block-level swap variants keep their layout */
html[lang="tr"] li[data-tr],
html[lang="tr"] p[data-tr],
html[lang="tr"] h1[data-tr],
html[lang="tr"] h2[data-tr],
html[lang="tr"] h3[data-tr],
html[lang="tr"] div[data-tr],
html[lang="tr"] span.block[data-tr] { display: block; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover, .btn:hover { transform: none; }
}

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
