/* ===========================
   CSS Reset & Variables
   =========================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-accent: #60a5fa;
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-dark: #0f172a;
  --color-border: #e2e8f0;
  --color-success: #16a34a;
  --color-danger: #dc2626;

  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 0.75rem;
  --radius-sm: 0.375rem;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 48px rgba(15, 23, 42, 0.14);
  --transition: 0.2s ease;
  --container: 1140px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 1rem;
}

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

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

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ===========================
   Layout
   =========================== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.section-title {
  text-align: center;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
}

/* ===========================
   Buttons
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

.btn-large {
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  border-radius: var(--radius);
}

/* ===========================
   Header / Navigation
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
}

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

.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.main-nav a {
  color: var(--color-text-muted);
  font-weight: 500;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===========================
   Hero
   =========================== */
.hero {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 40%, #f8fafc 100%);
  padding: 5rem 0 4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 520px;
}

.hero-meta {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.hero-screenshot {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

/* ===========================
   Problem / Nutzen
   =========================== */
.problem {
  background: var(--color-bg-subtle);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.problem-card {
  padding: 2rem;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.problem-card h3 {
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.problem-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.problem-card--bad ul li::before { content: ""; }
.problem-card--good ul li::before { content: ""; }

.problem-card ul li {
  color: var(--color-text-muted);
  padding-left: 0.25rem;
  font-size: 0.95rem;
}

.problem-card--bad {
  border-left: 4px solid var(--color-danger);
}

.problem-card--good {
  border-left: 4px solid var(--color-success);
}

/* ===========================
   IBKR Integration
   =========================== */
.ibkr {
  background: var(--color-bg);
}

.ibkr-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.ibkr-text h2 {
  margin-bottom: 1rem;
}

.ibkr-text p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.feature-list li {
  color: var(--color-text);
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.ibkr-visual img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

/* ===========================
   Features Grid
   =========================== */
.features {
  background: var(--color-bg-subtle);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.feature-card {
  background: #fff;
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ===========================
   Screenshots
   =========================== */
.screenshots {
  background: var(--color-bg);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.screenshot-item {
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
  transition: transform var(--transition), box-shadow var(--transition);
}

.screenshot-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.screenshot-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.screenshot-item figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  background: var(--color-bg-subtle);
  text-align: center;
}

/* ===========================
   Lightbox
   =========================== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.lightbox-open {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 1.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}

/* ===========================
   Download
   =========================== */
.download {
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%);
}

.download-box {
  text-align: center;
  color: #fff;
}

.download-box h2 {
  color: #fff;
  margin-bottom: 0.75rem;
}

.download-subtitle {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.download .btn-primary {
  background: #fff;
  color: var(--color-primary-dark);
  font-size: 1.05rem;
}

.download .btn-primary:hover {
  background: #f0f7ff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.requirements {
  margin-top: 2.5rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.requirements h4 {
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.requirements ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.requirements ul li {
  color: rgba(255,255,255,0.85);
  font-size: 0.95rem;
  padding-left: 1.25rem;
  position: relative;
}

.requirements ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.requirements-note {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
}

.footer-nav {
  display: flex;
  gap: 2rem;
}

.footer-nav a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

/* ===========================
   Responsive – Tablet (≤900px)
   =========================== */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }

  .ibkr-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .ibkr-visual {
    order: -1;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ===========================
   Responsive – Mobile (≤640px)
   =========================== */
@media (max-width: 640px) {
  .section {
    padding: 3rem 0;
  }

  .hero {
    padding: 3rem 0;
  }

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

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

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }

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

  .main-nav a {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    width: 100%;
  }

  .download-box {
    padding: 0 0.5rem;
  }

  .requirements {
    padding: 1.25rem;
  }
}
