/* Metal Aid Engineers — 2026 redesign
   Industrial B2B design system. Pure CSS on top of Tailwind CDN. */

:root {
  /* Core palette — navy + graphite + industrial amber */
  --ink-900: #0b1626;        /* hero / footer */
  --ink-800: #132238;        /* dark panels */
  --ink-700: #1c2f4a;        /* dark borders */
  --ink-100: #0f172a;        /* body text */
  --steel-600: #334155;
  --steel-500: #475569;      /* muted text */
  --steel-400: #64748b;
  --line: #d4dbe5;           /* visible grey line */
  --line-soft: #e5eaf1;
  --bg: #ffffff;
  --bg-alt: #f1f4f8;         /* section tint */
  --bg-deep: #e7ecf2;

  /* Industrial amber accent — warm, reads on white AND navy
     --amber: bright brand accent (use for bars, borders, icons, and bold decorative shapes)
     --amber-ink: darker, legible variant for SMALL amber text on white or light backgrounds (AA)
     --amber-deep: deeper still, for hover states */
  --amber: #e07a19;
  --amber-ink: #b05609;
  --amber-deep: #8a3f08;
  --amber-100: #fdf1e1;

  /* Utility */
  --focus: #e07a19;
  --shadow-sm: 0 1px 2px rgba(11,22,38,.06);
  --shadow-md: 0 2px 6px rgba(11,22,38,.08);
  --shadow-lg: 0 12px 28px -12px rgba(11,22,38,.22);
  --shadow-xl: 0 24px 48px -16px rgba(11,22,38,.28);

  /* Motion */
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);
}

/* Honor user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* Selection styling */
::selection { background: var(--amber); color: #0b1626; }

/* Global focus ring (keyboard only) */
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ------------------------------------------------------------ utility layer */

.absolute { position: absolute; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.w-10 { width: 2.5rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-7xl { max-width: 80rem; width: min(100%, 80rem); }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-10 { gap: 2.5rem; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.top-16 { top: 4rem; }
.border {
  border-width: 1px;
  border-style: solid;
  border-color: currentColor;
}
.border-white\/20 { border-color: rgba(255, 255, 255, .2); }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.text-sm { font-size: .875rem; }
.text-base { font-size: 1rem; }
.font-semibold { font-weight: 600; }
.text-slate-600 { color: var(--steel-500); }
.text-white { color: #fff; }

@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:flex-row { flex-direction: row; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
  .md\:static { position: static; }
  .md\:top-auto { top: auto; }
  .md\:ml-3 { margin-left: .75rem; }
  .md\:hidden { display: none !important; }
  .md\:flex { display: flex !important; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:col-span-5 { grid-column: span 5 / span 5; }
  .md\:col-span-7 { grid-column: span 7 / span 7; }
  .md\:py-20 { padding-top: 5rem; padding-bottom: 5rem; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
}

/* ------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Barlow', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink-100);
  background: var(--bg);
  line-height: 1.55;
  font-weight: 500;
  margin: 0;
}

h1, h2, h3, h4, h5 {
  font-family: 'Barlow', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink-900);
  line-height: 1.15;
}
strong, b { font-weight: 700; }
p { font-weight: 500; }
.mono, .num, .spec-num {
  font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: -0.01em;
}

/* Universal eyebrow / kicker label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber-ink);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--amber);
}
.eyebrow.on-dark { color: #fbbf6b; }
.eyebrow.on-dark::before { background: var(--amber); }

.section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-title {
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  margin-bottom: .75rem;
}
.section-lede {
  color: var(--steel-500);
  max-width: 50rem;
  font-size: 1.02rem;
}

/* ------------------------------------------------------------ navbar */

.mae-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,22,38,.96);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 -2px 0 var(--amber) inset;
  transition: box-shadow .2s var(--ease-out), background .2s var(--ease-out), border-color .2s var(--ease-out);
}
.mae-nav.is-scrolled {
  background: rgba(8,17,30,.96);
  border-bottom-color: rgba(255,255,255,.04);
  box-shadow: 0 -2px 0 var(--amber) inset, 0 12px 24px -16px rgba(0,0,0,.6);
}
.mae-nav.is-scrolled .brand img { height: 40px; transition: height .2s var(--ease-out); }
.mae-nav .brand img { transition: height .2s var(--ease-out); }
.mae-nav a { color: #d3dbe8; font-weight: 600; font-size: .93rem; letter-spacing: .01em; }
.mae-nav a:hover { color: #fff; }
.mae-nav .brand {
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: 1.05rem;
}
.mae-nav .brand picture { display: block; line-height: 0; }
.mae-nav .brand img { height: 48px; width: auto; display: block; }
.mae-nav .brand .brand-mark { display: flex; flex-direction: column; line-height: 1.05; }
.mae-nav .brand .brand-sub { font-size: .62rem; font-weight: 600; letter-spacing: .15em; color: var(--amber); }

/* Nav links spacing */
.mae-nav-links { display: flex; align-items: center; gap: 1.75rem; }
.mae-nav-links a { position: relative; padding: .4rem 0; }
.mae-nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -.3rem;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .15s ease;
}
.mae-nav-links a:hover::after { transform: scaleX(1); }

@media (max-width: 767px) {
  .mae-nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    background: var(--ink-900);
    border-top: 1px solid var(--ink-700);
    padding: .25rem 0 .75rem;
  }
  .mae-nav-links.open { display: flex; }
  .mae-nav-links a {
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--ink-700);
  }
  .mae-nav-links a::after { display: none; }
}

/* ------------------------------------------------------------ hero */

.mae-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--ink-900);
  color: #fff;
  border-bottom: 4px solid var(--amber);
}
.mae-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero/plant-industrial.jpg');
  background-image: image-set(
    url('../img/hero/plant-industrial.avif') type('image/avif'),
    url('../img/hero/plant-industrial.webp') type('image/webp'),
    url('../img/hero/plant-industrial.jpg') type('image/jpeg')
  );
  background-size: cover;
  background-position: center center;
  transform: scale(1.04);
  animation: hero-pan 28s ease-in-out infinite alternate;
}
@keyframes hero-pan {
  0%   { transform: scale(1.04) translate3d(-1.2%, 0, 0); }
  100% { transform: scale(1.04) translate3d(1.2%, -1%, 0); }
}
/* Left-side scrim behind the headline, fading to full photo on the right.
   Keeps text legible without hiding the image. */
.mae-hero .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,22,38,.88) 0%, rgba(11,22,38,.62) 38%, rgba(11,22,38,.18) 68%, rgba(11,22,38,0) 100%),
    linear-gradient(180deg, rgba(11,22,38,0) 55%, rgba(11,22,38,.6) 100%);
}
/* Blueprint grid overlay — subtle, only visible on the dark scrimmed left side */
.mae-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,0) 80%);
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,0) 80%);
  z-index: 1;
}
/* Hairline amber accent at the very top of the hero, like a tape edge */
.mae-hero::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber) 0, var(--amber) 18%, transparent 22%, transparent 100%);
  z-index: 2;
}
.mae-hero .hero-inner {
  position: relative;
  z-index: 3;
  padding: 6rem 0 4.5rem;
}
.mae-hero .hero-inner > .max-w-3xl { position: relative; }
/* Industrial mark above the eyebrow — small "MAE//" tag */
.mae-hero .hero-mark {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .22em;
  color: var(--amber);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1rem;
}
.mae-hero .hero-mark::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--amber);
}
.mae-hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.2vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 1rem 0 1.25rem;
  max-width: 34rem;
}
.mae-hero h1 .amber { color: var(--amber); }
.mae-hero .subtitle {
  color: #e2e8f0;
  font-size: 1.1rem;
  font-weight: 500;
  max-width: 32rem;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}
.mae-hero .hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Hero stat strip — sits at bottom of hero */
.mae-hero-stats {
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(255,255,255,.02) 100%),
    #000b17;
  border-top: 1px solid var(--ink-700);
  color: #e5e7eb;
  position: relative;
}
.mae-hero-stats::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(224,122,25,.5) 50%, transparent 100%);
}
.mae-hero-stats .grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
@media (min-width: 768px) { .mae-hero-stats .grid { grid-template-columns: repeat(4, 1fr); } }
.mae-hero-stats .stat {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid #1a2b44;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.mae-hero-stats .stat::before {
  content: "";
  position: absolute;
  left: 0; top: 1.5rem; bottom: 1.5rem;
  width: 2px;
  background: var(--amber);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .5s var(--ease-out) .15s;
}
.mae-hero-stats .stat.is-visible::before { transform: scaleY(1); }
.mae-hero-stats .stat:last-child { border-right: none; }
@media (max-width: 767px) {
  .mae-hero-stats .stat:nth-child(2) { border-right: none; }
  .mae-hero-stats .stat:nth-child(1),
  .mae-hero-stats .stat:nth-child(2) { border-bottom: 1px solid #1a2b44; }
}
.mae-hero-stats .num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(1.8rem, 2.5vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1;
}
.mae-hero-stats .num .amber-ch { color: var(--amber); }
.mae-hero-stats .label {
  margin-top: .5rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #94a3b8;
}

/* ------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.35rem;
  border-radius: 2px;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out), transform .1s, box-shadow .2s var(--ease-out);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  isolation: isolate;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--amber);
  color: #0b1626;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), inset 0 -2px 0 rgba(0,0,0,.18);
}
.btn-primary:hover {
  background: #f08a25;
  color: #0b1626;
  box-shadow: 0 8px 18px -8px rgba(224,122,25,.55), inset 0 -2px 0 rgba(0,0,0,.18);
  transform: translateY(-1px);
}
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover {
  background: rgba(255,255,255,.06);
  color: var(--amber);
  border-color: var(--amber);
}
.btn-outline { background: #fff; color: var(--ink-900); border-color: var(--ink-900); }
.btn-outline:hover {
  background: var(--ink-900);
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(11,22,38,.4);
  transform: translateY(-1px);
}
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--amber-ink);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
}
.btn-link:hover { color: var(--amber-deep); }
.btn-link::after { content: "→"; transition: transform .15s; }
.btn-link:hover::after { transform: translateX(3px); }

/* ------------------------------------------------------------ product card (home page grid) */

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--ink-800);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out), opacity .25s var(--ease-out);
  text-decoration: none;
  color: inherit;
  position: relative;
  isolation: isolate;
}
.product-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
  z-index: 2;
}
.product-card:hover {
  border-bottom-color: var(--amber);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}
.product-card:hover::before { transform: scaleX(1); }
.product-card[data-hidden="true"] {
  display: none;
}
.product-card.is-fading {
  opacity: 0;
  transform: translateY(8px);
}
.product-card .thumb {
  aspect-ratio: 4/3;
  background:
    radial-gradient(circle at 50% 70%, rgba(224,122,25,.06) 0%, transparent 60%),
    var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  position: relative;
}
.product-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11,22,38,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,22,38,.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: .5;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1.1rem;
  transition: transform .4s var(--ease-out);
  position: relative;
  z-index: 1;
}
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}
.product-card h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--ink-900);
}
.product-card .tag {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber-ink);
  align-self: flex-start;
}
.product-card .desc {
  color: var(--steel-500);
  font-size: .9rem;
  flex: 1;
  line-height: 1.5;
}
.product-card .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line-soft);
  padding-top: .75rem;
  margin-top: .25rem;
}
.product-card .spec-mini {
  font-size: .72rem;
  font-weight: 600;
  color: var(--steel-500);
  letter-spacing: .04em;
}

/* ------------------------------------------------------------ capability / feature tiles */

.capability-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
@media (min-width: 640px) { .capability-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .capability-grid { grid-template-columns: repeat(4, 1fr); } }
.capability {
  background: #fff;
  padding: 1.85rem 1.6rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .2s var(--ease-out);
  position: relative;
}
.capability::after {
  content: "";
  position: absolute;
  left: 1.6rem; right: 1.6rem; bottom: 0;
  height: 2px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.capability:hover::after { transform: scaleX(1); }
@media (min-width: 1024px) {
  .capability:nth-child(4n) { border-right: none; }
  .capability:nth-last-child(-n+4):nth-child(4n+1) ~ .capability,
  .capability:nth-last-child(-n+4) { border-bottom: none; }
}
.capability:hover { background: var(--bg-alt); }
.capability .num-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--amber-ink);
  font-weight: 600;
  letter-spacing: .12em;
  margin-bottom: .5rem;
}
.capability h3 {
  font-size: 1.02rem;
  margin-bottom: .5rem;
  color: var(--ink-900);
}
.capability p { color: var(--steel-500); font-size: .88rem; line-height: 1.55; margin: 0; }

/* ------------------------------------------------------------ industries band */

.industries-band {
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(224,122,25,.08), transparent 60%),
    var(--ink-900);
  color: #e5e7eb;
  position: relative;
  overflow: hidden;
}
.industries-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 30% 50%, rgba(0,0,0,.6) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, rgba(0,0,0,.6) 0%, transparent 70%);
}
.industries-band > * { position: relative; }
.industries-band h2 { color: #fff; }
.industries-band .eyebrow { color: var(--amber); }
.industries-band .eyebrow::before { background: var(--amber); }
.industry-chip {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border: 1px solid var(--ink-700);
  background: rgba(255,255,255,.02);
  color: #fff;
  font-size: .92rem;
  font-weight: 600;
  border-radius: 2px;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), transform .2s var(--ease-out);
}
.industry-chip:hover {
  border-color: var(--amber);
  background: rgba(224,122,25,.06);
  transform: translateX(2px);
}
.industry-chip .dot {
  width: 8px; height: 8px;
  background: var(--amber);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(224,122,25,.15);
}

/* ------------------------------------------------------------ client logo wall */

.clients-intro {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--ink-900);
  padding-bottom: 1rem;
}
.client-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 0;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
@media (min-width: 640px) { .client-wall { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (min-width: 1024px) { .client-wall { grid-template-columns: repeat(6, minmax(0,1fr)); } }
.client-logo {
  background: #fff;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  aspect-ratio: 3/2;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  transition: filter .25s var(--ease-out), opacity .25s var(--ease-out), background .25s var(--ease-out), transform .25s var(--ease-out);
  filter: grayscale(1) contrast(.95);
  opacity: .68;
}
.client-logo:hover {
  filter: none;
  opacity: 1;
  background: var(--bg-alt);
  transform: scale(1.04);
  z-index: 1;
}
.client-logo img {
  width: 85%;
  height: 70%;
  object-fit: contain;
}

/* ------------------------------------------------------------ about section (split) */

.about-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 900px) { .about-split { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }
.about-split .prose p { color: var(--steel-500); margin-bottom: 1rem; line-height: 1.65; }
.about-split .prose strong { color: var(--ink-900); }
.about-fact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 2px solid var(--ink-900);
}
.about-fact-list li {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
}
.about-fact-list li .k {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--amber-ink);
  font-weight: 600;
  padding-top: .12rem;
}
.about-fact-list li .v { color: var(--ink-100); }

/* ------------------------------------------------------------ contact */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--line);
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1.2fr 1fr; } }
.contact-form-panel { padding: 2.25rem; background: #fff; }
@media (min-width: 900px) { .contact-form-panel { padding: 2.75rem; } }
.contact-info-panel {
  background: var(--ink-900);
  color: #e5e7eb;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
@media (min-width: 900px) { .contact-info-panel { padding: 2.75rem; } }
.contact-info-panel h3 { color: #fff; font-size: 1.15rem; margin-bottom: .5rem; }
.contact-info-panel .info-block .label {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--amber); margin-bottom: .35rem;
}
.contact-info-panel a { color: #fff; font-weight: 500; overflow-wrap: anywhere; }
.contact-info-panel a:hover { color: var(--amber); }
.contact-info-panel .hours-line { color: #9aa6b8; font-size: .88rem; }

/* Form controls */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-900);
  margin-bottom: .4rem;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: .8rem .95rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  font-size: .95rem;
  color: var(--ink-100);
  font-family: inherit;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out), background .2s var(--ease-out);
}
.form-input:hover, .form-textarea:hover, .form-select:hover {
  border-color: var(--steel-400);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(224,122,25,.18);
  background: #fffefa;
}
.form-textarea { resize: vertical; min-height: 7rem; }
.form-hint { font-size: .78rem; color: var(--steel-500); margin-top: .4rem; }
.form-field { margin-bottom: 1.1rem; }

/* Alerts */
.alert {
  padding: .9rem 1.1rem;
  border-radius: 2px;
  font-size: .92rem;
  margin-bottom: 1rem;
}
.alert-success { background: #ecfdf5; color: #064e3b; border: 1px solid #a7f3d0; border-left: 4px solid #059669; }
.alert-error { background: #fef2f2; color: #7f1d1d; border: 1px solid #fecaca; border-left: 4px solid #dc2626; }

/* ------------------------------------------------------------ footer */

.mae-footer {
  background: #06101d;
  color: #9aa6b8;
  border-top: 4px solid var(--amber);
}
.mae-footer a { color: #d3dbe8; overflow-wrap: anywhere; }
.mae-footer a:hover { color: #fff; }
.mae-footer .foot-head {
  color: #fff;
  font-weight: 700;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: .85rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--amber);
  display: inline-block;
}
.mae-footer .brand-block picture { display: block; line-height: 0; }
.mae-footer .brand-block img {
  height: 56px;
  width: auto;
  display: block;
}
.mae-footer ul { list-style: none; padding: 0; margin: 0; }
.mae-footer ul li { padding: .28rem 0; font-size: .92rem; }
.mae-footer .legal {
  border-top: 1px solid #132238;
  color: #64748b;
  font-size: .78rem;
}

/* ------------------------------------------------------------ product detail page */

.pd-hero {
  background: var(--ink-900);
  color: #fff;
  border-bottom: 4px solid var(--amber);
  position: relative;
  overflow: hidden;
}
.pd-hero::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(224,122,25,.18), transparent 60%);
  pointer-events: none;
}
.pd-hero .crumb {
  color: #94a3b8;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.pd-hero .crumb a { color: #cbd5e1; }
.pd-hero .crumb a:hover { color: var(--amber); }
.pd-hero .title {
  color: #fff;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  margin-bottom: .75rem;
}
.pd-hero .subtitle { color: #cbd5e1; font-size: 1.08rem; margin-bottom: 1.5rem; max-width: 42rem; line-height: 1.55; }
.pd-hero strong { color: var(--amber); font-weight: 700; }

.pd-imgbox {
  background: #fff;
  border: 1px solid rgba(255,255,255,.12);
  padding: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  min-height: 280px;
  border-radius: 2px;
  position: relative;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.pd-imgbox:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -16px rgba(0,0,0,.45);
}
.pd-imgbox::after {
  content: "CLICK TO ZOOM";
  position: absolute;
  bottom: .55rem; right: .65rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .58rem;
  letter-spacing: .16em;
  font-weight: 700;
  color: var(--steel-500);
  background: rgba(255,255,255,.92);
  padding: .25rem .45rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  opacity: 0;
  transition: opacity .2s var(--ease-out);
  pointer-events: none;
}
.pd-imgbox:hover::after { opacity: 1; }
.pd-imgbox img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform .35s var(--ease-out);
}
.pd-imgbox:hover img { transform: scale(1.03); }

.pd-section { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.pd-section.alt { background: var(--bg-alt); }
.pd-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.1rem;
  padding-bottom: .6rem;
  border-bottom: 3px solid var(--ink-900);
  display: inline-block;
}
.pd-prose p { color: var(--steel-500); margin-bottom: 1rem; line-height: 1.65; }
.pd-prose strong { color: var(--ink-900); }

.pd-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .55rem;
}
.pd-bullets li {
  padding: .55rem 0 .55rem 1.5rem;
  position: relative;
  color: var(--ink-100);
  font-size: .95rem;
  border-bottom: 1px solid var(--line-soft);
}
.pd-bullets li::before {
  content: "";
  position: absolute;
  left: 0; top: .95rem;
  width: 10px; height: 2px;
  background: var(--amber);
}

.pd-specs { width: 100%; border-collapse: collapse; margin-top: 1rem; border-top: 2px solid var(--ink-900); }
.pd-specs tr {
  transition: background .15s var(--ease-out);
}
.pd-specs tbody tr:hover {
  background: rgba(224,122,25,.04);
}
.pd-specs th, .pd-specs td {
  text-align: left;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .92rem;
  vertical-align: top;
}
.pd-specs th {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: .02em;
  width: 40%;
}
.pd-specs tbody tr:hover th { background: #ebe1d2; }
.pd-specs td {
  color: var(--ink-100);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .88rem;
}
.pd-specs td.prose { font-family: inherit; color: var(--steel-500); font-size: .92rem; }

/* Four-cell capability strip used on pd pages */
.pd-four {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  background: #fff;
}
@media (min-width: 900px) { .pd-four { grid-template-columns: repeat(4, 1fr); } }
.pd-four .cell {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pd-four .cell:nth-child(2n) { border-right: none; }
@media (min-width: 900px) {
  .pd-four .cell { border-bottom: none; border-right: 1px solid var(--line); }
  .pd-four .cell:nth-child(2n) { border-right: 1px solid var(--line); }
  .pd-four .cell:last-child { border-right: none; }
}
.pd-four .cell .n {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  color: var(--amber-ink);
  letter-spacing: .1em;
  margin-bottom: .5rem;
}
.pd-four .cell h3 { font-size: 1rem; margin-bottom: .4rem; color: var(--ink-900); }
.pd-four .cell p { color: var(--steel-500); font-size: .88rem; margin: 0; line-height: 1.55; }

/* Grade card — used on PSI page for 9 grades */
.grade-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  padding: 1.1rem 1.25rem;
  border-radius: 2px;
  transition: border-color .15s, background .15s;
}
.grade-card:hover { background: var(--bg-alt); border-left-color: var(--ink-900); }
.grade-card h4 {
  font-size: 1rem;
  margin-bottom: .35rem;
  color: var(--ink-900);
}
.grade-card .color-dot {
  width: 12px; height: 12px;
  display: inline-block;
  margin-right: .4rem;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,.15);
}
.grade-card .desc { color: var(--steel-500); font-size: .88rem; margin-bottom: .55rem; line-height: 1.5; }
.grade-card .meta {
  font-size: .72rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--steel-500);
  border-top: 1px solid var(--line);
  padding-top: .55rem;
  letter-spacing: .05em;
}

/* Feature card — used inside product pages for benefit/application grids */
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink-900);
  border-radius: 2px;
  padding: 1.25rem 1.1rem;
  transition: border-top-color .15s, background .15s;
}
.feature:hover { border-top-color: var(--amber); background: var(--bg-alt); }
.feature h3 { font-size: .98rem; margin-bottom: .35rem; color: var(--ink-900); }
.feature p { color: var(--steel-500); font-size: .88rem; line-height: 1.5; margin: 0; }

/* Step tag (Magic-Wrap installation steps) */
.step-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: #0b1626;
  background: var(--amber-100);
  border-left: 3px solid var(--amber);
  padding: .2rem .5rem;
  margin-bottom: .5rem;
  border-radius: 2px;
}

/* In-content link (brochure download etc.) */
.link {
  color: var(--amber-ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.link:hover { color: var(--amber-deep); border-bottom-color: var(--amber-deep); }

/* Product-page CTA strip */
.pd-cta {
  background: var(--ink-900);
  color: #e5e7eb;
  padding: 3rem 0;
  border-top: 4px solid var(--amber);
  text-align: center;
}
.pd-cta h2 { color: #fff; border-bottom: none; padding-bottom: 0; display: block; }
.pd-cta p { color: #cbd5e1; margin: .5rem auto 1.5rem; max-width: 40rem; }

/* ------------------------------------------------------------ reveal */

.reveal { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.reveal.visible { opacity: 1; transform: none; }

/* ------------------------------------------------------------ utility */

.divider-thick { border-top: 3px solid var(--ink-900); }
.divider-amber { border-top: 3px solid var(--amber); }
.text-amber { color: var(--amber); }
.bg-alt { background: var(--bg-alt); }
.container-narrow { max-width: 68rem; margin-left: auto; margin-right: auto; }

/* ============================================================
   NEW INTERACTIVE COMPONENTS — added in 2026 polish
   ============================================================ */

/* ---------- Scroll progress bar (top of page) ---------- */
.mae-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--amber) 0%, #f59e3a 100%);
  z-index: 60;
  transition: width .08s linear;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(224,122,25,.4);
}

/* ---------- Product filter chips ---------- */
.product-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.product-filter .filter-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel-500);
  align-self: center;
  margin-right: .25rem;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .5rem .85rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-100);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color .15s var(--ease-out), background .15s var(--ease-out), color .15s var(--ease-out), transform .15s var(--ease-out);
  font-family: inherit;
}
.filter-chip .count {
  font-size: .65rem;
  font-weight: 600;
  color: var(--steel-500);
  font-family: 'JetBrains Mono', monospace;
}
.filter-chip:hover {
  border-color: var(--ink-900);
  transform: translateY(-1px);
}
.filter-chip[aria-pressed="true"] {
  background: var(--ink-900);
  color: #fff;
  border-color: var(--ink-900);
}
.filter-chip[aria-pressed="true"] .count { color: var(--amber); }

/* ---------- Back-to-top button ---------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-900);
  color: #fff;
  border: 2px solid var(--amber);
  border-radius: 2px;
  cursor: pointer;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), background .15s var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--amber);
  color: var(--ink-900);
}
.back-to-top svg { width: 18px; height: 18px; stroke-width: 2.5; }

/* ---------- Lightbox (image zoom on product pages) ---------- */
.mae-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 24, .92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease-out);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mae-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mae-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--ink-700);
  box-shadow: 0 32px 80px -20px rgba(0,0,0,.7);
}
.mae-lightbox .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  background: var(--ink-900);
  color: #fff;
  border: 2px solid var(--amber);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .12em;
  transition: background .15s var(--ease-out);
}
.mae-lightbox .close:hover { background: var(--amber); color: var(--ink-900); }

/* ---------- Zoomable image trigger ---------- */
[data-zoom] {
  cursor: zoom-in;
}

/* ---------- Copy-to-clipboard affordance ---------- */
.copy-trigger {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}
.copy-trigger .copy-icon {
  display: inline-flex;
  width: 14px; height: 14px;
  opacity: 0;
  transition: opacity .15s var(--ease-out);
}
.copy-trigger:hover .copy-icon { opacity: .8; }
.copy-trigger.copied::after {
  content: "Copied";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--ink-900);
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .25rem .5rem;
  border-radius: 2px;
  white-space: nowrap;
  animation: copy-tip .9s ease-in-out forwards;
}
@keyframes copy-tip {
  0%   { opacity: 0; transform: translate(-50%, 4px); }
  20%  { opacity: 1; transform: translate(-50%, 0); }
  80%  { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -4px); }
}

/* ---------- Hero counter (number ticking up) ---------- */
.mae-hero-stats .num.is-counting {
  font-variant-numeric: tabular-nums;
}

/* ---------- Smarter reveal — slight stagger for grid children ---------- */
.reveal.stagger-children > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .4s var(--ease-out), transform .4s var(--ease-out);
}
.reveal.stagger-children.visible > * {
  opacity: 1;
  transform: none;
}
.reveal.stagger-children.visible > *:nth-child(1) { transition-delay: .04s; }
.reveal.stagger-children.visible > *:nth-child(2) { transition-delay: .10s; }
.reveal.stagger-children.visible > *:nth-child(3) { transition-delay: .16s; }
.reveal.stagger-children.visible > *:nth-child(4) { transition-delay: .22s; }
.reveal.stagger-children.visible > *:nth-child(5) { transition-delay: .28s; }
.reveal.stagger-children.visible > *:nth-child(6) { transition-delay: .34s; }
.reveal.stagger-children.visible > *:nth-child(7) { transition-delay: .40s; }
.reveal.stagger-children.visible > *:nth-child(8) { transition-delay: .46s; }

/* ---------- Empty filter result state ---------- */
.products-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--steel-500);
  border: 1px dashed var(--line);
  background: var(--bg-alt);
  font-size: .92rem;
}
.products-empty .mono {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-bottom: .5rem;
}

/* ---------- Improved focus on interactive cards ---------- */
.product-card:focus-visible,
.filter-chip:focus-visible,
.back-to-top:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- Mobile spacing tweaks ---------- */
@media (max-width: 640px) {
  .section { padding: 3rem 0; }
  .section-tight { padding: 2.5rem 0; }
  .product-filter { gap: .35rem; }
  .filter-chip { padding: .45rem .7rem; font-size: .68rem; }
  .back-to-top { right: 1rem; bottom: 1rem; }
  .clients-intro p.section-lede { text-align: left !important; }
}

/* ---------- Image fade-in on load (progressive) ---------- */
img[data-fade] {
  opacity: 0;
  transition: opacity .35s var(--ease-out);
}
img[data-fade].is-loaded { opacity: 1; }
