/* ======================================
   BASE STYLES & RESET
   ====================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--text-body);
  background-color: var(--white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-primary);
}

input, textarea, select {
  font-family: var(--font-primary);
  outline: none;
}

/* ======================================
   TYPOGRAPHY
   ====================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2.2rem, 5vw, var(--text-6xl)); }
h2 { font-size: clamp(1.8rem, 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(1.3rem, 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { color: var(--text-body); line-height: 1.8; }

/* ======================================
   LAYOUT UTILITIES
   ====================================== */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-lg {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-py { padding: var(--space-2xl) 0; }
.section-py-sm { padding: var(--space-xl) 0; }

.grid { display: grid; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

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

/* ======================================
   BUTTONS
   ====================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-primary);
  letter-spacing: 0.02em;
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before { left: 100%; }

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(33,150,243,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(33,150,243,0.5);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--primary-50);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-white {
  background: var(--white);
  color: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-green {
  background: var(--gradient-secondary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(67,160,71,0.4);
}

.btn-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(67,160,71,0.5);
}

.btn-lg {
  padding: 1.05rem 2.5rem;
  font-size: var(--text-base);
}

.btn-sm {
  padding: 0.6rem 1.3rem;
  font-size: var(--text-sm);
}

/* ======================================
   SECTION HEADERS
   ====================================== */

.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-50);
  color: var(--primary-dark);
  padding: 0.4rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border: 1px solid var(--primary-lighter);
}

.section-tag.green {
  background: var(--secondary-50);
  color: var(--secondary-dark);
  border-color: var(--secondary-lighter);
}

.section-tag.gold {
  background: var(--gold-50);
  color: #B8860B;
  border-color: var(--gold-light);
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-title span {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ======================================
   CARDS
   ====================================== */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-slow);
  overflow: hidden;
  border: 1px solid var(--gray-100);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary-lighter);
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-lg);
}

/* ======================================
   BADGES & TAGS
   ====================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-blue { background: var(--primary-50); color: var(--primary-dark); }
.badge-green { background: var(--secondary-50); color: var(--secondary-dark); }
.badge-gold { background: var(--gold-50); color: #B8860B; }
.badge-accent { background: rgba(0,188,212,0.1); color: var(--accent-dark); }

/* ======================================
   MISC UTILITIES
   ====================================== */

.divider {
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  margin: 0 auto;
  width: 60px;
}

.icon-box {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: transform var(--transition-spring);
}

.icon-box:hover { transform: scale(1.1) rotate(-5deg); }

.icon-box-blue { background: var(--primary-50); color: var(--primary); }
.icon-box-green { background: var(--secondary-50); color: var(--secondary); }
.icon-box-gold { background: var(--gold-50); color: var(--gold); }
.icon-box-accent { background: rgba(0,188,212,0.1); color: var(--accent); }

/* Scroll animation helpers */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ======================================
   SCROLLBAR
   ====================================== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-50); }
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ======================================
   SELECTION
   ====================================== */

::selection {
  background: var(--primary-lighter);
  color: var(--primary-dark);
}

/* ======================================
   RESPONSIVE HELPERS
   ====================================== */

@media (max-width: 1024px) {
  :root { --space-2xl: 4rem; --space-3xl: 6rem; }
}

@media (max-width: 768px) {
  :root { --space-2xl: 3rem; --space-xl: 2.5rem; }
  .section-py { padding: 3rem 0; }
  .container { padding: 0 1rem; }
}

@media (max-width: 480px) {
  :root { --space-2xl: 2.5rem; }
  .btn-lg { padding: 0.9rem 1.8rem; font-size: var(--text-sm); }
}
