/* Katalab Landing Page */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --accent: #ff6b35;
  --accent-dark: #e55a28;
  --dark: #1a1a2e;
  --text: #3c4043;
  --text-muted: #5f6368;
  --bg: #ffffff;
  --bg-alt: #f0f4ff;
  --bg-gradient: linear-gradient(160deg, #f0f4ff 0%, #e8f0fe 50%, #f5f7fa 100%);
  --shadow: 0 4px 24px rgba(26, 115, 232, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 115, 232, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --nav-height: 72px;
  --max-width: 1200px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

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

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-header h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #4285f4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

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

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--primary); }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Hero */
.hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
  background: var(--bg-gradient);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 115, 232, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--primary), #4285f4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

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

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 440px;
}

.hero-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eee;
}

.hero-card-dots {
  display: flex;
  gap: 6px;
}
.hero-card-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.hero-card-dots span:nth-child(1) { background: #ff5f57; }
.hero-card-dots span:nth-child(2) { background: #febc2e; }
.hero-card-dots span:nth-child(3) { background: #28c840; }

.hero-card-title {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: auto;
}

.hero-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.metric-item {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.metric-item.accent .metric-value { color: var(--accent); }

/* Stats bar */
.stats-bar {
  background: var(--dark);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item .stat-number {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.stat-item .stat-number span {
  color: var(--accent);
}

.stat-item .stat-label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.about-content h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}

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

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.highlight-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-alt);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.highlight-text h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.highlight-text p {
  font-size: 14px;
  margin-bottom: 0;
}

.about-visual {
  background: linear-gradient(135deg, var(--primary) 0%, #4285f4 100%);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.about-visual::after {
  content: "";
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.about-visual h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  position: relative;
}

.about-visual p {
  font-size: 15px;
  opacity: 0.9;
  line-height: 1.7;
  position: relative;
}

.about-visual .vision-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  position: relative;
}

.vision-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* Product cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}

.product-icon.sensor { background: #e8f5e9; }
.product-icon.switch { background: #fff3e0; }
.product-icon.percentage { background: #e3f2fd; }

.product-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.product-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-features li {
  font-size: 14px;
  color: var(--text);
  padding-left: 20px;
  position: relative;
}

.product-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

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

.program-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.program-card:hover { transform: translateY(-4px); }

.program-banner {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.program-banner.lab { background: linear-gradient(135deg, #667eea, #764ba2); }
.program-banner.science { background: linear-gradient(135deg, #f093fb, #f5576c); }
.program-banner.tech { background: linear-gradient(135deg, #4facfe, #00f2fe); }

.program-body {
  padding: 24px;
}

.program-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 10px;
}

.program-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.program-stat {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  text-align: center;
  padding: 32px 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

.feature-card:hover { transform: translateY(-4px); }

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--bg-alt);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Carousel */
.carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
}

.slide-visual {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.slide-visual.v1 { background: linear-gradient(135deg, #a8edea, #fed6e3); }
.slide-visual.v2 { background: linear-gradient(135deg, #d299c2, #fef9d7); }
.slide-visual.v3 { background: linear-gradient(135deg, #89f7fe, #66a6ff); }

.slide-content {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.slide-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}

.slide-content h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
}

.slide-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.carousel-dot.active {
  background: var(--primary);
  width: 28px;
  border-radius: 5px;
}

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

.testimonial-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
}

.testimonial-card::before {
  content: "\201C";
  font-size: 48px;
  color: var(--primary);
  opacity: 0.2;
  position: absolute;
  top: 12px;
  left: 20px;
  line-height: 1;
}

.testimonial-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 20px;
  position: relative;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.author-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
}

.author-info p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Contact form */
.contact-section {
  background: var(--bg-gradient);
}

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

.contact-info h2 {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}

.contact-detail-icon {
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow);
}

.contact-form {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group label .required {
  color: var(--accent);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  transition: border-color var(--transition);
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

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

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

.form-submit {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.form-success.show { display: block; }
.form-success .success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.form-success h3 {
  font-size: 22px;
  color: var(--dark);
  margin-bottom: 8px;
}
.form-success p {
  color: var(--text-muted);
}

.contact-form.hidden { display: none; }

.form-error {
  font-size: 13px;
  color: #d93025;
  margin-top: 4px;
  display: none;
}
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
  border-color: #d93025;
}
.form-group.has-error .form-error { display: block; }

/* Footer */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  padding: 6px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }

  .hero-visual { order: -1; }
  .hero-card { max-width: 100%; }

  .products-grid,
  .programs-grid,
  .features-grid,
  .testimonials-grid { grid-template-columns: 1fr 1fr; }

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

  .carousel-slide { grid-template-columns: 1fr; }
  .slide-visual { min-height: 180px; font-size: 48px; }

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

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

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid #eee;
    transform: translateY(-120%);
    opacity: 0;
    transition: all var(--transition);
    pointer-events: none;
  }

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

  .nav-toggle { display: flex; }
  .nav-cta { margin-left: 0; width: 100%; text-align: center; }

  .products-grid,
  .programs-grid,
  .features-grid,
  .testimonials-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
