/* VMS Lab — mobile-first. Palette derives from the logo; see BRAND.md */

:root {
  /* core, sampled from the logo */
  --blue-300: #00B8EC;   /* top tiles */
  --blue-500: #009EDB;   /* middle tiles, primary brand blue */
  --blue-700: #008CCC;   /* bottom tiles */
  --grey-600: #606C6C;   /* "VMS" */
  --grey-400: #9C9CA8;   /* "lab" */
  /* derived */
  --blue-800: #0072A8;   /* white text on it passes AA */
  --ink: #1C2222;
  --tint: #EEF8FC;
  --line: #DCE3E6;
  --white: #FFFFFF;

  --line-on-dark: rgba(255, 255, 255, 0.18);
  --muted-on-dark: rgba(255, 255, 255, 0.72);

  --font-head: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 16px;
  --max: 1200px;
  --header-h: 64px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--white);
  color: var(--grey-600);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; margin: 0; letter-spacing: -0.03em; line-height: 1.02; color: var(--ink); }
p { margin: 0; }
::selection { background: var(--blue-500); color: var(--white); }
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-800);
}

/* section surfaces */
.tint { background: var(--tint); }
.blue, .ink { color: var(--muted-on-dark); }
.blue { background: var(--blue-800); }
.ink { background: var(--ink); }
.blue h2, .blue h3, .ink h2, .ink h3 { color: var(--white); }
.blue .label { color: #BDEBFA; }
.ink .label { color: var(--blue-300); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark { font-family: var(--font-head); font-size: 24px; font-weight: 300; letter-spacing: -0.04em; color: var(--grey-400); line-height: 1; }
.wordmark b { font-weight: 700; color: var(--grey-600); }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { width: 44px; height: 44px; display: grid; place-content: center; gap: 6px; cursor: pointer; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--ink); transition: transform .2s; }
.nav-toggle:checked + .nav-burger span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle:checked + .nav-burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
.nav-toggle:focus-visible + .nav-burger { outline: 2px solid var(--blue-500); }

.nav {
  position: absolute; top: var(--header-h); left: 0; right: 0;
  display: none; flex-direction: column;
  background: var(--white); border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 16px;
}
.nav-toggle:checked ~ .nav { display: flex; }
.nav a {
  text-decoration: none; color: var(--ink);
  font-family: var(--font-mono); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.nav a:last-child { border-bottom: 0; }
.nav a:hover { color: var(--blue-800); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent; border-radius: 0;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--blue-800); color: var(--white); border-color: var(--blue-800); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue-500); color: var(--blue-800); }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background-color: var(--white);
  background-image:
    linear-gradient(rgba(0, 158, 219, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 158, 219, 0.09) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0) 0%, var(--white) 78%);
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 48px; padding-top: 64px; padding-bottom: 72px; }
.hero-copy .label { margin-bottom: 24px; }
.hero h1 { font-size: clamp(44px, 11vw, 112px); max-width: 14ch; }
.lead { margin-top: 24px; max-width: 46ch; font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.actions .btn { flex: 1 1 auto; }

.cursor {
  display: inline-block; width: 0.45em; height: 0.08em; margin-left: 0.08em;
  background: var(--blue-500); vertical-align: baseline;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-art { display: none; }
.hero-art svg { width: 100%; height: auto; overflow: visible; }
.hero-art rect { animation: tile-in .5s cubic-bezier(.2, .7, .2, 1) both; transform-box: fill-box; transform-origin: center; }
.hero-art .t1 { fill: var(--blue-300); }
.hero-art .t2 { fill: var(--blue-500); }
.hero-art .t3 { fill: var(--blue-700); }
.hero-art rect:nth-child(1) { animation-delay: .30s; }
.hero-art rect:nth-child(2) { animation-delay: .20s; }
.hero-art rect:nth-child(3) { animation-delay: .10s; }
.hero-art rect:nth-child(4) { animation-delay: .40s; }
.hero-art rect:nth-child(5) { animation-delay: .30s; }
.hero-art rect:nth-child(6) { animation-delay: .20s; }
.hero-art rect:nth-child(7) { animation-delay: .50s; }
.hero-art rect:nth-child(8) { animation-delay: .40s; }
.hero-art rect:nth-child(9) { animation-delay: .30s; }
@keyframes tile-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-head { margin-bottom: 40px; }
.section-head .label { margin-bottom: 14px; }
.section-head h2 { font-size: clamp(34px, 7vw, 64px); }

.grid { display: grid; grid-template-columns: 1fr; }

/* services */
.services { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.card {
  padding: 28px 22px 32px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .15s, color .15s;
}
.card .label { color: var(--blue-700); margin-bottom: 40px; }
.card h3 { font-size: 28px; margin-bottom: 12px; max-width: 18ch; }
.card p:last-child { max-width: 46ch; }
.card:hover { background: var(--blue-800); color: var(--muted-on-dark); }
.card:hover h3 { color: var(--white); }
.card:hover .label { color: #BDEBFA; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; gap: 0; }
.steps li { padding: 28px 0; border-top: 1px solid var(--line-on-dark); }
.steps .label { margin-bottom: 16px; }
.steps h3 { font-size: 30px; margin-bottom: 10px; }
.steps p:last-child { max-width: 40ch; }

/* partners */
.partners {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
  background: var(--white);
}
.partners li {
  font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink);
  padding: 22px 16px; text-align: center;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}


/* ---------- Contact ---------- */

.contact-inner { display: grid; gap: 48px; }
.big { font-size: clamp(52px, 13vw, 120px); margin: 14px 0 20px; }
.contact-info > p { max-width: 40ch; }
.contact-list { margin: 32px 0 0; display: grid; gap: 6px; }
.contact-list dt { margin-top: 14px; }
.contact-list dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.contact-list a { color: var(--blue-800); text-decoration: underline; text-underline-offset: 3px; }

.contact-form { display: grid; gap: 18px; align-content: start; }
.field { display: grid; gap: 8px; }
.field .label { color: var(--grey-600); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 0;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue-500); box-shadow: inset 0 0 0 1px var(--blue-500); }
.contact-form .btn { width: 100%; }
.form-live { min-height: 1.4em; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { display: none; padding: 14px 16px; font-family: var(--font-mono); font-size: 13px; }
.form-status.ok { background: var(--blue-800); color: var(--white); }
.form-status.err { border: 1px solid var(--ink); color: var(--ink); }
.form-status:target { display: block; }

/* ---------- Footer ---------- */

.footer-inner { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 28px; }
.site-footer .label { color: var(--muted-on-dark); }
.footer-inner a { text-decoration: none; }
.footer-inner a:hover { color: var(--blue-300); }

/* ---------- ≥ 720px ---------- */

@media (min-width: 720px) {
  :root { --gutter: 32px; --header-h: 72px; }

  .nav-burger { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; align-items: center; gap: 28px;
    padding: 0; border: 0; background: none;
  }
  .nav a { padding: 0; border: 0; font-size: 12px; }
  .nav .nav-cta { border: 1px solid var(--line); padding: 10px 14px; }
  .nav .nav-cta:hover { border-color: var(--blue-500); }

  .actions .btn { flex: 0 0 auto; }
  .hero-art { display: block; justify-self: start; width: 200px; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .partners { grid-template-columns: repeat(5, 1fr); }
  .contact-form .btn { width: auto; justify-self: start; }
  .section { padding: 112px 0; }
}

/* ---------- ≥ 1080px ---------- */

@media (min-width: 1080px) {
  .hero-inner { grid-template-columns: 1.6fr 1fr; align-items: center; padding-top: 120px; padding-bottom: 128px; }
  .hero-art { width: 300px; justify-self: end; }
  .card { padding: 40px 36px 44px; }
  .contact-inner { grid-template-columns: 1fr 1fr; gap: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cursor, .hero-art rect { animation: none; }
}
