/* English site: a software workbench. Windows, mono labels, pipeline nodes. */
:root {
  --bg: #eef0f3;
  --surface: #fff;
  --ink: #11141a;
  --muted: #525a68;
  --line: #cfd4dc;
  --dark: #12151c;
  --dark-line: #2b313d;
  --accent: #ff7a1a;
  --accent-text: #a94700;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--bg) radial-gradient(#c3c9d3 1px, transparent 1px) 0 0 / 22px
    22px;
  color: var(--muted);
  font: 400 1rem/1.75 var(--sans);
  overflow-wrap: anywhere;
}
h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.1;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}
h1 {
  font-size: clamp(2.5rem, 5.2vw, 4.4rem);
}
h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.8rem);
}
h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1rem;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.wrap {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}
main section.wrap {
  margin-block: clamp(4rem, 8vw, 7rem);
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.top-align {
  align-items: start;
}
.tag {
  font: 500 0.75rem/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 0.9rem;
}
.tag::before {
  content: "// ";
}
.lead {
  font-size: 1.07rem;
  max-width: 36rem;
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 1rem;
  min-height: 64px;
  padding: 0 max(20px, (100% - 1200px) / 2);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font: 700 0.9rem var(--mono);
  max-width: calc(100% - 60px);
}
.brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
#nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font: 500 0.85rem var(--mono);
}
#nav a {
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid transparent;
  color: var(--ink);
}
#nav a:hover {
  border-color: var(--line);
}
#nav a[aria-current] {
  background: var(--bg);
  border-color: var(--line);
}
#nav a.cta {
  background: var(--ink);
  color: #fff;
  margin-left: 0.6rem;
}
#nav a.cta[aria-current] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.menu {
  display: none;
  width: 44px;
  height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.menu span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

/* Decorative band; its picture is editor managed */
.page-header {
  height: clamp(180px, 24vw, 320px);
  background:
    linear-gradient(90deg, rgba(18, 21, 28, 0.97), rgba(18, 21, 28, 0.6)),
    var(
        --foreign-page-background,
        url("https://images.unsplash.com/photo-1488590528505-98d2b5aba04b?q=75&w=1920&auto=format&fit=crop")
      )
      center / cover;
}

/* Application window */
.win {
  margin: 0;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px -24px rgba(17, 20, 26, 0.35);
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: #f7f8fa;
  font: 400 0.72rem var(--mono);
  color: var(--muted);
}
.win-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}
.win-bar i:first-child {
  background: var(--accent);
}
.win-bar span {
  margin-left: 0.5rem;
}
.media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--dark);
  overflow: hidden;
}
.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media.tall {
  aspect-ratio: 4 / 4.4;
}

/* Hero */
.hero {
  padding-block: clamp(3rem, 7vw, 6rem);
  border-bottom: 1px solid var(--line);
}
.hero .hl {
  box-shadow: inset 0 -0.28em 0 rgba(255, 122, 26, 0.45);
}
.stack {
  min-width: 0;
  padding-bottom: 1rem;
}
.code {
  position: relative;
  margin: -3.5rem 0 0 -2rem;
  width: min(100%, 25rem);
  padding: 1.1rem 1.25rem;
  background: var(--dark);
  color: #cdd5e2;
  border: 1px solid var(--dark-line);
  border-radius: 10px;
  font: 400 0.76rem/1.8 var(--mono);
  overflow-x: auto;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}
.code b,
.code em {
  color: var(--accent);
  font-style: normal;
  font-weight: 500;
}
.code s {
  color: #8fd6a4;
  text-decoration: none;
}
.caret {
  display: inline-block;
  width: 7px;
  height: 1.1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Pipeline of four stages */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.pipeline li {
  position: relative;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.pipeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 29px;
  border-top: 2px dashed var(--accent);
}
.pipeline .key {
  display: block;
  font: 400 0.75rem var(--mono);
  color: var(--muted);
}
.pipeline .num {
  display: block;
  margin: 1.2rem 0 0.4rem;
  font: 700 2rem/1 var(--mono);
  color: var(--accent-text);
}
.pipeline h3 {
  margin: 0;
}

.anchor {
  padding-block: 1px;
}
.quote {
  font: 500 1.1rem/1.6 var(--mono);
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.metrics > div {
  padding: 1.1rem 1.25rem;
  font: 400 0.8rem var(--mono);
}
.metrics > div + div {
  border-left: 1px solid var(--line);
}
.metrics strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1.2;
  color: var(--ink);
}
.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 2rem;
}
.principles h3 {
  margin: 1rem 0 0;
}

/* Services */
.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.toolbar h2 {
  margin: 0;
}
.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.segmented button {
  border: 0;
  border-radius: 5px;
  padding: 0.45rem 0.9rem;
  background: none;
  color: var(--ink);
  font: 500 0.8rem var(--mono);
  cursor: pointer;
}
.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.services article {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.services article:hover,
.services article:focus-within {
  border-color: var(--ink);
  transform: translateY(-3px);
}
.actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
}
.actions a {
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--dark);
  color: #fff;
  font: 500 0.75rem var(--mono);
}
.meta {
  position: relative;
  padding: 1.1rem 1.25rem 1.3rem;
}
.meta h3 {
  margin: 0;
}
.idx {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  font: 400 0.75rem var(--mono);
}
.viewer {
  max-width: min(1100px, 94vw);
  padding: 0;
  border: 1px solid var(--dark-line);
  border-radius: 10px;
  background: var(--dark);
}
.viewer::backdrop {
  background: rgba(10, 12, 16, 0.82);
}
.viewer img {
  max-height: 80vh;
  margin: auto;
}
.viewer form {
  text-align: right;
  padding: 0.5rem;
}
.viewer button {
  background: none;
  border: 0;
  color: #fff;
  font: 500 0.8rem var(--mono);
  cursor: pointer;
}

/* Contact */
.top-align iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}
.top-align .win {
  margin-top: 1.8rem;
}
.top-align .request {
  margin-top: 0;
}
.request .win-bar b {
  padding: 0 0.4rem;
  border-radius: 4px;
  background: var(--accent);
  color: var(--ink);
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  padding: clamp(1.1rem, 3vw, 2rem);
}
.wide {
  grid-column: 1 / -1;
}
.field label {
  display: block;
  margin-bottom: 0.35rem;
  font: 500 0.78rem var(--mono);
  color: var(--ink);
}
.field :is(input, textarea) {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #8b93a1;
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--ink);
  font: 400 0.95rem var(--sans);
}
.field textarea {
  resize: vertical;
}
.send {
  padding: 0.85rem;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--ink);
  font: 700 0.9rem var(--mono);
  cursor: pointer;
}
.send:hover {
  background: var(--ink);
  color: #fff;
}
.send:disabled {
  opacity: 0.6;
  cursor: wait;
}
#contact-status {
  margin: 0;
  color: var(--ink);
}
#contact-status:empty {
  display: none;
}

/* Footer and status bar */
footer {
  background: var(--dark);
  color: #a9b3c3;
}
.foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  padding-block: 3.5rem;
}
.foot h2 {
  color: var(--accent);
  font-size: 0.75rem;
}
.foot dl {
  margin: 0;
  font: 400 0.82rem/1.7 var(--mono);
}
.foot dl > div {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--dark-line);
}
.foot dt {
  color: #7f899b;
}
.foot dd {
  margin: 0;
  color: #e6eaf1;
}
.status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--dark-line);
  font: 400 0.75rem var(--mono);
}

@media (max-width: 900px) {
  .split,
  .foot {
    grid-template-columns: minmax(0, 1fr);
  }
  .flip > .win {
    order: 2;
  }
  .pipeline {
    grid-template-columns: minmax(0, 1fr);
  }
  .pipeline li:not(:last-child)::after {
    top: 100%;
    left: 2rem;
    width: 0;
    height: 29px;
    border-top: 0;
    border-left: 2px dashed var(--accent);
  }
  .principles,
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .code {
    margin: -2rem 0 0;
  }
}
@media (max-width: 720px) {
  .menu {
    display: block;
  }
  #nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 1rem;
  }
  .menu[aria-expanded="true"] + #nav {
    display: flex;
  }
  #nav a.cta {
    margin: 0;
  }
}
@media (max-width: 560px) {
  .principles,
  .services,
  .fields {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
