/* Vectis — base styles and components for screens.
   Load order: fonts → tokens → this file. This file imports both, so one
   <link rel="stylesheet" href="…/css/vectis.css"> is enough as long as the
   css/, fonts/ and logo/ folders keep their relative positions. */
@import url("../fonts/fonts.css");
@import url("./tokens.css");

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--vx-bg);
  color: var(--vx-fg);
  font-family: var(--vx-font-sans);
  font-size: var(--vx-text-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

::selection { background: var(--vx-ink-900); color: var(--vx-paper-100); }
.vx-theme-dark ::selection { background: var(--vx-paper-100); color: var(--vx-ink-900); }

:focus-visible {
  outline: 2px solid var(--vx-focus);
  outline-offset: 3px;
  border-radius: var(--vx-radius-xs);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--vx-border-strong);
  transition: text-decoration-color var(--vx-duration-fast) var(--vx-ease);
}
a:hover { text-decoration-color: currentColor; }

/* Themed regions repaint their own ground and text. */
.vx-theme-dark,
.vx-theme-light {
  background: var(--vx-bg);
  color: var(--vx-fg);
}

/* ---------- Type ---------- */
h1, h2, h3, h4, p, ul, ol, dl, figure, blockquote { margin: 0; }

.vx-display,
.vx-h1,
.vx-h2,
.vx-h3,
.vx-h4 {
  font-weight: 600;
  color: var(--vx-fg);
  text-wrap: balance;
}
.vx-display { font-size: var(--vx-text-display); line-height: 1.04; letter-spacing: var(--vx-tracking-display); }
.vx-h1 { font-size: var(--vx-text-h1); line-height: 1.08; letter-spacing: var(--vx-tracking-h1); }
.vx-h2 { font-size: var(--vx-text-h2); line-height: 1.15; letter-spacing: var(--vx-tracking-h2); }
.vx-h3 { font-size: var(--vx-text-h3); line-height: 1.3; letter-spacing: -0.006em; }
.vx-h4 { font-size: var(--vx-text-h4); line-height: 1.4; }

.vx-lead {
  font-size: var(--vx-text-lead);
  line-height: 1.55;
  color: var(--vx-fg-secondary);
  max-width: 58ch;
  text-wrap: pretty;
}
.vx-body { font-size: var(--vx-text-body); line-height: 1.65; color: var(--vx-fg-secondary); text-wrap: pretty; }
.vx-small { font-size: var(--vx-text-small); line-height: 1.55; color: var(--vx-fg-muted); }

/* Eyebrow / label: the mono voice from the logo canvas. */
.vx-label {
  font-family: var(--vx-font-mono);
  font-size: var(--vx-text-label);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: var(--vx-tracking-label);
  text-transform: uppercase;
  color: var(--vx-fg-muted);
}
.vx-mono { font-family: var(--vx-font-mono); font-size: 0.9375em; }
.vx-wordmark { font-weight: 600; letter-spacing: var(--vx-tracking-wordmark); text-transform: lowercase; }

.vx-prose { max-width: var(--vx-measure); color: var(--vx-fg-secondary); }
.vx-prose > * + * { margin-top: 1em; }
.vx-prose h2 { font-size: var(--vx-text-h3); line-height: 1.3; color: var(--vx-fg); margin-top: 2em; font-weight: 600; }
.vx-prose h3 { font-size: var(--vx-text-h4); line-height: 1.4; color: var(--vx-fg); margin-top: 1.6em; font-weight: 600; }
.vx-prose ul, .vx-prose ol { padding-left: 1.25em; }
.vx-prose li + li { margin-top: 0.35em; }

/* ---------- Layout ---------- */
.vx-container {
  width: 100%;
  max-width: calc(var(--vx-max-width) + var(--vx-gutter-left) + var(--vx-gutter-right));
  margin-inline: auto;
  padding-left: var(--vx-gutter-left);
  padding-right: var(--vx-gutter-right);
}

.vx-section { padding-block: clamp(var(--vx-space-8), 9vw, var(--vx-space-10)); }
.vx-section--tight { padding-block: clamp(var(--vx-space-7), 6vw, var(--vx-space-8)); }
.vx-section--sunken { background: var(--vx-sunken); }
.vx-section + .vx-section:not(.vx-theme-dark):not(.vx-section--sunken) { border-top: 1px solid var(--vx-border); }

.vx-stack { display: flex; flex-direction: column; gap: var(--vx-stack-gap, var(--vx-space-4)); }
.vx-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--vx-cluster-gap, var(--vx-space-3)); }

.vx-grid {
  display: grid;
  gap: var(--vx-grid-gap, var(--vx-space-5));
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--vx-grid-min, 260px)), 1fr));
}
.vx-grid > * { min-width: 0; }

.vx-split {
  display: grid;
  gap: var(--vx-space-7);
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: start;
}
@media (max-width: 860px) {
  .vx-split { grid-template-columns: minmax(0, 1fr); gap: var(--vx-space-6); }
}

.vx-section-head { display: flex; flex-direction: column; gap: var(--vx-space-3); max-width: 46rem; margin-bottom: var(--vx-space-7); }

/* ---------- Logo ---------- */
.vx-logo { display: inline-flex; align-items: center; gap: 0.55em; text-decoration: none; color: var(--vx-fg); }
.vx-logo svg, .vx-logo img { display: block; height: 1.9em; width: auto; }
.vx-logo .vx-wordmark { font-size: 1.375rem; line-height: 1; }
/* Inline mark SVGs pick up the current theme through these classes. */
.vx-mark-front { fill: var(--vx-logo-front); }
.vx-mark-side { fill: var(--vx-logo-side); }
.vx-mark-base { fill: var(--vx-logo-base); }

/* ---------- Buttons ---------- */
.vx-btn {
  --vx-btn-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--vx-space-2);
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--vx-radius-sm);
  font: 600 0.9375rem/1.2 var(--vx-font-sans);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--vx-btn-shadow);
  transition: transform var(--vx-duration-fast) var(--vx-ease),
              box-shadow var(--vx-duration-fast) var(--vx-ease),
              background-color var(--vx-duration-fast) var(--vx-ease),
              border-color var(--vx-duration-fast) var(--vx-ease);
}

/* Primary: the extruded block. Pressing it pushes it into its own shadow. */
.vx-btn--primary {
  --vx-btn-shadow: var(--vx-extrude-sm);
  background: var(--vx-action);
  color: var(--vx-on-action);
  margin-left: 3px; /* keeps the extrusion inside the button's row */
}
.vx-btn--primary:hover { transform: translate(-1px, 1px); --vx-btn-shadow: -2px 2px 0 0 var(--vx-extrude); }
.vx-btn--primary:active { transform: translate(-3px, 3px); --vx-btn-shadow: 0 0 0 0 var(--vx-extrude); }

.vx-btn--secondary {
  background: transparent;
  color: var(--vx-fg);
  border-color: var(--vx-border-strong);
}
.vx-btn--secondary:hover { border-color: var(--vx-fg); }

.vx-btn--quiet {
  min-height: 44px;
  padding-inline: 0;
  background: none;
  color: var(--vx-fg);
  border: 0;
  text-decoration: underline;
  text-decoration-color: var(--vx-border-strong);
  text-underline-offset: 0.25em;
}
.vx-btn--quiet:hover { text-decoration-color: currentColor; }
.vx-btn .vx-arrow { transition: transform var(--vx-duration-fast) var(--vx-ease); }
.vx-btn:hover .vx-arrow { transform: translateX(3px); }

/* ---------- Surfaces ---------- */
.vx-card {
  display: flex;
  flex-direction: column;
  gap: var(--vx-space-3);
  padding: var(--vx-space-6);
  background: var(--vx-surface);
  border: 1px solid var(--vx-border);
  border-radius: var(--vx-radius-lg);
  min-width: 0;
}
.vx-card--strong { background: var(--vx-surface-strong); }
/* One per view: the featured object gets the logo's extrusion. */
.vx-card--extruded {
  border-color: var(--vx-fg);
  box-shadow: var(--vx-extrude-md);
  margin-left: 6px;
}
.vx-panel { padding: var(--vx-space-5); background: var(--vx-sunken); border-radius: var(--vx-radius-md); }

.vx-rule { height: 1px; border: 0; background: var(--vx-border); margin: 0; }

/* ---------- Small parts ---------- */
.vx-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--vx-border-strong);
  border-radius: var(--vx-radius-sm);
  font: 500 0.6875rem/1.3 var(--vx-font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vx-fg-secondary);
  white-space: nowrap;
}
.vx-tag--solid { background: var(--vx-action); border-color: var(--vx-action); color: var(--vx-on-action); }

/* Bullets are short bars: a nod to the "bar" in vectis. */
.vx-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--vx-space-2); }
.vx-list > li { position: relative; padding-left: 22px; color: var(--vx-fg-secondary); }
.vx-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 10px;
  height: 2px;
  background: var(--vx-extrude);
}

/* Steps: only for content that really is a sequence. */
.vx-steps { list-style: none; padding: 0; display: grid; gap: var(--vx-space-5); counter-reset: vx-step; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.vx-steps > li { counter-increment: vx-step; display: flex; flex-direction: column; gap: var(--vx-space-2); padding-top: var(--vx-space-4); border-top: 2px solid var(--vx-fg); min-width: 0; }
.vx-steps > li::before {
  content: counter(vx-step, decimal);
  font: 500 var(--vx-text-label)/1.3 var(--vx-font-mono);
  letter-spacing: var(--vx-tracking-label);
  color: var(--vx-fg-muted);
}

/* Label / value pairs (company details, specs). */
.vx-kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: var(--vx-space-2) var(--vx-space-5); }
.vx-kv dt { font: 500 var(--vx-text-label)/1.6 var(--vx-font-mono); letter-spacing: var(--vx-tracking-label); text-transform: uppercase; color: var(--vx-fg-muted); padding-top: 0.15em; }
.vx-kv dd { margin: 0; color: var(--vx-fg); }

/* ---------- Site header and footer ---------- */
.vx-skip {
  position: absolute;
  left: var(--vx-gutter-left);
  top: -100px;
  padding: 8px 14px;
  background: var(--vx-action);
  color: var(--vx-on-action);
  border-radius: var(--vx-radius-sm);
  z-index: 100;
}
.vx-skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

.vx-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--vx-bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--vx-border);
}
.vx-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--vx-space-5); min-height: 68px; }
.vx-nav { display: flex; align-items: center; flex-wrap: wrap; gap: var(--vx-space-2) var(--vx-space-5); }
.vx-nav a { font-size: 0.9375rem; font-weight: 500; color: var(--vx-fg-secondary); text-decoration: none; padding-block: 10px; }
.vx-nav a:hover, .vx-nav a[aria-current="page"] { color: var(--vx-fg); }
@media (max-width: 720px) {
  .vx-header__inner { flex-wrap: wrap; padding-block: var(--vx-space-2); }
  .vx-nav { width: 100%; justify-content: flex-start; gap: 0 var(--vx-space-4); }
}

.vx-footer { padding-block: var(--vx-space-8) var(--vx-space-7); font-size: var(--vx-text-small); color: var(--vx-fg-muted); }
.vx-footer a { color: var(--vx-fg-secondary); }

/* ---------- Forms ---------- */
.vx-field { display: flex; flex-direction: column; gap: 6px; }
.vx-field label { font-size: var(--vx-text-small); font-weight: 600; color: var(--vx-fg); }
.vx-input {
  min-height: 44px;
  padding: 10px 12px;
  font: 400 1rem/1.4 var(--vx-font-sans);
  color: var(--vx-fg);
  background: var(--vx-surface-strong);
  border: 1px solid var(--vx-border-strong);
  border-radius: var(--vx-radius-sm);
}
.vx-input:focus-visible { outline-offset: 1px; border-color: var(--vx-fg); }

/* ---------- Utilities ---------- */
.vx-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.vx-tabular { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
