/* Industrial Automata — Design System v3 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-darker: #1e40af;
  --brand-light: #eff6ff;
  --accent: #0ea5e9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
.mono { font-family: 'JetBrains Mono', monospace; }

.container { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.section { padding-block: 88px; }
.section-sm { padding-block: 64px; }

/* Eyebrow label */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 640px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.footer .brand-mark img { filter: brightness(0) invert(1); }

/* Nav */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color .15s, background .15s;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--brand); background: var(--brand-light); }
.nav-link .chev { transition: transform .15s; }
.nav-item:hover .nav-link .chev { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15,23,42,0.10);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .12s, color .12s;
}
.dropdown a:hover { background: var(--bg-soft); color: var(--brand); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform .12s, background .15s, box-shadow .15s, color .15s;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(37,99,235,0.25); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.btn-sm { padding: 9px 16px; font-size: 0.88rem; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.08);
  border-color: #cbd5e1;
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-head .section-lead { margin: 16px auto 0; }

/* Footer */
.footer {
  background: var(--ink);
  color: #cbd5e1;
  padding-block: 64px 32px;
}
.footer a { color: #cbd5e1; transition: color .12s; }
.footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
.footer h4 { color: #fff; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; }
.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: 0.85rem;
  color: #94a3b8;
}
.footer .brand { color: #fff; }

.page-hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding-block: 72px;
}
.page-hero h1 { margin-bottom: 16px; }
.page-hero p { font-size: 1.15rem; color: var(--ink-2); max-width: 640px; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* Tablet & below: hamburger nav, collapse 2- and 3-col sections into 1-col */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: block; }

  .nav.open {
    display: flex;
    position: absolute;
    top: 68px;
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 16px;
    gap: 2px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav.open .nav-item { width: 100%; }
  .nav.open .nav-link { padding: 12px 14px; font-size: 1rem; }
  .nav.open .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 4px 0 8px 16px;
    min-width: 0;
    background: transparent;
  }
  .nav.open .dropdown a { padding: 10px 14px; }

  /* Hero, products, solutions, technology, about, contact, partners: split layouts */
  [style*="grid-template-columns:1.1fr .9fr"],
  [style*="grid-template-columns:.9fr 1.1fr"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:.85fr 1.15fr"],
  [style*="grid-template-columns:1.4fr"],
  [style*="grid-template-columns:1fr 1.5fr"] {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  /* Generic helpers */
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section { padding-block: 64px; }
  .section-sm { padding-block: 48px; }
  .page-hero { padding-block: 56px; }
  .section-head { margin-bottom: 40px; }
}

@media (max-width: 600px) {
  .container { padding-inline: 18px; }
  .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .section { padding-block: 48px; }
  .section-sm { padding-block: 40px; }
  .page-hero { padding-block: 44px; }
  h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  h2 { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* Hero stat tiles, why-us 4-up, industries 8-up, partners spotlight rows */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns:repeat(6"] {
    grid-template-columns: 1fr 1fr !important;
  }
  [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Cards and panels get a bit of breathing room */
  .card { padding: 22px; }

  /* The big dark CTA cards in product/solution/tech pages */
  [style*="padding:64px"] { padding: 40px 24px !important; }
  [style*="padding:56px"] { padding: 36px 22px !important; }

  /* Bar charts and similar: keep the bars */
  [style*="height:64px"],
  [style*="height:60px"],
  [style*="height:120px"],
  [style*="height:140px"] { height: auto !important; min-height: 80px; }

  /* Generic overflow safety */
  .footer-bottom { font-size: 0.8rem; }
}
