/* ========================================
 1. CSS VARIABLES & RESET
 ========================================
*/
:root {
  /* Backgrounds */
  --bg-body: #050505;
  --bg-card: #0a0a0a;
  --bg-card-hover: #111111;
  --bg-card-light: #1f1f1f;

  /* Text Colors */
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --border-color: #262626;

  /* Brand Identity Colors */
  --color-purple: #6200ea;
  --color-teal: #00bfa5;
  --color-orange: #ff3d00;
  --color-blue: #2962ff;

  /* Typography & Layout */
  --font-main: "Rethink Sans", sans-serif;
  --container-width: 1200px;
  --nav-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-muted);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  display: block;
}

/* ========================================
 2. UTILITY CLASSES
 ========================================
*/
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-white {
  color: var(--text-main);
}
.text-center {
  text-align: center;
}
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.justify-center {
  justify-content: center;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-4 {
  gap: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-8 {
  margin-bottom: 2rem;
}

/* ========================================
 3. COMPONENTS: BUTTONS
 ========================================
*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--text-main);
  color: var(--bg-body);
  font-weight: 600;
}
.btn-primary:hover {
  background-color: #e5e5e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--text-main);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-full {
  width: 100%;
}

/* ========================================
 4. NAVBAR
 ========================================
*/
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-img {
  width: 85%;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}
.nav-links a:hover {
  color: var(--text-main);
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--text-main);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  z-index: 1001;
}

/* ========================================
 5. HERO SECTION & CANVAS SIMULATION
 ========================================
*/
.hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  min-height: 95vh;
  display: flex;
  align-items: center;
}

/* Container for the Canvas */
.grid-scene {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background-color: var(--bg-body); /* Base background */
}

canvas#simulation-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Vignette mask to fade grid edges */
.grid-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Distance Fog Gradient */
  background: linear-gradient(
      to bottom,
      #050505 0%,
      #050505 30%,
      transparent 60%
    ),
    radial-gradient(ellipse at center, transparent 30%, #050505 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.beta-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 16px;
  border-radius: 99px;
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 24px;
  animation: fadeIn 1s ease-out;
}
.dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

h1 {
  font-size: 5rem;
  line-height: 1.1;
  color: var(--text-main);
  margin-bottom: 35px;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 740px;
  margin: 0 auto 40px;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* ========================================
 6. SECTIONS
 ========================================
*/
.intro-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--border-color);
}
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.pill-badge {
  display: inline-block;
  border: 1px solid var(--text-main);
  color: var(--text-main);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.75rem;
  margin-bottom: 20px;
  font-weight: 500;
}

h2 {
  font-size: 2.5rem;
  line-height: 1.2;
  color: var(--text-muted);
  margin-bottom: 16px;
}
h2 span {
  color: var(--text-main);
}

.icon-row {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}
.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
.icon-box:hover {
  transform: scale(1.1) rotate(5deg);
}

.intro-card {
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  padding: 40px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.intro-card:hover {
  border-color: #333;
}

/* PRODUCTS GRID */
.products-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background-color: var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.product-card {
  background-color: var(--bg-body);
  padding: 60px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  transition: background-color 0.3s;
}
.product-card:hover {
  background-color: var(--bg-card);
}
.prod-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.prod-header h3 {
  font-size: 1.75rem;
  color: var(--text-main);
}
.prod-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
}
.prod-desc {
  font-size: 1rem;
  margin-bottom: 32px;
  max-width: 90%;
}
.prod-actions {
  display: flex;
  gap: 12px;
}

/* WORKFLOW */
.workflow-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--border-color);
}
.workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}
.workflow-diagram {
  max-width: 100%;
  height: auto;
}

/* PRICING */
.pricing-section {
  padding: 100px 0;
  border-bottom: 1px solid var(--border-color);
}
.toggle-container {
  display: flex;
  justify-content: center;
  margin: 32px 0 60px;
}
.toggle-switch {
  background: #1a1a1a;
  padding: 4px;
  border-radius: 99px;
  display: flex;
}
.toggle-btn {
  padding: 8px 24px;
  border-radius: 99px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}
.toggle-btn.active {
  background: #fff;
  color: #000;
  font-weight: 600;
}
.pricing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}
.price-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.price-card.pro {
  background: var(--bg-card-light);
  border-color: #444;
  transform: scale(1.05);
  z-index: 2;
}
.price-card.pro:hover {
  transform: scale(1.05) translateY(-5px);
}
.price-title {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 4px;
  font-weight: 600;
}
.price-sub {
  font-size: 0.85rem;
  margin-bottom: 24px;
  display: block;
}
.price-amount {
  font-size: 2.5rem;
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: baseline;
}
.price-amount span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}
.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}
.feature-list i {
  color: var(--text-main);
}

/* FOOTER */
.footer-cta {
  padding: 80px 0;
  border-bottom: 1px solid var(--border-color);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  background: #080808;
}
.contact-info {
  padding: 48px;
}
.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.contact-row i {
  margin-top: 4px;
  color: var(--text-main);
}
.map-box {
  position: relative;
  min-height: 300px;
}
.map-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

footer {
  padding: 60px 0 20px;
  font-size: 0.9rem;
}
.footer-logo {
  width: 60%;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}
.footer-col h4 {
  color: var(--text-main);
  margin-bottom: 24px;
  font-size: 1rem;
}
.footer-col a {
  display: block;
  margin-bottom: 12px;
}
.footer-col a:hover {
  text-decoration: underline;
  color: var(--text-main);
}
.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s;
}
.social-link:hover {
  color: var(--text-main);
}
.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: #555;
  padding-top: 20px;
  border-top: 1px solid #111;
  cursor: pointer;
}

/* ANIMATIONS */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .pricing-cards {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
  .price-card.pro {
    transform: scale(1);
  }
  .products-section {
    gap: 1px;
  }
}
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  .nav-links,
  .nav-actions {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }

  .navbar.active {
    height: auto;
    min-height: 100vh;
    background: rgba(5, 5, 5, 0.98);
    align-items: flex-start;
    padding-top: 10px;
  }
  .navbar.active .nav-container {
    flex-wrap: wrap;
  }
  .navbar.active .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 24px 0;
    border-bottom: 1px solid #222;
    order: 3;
  }
  .navbar.active .nav-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 24px 0;
    gap: 16px;
    order: 4;
  }
  .navbar.active .nav-actions .btn {
    width: 100%;
  }

  .intro-grid,
  .workflow-grid,
  .footer-cols,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .products-section {
    grid-template-columns: 1fr;
  }
}
