:root {
  --navy: #16233B;
  --navy-deep: #0F1929;
  --line: #3A5578;
  --line-bright: #8FC1E3;
  --paper: #EDEFE9;
  --paper-dim: #D9DCD2;
  --amber: #E3963E;
  --amber-bright: #F2AC5C;
  --ink: #16233B;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--paper);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.6;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  background-attachment: fixed;
  opacity: 1;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 0%, rgba(22,35,59,0.2) 0%, var(--navy) 55%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

/* Corner-bracket panel, like an engineering drawing frame */
.panel {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(237, 239, 233, 0.02);
  padding: 40px;
}
.panel::before, .panel::after,
.panel .br-tl, .panel .br-br { display: none; }
.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line-bright);
}
.corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.corner.tr { top: -1px; right: -1px; border-left: none; border-bottom: none; }
.corner.bl { bottom: -1px; left: -1px; border-right: none; border-top: none; }
.corner.br { bottom: -1px; right: -1px; border-left: none; border-top: none; }

/* Header */
header {
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand {
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.brand span { color: var(--amber); }
nav a {
  color: var(--line-bright);
  text-decoration: none;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 28px;
  opacity: 0.85;
  transition: opacity 0.2s;
}
nav a:hover { opacity: 1; color: var(--amber-bright); }

@media (max-width: 720px) {
  header {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
  }
  nav a { margin-left: 0; }
}

/* Hero */
.hero {
  padding: 90px 0 70px;
}
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--line-bright);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--line-bright);
}
h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
  max-width: 11ch;
}
h1 .amber { color: var(--amber); }
.hero-sub {
  margin-top: 22px;
  font-size: 18px;
  color: var(--paper-dim);
  max-width: 46ch;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: var(--amber);
  color: var(--navy-deep);
  font-weight: 600;
}
.btn-primary:hover { background: var(--amber-bright); transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--line);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--line-bright); color: var(--line-bright); }

/* Schematic — signature element */
.schematic {
  margin: 70px 0 20px;
  padding: 36px;
}
.schematic-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--line-bright);
  margin-bottom: 28px;
}
.schematic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.schem-block {
  flex: 1;
  text-align: center;
}
.schem-icon {
  width: 100%;
  max-width: 120px;
  margin: 0 auto 12px;
}
.schem-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--paper);
  font-weight: 500;
}
.schem-desc {
  font-size: 12px;
  color: var(--paper-dim);
  margin-top: 4px;
}
.schem-arrow {
  flex-shrink: 0;
  width: 60px;
}

/* Sections */
section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 36px;
}
.section-num {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--amber);
  font-size: 13px;
}
h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--paper);
}

.about-copy {
  max-width: 68ch;
}
.about-copy p {
  color: var(--paper-dim);
  margin-bottom: 16px;
}
.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  list-style: none;
}
.skill-list li {
  padding: 7px 12px;
  border: 1px solid var(--line);
  color: var(--line-bright);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.service-card {
  display: flex;
  flex-direction: column;
}
.service-card .card-link { margin-top: auto; padding-top: 18px; }

.service-page main { padding-bottom: 32px; }
.service-hero { padding: 72px 0 56px; border-top: 0; }
.service-hero h1 { max-width: 16ch; }
.service-intro { max-width: 62ch; }
.service-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.service-details .card ul { margin: 14px 0 0 18px; color: var(--paper-dim); }
.service-details .card li + li { margin-top: 8px; }
.service-cta { margin-top: 24px; }

@media (max-width: 720px) {
  .service-grid, .service-details { grid-template-columns: 1fr; }
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 720px) { .grid3 { grid-template-columns: 1fr; } }

.card {
  padding: 26px;
  background: rgba(237, 239, 233, 0.03);
  border: 1px solid var(--line);
  position: relative;
}
.card-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.card h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 10px;
}
.card p { font-size: 14px; color: var(--paper-dim); }
.card-chart {
  width: 100%;
  height: auto;
  margin-top: 18px;
  display: block;
}
.card-link {
  display: inline-block;
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--amber);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.card-link:hover { color: var(--amber-bright); }

/* Demo pop-out */
.demo-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  color: var(--paper);
  background: var(--navy-deep);
  border: 1px solid var(--line-bright);
  overflow: auto;
}
.demo-dialog[open] { animation: demo-pop 0.28s ease-out both; }
.demo-dialog::backdrop {
  background: rgba(6, 12, 22, 0.82);
  backdrop-filter: blur(3px);
  animation: demo-fade 0.25s ease-out both;
}
.demo-content { padding: 40px; }
.demo-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.demo-kicker {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.demo-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.demo-close:hover { color: var(--amber); border-color: var(--amber); }
.demo-intro { margin-top: 10px; color: var(--paper-dim); max-width: 58ch; }
.demo-flow {
  display: grid;
  grid-template-columns: 1fr 42px 1fr 42px 1fr;
  align-items: stretch;
  margin-top: 34px;
}
.demo-stage {
  min-width: 0;
  padding: 22px 18px;
  border: 1px solid var(--line);
  background: rgba(237, 239, 233, 0.03);
  opacity: 0;
  animation: demo-stage-in 0.42s ease-out forwards;
}
.demo-stage:nth-child(1) { animation-delay: 0.08s; }
.demo-stage:nth-child(3) { animation-delay: 0.3s; }
.demo-stage:nth-child(5) { animation-delay: 0.52s; }
.demo-stage-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  margin-bottom: 16px;
  color: var(--line-bright);
}
.demo-stage-icon svg { width: 64px; height: 64px; }
.demo-stage-icon path {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: demo-draw 1s ease-out forwards;
}
.demo-stage:nth-child(1) .demo-stage-icon path { animation-delay: 0.18s; }
.demo-stage:nth-child(3) .demo-stage-icon path { animation-delay: 0.4s; }
.demo-stage:nth-child(5) .demo-stage-icon path { animation-delay: 0.62s; }
.demo-stage:nth-child(5) .demo-stage-icon { color: var(--amber); }
.demo-stage-label {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
}
.demo-stage p { color: var(--paper-dim); font-size: 12px; margin-top: 7px; }
.demo-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 24px;
  opacity: 0;
  animation: demo-arrow-in 0.36s ease-out forwards, demo-arrow-pulse 1.8s ease-in-out 1.1s infinite;
}
.demo-arrow:nth-child(2) { animation-delay: 0.2s, 1.1s; }
.demo-arrow:nth-child(4) { animation-delay: 0.42s, 1.3s; }
.demo-note {
  margin-top: 26px;
  padding: 16px 18px;
  border-left: 2px solid var(--amber);
  color: var(--paper-dim);
  background: rgba(227, 150, 62, 0.07);
  font-size: 13px;
}

@keyframes demo-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes demo-fade {
  from { background: rgba(6, 12, 22, 0); }
  to { background: rgba(6, 12, 22, 0.82); }
}
@keyframes demo-stage-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes demo-draw { to { stroke-dashoffset: 0; } }
@keyframes demo-arrow-in {
  from { opacity: 0; transform: translateX(-7px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes demo-arrow-pulse {
  0%, 100% { color: var(--amber); }
  50% { color: var(--amber-bright); text-shadow: 0 0 10px rgba(242, 172, 92, 0.65); }
}

@media (max-width: 620px) {
  .demo-content { padding: 26px 20px; }
  .demo-flow { grid-template-columns: 1fr; }
  .demo-arrow { height: 34px; }
  @keyframes demo-arrow-in {
    from { opacity: 0; transform: translateY(-7px) rotate(90deg); }
    to { opacity: 1; transform: translateY(0) rotate(90deg); }
  }
  @keyframes demo-arrow-pulse {
    0%, 100% { color: var(--amber); transform: rotate(90deg); }
    50% { color: var(--amber-bright); transform: rotate(90deg); text-shadow: 0 0 10px rgba(242, 172, 92, 0.65); }
  }
}

/* Process */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  color: var(--line-bright);
  min-width: 40px;
}
.step-body h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  color: var(--paper);
  margin-bottom: 6px;
}
.step-body p { font-size: 14px; color: var(--paper-dim); max-width: 52ch; }

/* Contact */
.contact-panel {
  text-align: left;
  padding: 48px 40px;
}
.contact-panel h2 { margin-bottom: 12px; }
.contact-panel p { color: var(--paper-dim); max-width: 50ch; margin-bottom: 28px; font-size: 15px; }
.contact-methods {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.contact-form { max-width: 480px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--line-bright);
  margin-bottom: 8px;
}
.form-row input,
.form-row textarea {
  width: 100%;
  background: rgba(237, 239, 233, 0.04);
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  padding: 12px 14px;
  resize: vertical;
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--line-bright);
  background: rgba(237, 239, 233, 0.07);
}
.contact-form .btn { border: none; }
.contact-form .btn:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}
.form-status {
  margin-top: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--paper-dim);
  min-height: 18px;
}
.form-status.success { color: var(--amber-bright); }
.form-status.error { color: #E37E5C; }
footer {
  padding: 32px 0 60px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--line-bright);
  letter-spacing: 0.06em;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .demo-stage, .demo-arrow { opacity: 1; }
  .demo-stage-icon path { stroke-dashoffset: 0; }
  .demo-arrow { transform: none; }
}
@media (max-width: 620px) and (prefers-reduced-motion: reduce) {
  .demo-arrow { transform: rotate(90deg); }
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--amber-bright);
  outline-offset: 2px;
}
