/* ==========================================================================
   Megamil Tech & AI - Main Stylesheet
   ========================================================================== */

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

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 4rem auto;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0.75rem 0;
  line-height: 1.2;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--accent-cyan);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-glass);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-whatsapp,
.nav-links a.btn-whatsapp,
.nav-links a.btn-whatsapp:hover,
.nav-links a.btn-whatsapp.active,
.btn-whatsapp * {
  background: #25d366;
  color: #ffffff !important;
  font-weight: 600;
}

.btn-whatsapp:hover,
.nav-links a.btn-whatsapp:hover {
  background: #20ba5a;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transform: translateY(-2px);
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: var(--transition-normal);
  background: rgba(10, 13, 20, 0.6);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
  background: rgba(10, 13, 20, 0.95);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--grad-primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.125rem;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.lang-btn {
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  border: none;
  background: transparent;

}

.lang-btn.active {
  background: var(--accent-cyan);
  color: var(--text-inverse);
}

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

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 5rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, rgba(124, 77, 255, 0.08) 50%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 1.5rem 0;
  letter-spacing: -1px;
}

.gradient-text {
  background: var(--grad-accent-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}

.metric-item h3 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

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

/* Glass Card Component */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  backdrop-filter: blur(15px);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--grad-card-border);
  opacity: 0;
  transition: var(--transition-normal);
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
}

.glass-card:hover::before {
  opacity: 1;
}

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

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Spotlight LLMCHAT Section */
.spotlight-section {
  position: relative;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
}

.spotlight-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(18, 24, 36, 0.9) 0%, rgba(124, 77, 255, 0.1) 100%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.spotlight-info h3 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  margin: 1rem 0;
}

.spotlight-info p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
}

.feature-item i {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

.spotlight-preview {
  position: relative;
  background: rgba(10, 13, 20, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.chat-mock {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-bubble {
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  max-width: 85%;
}

.chat-user {
  align-self: flex-end;
  background: var(--grad-primary);
  color: #fff;
}

.chat-bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.chat-bot span {
  display: inline-block;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

/* Portfolio Cases Section */
.cases-filter {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

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

.case-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.case-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.case-card h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.case-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-content h2 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  margin: 1rem 0;
}

.about-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.highlight-box {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-left: 3px solid var(--accent-cyan);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
}

.highlight-box h4 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

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

/* Contact Section & Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
}

.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.info-text strong {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
}

.info-text span {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

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

.form-response {
  padding: 1rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  display: none;
}

.form-response.success {
  display: block;
  background: rgba(37, 211, 102, 0.15);
  border: 1px solid #25d366;
  color: #25d366;
}

.form-response.error {
  display: block;
  background: rgba(255, 64, 129, 0.15);
  border: 1px solid #ff4081;
  color: #ff4081;
}

/* Footer */
footer {
  background: rgba(5, 7, 12, 0.95);
  border-top: 1px solid var(--border-glass);
  padding: 4rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 1rem;
  max-width: 400px;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.footer-links a:hover {
  color: var(--accent-cyan);
}

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