/* ===== CSS Variables ===== */
:root {
  --bg: #eceff4;
  --fg: #0a0f1a;
  --card: #ffffff;
  --card-fg: #0a0f1a;
  --primary: #8b4567;
  --primary-fg: #f8fafc;
  --secondary: #2980b9;
  --secondary-fg: #f8fafc;
  --muted: #f1f5f9;
  --muted-fg: #64748b;
  --accent: #5b8fa8;
  --border: #e2e8f0;
  --radius: 0.5rem;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 8px 10px rgba(0,0,0,.04);
}

.dark {
  --bg: #0a0f1a;
  --fg: #f8fafc;
  --card: #0a0f1a;
  --card-fg: #f8fafc;
  --primary: #b06a8a;
  --primary-fg: #1a0710;
  --secondary: #5dade2;
  --secondary-fg: #0a1929;
  --muted: #1e293b;
  --muted-fg: #94a3b8;
  --accent: #5b8fa8;
  --border: #1e293b;
  --shadow: 0 1px 3px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.3);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Utilities ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.text-center { text-align: center; }
.text-muted { color: var(--muted-fg); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.w-full { width: 100%; }
.relative { position: relative; }

@media (max-width: 1024px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ===== Typography ===== */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
.section-subtitle { max-width: 700px; margin: 1rem auto 0; font-size: 1.125rem; color: var(--muted-fg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: var(--radius); font-weight: 600;
  font-size: 0.95rem; cursor: pointer; border: 2px solid transparent;
  transition: all 0.25s ease; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: var(--secondary); color: var(--secondary-fg); }
.btn-secondary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-outline-dark { background: transparent; border-color: var(--primary); color: var(--primary); }
.btn-outline-dark:hover { background: var(--primary); color: var(--primary-fg); }
.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; }

/* ===== Header ===== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding: 0 1rem;
}
.dark .header { background: rgba(10,15,26,0.95); }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 80px; }
.logo img { height: 50px; width: auto; }
.nav { display: flex; align-items: center; gap: 0; }
.nav a, .nav-dropdown-trigger {
  padding: 0.5rem 1rem; font-weight: 500; color: var(--fg);
  transition: color 0.2s; border-radius: var(--radius);
  font-size: 0.95rem; background: none; border: none; cursor: pointer;
  font-family: inherit;
}
.nav a:hover, .nav-dropdown-trigger:hover { color: var(--primary); background: var(--muted); }
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 280px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-xl); padding: 0.5rem; z-index: 200;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block; padding: 0.6rem 0.75rem; border-radius: calc(var(--radius) - 2px);
  font-size: 0.9rem;
}
.nav-dropdown-menu a:hover { background: var(--muted); color: var(--primary); }
.nav-dropdown-menu a small { display: block; color: var(--muted-fg); font-weight: 400; font-size: 0.8rem; margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.mobile-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.5rem; cursor: pointer; color: var(--fg); }

/* Dark mode toggle */
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.45rem; cursor: pointer; color: var(--fg);
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { background: var(--muted); }
.theme-toggle .icon-sun, .dark .theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-moon, .dark .theme-toggle .icon-sun { display: none; }

/* Mobile */
@media (max-width: 1024px) {
  .nav, .header-actions .btn { display: none; }
  .mobile-toggle { display: flex; }
}

.mobile-menu {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 300px;
  background: var(--card); z-index: 300; padding: 1.5rem;
  box-shadow: -5px 0 20px rgba(0,0,0,0.15); flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 250; }
.mobile-overlay.open { display: block; }
.mobile-menu a { display: block; padding: 0.75rem 0; font-size: 1.1rem; font-weight: 500; border-bottom: 1px solid var(--border); }
.mobile-menu a:hover { color: var(--primary); }
.mobile-close { align-self: flex-end; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--fg); padding: 0.25rem; }

/* ===== Hero ===== */
.hero {
  position: relative; height: 70vh; min-height: 500px; overflow: hidden;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  transition: opacity 1s ease;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0.2), transparent); }
.hero-content { position: relative; z-index: 10; max-width: 800px; padding: 1rem; color: #fff; }
.hero h1 { text-shadow: 2px 2px 4px rgba(0,0,0,0.4); min-height: 1.2em; }
.hero p { margin-top: 1.5rem; font-size: 1.125rem; color: #f1f1f1; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.hero-buttons { margin-top: 2.5rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Hero Carousel */
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; background-size: cover; background-position: center; }
.hero-slide.active { opacity: 1; }

/* ===== Stats ===== */
.stats { background: var(--primary); color: var(--primary-fg); padding: 3rem 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.8; }
.stat-value { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
.stat-label { font-size: 0.875rem; opacity: 0.8; margin-top: 0.25rem; }
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== Sections ===== */
.section { padding: 4rem 1rem; }
.section-muted { background: var(--muted); }
.section-dark { background: #111; color: #fff; }

/* ===== Cards ===== */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: all 0.3s ease; border: 1px solid var(--border);
  display: flex; flex-direction: column; height: 100%;
}
.card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card-icon { width: 44px; height: 44px; color: var(--primary); margin-bottom: 0.5rem; }
.card-icon-circle { width: 64px; height: 64px; border-radius: 50%; background: rgba(139,69,103,0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.card-icon-circle svg { width: 32px; height: 32px; color: var(--primary); }
.card-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-text { color: var(--muted-fg); font-size: 0.95rem; flex: 1; }
.card-footer { padding: 0 1.5rem 1.5rem; }

/* ===== Page Hero (service pages, about, contact) ===== */
.page-hero {
  position: relative; height: 400px; display: flex; align-items: center;
  justify-content: center; text-align: center; color: #fff; overflow: hidden;
}
.page-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.page-hero-content { position: relative; z-index: 10; max-width: 800px; padding: 1rem; }
.page-hero h1 { margin-bottom: 1.5rem; }
.page-hero p { font-size: 1.125rem; color: #e5e5e5; }

/* ===== Two Column Layout ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 768px) { .two-col { grid-template-columns: 1fr; } }
.img-rounded { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.img-rounded img { width: 100%; height: 320px; object-fit: cover; }

/* ===== CTA Banner ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 5rem 1rem; text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0; opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { margin-bottom: 1rem; }
.cta-banner p { max-width: 600px; margin: 0 auto 2rem; opacity: 0.9; font-size: 1.1rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer { background: #111; color: #9ca3af; padding: 3rem 1rem 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h4 { color: #fff; margin-bottom: 1rem; font-size: 1rem; }
.footer a { display: block; padding: 0.25rem 0; font-size: 0.9rem; transition: color 0.2s; }
.footer a:hover { color: var(--primary); }
.footer-logo { margin-bottom: 1rem; }
.footer-logo img { height: 40px; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social a { padding: 0; display: flex; }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom { margin-top: 2rem; padding: 1rem 0; border-top: 1px solid #1f2937; text-align: center; font-size: 0.85rem; color: #6b7280; }

/* ===== Contact Form ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.375rem; }
.form-input, .form-textarea {
  width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.95rem; background: var(--bg);
  color: var(--fg); transition: border-color 0.2s; font-family: inherit;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(139,69,103,0.1); }
.form-textarea { min-height: 120px; resize: vertical; }

/* ===== Floating Contact Widget ===== */
.floating-widget {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
}
.floating-btn {
  width: 56px; height: 56px; border-radius: 50%; background: var(--primary);
  color: #fff; border: none; cursor: pointer; display: flex; align-items: center;
  justify-content: center; box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}
.floating-btn:hover { transform: scale(1.1); box-shadow: var(--shadow-xl); }
.floating-btn svg { width: 24px; height: 24px; }

/* ===== Scroll Animations ===== */
.scroll-animate {
  opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-animate.visible { opacity: 1; transform: translateY(0); }

/* ===== Competitive Edge circles ===== */
.edge-circle {
  width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--primary);
  background: var(--card); display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; box-shadow: var(--shadow);
}
.edge-circle svg { width: 32px; height: 32px; color: var(--primary); }
