/* CSS Variables for CodePit Brand Colors */
:root {
  --primary-color: #2d5d5a; /* Dark teal from logo */
  --secondary-color: #f4c430; /* Yellow accent from logo */
  --background-color: #ffffff;
  --text-dark: #1a1a1a;
  --text-light: #666666;
  --text-muted: #999999;
  --border-color: #e5e5e5;
  --shadow-light: 0 2px 10px rgba(45, 93, 90, 0.08);
  --shadow-medium: 0 4px 20px rgba(45, 93, 90, 0.12);
  --shadow-heavy: 0 8px 30px rgba(45, 93, 90, 0.15);
  --gradient-primary: linear-gradient(135deg, #2d5d5a 0%, #1e4440 100%);
  --gradient-secondary: linear-gradient(135deg, #f4c430 0%, #e6b02e 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav {
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo-img {
  height: 40px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  transition: all 0.3s ease;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.lang-btn:hover {
  color: var(--primary-color);
  background: rgba(45, 93, 90, 0.1);
}

.lang-btn.active {
  color: var(--primary-color);
  background: var(--secondary-color);
  color: var(--text-dark);
}

.lang-separator {
  color: var(--border-color);
  font-weight: 300;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-light);
}

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

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

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #f8fffe 0%, #f0f9f8 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

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

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

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

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

.hero-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-heavy);
  transform: rotate(3deg);
  transition: transform 0.3s ease;
}

.hero-card:hover {
  transform: rotate(0deg);
}

.code-snippet {
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
  min-width: 300px;
}

.code-header {
  background: #2d2d2d;
  padding: 12px 16px;
  display: flex;
  align-items: center;
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #666;
}

.code-dots span:first-child {
  background: #ff5f56;
}

.code-dots span:nth-child(2) {
  background: #ffbd2e;
}

.code-dots span:nth-child(3) {
  background: #27ca3f;
}

.code-content {
  padding: 20px;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.code-line {
  color: #e6e6e6;
}

.keyword {
  color: #ff79c6;
}

.function {
  color: #50fa7b;
}

.string {
  color: #f1fa8c;
}

/* Services Section */
.services {
  padding: 80px 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-card {
  background: white;
  padding: 2.5rem 2rem;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

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

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

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.service-icon svg {
  width: 28px;
  height: 28px;
}

.service-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.service-description {
  color: var(--text-light);
  line-height: 1.6;
}

/* About Section */
.about {
  padding: 80px 0;
  background: linear-gradient(135deg, #f8fffe 0%, #f0f9f8 100%);
}

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

.about-text .section-title {
  text-align: left;
  margin-bottom: 2rem;
}

.about-description {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
}

.about-card {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-medium);
}

.about-card h4 {
  color: var(--text-dark);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.about-card ul {
  list-style: none;
}

.about-card li {
  color: var(--text-light);
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
  position: relative;
}

.about-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  font-weight: bold;
}

/* Contact Section */
.contact {
  padding: 80px 0;
  background: white;
}

.contact-content {
  display: flex;
  justify-content: center;
}

.contact-info {
  max-width: 600px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-details h4 {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.contact-details p {
  color: var(--text-light);
  line-height: 1.5;
}

/* Form Styles */
.form {
  background: linear-gradient(135deg, #f8fffe 0%, #f0f9f8 100%);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-light);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  background: white;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

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

/* Footer */
.footer {
  background: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.footer-text {
  color: rgba(255, 255, 255, 0.8);
  margin-top: 1rem;
}

.footer-legal {
  text-align: right;
}

.footer-legal p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
}

/* Hide mobile language switcher on desktop */
.mobile-lang {
  display: none;
}

/* Hide mobile menu header on desktop */
.mobile-menu-header {
  display: none;
}

/* Responsive Design */
@media (max-width: 968px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 80px 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
  }
  
  .mobile-menu-header {
    width: 100%;
    display: flex !important;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .mobile-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    color: var(--text-dark);
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-close-btn:hover {
    background: rgba(45, 93, 90, 0.1);
    color: var(--primary-color);
  }
  
  .mobile-close-btn svg {
    width: 24px;
    height: 24px;
  }
  
  .mobile-lang {
    display: flex;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    width: 100%;
    justify-content: center;
  }
  
  .desktop-lang {
    display: none;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-link {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    font-size: 1.1rem;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .nav-container {
    position: relative;
  }
  
  .logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin-left: -20px;
  }
  
  .hamburger {
    margin-left: auto;
  }
  
  body.menu-open {
    overflow: hidden;
  }
  
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
  }
  
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-text .section-title {
    text-align: center;
  }
  
  .contact-content {
    justify-content: center;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    align-items: center;
  }
  
  .footer-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .footer-legal {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    min-width: 200px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .about-stats {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .hero-card {
    transform: none;
    margin: 0 1rem;
  }
  
  .code-snippet {
    min-width: auto;
  }
  
  .code-content {
    font-size: 11px;
    text-align: left;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .hero {
    padding: 100px 0 60px;
  }
  
  .services,
  .about,
  .contact {
    padding: 60px 0;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .service-card {
    padding: 2rem 1.5rem;
  }
  
  .about-card {
    padding: 2rem 1.5rem;
  }
  
  .form {
    padding: 2rem 1.5rem;
  }
  
  .about-stats {
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .code-content {
    font-size: 12px;
    text-align: left;
  }
}

/* Smooth animations and accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for accessibility */
.btn:focus,
.form-input:focus,
.nav-link:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border-color: #000000;
    --text-light: #000000;
  }
}