/*
Theme Name: Trader Tools Capital
Theme URI: https://trader.tools
Author: Trader Tools
Description: Premium modern WordPress theme for the Trader Tools platform.
Version: 1.5.1
Requires at least: 6.5
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: trader-tools-capital
*/

:root {
  --tt-bg: #07111f;
  --tt-bg-soft: #0b1728;
  --tt-panel: #0f1d31;
  --tt-panel-2: #122238;
  --tt-text: #f4f1e9;
  --tt-muted: #aab4c4;
  --tt-border: rgba(255,255,255,.10);
  --tt-gold: #c7aa6a;
  --tt-gold-soft: #e5d4aa;
  --tt-white: #ffffff;
  --tt-green: #35b978;
  --tt-red: #ef6b67;
  --tt-max: 1220px;
  --tt-radius: 20px;
}

html { scroll-behavior: smooth; }
body {
  background: var(--tt-bg);
  color: var(--tt-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { text-underline-offset: 3px; }
.wp-site-blocks { padding: 0 !important; }

.tt-shell {
  width: min(calc(100% - 40px), var(--tt-max));
  margin-inline: auto;
}

.tt-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(7,17,31,.86);
  border-bottom: 1px solid var(--tt-border);
}

.tt-header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.tt-brand {
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--tt-white);
  text-decoration: none;
  white-space: nowrap;
}

.tt-brand span { color: var(--tt-gold); }

.tt-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.tt-nav a {
  color: #d9e0ea;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 600;
}

.tt-nav a:hover { color: var(--tt-white); }

.tt-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--tt-border);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.tt-btn:hover { transform: translateY(-1px); }
.tt-btn-primary {
  background: var(--tt-gold);
  color: #111827;
  border-color: var(--tt-gold);
}
.tt-btn-secondary {
  color: var(--tt-white);
  background: rgba(255,255,255,.035);
}


.tt-quick-strip {
  padding: 14px 0 0;
  position: relative;
  z-index: 2;
}

.tt-quick-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 9px 10px 9px 18px;
  border: 1px solid rgba(199,170,106,.24);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(199,170,106,.07), transparent 34%),
    rgba(11,23,40,.88);
  box-shadow: 0 12px 34px rgba(0,0,0,.14);
}

.tt-quick-title {
  color: var(--tt-gold-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 4px;
}

.tt-quick-links {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.tt-quick-links a {
  color: #dfe5ee;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 650;
  white-space: nowrap;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.tt-quick-links a:hover {
  color: var(--tt-white);
  background: rgba(255,255,255,.055);
  border-color: rgba(199,170,106,.34);
}

.tt-quick-links a.tt-quick-private {
  color: var(--tt-gold-soft);
}

.tt-hero {
  padding: 88px 0 84px;
  position: relative;
  overflow: hidden;
}

.tt-hero:before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199,170,106,.14), transparent 65%);
  top: -260px;
  right: -160px;
  pointer-events: none;
}

.tt-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--tt-gold-soft);
  margin-bottom: 24px;
}

.tt-kicker:before {
  content:"";
  width: 30px;
  height: 1px;
  background: var(--tt-gold);
}

.tt-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
  gap: 64px;
  align-items: center;
}

.tt-hero h1 {
  font-size: clamp(3rem, 7vw, 6.7rem);
  line-height: .94;
  letter-spacing: -.055em;
  margin: 0;
  max-width: 900px;
}

.tt-hero h1 em {
  font-style: normal;
  color: var(--tt-gold);
}

.tt-lede {
  color: var(--tt-muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.7;
  max-width: 670px;
  margin-top: 28px;
}

.tt-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.tt-terminal {
  border: 1px solid var(--tt-border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.02)),
    var(--tt-panel);
  padding: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,.32);
}

.tt-terminal-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 4px 4px 18px;
  color: var(--tt-muted);
  font-size:.85rem;
}

.tt-stat-grid {
  display:grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap:12px;
}

.tt-stat {
  background: rgba(7,17,31,.66);
  border: 1px solid var(--tt-border);
  border-radius: 16px;
  padding: 18px;
}

.tt-stat small {
  color: var(--tt-muted);
  display:block;
  margin-bottom:8px;
}

.tt-stat strong {
  display:block;
  font-size: 1.5rem;
  letter-spacing:-.03em;
}

.tt-stat .positive { color: var(--tt-green); }
.tt-stat .negative { color: var(--tt-red); }
.tt-stat strong.tt-terminal-label {
  font-size: 1.05rem;
  line-height: 1.28;
  letter-spacing: -.015em;
}

.tt-section {
  padding: 84px 0;
  border-top: 1px solid rgba(255,255,255,.06);
}

.tt-section-light {
  background: #f4f1e9;
  color: #0b1320;
}

.tt-section-head {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:end;
  margin-bottom:36px;
}

.tt-section-head h2 {
  margin:0;
  font-size: clamp(2rem,4vw,3.5rem);
  letter-spacing:-.04em;
}

.tt-section-head p {
  color: var(--tt-muted);
  max-width:570px;
  margin:0;
  line-height:1.7;
}

.tt-section-light .tt-section-head p { color:#667085; }

.tt-grid-4 {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
}

.tt-card {
  border:1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  background: var(--tt-panel);
  padding:24px;
  min-height:190px;
  text-decoration:none;
  color:var(--tt-text);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.tt-card:hover {
  transform: translateY(-3px);
  border-color: rgba(199,170,106,.45);
  background: var(--tt-panel-2);
}

.tt-card small {
  color:var(--tt-gold-soft);
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.tt-card h3 {
  margin:20px 0 8px;
  font-size:1.35rem;
  letter-spacing:-.02em;
}

.tt-card p {
  color:var(--tt-muted);
  margin:0;
  line-height:1.55;
  font-size:.95rem;
}

.tt-feature {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(320px,.95fr);
  gap:64px;
  align-items:center;
}

.tt-feature h2 {
  font-size:clamp(2.5rem,5vw,4.4rem);
  letter-spacing:-.05em;
  line-height:1;
  margin:0;
}

.tt-feature p {
  color:#667085;
  line-height:1.75;
  font-size:1.05rem;
  max-width:610px;
}

.tt-journal-preview {
  background:#0b1728;
  border-radius:28px;
  padding:22px;
  box-shadow:0 24px 70px rgba(0,0,0,.18);
  color:var(--tt-text);
}

.tt-table {
  width:100%;
  border-collapse:collapse;
  font-size:.9rem;
}
.tt-table th,.tt-table td {
  padding:13px 10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
}
.tt-table th { color:var(--tt-muted); font-weight:600; }
.tt-table td strong { color:var(--tt-white); }

.tt-deals {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
}

.tt-deal-panel {
  background:var(--tt-panel);
  border:1px solid var(--tt-border);
  border-radius:24px;
  padding:30px;
}

.tt-deal-panel h3 {
  font-size:1.8rem;
  margin:0 0 10px;
}
.tt-deal-panel p { color:var(--tt-muted); line-height:1.65; }

.tt-app-cta {
  border:1px solid rgba(199,170,106,.28);
  background:
    linear-gradient(120deg,rgba(199,170,106,.12),transparent 45%),
    var(--tt-panel);
  border-radius:30px;
  padding:44px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:30px;
}

.tt-app-cta h2 { margin:0 0 10px; font-size:clamp(2rem,4vw,3.3rem); }
.tt-app-cta p { color:var(--tt-muted); margin:0; }

.tt-footer {
  padding:54px 0 34px;
  border-top:1px solid var(--tt-border);
  color:var(--tt-muted);
}
.tt-footer-grid {
  display:grid;
  grid-template-columns:2fr repeat(3,1fr);
  gap:32px;
}
.tt-footer h4 { color:var(--tt-white); margin:0 0 14px; }
.tt-footer a { color:var(--tt-muted); text-decoration:none; display:block; margin:8px 0; }
.tt-footer a:hover { color:var(--tt-white); }
.tt-footer-bottom {
  display:flex;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
  padding-top:30px;
  margin-top:30px;
  border-top:1px solid var(--tt-border);
  font-size:.85rem;
}

.tt-page-wrap {
  width:min(calc(100% - 40px), 900px);
  margin:0 auto;
  padding:70px 0 90px;
}
.tt-page-wrap h1 { font-size:clamp(2.5rem,5vw,4.5rem); letter-spacing:-.05em; }
.tt-page-wrap .entry-content { color:#d5dbe5; line-height:1.75; }

@media (max-width: 980px) {
  .tt-hero-grid,.tt-feature { grid-template-columns:1fr; gap:40px; }
  .tt-grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tt-footer-grid { grid-template-columns:1fr 1fr; }
  .tt-header-inner { flex-wrap:wrap; padding:14px 0; }
  .tt-nav { order:3; width:100%; }
  .tt-app-cta { grid-template-columns:1fr; }
}

@media (max-width: 640px) {
  .tt-shell { width:min(calc(100% - 28px), var(--tt-max)); }

  /* Mobile header: brand left, compact account actions stacked right,
     then a separated navigation row. Desktop/tablet are untouched. */
  .tt-header-inner {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
    gap:8px 12px;
    min-height:0;
    padding:10px 0 0;
    align-items:center;
  }
  .tt-header-inner > :first-child {
    grid-area:brand;
    min-width:0;
  }
  .tt-header-inner > :first-child .custom-logo {
    max-width:150px;
    height:auto;
  }
  .tt-brand { font-size:.92rem; }

  .tt-actions {
    grid-area:actions;
    width:auto;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:4px;
  }
  .tt-actions .tt-btn-secondary { display:inline-flex; }
  .tt-actions .tt-btn {
    min-height:28px;
    padding:0 10px;
    font-size:.67rem;
    line-height:1;
    white-space:nowrap;
  }

  .tt-nav {
    grid-area:nav;
    order:initial;
    width:100%;
    justify-content:center;
    gap:20px;
    overflow:visible;
    flex-wrap:wrap;
    margin-top:2px;
    padding:10px 0 11px;
    border-top:1px solid rgba(199,170,106,.55);
  }
  .tt-nav a {
    white-space:nowrap;
    font-size:.88rem;
  }

  /* Mobile Quick Access: no carousel/side-scroll; every available tool is visible. */
  .tt-quick-strip { padding-top:10px; }
  .tt-quick-panel {
    min-height:0;
    padding:10px;
    gap:0;
  }
  .tt-quick-title { display:none; }
  .tt-quick-links {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    width:100%;
    overflow:visible;
    padding:0;
  }
  .tt-quick-links a {
    min-height:48px;
    display:flex;
    align-items:center;
    justify-content:center;
    white-space:normal;
    text-align:center;
    line-height:1.25;
    padding:9px 8px;
    font-size:.78rem;
  }

  /* Guest Trading Desk preview has no purpose on mobile.
     A logged-in user's real Trading Desk remains visible. */
  .tt-terminal.tt-terminal-guest { display:none; }

  .tt-hero { padding:54px 0 58px; }
  .tt-hero-grid { gap:28px; }
  .tt-grid-4,.tt-deals,.tt-footer-grid { grid-template-columns:1fr; }
  .tt-section { padding:62px 0; }
  .tt-section-head { align-items:flex-start; flex-direction:column; }
  .tt-app-cta { padding:28px; }
}

/* WordPress menu reset */
.tt-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tt-nav .menu-item {
  display: inline-flex;
  align-items: center;
}

.tt-footer a.tt-footer-partners-link {
  margin-top:16px;
  color:var(--tt-gold-soft);
  font-size:.9rem;
  line-height:1.45;
}
.tt-footer a.tt-footer-partners-link:hover { color:var(--tt-white); }

/* -------------------------------------------------------------------------
 * Native WordPress page-content styling
 * v1.5.0: editorial/SEO copy stays editable in the page editor while
 * functional Trader Tools shortcodes keep their existing component styles.
 * ---------------------------------------------------------------------- */
.tt-page-wrap .entry-content > .tt-page-intro {
  max-width: 880px;
  margin: 0 0 30px;
  color: #c5ceda;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
}
.tt-page-wrap .entry-content > .wp-block-heading,
.tt-page-wrap .entry-content > h2,
.tt-page-wrap .entry-content > h3 {
  max-width: 900px;
  color: var(--tt-white);
  line-height: 1.2;
  letter-spacing: -.025em;
}
.tt-page-wrap .entry-content > .wp-block-heading,
.tt-page-wrap .entry-content > h2 {
  margin: 46px 0 16px;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}
.tt-page-wrap .entry-content > h3 {
  margin: 30px 0 12px;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}
.tt-page-wrap .entry-content > p:not(.tt-page-intro),
.tt-page-wrap .entry-content > ul,
.tt-page-wrap .entry-content > ol,
.tt-page-wrap .entry-content > .wp-block-list {
  max-width: 900px;
}
.tt-page-wrap .entry-content > ul,
.tt-page-wrap .entry-content > ol,
.tt-page-wrap .entry-content > .wp-block-list {
  margin: 0 0 24px;
  padding-left: 1.4rem;
  color: #c5ceda;
}
.tt-page-wrap .entry-content > ul li,
.tt-page-wrap .entry-content > ol li,
.tt-page-wrap .entry-content > .wp-block-list li {
  margin: 9px 0;
}
.tt-page-wrap .entry-content a:not(.ttc-button):not(.ttc-tool-card):not(.ttc-calculator-quick-link) {
  color: var(--tt-gold-soft);
}

