/* ==========================================================================
   TSP Timing — global styles
   ========================================================================== */

:root {
  --bg: #07090a;
  --bg-alt: #0b0f0d;
  --surface: #10151b0d;
  --surface-1: #111612;
  --surface-2: #161c17;
  --border: #22291f33;
  --border-strong: #2a3a30;
  --green: #22c55e;
  --green-bright: #4ade80;
  --green-dim: #16a34a;
  --blue: #3b82f6;
  --text: #f2f5f2;
  --text-muted: #a9b3ac;
  --text-faint: #6d776f;
  --danger: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SF Mono", Consolas, "Roboto Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green-bright);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--text-muted); }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.75em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--green-bright), var(--green-dim));
  color: #04140a;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--green); color: var(--green-bright); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 10, 0.85);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand svg { width: 32px; height: 32px; flex-shrink: 0; }
.brand .dot { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}
.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.3em;
}
.hero .accent { color: var(--green); }
.hero-tagline {
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0.6em;
}
.hero-sub { font-size: 1.05rem; max-width: 46ch; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.5em; }
.hero-visual { position: relative; }
.hero-visual svg { width: 100%; height: auto; opacity: 0.95; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

/* ---------- Position card ---------- */
.position-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--surface-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 28px;
}
.position-card .icon {
  width: 46px; height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #0e2417;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
}
.position-card .icon svg { width: 24px; height: 24px; }
.position-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  font-weight: 700;
  margin-bottom: 2px;
}
.position-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.position-value .fund-g { color: var(--green); }
.position-value .fund-c { color: var(--blue); }
.position-date { font-size: 0.85rem; color: var(--text-faint); margin-left: auto; text-align: right; white-space: nowrap; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}
.step-num {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #0e2417;
  color: var(--green);
  font-weight: 800;
  margin-bottom: 14px;
  border: 1px solid var(--border-strong);
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.4em; }
.step p { margin: 0; font-size: 0.95rem; }

.rotation-figure { text-align: center; margin: 48px auto 0; max-width: 460px; }
.rotation-figure figcaption { margin-top: 14px; font-size: 0.9rem; color: var(--text-faint); }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.feature-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: left;
}
.feature-card .icon-wrap {
  width: 44px; height: 44px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 1rem; margin-bottom: 0.3em; color: var(--green-bright); }
.feature-card p { font-size: 0.9rem; margin: 0; }

@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .features { grid-template-columns: 1fr; }
}

/* ---------- Stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--text); }
.stat-value.positive { color: var(--green); }
.stat-label { font-size: 0.8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

@media (max-width: 760px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th, td {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th {
  background: var(--surface-1);
  color: var(--text-faint);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
td.positive { color: var(--green); font-weight: 700; }
td.negative { color: #f87171; font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- Callouts / disclaimers ---------- */
.callout {
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  border-radius: var(--radius);
  padding: 22px 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.callout strong { color: var(--text); }
.callout-warning {
  border-color: #5b3d12;
  background: #1a1206;
}
.callout-warning strong { color: var(--danger); }

/* ---------- CTA / subscribe ---------- */
.cta-box {
  background: radial-gradient(circle at 20% 20%, #123320, var(--surface-1) 60%);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 48px;
  text-align: center;
}
.cta-box h2 { margin-bottom: 0.3em; }
.cta-box p { max-width: 52ch; margin: 0 auto 1.6em; }

.embed-placeholder {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.88rem;
  background: #0d1210;
}
.embed-placeholder code {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-info .icon-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  background: var(--bg-alt);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 10px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--text-muted); font-size: 0.92rem; }
.footer-col a:hover { color: var(--green-bright); }
.footer-legal {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  font-size: 0.78rem;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- 404 ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}
.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

/* ---------- Utility ---------- */
.mt-lg { margin-top: 48px; }
.text-center { text-align: center; }

.chart-container {
  height: 380px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
