/* ==========================================================================
   ADVERNIA Corporate Software Engineering Design System
   Color Palette derived from Logo:
   - Deep Teal: #005C5E (Primary Brand)
   - Cyan Teal: #22B5B5 (Top Hex)
   - Lime Green: #8CC63F (Mid Hex)
   - Orange: #F37023 (Left Hex)
   - Gold: #F8A51D (Bottom Hex)
   ========================================================================== */

:root {
  /* Brand Palette */
  --teal-primary: #005C5E;
  --teal-dark: #003B3C;
  --teal-light: #E6F4F4;
  --cyan: #22B5B5;
  --cyan-light: #EBF8F8;
  --lime: #8CC63F;
  --lime-light: #F2F9E9;
  --orange: #F37023;
  --orange-light: #FEF1E9;
  --gold: #F8A51D;
  --gold-light: #FEF7E8;

  /* Neutral Spectrum */
  --bg-main: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-alt: #F1F5F9;
  --bg-dark: #071E22;
  --bg-dark-surface: #0E2B30;
  
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --border-light: #E2E8F0;
  
  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(0, 92, 94, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(0, 92, 94, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(0, 92, 94, 0.15);

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
}

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

ul {
  list-style: none;
}

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

/* Utility Containers */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

@media (max-width: 768px) {
  .section-padding {
    padding: 3.5rem 0;
  }
}

/* Section Header Components */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.5rem auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.9rem;
}

.badge-teal {
  background-color: var(--teal-light);
  color: var(--teal-primary);
  border: 1px solid rgba(0, 92, 94, 0.15);
}

.badge-cyan {
  background-color: var(--cyan-light);
  color: #118181;
}

.badge-orange {
  background-color: var(--orange-light);
  color: var(--orange);
}

.section-title {
  font-size: 2.3rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.8rem 1.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: none;
  transition: var(--transition);
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-dark) 100%);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(0, 92, 94, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 92, 94, 0.3);
  background: linear-gradient(135deg, #007072 0%, var(--teal-primary) 100%);
}

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

.btn-secondary:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 0;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(0, 92, 94, 0.08);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  height: 42px;
}

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

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

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

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--cyan);
  transition: var(--transition);
  border-radius: var(--radius-full);
}

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

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

/* Hero Section */
.hero {
  position: relative;
  padding-top: 8.5rem;
  padding-bottom: 5.5rem;
  background: radial-gradient(circle at 90% 10%, rgba(34, 181, 181, 0.07) 0%, transparent 45%),
              radial-gradient(circle at 10% 80%, rgba(140, 198, 63, 0.06) 0%, transparent 45%),
              var(--bg-main);
  overflow: hidden;
}

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

.hero-content {
  max-width: 580px;
}

.hero-title {
  font-size: 3.1rem;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.hero-title .highlight-teal {
  color: var(--teal-primary);
  background: linear-gradient(135deg, var(--teal-primary), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-trust-badges {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-icon {
  color: var(--lime);
  font-weight: bold;
}

/* Corporate Engineering Card (Hero Visual) */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.code-card-wrapper {
  width: 100%;
  max-width: 440px;
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  position: relative;
}

.code-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.2rem;
}

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

.code-card-title {
  font-size: 0.8rem;
  color: var(--text-light);
  font-family: monospace;
}

.code-snippet {
  font-family: 'Consolas', 'Fira Code', Monaco, monospace;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #E2E8F0;
}

.kw { color: #F37023; }
.fn { color: #22B5B5; }
.str { color: #8CC63F; }
.cm { color: #64748B; font-style: italic; }

.tech-stack-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Company Overview Section */
.overview-section {
  background-color: var(--bg-surface);
  position: relative;
}

.hexagon-pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.pillar-card {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  padding: 2rem 1.6rem;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  transition: var(--transition);
}

.pillar-cyan::before { background: var(--cyan); }
.pillar-lime::before { background: var(--lime); }
.pillar-orange::before { background: var(--orange); }
.pillar-gold::before { background: var(--gold); }

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.pillar-icon-box {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.pillar-cyan .pillar-icon-box { background: var(--cyan-light); color: #118181; }
.pillar-lime .pillar-icon-box { background: var(--lime-light); color: #6E9E25; }
.pillar-orange .pillar-icon-box { background: var(--orange-light); color: var(--orange); }
.pillar-gold .pillar-icon-box { background: var(--gold-light); color: #D88B09; }

.pillar-title {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.pillar-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Stats Counter Banner */
.stats-banner {
  margin-top: 4rem;
  background: linear-gradient(135deg, var(--teal-dark) 0%, #052628 100%);
  border-radius: var(--radius-lg);
  padding: 2.8rem 2rem;
  color: #FFFFFF;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.85;
  font-weight: 500;
}

/* Services Section */
.services-section {
  background: var(--bg-main);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.service-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 92, 94, 0.2);
}

.service-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.service-icon-teal { background: var(--teal-light); color: var(--teal-primary); }
.service-icon-cyan { background: var(--cyan-light); color: #118181; }
.service-icon-lime { background: var(--lime-light); color: #6E9E25; }
.service-icon-orange { background: var(--orange-light); color: var(--orange); }
.service-icon-gold { background: var(--gold-light); color: #D88B09; }

.service-title {
  font-size: 1.25rem;
  margin-bottom: 0.7rem;
}

.service-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.service-list {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.service-list li {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-list li::before {
  content: '✓';
  color: var(--lime);
  font-weight: bold;
}

/* Case Studies / Projects Section */
.case-studies-section {
  background: var(--bg-surface);
}

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}

.case-card {
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.case-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.case-card-header {
  height: 160px;
  background: linear-gradient(135deg, var(--teal-dark), var(--bg-dark-surface));
  padding: 1.5rem;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.case-tag {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  z-index: 2;
}

.case-card-title-head {
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  z-index: 2;
  position: relative;
}

.case-card-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.case-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  flex: 1;
}

.case-metric-box {
  display: flex;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.case-metric {
  flex: 1;
}

.metric-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--teal-primary);
}

.metric-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.read-more-link {
  color: var(--teal-primary);
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.read-more-link:hover {
  gap: 0.6rem;
  color: var(--cyan);
}

/* Contact & Consultation Section */
.contact-section {
  background: var(--bg-main);
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3.5rem;
  align-items: start;
}

.contact-info-box {
  padding-right: 1rem;
}

.info-item {
  display: flex;
  gap: 1.2rem;
  margin-bottom: 1.8rem;
}

.info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--teal-light);
  color: var(--teal-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.info-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.info-text {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.contact-form-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  color: var(--text-main);
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--teal-primary);
  box-shadow: 0 0 0 3px rgba(0, 92, 94, 0.12);
}

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

.form-submit-btn {
  width: 100%;
}

.toast-message {
  display: none;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--lime-light);
  border: 1px solid var(--lime);
  color: #4C7210;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.toast-message.show {
  display: block;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: #FFFFFF;
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-brand-logo {
  margin-bottom: 1.2rem;
  height: 44px;
}

.footer-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

.footer-title {
  color: #FFFFFF;
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
  flex-wrap: wrap;
  gap: 1rem;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 30, 34, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--bg-main);
  border: 1px solid var(--border-light);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.modal-close-btn:hover {
  background: var(--teal-light);
  color: var(--teal-primary);
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hexagon-pillars-grid, .services-grid, .case-study-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.3rem;
  }
  
  .section-title {
    font-size: 1.9rem;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
  }

  .nav-links.mobile-open {
    left: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .hexagon-pillars-grid, .services-grid, .case-study-grid, .stats-banner {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
