/* ============================================
   ECM Development — styles.css
   ============================================ */

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

:root {
  --bg: #080c14;
  --bg-alt: #0b1120;
  --bg-card: #0f1523;
  --bg-card-hover: #141c2e;
  --border: rgba(96, 165, 250, 0.1);
  --border-strong: rgba(96, 165, 250, 0.22);

  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37, 99, 235, 0.2);
  --accent-subtle: rgba(37, 99, 235, 0.08);
  --accent-light: #60a5fa;

  --text: #e8edf5;
  --text-secondary: #8b9ab5;
  --text-muted: #5a6a85;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-blue: 0 4px 24px rgba(37, 99, 235, 0.18);

  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-dark {
  background: var(--bg-alt);
}

/* ============================================
   Typography helpers
   ============================================ */

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 52px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.arrow {
  display: inline-block;
  transition: transform 0.2s;
}
.btn:hover .arrow {
  transform: translateX(4px);
}

/* ============================================
   Navigation
   ============================================ */

.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(8, 12, 20, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 6px;
}

.logo-mark {
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  padding: 6px 10px;
  border-radius: 6px;
}

.logo-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  margin-left: 4px;
}
.nav-cta:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  padding: calc(var(--nav-height) + 80px) 0 100px;
  overflow: hidden;
  background: var(--bg);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(96, 165, 250, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(96, 165, 250, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(110px);
  opacity: 0.55;
}
.hero-glow-left {
  top: -150px;
  left: -220px;
  background: rgba(37, 99, 235, 0.16);
}
.hero-glow-right {
  bottom: -150px;
  right: -220px;
  background: rgba(99, 147, 255, 0.1);
}

.hero-bg-logo {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 560px;
  height: auto;
  opacity: 0.055;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  filter: blur(0.5px);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-subtle);
  border: 1px solid rgba(37, 99, 235, 0.28);
  color: var(--accent-light);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.12;
  color: var(--text);
  margin-bottom: 24px;
  letter-spacing: -0.025em;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 640px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 21, 35, 0.6);
  width: fit-content;
  overflow: hidden;
}

.stat {
  padding: 18px 28px;
}
.stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ============================================
   Services
   ============================================ */

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

.services-preview-wrap {
  margin-bottom: 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.services-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: cover;
  object-position: center top;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
}
.service-card.featured {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.07) 0%, var(--bg-card) 60%);
}
.service-card.featured:hover {
  border-color: rgba(37, 99, 235, 0.5);
}

.featured-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--accent-subtle);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.service-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================
   Why ECM
   ============================================ */

.why-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: start;
}

.why-left {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}
.why-left .section-sub {
  margin-bottom: 32px;
}

.why-right {
  display: flex;
  flex-direction: column;
}

.why-item {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.why-item:first-child {
  border-top: 1px solid var(--border);
}

.why-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent-subtle);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  margin-top: 2px;
}

.why-item h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.why-item p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   Process
   ============================================ */

.process-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  margin-top: 16px;
}

.process-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.process-step:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.3);
}

.step-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.45;
  line-height: 1;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.process-step:hover .step-number {
  opacity: 0.8;
}

.step-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--accent-subtle);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius-sm);
  color: var(--accent-light);
  margin: 0 auto 16px;
}

.process-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.process-step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.process-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: var(--accent);
  opacity: 0.4;
  padding: 0 10px;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
  position: relative;
  padding: 108px 0;
  background: linear-gradient(140deg, #0d1a3e 0%, #0b1327 45%, #080c14 100%);
  overflow: hidden;
  text-align: center;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 640px;
  height: 320px;
  background: radial-gradient(ellipse, rgba(37, 99, 235, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}
.cta-content h2 {
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.cta-content p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

/* ============================================
   Contact
   ============================================ */

.contact-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 12px 16px;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  outline: none;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.04);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9ab5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.form-group select option {
  background: var(--bg-card);
  color: var(--text);
}

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

/* Contact sidebar */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.contact-info-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--text-secondary);
}
.contact-detail:last-child { margin-bottom: 0; }
.contact-detail svg { color: var(--accent-light); flex-shrink: 0; }
.contact-detail a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.9rem;
}
.contact-detail a:hover { color: var(--accent-light); }

.highlight-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.03) 100%);
  border-color: rgba(37, 99, 235, 0.22);
}
.highlight-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-light);
  margin-bottom: 8px;
}
.highlight-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.services-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.services-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.services-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.services-list li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  background: #050709;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-top: 60px;
  padding-bottom: 48px;
}

.footer-brand .logo { margin-bottom: 0; }

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 14px;
  margin-bottom: 6px;
}

.footer-domain {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-domain:hover { color: var(--accent-light); }

.footer-email {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-top: 6px;
  transition: color 0.2s;
}
.footer-email:hover { color: var(--accent-light); }

.footer-links {
  display: flex;
  gap: 56px;
  justify-content: flex-end;
}

.footer-col h5 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text-secondary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ============================================
   Responsive — Tablet
   ============================================ */

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

  .why-layout {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .why-left {
    position: static;
  }

  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .process-arrow {
    display: none;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

/* ============================================
   Responsive — Mobile
   ============================================ */

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

  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(8, 12, 20, 0.98);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px 20px;
    gap: 2px;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-links a {
    display: block;
    padding: 10px 12px;
  }
  .nav-cta {
    margin-left: 0 !important;
    margin-top: 8px;
    text-align: center;
  }

  /* Hero mobile */
  .hero-bg-logo {
    width: 280px;
    right: -40px;
    opacity: 0.04;
  }

  .hero-stats {
    flex-direction: column;
    width: 100%;
  }
  .stat { padding: 14px 24px; }
  .stat-divider {
    width: 100%;
    height: 1px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .form-row {
    grid-template-columns: 1fr;
  }
  .contact-form {
    padding: 24px 20px;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 48px;
    padding-bottom: 40px;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 36px;
  }
}

@media (max-width: 480px) {
  .btn-lg {
    padding: 14px 24px;
    font-size: 0.9375rem;
  }
  .contact-form {
    padding: 20px 16px;
  }
}
