@charset "utf-8";

/* ==========================================================================
   Matrix Computer Services
   Dark, editorial, terminal-influenced. No framework, no dependencies.
   ========================================================================== */

:root {
  --ground:    #0a0d12;
  --surface:   #111720;
  --surface-2: #19212c;
  --surface-3: #212b38;

  --ink:       #e9eef4;
  --ink-2:     #9dabba;
  --ink-3:     #6c7a88;

  --rule:      #222c39;
  --rule-2:    #33404f;

  --phos:      #ffb454;
  --phos-2:    #e0912f;
  --phos-soft: rgba(255, 180, 84, .10);
  --phos-line: rgba(255, 180, 84, .34);

  --sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", "Liberation Mono", monospace;

  --shell: 1200px;
  --measure: 66ch;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img { max-width: 100%; height: auto; border: 0; display: block; }

a { color: var(--phos); text-decoration-color: var(--phos-line); text-underline-offset: 3px; }
a:hover { color: #ffc87e; }

::selection { background: var(--phos); color: #1a1000; }

h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -0.028em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); letter-spacing: -0.026em; }
h3 { font-size: 1.2rem; letter-spacing: -0.012em; font-weight: 620; }

p { margin: 0 0 1.15rem; max-width: var(--measure); }

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--phos);
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--phos);
  flex: none;
}

.lede { font-size: clamp(1.08rem, 1.7vw, 1.32rem); color: var(--ink-2); max-width: 58ch; line-height: 1.55; }

/* ---------------------------------------------------------------- header */

#masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 13, 18, .82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
#masthead .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 640;
  letter-spacing: -0.022em;
  font-size: 1.04rem;
  white-space: nowrap;
}
.wordmark .mark {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--phos);
  border: 1px solid var(--phos-line);
  background: var(--phos-soft);
  border-radius: 5px;
  padding: 4px 7px;
  line-height: 1;
}
.wordmark .full { display: inline; }
.wordmark .short { display: none; }

nav.primary { display: flex; align-items: center; gap: 3px; }
nav.primary a {
  padding: 8px 13px;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .14s, background .14s;
}
nav.primary a:hover { color: var(--ink); background: var(--surface-2); }
nav.primary a.cta {
  margin-left: 10px;
  background: var(--phos);
  color: #171003;
  font-weight: 620;
}
nav.primary a.cta:hover { background: #ffc87e; color: #171003; }

.nav-toggle { display: none; }

/* ---------------------------------------------------------------- sections */

section { padding: 108px 0; position: relative; }
section + section { border-top: 1px solid var(--rule); }
section.pad-sm { padding: 76px 0; }

.section-head { margin-bottom: 52px; max-width: 62ch; }
.section-head p { color: var(--ink-2); margin-top: 16px; font-size: 1.06rem; }

/* reveal on scroll — no-JS safe, .reveal only added when JS runs */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

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

#hero {
  padding: 132px 0 96px;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: "";
  position: absolute;
  top: -30%; left: 50%;
  width: 900px; height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,180,84,.11), transparent 66%);
  pointer-events: none;
}
#hero .shell { position: relative; }
#hero h1 { max-width: 17ch; }
#hero h1 em { font-style: normal; color: var(--phos); }
#hero .lede { margin-top: 26px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }

.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 7px;
  font-weight: 580;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background .14s, border-color .14s, color .14s;
}
.btn-primary { background: var(--phos); color: #171003; }
.btn-primary:hover { background: #ffc87e; color: #171003; }
.btn-ghost { border-color: var(--rule-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--phos); color: var(--phos); }

.stat-rail {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 44px;
  justify-content: start;
  margin-top: 62px;
  padding-top: 30px;
  border-top: 1px solid var(--rule);
}
.stat-rail div { display: flex; flex-direction: column; gap: 3px; }
.stat-rail b {
  font-family: var(--mono);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--phos);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-rail span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- services */

.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.service {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 34px 32px 30px;
  display: flex;
  flex-direction: column;
  transition: border-color .18s, transform .18s;
}
.service:hover { border-color: var(--rule-2); transform: translateY(-2px); }
.service.lead { border-color: var(--phos-line); background: linear-gradient(180deg, var(--phos-soft), transparent 42%), var(--surface); }

.service .tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.service.lead .tag { color: var(--phos); }
.service h3 { font-size: 1.55rem; letter-spacing: -0.022em; font-weight: 620; }
.service > p { margin-top: 14px; color: var(--ink-2); font-size: 15.5px; }
.service .grow { flex: 1; }

.stack {
  list-style: none;
  margin: 22px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.stack li {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  border-radius: 20px;
  color: var(--ink-2);
  background: var(--surface-2);
}
.stack.wide { border-top: 0; padding-top: 0; margin-top: 18px; }

/* ---------------------------------------------------------------- scrub */

.scrub {
  --pos: 50%;
  position: relative;
  border: 1px solid var(--rule-2);
  border-radius: 12px;
  overflow: hidden;
  background: #05080c;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.scrub.is-dragging { cursor: grabbing; }

.scrub-pane { position: relative; height: 440px; }
.scrub-pane > .pane { position: absolute; inset: 0; overflow: hidden; }

/* The "after" pane sits underneath at full width; the "before" pane is laid
   over it at full width and CLIPPED, never resized — resizing reflows the
   monospace text on every frame of the drag. */
.pane-after { z-index: 1; }
.pane-before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.scrub-line {
  position: absolute; top: 0; bottom: 0;
  left: var(--pos);
  width: 2px; margin-left: -1px;
  background: var(--phos);
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 18px rgba(255,180,84,.55);
}

.scrub-label {
  position: absolute;
  bottom: 14px;
  z-index: 5;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 20px;
  pointer-events: none;
}
.label-before { left: 14px; background: rgba(255,180,84,.14); color: var(--phos); border: 1px solid var(--phos-line); }
.label-after  { right: 14px; background: rgba(15,20,27,.9); color: var(--ink-2); border: 1px solid var(--rule-2); }

.scrub-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos);
  width: 46px; margin-left: -23px;
  z-index: 6;
  cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; padding: 0;
}
.scrub-handle span {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--phos);
  color: #1a1000;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 700;
  box-shadow: 0 3px 16px rgba(0,0,0,.6);
}
.scrub-handle:focus-visible span { outline: 3px solid #fff; outline-offset: 3px; }

.dos {
  height: 100%;
  background: #05080c;
  color: var(--phos);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  padding: 24px 26px;
  white-space: pre;
  overflow: hidden;
  text-shadow: 0 0 10px rgba(255,180,84,.34);
}
.dos .dim { color: #8a6427; text-shadow: none; }
.dos .rev { background: var(--phos); color: #05080c; text-shadow: none; }

.modern { height: 100%; background: var(--surface); padding: 24px 26px; overflow: hidden; }
.modern .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--rule);
}
.modern .bar strong { font-size: 14.5px; font-weight: 620; }
.modern .bar em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: #6cc79b; }
.modern table { width: 100%; border-collapse: collapse; font-size: 13px; }
.modern th {
  text-align: left; font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); padding: 0 10px 9px 0; border-bottom: 1px solid var(--rule); font-weight: 600;
}
.modern td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.modern td:first-child { color: var(--ink); font-family: var(--mono); font-size: 12px; }
.modern .num { text-align: right; font-variant-numeric: tabular-nums; }
.modern .pill { font-size: 10px; padding: 3px 9px; border-radius: 20px; background: rgba(108,199,155,.14); color: #6cc79b; font-weight: 600; }
.modern .pill.warn { background: var(--phos-soft); color: var(--phos); }

.scrub-note { margin-top: 20px; font-size: 15px; color: var(--ink-3); max-width: 62ch; }

/* ---------------------------------------------------------------- timeline */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 96px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--rule-2) 8%, var(--rule-2) 92%, transparent);
}

.tl-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0 40px;
  padding: 26px 0;
  position: relative;
}
.tl-item::after {
  content: "";
  position: absolute;
  left: 92px; top: 34px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--rule-2);
  border: 2px solid var(--ground);
}
.tl-item.now::after { background: var(--phos); box-shadow: 0 0 14px rgba(255,180,84,.7); }

.tl-year {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-align: right;
  padding-top: 2px;
}
.tl-item.now .tl-year { color: var(--phos); }
.tl-body h3 { margin-bottom: 7px; }
.tl-body p { color: var(--ink-2); margin: 0; font-size: 15.5px; }
.tl-tech { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-top: 10px; letter-spacing: 0.03em; }

/* ---------------------------------------------------------------- engage */

.engage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.engage .col { padding: 26px 24px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.engage .col h3 { margin-bottom: 10px; }
.engage .col p { color: var(--ink-2); font-size: 15px; margin: 0; }

.method {
  margin-top: 34px;
  padding: 30px 32px;
  border: 1px solid var(--phos-line);
  background: linear-gradient(180deg, var(--phos-soft), transparent 60%), var(--surface);
  border-radius: 10px;
}
.method p { margin: 0; max-width: 74ch; color: var(--ink-2); }
.method p + p { margin-top: 11px; }

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

#colophon { background: var(--surface); border-top: 1px solid var(--rule); padding: 54px 0 40px; font-size: 14.5px; }
#colophon .rows { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; align-items: baseline; }
#colophon nav a { margin-right: 20px; text-decoration: none; color: var(--ink-2); }
#colophon nav a:hover { color: var(--phos); }
#colophon .legal { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--ink-3); }

/* ---------------------------------------------------------------- inner pages */

.page-head { padding: 96px 0 46px; position: relative; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; }
.page-head .lede { margin-top: 20px; }

.page-body { padding: 34px 0 104px; }
.page-body > .shell > h2 { margin: 58px 0 14px; }
.page-body > .shell > h2:first-child { margin-top: 0; }
.page-body p { color: var(--ink-2); }
.page-body strong { color: var(--ink); font-weight: 600; }

.pull {
  margin: 40px 0;
  padding: 26px 30px;
  border-left: 2px solid var(--phos);
  background: var(--phos-soft);
  border-radius: 0 10px 10px 0;
}
.pull p { margin: 0; font-size: 1.2rem; color: var(--ink); max-width: 58ch; font-weight: 500; letter-spacing: -0.012em; }

.svc-block { padding: 0 0 26px; margin-bottom: 52px; border-bottom: 1px solid var(--rule); }
.svc-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--phos);
  margin-bottom: 14px;
}
.svc-block h2 { margin: 0 0 12px; }
.svc-block h3 { margin: 34px 0 14px; }
.svc-lede { font-size: 1.16rem; color: var(--ink); max-width: 60ch; letter-spacing: -0.012em; }

.cap-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.cap-grid li { background: var(--surface); padding: 18px 20px; margin: 0; display: flex; flex-direction: column; gap: 5px; }
.cap-grid strong { font-size: 14.5px; font-weight: 620; color: var(--ink); }
.cap-grid span { font-size: 14px; color: var(--ink-3); line-height: 1.5; }

ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
ol.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 18px; color: var(--ink-2); }
ol.steps > li strong { color: var(--ink); }
ol.steps > li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 2px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 700;
  color: var(--phos);
}

.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin: 26px 0 10px; }
.two-col h3 { margin: 0 0 12px; }
.two-col ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.two-col li { margin-bottom: 7px; }

/* client logos are dark-on-white artwork — give them a light plate */
.logo-wall {
  list-style: none; margin: 0 0 48px; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
.logo-wall li { margin: 0; }
.logo-wall a, .logo-wall span {
  display: flex; align-items: center; justify-content: center;
  height: 108px; padding: 18px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--rule);
  filter: grayscale(1);
  opacity: .74;
  transition: filter .2s, opacity .2s, transform .2s;
}
.logo-wall a:hover { filter: none; opacity: 1; transform: translateY(-2px); }
.logo-wall img { max-height: 100%; max-width: 100%; object-fit: contain; }

.contact-grid { display: grid; grid-template-columns: 380px 1fr; gap: 40px; align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 30px 32px; }
.contact-card h3 { margin: 0 0 18px; }
.contact-dl { margin: 0; }
.contact-dl dt {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 20px;
}
.contact-dl dt:first-child { margin-top: 0; }
.contact-dl dd { margin: 5px 0 0; font-size: 16px; color: var(--ink); }
.contact-aside h3 { margin: 0 0 14px; }
.contact-aside ul { margin: 0 0 18px; padding-left: 18px; color: var(--ink-2); }
.contact-aside li { margin-bottom: 9px; }

.address {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.8; color: var(--ink-2);
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 8px; display: inline-block;
}

.cta-band {
  margin-top: 64px;
  padding: 44px 40px;
  background: linear-gradient(135deg, var(--surface-2), var(--surface));
  border: 1px solid var(--rule-2);
  border-radius: 14px;
}
.cta-band h2 { margin: 0 0 10px; font-size: 1.7rem; }
.cta-band p { color: var(--ink-2); margin-bottom: 24px; }
.cta-band .btn + .btn { margin-left: 10px; }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 940px) {
  .services, .engage, .cap-grid, .two-col { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
  .stat-rail { grid-template-columns: repeat(2, auto); gap: 26px 40px; }
  section { padding: 76px 0; }
  #hero { padding: 84px 0 68px; }
  .timeline::before { left: 5px; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; padding-left: 30px; }
  .tl-item::after { left: 1px; top: 32px; }
  .tl-year { text-align: left; }
  .scrub-pane { height: 360px; }
  .dos { font-size: 10px; padding: 16px; line-height: 1.5; }
  .modern { padding: 16px; }
  .modern table { font-size: 12px; }
  .cta-band { padding: 30px 24px; }
  .cta-band .btn { display: block; text-align: center; }
  .cta-band .btn + .btn { margin-left: 0; margin-top: 10px; }

  .wordmark .full { display: none; }
  .wordmark .short { display: inline; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 38px;
    background: var(--surface-2); border: 1px solid var(--rule);
    border-radius: 7px; color: var(--ink); cursor: pointer; padding: 0;
    font-family: var(--mono); font-size: 15px;
  }
  nav.primary {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--ground);
    border-bottom: 1px solid var(--rule);
    padding: 12px 28px 20px;
  }
  nav.primary.open { display: flex; }
  nav.primary a { padding: 11px 12px; font-size: 15.5px; }
  nav.primary a.cta { margin-left: 0; margin-top: 8px; text-align: center; }
}

@media (max-width: 560px) {
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .dos { font-size: 8.5px; padding: 12px; }
  .scrub-pane { height: 310px; }
}
