/* VertexOps Industrial Systems — marketing site
   Single stylesheet, no build step, no external requests. Dark-first because the
   product screenshots are dark; light mode is a full second theme, not an afterthought. */

:root {
  color-scheme: dark light;

  --bg:            #0b0e13;
  --bg-elevated:   #12161e;
  --bg-sunken:     #080a0e;
  --surface:       #161b25;
  --surface-hover: #1c222e;
  --border:        #232a36;
  --border-strong: #313a4a;

  --text:          #e8ecf3;
  --text-muted:    #99a3b3;
  --text-faint:    #6b7585;

  --accent:        #3da9fc;
  --accent-hover:  #64bcff;
  --accent-dim:    rgba(61, 169, 252, 0.12);
  --accent-line:   rgba(61, 169, 252, 0.35);
  --steel:         #f2a541;
  --steel-dim:     rgba(242, 165, 65, 0.14);
  --good:          #3ecf8e;

  --radius:        10px;
  --radius-lg:     16px;
  --maxw:          1180px;
  --gutter:        clamp(20px, 5vw, 48px);

  --shadow:        0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35);
  --shadow-lift:   0 2px 6px rgba(0,0,0,.45), 0 20px 48px rgba(0,0,0,.45);

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

@media (prefers-color-scheme: light) {
  :root {
    --bg:            #ffffff;
    --bg-elevated:   #f7f9fc;
    --bg-sunken:     #eef2f7;
    --surface:       #ffffff;
    --surface-hover: #f4f7fb;
    --border:        #dfe5ee;
    --border-strong: #c6d0de;
    --text:          #101720;
    --text-muted:    #4d5a6c;
    --text-faint:    #778395;
    --accent:        #0b6ec4;
    --accent-hover:  #0959a0;
    --accent-dim:    rgba(11, 110, 196, 0.09);
    --accent-line:   rgba(11, 110, 196, 0.3);
    --steel:         #b26a00;
    --steel-dim:     rgba(178, 106, 0, 0.1);
    --good:          #14804a;
    --shadow:        0 1px 2px rgba(16,23,32,.06), 0 8px 24px rgba(16,23,32,.08);
    --shadow-lift:   0 2px 8px rgba(16,23,32,.1), 0 20px 44px rgba(16,23,32,.12);
  }
}

/* Explicit toggle overrides the media query in both directions. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:#ffffff; --bg-elevated:#f7f9fc; --bg-sunken:#eef2f7; --surface:#ffffff;
  --surface-hover:#f4f7fb; --border:#dfe5ee; --border-strong:#c6d0de;
  --text:#101720; --text-muted:#4d5a6c; --text-faint:#778395;
  --accent:#0b6ec4; --accent-hover:#0959a0; --accent-dim:rgba(11,110,196,.09);
  --accent-line:rgba(11,110,196,.3); --steel:#b26a00; --steel-dim:rgba(178,106,0,.1);
  --good:#14804a;
  --shadow:0 1px 2px rgba(16,23,32,.06), 0 8px 24px rgba(16,23,32,.08);
  --shadow-lift:0 2px 8px rgba(16,23,32,.1), 0 20px 44px rgba(16,23,32,.12);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0b0e13; --bg-elevated:#12161e; --bg-sunken:#080a0e; --surface:#161b25;
  --surface-hover:#1c222e; --border:#232a36; --border-strong:#313a4a;
  --text:#e8ecf3; --text-muted:#99a3b3; --text-faint:#6b7585;
  --accent:#3da9fc; --accent-hover:#64bcff; --accent-dim:rgba(61,169,252,.12);
  --accent-line:rgba(61,169,252,.35); --steel:#f2a541; --steel-dim:rgba(242,165,65,.14);
  --good:#3ecf8e;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35);
  --shadow-lift:0 2px 6px rgba(0,0,0,.45), 0 20px 48px rgba(0,0,0,.45);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 650; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); letter-spacing: -.028em; }
h3 { font-size: clamp(1.12rem, 1.9vw, 1.32rem); }
h4 { font-size: 1rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
strong { font-weight: 650; color: var(--text); }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-sunken);
       padding: .12em .4em; border-radius: 4px; border: 1px solid var(--border); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: .875rem; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 18px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ── header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px; height: 66px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700;
         letter-spacing: -.02em; color: var(--text); font-size: 1.02rem; }
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--steel)));
  color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: -.04em;
}
.brand-sub { color: var(--text-faint); font-weight: 500; font-size: .8rem;
             border-left: 1px solid var(--border-strong); padding-left: 11px; }
@media (max-width: 760px) { .brand-sub { display: none; } }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text-muted); font-size: .92rem; font-weight: 500;
  padding: 8px 12px; border-radius: 7px;
}
.nav a:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
@media (max-width: 900px) { .nav .nav-hide { display: none; } }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  border-radius: 8px; cursor: pointer; font-size: 15px; line-height: 1;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 9px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: all .16s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px);
                     box-shadow: var(--shadow-lift); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-sm { padding: 8px 15px; font-size: .875rem; }

/* ── hero ────────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: clamp(56px, 9vw, 104px) 0 clamp(40px, 6vw, 72px);
        overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 620px;
  background: radial-gradient(60% 60% at 30% 0%, var(--accent-dim), transparent 70%),
              radial-gradient(45% 45% at 78% 12%, var(--steel-dim), transparent 72%);
  pointer-events: none; z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: clamp(32px, 5vw, 60px); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.02fr .98fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  padding: 6px 13px; border-radius: 100px; margin-bottom: 20px;
}
.hero h1 { margin-bottom: 20px; text-wrap: balance; }
.hero-lede { font-size: clamp(1.05rem, 1.7vw, 1.22rem); color: var(--text-muted);
             max-width: 34em; margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-note { font-size: .875rem; color: var(--text-faint); display: flex;
             align-items: center; gap: 8px; flex-wrap: wrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none;
       box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }

.hero-shot {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift); background: var(--bg-sunken);
}
.hero-shot img { width: 100%; }

/* ── sections ────────────────────────────────────────────────────────────── */
section { padding: clamp(52px, 8vw, 92px) 0; }
section.alt { background: var(--bg-elevated); border-block: 1px solid var(--border); }
.section-head { max-width: 44em; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head.center { margin-inline: auto; }
.section-kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 12px;
}
.section-head p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 0; }

/* ── territory ───────────────────────────────────────────────────────────── */
.territory { display: grid; gap: 20px; }
@media (min-width: 860px) { .territory { grid-template-columns: 1fr 1fr; } }
.terr-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px;
  background: var(--surface); position: relative; overflow: hidden;
}
.terr-card.primary { border-color: var(--accent-line); }
.terr-card.primary::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.terr-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 5px; margin-bottom: 14px;
}
.terr-badge.near { background: var(--accent-dim); color: var(--accent);
                   border: 1px solid var(--accent-line); }
.terr-badge.far  { background: var(--steel-dim); color: var(--steel);
                   border: 1px solid color-mix(in srgb, var(--steel) 35%, transparent); }
.terr-card h3 { margin-bottom: 10px; }
.terr-card p:last-child { margin-bottom: 0; }
.terr-list { list-style: none; padding: 0; margin: 16px 0 0; }
.terr-list li { padding-left: 24px; position: relative; color: var(--text-muted);
                font-size: .95rem; }
.terr-list li::before {
  content: "→"; position: absolute; left: 0; top: 0; color: var(--accent);
  font-weight: 700;
}

/* ── capability grid ─────────────────────────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }

.card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  background: var(--surface); transition: border-color .16s, transform .16s, box-shadow .16s;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px);
              box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; font-size: 1.08rem; }
.card p { color: var(--text-muted); font-size: .95rem; margin-bottom: 0; }
.card-icon {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-dim); color: var(--accent); margin-bottom: 15px;
  border: 1px solid var(--accent-line); font-size: 18px;
}

/* ── work / portfolio ────────────────────────────────────────────────────── */
.work-grid { display: grid; gap: 24px; }
@media (min-width: 720px)  { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .work-grid { grid-template-columns: repeat(3, 1fr); } }

.work-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); display: flex; flex-direction: column;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.work-card:hover { border-color: var(--border-strong); transform: translateY(-3px);
                   box-shadow: var(--shadow-lift); }
.work-shot {
  position: relative; aspect-ratio: 16 / 9; background: var(--bg-sunken);
  border-bottom: 1px solid var(--border); overflow: hidden; cursor: zoom-in;
  width: 100%; padding: 0; border-inline: 0; border-top: 0; display: block;
}
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left;
                 transition: transform .4s ease; }
.work-card:hover .work-shot img { transform: scale(1.03); }
.work-shot.no-image {
  display: grid; place-items: center; cursor: default;
  background: repeating-linear-gradient(45deg, var(--bg-sunken) 0 12px,
              var(--bg-elevated) 12px 24px);
  color: var(--text-faint); font-size: .82rem; text-align: center; padding: 20px;
}
.work-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.work-domain {
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 8px;
}
.work-body h3 { font-size: 1.06rem; margin-bottom: 8px; }
.work-body > p { color: var(--text-muted); font-size: .93rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag {
  font-size: .74rem; padding: 3px 9px; border-radius: 5px;
  background: var(--bg-sunken); border: 1px solid var(--border); color: var(--text-muted);
  font-family: var(--mono);
}

/* ── proof strip ─────────────────────────────────────────────────────────── */
.proof { display: grid; gap: 1px; background: var(--border);
         border: 1px solid var(--border); border-radius: var(--radius-lg);
         overflow: hidden; }
@media (min-width: 640px) { .proof { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .proof { grid-template-columns: repeat(4, 1fr); } }
.proof-item { background: var(--surface); padding: 26px 22px; }
.proof-num { font-size: 2rem; font-weight: 700; letter-spacing: -.04em; color: var(--accent);
             line-height: 1.1; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.proof-label { font-size: .9rem; color: var(--text-muted); }

/* ── process ─────────────────────────────────────────────────────────────── */
.steps { display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { position: relative; padding-top: 46px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  color: var(--accent); font-weight: 700; font-size: .95rem;
}
.step h3 { font-size: 1.02rem; margin-bottom: 7px; }
.step p { color: var(--text-muted); font-size: .93rem; margin-bottom: 0; }

/* ── stack ───────────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: .85rem; padding: 7px 14px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
}

/* ── contact ─────────────────────────────────────────────────────────────── */
.contact-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card {
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 34px); background: var(--surface); box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px;
               color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%; padding: 11px 13px; border-radius: 8px; font: inherit; font-size: .95rem;
  background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field textarea { min-height: 118px; resize: vertical; }
.field-hint { font-size: .8rem; color: var(--text-faint); margin-top: 5px; }
.form-note {
  margin-top: 14px; padding: 12px 14px; border-radius: 8px; font-size: .86rem;
  background: var(--steel-dim); border: 1px solid color-mix(in srgb, var(--steel) 30%, transparent);
  color: var(--text-muted);
}

.contact-detail { list-style: none; padding: 0; margin: 20px 0 0; }
.contact-detail li { display: flex; gap: 12px; padding: 13px 0;
                     border-top: 1px solid var(--border); font-size: .95rem; }
.contact-detail li:last-child { border-bottom: 1px solid var(--border); }
.contact-detail .k { color: var(--text-faint); min-width: 108px; flex: none; }
.contact-detail .v { color: var(--text); }
.todo { color: var(--steel); font-family: var(--mono); font-size: .86rem; }

/* ── lightbox ────────────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  background: rgba(4, 6, 10, .92); padding: clamp(16px, 4vw, 48px);
  place-items: center; backdrop-filter: blur(6px);
}
.lightbox[open], .lightbox.is-open { display: grid; }
.lightbox img {
  max-width: 100%; max-height: 82vh; border-radius: var(--radius);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lift);
  object-fit: contain;
}
.lightbox-cap { color: #cfd6e2; text-align: center; margin-top: 14px; font-size: .92rem; }
.lightbox-close {
  position: absolute; top: 18px; right: 22px; width: 40px; height: 40px;
  border-radius: 9px; border: 1px solid rgba(255,255,255,.2); cursor: pointer;
  background: rgba(255,255,255,.08); color: #fff; font-size: 20px; line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,.16); }

/* ── footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-sunken);
  padding: 44px 0 30px; font-size: .9rem; color: var(--text-muted);
}
.footer-grid { display: grid; gap: 26px; margin-bottom: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
                  color: var(--text-faint); margin-bottom: 12px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: .84rem; color: var(--text-faint);
}

/* ── utility ─────────────────────────────────────────────────────────────── */
.stack-sm > * + * { margin-top: 8px; }
.mt-lg { margin-top: 36px; }
.hr { height: 1px; background: var(--border); border: 0; margin: 40px 0; }
.scroll-x { overflow-x: auto; }

@media print {
  .site-header, .nav, .lightbox, .hero::before { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Honeypot field: off-screen rather than display:none, because some bots skip
   hidden inputs but happily fill positioned ones. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Inline SVG card icons. They inherit the chip's accent colour via currentColor,
   so a single asset follows both the light and dark theme. */
.card-icon svg { width: 21px; height: 21px; display: block; }

/* ── page tabs ───────────────────────────────────────────────────────────────
   Each nav item is now a real page rather than an anchor on one long scroll, so
   the header behaves as a tab bar: the current page is marked, and the tabs must
   survive on mobile. The old rule hid them below 900px, which was harmless when
   everything lived on one scrolling page but would leave a phone with no way to
   navigate at all. */

.nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-hover);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.nav a.btn[aria-current="page"] { box-shadow: none; }

@media (max-width: 900px) {
  /* Override the hide: wrap the tabs onto a second row and let them scroll. */
  .nav .nav-hide { display: inline-block; }
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-block: 10px; gap: 10px; }
  .brand-sub { display: none; }
  .nav {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 7px 10px; font-size: .87rem; }
}
