/* CMV Technology landing page
   Visual direction: facility floor plan / wayfinding signage.
   Barlow (a typeface based on road and wayfinding signs) + safety yellow on a cool grey ground. */

:root {
  /* palette */
  --paper:     #ECEFEE;  /* page ground */
  --paper-2:   #F6F7F6;  /* raised light surface */
  --ink:       #14212A;  /* text, rules */
  --ink-2:     #4A5964;  /* secondary text */
  --line:      #C7CFD2;  /* light rules */
  --signal:    #FFC20E;  /* safety yellow: CTAs, live marks */
  --plan:      #172630;  /* floor plan panel, contact section */
  --plan-line: #3A4F5C;
  --plan-text: #A9BAC4;
  --ok:        #45C08F;

  /* type */
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;

  --step-0: 1.0625rem;                         /* 17px body */
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.4rem + 4.4vw, 4.4rem);

  --gutter: 24px;
  --radius-s: 2px;   /* buttons, inputs: sign-like */
  --radius-m: 6px;   /* panels */
  --section-space: clamp(64px, 9vw, 120px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-variant-numeric: lining-nums;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

[hidden] { display: none !important; }

/* set by i18n.js while a translation file is loading */
html.i18n-pending body { visibility: hidden; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
@media (max-width: 560px) { :root { --gutter: 16px; } }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: 10px 14px; z-index: 100; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.125rem;
  letter-spacing: .01em;
  border-radius: var(--radius-s);
  border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-signal { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.btn-signal:hover { background: #FFD24D; border-color: #FFD24D; }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 1rem; }

.text-link, .product-link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--signal);
}
.text-link:hover, .product-link:hover { text-decoration-color: var(--ink); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row {
  display: flex; align-items: center; gap: 28px;
  min-height: 72px;
}
.brand { flex: none; display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 44px; width: auto; }  /* cmv-logo.png is 1428 x 500 */
.brand-text {
  font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; letter-spacing: .02em;
}

.main-nav { display: flex; gap: 24px; margin-left: auto; }
.main-nav a {
  text-decoration: none; font-weight: 500; color: var(--ink-2);
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--ink); border-bottom-color: var(--signal); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; border: 1px solid var(--ink); border-radius: var(--radius-s); overflow: hidden; }
.lang-switch button {
  font: 600 .875rem/1 var(--font-body); letter-spacing: .04em;
  background: transparent; color: var(--ink);
  border: 0; padding: 0 10px; min-height: 32px; min-width: 40px; cursor: pointer;
}
.lang-switch button + button { border-left: 1px solid var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-actions { margin-left: auto; }
}
@media (max-width: 520px) {
  .header-row { gap: 12px; min-height: 64px; }
  .brand-logo { height: 36px; }
  /* the hero has the same button right below the header */
  .header-actions .btn-small { display: none; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6vw, 80px) 0 clamp(48px, 6vw, 72px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  letter-spacing: -0.012em;
  max-width: 13ch;
}
.hero-copy .lead {
  margin-top: 24px;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy h1 { max-width: 16ch; }
}

/* site panel: floor plan + legend + feed */
.site-panel {
  margin: 0;
  background: var(--plan);
  color: var(--plan-text);
  border-radius: var(--radius-m);
  padding: clamp(14px, 2vw, 22px);
  box-shadow: 0 24px 48px -28px rgba(20, 33, 42, .55);
}
.plan { width: 100%; height: auto; }
.plan-grid { stroke: #1E303B; stroke-width: 1; }
.plan .zone { fill: transparent; }
.plan .wall { fill: none; stroke: #6F8594; stroke-width: 3; stroke-linecap: square; }
.plan .conveyor { stroke: var(--plan-line); stroke-width: 10; stroke-linecap: butt; stroke-dasharray: 4 3; }
.plan .room { font: 500 12px var(--font-body); fill: var(--plan-text); letter-spacing: .02em; }
.plan .route { fill: none; stroke: none; }
@media (max-width: 560px) { .plan .room { font-size: 17px; } }

.plan .beacon .range { fill: rgba(255, 194, 14, .05); stroke: rgba(255, 194, 14, .32); stroke-width: 1; stroke-dasharray: 3 4; }
.plan .beacon .pulse { fill: none; stroke: var(--signal); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.plan .beacon .dot { fill: var(--signal); }

.plan .reader { fill: var(--plan); stroke: #DDE6EA; stroke-width: 1.5; transition: fill .2s ease, stroke .2s ease; }
.plan .reader.is-active { fill: var(--ok); stroke: var(--ok); }

.plan .person, .legend .person { fill: var(--signal); stroke: var(--plan); stroke-width: 1.5; }
.plan .asset,  .legend .asset  { fill: #E3ECF0; stroke: var(--plan); stroke-width: 1.5; }
.legend .reader { fill: var(--plan); stroke: #DDE6EA; stroke-width: 1.5; }
.legend .range { fill: none; stroke: rgba(255, 194, 14, .6); stroke-width: 1; stroke-dasharray: 2 2; }
.legend .dot { fill: var(--signal); }

@media (prefers-reduced-motion: no-preference) {
  .plan.is-live .beacon .pulse { animation: pulse 3.2s ease-out infinite; }
  .plan.is-live .beacon:nth-child(2) .pulse { animation-delay: .5s; }
  .plan.is-live .beacon:nth-child(3) .pulse { animation-delay: 1.1s; }
  .plan.is-live .beacon:nth-child(4) .pulse { animation-delay: 1.7s; }
  .plan.is-live .beacon:nth-child(5) .pulse { animation-delay: 2.2s; }
  .plan.is-live .beacon:nth-child(6) .pulse { animation-delay: 2.7s; }
}
@keyframes pulse {
  0%   { transform: scale(.15); opacity: .9; }
  70%  { opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

.legend {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  font-size: .875rem; color: var(--plan-text);
}
.legend li { display: flex; align-items: center; gap: 8px; }
.legend svg { width: 14px; height: 14px; flex: none; }

.feed {
  margin-top: 16px;
  border-top: 1px solid var(--plan-line);
  padding-top: 12px;
  min-height: calc(4 * 2.1em + 12px);
}
.feed-list { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.feed-list li {
  display: grid;
  grid-template-columns: 5.2em minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 4px 0;
  line-height: 1.35;
}
.feed-list .t { font-variant-numeric: tabular-nums; color: #7F95A2; }
.feed-list .e { color: #E6EEF2; }
.feed-list .p { color: var(--signal); font-weight: 500; font-size: .8125rem; }
.feed-list li:nth-child(n+2) .e { color: #B8C7CF; }
.feed-list li:nth-child(n+4) { opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .feed-list li.is-new { animation: feedIn .45s ease-out; }
}
@keyframes feedIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 560px) {
  .feed-list li { grid-template-columns: 4.6em minmax(0, 1fr); }
  .feed-list .p { grid-column: 2; margin-top: -2px; }
}

.site-panel figcaption {
  margin-top: 14px;
  font-size: .8125rem; line-height: 1.45;
  color: #7F95A2;
}

/* ---------- facts strip ---------- */
.facts { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.facts-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr 1.8fr;
  margin: 0 auto;
}
.facts-row > div { padding: 20px 20px 22px 0; }
.facts-row > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts dt { font-size: .875rem; color: var(--ink-2); }
.facts dd { margin: 4px 0 0; font-family: var(--font-head); font-weight: 600; font-size: var(--step-1); line-height: 1.25; }
@media (max-width: 900px) {
  .facts-row { grid-template-columns: 1fr 1fr; }
  .facts-row > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts-row > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- sections ---------- */
.section { padding: var(--section-space) 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head h2 { font-size: var(--step-3); line-height: 1.08; }
.section-head p { margin-top: 14px; font-size: var(--step-1); color: var(--ink-2); }

/* products */
.product-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.product {
  display: grid;
  grid-template-columns: 40px minmax(0, 4fr) minmax(0, 6fr);
  gap: 20px 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.product .glyph { width: 40px; height: 40px; }
.glyph rect { fill: var(--ink); }
.glyph .glyph-mark, .glyph .glyph-line { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.glyph .glyph-ring { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 3; }
.glyph .glyph-person { fill: var(--signal); stroke: var(--ink); stroke-width: 2; }
.glyph .glyph-asset { fill: var(--signal); stroke: var(--ink); stroke-width: 2; }
.glyph .glyph-reader { fill: var(--signal); stroke: var(--ink); stroke-width: 2; }

.product .job {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.2;
}
.product-body h3 { font-size: var(--step-2); line-height: 1.2; }
.product-body h3 span {
  display: block;
  font-family: var(--font-body); font-weight: 500;
  font-size: 1rem; color: var(--ink-2);
  margin-top: 2px;
}
.product-body p { margin-top: 10px; max-width: 38em; }
.product-body .product-link { display: inline-block; margin-top: 12px; }

@media (max-width: 760px) {
  .product { grid-template-columns: 40px minmax(0, 1fr); }
  .product .product-body { grid-column: 2; }
}

/* mind series */
.mind { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tab-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 2px solid var(--ink);
}
.tab-list [role="tab"] {
  text-align: left;
  background: transparent; color: var(--ink);
  border: 0; border-bottom: 6px solid transparent;
  margin-bottom: -2px;
  padding: 12px 14px 14px 0;
  cursor: pointer;
  font: inherit;
}
.tab-list [role="tab"]:hover .tab-name { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tab-list [role="tab"][aria-selected="true"] { border-bottom-color: var(--signal); }
.tab-name { display: block; font-family: var(--font-head); font-weight: 600; font-size: var(--step-1); }
.tab-area { display: block; font-size: .9375rem; color: var(--ink-2); line-height: 1.3; }

.tab-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px 56px;
  padding-top: 36px;
}
.tab-panel:focus-visible { outline-offset: 8px; }
.panel-lead h3 { font-size: var(--step-3); line-height: 1.1; }
.panel-lead p { margin-top: 12px; font-size: var(--step-1); color: var(--ink-2); }
.panel-lead .product-link { display: inline-block; margin-top: 16px; }

.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-top: 1px solid var(--line);
}
.task-list li:last-child { border-bottom: 1px solid var(--line); }
.task-list li::before {
  content: "";
  position: absolute; left: 2px; top: 22px;
  width: 10px; height: 10px;
  background: var(--signal);
  border: 2px solid var(--ink);
}

@media (max-width: 860px) {
  .tab-list {
    display: flex; overflow-x: auto; gap: 20px;
    scrollbar-width: none;
  }
  .tab-list::-webkit-scrollbar { display: none; }
  .tab-list [role="tab"] { flex: none; padding-right: 0; }
  .tab-panel { grid-template-columns: 1fr; }
}

/* results */
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 0;
}
/* subgrid keeps sector, title, text and result figure on the same lines across the three columns */
.result {
  border-top: 6px solid var(--ink);
  padding-top: 18px;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  align-content: start;
}
.result-sector { font-size: .9375rem; color: var(--ink-2); }
.result h3 { font-size: var(--step-2); margin-top: 2px; line-height: 1.2; }
.result dl { margin: 16px 0 0; }
.result dt { font-weight: 600; font-size: .9375rem; margin-top: 12px; }
.result dd { margin: 2px 0 0; color: var(--ink-2); }
.result-figure {
  padding-top: 28px;
  line-height: 1.35;
}
.result-figure .figure {
  display: block;
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.75rem, 2rem + 2.5vw, 3.75rem);
  line-height: 1;
  margin-bottom: 6px;
  box-shadow: inset 0 -0.22em 0 var(--signal);
  width: fit-content;
}
@media (max-width: 860px) {
  .result-grid { grid-template-columns: 1fr; }
  .result + .result { margin-top: 40px; }
}

/* about + clients */
.about { border-top: 1px solid var(--line); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px 64px;
}
.about-copy h2 { font-size: var(--step-3); line-height: 1.08; }
.about-copy p { margin-top: 16px; max-width: 34em; }
.about-copy .text-link { display: inline-block; margin-top: 20px; }

.clients h3 { font-family: var(--font-body); font-weight: 500; font-size: 1rem; color: var(--ink-2); }
.client-list {
  list-style: none; margin: 14px 0 0; padding: 0;
  columns: 3; column-gap: 32px;
}
.client-list li {
  break-inside: avoid;
  font-family: var(--font-head); font-weight: 500;
  font-size: var(--step-1);
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .client-list { columns: 2; }
}

/* contact */
.contact { background: var(--plan); color: #DCE5EA; }
.contact :focus-visible { outline-color: var(--signal); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px 72px;
}
.contact-copy h2 { font-size: var(--step-3); line-height: 1.08; color: #F3F6F7; }
.contact-copy > p { margin-top: 14px; font-size: var(--step-1); color: var(--plan-text); max-width: 30em; }

.offices { margin-top: 36px; display: grid; gap: 24px; }
.office h3 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; color: #F3F6F7; }
.office address { font-style: normal; margin-top: 4px; color: var(--plan-text); }
.office .text-link { display: inline-block; margin-top: 6px; color: #F3F6F7; }
.office-direct { display: flex; flex-direction: column; gap: 4px; }
.office-direct a { color: #F3F6F7; font-weight: 500; text-decoration-color: var(--plan-line); text-underline-offset: 4px; }
.office-direct a:hover { text-decoration-color: var(--signal); }

.contact-form {
  background: #1E303B;
  border-radius: var(--radius-m);
  padding: clamp(20px, 3vw, 32px);
  display: grid; gap: 18px;
  align-content: start;
}
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-weight: 500; font-size: .9375rem; color: #F3F6F7; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; color: #F3F6F7;
  background: var(--plan);
  border: 1px solid #50687A;
  border-radius: var(--radius-s);
  padding: 11px 12px;
  min-height: 46px;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #A9BAC4 50%), linear-gradient(135deg, #A9BAC4 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
  padding-right: 36px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--signal); outline-offset: 0; border-color: var(--signal); }
.field [aria-invalid="true"] { border-color: #FF8A7A; }
.field-error { font-size: .875rem; color: #FFB3A8; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-note { font-size: .875rem; color: var(--plan-text); }
.form-note a { color: #F3F6F7; margin-left: 4px; }
.contact-form .btn { justify-self: start; min-width: 200px; }
.contact-form .btn[disabled] { opacity: .65; cursor: progress; }
.form-status { min-height: 1.5em; font-weight: 500; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: #FFB3A8; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* footer */
.site-footer { padding: 40px 0 48px; }
.footer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  align-items: start;
}
.footer-brand p { margin-top: 12px; color: var(--ink-2); max-width: 30em; font-size: .9375rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { font-weight: 500; text-decoration: none; border-bottom: 2px solid var(--signal); padding-bottom: 2px; }
.footer-links a:hover { border-bottom-color: var(--ink); }
.copyright { grid-column: 1 / -1; font-size: .875rem; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 700px) { .footer-row { grid-template-columns: 1fr; } }
