/* XIS — XCEPTIONAL Intelligence System
   Design system v1. Static, zero-dependency.
   Palette: navy #0D1B2A / white #FFFFFF / electric #0047FF
   Muted: #8EA0BB / #A9BBD4
*/

:root {
  --navy: #0d1b2a;
  --navy-2: #10233a;
  --navy-3: #0a1524;
  --ink: #ffffff;
  --muted: #8ea0bb;
  --muted-2: #a9bbd4;
  --accent: #0047ff;
  --accent-soft: rgba(0, 71, 255, 0.14);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent-line: rgba(0, 71, 255, 0.45);
  --panel: rgba(255, 255, 255, 0.025);
  --radius: 6px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--navy-3);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- background: quiet architectural sheet, not a network ---------- */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #0d1b2a;
}
.bg-stage::before {
  /* column hairlines, like a studio layout grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  background-position: center top;
  opacity: 0.5;
}
.bg-stage::after {
  /* margin folio, like a print sheet edge — static, no motion */
  content: "XCEPTIONAL INTELLIGENCE SYSTEM";
  position: absolute;
  left: 30px;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.38em;
  color: rgba(255, 255, 255, 0.26);
  white-space: nowrap;
}
@media (max-width: 1280px) {
  .bg-stage::after { display: none; }
}
.bg-grid { display: none; }
#bg-canvas { display: none; }
.bg-frame {
  position: fixed;
  inset: 14px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
}
.bg-frame::before,
.bg-frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: transparent;
}
.bg-frame::before { top: -1px; left: -1px; border-top: 1px solid var(--accent); border-left: 1px solid var(--accent); }
.bg-frame::after { bottom: -1px; right: -1px; border-bottom: 1px solid var(--accent); border-right: 1px solid var(--accent); }

/* ---------- layout ---------- */
.wrap { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
section { padding: 88px 0; position: relative; }
.eyebrow {
  font-family: var(--font);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
  flex: none;
}
.eyebrow::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
h1, h2, h3 { line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4.4rem); font-weight: 750; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); font-weight: 720; }
h3 { font-size: 1.2rem; font-weight: 650; }
.lede { color: var(--muted-2); font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 60ch; }
.muted { color: var(--muted); }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }

/* ---------- nav ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: #fff; color: #000; padding: 10px 16px; z-index: 99;
}
.skip-link:focus { left: 12px; top: 12px; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 21, 36, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 4px;
  border: 1px solid var(--accent);
  background: transparent;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em;
}
.brand-name { font-weight: 700; letter-spacing: -0.01em; font-size: 0.98rem; }
.brand-name small { display: block; font-weight: 500; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  text-decoration: none;
  color: var(--muted-2);
  font-size: 0.95rem;
  padding: 9px 13px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-links a:hover { color: #fff; border-color: var(--line); background: rgba(255,255,255,0.03); }
.nav-links a[aria-current="page"] { color: #fff; border-color: var(--line-strong); background: rgba(255,255,255,0.04); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.nav-panel-cta { display: none; }

/* ---------- buttons (CTA system — do not restyle arbitrarily) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.96rem;
  padding: 13px 22px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  /* XIS cut: chamfered top-right corner, like a drafting mark */
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: transform 0.6s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: rgba(255,255,255,0.18);
}
.btn-primary:hover { transform: translateY(-2px); background: #1a5bff; }
.btn-ghost {
  background: rgba(0, 71, 255, 0.06);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-ghost:hover { transform: translateY(-2px); background: rgba(0,71,255,0.16); }
.btn .arrow { transition: transform 0.6s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { max-width: 14ch; }
.hero h1 .l1 { display: block; font-weight: 600; letter-spacing: -0.015em; }
.hero h1 .l2 { display: block; }
.hero-latest {
  margin: 24px 0 0;
  padding-left: 14px;
  border-left: 1px solid var(--accent);
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 52ch;
}
.hero h1 em {
  font-style: italic;
  font-weight: 750;
  color: #8fb0ff;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 22px 0 6px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--muted);
}
.hero-meta span {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.02);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 0.9rem; color: var(--muted); max-width: 46ch; }

/* hero visual: job sheet — a studio work order, not a console */
.system-panel {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #0c1929;
  overflow: hidden;
  position: relative;
}
.system-panel::before {
  /* single ruled margin line, like a ledger */
  content: "";
  position: absolute; top: 0; bottom: 0; left: 44px;
  width: 1px;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}
.sys-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35); background: transparent; }
.dot.live { background: var(--accent); border-color: var(--accent); }
.sys-body { padding: 18px 18px 18px 60px; display: grid; gap: 0; }
.sys-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: baseline;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 13px 4px;
  background: transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.sys-row:last-child { border-bottom: 0; }
.sys-row:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.015); }
.sys-row .k { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.sys-row .v { font-size: 0.96rem; }
.sys-row .v small { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; }
.sys-row .st {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 2px 8px;
  background: transparent;
  white-space: nowrap;
}
.sys-path { height: 0; display: none; }
.sys-foot {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}

/* ---------- section furniture ---------- */
.section-head { display: grid; gap: 14px; margin-bottom: 40px; max-width: 780px; }
.section-head.split {
  max-width: none;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: end;
  gap: 32px;
}
.rule { height: 1px; background: var(--line); }
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 26px;
}
.panel.accent-top { position: relative; }
.panel.accent-top::before {
  content: ""; position: absolute; top: -1px; left: 26px; right: 26px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.6;
}

/* ---------- selected work (editorial, asymmetric) ---------- */
.work-feature {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.work-copy { padding: clamp(26px, 4vw, 52px); display: grid; gap: 16px; align-content: start; }
.work-copy .client { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: #9db9ff; }
.work-copy h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); letter-spacing: -0.02em; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--mono); font-size: 11.5px;
  border: 1px solid var(--line); border-radius: 3px;
  padding: 5px 11px; color: var(--muted-2); background: rgba(255,255,255,0.02);
}
.work-visual {
  border-left: 1px solid var(--line);
  background: #0b1930;
  padding: clamp(22px, 3vw, 36px);
  position: relative;
  overflow: hidden;
}
.arch { display: grid; gap: 0; }
.arch-node {
  border: 1px solid var(--line-strong);
  background: rgba(10,21,36,0.8);
  border-radius: 4px;
  padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.arch-node strong { font-size: 0.95rem; }
.arch-node > * { min-width: 0; }
.arch-node span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.arch-node.hot { border-color: var(--accent-line); border-left: 2px solid var(--accent); }
.arch-link { display: flex; justify-content: center; padding: 4px 0; }
.arch-link line { stroke-dasharray: none; }
.text-link {
  color: #9db9ff; text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.text-link:hover { color: #fff; border-color: #fff; }

/* quiet machinery line: technology as footnote, not headline */
.sys-line {
  margin: 18px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: baseline;
  flex-wrap: wrap;
}
.sys-line > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  flex: none;
}

/* experience steps: what the visitor goes through */
.xp-steps {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.xp-steps li {
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--muted-2);
}
.xp-steps li strong { color: #fff; font-weight: 650; margin-right: 10px; }
.arch-note {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- philosophy / capabilities ---------- */
.editorial-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.big-quote { font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.4; letter-spacing: -0.01em; }
.cap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.cap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s var(--ease), transform 0.6s var(--ease);
}
.cap:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.cap .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cap h3 { margin: 10px 0 8px; }
.cap p { margin: 0; color: var(--muted-2); font-size: 0.96rem; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.step { padding: 24px 22px; border-left: 1px solid var(--line); background: rgba(255,255,255,0.015); }
.step:first-child { border-left: 0; }
.step .n { font-family: var(--mono); color: #9db9ff; font-size: 12px; letter-spacing: 0.16em; }
.step h3 { margin: 12px 0 8px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* proof placeholder — intentionally honest, add real proof later */
.proof-strip {
  border: 1px dashed rgba(255,255,255,0.22);
  border-radius: 16px;
  padding: 28px;
  display: grid; gap: 10px;
  background: rgba(255,255,255,0.015);
}

/* ---------- final CTA ---------- */
.final-cta {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: clamp(36px, 6vw, 72px);
  text-align: left;
  background: #0c1929;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 32px; align-items: center;
  overflow: hidden;
  position: relative;
}
.final-cta::after {
  content: "XIS";
  position: absolute; right: -10px; bottom: -38px;
  font-size: clamp(7rem, 16vw, 13rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  color: rgba(255,255,255,0.035);
  pointer-events: none;
}

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 44px 0 30px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; align-items: start; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.foot-links a:hover { color: #fff; }
.fine { color: var(--muted); font-size: 0.85rem; margin-top: 22px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- inner pages ---------- */
.page-hero { padding: 64px 0 28px; }
.prose { max-width: 72ch; }
.prose p { color: var(--muted-2); }
.case-block { display: grid; gap: 18px; }
.spec-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form { display: grid; gap: 16px; max-width: 640px; }
.field { display: grid; gap: 8px; }
label { font-weight: 600; font-size: 0.94rem; }
input, textarea, select {
  font: inherit;
  color: #fff;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 13px 14px;
  width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
textarea { min-height: 150px; resize: vertical; }
.form-note { font-size: 0.88rem; color: var(--muted); }
.success-box { border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: 6px; padding: 24px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive: recompose, don't just stack ---------- */
@media (max-width: 960px) {
  section { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .section-head.split { grid-template-columns: 1fr; }
  .work-feature { grid-template-columns: 1fr; }
  .work-visual { border-left: 0; border-top: 1px solid var(--line); }
  .editorial-2 { grid-template-columns: 1fr; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { border-left: 0; }
  .step { border-top: 1px solid var(--line); }
  .step:nth-child(1), .step:nth-child(2) { border-top: 0; }
  .final-cta { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    background: rgba(10,21,36,0.98);
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 18px;
    flex-direction: column; align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-panel-cta {
    display: inline-flex;
    justify-content: center;
    margin-top: 8px;
  }
  .menu-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    color: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    font: inherit;
    cursor: pointer;
  }
  .menu-btn span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
  }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-cta .btn { display: none; }
}
@media (max-width: 560px) {
  .wrap, .nav-inner { width: calc(100% - 32px); }
  .bg-frame { inset: 8px; }
  h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 7vw, 2rem); }
  section { padding: 52px 0; }
  .hero { padding: 48px 0 44px; }
  .hero-ctas .btn { flex: 1 1 100%; justify-content: center; }
  .brand-name small { display: none; }
  .sys-bar, .sys-foot { flex-wrap: wrap; row-gap: 4px; }
  .sys-body { padding: 14px 14px 14px 52px; }
  .steps { grid-template-columns: 1fr; }
  .step { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .step:first-child { border-top: 0 !important; }
  .cap-grid { grid-template-columns: 1fr; }
  .sys-row { grid-template-columns: 28px 1fr; }
  .sys-row .st { grid-column: 2; white-space: normal; }
  .spec-list { grid-template-columns: 1fr; }
  .final-cta { padding: 32px 24px; }
  .final-cta .btn { flex: 1 1 100%; justify-content: center; }
}

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