/* Critical Above-the-Fold Styles */
/* Extracted from style.css */

/* ========== Reset & Base Styles ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  margin-top: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== Layout (Critical Parts) ========== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ========== Navigation ========== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: transparent;
}

.main-header.scrolled {
  background-color: var(--bg);
  box-shadow: var(--shadow);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.logo-text {
  color: var(--text);
}

.logo-dot {
  color: var(--primary);
}

.logo-io {
  color: var(--secondary);
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin-left: 1.5rem;
}

nav ul li a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-sm);
}

.cta-button {
  background-color: var(--primary);
  color: white !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius-md);
  font-weight: 600;
}

.cta-button:hover {
  background-color: var(--primary-hover);
}

.mobile-menu {
  display: none; 
  flex-direction: column;
  justify-content: space-between;
  height: 24px;
  width: 30px;
  cursor: pointer;
}

.mobile-menu span {
  height: 3px;
  width: 100%;
  background-color: var(--text);
  border-radius: 3px;
}

header {
  margin-bottom: 0;
  padding-bottom: 0;
}

.hero-section {
  margin-top: 0;
  padding-top: 0;
}

/* ========== Hero Section ========== */
.hero {
  min-height: 100vh;
  padding-top: 120px;
  padding-bottom: 100px;
  display: flex;
  align-items: center;
  background-color: var(--bg);
  position: relative;
  overflow: hidden;
}

.hero:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.08) 0%, rgba(56, 178, 172, 0.08) 100%);
  z-index: 1;
}

.hero-bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(107, 70, 193, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107, 70, 193, 0.05) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: 0;
}

.hero-bg-circles {
  position: absolute;
  top: -50%;
  right: -10%;
  width: 80%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(107, 70, 193, 0.05) 0%, rgba(107, 70, 193, 0) 60%);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  margin-bottom: 1.5rem;
  position: relative;
}

.hero h1 .highlight {
  position: relative;
  display: inline-block;
  color: var(--primary);
}

.hero h1 .highlight::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  height: 8px;
  background-color: rgba(107, 70, 193, 0.2);
  z-index: -1;
}

.hero .lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 80%;
}

.hero-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.hero-product-item {
  padding: 1.2rem;
  border-radius: var(--border-radius-md);
  background-color: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.hero-product-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: white;
  font-size: 1.5rem;
}

.hero-product-icon.operator { background: var(--gradient-operator); }
.hero-product-icon.coder { background: var(--gradient-coder); }
.hero-product-icon.llm { background: var(--gradient-llm); }
.hero-product-icon.app { background: var(--gradient-app); }

.hero-product-info h3 {
  font-size: 1.1rem;
  margin: 0 0 5px;
  color: var(--text);
}

.hero-product-info p {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted);
}

/* ========== Product Page Header (Critical) ========== */
.product-page-header {
  padding: 5rem 0;
  background-color: var(--bg-alt); /* Assumes --bg-alt is defined, e.g., for a light grey background */
  text-align: center;
}

.product-page-header .container {
  position: relative; /* Consistent with .hero .container */
  z-index: 2; /* Consistent with .hero .container */
}

.product-page-header h1 {
  font-size: 3rem; /* Product page title size */
  font-weight: 700;
  color: var(--text); /* Main text color */
  margin-bottom: 1rem;
}

.product-page-header .lead-product {
  font-size: 1.2rem; /* Lead paragraph for product pages */
  color: var(--text-muted); /* Muted text color */
  max-width: 750px; /* To ensure readability */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}

/* === Critical Fixes from style-fixes.css === */

@media (max-width: 992px) {
  .main-header .nav-container nav ul li {
    margin-left: 1rem;
  }
  .main-header .cta-button {
    padding: 0.4rem 0.8rem !important;
  }
}

@media (max-width: 768px) {
  .main-header .nav-container {
    height: 70px;
  }
  .main-header .logo {
    font-size: 1.5rem;
  }
  .hero {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: auto;
  }
  .hero h1 {
    font-size: 2.8rem;
  }
  .hero .lead {
    font-size: 1.1rem;
    max-width: 95%;
  }
  .hero-products {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .hero-product-item {
    padding: 1rem;
  }
  .hero-product-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .hero-product-info h3 {
    font-size: 1rem;
  }
  .hero-product-info p {
    font-size: 0.85rem;
  }
}

.main-header.scrolled .nav-container {
  height: 70px;
}

.cta-button {
  transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.cta-button:active {
  transform: scale(0.98);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  -webkit-tap-highlight-color: transparent;
}
