/* ==========================================================================
   EMNC core - shared chrome for every page on emncautomation.com
   Tokens, nav (incl. Products dropdown), buttons, typography, footer.
   Page-specific component CSS stays in the page. Nothing here loads from a
   third-party host.
   ========================================================================== */

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

:root {
  /* legacy brand tokens - kept so older component CSS keeps resolving */
  --navy:      #07111f;
  --navy2:     #0c1c30;
  --navy3:     #112540;
  --gold:      #c8a84b;
  --gold2:     #dfc07a;
  --gold-dim:  rgba(200,168,75,0.12);
  --white:     #ffffff;
  --text:      #0d1520;
  --muted:     #64748b;
  --border:    rgba(200,168,75,0.18);
  --border-w:  rgba(200,168,75,0.12);

  /* current light system - these are the ones to use */
  --off:       #f5f5f7;
  --ink:       #1d1d1f;
  --ink2:      #6e6e73;
  --goldink:   #8c6f22;
  --hair:      #d2d2d7;
  --card-line: rgba(13,21,32,0.09);
  --card-sh:   0 1px 2px rgba(12,23,40,0.04), 0 8px 22px rgba(12,23,40,0.05);
  --card-sh-h: 0 4px 10px rgba(12,23,40,0.06), 0 18px 40px rgba(12,23,40,0.10);
}

html { scroll-behavior: smooth; }
html, body { background: #ffffff; }
/* The homepage tool marquee and hero art deliberately run past the viewport.
   Clipping on <html> is what actually stops the page scrolling sideways -
   the same declaration on <body> does not reliably reach the viewport.
   `clip` rather than `hidden`, so position:sticky keeps working. */
html, body { overflow-x: clip; }
body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--off); }
::-webkit-scrollbar-thumb { background: var(--gold); }

/* ── section rhythm + type scale ─────────────────────────────────────────── */
section { padding: 120px 40px; }
.si { max-width: 1120px; margin: 0 auto; }
.s-title, .s-title.light {
  font-size: clamp(32px, 4.4vw, 54px); font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.08; color: var(--ink);
}
.s-title span, .s-title span[style] { color: var(--goldink) !important; }
.s-desc, .s-desc.light {
  font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55;
  color: var(--ink2); max-width: 640px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.eyebrow-line { width: 36px; height: 1px; background: var(--goldink); }
.eyebrow-text {
  font-size: 10px; font-weight: 700; letter-spacing: 0.24em;
  text-transform: uppercase; color: var(--goldink);
}

/* ── nav ─────────────────────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 64px; height: 56px;
  transition: background 0.35s, border-bottom 0.35s;
  border-bottom: 1px solid transparent;
}
/* light glass - the default on inner pages, and on the homepage once scrolled */
nav.scrolled, nav.solid {
  background: rgba(255,255,255,0.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.nav-logo img { height: 32px; width: auto; display: block; transition: filter 0.35s; }
.nav-logo-text {
  font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--white); line-height: 1.15;
}
.nav-logo-sub {
  font-size: 9px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); display: block; margin-top: 1px;
}
nav.scrolled .nav-logo-text, nav.solid .nav-logo-text { color: var(--ink); }
nav.scrolled .nav-logo-sub,  nav.solid .nav-logo-sub  { color: var(--goldink); }
nav.scrolled .nav-logo img,  nav.solid .nav-logo img  { filter: none; }

.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links > li { position: relative; }
/* every hero on the site is light now, so nav text is ink by default. The
   homepage styles its own <a> items; .nav-trigger is a <button> and would be
   left white-on-white without this. */
.nav-links a, .nav-trigger {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(16,23,32,0.62);
  text-decoration: none; transition: color 0.2s;
  background: none; border: none; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 5px; padding: 0;
}
.nav-links a:hover, .nav-trigger:hover { color: var(--goldink); }
nav.scrolled .nav-links a, nav.solid .nav-links a,
nav.scrolled .nav-trigger, nav.solid .nav-trigger { color: rgba(0,0,0,0.6); }
nav.scrolled .nav-links a:hover, nav.solid .nav-links a:hover,
nav.scrolled .nav-trigger:hover, nav.solid .nav-trigger:hover { color: var(--goldink); }
nav.scrolled .nav-links a.active, nav.solid .nav-links a.active,
nav.scrolled .nav-trigger.active, nav.solid .nav-trigger.active { color: var(--goldink); }
.nav-links a.active, .nav-trigger.active { color: var(--goldink); }

.nav-caret { width: 8px; height: 5px; flex-shrink: 0; transition: transform 0.2s; }
.nav-item-drop.open .nav-caret { transform: rotate(180deg); }

/* ── products dropdown ───────────────────────────────────────────────────── */
.nav-drop {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  width: 620px; max-width: calc(100vw - 48px);
  background: #fff; border: 1px solid rgba(0,0,0,0.09);
  border-radius: 16px; box-shadow: 0 12px 44px rgba(12,23,40,0.16);
  padding: 20px; opacity: 0; visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 1200;
}
.nav-item-drop.open .nav-drop {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.nav-drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.nav-drop-label {
  grid-column: 1 / -1;
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink2);
  padding: 4px 10px 8px;
}
.nav-drop-label + .nav-drop-label { padding-top: 14px; }
.nav-drop a.nd {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 9px 10px; border-radius: 10px; text-decoration: none;
  text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 500;
  color: var(--ink) !important; transition: background 0.15s;
}
.nav-drop a.nd:hover { background: rgba(0,0,0,0.04); color: var(--goldink) !important; }
.nd-ic {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, rgba(200,168,75,0.17), rgba(200,168,75,0.05));
  border: 1px solid rgba(200,168,75,0.28); color: var(--goldink);
}
.nd-ic svg { width: 15px; height: 15px; }
.nd-tx { min-width: 0; line-height: 1.3; }
.nd-name { display: block; font-weight: 600; }
.nd-sub {
  display: block; font-size: 11.5px; font-weight: 400; color: var(--ink2);
  margin-top: 2px; letter-spacing: 0;
}
.nav-drop-foot {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.nav-drop-foot a {
  text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600;
  color: var(--goldink) !important;
}
.nav-drop-foot span {
  font-size: 11.5px; color: var(--ink2); text-transform: none; letter-spacing: 0;
}

/* ── nav right side ──────────────────────────────────────────────────────── */
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-cta {
  font-size: 12px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--navy); background: var(--gold);
  padding: 8px 18px; border-radius: 980px; text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--gold2); transform: translateY(-1px); }
nav.scrolled .nav-cta, nav.solid .nav-cta { background: var(--ink); color: #fff; }
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px; background: none; border: none;
}
.nav-hamburger span { width: 22px; height: 1.5px; background: var(--white); transition: 0.3s; }
nav.scrolled .nav-hamburger span, nav.solid .nav-hamburger span { background: var(--ink); }

/* language select */
.lang-select { position: relative; }
.lang-current {
  display: flex; align-items: center; gap: 6px; cursor: pointer;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 980px; padding: 5px 10px; font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.72); font-family: inherit; transition: 0.2s;
}
nav.scrolled .lang-current, nav.solid .lang-current {
  background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.16); color: rgba(0,0,0,0.72);
}
.lang-flag { width: 16px; height: auto; border-radius: 2px; display: block; }
.lang-chevron { width: 9px; height: 6px; }
.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px;
  background: #fff; border: 1px solid rgba(0,0,0,0.1); border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12); padding: 6px;
  display: none; z-index: 1300;
}
.lang-dropdown.open { display: block; }
.lang-dropdown a{text-decoration:none;}
.lang-dropdown button, .lang-dropdown a {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 13px; padding: 8px 10px; border-radius: 8px;
  color: rgba(0,0,0,0.6); text-align: left; transition: 0.15s;
}
.lang-dropdown button:hover, .lang-dropdown a:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.lang-dropdown button.active, .lang-dropdown a.active { color: var(--goldink); font-weight: 600; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  color: var(--navy); background: var(--gold);
  padding: 14px 28px; border-radius: 980px; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background 0.2s, transform 0.15s; border: none; cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--gold2); transform: translateY(-2px); }
.btn-outline {
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  color: rgba(16,23,32,0.62); text-decoration: none;
  border-bottom: 1px solid rgba(16,23,32,0.25); padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-outline:hover { color: var(--goldink); border-color: var(--goldink); }

/* ── mobile nav ──────────────────────────────────────────────────────────── */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 1999;
  background: #ffffff;
  flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: 80px 24px 40px; overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-size: 26px; font-weight: 600; color: var(--ink);
  text-decoration: none; transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--goldink); }
.mobile-nav a.mn-sub { font-size: 16px; font-weight: 500; color: var(--ink2); }
.mobile-nav .mn-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--goldink); margin-top: 6px;
}
.mobile-close {
  position: absolute; top: 22px; right: 26px;
  font-size: 22px; color: #86868b; cursor: pointer;
  background: none; border: none; font-family: inherit;
}

/* ── footer ──────────────────────────────────────────────────────────────── */
footer {
  background: var(--off); border-top: 1px solid rgba(0,0,0,0.08);
  padding: 44px 64px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.foot-brand { font-size: 13px; font-weight: 600; color: rgba(0,0,0,0.55); }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a {
  font-size: 13px; color: rgba(0,0,0,0.45); text-decoration: none; transition: color 0.2s;
}
.foot-links a:hover { color: var(--goldink); }
.foot-copy { font-size: 12px; color: rgba(0,0,0,0.35); }

/* ── reveal ──────────────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1080px) { nav { padding: 0 32px; } .nav-links { gap: 22px; } }
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  footer { padding: 36px 24px; }
}
@media (max-width: 768px) {
  section { padding: 80px 24px; }
  nav { padding: 0 20px; }
}
