/**
 * Predictir AI - Main Stylesheet
 * 
 * Brand Colors (derived from /images/logo.png):
 * - Primary: Deep navy background (#06043a)
 * - Accents: Cyan/teal (#27C6E0, #27AFCF), warm yellow/orange/red (#F4C542, #F06F2D, #E84B3A)
 * - Design motif: Low-poly geometric shapes, connecting node networks
 * 
 * Logo usage: /images/logo.png is used in header, footer, and hero sections
 * 
 * Theme: Dark-first with light mode toggle
 */

/* ============================================
   CSS Variables - Theme System
   ============================================ */
:root {
  /* Brand Colors */
  --brand-navy: #06043a;
  --brand-cyan: #27C6E0;
  --brand-teal: #27AFCF;
  --brand-yellow: #F4C542;
  --brand-orange: #F06F2D;
  --brand-red: #E84B3A;
  --neutral-100: #ffffff;
  --neutral-900: #0b0b0b;
  
  /* Dark Theme (Default) */
  --bg-primary: var(--brand-navy);
  --bg-secondary: #0a0830;
  --bg-tertiary: #0f0d3d;
  --text-primary: var(--neutral-100);
  --text-secondary: #b8b8d0;
  --text-muted: #7a7a9a;
  --accent-primary: var(--brand-cyan);
  --accent-secondary: var(--brand-teal);
  --accent-warm: var(--brand-orange);
  --border-color: rgba(39, 198, 224, 0.2);
  --shadow-glow: rgba(39, 198, 224, 0.3);
  --card-bg: rgba(15, 13, 61, 0.6);
}

[data-theme="light"] {
  --bg-primary: var(--neutral-100);
  --bg-secondary: #f5f5f8;
  --bg-tertiary: #e8e8f0;
  --text-primary: var(--brand-navy);
  --text-secondary: #2a2a4a;
  --text-muted: #5a5a7a;
  --accent-primary: var(--brand-cyan);
  --accent-secondary: var(--brand-teal);
  --accent-warm: var(--brand-orange);
  --border-color: rgba(6, 4, 58, 0.15);
  --shadow-glow: rgba(39, 198, 224, 0.2);
  --card-bg: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: var(--accent-secondary);
  opacity: 0.9;
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(6, 4, 58, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
  width: 100%;
}

[data-theme="light"] .header {
  background-color: rgba(255, 255, 255, 0.95);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  z-index: 1001;
}

.logo-img {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1;
  justify-content: flex-end;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links li {
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-primary);
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-teal));
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-teal));
  color: var(--neutral-100);
  box-shadow: 0 4px 15px var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
}

.btn-secondary:hover {
  background: var(--accent-primary);
  color: var(--neutral-100);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--card-bg);
  border-color: var(--accent-primary);
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  overflow: hidden;
  width: 100%;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(39, 198, 224, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(240, 111, 45, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content h1 {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--brand-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-secondary);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-illustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-svg {
  width: 100%;
  max-width: 600px;
  height: auto;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Polygonal Node Network SVG */
.node-network {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.3;
  pointer-events: none;
}

.node {
  fill: var(--brand-cyan);
  animation: pulse 2s ease-in-out infinite;
}

.node-warm {
  fill: var(--brand-orange);
  animation-delay: 0.5s;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 5rem 2rem;
  position: relative;
}

.section-alt {
  background-color: var(--bg-secondary);
}

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

.section-title h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-teal));
  border-radius: 2px;
}

/* ============================================
   Product Cards
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-teal));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px var(--shadow-glow);
  border-color: var(--accent-primary);
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-icon {
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
  fill: var(--accent-primary);
}

.product-card h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.product-card p {
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

/* ============================================
   Features / Benefits
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  fill: var(--brand-cyan);
  margin-top: 0.25rem;
}

.feature-content h4 {
  margin-bottom: 0.5rem;
}

.feature-content p {
  margin: 0;
  font-size: 0.95rem;
}

/* ============================================
   Testimonials
   ============================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
}

.testimonial-quote {
  font-size: 1.1rem;
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neutral-100);
  font-weight: 600;
}

.author-info h4 {
  margin: 0;
  font-size: 1rem;
}

.author-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--shadow-glow);
}

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

.form-error {
  color: var(--brand-red);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: none;
}

.form-input:invalid:not(:placeholder-shown) + .form-error,
.form-textarea:invalid:not(:placeholder-shown) + .form-error {
  display: block;
}

/* ============================================
   Newsletter
   ============================================ */
.newsletter {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto 0;
  flex-wrap: wrap;
}

.newsletter-form .form-input {
  flex: 1;
  min-width: 250px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 2rem 2rem;
  margin-top: 5rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.social-icon:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

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

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  z-index: 1000;
  display: none;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.cookie-banner.show {
  display: block;
}

.cookie-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 250px;
}

.cookie-text p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cookie-actions {
  display: flex;
  gap: 1rem;
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* ============================================
   Responsive Design
   ============================================ */
@media (min-width: 769px) {
  .nav-links {
    display: flex !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
    flex-wrap: wrap;
  }
  
  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-top: 1rem;
  }
  
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-actions {
    gap: 0.5rem;
  }
  
  .nav-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero {
    min-height: auto;
    padding: 3rem 1rem;
  }
  
  .section {
    padding: 3rem 1rem;
  }
  
  .products-grid,
  .features-grid,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  
  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .hero-cta .btn {
    width: 100%;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .header,
  .footer,
  .cookie-banner,
  .btn {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

