/* ============================================================
   MotiveLab - Engineering Services Stylesheet
   Colors: Navy #0B192C, Steel #1E3A5F, Cyan #00B4D8,
           Light #F0F4F8, Dark #0A0F1E
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1A1A2E;
  background: #F0F4F8;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.3; font-weight: 600; color: #0B192C; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p { margin-bottom: 1rem; }
a { color: #00B4D8; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0B192C; }
img { max-width: 100%; height: auto; display: block; }

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

/* --- Header --- */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 25, 44, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
}

.logo { font-size: 1.3rem; font-weight: 700; color: #fff; letter-spacing: -0.5px; }
.logo span { color: #00B4D8; }

.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a { color: rgba(255,255,255,0.7); font-size: 0.9rem; font-weight: 500; position: relative; padding-bottom: 4px; transition: color 0.2s; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: #00B4D8; transition: width 0.3s; }
.nav-links a:hover::after { width: 100%; }
.nav-links a:hover { color: #fff; }

.nav-links .btn-portal {
  background: #00B4D8;
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
}
.nav-links .btn-portal::after { display: none; }
.nav-links .btn-portal:hover { background: #0098b6; transform: translateY(-1px); }

.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.menu-toggle span { width: 24px; height: 2px; background: #fff; transition: 0.3s; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 70px; left: 0; right: 0;
    background: rgba(11, 25, 44, 0.98); backdrop-filter: blur(12px);
    flex-direction: column; padding: 24px; gap: 20px;
    transform: translateY(-120%); opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; }
}

/* --- Hero --- */
.hero {
  padding: 120px 0 100px;
  background: linear-gradient(135deg, #0B192C 0%, #1E3A5F 50%, #0A1628 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  background:
    radial-gradient(2px 2px at 20% 30%, rgba(0,180,216,0.3), transparent),
    radial-gradient(2px 2px at 40% 70%, rgba(0,180,216,0.2), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(0,180,216,0.3), transparent),
    radial-gradient(1px 1px at 80% 80%, rgba(0,180,216,0.2), transparent);
  pointer-events: none;
}
.hero h1 { color: #fff; margin-bottom: 16px; }
.hero p { font-size: 1.1rem; opacity: 0.85; max-width: 640px; margin: 0 auto 36px; }

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 14px 36px; border-radius: 8px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  transition: all 0.3s; border: none; text-align: center;
}

.btn-primary { background: #00B4D8; color: #fff; }
.btn-primary:hover { background: #0098b6; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,180,216,0.3); }

.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.3); }
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; transform: translateY(-2px); }

.btn-dark { background: #0B192C; color: #fff; }
.btn-dark:hover { background: #1E3A5F; transform: translateY(-2px); }

/* --- Sections --- */
section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: #666; max-width: 540px; margin: 0 auto; font-size: 0.95rem; }

/* --- Why MotiveLab (Cost Advantage) --- */
.why-section {
  background: #fff;
  padding: 80px 0;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}
.why-card {
  background: #F0F4F8;
  border-radius: 16px;
  padding: 36px 28px;
  border: 1px solid #e8ecf0;
  transition: transform 0.3s, box-shadow 0.3s;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}
.why-card .why-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}
.why-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #0B192C;
}
.why-card p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 12px;
  line-height: 1.6;
}
.why-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.why-card ul li {
  font-size: 0.85rem;
  color: #444;
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}
.why-card ul li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: #00B4D8;
  font-weight: 700;
}

/* Cost Comparison Table */
.cost-comparison {
  max-width: 800px;
  margin: 48px auto 0;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e8ecf0;
  overflow: hidden;
}
.cost-comparison table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.cost-comparison th {
  background: #0B192C;
  color: #fff;
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
}
.cost-comparison td {
  padding: 14px 20px;
  border-bottom: 1px solid #e8ecf0;
  color: #444;
}
.cost-comparison tr:last-child td {
  border-bottom: none;
}
.cost-comparison .highlight-cost {
  color: #00B4D8;
  font-weight: 700;
}
.cost-comparison .savings-badge {
  display: inline-block;
  background: #E3F2FD;
  color: #1565C0;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 12px;
}
@media (max-width: 768px) {
  .why-grid { grid-template-columns: 1fr; }
  .cost-comparison { font-size: 0.8rem; }
  .cost-comparison th, .cost-comparison td { padding: 10px 12px; }
}

/* QR image on contact page */
.qr-image-wrapper {
  width: 200px;
  height: 200px;
  margin: 20px auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8ecf0;
}
.qr-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- Service Cards --- */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  background: #fff; border-radius: 16px; padding: 40px 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e8ecf0;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
.service-icon { font-size: 2.2rem; margin-bottom: 16px; }
.service-card h3 { margin-bottom: 12px; }
.service-card p { font-size: 0.9rem; color: #555; margin-bottom: 16px; }
.service-card .tech-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.service-card .tech-tag {
  padding: 4px 10px; border-radius: 4px; font-size: 0.75rem;
  background: #E3F2FD; color: #1565C0; font-weight: 500;
}

@media (max-width: 768px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* --- Stats / Numbers --- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item h3 { font-size: 2rem; color: #00B4D8; margin-bottom: 4px; }
.stat-item p { font-size: 0.85rem; color: #888; margin: 0; }

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

/* --- Process Steps --- */
.process-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.process-step { text-align: center; position: relative; }
.process-step .step-number {
  width: 44px; height: 44px; border-radius: 50%;
  background: #00B4D8; color: #fff; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.process-step h4 { font-size: 0.95rem; margin-bottom: 6px; }
.process-step p { font-size: 0.85rem; color: #777; margin: 0; }

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

/* --- Tech Expertise --- */
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.tech-item {
  background: #fff; border: 1px solid #e8ecf0; border-radius: 10px;
  padding: 20px 16px; text-align: center; transition: border-color 0.2s;
}
.tech-item:hover { border-color: #00B4D8; }
.tech-item .tech-icon { font-size: 1.6rem; margin-bottom: 8px; }
.tech-item h4 { font-size: 0.85rem; color: #333; margin: 0; }

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, #0B192C, #1E3A5F); color: #fff;
  text-align: center; padding: 64px 24px; border-radius: 16px;
  max-width: 800px; margin: 0 auto;
}
.cta-banner h2 { color: #fff; margin-bottom: 12px; }
.cta-banner p { opacity: 0.8; margin-bottom: 28px; }

/* --- Footer --- */
footer {
  background: #0B192C; color: rgba(255,255,255,0.5); padding: 60px 0 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand h3 { color: #fff; font-size: 1.1rem; margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; }
footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 16px; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 8px; }
footer ul a { color: rgba(255,255,255,0.5); font-size: 0.85rem; }
footer ul a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); margin-top: 40px; padding-top: 24px; text-align: center; font-size: 0.8rem; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* --- Page Header (inner) --- */
.page-header {
  background: linear-gradient(135deg, #0B192C, #1E3A5F);
  color: #fff; padding: 60px 0 48px; text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header p { opacity: 0.8; max-width: 600px; margin: 0 auto; font-size: 1rem; }

/* --- Service Detail Page --- */
.service-detail { max-width: 800px; margin: 0 auto; }
.service-detail h2 { margin-top: 40px; margin-bottom: 16px; }
.service-detail h3 { margin-top: 28px; margin-bottom: 10px; }
.service-detail ul, .service-detail ol { margin-bottom: 1rem; padding-left: 20px; }
.service-detail li { margin-bottom: 8px; font-size: 0.95rem; color: #444; }
.service-detail .highlight-box {
  background: #E3F2FD; border-left: 4px solid #00B4D8;
  padding: 20px 24px; border-radius: 0 8px 8px 0; margin: 24px 0;
}
.service-detail .highlight-box p { margin: 0; color: #1565C0; font-weight: 500; }

/* --- Contact Form --- */
.contact-form { max-width: 600px; margin: 40px auto 0; background: #fff; padding: 40px; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 500; font-size: 0.9rem; margin-bottom: 6px; color: #1A1A2E; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s; background: #F0F4F8;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #00B4D8; box-shadow: 0 0 0 3px rgba(0,180,216,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group .btn { width: 100%; }

.form-success { display: none; text-align: center; padding: 40px; }
.form-success.show { display: block; }
.form-success h3 { margin-bottom: 8px; }
.form-success p { color: #666; }

/* --- WeChat Contact --- */
.wechat-card {
  background: #fff; border-radius: 16px; padding: 40px;
  text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  max-width: 400px; margin: 0 auto;
}
.wechat-card .qr-placeholder {
  width: 180px; height: 180px; margin: 20px auto;
  background: #E3F2FD; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; color: #00B4D8; font-size: 3rem;
}
.wechat-card p { color: #666; font-size: 0.9rem; }

/* --- About Page --- */
.about-content { max-width: 700px; margin: 0 auto; }
.about-content h3 { margin-top: 32px; margin-bottom: 12px; }
.about-content p { font-size: 1.02rem; color: #444; }

/* --- Utility --- */
.text-center { text-align: center; }
.mt-48 { margin-top: 48px; }
.mb-48 { margin-bottom: 48px; }
