@import url('/assets/fonts/fonts.css');

/* ==========================================================================
   Liberty Signal — design tokens
   Mirrors the Strategy Hub palette (lib/theme.py) so the marketing site and
   the app read as one product. Do not introduce colors outside this block.
   ========================================================================== */
:root {
  --bg:            #0A0A0A;
  --surface:       #161616;
  --elevated:      #1F1F1F;
  --border:        #2A2A2A;
  --border-strong: #3A3A3A;

  --text:          #F5F5F5;
  --body:          #B0B0B0;
  --muted:         #7A7A7A;

  --long:          #1caa7a;
  --short:         #d95050;
  --accent:        #dba525;
  --secondary:     #f4a460;

  --fill-accent:       rgba(219, 165, 37, 0.13);
  --fill-accent-faint: rgba(219, 165, 37, 0.04);
  --fill-long:         rgba(28, 170, 122, 0.10);
  --wash:              rgba(255, 255, 255, 0.055);

  --sans: 'Outfit', system-ui, -apple-system, sans-serif;
  --mono: 'DM Mono', 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1160px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 14px;
  --radius-lg: 20px;
  --section-y: clamp(72px, 11vw, 132px);
}

/* ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p  { margin: 0; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }

/* Eyebrow — mono, uppercase, gold. The Hub's terminal accent. */
.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--accent);
  opacity: .6;
  flex: none;
}
.eyebrow.center { justify-content: center; }

.lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--body); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-size: 1rem; font-weight: 500;
  padding: 15px 32px; border-radius: 999px;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #14100a; font-weight: 600;
  box-shadow: 0 0 0 0 var(--fill-accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 34px -8px rgba(219,165,37,.55);
}
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-lg { padding: 18px 40px; font-size: 1.06rem; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,.78);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 30px; height: 70px; }
.nav-logo { flex: none; margin-right: auto; display: flex; align-items: center; }
.nav-logo img { height: 44px; width: auto; }
.nav a.nav-link {
  color: var(--body); text-decoration: none; font-size: .95rem; font-weight: 400;
  transition: color .16s ease; position: relative; padding-block: 6px;
  white-space: nowrap;   /* else "Track Record" breaks onto two lines when the nav tightens */
}
.cta-mini { display: none; }
.nav a.nav-link:hover, .nav a.nav-link[aria-current="page"] { color: var(--text); }
.nav a.nav-link[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--accent); border-radius: 2px;
}
.nav .btn { padding: 10px 22px; font-size: .9rem; }
@media (max-width: 620px) {
  .nav { gap: 14px; height: 62px; }
  .nav-logo img { height: 34px; }
  .nav a.nav-link { font-size: .88rem; }
  .nav .btn { padding: 9px 15px; font-size: .82rem; }
  /* The nav can't hold the full CTA wording next to both links on a phone. */
  .cta-full { display: none; }
  .cta-mini { display: inline; }
}
/* The full bar measures 348px, so it fits every mainstream phone (360/390/414).
   Only below ~340px does it overflow — there, drop Home (the logo already links home). */
@media (max-width: 340px) {
  .nav a.nav-link[href="/"] { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding-top: clamp(64px, 10vw, 112px); padding-bottom: 0; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute; top: -22%; left: 50%; transform: translateX(-50%);
  width: min(1100px, 130vw); aspect-ratio: 1.6 / 1;
  background: radial-gradient(ellipse at center, var(--fill-accent) 0%, transparent 62%);
  pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-lede {
  font-size: clamp(1.15rem, 2.5vw, 1.85rem);
  line-height: 1.4;
  font-weight: 300;
  color: var(--body);
  max-width: 34ch;
  margin: 24px auto 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
@media (max-width: 700px) { .hero-lede { max-width: 26ch; font-size: 1.15rem; } }
.hero-cta { margin-top: 40px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-shot {
  margin-top: clamp(48px, 7vw, 76px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
  position: relative;
}
.hero-shot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 62%, rgba(10,10,10,.55) 100%);
}

/* ==========================================================================
   Included grid (8 items, 4x2)
   ========================================================================== */
.included {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-top: 54px;
}
.inc {
  background: var(--bg); padding: 34px 26px 32px;
  transition: background .2s ease;
}
.inc:hover { background: var(--surface); }
.inc-ico {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--fill-accent-faint); border: 1px solid var(--border);
  display: grid; place-items: center; margin-bottom: 18px; color: var(--accent);
}
.inc-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inc h3 { font-size: .98rem; font-weight: 500; line-height: 1.4; letter-spacing: -0.01em; color: var(--text); }
@media (max-width: 900px) { .included { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .included { grid-template-columns: 1fr; } .inc { padding: 26px 22px; } }

/* ==========================================================================
   App section (Strategy Hub) — 3 cards
   ========================================================================== */
.app-section { background: linear-gradient(180deg, transparent, var(--fill-accent-faint) 45%, transparent); }
.app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.app-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .22s ease, transform .22s ease;
}
.app-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.app-shot {
  background: var(--bg); border-bottom: 1px solid var(--border);
  aspect-ratio: 16 / 10; overflow: hidden; position: relative;
}
.app-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top center;
  opacity: .95;
}
.app-body { padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.app-body h3 { font-size: 1.22rem; font-weight: 600; }
.app-bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.app-bullets li {
  position: relative; padding-left: 24px; font-size: .93rem; line-height: 1.5; color: var(--body);
}
.app-bullets li::before {
  content: ''; position: absolute; left: 0; top: .52em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); opacity: .85;
}
@media (max-width: 940px) { .app-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }

/* ==========================================================================
   Track record teaser
   ========================================================================== */
.tr-shot {
  margin-top: 48px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface); padding: 10px;
}
.tr-shot img { border-radius: 10px; }

/* ==========================================================================
   Examples (3 charts)
   ========================================================================== */
/* One example per row, full width. These are trade charts — the entry, exit and
   price action have to be readable, which they weren't at three-up (~360px).
   This section runs wider than the page's 1160px measure for the same reason. */
.ex-wrap { max-width: 1340px; }
.ex-grid { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 54px; }
.ex-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s ease;
  margin: 0;
}
.ex-card:hover { border-color: var(--border-strong); }
/* Caption sits above the chart so the ticker reads before the image, and the
   chart itself terminates the card. */
.ex-meta {
  padding: 15px 22px; display: flex; align-items: baseline; gap: 14px;
  background: var(--elevated); border-bottom: 1px solid var(--border);
}
.ex-ticker { font-family: var(--mono); font-weight: 500; font-size: 1.05rem; color: var(--accent); letter-spacing: .02em; }
.ex-date { font-size: .84rem; color: var(--muted); margin-left: auto; }
.ex-card img { width: 100%; background: var(--bg); }
@media (max-width: 640px) {
  .ex-grid { gap: 20px; }
  .ex-meta { padding: 13px 16px; }
  .ex-ticker { font-size: .95rem; }
  .ex-date { font-size: .76rem; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.about-photo {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); position: sticky; top: 100px;
}
.quote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 24px; margin-bottom: 32px;
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.55; color: var(--text); font-weight: 300; font-style: italic;
}
.quote cite { display: block; margin-top: 14px; font-style: normal; font-size: .85rem; color: var(--accent); font-family: var(--mono); letter-spacing: .04em; }
.about-body p { margin-bottom: 18px; }
.about-body p:last-of-type { margin-bottom: 0; }
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { position: static; max-width: 380px; }
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.stars-row { display: flex; justify-content: center; margin-bottom: 22px; }
.stars-row img { height: 26px; width: auto; }
.tst-grid { columns: 3; column-gap: 20px; margin-top: 54px; }
.tst {
  break-inside: avoid; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 26px 24px;
  transition: border-color .2s ease;
}
.tst:hover { border-color: var(--border-strong); }
.tst-stars { display: flex; gap: 3px; margin-bottom: 14px; color: var(--accent); }
.tst-stars svg { width: 14px; height: 14px; fill: currentColor; }
.tst p { font-size: .93rem; line-height: 1.62; color: var(--body); }
.tst cite {
  display: block; margin-top: 16px; font-style: normal;
  font-family: var(--mono); font-size: .78rem; color: var(--muted); letter-spacing: .03em;
}
@media (max-width: 1000px) { .tst-grid { columns: 2; } }
@media (max-width: 640px)  { .tst-grid { columns: 1; } }

/* ==========================================================================
   Pricing
   ========================================================================== */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; align-items: start; }
.plan {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 34px 30px 32px;
  display: flex; flex-direction: column; gap: 22px;
  transition: border-color .22s ease, transform .22s ease;
  position: relative;
}
.plan:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.plan-featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--fill-accent-faint), var(--surface) 55%);
  box-shadow: 0 24px 60px -28px rgba(219,165,37,.4);
}
.plan-featured:hover { border-color: var(--accent); }
.plan-tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #14100a;
  font-family: var(--mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan-name { font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.plan-featured .plan-name { color: var(--accent); }
.plan-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.plan-price .amt { font-size: 2.9rem; font-weight: 600; color: var(--text); letter-spacing: -0.03em; line-height: 1; }
.plan-price .off {
  font-family: var(--mono); font-size: .74rem; font-weight: 500; color: var(--long);
  background: var(--fill-long); border: 1px solid rgba(28,170,122,.3);
  padding: 3px 9px; border-radius: 999px; letter-spacing: .04em;
}
.plan-sub { font-size: .88rem; color: var(--muted); margin-top: -12px; }
.plan-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.plan-feats li { display: flex; gap: 11px; align-items: flex-start; font-size: .91rem; line-height: 1.45; }
.plan-feats svg { width: 15px; height: 15px; flex: none; margin-top: .26em; stroke: var(--accent); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.plan-feats .dim { color: var(--muted); }
.plan .btn { width: 100%; }
@media (max-width: 940px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding-block: 56px 40px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.foot-logo img { height: 46px; width: auto; margin-bottom: 16px; }
.foot h4 {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px;
}
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot a { color: var(--body); text-decoration: none; font-size: .9rem; transition: color .16s ease; }
.foot a:hover { color: var(--accent); }
.foot p { font-size: .9rem; color: var(--body); margin-bottom: 6px; }
.foot-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted); font-family: var(--mono);
}
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ==========================================================================
   Track Record page
   ========================================================================== */
/* 7 stats — real gaps so the odd count doesn't leave a broken empty cell */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px;
  transition: border-color .2s ease;
}
.stat:hover { border-color: var(--border-strong); }
.stat-label { font-size: .78rem; color: var(--muted); letter-spacing: .01em; margin-bottom: 10px; line-height: 1.35; }
.stat-val { font-family: var(--mono); font-size: 1.72rem; font-weight: 500; color: var(--text); letter-spacing: -0.02em; }
.stat-val.pos { color: var(--long); }
.stat-val.neg { color: var(--short); }
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

.years { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 44px; margin-bottom: 32px; }
.year-btn {
  font-family: var(--mono); font-size: .9rem; font-weight: 500;
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--body);
  border: 1px solid var(--border-strong);
  transition: all .16s ease;
}
.year-btn:hover { color: var(--text); border-color: var(--muted); }
.year-btn[aria-selected="true"] { background: var(--accent); color: #14100a; border-color: var(--accent); }
.year-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* align-items:start — reports vary in row count; let each card take its natural
   height instead of stretching to the tallest in its row. */
.months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.month {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s ease, transform .2s ease;
}
.month:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.month-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--elevated);
}
.month-name { font-family: var(--mono); font-size: .86rem; font-weight: 500; color: var(--text); letter-spacing: .06em; text-transform: uppercase; }
.month-year { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.month a { display: block; background: var(--bg); }
.month img { width: 100%; }
.months-empty { color: var(--muted); font-size: .95rem; padding: 40px 0; }
@media (max-width: 1000px) { .months { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .months { grid-template-columns: 1fr; } }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(5,5,5,.94); backdrop-filter: blur(6px);
  padding: 4vh 4vw; overflow: auto;
}
.lb[open], .lb.on { display: grid; place-items: center; }
.lb img { max-width: 100%; max-height: 92vh; border: 1px solid var(--border-strong); border-radius: 10px; }
.lb-close {
  position: fixed; top: 18px; right: 22px;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; line-height: 1;
}
.lb-close:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Legal / prose
   ========================================================================== */
.prose { max-width: 78ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 64px; margin-bottom: 20px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.06rem; font-weight: 600; margin-top: 34px; margin-bottom: 10px; color: var(--text); }
.prose p { margin-bottom: 16px; font-size: .96rem; line-height: 1.72; }
.prose a { color: var(--accent); }
.legal-toc {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px;
  padding-bottom: 36px; border-bottom: 1px solid var(--border);
}
.legal-toc a {
  font-family: var(--mono); font-size: .8rem; text-decoration: none;
  padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--body); transition: all .16s ease;
}
.legal-toc a:hover { border-color: var(--accent); color: var(--accent); }

/* ==========================================================================
   Simple centered pages (welcome / moved / 404)
   ========================================================================== */
.slim { min-height: 62vh; display: grid; place-items: center; text-align: center; padding-block: clamp(60px, 10vw, 120px); }
.slim .inner { max-width: 620px; }
.slim h1 { margin-bottom: 22px; }
.slim .lede { margin-inline: auto; margin-bottom: 34px; }
.slim .btn { margin-top: 6px; }

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