/* ==========================================================================
   EXCELL VALLEY TECHNOLOGIES - GLOBAL STYLES (RESET & BASE LAYOUT)
   ========================================================================== */

/* 1. CSS Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: -webkit-fill-available;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
}

/* 2. Scrollbar Customization */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--light);
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-full);
  border: 2px solid var(--light);
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 3. Global Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-sm);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-xs);
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

p.lead {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.7;
}

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

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

ul, ol {
  list-style: none;
}

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

/* 4. Common Layout Classes */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-lg {
  padding: var(--spacing-xxl) 0;
  position: relative;
}

.section-dark {
  background-color: var(--primary);
  color: var(--text-on-primary);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: #ffffff;
}

.section-dark p {
  color: var(--text-light);
}

/* Flex & Grid Helpers */
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-md);
}

@media (max-width: 1024px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
}

/* 5. Header / Navigation Base Structure */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-light);
}

header.scrolled {
  background: #ffffff;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid var(--border);
}

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

header.scrolled .nav-link:hover,
header.scrolled .nav-link.active {
  color: var(--secondary);
}

header.scrolled .logo-text {
  color: var(--primary);
}

/* Main Content Wrapper */
main {
  flex: 1;
  padding-top: 0; /* Let hero sections slide under header */
}

/* 6. Utility Helper Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-accent { color: var(--accent); }

.bg-light { background-color: var(--light); }
.bg-surface { background-color: var(--surface); }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
}

.badge-primary {
  background: rgba(10, 25, 47, 0.08);
  color: var(--primary);
}

.badge-secondary {
  background: rgba(16, 185, 129, 0.1);
  color: var(--secondary);
}

.badge-accent {
  background: rgba(217, 119, 6, 0.1);
  color: var(--accent);
}

/* Section Header Style */
.section-header {
  max-width: 700px;
  margin: 0 auto var(--spacing-lg) auto;
  text-align: center;
}

.section-header .badge {
  margin-bottom: var(--spacing-sm);
}

.section-header h2 {
  font-weight: 800;
  color: var(--primary);
}

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