/* ============================================================
   StormWatch Signal — brand tokens
   Palette sampled from avatar.jpg.
   ============================================================ */
:root {
  /* Dark TradingView-style base */
  --color-bg: #0a0f0c;              /* near-black green undertone */
  --color-bg-elevated: #0f1712;     /* elevated panels */
  --color-bg-soft: #152019;         /* soft card surface */
  --color-border: #24352a;          /* muted green-grey edge */
  --color-text: #e6ece7;            /* near-white with sage cast */
  --color-text-muted: #a8b9a9;      /* sage grey — from avatar */
  --color-heading: #f3f7f4;

  /* Brand accents (from avatar — confirmed for now) */
  --color-brand-deep: #134f0b;      /* deep green */
  --color-brand-darker: #053207;    /* darker green */
  --color-brand-steel: #608fb3;     /* steel blue */
  --color-brand-rust: #931d09;      /* rust red */
  --color-brand-sage: #a8b9a9;      /* sage grey */
  --color-brand-teal: #31706b;      /* teal */

  /* Level accents: pL green / pT red */
  --color-pl: #2ecc71;              /* Probable Low — green */
  --color-pt: #e74c3c;              /* Probable Top — red */
  --color-trend: #608fb3;           /* T / sT — steel blue */

  /* UI */
  --color-accent: #608fb3;          /* steel blue CTAs/links */
  --color-accent-hover: #84adcb;
  --color-warn: #c9a227;

  /* Typography */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, monospace;

  /* Layout */
  --max-width: 1080px;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(19, 79, 11, 0.35), transparent 58%),
    radial-gradient(900px 480px at 92% 0%, rgba(96, 143, 179, 0.14), transparent 55%),
    radial-gradient(700px 400px at 50% 110%, rgba(147, 29, 9, 0.08), transparent 50%),
    var(--color-bg);
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* ---------- WIP banner ---------- */
.wip-banner {
  background: linear-gradient(90deg, var(--color-brand-darker), var(--color-brand-deep));
  color: var(--color-heading);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(168, 185, 169, 0.25);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(10, 15, 12, 0.88);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--color-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--color-heading);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(168, 185, 169, 0.35);
  box-shadow: 0 0 0 2px rgba(19, 79, 11, 0.45);
}

.brand-name {
  font-size: 1.05rem;
}

.brand-name span {
  color: var(--color-text-muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-heading);
}

.nav-links a.active {
  color: var(--color-heading);
  border-bottom-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
}

/* ---------- Layout ---------- */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 3.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-pl);
  margin-bottom: 0.75rem;
}

h1, h2, h3 {
  color: var(--color-heading);
  line-height: 1.25;
  margin: 0 0 0.85rem;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.45rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.1rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-brand-steel);
  color: #061018;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-accent-hover);
  color: #061018;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-heading);
}

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin-top: 1.25rem;
}

/* Charts page: larger cards — 2 columns desktop, 1 mobile */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.charts-grid .chart-figure {
  margin: 0;
}

.charts-grid .chart-figure a.chart-link {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}

.charts-grid .chart-figure a.chart-link:hover img,
.charts-grid .chart-figure a.chart-link:focus-visible img {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.charts-grid .chart-figure img {
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

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

.card {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.card h3 {
  margin-top: 0;
}

.muted {
  color: var(--color-text-muted);
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(96, 143, 179, 0.14);
  color: var(--color-brand-steel);
  border: 1px solid rgba(96, 143, 179, 0.3);
}

.tag-warn {
  background: rgba(201, 162, 39, 0.12);
  color: var(--color-warn);
  border-color: rgba(201, 162, 39, 0.3);
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.swatch i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.swatch .pl { background: var(--color-pl); }
.swatch .pt { background: var(--color-pt); }
.swatch .trend { background: var(--color-trend); }

/* ---------- Chart figures ---------- */
.chart-figure {
  margin: 0;
}

.chart-figure img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: #000;
}

.chart-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.chart-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.method-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.method-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
}

.method-list li:last-child {
  border-bottom: none;
}

.method-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--color-pl);
  background: rgba(46, 204, 113, 0.08);
}

.callout.caution {
  border-left-color: var(--color-warn);
  background: rgba(201, 162, 39, 0.08);
}

.offer-box {
  margin-top: 2rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid rgba(96, 143, 179, 0.35);
  background: linear-gradient(135deg, rgba(19, 79, 11, 0.35), rgba(15, 23, 18, 0.9));
}

.offer-box p {
  margin: 0 0 0.85rem;
}

.offer-box p:last-child {
  margin-bottom: 0;
}

.not-advice {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: #060a08;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.footer-inner a {
  color: var(--color-text-muted);
}

.footer-inner a:hover {
  color: var(--color-heading);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.5rem;
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  .nav-links.open {
    display: flex;
  }
}

@media (max-width: 480px) {
  .site-main {
    padding-top: 1.5rem;
  }

  .btn {
    width: 100%;
  }
}
