/* ============================================
   Red Grid Tactical — Design System
   redgridtactical.com
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- Reset & Base ---- */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0a0a0a;
  color: #f0f0f0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Custom Properties ---- */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #1a1a1a;
  --bg-elevated: #222222;
  --accent: #cc3333;
  --accent-hover: #e63939;
  --accent-glow: rgba(204, 51, 51, 0.3);
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --border: #2a2a2a;
  --border-light: #333333;
  --success: #2e7d32;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --container: 1200px;
  --nav-height: 64px;
}

/* ---- Typography ---- */

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--text-primary);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: var(--text-primary);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.mono {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

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

a:hover {
  text-decoration: underline;
}

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

ul, ol {
  list-style: none;
}

/* ---- Layout ---- */

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

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header p {
  margin-top: 12px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---- Navigation ---- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
}

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

.nav-logo img {
  height: 32px;
}

.nav-hamburger {
  width: 24px;
  height: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-menu {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: var(--bg-secondary);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 999;
  padding-top: var(--nav-height);
  overflow-y: auto;
}

.nav-menu.open {
  transform: translateX(0);
}

.nav-menu a {
  display: block;
  padding: 16px 24px;
  color: var(--text-primary);
  font-size: 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.nav-menu a:hover {
  background: var(--bg-tertiary);
  text-decoration: none;
}

.nav-menu .submenu {
  padding-left: 24px;
}

.nav-menu .submenu a {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}

.nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-cta {
  display: none;
}

/* ---- Cards ---- */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.card .card-emoji {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.app-badges {
  margin-top: 16px;
}

.app-badges .btn {
  font-size: 0.85rem;
  padding: 10px 20px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  font-family: inherit;
  line-height: 1;
}

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

.btn svg {
  width: 20px;
  height: 20px;
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-glow);
  color: #ffffff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

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

.btn-ghost:hover {
  text-decoration: underline;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* ---- Badges ---- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-red {
  background: rgba(204, 51, 51, 0.15);
  color: var(--accent);
}

.badge-green {
  background: rgba(46, 125, 50, 0.15);
  color: var(--success);
}

.badge-gray {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

/* ---- Hero Section ---- */

.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a0000 50%, #0a0a0a 100%);
}

.hero h1 {
  margin-bottom: 16px;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.hero .pitch {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.hero .pitch strong {
  color: var(--text-primary);
}

.hero .cta-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ---- Screenshots ---- */

.screenshots {
  padding: 48px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.screenshots-inner {
  display: flex;
  gap: 16px;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

.screenshots-inner img {
  width: 220px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

/* ---- Comparison Table ---- */

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.compare-table th {
  padding: 12px 16px;
  text-align: left;
  background: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.compare-table .highlight-col {
  background: rgba(204, 51, 51, 0.06);
}

.check {
  color: var(--success);
  font-weight: 700;
}

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

/* ---- Pricing Cards ---- */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.price-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
}

.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.price-card .tier {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.price-card .amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.price-card .period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.price-card ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.price-card li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.price-card li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

/* ---- Privacy Strip ---- */

.privacy-strip {
  background: var(--bg-secondary);
  padding: 64px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.privacy-strip h2 {
  color: var(--accent);
}

.privacy-grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.privacy-item {
  text-align: center;
  max-width: 180px;
}

.privacy-item .icon,
.privacy-item .privacy-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.privacy-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.privacy-item span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---- FAQ Accordion ---- */

.faq-item {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.faq-item summary {
  padding: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  padding: 0 0 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- Forms ---- */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ---- Timeline (Roadmap) ---- */

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-primary);
}

.timeline-item.completed::before {
  background: var(--success);
  border-color: var(--success);
}

.timeline-item.current::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.timeline-item.planned::before {
  background: var(--bg-tertiary);
  border-color: var(--border);
}

.timeline-version {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.timeline-features {
  list-style: none;
  padding: 0;
}

.timeline-features li {
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.timeline-features li::before {
  content: "\2713";
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

.timeline-item.planned .timeline-features li::before {
  content: "\2022";
  color: var(--text-muted);
}

.timeline-item.current .timeline-features li::before {
  content: "\2022";
  color: var(--accent);
}

/* ---- Roadmap Tabs ---- */

.roadmap-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 48px;
}

.roadmap-tab {
  padding: 12px 32px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.roadmap-tab:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.roadmap-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.timeline {
  display: none;
}

.timeline.active {
  display: block;
}

/* ---- Hero Small Variant ---- */

.hero-sm {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 48px;
}

/* ---- Section Title ---- */

.section-title {
  text-align: center;
  margin-bottom: 32px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: -16px auto 32px;
}

/* ---- Social Proof Strip ---- */

.proof-strip {
  background: var(--bg-secondary);
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.proof-strip .container {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  align-items: center;
}

.proof-strip .container > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0 24px;
  border-right: 1px solid var(--border-light);
}

.proof-strip .container > span:last-child {
  border-right: none;
}

.proof-strip .container > span strong {
  color: var(--text-primary);
}

.proof-items {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.proof-item strong {
  color: var(--text-primary);
}

/* ---- Ecosystem Section ---- */

.ecosystem-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.ecosystem-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ecosystem-card img {
  height: 64px;
  margin-bottom: 16px;
}

.ecosystem-card h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.ecosystem-card .subtitle,
.ecosystem-card .ecosystem-subtitle {
  font-size: 0.9rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.ecosystem-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.ecosystem-card .btn {
  margin-top: auto;
}

/* ---- Footer ---- */

.footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Utility Classes ---- */

.text-center {
  text-align: center;
}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 48px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 48px; }

.hidden {
  display: none;
}

.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;
}

/* ---- Animations ---- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive: Tablet (768px+) ---- */

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

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

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

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

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

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

  /* Desktop: keep nav-cta visible */
  .nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--accent);
    color: #ffffff;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .nav-cta:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
    text-decoration: none;
    color: #ffffff;
  }
}

/* ---- Responsive: Desktop (1024px+) ---- */

@media (min-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Responsive: Large (1200px+) ---- */

@media (min-width: 1200px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .pricing-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
