/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Brand Colors:
#53bdf5 - Primary blue (lighter)
#1061b0 - Deep blue (darker)
#3b3b3b - Charcoal (text/accents only)
#f3f2f5 - Light gray
*/

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #3b3b3b;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  opacity: 0;
  animation: fadeIn 0.6s ease-in forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* Body watermark - behind all content sections */
body::before {
  content: '';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  max-width: 700px;
  height: 70vh;
  background: url('watermark.png') center/contain no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 56px;
  font-weight: 700;
}

h2 {
  font-size: 32px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

h3 {
  font-size: 28px;
  margin-bottom: 24px;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1a1a1a;
}

/* Skip to content link - accessibility */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: #1061b0;
  color: #ffffff;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Header - Initially hidden, appears on scroll */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(83, 189, 245, 0.15);
  padding: 20px 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  opacity: 0;
  transition: opacity 0.3s ease;
}

header.scrolled {
  /* Opacity is controlled by JavaScript for smooth fade */
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 48px;
  width: auto;
}

/* Main content - no offset needed since header is hidden initially */
main {
  padding-top: 0;
  position: relative;
  z-index: 1;
}

/* Hero Section - Logo transitions from visible to background */
.hero {
  background: linear-gradient(180deg, #f3f2f5 0%, #ffffff 100%);
  padding: 15vh 0;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  z-index: 1; /* Lower z-index so banner/intro scroll on top */
}

.hero-logo {
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto 60px;
  display: block;
  will-change: opacity;
}

.hero::after {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at center, rgba(83, 189, 245, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  color: #1a1a1a;
  margin-bottom: 20px;
}

.subtitle {
  font-size: 20px;
  color: #3b3b3b;
  margin-bottom: 48px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.subtitle span {
  display: inline;
}

.subtitle-divider {
  display: inline;
}

.stats {
  display: flex;
  gap: 80px;
  margin-top: 48px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 20px;
  border-left: 3px solid #53bdf5;
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: #1061b0;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: #3b3b3b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

/* Status Bar - Deep blue gradient, shrinks and sticks on scroll */
.status-bar {
  background: linear-gradient(135deg, #1061b0 0%, #0d4d8a 100%);
  padding: 24px 0;
  position: relative;
  overflow: hidden;
  z-index: 998; /* Above hero, below header */
  transition: padding 0.3s ease;
}

.status-bar.sticky {
  position: sticky;
  top: 88px;
  padding: 12px 0;
  z-index: 998;
}

@media (max-width: 768px) {
  .status-bar.sticky {
    top: 76px;
  }
}

.status-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(83, 189, 245, 0.15), transparent);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.status-bar p {
  color: #ffffff;
  font-size: 15px;
  text-align: center;
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Intro Section */
.intro {
  background: #ffffff;
  padding: 100px 0;
  position: relative;
  z-index: 10; /* Above hero so it scrolls on top */
}

.intro p {
  font-size: 18px;
  line-height: 1.8;
  color: #3b3b3b;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* Capability Sections - Top level, alternating backgrounds with transparency */
.capability-section {
  padding: 80px 0;
  position: relative;
  z-index: 10; /* Above hero so they scroll on top */
  border-left: 4px solid #53bdf5;
  transition: border-left-color 0.4s ease, background 0.4s ease, opacity 0.6s ease, transform 0.6s ease;
  cursor: default;
  opacity: 0;
  transform: translateY(20px);
}

.capability-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.capability-section:hover {
  border-left-color: #1061b0;
}

/* Alternating colors using nth-child with proper offset */
section.capability-section:nth-child(4) { /* Electronics - 1st capability after intro */
  background: rgba(59, 59, 59, 0.07);
  border-left-color: #53bdf5;
}

section.capability-section:nth-child(5) { /* Software & Apps */
  background: rgba(16, 97, 176, 0.04);
  border-left-color: #1061b0;
}

section.capability-section:nth-child(6) { /* Cloud & IoT */
  background: rgba(59, 59, 59, 0.06);
  border-left-color: #53bdf5;
}

section.capability-section:nth-child(7) { /* Prototypes */
  background: rgba(16, 97, 176, 0.045);
  border-left-color: #1061b0;
}

section.capability-section:nth-child(8) { /* Manufacturing */
  background: rgba(59, 59, 59, 0.08);
  border-left-color: #53bdf5;
}

.capability-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: radial-gradient(ellipse at right, rgba(83, 189, 245, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.capability-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(83, 189, 245, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 189, 245, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.capability-section:hover::after {
  opacity: 1;
}

.capability-section h2 {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 16px;
}

.capability-section h2::before {
  content: '';
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.capability-section:hover h2::before {
  opacity: 1;
  transform: scale(1.1);
}

/* Icon patterns using CSS - minimal line-art style */
section.capability-section:nth-child(4) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2353bdf5" stroke-width="1.5"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 12h8M12 8v8"/></svg>');
}

section.capability-section:nth-child(5) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231061b0" stroke-width="1.5"><polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/></svg>');
}

section.capability-section:nth-child(6) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2353bdf5" stroke-width="1.5"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/></svg>');
}

section.capability-section:nth-child(7) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%231061b0" stroke-width="1.5"><path d="M12 2L2 7l10 5 10-5-10-5z"/><path d="M2 17l10 5 10-5"/><path d="M2 12l10 5 10-5"/></svg>');
}

section.capability-section:nth-child(8) h2::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2353bdf5" stroke-width="1.5"><rect x="3" y="8" width="18" height="12" rx="2"/><path d="M10 8V5a2 2 0 0 1 2-2h0a2 2 0 0 1 2 2v3"/><line x1="12" y1="12" x2="12" y2="12"/></svg>');
}

.capability-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 48px; /* Start after the icon */
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #53bdf5 0%, #1061b0 100%);
  transition: width 0.4s ease;
}

.capability-section:hover h2::after {
  width: 120px;
}

.capability-section p {
  font-size: 17px;
  line-height: 1.7;
  color: #3b3b3b;
  max-width: 800px;
  position: relative;
  padding-left: 20px;
  font-weight: 400;
}

.capability-section p strong,
.capability-section p b {
  font-weight: 600;
  color: #1a1a1a;
}

.capability-section p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  background: #53bdf5;
  border-radius: 50%;
  opacity: 0.6;
  transition: all 0.4s ease;
}

.capability-section:hover p::before {
  opacity: 1;
  transform: scale(1.5);
}

/* Footer */
footer {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  padding: 40px 0;
  border-top: 1px solid rgba(83, 189, 245, 0.2);
  position: relative;
  z-index: 2;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #f3f2f5;
  font-size: 14px;
}

.footer-center {
  flex: 1;
  text-align: center;
}

.footer-email {
  color: #53bdf5;
  text-decoration: none;
  font-size: 13px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-email:hover {
  opacity: 1;
}

footer a {
  color: #f3f2f5;
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: #53bdf5;
}

/* Privacy Page */
.privacy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 40px;
}

.privacy-content h2 {
  color: #1a1a1a;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-left: 4px solid #53bdf5;
  padding-left: 20px;
}

.privacy-content h3 {
  color: #3b3b3b;
  margin-top: 40px;
  margin-bottom: 16px;
}

.privacy-content p {
  margin-bottom: 16px;
  color: #3b3b3b;
  line-height: 1.8;
}

.privacy-content ul {
  margin-bottom: 16px;
  padding-left: 40px;
  color: #3b3b3b;
}

.privacy-content li {
  margin-bottom: 8px;
  line-height: 1.8;
}

.privacy-content a {
  color: #1061b0;
  text-decoration: none;
  border-bottom: 1px solid rgba(16, 97, 176, 0.3);
  transition: border-color 0.3s ease;
}

.privacy-content a:hover {
  border-bottom-color: #1061b0;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 24px;
  }

  .container {
    padding: 0 24px;
  }

  .hero {
    padding: 80px 0 60px;
    min-height: 100vh; /* Full page height on mobile */
  }

  /* Center hero title on mobile */
  .hero-text {
    text-align: center;
  }

  .hero-text h1 {
    text-align: center;
  }

  /* Subtitle: Break at pipes, adjust sizing */
  .subtitle {
    font-size: 16px;
    line-height: 1.8;
    text-align: center;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
  }

  .subtitle span {
    display: block !important;
    margin: 4px 0;
    white-space: nowrap;
  }

  .subtitle .subtitle-divider,
  span.subtitle-divider {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Stats: Keep on same line but tighter */
  .stats {
    gap: 24px !important;
    justify-content: center;
    flex-wrap: nowrap !important;
    flex-direction: row !important;
  }

  .stat {
    flex-shrink: 1;
    min-width: 0;
    flex: 1;
    border-left: 3px solid #53bdf5;
  }

  /* Add right border to second stat (Full) on mobile */
  .stat:last-child {
    border-right: 3px solid #53bdf5;
    padding-right: 20px;
  }

  .stat-number {
    font-size: 28px !important;
  }

  .stat-label {
    font-size: 10px !important;
    letter-spacing: 0.05em !important;
  }

  .intro {
    padding: 40px 0;
  }

  .intro p {
    font-size: 16px;
  }

  .capability-section {
    padding: 60px 0;
  }

  .capability-section p {
    font-size: 15px;
    line-height: 1.6;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-center {
    order: -1;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 32px;
  }

  .logo {
    height: 36px;
  }

  .stats {
    flex-direction: column;
    gap: 32px;
  }

  .capability-section {
    padding: 40px 0;
  }
}