/* Vector Data Systems landing — design: Figma "Frame 2" (1440px, content 1245px) */

:root {
  --bg: #00051b;                 /* bottom colour of the background image */
  --white: #ffffff;
  --accent: #3c5ba4;             /* primary buttons, footer text */
  --glass: rgba(0, 0, 0, 0.32);  /* cards */
  --glass-line: rgba(255, 255, 255, 0.12);
  --error: #ff8a80;
  --success: #8ee6a8;

  --container: 1245px;           /* 97px side margins on the 1440 design */
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 118px;
  --header-top: 61px;

  --radius: 22px;
  --pad: clamp(20px, 4.6vw, 66px);   /* card inner padding (66px in the design) */

  --fs-h1: clamp(40px, 5.3vw + 20px, 96px);
  --fs-lead: clamp(18px, 1.3vw + 12px, 32px);
  --fs-btn: clamp(18px, 1.3vw + 12px, 32px);
  --fs-nav: clamp(16px, 1vw + 9px, 24px);
  --fs-h2: clamp(22px, 0.6vw + 19px, 28px);
  --fs-h3: clamp(19px, 0.4vw + 17px, 24px);
  --fs-body: clamp(16px, 0.4vw + 14px, 21px);
  --fs-footer: clamp(16px, 0.6vw + 13px, 24px);

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-variation-settings: "opsz" 14; /* DM Sans optical size used in the Figma design (wider than auto-sizing) */
  font-size: var(--fs-body);
  line-height: 1.3;
  color: var(--white);
  /* the design background spans the whole page; cover keeps it filling tall mobile pages too */
  /* --page-bg: background uploaded in the admin panel (set on <body> by render.mjs) */
  background: var(--bg) var(--page-bg, url("/assets/img/background.jpg")) center top / cover no-repeat;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.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;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--accent); color: var(--white); padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 3px solid #7fa2ff; outline-offset: 3px; }

/* glass card used by every block */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 76px; padding: 12px 24px;
  border: 1px solid transparent; border-radius: var(--radius);
  font: 400 var(--fs-btn)/1.03 var(--font); font-variation-settings: inherit; color: var(--white);
  text-align: center; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(60, 91, 164, .45); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: #4a6bb8; }
.btn-ghost { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .22); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .5); }
@media (max-width: 767px) { .btn { min-height: 60px; } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 12px; z-index: 50; margin-top: var(--header-top); }
.header-card {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--header-h); padding: 0 clamp(20px, 3.5vw, 44px);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.brand img { width: 118px; height: 49px; }

.site-nav { flex: 1; }
.site-nav ul { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 892px; margin-left: auto; }
.site-nav a {
  display: block; position: relative; padding: 6px 0;
  font-weight: 700; font-size: var(--fs-nav); line-height: 1.15; text-align: center; text-decoration: none;
  opacity: .75; transition: opacity .2s ease;
}
.site-nav li:nth-child(2) a { max-width: 6em; } /* "solutions & services" wraps to two lines as in the design */
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transition: transform .2s ease; }
.site-nav a:hover, .site-nav a.is-active { opacity: 1; }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle { display: none; }

@media (max-width: 899px) {
  :root { --header-h: 76px; --header-top: 16px; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 48px; height: 48px; padding: 10px; border: 0; background: transparent; cursor: pointer;
  }
  .nav-toggle-bar { display: block; height: 3px; border-radius: 2px; background: var(--white); transition: transform .2s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(9px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(4) { transform: translateY(-9px) rotate(-45deg); }

  .site-nav {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    background: rgba(0, 5, 27, .92);
    border: 1px solid var(--glass-line); border-radius: var(--radius);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    max-height: 0; overflow: hidden; visibility: hidden; opacity: 0;
    transition: max-height .25s ease, opacity .25s ease, visibility .25s;
  }
  .site-nav.is-open { max-height: 360px; visibility: visible; opacity: 1; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px; }
  .site-nav li:nth-child(2) a { max-width: none; }
  .site-nav a { padding: 14px 0; font-size: 18px; text-align: left; border-bottom: 1px solid var(--glass-line); }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav a::after { display: none; }
}

/* ---------- sections ---------- */
.section { padding-top: clamp(56px, 6.5vw, 92px); }
.section-title { font-weight: 700; font-size: var(--fs-h2); line-height: 1.2; padding-left: var(--pad); margin-bottom: clamp(24px, 5vw, 78px); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(32px, 4.9vw, 70px); }
.hero-card { padding: clamp(28px, 4.1vw, 59px) clamp(20px, 3.5vw, 48px) clamp(40px, 11vw, 160px) clamp(20px, 3.1vw, 44px); }
.hero-title { max-width: 10.4em; font-weight: 300; font-size: var(--fs-h1); line-height: 1.26; }
.hero-title strong { font-weight: 700; }
.hero-lead { max-width: 30.3em; margin-top: clamp(20px, 3.5vw, 50px); padding-left: 4px; font-size: var(--fs-lead); line-height: 1.03; }
.hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 41px; max-width: 1151px; margin-top: clamp(32px, 5.8vw, 83px); padding-left: 4px; }
.hero-actions--single { grid-template-columns: minmax(0, 555px); }
@media (max-width: 767px) { .hero-actions { grid-template-columns: 1fr; gap: 14px; } }

/* ---------- about ---------- */
.about-card {
  display: grid; grid-template-columns: minmax(0, 599px) minmax(0, 317px);
  justify-content: space-between; column-gap: 40px;
  padding: clamp(28px, 5.7vw, 82px) clamp(20px, 9.8vw, 141px) clamp(36px, 5.7vw, 82px) clamp(20px, 8.7vw, 126px);
}
.about-main { padding-top: 43px; }
.about-logo { width: 383px; height: auto; }
.about-title { margin-top: 42px; font-weight: 700; font-size: var(--fs-h2); line-height: 1.2; }
.about-text { margin-top: 36px; font-size: var(--fs-body); line-height: 2.08; text-align: justify; opacity: .75; }
.about-text strong, .about-note strong { font-weight: 700; }
.about-text + .about-text { margin-top: 1em; }
.about-note + .about-note { margin-top: 1em; }
.about-image { width: 317px; height: 536px; object-fit: cover; border-radius: 31px; }
.about-note { grid-column: 1 / -1; margin-top: 52px; font-size: var(--fs-body); line-height: 2.08; }
@media (max-width: 899px) {
  .about-card { grid-template-columns: 1fr; }
  .about-main { padding-top: 0; }
  .about-logo { width: min(383px, 70%); }
  .about-text, .about-note { line-height: 1.7; }
  .about-text { text-align: left; }
  .about-image { order: 2; width: 100%; height: auto; max-height: 420px; margin-top: 28px; }
  .about-note { order: 3; margin-top: 28px; }
}

/* ---------- solutions ---------- */
.solutions { display: grid; gap: 39px; }
.solution {
  display: grid; grid-template-columns: minmax(0, 818px) auto; align-items: center; justify-content: space-between; column-gap: 32px;
  min-height: 384px; padding: 40px clamp(20px, 3vw, 40px) 40px var(--pad);
}
.solution h3 { font-weight: 700; font-size: var(--fs-h3); line-height: 2.25; }
.solution-text ul { list-style: disc; padding-left: 1.5em; }
.solution-text li { font-size: var(--fs-body); line-height: 2.58; text-align: justify; }
/* images come in any size from the admin panel: fit them into the design slot (max 363×300) */
.solution-image { width: 363px; max-width: 100%; height: auto; max-height: 300px; object-fit: contain; }
@media (max-width: 899px) {
  .solutions { gap: 20px; }
  .solution { grid-template-columns: 1fr; min-height: 0; padding-right: var(--pad); }
  .solution h3 { line-height: 1.3; margin-bottom: 12px; }
  .solution-text li { line-height: 1.5; text-align: left; }
  .solution-text li + li { margin-top: 10px; }
  .solution-image { order: -1; justify-self: center; width: min(300px, 80%); max-height: 240px; margin-bottom: 16px; }
}

/* ---------- key metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.metric {
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center;
  min-height: 384px; padding: 17px 12px 28px; text-align: center;
}
.metric h3 { font-weight: 700; font-size: var(--fs-h3); line-height: 2.25; white-space: nowrap; }
.metric-tight { letter-spacing: -0.04em; }
.metric img { width: 100%; height: auto; max-height: 200px; object-fit: contain; opacity: .8; }
.metric p { max-width: 273px; font-size: clamp(15px, 0.3vw + 13px, 18px); line-height: 1.11; }
@media (max-width: 1199px) { .metric h3 { font-size: clamp(17px, 1.6vw, 22px); } }
@media (max-width: 899px) { .metrics { grid-template-columns: 1fr 1fr; } .metric h3 { white-space: normal; line-height: 1.3; } }
@media (max-width: 519px) { .metrics { grid-template-columns: 1fr; } .metric { min-height: 0; gap: 12px; } }

/* ---------- contact form ---------- */
.form-card {
  display: grid; grid-template-columns: minmax(0, 782px) minmax(0, 373px); justify-content: space-between; gap: 20px;
  padding: clamp(12px, 2.4vw, 35px) clamp(12px, 2.5vw, 36px) clamp(12px, 1.9vw, 27px) clamp(12px, 2.4vw, 34px);
}
.lead-form { display: grid; align-content: start; gap: 20px; padding: clamp(24px, 3.1vw, 45px) clamp(16px, 3.6vw, 41px) clamp(28px, 5.5vw, 79px) clamp(16px, 3.9vw, 56px); }
.form-image { width: 100%; height: 100%; max-height: 647px; object-fit: cover; border-radius: 37px; }
.form-card--no-image { grid-template-columns: minmax(0, 782px); justify-content: center; }
@media (max-width: 899px) {
  .form-card { grid-template-columns: 1fr; }
  .form-image { display: none; }
}

.field { display: grid; gap: 17px; }
.field > label { font-weight: 700; font-size: var(--fs-h3); line-height: 1.1; padding-left: 40px; }
.field input, .field textarea {
  width: 100%; min-height: 70px; padding: 20px 32px;
  border: 1px solid var(--glass-line); border-radius: 84px;
  background: rgba(0, 0, 0, .32); color: var(--white);
  font: 400 18px/1.6 var(--font); font-variation-settings: inherit;
  transition: border-color .15s ease, background-color .15s ease;
}
.field textarea { resize: vertical; border-radius: 35px; max-height: 320px; }
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(127, 162, 255, .8); background: rgba(0, 0, 0, .5); }
.field.has-error input, .field.has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: 14px; padding-left: 40px; }
.field-error:empty { display: none; }
@media (max-width: 767px) {
  .field > label, .field-error { padding-left: 20px; }
  .field input, .field textarea { min-height: 58px; padding: 14px 20px; }
}

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

.btn-submit {
  width: calc(100% + 10px); margin: 39px 0 0 -10px;
  min-height: clamp(64px, 6.5vw, 94px); border-radius: 36px;
  font-weight: 700; font-size: clamp(24px, 1.8vw + 14px, 40px);
}
.btn-submit[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
@media (max-width: 767px) { .btn-submit { width: 100%; margin: 16px 0 0; } }

.form-status { text-align: center; font-weight: 700; font-size: 16px; }
.form-status:empty { display: none; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--error); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: clamp(80px, 17vw, 246px);
  padding: clamp(48px, 6.9vw, 99px) 0 clamp(40px, 4.4vw, 64px);
  background: rgba(0, 0, 0, .57);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--accent);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-inline: clamp(20px, 2.3vw, 33px) clamp(0px, 2.2vw, 32px); }
.footer-logo { width: min(383px, 80vw); height: auto; margin-top: 43px; align-self: flex-start; }
.footer-contacts { width: min(717px, 100%); font-style: normal; font-size: var(--fs-footer); line-height: 1.3; display: grid; gap: 1.3em; }
.footer-contacts ul { list-style: disc; padding-left: 2.9em; }
.footer-contacts a { color: inherit; }
.footer-contacts a:hover { color: #6f8fdb; }
.copyright { margin-top: clamp(32px, 2.4vw, 35px); text-align: center; opacity: .5; color: var(--accent); font-size: var(--fs-footer); line-height: 1.3; padding-inline: var(--gutter); }
@media (max-width: 899px) {
  .footer-inner { flex-direction: column; align-items: center; }
  .footer-logo { align-self: center; margin-top: 0; width: min(300px, 70vw); }
}
