/* Empire Control Systems — empctrl.com
 * Hand-written modern CSS. No build step. Drop on any web server.
 * Edit color tokens below to retheme. */

:root {
  --navy-950: #050d1a;
  --navy-900: #0a1628;
  --navy-800: #142340;
  --navy-700: #1f3358;
  --navy-100: #e6ecf5;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --green-600: #059669;
  --red-600: #dc2626;
  --white: #ffffff;

  --c-bg: var(--white);
  --c-bg-alt: var(--slate-50);
  --c-bg-dark: var(--navy-900);
  --c-bg-darker: var(--navy-950);
  --c-text: var(--slate-900);
  --c-text-muted: var(--slate-600);
  --c-text-subtle: var(--slate-500);
  --c-text-inv: var(--white);
  --c-text-inv-muted: var(--slate-300);
  --c-border: var(--slate-200);
  --c-border-strong: var(--slate-300);
  --c-brand: var(--navy-900);
  --c-accent: var(--amber-600);
  --c-accent-hover: #b45309;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow: 0 4px 12px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 16px 40px rgb(15 23 42 / 0.12);

  --container: 1200px;
  --container-narrow: 880px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;
  --space-16: 128px;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--c-brand);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--c-accent); }

h1, h2, h3, h4, h5 {
  margin: 0 0 0.5em;
  color: var(--c-text);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.15;
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.375rem; letter-spacing: -0.01em; }
h4 { font-size: 1.125rem; letter-spacing: 0; font-weight: 600; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: 0.25em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container--narrow { max-width: var(--container-narrow); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--space-3);
}

.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--c-text-muted);
  max-width: 65ch;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--c-accent);
  color: var(--white);
}
.btn--primary:hover { background: var(--c-accent-hover); color: var(--white); }
.btn--brand {
  background: var(--c-brand);
  color: var(--white);
}
.btn--brand:hover { background: var(--navy-800); color: var(--white); }
.btn--ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border-strong);
}
.btn--ghost:hover { border-color: var(--c-text); color: var(--c-text); }
.btn--ghost-inv {
  background: transparent;
  color: var(--white);
  border-color: rgb(255 255 255 / 0.3);
}
.btn--ghost-inv:hover {
  border-color: var(--white);
  color: var(--white);
  background: rgb(255 255 255 / 0.08);
}

/* Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: 72px;
}
.nav__logo { display: flex; align-items: center; }
.nav__logo img { height: 36px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--slate-700);
}
.nav__links a:hover { color: var(--c-brand); background: var(--slate-100); }
.nav__links a.is-active { color: var(--c-brand); background: var(--slate-100); }
.nav__cta { margin-left: var(--space-3); }
.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-text);
  position: relative;
  transition: transform 0.2s, top 0.2s;
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }

@media (max-width: 900px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--c-border);
    padding: var(--space-3) var(--space-5) var(--space-5);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { padding: 12px 14px; font-size: 1rem; }
  .nav__cta { margin: var(--space-2) 0 0; align-self: flex-start; }
}

/* Hero */
.hero {
  position: relative;
  background: var(--c-bg-dark);
  color: var(--c-text-inv);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(217, 119, 6, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(5, 13, 26, 0.6) 0%, rgba(5, 13, 26, 0.95) 100%);
}
.hero__inner {
  padding: clamp(64px, 10vw, 140px) 0 clamp(72px, 12vw, 160px);
  max-width: 780px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: var(--space-5);
}
.hero .lead {
  color: var(--c-text-inv-muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.3125rem);
  margin-bottom: var(--space-6);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.hero--compact .hero__inner {
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 112px);
}

/* Sections */
.section {
  padding: clamp(64px, 9vw, 112px) 0;
}
.section--alt { background: var(--c-bg-alt); }
.section--dark {
  background: var(--c-bg-dark);
  color: var(--c-text-inv);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--white); }
.section--dark .lead { color: var(--c-text-inv-muted); }

.section__head {
  max-width: 720px;
  margin-bottom: var(--space-8);
}
.section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* Card grid */
.grid {
  display: grid;
  gap: var(--space-5);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--c-border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: var(--white);
  border-radius: var(--radius);
  margin-bottom: var(--space-5);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--c-text-muted); }
.card__link {
  margin-top: auto;
  padding-top: var(--space-5);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--c-brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card__link::after {
  content: "→";
  transition: transform 0.15s;
}
.card__link:hover::after { transform: translateX(3px); }

/* Stats / Numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-6);
}
.stat__num {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--c-accent);
  margin-bottom: var(--space-2);
}
.stat__label {
  font-size: 0.9375rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.section--dark .stat__label { color: var(--c-text-inv-muted); }

/* Feature lists */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3) var(--space-5);
}
.feature-list li {
  position: relative;
  padding-left: 30px;
  margin: 0;
  color: var(--c-text-muted);
  line-height: 1.5;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M6.5 11.5L3 8l1.4-1.4L6.5 8.7l5.1-5.1L13 5z'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 14px;
}
.section--dark .feature-list li { color: var(--c-text-inv-muted); }

/* Image gallery (home hero strip below fold) */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-3);
}
.gallery figure {
  margin: 0;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--slate-100);
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-5) var(--space-4) var(--space-3);
  background: linear-gradient(0deg, rgba(5, 13, 26, 0.9), transparent);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Article body for service detail pages */
.prose {
  max-width: 70ch;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--c-text);
}
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.75em; color: var(--c-brand); }
.prose h4 { margin-top: 1.5em; font-weight: 700; color: var(--c-brand); }
.prose p, .prose ul, .prose ol { color: var(--c-text-muted); }
.prose strong { color: var(--c-text); font-weight: 600; }
.prose ul li::marker { color: var(--c-accent); }

.layout-two {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 960px) {
  .layout-two { grid-template-columns: minmax(0, 1fr) 280px; gap: var(--space-10); }
}
.aside-card {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  font-size: 0.9375rem;
}
.aside-card h4 {
  margin: 0 0 var(--space-3);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-subtle);
  font-weight: 700;
}
.aside-card p { color: var(--c-text-muted); }
.aside-card a { font-weight: 600; }
.aside-card + .aside-card { margin-top: var(--space-4); }

/* Form */
.form {
  display: grid;
  gap: var(--space-4);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--c-text);
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgb(217 119 6 / 0.15);
}
.field textarea { min-height: 140px; resize: vertical; }
.field--check { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.field--check input { width: auto; }

/* Contact split */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-10); }
}
.contact-info dl {
  margin: 0;
  display: grid;
  gap: var(--space-4);
}
.contact-info dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-subtle);
  font-weight: 700;
  margin-bottom: 2px;
}
.contact-info dd {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--c-text);
}
.contact-info dd a { color: var(--c-text); }
.contact-info dd a:hover { color: var(--c-accent); }

.team-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
.team-list li {
  margin: 0;
  padding: var(--space-4);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--white);
}
.team-list .name {
  font-weight: 600;
  color: var(--c-text);
  font-size: 0.9375rem;
}
.team-list .email {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  word-break: break-all;
}

/* Downloads */
.downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
}
.downloads a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--c-text);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color 0.15s, transform 0.15s;
}
.downloads a:hover {
  border-color: var(--c-accent);
  color: var(--c-text);
  transform: translateY(-1px);
}
.downloads__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--slate-100);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--c-brand);
}
.downloads__meta {
  display: block;
  font-size: 0.8125rem;
  color: var(--c-text-subtle);
  font-weight: 400;
  margin-top: 2px;
}

/* CTA strip */
.cta-strip {
  background:
    radial-gradient(ellipse at 80% 50%, rgba(217, 119, 6, 0.25), transparent 60%),
    linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 800px) {
  .cta-strip { grid-template-columns: minmax(0, 1.3fr) auto; }
}
.cta-strip h2 { color: var(--white); margin-bottom: var(--space-3); }
.cta-strip p { color: var(--c-text-inv-muted); margin: 0; }

/* Footer */
.site-footer {
  background: var(--c-bg-darker);
  color: var(--c-text-inv-muted);
  padding: var(--space-10) 0 var(--space-6);
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}
.site-footer h4 {
  color: var(--white);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: var(--space-2); }
.site-footer a {
  color: var(--c-text-inv-muted);
  font-size: 0.9375rem;
}
.site-footer a:hover { color: var(--white); }
.footer-brand img { height: 40px; margin-bottom: var(--space-4); filter: brightness(0) invert(1); opacity: 0.95; }
.footer-brand p { font-size: 0.875rem; max-width: 30ch; }
.footer-bottom {
  border-top: 1px solid rgb(255 255 255 / 0.08);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.8125rem;
  color: var(--slate-500);
}

/* Inline industry chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.chips li {
  margin: 0;
  padding: 6px 14px;
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text);
}
.section--dark .chips li { background: rgb(255 255 255 / 0.08); color: var(--white); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--c-brand);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
}

/* Subtle divider */
.divider {
  height: 1px;
  background: var(--c-border);
  border: 0;
  margin: var(--space-8) 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
