/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* =========================================
   CSS VARIABLES
   ========================================= */
:root {
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --accent: #42B9BE;
  --accent-light: #EBF8F9;
  --accent-dark: #35989d;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --transition: 200ms ease;
  --nav-height: 64px;
}

/* =========================================
   LAYOUT
   ========================================= */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 660px;
}

/* =========================================
   NAVIGATION
   ========================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}

.nav.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  flex-shrink: 0;
}

.nav-logo:hover {
  color: var(--accent);
  transition: color var(--transition);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  transition: color var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--gray-900);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  padding: 4px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 1.5px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--transition);
  width: 100%;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 250ms ease, opacity 250ms ease;
}

.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-link {
  display: block;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-700);
  transition: background var(--transition), color var(--transition);
}

.mobile-link:hover {
  background: var(--gray-50);
  color: var(--gray-900);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border-color: var(--gray-200);
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
}

/* =========================================
   SECTIONS
   ========================================= */
.section {
  padding: 96px 0;
}

.section--gray {
  background: var(--gray-50);
}

.section-header {
  margin-bottom: 56px;
}

.section-header--center {
  text-align: center;
}

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

.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--gray-900);
}

.section-desc {
  margin-top: 16px;
  font-size: 16px;
  color: var(--gray-500);
  max-width: 500px;
}

.section-header--center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 96px;
  padding-left: 24px;
  padding-right: 24px;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.13;
  color: var(--gray-900);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 17px;
  font-weight: 400;
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sys-diagram {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.sys-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.sys-node {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-500);
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}

.sys-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.sys-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.sys-block {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.sys-block--accent {
  background: var(--accent-light);
  border-color: rgba(66, 185, 190, 0.25);
}

.sys-block-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.sys-block-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sys-tag {
  font-size: 10px;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 2px 7px;
}

.sys-tag--light {
  color: var(--accent-dark);
  background: rgba(66,185,190,0.08);
  border-color: rgba(66,185,190,0.2);
}

/* =========================================
   ABOUT
   ========================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  font-size: 16px;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.about-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.about-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.about-card-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
}

/* =========================================
   EXPERTISE
   ========================================= */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.expertise-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.expertise-card:hover {
  border-color: var(--gray-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.expertise-icon {
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
}

.expertise-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  line-height: 1.3;
}

.expertise-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.65;
}

/* =========================================
   PROJECTS
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--gray-400);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.project-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.project-image-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-image--1 { background: #F0F9FA; }
.project-image--2 { background: #F5F3FF; }
.project-image--3 { background: #FFF7ED; }

/* Project visual placeholders */
.proj-vis {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
}

.proj-bar {
  width: 20px;
  background: rgba(66,185,190,0.35);
  border-radius: 3px 3px 0 0;
  transition: background var(--transition);
}

.project-card:hover .proj-bar {
  background: rgba(66,185,190,0.55);
}

.proj-flow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proj-flow-node {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 5px;
  background: var(--white);
  border: 1px solid #E2DCFF;
  color: #6B5CF6;
}

.proj-flow-node--accent {
  background: #6B5CF6;
  color: var(--white);
  border-color: #6B5CF6;
}

.proj-flow-arrow {
  font-size: 14px;
  color: #C4B5FD;
}

.proj-dash {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 80%;
}

.proj-dash-row {
  display: flex;
  gap: 16px;
}

.proj-kpi {
  flex: 1;
  background: var(--white);
  border: 1px solid #FDE9D0;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
}

.proj-kpi-val {
  font-size: 16px;
  font-weight: 700;
  color: #EA8C00;
  line-height: 1;
  margin-bottom: 2px;
}

.proj-kpi-lbl {
  font-size: 9px;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.proj-dash-bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.proj-dash-bar {
  height: 6px;
  background: rgba(234,140,0,0.25);
  border-radius: 3px;
}

.project-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-meta {
  display: flex;
  align-items: center;
}

.project-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
}

.project-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.project-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.7;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 3px 8px;
}

/* =========================================
   CURRENT FOCUS
   ========================================= */
.focus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.focus-item {
  display: flex;
  gap: 24px;
  padding: 32px;
  border-bottom: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
  transition: background var(--transition);
}

.focus-item:hover {
  background: var(--gray-50);
}

/* Remove right border from even items (second column) */
.focus-item:nth-child(2n) {
  border-right: none;
}

/* Remove bottom border from last two items */
.focus-item:nth-last-child(-n+2) {
  border-bottom: none;
}

/* Handle odd last item (5th in 2-col grid spans visually) */
.focus-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  border-right: none;
}

.focus-number {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  padding-top: 2px;
  font-variant-numeric: tabular-nums;
}

.focus-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.focus-desc {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.7;
}

/* =========================================
   PROCESS
   ========================================= */
.process-steps {
  display: flex;
  flex-direction: column;
}

.process-step {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.process-step:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.process-connector {
  width: 1px;
  height: 20px;
  background: var(--gray-200);
  margin-left: 47px;
}

.process-step-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-200);
  letter-spacing: -0.04em;
  line-height: 1;
  flex-shrink: 0;
  min-width: 32px;
  font-variant-numeric: tabular-nums;
  transition: color var(--transition);
}

.process-step:hover .process-step-num {
  color: var(--accent);
}

.process-step-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.process-step-desc {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.75;
}

/* =========================================
   CONTACT FORM
   ========================================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 48px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(66,185,190,0.1);
}

.form-input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.08);
}

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

.form-error {
  font-size: 12px;
  color: #EF4444;
  min-height: 16px;
  display: block;
}

.form-status {
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  min-height: 0;
  transition: all var(--transition);
}

.form-status.success {
  background: #ECFDF5;
  color: #065F46;
  border: 1px solid #6EE7B7;
  padding: 14px 16px;
}

.form-status.error {
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
  padding: 14px 16px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  border-top: 1px solid var(--gray-200);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-900);
}

.footer-copy {
  font-size: 13px;
  color: var(--gray-400);
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social-link {
  color: var(--gray-400);
  display: flex;
  transition: color var(--transition);
}

.footer-social-link:hover {
  color: var(--gray-700);
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.fade-target {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Stagger children */
.fade-target:nth-child(1) { transition-delay: 0ms; }
.fade-target:nth-child(2) { transition-delay: 60ms; }
.fade-target:nth-child(3) { transition-delay: 120ms; }
.fade-target:nth-child(4) { transition-delay: 180ms; }
.fade-target:nth-child(5) { transition-delay: 240ms; }
.fade-target:nth-child(6) { transition-delay: 300ms; }
.fade-target:nth-child(7) { transition-delay: 360ms; }
.fade-target:nth-child(8) { transition-delay: 420ms; }

/* =========================================
   RESPONSIVE — TABLET (≤ 960px)
   ========================================= */
@media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    display: none;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================
   RESPONSIVE — MOBILE (≤ 640px)
   ========================================= */
@media (max-width: 640px) {
  :root {
    --nav-height: 58px;
  }

  .section {
    padding: 64px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 64px;
    min-height: auto;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .expertise-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .focus-grid {
    grid-template-columns: 1fr;
  }

  .focus-item:nth-child(2n) {
    border-right: 1px solid var(--gray-200);
  }

  .focus-item:nth-last-child(-n+2) {
    border-bottom: 1px solid var(--gray-200);
  }

  .focus-item:last-child {
    border-bottom: none;
    border-right: 1px solid var(--gray-200);
  }

  .focus-item:last-child:nth-child(odd) {
    grid-column: auto;
    border-right: 1px solid var(--gray-200);
  }

  .process-step {
    flex-direction: column;
    gap: 16px;
    padding: 24px;
  }

  .process-connector {
    margin-left: 24px;
  }

  .process-step-num {
    font-size: 22px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .sys-diagram {
    display: none;
  }
}

/* =========================================
   RESPONSIVE — SMALL MOBILE (≤ 380px)
   ========================================= */
@media (max-width: 380px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-title {
    font-size: 24px;
  }

  .hero-title {
    font-size: 24px;
  }

  .project-body {
    padding: 18px;
  }

  .focus-item {
    padding: 24px 18px;
  }
}
