:root {
  --build: #4f46e5; --build-light: #818cf8; --automate: #0d9488; --automate-light: #2dd4bf;
  --grow: #ea580c; --grow-light: #fb923c; --text: #0f172a; --text-secondary: #475569;
  --bg: #ffffff; --bg-section: #f8fafc; --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); transition: all 0.3s ease;
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 1rem 2rem;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem; }
.logo-mark {
  width: 32px; height: 32px; background: var(--text); border-radius: 8px;
  display: grid; place-items: center; color: white; font-size: 0.75rem; font-weight: 900;
}
nav { display: flex; gap: 2rem; align-items: center; }
nav a { text-decoration: none; color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; transition: color 0.2s; position: relative; }
nav a:hover { color: var(--text); }
nav a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--build); transition: width 0.3s; }
nav a:hover::after { width: 100%; }
.cta-btn {
  background: var(--text); color: white; padding: 0.6rem 1.2rem; border-radius: 6px;
  text-decoration: none; font-weight: 600; font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s; border: none; cursor: pointer; display: inline-block;
  touch-action: manipulation;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Innovative Menu Trigger */
.menu-trigger {
  display: none; position: relative; width: 48px; height: 48px; border: none;
  background: transparent; cursor: pointer; z-index: 1001; border-radius: 50%;
  transition: background 0.3s; touch-action: manipulation;
}
.menu-trigger:hover { background: rgba(79,70,229,0.08); }
.menu-trigger .mt-dot {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--text); transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.menu-trigger .mt-dot:nth-child(1) { top: 16px; left: 21px; }
.menu-trigger .mt-dot:nth-child(2) { top: 21px; left: 21px; transition-delay: 0.05s; }
.menu-trigger .mt-dot:nth-child(3) { top: 26px; left: 21px; transition-delay: 0.1s; }
.menu-trigger.open .mt-dot:nth-child(1) {
  top: 21px; left: 16px; width: 16px; height: 2px; border-radius: 1px;
  transform: rotate(45deg); background: var(--build);
}
.menu-trigger.open .mt-dot:nth-child(2) { opacity: 0; transform: scale(0); }
.menu-trigger.open .mt-dot:nth-child(3) {
  top: 21px; left: 16px; width: 16px; height: 2px; border-radius: 1px;
  transform: rotate(-45deg); background: var(--build);
}

/* Improved Mobile Nav Transition */
.mobile-nav {
  display: flex; position: fixed; inset: 0; background: rgba(255,255,255,0.98);
  z-index: 999; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  opacity: 0; pointer-events: none; transform: translateY(-20px); 
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.mobile-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.mobile-nav a {
  font-size: 1.5rem; font-weight: 700; color: var(--text); text-decoration: none;
  opacity: 0; transform: translateY(20px); transition: all 0.4s ease;
  min-height: 44px; display: flex; align-items: center; justify-content: center;
}
.mobile-nav.open a { opacity: 1; transform: translateY(0); }
.mobile-nav.open a:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.open a:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.open a:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.open a:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.open a:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav.open a:nth-child(6) { transition-delay: 0.35s; }

section { position: relative; }
.section-label {
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.2em;
  margin-bottom: 1rem; display: inline-block; padding: 0.25rem 0.75rem; border-radius: 4px;
}
.section-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 1.5rem; }
.section-desc { font-size: 1.125rem; color: var(--text-secondary); max-width: 600px; margin-bottom: 2rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem; }

#hero {
  min-height: 100vh; min-height: 100dvh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding-top: 80px; position: relative; overflow: hidden; background: var(--bg);
}
.hero-content { text-align: center; max-width: 900px; position: relative; z-index: 2; pointer-events: none; padding: 0 2rem; }
.hero-content * { pointer-events: auto; }
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 1.5rem; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2.5rem; }
.hero-cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-primary, .btn-secondary {
  padding: 1rem 2rem; border-radius: 8px; text-decoration: none; font-weight: 600; 
  transition: all 0.3s; display: inline-block; touch-action: manipulation; text-align: center;
}
.btn-primary { background: var(--text); color: white; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-secondary { background: white; color: var(--text); border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--text); transform: translateY(-3px); }

#hero-viz { position: absolute; inset: 0; z-index: 1; touch-action: none; user-select: none; cursor: crosshair; }
#hero-viz canvas { width: 100%; height: 100%; display: block; }
.hero-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  font-size: 0.8rem; color: var(--text-secondary); background: rgba(255,255,255,0.9);
  padding: 0.5rem 1rem; border-radius: 20px; border: 1px solid var(--border);
  pointer-events: none; opacity: 0; transition: opacity 1s; z-index: 3; white-space: nowrap;
}
.hero-hint.visible { opacity: 1; }

.category-header { text-align: center; padding: 8rem 2rem 4rem; position: relative; overflow: hidden; }
.category-header.build { background: linear-gradient(180deg, var(--bg) 0%, rgba(79,70,229,0.05) 100%); }
.category-header.automate { background: linear-gradient(180deg, var(--bg) 0%, rgba(13,148,136,0.05) 100%); }
.category-header.grow { background: linear-gradient(180deg, var(--bg) 0%, rgba(234,88,12,0.05) 100%); }
.category-title { font-size: clamp(4rem, 12vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: -0.05em; opacity: 0.1; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; }
.category-header h2 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; position: relative; z-index: 1; }
.category-header p { max-width: 600px; margin: 1rem auto 0; color: var(--text-secondary); font-size: 1.125rem; }

.service-section { background: var(--bg); }
.service-section:nth-child(even) { background: var(--bg-section); }
.service-inner { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.service-visual { position: relative; height: 400px; border-radius: 16px; background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.service-visual svg, .service-visual canvas { width: 100%; height: 100%; display: block; }
.service-content h3 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.service-content p { color: var(--text-secondary); margin-bottom: 1.5rem; font-size: 1.05rem; }
.build .section-label, .build h3 { color: var(--build); }
.build .section-label { background: rgba(79,70,229,0.1); }
.automate .section-label, .automate h3 { color: var(--automate); }
.automate .section-label { background: rgba(13,148,136,0.1); }
.grow .section-label, .grow h3 { color: var(--grow); }
.grow .section-label { background: rgba(234,88,12,0.1); }

#combined { background: var(--bg-section); }
.combined-viz { max-width: 800px; margin: 3rem auto 0; height: 500px; position: relative; background: white; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow: hidden; }

#projects { background: var(--bg); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-top: 3rem; }
.project-card { background: white; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; transition: all 0.3s; cursor: pointer; touch-action: manipulation; }
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.project-preview { height: 200px; background: var(--bg-section); position: relative; overflow: hidden; }
.project-preview svg { width: 100%; height: 100%; transition: transform 0.5s ease; }
.project-card:hover .project-preview svg { transform: scale(1.05); }
.project-info { padding: 1.5rem; }
.project-info h4 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.project-info p { color: var(--text-secondary); font-size: 0.9rem; }
.project-tag { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; margin-top: 1rem; }
.tag-build { background: rgba(79,70,229,0.1); color: var(--build); }
.tag-automate { background: rgba(13,148,136,0.1); color: var(--automate); }
.tag-grow { background: rgba(234,88,12,0.1); color: var(--grow); }

#why { background: var(--bg); }
.why-viz { max-width: 600px; margin: 3rem auto 0; height: 400px; position: relative; }

#process { background: var(--bg-section); }
.process-timeline { max-width: 1000px; margin: 4rem auto 0; position: relative; }
.process-line { position: absolute; top: 40px; left: 0; right: 0; height: 4px; background: var(--border); border-radius: 2px; z-index: 0; }
.process-line-fill { position: absolute; top: 40px; left: 0; height: 4px; background: linear-gradient(90deg, var(--build), var(--automate), var(--grow)); border-radius: 2px; z-index: 1; width: 0%; transition: width 1.5s ease; }
.process-steps { display: flex; justify-content: space-between; position: relative; z-index: 2; }
.process-step { text-align: center; width: 18%; }
.process-step-circle { width: 80px; height: 80px; border-radius: 50%; background: white; border: 3px solid var(--border); margin: 0 auto 1rem; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; transition: all 0.5s ease; position: relative; }
.process-step.active .process-step-circle { border-color: var(--build); background: var(--build); color: white; transform: scale(1.1); box-shadow: 0 0 0 8px rgba(79,70,229,0.1); }
.process-step h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.process-step p { font-size: 0.85rem; color: var(--text-secondary); }

#cta { background: var(--text); color: white; text-align: center; }
#cta .container { padding: 8rem 2rem; }
#cta h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; margin-bottom: 1.5rem; }
#cta p { font-size: 1.25rem; opacity: 0.8; max-width: 600px; margin: 0 auto 2.5rem; }
#cta .btn-primary { background: white; color: var(--text); font-size: 1.1rem; padding: 1.2rem 2.5rem; }

footer { background: var(--bg-section); border-top: 1px solid var(--border); padding: 4rem 2rem 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
.footer-brand p { color: var(--text-secondary); margin-top: 1rem; font-size: 0.9rem; }
.footer-col h5 { font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--text-secondary); text-decoration: none; margin-bottom: 0.5rem; font-size: 0.9rem; transition: color 0.2s; min-height: 32px; line-height: 32px; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { max-width: 1200px; margin: 3rem auto 0; padding-top: 2rem; border-top: 1px solid var(--border); text-align: center; color: var(--text-secondary); font-size: 0.85rem; }

/* =========================================
   MOBILE RESPONSIVE ENHANCEMENTS
   ========================================= */
@media (max-width: 768px) {
  /* Header & Nav */
  .header-inner { padding: 0.75rem 1rem; }
  .logo { font-size: 1.25rem; }
  .logo-mark { width: 28px; height: 28px; font-size: 0.7rem; }
  nav { display: none; }
  .menu-trigger { display: block; }
  
  /* Mobile Nav Menu */
  .mobile-nav a { font-size: 1.25rem; padding: 0.5rem 0; min-height: 48px; }
  .mobile-nav .cta-btn { margin-top: 1rem; width: 80%; max-width: 280px; text-align: center; padding: 1rem; }

  /* Hero Section */
  #hero { padding-top: 60px; }
  .hero-content { padding: 0 1.5rem; }
  .hero-title { font-size: clamp(2rem, 8vw, 3rem) !important; line-height: 1.1; }
  .hero-subtitle { font-size: 1rem; padding: 0 0.5rem; margin-bottom: 2rem; }
  .hero-cta-group { flex-direction: column; width: 100%; padding: 0 1rem; gap: 0.75rem; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 320px; padding: 1rem; font-size: 1rem; }
  .hero-hint { display: none; }
  #hero-viz { opacity: 0.25; } /* Dimmed further on mobile so text is readable */

  /* Category Headers */
  .category-header { padding: 5rem 1rem 3rem; }
  .category-title { font-size: clamp(3rem, 15vw, 5rem); }
  .category-header h2 { font-size: 1.75rem; padding: 0 1rem; }
  .category-header p { font-size: 1rem; padding: 0 1rem; }

  /* Service Sections */
  .service-inner { grid-template-columns: 1fr; gap: 2rem; padding: 4rem 1rem; }
  .service-visual { height: 280px; order: -1; border-radius: 12px; }
  .service-content { text-align: center; padding: 0 0.5rem; }
  .service-content h3 { font-size: 1.75rem; }
  .service-content p { font-size: 1rem; }
  .service-content .cta-btn { width: 100%; max-width: 280px; text-align: center; padding: 0.875rem; }

  /* Combined Section */
  .combined-viz { height: 350px; margin: 2rem 1rem 0; border-radius: 12px; }
  #combined .container { padding: 4rem 1rem; }

  /* Projects */
  .projects-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .project-card { border-radius: 12px; }
  .project-preview { height: 180px; }

  /* Why Section */
  .why-viz { height: 300px; margin: 2rem auto 0; }
  #why .container { padding: 4rem 1rem; }

  /* Process Timeline */
  .process-timeline { padding: 0 1rem; }
  .process-steps { flex-direction: column; gap: 2.5rem; }
  .process-line, .process-line-fill { display: none; }
  .process-step { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .process-step-circle { width: 64px; height: 64px; font-size: 1.25rem; }
  .process-step h4 { font-size: 1.1rem; margin-top: 0.5rem; }
  .process-step p { font-size: 0.9rem; max-width: 280px; }

  /* CTA Section */
  #cta .container { padding: 5rem 1rem; }
  #cta h2 { font-size: 2rem; }
  #cta p { font-size: 1rem; padding: 0 1rem; }
  #cta .btn-primary { width: 100%; max-width: 320px; }

  /* Footer */
  footer { padding: 3rem 1rem 1.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-brand p { max-width: 320px; }
  .footer-col h5 { margin-bottom: 1rem; }
  .footer-col a { padding: 0.35rem 0; min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .footer-bottom { padding-top: 1.5rem; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem !important; }
  .section-title { font-size: 1.75rem; }
  .service-visual { height: 240px; }
  .category-title { font-size: 3rem; }
  .process-step-circle { width: 56px; height: 56px; font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
.animate-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.animate-in.visible { opacity: 1; transform: translateY(0); }
