/* ==========================================================================
   Sigma Automation - sigmadcs.com
   Palette is derived from the company logo: navy #043568 + slate grey #5b6469.
   Sections: tokens / reset / layout / header / hero / components / sections /
             footer / responsive
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  /* Brand (sampled from logo1.png) */
  --navy:         #043568;
  --navy-deep:    #042757;
  --navy-900:     #02203f;
  --navy-700:     #06407c;
  --slate:        #5b6469;
  --slate-500:    #7a848b;
  --slate-300:    #aab3b9;

  /* Interaction */
  --accent:        #0a5aa8;   /* AA on white */
  --accent-hover:  #084a8c;
  --accent-bright: #5aa3e8;   /* accents on navy */

  /* Light surfaces */
  --bg:         #ffffff;
  --bg-muted:   #f2f5f8;
  --border:     #dde4ec;
  --text:       #10243d;
  --text-muted: #55636f;

  /* Dark surfaces */
  --d-text:       #eaf0f7;
  --d-text-muted: #a4b3c4;
  --d-border:     rgba(255, 255, 255, .14);
  --d-surface:    rgba(255, 255, 255, .05);

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  /* Metrics */
  --wrap: 1180px;
  --gutter: 24px;
  --radius: 10px;
  --header-h: 74px;

  --shadow-sm: 0 1px 2px rgba(4, 53, 104, .07), 0 2px 8px rgba(4, 53, 104, .05);
  --shadow-md: 0 4px 12px rgba(4, 53, 104, .09), 0 14px 34px rgba(4, 53, 104, .08);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}
.section-dark :focus-visible,
.hero :focus-visible { outline-color: var(--accent-bright); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 18px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- Layout primitives -------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono {
  font-family: var(--mono);
  font-size: .78em;
  letter-spacing: .06em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section { padding: 96px 0; }
.section-tight { padding: 72px 0; }

.section-head { max-width: 740px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.18;
  letter-spacing: -.02em;
  font-weight: 700;
}
.section-lede {
  margin-top: 18px;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 62ch;
}

.section-dark { background: var(--navy-deep); color: var(--d-text); }

.section-dark .eyebrow { color: var(--accent-bright); }
.section-dark .section-lede { color: var(--d-text-muted); }
.section-muted { background: var(--bg-muted); }

/* Section that carries a full-bleed photo backdrop. */
.has-media { position: relative; overflow: hidden; }
.has-media > .wrap { position: relative; z-index: 1; }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(4, 53, 104, .1); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; }
.brand img { height: 46px; width: auto; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav > a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color .18s ease;
}
.nav > a:hover { color: var(--navy); }
.nav > a.btn { color: #fff; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease;
}
.nav-toggle span + span { margin-top: 5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 9px 17px; font-size: 14px; }
.btn-block { width: 100%; }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); }

.btn-ghost { border-color: var(--d-border); color: var(--d-text); }
.btn-ghost:hover { border-color: var(--accent-bright); color: #fff; }

/* --- Media backdrop (shared by hero and full-bleed sections) ------------ */
.media-bg { position: absolute; inset: 0; overflow: hidden; }
.media-bg img { width: 100%; height: 100%; object-fit: cover; }
.media-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(2, 32, 63, .95) 0%, rgba(4, 39, 87, .88) 45%, rgba(4, 53, 104, .68) 100%);
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--navy-900);
  color: var(--d-text);
  padding: 104px 0 112px;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .88fr);
  gap: 60px;
  align-items: center;
}
.hero .eyebrow { color: var(--accent-bright); }
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.09;
  letter-spacing: -.03em;
  font-weight: 700;
  max-width: 17ch;
}
.lede {
  margin-top: 24px;
  font-size: 17.5px;
  line-height: 1.7;
  color: #cbd8e6;
  max-width: 56ch;
}
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }

/* Engineering data panel */
.hero-panel {
  background: rgba(2, 26, 52, .72);
  border: 1px solid var(--d-border);
  border-radius: 14px;
  padding: 22px;
  backdrop-filter: blur(6px);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--d-border);
  color: var(--d-text-muted);
  letter-spacing: .14em;
}
.led {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(90, 163, 232, .2);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.panel-list { padding: 6px 0; }
.panel-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  font-size: 14.5px;
  line-height: 1.5;
}
.panel-list li:last-child { border-bottom: 0; }
.tag {
  flex: none;
  min-width: 30px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(90, 163, 232, .16);
  color: var(--accent-bright);
  text-align: center;
  font-size: 11px;
  letter-spacing: .05em;
}
.panel-foot {
  padding-top: 13px;
  border-top: 1px solid var(--d-border);
  color: var(--d-text-muted);
  font-size: 11px;
  letter-spacing: .12em;
}

/* --- Capability strip --------------------------------------------------- */
.strip { background: var(--navy); color: var(--d-text); }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 22px 0;
  border-right: 1px solid var(--d-border);
}
.strip-item:last-child { border-right: 0; }
.strip-item:not(:first-child) { padding-left: 22px; }
.strip-key { color: var(--accent-bright); font-size: 12px; }
.strip-val { font-size: 14.5px; font-weight: 500; }

/* --- Lines of business -------------------------------------------------- */
.lines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.line-card {
  position: relative;
  padding: 32px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-top: 3px solid var(--navy);
  transition: box-shadow .2s ease, transform .2s ease;
}
.line-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.line-card h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 12px; }
.line-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 16px; }
.line-card ul li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 14.5px;
  color: var(--text);
}
.line-card ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 15px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
}

/* --- Service cards ------------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.card {
  padding: 30px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.card:hover {
  border-color: rgba(10, 90, 168, .4);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 9px;
  background: rgba(10, 90, 168, .09);
  color: var(--accent);
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 18.5px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }

/* --- DCS vs PLC comparison ---------------------------------------------- */
.compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.compare-col {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.compare-col h3 { font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.compare-col .compare-sub {
  color: var(--accent-bright);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .13em;
  margin-bottom: 18px;
}
.compare-col li {
  position: relative;
  padding: 11px 0 11px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  font-size: 14.5px;
  color: var(--d-text-muted);
}
.compare-col li:last-child { border-bottom: 0; }
.compare-col li::before {
  content: "";
  position: absolute;
  left: 2px; top: 19px;
  width: 10px; height: 2px;
  background: var(--accent-bright);
  opacity: .8;
}

/* --- Full project cycle ------------------------------------------------- */
.cycle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cycle li {
  background: var(--bg);
  padding: 24px 22px;
  transition: background-color .2s ease;
}
.cycle li:hover { background: var(--bg-muted); }
.cycle .step-num {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.cycle h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 6px; }
.cycle p { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }

/* --- Principles band (photo background) --------------------------------- */
.band {
  position: relative;
  padding: 88px 0;
  color: var(--d-text);
  background: var(--navy-900);
  overflow: hidden;
}
.band .wrap { position: relative; z-index: 1; }
.band h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 700;
  max-width: 20ch;
}
.principles {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 28px;
}
.principles h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-top: 16px;
  border-top: 2px solid var(--accent-bright);
}
.principles p { font-size: 14.5px; color: var(--d-text-muted); }

/* --- Industries --------------------------------------------------------- */
.industries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 1px;
  background: var(--d-border);
  border: 1px solid var(--d-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.industries li {
  padding: 28px 26px;
  background: rgba(2, 32, 63, .82);
  backdrop-filter: blur(2px);
  transition: background-color .2s ease;
}
.industries li:hover { background: rgba(6, 64, 124, .82); }
.industries h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.industries p { color: var(--d-text-muted); font-size: 14.5px; }

/* --- Platforms ---------------------------------------------------------- */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.platform-col {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.platform-col h3 {
  color: var(--slate);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 500;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.platform-col li {
  padding: 10px 0 10px 18px;
  position: relative;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.platform-col li:last-child { border-bottom: 0; }
.platform-col li::before {
  content: "";
  position: absolute;
  left: 0; top: 19px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .55;
}
.platform-note {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 72ch;
}

/* --- About -------------------------------------------------------------- */
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr);
  gap: 60px;
  align-items: start;
}
.about-copy h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.18;
  letter-spacing: -.02em;
  font-weight: 700;
  margin-bottom: 24px;
}
.about-copy p { color: var(--text-muted); margin-bottom: 18px; max-width: 62ch; }
.about-copy p:last-child { margin-bottom: 0; }

.about-side { display: grid; gap: 24px; }
.about-photo {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.about-photo img { width: 100%; height: 260px; object-fit: cover; }

.facts {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 24px;
}
.facts > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.facts > div:last-child { border-bottom: 0; }
.facts dt { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.facts dd { font-size: 14.5px; font-weight: 500; text-align: right; }

/* --- Contact ------------------------------------------------------------ */
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  gap: 60px;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.18;
  letter-spacing: -.02em;
  font-weight: 700;
}
.contact-list { margin-top: 40px; }
.contact-list li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--d-border);
  font-size: 15px;
}
.contact-label {
  color: var(--d-text-muted);
  font-size: 10.5px;
  letter-spacing: .14em;
  padding-top: 4px;
}
.contact-list a { border-bottom: 1px solid rgba(90, 163, 232, .45); transition: color .18s ease; }
.contact-list a:hover { color: var(--accent-bright); }

.contact-form {
  background: var(--d-surface);
  border: 1px solid var(--d-border);
  border-radius: 14px;
  padding: 28px;
}
.field { margin-bottom: 18px; }
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--d-text-muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, .24);
  border: 1px solid var(--d-border);
  border-radius: 8px;
  color: var(--d-text);
  font-size: 15px;
  transition: border-color .18s ease, background-color .18s ease;
}
.field textarea { resize: vertical; min-height: 108px; }
.field input:focus,
.field textarea:focus {
  border-color: var(--accent-bright);
  background: rgba(0, 0, 0, .34);
  outline: none;
}
.field.has-error input,
.field.has-error textarea { border-color: #e8756b; }

.form-note { margin-top: 14px; min-height: 20px; font-size: 13.5px; color: var(--d-text-muted); }
.form-note.is-error { color: #f0938a; }
.form-note.is-ok { color: var(--accent-bright); }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--d-text-muted);
  padding: 56px 0 40px;
  border-top: 1px solid var(--d-border);
  font-size: 14px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1.1fr);
  gap: 40px;
}
.footer-brand img { height: 52px; width: auto; margin-bottom: 18px; }
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { transition: color .18s ease; }
.footer-nav a:hover { color: var(--accent-bright); }
.footer-legal p { margin-bottom: 6px; }
.footer-legal .copy { margin-top: 14px; opacity: .75; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero-inner,
  .about-inner,
  .contact-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { max-width: 22ch; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .strip-item { border-bottom: 1px solid var(--d-border); }
  .strip-item:nth-child(2n) { border-right: 0; }
  .strip-item:nth-child(n+3) { border-bottom: 0; }
  .strip-item:nth-child(2n+1) { padding-left: 0; }
  .strip-item:nth-child(2n) { padding-left: 22px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .about-photo img { height: 300px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(4, 53, 104, .16);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav > a { padding: 15px 2px; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav > a.btn { margin-top: 16px; border-bottom: 0; justify-content: center; }

  .section { padding: 68px 0; }
  .section-tight { padding: 56px 0; }
  .band { padding: 64px 0; }
  .section-head { margin-bottom: 40px; }
  .hero { padding: 76px 0 84px; }
}

@media (max-width: 560px) {
  :root { --gutter: 18px; }
  .strip-inner { grid-template-columns: 1fr; }
  .strip-item {
    border-right: 0;
    border-bottom: 1px solid var(--d-border);
    padding-left: 0 !important;
  }
  .strip-item:last-child { border-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .facts > div { flex-direction: column; gap: 4px; }
  .facts dd { text-align: left; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brand img { height: 38px; }
}

/* --- Scroll reveal (progressive enhancement) ---------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
