/*
Theme Name: CALIMSO
Theme URI: https://calimso.ru
Author: Metroservis
Description: Public landing page for CALIMSO, a metrological LIMS product by Metroservis.
Version: 1.0.0
Text Domain: calimso
*/

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Unbounded:wght@500;600;700;800&family=Golos+Text:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --ms-red: #E50939;
  --ms-red-2: #C4082F;
  --ms-navy: #0B1B3E;
  --ms-navy-2: #12254F;
  --ms-navy-deep: #060E22;
  --ms-navy-lift: #1D366E;
  --ms-navy-soft: #2C4D96;
  --ms-ink: #111214;
  --ms-ink-2: #1A1B1E;
  --ms-white: #FFFFFF;
  --ms-gray-100: #F4F4F2;
  --ms-gray-150: #E8E8E6;
  --ms-gray-200: #D9DADA;
  --ms-gray-500: #7A7B7D;
  --ms-gray-700: #373534;

  --bg: #FFFFFF;
  --bg-muted: var(--ms-gray-100);
  --bg-raised: #FFFFFF;
  --bg-inverse: var(--ms-navy-deep);
  --fg: var(--ms-ink);
  --fg-muted: var(--ms-gray-500);
  --fg-subtle: #9A9B9D;
  --fg-inverse: #FFFFFF;
  --border: var(--ms-gray-150);
  --border-strong: var(--ms-gray-200);
  --accent: var(--ms-red);
  --accent-hover: var(--ms-red-2);
  --accent-fg: #FFFFFF;

  --font-display: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  --font-text: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  --font-alt: 'Unbounded', 'Manrope', system-ui, sans-serif;
  --font-ru: 'Golos Text', 'Manrope', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --fs-display-xl: 180px;
  --fs-display-lg: 120px;
  --fs-display-md: 88px;
  --fs-h1: 64px;
  --fs-h2: 44px;
  --fs-h3: 32px;
  --fs-h4: 24px;
  --fs-body: 18px;
  --fs-body-lg: 20px;
  --fs-body-sm: 15px;
  --fs-caption: 13px;
  --fs-micro: 11px;

  --lh-display: 0.95;
  --lh-heading: 1.15;
  --lh-body: 1.5;
  --lh-tight: 1.25;
  --ls-display: -0.035em;
  --ls-heading: -0.02em;
  --ls-caption: 0.08em;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-30: 120px;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-2xl: 24px;
  --r-pill: 999px;

  --sh-1: 0 1px 0 rgba(0,0,0,0.04);
  --sh-2: 0 1px 2px rgba(8,12,24,0.06), 0 2px 6px rgba(8,12,24,0.04);
  --sh-3: 0 4px 10px rgba(8,12,24,0.06), 0 10px 24px -8px rgba(8,12,24,0.10);
  --sh-4: 0 1px 0 rgba(0,0,0,0.04), 0 20px 40px -20px rgba(8,12,24,0.12);
  --sh-red: 0 12px 30px rgba(229,9,57,0.28), 0 4px 10px rgba(0,0,0,0.05);
  --sh-inset: inset 0 0 0 1px var(--border);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 140ms;
  --dur-med: 220ms;
  --dur-slow: 380ms;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.ms-display-xl { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display-xl); line-height: 0.92; letter-spacing: -0.04em; }
.ms-display-lg { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display-lg); line-height: 0.95; letter-spacing: -0.035em; }
.ms-display-md { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-display-md); line-height: 1; letter-spacing: -0.03em; }
.ms-h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.025em; }
.ms-h2 { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.015em; }
.ms-h3 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -0.01em; }
.ms-h4 { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-h4); line-height: 1.3; letter-spacing: -0.005em; }
.ms-body-lg { font-family: var(--font-text); font-weight: 400; font-size: var(--fs-body-lg); line-height: 1.5; }
.ms-body { font-family: var(--font-text); font-weight: 400; font-size: var(--fs-body); line-height: 1.5; }
.ms-body-sm { font-family: var(--font-text); font-weight: 400; font-size: var(--fs-body-sm); line-height: 1.5; }
.ms-caption { font-family: var(--font-text); font-weight: 500; font-size: var(--fs-caption); line-height: 1.3; letter-spacing: 0.08em; text-transform: uppercase; }
.ms-mono { font-family: var(--font-mono); font-feature-settings: "tnum" 1; }
.ms-muted { color: var(--fg-muted); }
.ms-accent { color: var(--accent); }

.site-shell { min-height: 100vh; overflow: hidden; background: var(--bg-muted); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}
.nav {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand-main { font-size: 24px; line-height: 1; }
.brand-by {
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 600;
}
.nav-links a:hover { color: var(--fg); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-weight: 700;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-fg); box-shadow: var(--sh-red); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { border-color: rgba(255,255,255,0.24); color: var(--fg-inverse); }
.btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn-light { background: var(--ms-white); color: var(--ms-navy); border-color: var(--border); box-shadow: var(--sh-2); }

.section {
  position: relative;
  padding: var(--sp-20) 0;
}
.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}
.hero {
  min-height: calc(100vh - 72px);
  color: var(--fg-inverse);
  background: radial-gradient(circle at 72% 18%, rgba(44,77,150,0.6), transparent 34%), var(--ms-navy-deep);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 44%;
  background:
    linear-gradient(180deg, rgba(6,14,34,0), rgba(11,27,62,0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 360' preserveAspectRatio='none'%3E%3Cpath d='M0 206C220 116 356 285 566 186C785 83 949 205 1128 154C1276 112 1362 147 1440 118V360H0Z' fill='%2312254F'/%3E%3Cpath d='M0 270C232 196 393 321 594 252C792 184 976 280 1166 222C1292 184 1367 204 1440 184V360H0Z' fill='%230B1B3E'/%3E%3Cpath d='M0 318C222 252 422 352 642 304C850 258 1025 324 1216 286C1326 264 1393 276 1440 260V360H0Z' fill='%23060E22'/%3E%3C/svg%3E") bottom center / 100% 100% no-repeat;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: var(--sp-16);
  align-items: center;
  padding: var(--sp-20) 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--sp-6);
  color: rgba(255,255,255,0.68);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}
.hero h1 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(56px, 8vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.055em;
}
.hero-lead {
  max-width: 680px;
  margin: var(--sp-8) 0 0;
  color: rgba(255,255,255,0.78);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-10);
}
.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-12);
}
.proof {
  padding: var(--sp-5);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.05);
}
.proof strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.product-visual {
  position: relative;
  min-height: 560px;
}
.dashboard {
  position: absolute;
  inset: 20px 0 auto auto;
  width: min(520px, 100%);
  min-height: 430px;
  padding: var(--sp-5);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--r-2xl);
  background: rgba(244,244,242,0.96);
  color: var(--fg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.36);
}
.dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-5);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--ms-white);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 12px;
  font-weight: 700;
}
.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.flow-card {
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  background: var(--ms-white);
  box-shadow: var(--sh-2);
}
.flow-list {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.flow-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  background: var(--ms-gray-100);
}
.dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--ms-navy);
  color: white;
  font-size: 12px;
  font-weight: 800;
}
.calibration-card {
  position: absolute;
  left: -20px;
  bottom: 34px;
  width: 300px;
  padding: var(--sp-5);
  border-radius: var(--r-xl);
  background: var(--accent);
  color: white;
  box-shadow: var(--sh-red);
}
.rings {
  position: absolute;
  right: -80px;
  bottom: 70px;
  width: 260px;
  height: 260px;
  opacity: 0.22;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center, transparent 0 20px, rgba(255,255,255,0.5) 21px 22px),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,0.45) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), rgba(255,255,255,0.45) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.52fr);
  gap: var(--sp-10);
  align-items: end;
  margin-bottom: var(--sp-12);
}
.section-head h2 {
  margin: var(--sp-3) 0 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.section-kicker {
  color: var(--accent);
}
.pain-grid, .module-grid, .role-grid, .roadmap-grid {
  display: grid;
  gap: var(--sp-4);
}
.pain-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--bg-raised);
  box-shadow: var(--sh-2);
  padding: var(--sp-6);
}
.card h3, .card h4 { margin: 0 0 var(--sp-3); }
.card p { margin: 0; color: var(--fg-muted); }
.num-tag {
  display: inline-flex;
  margin-bottom: var(--sp-6);
  color: var(--accent);
  font-weight: 800;
}
.route {
  background: var(--ms-white);
}
.route-strip {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  background: var(--border);
}
.route-step {
  min-height: 170px;
  padding: var(--sp-5);
  background: var(--ms-gray-100);
}
.route-step strong { display: block; margin-top: var(--sp-8); }
.modules {
  color: var(--fg-inverse);
  background: var(--ms-navy-deep);
}
.modules .section-head p, .modules .card p { color: rgba(255,255,255,0.66); }
.module-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modules .card {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.055);
  box-shadow: none;
}
.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-pill);
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  font-weight: 600;
}
.scale-band {
  height: 54px;
  margin-top: var(--sp-16);
  opacity: 0.32;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.8) 0 1px, transparent 1px 20px);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.role-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.role-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.role-card:nth-child(2n) { background: var(--ms-gray-100); }
.integrations {
  background: var(--ms-white);
}
.integration-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--sp-4);
}
.integration {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  color: var(--fg-inverse);
  background: var(--ms-navy);
}
.integration:nth-child(2) { background: var(--accent); }
.integration:nth-child(3) { background: var(--ms-ink); }
.integration:nth-child(4) { background: var(--ms-navy-lift); }
.integration:nth-child(5) { background: var(--ms-gray-100); color: var(--fg); border: 1px solid var(--border); }
.roadmap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cta {
  color: var(--fg-inverse);
  background: var(--ms-navy);
  overflow: hidden;
}
.cta .container {
  position: relative;
  z-index: 2;
}
.cta h2 {
  max-width: 780px;
  margin: var(--sp-3) 0 var(--sp-6);
  font-size: clamp(42px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.cta::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 360' preserveAspectRatio='none'%3E%3Cpath d='M0 206C220 116 356 285 566 186C785 83 949 205 1128 154C1276 112 1362 147 1440 118V360H0Z' fill='%2312254F'/%3E%3Cpath d='M0 270C232 196 393 321 594 252C792 184 976 280 1166 222C1292 184 1367 204 1440 184V360H0Z' fill='%23060E22'/%3E%3C/svg%3E") bottom center / 100% 100% no-repeat;
  opacity: 0.9;
}
.site-footer {
  padding: var(--sp-10) 0;
  background: var(--ms-navy-deep);
  color: rgba(255,255,255,0.68);
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-6);
}

@media (max-width: 980px) {
  :root {
    --fs-h1: 46px;
    --fs-h2: 34px;
    --fs-h3: 26px;
    --sp-20: 56px;
    --sp-30: 72px;
  }
  .nav-links { display: none; }
  .hero { min-height: auto; }
  .hero-grid, .section-head {
    grid-template-columns: 1fr;
  }
  .product-visual { min-height: 520px; }
  .dashboard { inset: 0 auto auto 0; }
  .calibration-card { left: 12px; }
  .pain-grid, .module-grid, .role-grid, .integration-board, .roadmap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .route-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { width: min(100% - 28px, 1200px); }
  .brand-main { font-size: 21px; }
  .brand-by { font-size: 9px; }
  .hero h1 { font-size: 54px; }
  .hero-grid { padding: var(--sp-12) 0; }
  .hero-proof, .pain-grid, .module-grid, .role-grid, .integration-board, .roadmap-grid {
    grid-template-columns: 1fr;
  }
  .product-visual { min-height: 600px; }
  .dashboard { width: 100%; min-height: 400px; }
  .calibration-card { width: calc(100% - 24px); bottom: 0; }
  .route-strip { grid-template-columns: 1fr; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}
