/* JournalEdge site — matches app dark fintech theme */

:root {
  --background: #0d1117;
  --foreground: #e6edf3;
  --muted: #8b949e;
  --card: #161b22;
  --card-border: #30363d;
  --border: #21262d;
  --primary: #2f81f7;
  --primary-muted: rgba(47, 129, 247, 0.12);
  --accent-bg: #122038;
  --profit: #3fb950;
  --loss: #f85149;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --max-width: 720px;
  --landing-width: 960px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(47, 129, 247, 0.18), transparent),
    var(--background);
}

.header {
  padding: 32px 24px 24px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: block;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.landing-header .brand-mark {
  width: 48px;
  height: 48px;
}

.brand-text {
  text-align: left;
}

.brand-name {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-name .accent {
  background: linear-gradient(90deg, var(--primary), var(--profit));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tagline {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
}

.doc-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.doc-meta {
  margin: 0 0 28px;
  font-size: 13px;
  color: var(--muted);
}

.doc-meta strong {
  color: var(--foreground);
  font-weight: 600;
}

.lead {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--muted);
}

h2 {
  margin: 32px 0 12px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--foreground);
}

h2:first-of-type {
  margin-top: 0;
}

p {
  margin: 0 0 16px;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 8px;
}

li:last-child {
  margin-bottom: 0;
}

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

a:hover {
  text-decoration: underline;
}

.notice {
  margin: 24px 0;
  padding: 16px 18px;
  background: var(--accent-bg);
  border: 1px solid rgba(47, 129, 247, 0.25);
  border-radius: var(--radius-lg);
  font-size: 14px;
}

.notice strong {
  display: block;
  margin-bottom: 6px;
  color: var(--foreground);
}

.footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-links a {
  font-weight: 500;
}

@media (max-width: 600px) {
  .header {
    padding-top: 24px;
  }

  .card {
    padding: 24px 20px;
  }

  .doc-title {
    font-size: 22px;
  }
}

/* —— Landing page —— */

.landing-header {
  max-width: var(--landing-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.landing-nav {
  display: flex;
  align-items: center;
  gap: 8px 20px;
  font-size: 13px;
  font-weight: 500;
}

.landing-nav a {
  color: var(--muted);
}

.landing-nav a:hover {
  color: var(--foreground);
  text-decoration: none;
}

.landing-main {
  max-width: var(--landing-width);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 72px;
}

.hero-copy {
  min-width: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px 12px;
  background: var(--primary-muted);
  border: 1px solid rgba(47, 129, 247, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(47, 129, 247, 0.8);
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.hero-subtitle {
  margin: 0 0 28px;
  max-width: 34rem;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: #388bfd;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--muted);
  color: var(--foreground);
}

.hero-preview {
  position: relative;
}

.preview-glow {
  position: absolute;
  inset: 10% 0 0 10%;
  background: radial-gradient(circle, rgba(47, 129, 247, 0.22), transparent 70%);
  pointer-events: none;
}

.preview-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.preview-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-pnl {
  margin: 0 0 20px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--profit);
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.preview-stat {
  padding: 12px;
  background: var(--surface, #1c2128);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.preview-stat-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--muted);
}

.preview-stat-value {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.preview-stat-value.positive { color: var(--profit); }
.preview-stat-value.neutral { color: var(--foreground); }

.preview-chart {
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(63, 185, 80, 0.12) 0%, transparent 100%);
  border: 1px solid var(--border);
  overflow: hidden;
}

.preview-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.section-heading {
  margin: 0 0 8px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-lead {
  margin: 0 auto 36px;
  max-width: 36rem;
  text-align: center;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 72px;
}

.feature-card {
  padding: 24px 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
}

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--primary-muted);
  border: 1px solid rgba(47, 129, 247, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.feature-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.markets {
  margin-bottom: 72px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.markets-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.market-pill {
  padding: 8px 14px;
  background: var(--surface, #1c2128);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--foreground);
}

.cta {
  padding: 36px 28px;
  background: var(--accent-bg);
  border: 1px solid rgba(47, 129, 247, 0.25);
  border-radius: var(--radius-xl);
  text-align: center;
}

.cta-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-text {
  margin: 0 auto 24px;
  max-width: 32rem;
  color: var(--muted);
}

.site-footer {
  max-width: var(--landing-width);
  margin: 0 auto;
  padding: 0 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

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

  .hero-preview {
    order: -1;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .landing-nav {
    display: none;
  }
}

@media (max-width: 480px) {
  .landing-main {
    padding-top: 32px;
  }

  .preview-stats {
    grid-template-columns: 1fr;
  }

  .hero-actions .btn {
    width: 100%;
  }
}
