/* ================================
   NEXAFORGE - Smart Factory Website
   ================================ */

:root {
  --navy: #0F1923;
  --navy-light: #162231;
  --navy-mid: #1a2d3d;
  --green: #10B981;
  --green-dark: #059669;
  --green-glow: rgba(16, 185, 129, 0.15);
  --green-glow2: rgba(16, 185, 129, 0.08);
  --gray: #F3F4F6;
  --gray-dark: #9CA3AF;
  --text: #E2E8F0;
  --text-dim: #94A3B8;
  --text-dark: #1E293B;
  --white: #FFFFFF;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  background: var(--navy);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

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

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

.sp-only { display: none; }
@media (max-width: 768px) { .sp-only { display: inline; } }

/* ---- Sample Banner ---- */
.sample-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--green);
  color: var(--navy);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  letter-spacing: 0.02em;
}
.sample-banner a { color: var(--navy); text-decoration: underline; }

/* ---- Header ---- */
.header {
  position: fixed; top: 37px; left: 0; right: 0; z-index: 1000;
  background: rgba(15, 25, 35, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.header.scrolled {
  background: rgba(15, 25, 35, 0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-en { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 18px; color: var(--white); letter-spacing: 0.05em; }
.logo-jp { font-size: 10px; color: var(--green); font-weight: 500; }

.nav-desktop { display: flex; align-items: center; gap: 32px; }
.nav-desktop a {
  font-size: 13px; font-weight: 500; color: var(--text-dim);
  transition: var(--transition); letter-spacing: 0.02em;
  position: relative;
}
.nav-desktop a:hover { color: var(--green); }
.nav-desktop a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--green); transform: scaleX(0);
  transition: var(--transition); border-radius: 1px;
}
.nav-desktop a:hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--green) !important; color: var(--navy) !important;
  padding: 8px 20px !important; border-radius: 6px; font-weight: 700 !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--green-dark) !important; }

.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  width: 32px; height: 24px; position: relative; z-index: 1001;
}
.hamburger span {
  display: block; width: 100%; height: 2px; background: var(--white);
  position: absolute; left: 0; transition: var(--transition); border-radius: 1px;
}
.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }
.hamburger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* ---- Mobile Nav ---- */
.mobile-nav {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999;
  background: rgba(15, 25, 35, 0.98);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: var(--transition);
}
.mobile-nav.active { opacity: 1; pointer-events: all; }
.mobile-nav nav { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.mobile-nav a {
  font-size: 20px; font-weight: 700; color: var(--white);
  transition: var(--transition); letter-spacing: 0.05em;
}
.mobile-nav a:hover { color: var(--green); }

/* ---- Hero ---- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 160px 0 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(15,25,35,0.92) 0%, rgba(15,25,35,0.7) 50%, rgba(15,25,35,0.85) 100%);
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(rgba(16,185,129,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,185,129,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.hero-badge {
  display: inline-block;
  background: var(--green-glow);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--green);
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 6px 16px; border-radius: 100px;
  margin-bottom: 28px; letter-spacing: 0.1em;
}
.hero-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900; line-height: 1.2;
  margin-bottom: 24px;
}
.hero-line { display: block; color: var(--white); }
.hero-accent { color: var(--green); }
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim); line-height: 1.9;
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; margin-bottom: 60px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: 8px; font-size: 15px; font-weight: 700;
  transition: var(--transition); cursor: pointer; border: none; letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--green); color: var(--navy);
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(16,185,129,0.3); }
.btn-ghost {
  background: transparent; color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-full { width: 100%; }

.hero-stats {
  display: flex; align-items: center; gap: 32px;
  padding: 24px 32px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  width: fit-content;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 32px; font-weight: 800; color: var(--green); line-height: 1.2;
}
.hero-stat-num small { font-size: 18px; }
.hero-stat-label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-scroll {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll span { font-family: 'Inter', sans-serif; font-size: 10px; letter-spacing: 0.2em; color: var(--text-dim); }
.hero-scroll-line {
  width: 1px; height: 40px; background: linear-gradient(to bottom, var(--green), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; } 50% { opacity: 1; }
}

/* ---- Section common ---- */
section { padding: 100px 0; }
.section-label {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600; color: var(--green);
  letter-spacing: 0.2em; margin-bottom: 16px;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900; line-height: 1.3; color: var(--white);
  margin-bottom: 20px;
}
.section-title-center { text-align: center; }
.section-title-center + .section-sub { text-align: center; }
.section-sub {
  font-size: 16px; color: var(--text-dim); line-height: 1.9;
  margin-bottom: 48px;
}

/* ---- About ---- */
.about { background: var(--navy-light); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.about-lead { font-size: 16px; color: var(--text-dim); margin-bottom: 36px; line-height: 2; }
.about-features { display: flex; flex-direction: column; gap: 24px; }
.about-feature {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px; border-radius: var(--radius-sm);
  background: var(--green-glow2);
  border: 1px solid rgba(16,185,129,0.1);
  transition: var(--transition);
}
.about-feature:hover { border-color: rgba(16,185,129,0.3); }
.about-feature svg { width: 28px; height: 28px; flex-shrink: 0; margin-top: 2px; }
.about-feature strong { display: block; font-size: 15px; color: var(--white); margin-bottom: 4px; }
.about-feature span { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

.about-visual { position: relative; border-radius: var(--radius); overflow: hidden; }
.about-visual img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.about-visual-badge {
  position: absolute; bottom: 24px; right: 24px;
  background: var(--green); color: var(--navy);
  padding: 16px 24px; border-radius: var(--radius-sm);
  text-align: center;
}
.about-badge-num { display: block; font-family: 'Inter', sans-serif; font-size: 36px; font-weight: 900; line-height: 1; }
.about-badge-text { font-size: 12px; font-weight: 700; }

/* ---- IoT ---- */
.iot { background: var(--navy); }
.iot-dashboard {
  background: #0a1018;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.iot-diagram { width: 100%; height: auto; display: block; }

/* ---- Services ---- */
.services { background: var(--navy-light); }
.services-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.service-card {
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0; transition: var(--transition);
}
.service-card:hover { border-color: rgba(16,185,129,0.3); transform: translateY(-4px); }
.service-card:hover::before { opacity: 1; }
.service-icon { width: 56px; height: 56px; margin-bottom: 20px; }
.service-icon svg { width: 100%; height: 100%; }
.service-num {
  font-family: 'Inter', sans-serif; font-size: 48px; font-weight: 900;
  color: rgba(16,185,129,0.08); position: absolute; top: 16px; right: 24px;
  line-height: 1;
}
.service-card h3 { font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.service-card p { font-size: 14px; color: var(--text-dim); line-height: 1.8; margin-bottom: 20px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.service-tags li {
  font-size: 11px; color: var(--green); font-weight: 500;
  padding: 4px 12px; border-radius: 100px;
  background: var(--green-glow2); border: 1px solid rgba(16,185,129,0.15);
}

/* ---- Works ---- */
.works { background: var(--navy); }
.works-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.work-card {
  background: var(--navy-light); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: var(--transition);
}
.work-card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.3); }
.work-img { position: relative; overflow: hidden; aspect-ratio: 16/10; }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s ease; }
.work-card:hover .work-img img { transform: scale(1.08); }
.work-overlay {
  position: absolute; top: 12px; left: 12px;
}
.work-cat {
  font-size: 11px; font-weight: 600; color: var(--navy);
  background: var(--green); padding: 4px 12px; border-radius: 4px;
}
.work-info { padding: 24px; }
.work-info h3 { font-size: 17px; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.work-info p { font-size: 13px; color: var(--text-dim); line-height: 1.7; margin-bottom: 16px; }
.work-meta { display: flex; gap: 16px; }
.work-meta span {
  font-size: 11px; color: var(--green); font-weight: 500;
  padding: 4px 10px; background: var(--green-glow2);
  border-radius: 4px; border: 1px solid rgba(16,185,129,0.15);
}

/* ---- Numbers ---- */
.numbers { background: var(--navy-light); position: relative; overflow: hidden; }
.numbers::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(16,185,129,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(16,185,129,0.04) 0%, transparent 50%);
}
.numbers-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  position: relative; z-index: 1;
}
.number-card {
  text-align: center; padding: 40px 24px;
  background: var(--navy); border: 1px solid var(--border);
  border-radius: var(--radius); transition: var(--transition);
}
.number-card:hover { border-color: rgba(16,185,129,0.3); }
.number-value {
  font-family: 'Inter', sans-serif; font-size: 48px; font-weight: 900;
  color: var(--green); line-height: 1.1; margin-bottom: 8px;
}
.number-unit { font-size: 24px; font-weight: 700; }
.number-label { font-size: 16px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.number-desc { font-size: 13px; color: var(--text-dim); }

/* ---- Flow ---- */
.flow { background: var(--navy); }
.flow-steps { max-width: 700px; margin: 0 auto; position: relative; }
.flow-steps::before {
  content: ''; position: absolute; left: 32px; top: 0; bottom: 0;
  width: 2px; background: linear-gradient(to bottom, var(--green), rgba(16,185,129,0.1));
}
.flow-step {
  display: flex; gap: 32px; padding: 32px 0;
  position: relative;
}
.flow-num {
  width: 64px; height: 64px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 800;
  color: var(--green); background: var(--navy);
  border: 2px solid var(--green); border-radius: 50%;
  position: relative; z-index: 1;
}
.flow-content h3 { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.flow-content p { font-size: 14px; color: var(--text-dim); line-height: 1.8; }

/* ---- Company ---- */
.company { background: var(--navy-light); }
.company-table {
  max-width: 800px; margin: 0 auto;
  background: var(--navy); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.company-table table { width: 100%; border-collapse: collapse; }
.company-table tr { border-bottom: 1px solid var(--border); }
.company-table tr:last-child { border-bottom: none; }
.company-table th {
  padding: 18px 24px; font-size: 14px; font-weight: 700;
  color: var(--green); background: var(--green-glow2);
  width: 180px; text-align: left; vertical-align: top;
}
.company-table td { padding: 18px 24px; font-size: 14px; color: var(--text); }

/* ---- Contact ---- */
.contact { background: var(--navy); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: start;
}
.contact-box {
  display: flex; gap: 16px; padding: 24px;
  background: var(--navy-light); border: 1px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 16px;
}
.contact-box-icon { flex-shrink: 0; }
.contact-box-icon svg { width: 24px; height: 24px; }
.contact-box-label { display: block; font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.contact-box-value { display: block; font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 2px; }
.contact-box-note { display: block; font-size: 12px; color: var(--text-dim); }

.contact-form {
  background: var(--navy-light); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 700; color: var(--text);
  margin-bottom: 6px;
}
.required {
  font-size: 11px; color: var(--green); background: var(--green-glow2);
  padding: 2px 6px; border-radius: 3px; margin-left: 4px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 16px; font-size: 14px;
  background: var(--navy); border: 1px solid var(--border);
  border-radius: 6px; color: var(--white);
  font-family: 'Noto Sans JP', sans-serif;
  transition: var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.1);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dim); opacity: 0.5; }
.form-group select { appearance: none; cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ---- Footer ---- */
.footer {
  background: #080e14; border-top: 1px solid var(--border);
  padding: 60px 0 0;
}
.footer-top {
  display: flex; justify-content: space-between; gap: 60px;
  padding-bottom: 40px; border-bottom: 1px solid var(--border);
}
.footer-desc { font-size: 13px; color: var(--text-dim); margin-top: 16px; line-height: 1.8; }
.footer-links { display: flex; gap: 60px; }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 16px; letter-spacing: 0.05em; }
.footer-col a { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 10px; transition: var(--transition); }
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 0; font-size: 12px; color: var(--text-dim);
}
.footer-bottom a { color: var(--green); transition: var(--transition); }
.footer-bottom a:hover { color: var(--green-dark); }

/* ---- Animations ---- */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { order: -1; }
  .works-grid { grid-template-columns: repeat(2, 1fr); }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-desktop { display: none; }

  .hero { padding: 140px 0 60px; min-height: auto; }
  .hero-stats { flex-direction: column; gap: 16px; padding: 20px; width: 100%; }
  .hero-stat-divider { width: 40px; height: 1px; }
  .hero-scroll { display: none; }

  section { padding: 72px 0; }

  .services-grid { grid-template-columns: 1fr; }
  .works-grid { grid-template-columns: 1fr; }
  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .number-value { font-size: 36px; }

  .flow-steps::before { left: 28px; }
  .flow-step { gap: 20px; }
  .flow-num { width: 56px; height: 56px; font-size: 16px; }

  .company-table th { width: 120px; padding: 14px 16px; font-size: 13px; }
  .company-table td { padding: 14px 16px; font-size: 13px; }

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

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-links { gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }

  .iot-dashboard { overflow-x: auto; }
  .iot-diagram { min-width: 700px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 32px; }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .numbers-grid { grid-template-columns: 1fr; }
  .footer-links { flex-direction: column; gap: 24px; }
}

/* ---- Enhanced Hover Effects ---- */
.service-card {
  position: relative;
}
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(16,185,129,0.06), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.service-card:hover::after {
  opacity: 1;
}

.work-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: linear-gradient(180deg, transparent 40%, rgba(16,185,129,0.04) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.work-card:hover::after {
  opacity: 1;
}

/* ---- Pulse animation for IoT section ---- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.iot-dashboard {
  animation: none;
  position: relative;
}
.iot-dashboard::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16,185,129,0.3), transparent 30%, transparent 70%, rgba(16,185,129,0.15));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.iot-dashboard:hover::before {
  opacity: 1;
}

/* ---- Section Dividers ---- */
.about::before {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--green);
  margin: 0 auto 0;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.about { position: relative; }

/* ---- Text selection ---- */
::selection {
  background: rgba(16, 185, 129, 0.3);
  color: var(--white);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--navy);
}
::-webkit-scrollbar-thumb {
  background: var(--navy-mid);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--green);
}

/* ---- Loading skeleton shimmer ---- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---- Glow border for hero stats ---- */
.hero-stats {
  position: relative;
}
.hero-stats::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16,185,129,0.2), transparent 40%, transparent 60%, rgba(16,185,129,0.1));
  z-index: -1;
}

/* ---- Service icon animation ---- */
.service-icon svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.service-card:hover .service-icon svg {
  transform: scale(1.1) rotate(-3deg);
}

/* ---- Flow step enhanced styles ---- */
.flow-step {
  transition: var(--transition);
}
.flow-step:hover .flow-num {
  background: var(--green);
  color: var(--navy);
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}
.flow-num {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Company table row hover ---- */
.company-table tr {
  transition: background 0.3s ease;
}
.company-table tr:hover {
  background: rgba(16, 185, 129, 0.03);
}

/* ---- Contact form button hover ---- */
.contact-form .btn-primary {
  position: relative;
  overflow: hidden;
}
.contact-form .btn-primary::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}
.contact-form .btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* ---- Number card hover glow ---- */
.number-card {
  position: relative;
}
.number-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(16,185,129,0.15), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}
.number-card:hover::before {
  opacity: 1;
}

/* ---- Hero badge pulse ---- */
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}
.hero-badge {
  animation: badgePulse 3s ease-in-out infinite;
}

/* ---- Image lazy load fade ---- */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.6s ease;
}
img[loading="lazy"].loaded,
img[loading="lazy"]:not([src=""]) {
  opacity: 1;
}

/* ---- Focus styles for accessibility ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* ---- Print styles ---- */
@media print {
  .sample-banner,
  .header,
  .mobile-nav,
  .hero-scroll,
  .hamburger { display: none !important; }
  body { background: white; color: #333; }
  section { padding: 24px 0; }
  .hero { min-height: auto; padding: 40px 0; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---- Dark mode enhancement (already dark, just ensure consistency) ---- */
@media (prefers-color-scheme: light) {
  /* Keep dark theme regardless of system preference for this industrial design */
  body { background: var(--navy); color: var(--text); }
}

/* ---- Additional micro-interactions ---- */
.about-feature {
  cursor: default;
}
.about-feature:hover svg {
  transform: scale(1.15);
  transition: transform 0.3s ease;
}

.contact-box {
  transition: var(--transition);
}
.contact-box:hover {
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateX(4px);
}

/* ---- Badge on about visual ---- */
.about-visual-badge {
  transition: transform 0.3s ease;
}
.about-visual:hover .about-visual-badge {
  transform: scale(1.05);
}

/* ---- Section label line ---- */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after {
  content: '';
  flex: 0 0 40px;
  height: 1px;
  background: var(--green);
}
.section-title-center ~ .section-label,
.section-label + .section-title-center {
  justify-content: center;
}

/* ---- Centered section label override ---- */
.iot .section-label,
.services .section-label,
.works .section-label,
.numbers .section-label,
.flow .section-label,
.company .section-label,
.contact .section-label {
  justify-content: center;
}

/* ---- Work meta hover ---- */
.work-meta span {
  transition: var(--transition);
}
.work-card:hover .work-meta span {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

/* ---- Footer brand hover ---- */
.footer .logo:hover .logo-en {
  color: var(--green);
  transition: color 0.3s ease;
}

/* ---- Grid pattern for numbers section ---- */
.numbers::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* ---- Hero content stagger animation ---- */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.hero-badge {
  opacity: 0;
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.2s;
}
.hero-title {
  opacity: 0;
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.4s;
}
.hero-sub {
  opacity: 0;
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.6s;
}
.hero-actions {
  opacity: 0;
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 0.8s;
}
.hero-stats {
  opacity: 0;
  animation: heroFadeUp 0.8s ease forwards;
  animation-delay: 1.0s;
}

/* ---- Circuit board decorative lines ---- */
.services::before {
  content: '';
  position: absolute;
  top: 40px;
  right: 40px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(16, 185, 129, 0.06);
  border-radius: 0;
  pointer-events: none;
}
.services::after {
  content: '';
  position: absolute;
  top: 50px;
  right: 50px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(16, 185, 129, 0.04);
  pointer-events: none;
}
.services {
  position: relative;
  overflow: hidden;
}

/* ---- Works section decoration ---- */
.works {
  position: relative;
}
.works::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.15), transparent);
}

/* ---- Enhanced button styles ---- */
.btn {
  position: relative;
  overflow: hidden;
}
.btn-primary {
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}
.btn-ghost:active {
  transform: scale(0.98);
}

/* ---- About section enhanced layout ---- */
.about-text {
  position: relative;
}
.about-text::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--green), transparent);
  border-radius: 2px;
  display: none;
}
@media (min-width: 1025px) {
  .about-text::before {
    display: block;
  }
}

/* ---- IoT section enhanced ---- */
.iot {
  position: relative;
}
.iot::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.2), transparent);
}
.iot::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
}

/* ---- Flow section enhanced ---- */
.flow {
  position: relative;
}
.flow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.15), transparent);
}

/* ---- Company section enhanced ---- */
.company {
  position: relative;
}

/* ---- Contact section enhanced ---- */
.contact {
  position: relative;
}
.contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.15), transparent);
}

/* ---- Hero background scale ---- */
.hero-bg {
  transform: scale(1.05);
  transition: transform 0.1s linear;
}

/* ---- Tooltip style for service tags ---- */
.service-tags li {
  transition: var(--transition);
  cursor: default;
}
.service-tags li:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

/* ---- Work card image gradient overlay ---- */
.work-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(15, 25, 35, 0.5), transparent);
  pointer-events: none;
}

/* ---- Number value glow on hover ---- */
.number-card:hover .number-value {
  text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
  transition: text-shadow 0.3s ease;
}

/* ---- Flow connector dots ---- */
.flow-step::after {
  content: '';
  position: absolute;
  left: 30px;
  bottom: 0;
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  opacity: 0.3;
  display: none;
}

/* ---- Header logo animation ---- */
.logo-icon {
  transition: transform 0.3s ease;
}
.logo:hover .logo-icon {
  transform: rotate(5deg) scale(1.05);
}

/* ---- Nav CTA enhanced ---- */
.nav-cta {
  transition: all 0.3s ease !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}
.nav-cta:hover {
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35) !important;
  transform: translateY(-1px);
}

/* ---- Section sub enhanced ---- */
.section-sub {
  max-width: 600px;
}
.section-title-center + .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Hero responsive refinements ---- */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-stats {
    gap: 24px;
    padding: 20px 24px;
  }
  .hero-stat-num {
    font-size: 28px;
  }
  .hero-title {
    font-size: 48px;
  }
}

/* ---- Tablet specific adjustments ---- */
@media (min-width: 769px) and (max-width: 1024px) {
  .services-grid {
    gap: 20px;
  }
  .service-card {
    padding: 28px;
  }
  .container {
    padding: 0 32px;
  }
}

/* ---- Large desktop enhancements ---- */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  .hero-content {
    max-width: 1320px;
  }
  .hero-title {
    font-size: 76px;
  }
  .services-grid {
    gap: 32px;
  }
  .works-grid {
    gap: 32px;
  }
}

/* ---- Contact form select arrow ---- */
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* ---- Placeholder animations ---- */
@keyframes placeholderFade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.6; }
}
.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
  opacity: 0.3;
  transition: opacity 0.3s ease;
}

/* ---- Mobile hamburger area ---- */
@media (max-width: 768px) {
  .header-inner {
    height: 64px;
  }
  .logo-en {
    font-size: 16px;
  }
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  .sample-banner {
    font-size: 11px;
    padding: 6px 12px;
  }
  .header {
    top: 33px;
  }
}

/* ---- Extra small device support ---- */
@media (max-width: 360px) {
  .container {
    padding: 0 16px;
  }
  .hero-title {
    font-size: 28px;
  }
  .section-title {
    font-size: 24px;
  }
  .service-card {
    padding: 24px 20px;
  }
  .number-value {
    font-size: 32px;
  }
  .company-table th {
    width: 100px;
    padding: 12px;
    font-size: 12px;
  }
  .company-table td {
    padding: 12px;
    font-size: 12px;
  }
}
