/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ── Palette derived from AP3X logo ── */
  --primary: #0D0D0D;           /* logo black background      */
  --primary-deep: #080808;      /* deeper black                */
  --accent: #5B9BD5;            /* logo steel blue             */
  --accent-hover: #4A87BF;      /* darker steel blue           */
  --accent-light: rgba(91, 155, 213, 0.12);
  --white: #FFFFFF;
  --light: #F4F7FA;
  --gray-100: #F4F7FA;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-500: #64748B;
  --gray-700: #334155;
  --gray-900: #0F172A;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --radius: 10px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== HEADER / NAV ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transition: var(--transition);
}

header.scrolled {
  box-shadow: var(--shadow-sm);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.logo span {
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.logo small {
  display: block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-500);
}

/* ── Nav links ── */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--primary);
  color: var(--white);
  overflow: hidden;
  position: relative;
  padding-top: 72px;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(91, 155, 213, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91, 155, 213, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 640px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(91, 155, 213, 0.15);
  border: 1px solid rgba(91, 155, 213, 0.25);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.7;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91, 155, 213, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

.btn-dark {
  background: var(--primary);
  color: var(--white);
}

.btn-dark:hover {
  background: var(--primary-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== STATS BAR ===== */
.stats-bar {
  background: var(--white);
  padding: 48px 0;
  border-bottom: 1px solid var(--gray-200);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-item p {
  font-size: 0.82rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ===== SECTION STYLES ===== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 64px;
}

.section-header .overline {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: var(--gray-900);
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
  line-height: 1.7;
}

.bg-light {
  background: var(--gray-100);
}

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--white);
  padding: 40px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: 12px;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ===== PRODUCT CARDS ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-image {
  height: 220px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image svg {
  width: 64px;
  height: 64px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  opacity: 0.6;
}

.product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 70%, rgba(91, 155, 213, 0.12), transparent 60%);
}

.product-info {
  padding: 28px;
}

.product-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-info p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 16px;
}

.product-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition);
}

.product-link:hover {
  gap: 10px;
}

/* ===== CHECK LIST (products page) ===== */
.check-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.check-list li svg {
  flex-shrink: 0;
  stroke: var(--accent);
}

/* ===== UNDERCARRIAGE ===== */
.undercarriage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.undercarriage-card {
  background: var(--white);
  padding: 32px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: all var(--transition);
}

.undercarriage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.undercarriage-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: 50%;
}

.undercarriage-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.undercarriage-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.undercarriage-card p {
  font-size: 0.82rem;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  padding: 160px 0 80px;
  background: var(--primary);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91, 155, 213, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
  position: relative;
}

.page-hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.55);
  position: relative;
}

/* ===== ABOUT ===== */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.about-text p {
  color: var(--gray-500);
  margin-bottom: 16px;
  line-height: 1.8;
}

.about-image {
  background: var(--primary);
  border-radius: var(--radius);
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(91, 155, 213, 0.1), transparent 60%);
}

.about-image svg {
  width: 120px;
  height: 120px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1;
  opacity: 0.4;
  position: relative;
  z-index: 1;
}

/* ===== VALUES ===== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.value-card {
  text-align: center;
  padding: 40px 24px;
}

.value-card .value-num {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gray-200);
  line-height: 1;
  margin-bottom: 16px;
}

.value-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.value-card p {
  font-size: 0.88rem;
  color: var(--gray-500);
  line-height: 1.7;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-info h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.contact-info > p {
  color: var(--gray-500);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  border-radius: 10px;
}

.contact-detail-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-detail h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.contact-detail p {
  font-size: 0.88rem;
  color: var(--gray-500);
}

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: var(--white);
  color: var(--gray-900);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 155, 213, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--primary);
  padding: 80px 0;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(91, 155, 213, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-section h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.05rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-section .btn {
  position: relative;
}

/* ===== FOOTER ===== */
footer {
  background: var(--primary-deep);
  color: rgba(255, 255, 255, 0.55);
  padding: 64px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col a {
  display: block;
  font-size: 0.88rem;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
  .features-grid,
  .products-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-content,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 24px 0;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    transition: transform var(--transition);
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    padding: 12px 24px;
    width: 100%;
  }

  .mobile-toggle {
    display: flex;
  }

  .mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .mobile-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .features-grid,
  .products-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    text-align: center;
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image {
    height: 280px;
  }
}
