:root {
  color-scheme: dark;
  --ink: #10171d;
  --surface: #182129;
  --surface-raised: #222e37;
  --line: #41515e;
  --muted: #aebbc4;
  --text: #f4f7f8;
  --accent: #42cb91;
  --accent-dark: #0d704d;
  --danger: #ef646f;
  --max: 1220px;
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  line-height: 1.55;
}

body.menu-open { overflow: hidden; }

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

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  background: var(--accent);
  color: #07120e;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 12px max(24px, calc((100vw - var(--max)) / 2));
  background: rgba(16, 23, 29, 0.94);
  border-bottom: 1px solid rgba(174, 187, 196, 0.18);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 22px;
  font-weight: 750;
}

.brand img { border-radius: 6px; }
.brand span span { color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: #dce4e8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--accent); }

.site-nav .nav-contact {
  padding: 9px 14px;
  color: #08140f;
  background: var(--accent);
  border-radius: 6px;
}

.site-nav .nav-contact:hover,
.site-nav .nav-contact:focus-visible { color: #08140f; background: #63dba7; }

.menu-button { display: none; }

.hero {
  position: relative;
  min-height: min(830px, 92vh);
  display: flex;
  align-items: center;
  background-color: #141c22;
  background-image: url("maincnc-interface.png");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(8, 13, 17, 0.78);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 48px));
  margin-left: max(24px, calc((100vw - var(--max)) / 2));
  padding-top: 64px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 10vw, 126px);
  line-height: 0.88;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 660px;
  margin: 30px 0 0;
  color: #e5ebee;
  font-size: clamp(20px, 2.2vw, 29px);
  line-height: 1.35;
}

.hero-actions,
.guide-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
}

.button-primary { color: #08140f; background: var(--accent); }
.button-primary:hover, .button-primary:focus-visible { background: #63dba7; }
.button-secondary { color: var(--text); border-color: #92a2ad; background: rgba(16, 23, 29, 0.6); }
.button-secondary:hover, .button-secondary:focus-visible { border-color: var(--accent); }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 42px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(174, 187, 196, 0.4);
  list-style: none;
  color: #dce4e8;
  font-size: 14px;
  font-weight: 700;
}

.hero-facts li::before { content: "+"; margin-right: 8px; color: var(--accent); }

.hero-caption {
  position: absolute;
  right: max(24px, calc((100vw - var(--max)) / 2));
  bottom: 20px;
  z-index: 1;
  margin: 0;
  color: #c3cdd3;
  font-size: 12px;
}

.section {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 104px 0;
}

.section h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section h3 { letter-spacing: 0; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 70px;
  align-items: end;
}

.intro-copy {
  color: #d2dbe0;
  font-size: 18px;
}

.intro-copy p:first-child { margin-top: 0; }
.intro-copy p:last-child { margin-bottom: 0; }

.workflow {
  width: 100%;
  padding-right: max(24px, calc((100vw - var(--max)) / 2));
  padding-left: max(24px, calc((100vw - var(--max)) / 2));
  background: #e9eef0;
  color: #152029;
}

.workflow .eyebrow { color: var(--accent-dark); }
.compact { margin-bottom: 48px; }

.workflow-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border-top: 2px solid #71828d;
  list-style: none;
}

.workflow-list li {
  min-width: 0;
  padding: 24px 24px 10px 0;
  border-right: 1px solid #a8b4bb;
}

.workflow-list li + li { padding-left: 24px; }
.workflow-list li:last-child { border-right: 0; }
.step-number { color: var(--accent-dark); font-size: 14px; font-weight: 800; }
.workflow-list h3 { margin: 36px 0 10px; font-size: 22px; }
.workflow-list p { margin: 0; color: #42525d; }

.product {
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.35fr);
  gap: 64px;
  align-items: center;
}

.product-copy > p:not(.eyebrow) { color: #c6d0d6; font-size: 18px; }

.check-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid #32414b;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 20px;
  width: 10px;
  height: 5px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.product-figure { margin: 0; }
.product-figure img { width: 100%; border: 1px solid #586a77; border-radius: 6px; box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32); }
.product-figure figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; }

.machines {
  width: 100%;
  padding-right: max(24px, calc((100vw - var(--max)) / 2));
  padding-left: max(24px, calc((100vw - var(--max)) / 2));
  background: var(--surface);
}

.machine-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 52px;
}

.machine-grid article {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface-raised);
  border: 1px solid #52636f;
  border-radius: 6px;
}

.machine-index { margin: 0; color: var(--accent); font: 700 13px/1 Consolas, monospace; }
.machine-grid h3 { margin: 56px 0 12px; font-size: 30px; }
.machine-grid article > p:not(.machine-index) { margin: 0; color: #c8d2d7; }
.machine-grid span { margin-top: auto; padding-top: 28px; color: var(--accent); font: 700 15px/1 Consolas, monospace; }

.control { border-bottom: 1px solid #364650; }

.control-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}

.control-heading .eyebrow { min-width: 190px; }

.control-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  margin-top: 64px;
}

.control-grid > div { padding-top: 22px; border-top: 2px solid var(--accent); }
.control-grid h3 { margin: 0 0 12px; font-size: 22px; }
.control-grid p { margin: 0; color: #b9c5cb; }

.safety-note {
  margin: 72px 0 0;
  padding: 22px 0 0 20px;
  border-top: 1px solid #495b67;
  border-left: 4px solid var(--danger);
  color: #d8e0e4;
}

.guide-callout {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 60px;
}

.guide-callout > div:first-child { max-width: 760px; }
.guide-callout p:not(.eyebrow) { max-width: 680px; color: #c4cfd5; font-size: 18px; }
.guide-actions { min-width: max-content; margin-top: 0; flex-direction: column; align-items: stretch; }
.text-link { color: var(--accent); text-align: center; font-size: 14px; font-weight: 700; }

.contact {
  width: 100%;
  padding-right: max(24px, calc((100vw - var(--max)) / 2));
  padding-left: max(24px, calc((100vw - var(--max)) / 2));
  background: var(--accent);
  color: #07140f;
}

.contact .eyebrow { color: #07553b; }
.contact h2 { max-width: 880px; }
.contact > p:not(.eyebrow) { margin: 24px 0; font-size: 18px; }
.contact-mail { display: inline-block; font-size: clamp(20px, 3vw, 34px); font-weight: 750; text-underline-offset: 5px; overflow-wrap: anywhere; }

.site-footer {
  min-height: 130px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 40px;
  padding: 30px max(24px, calc((100vw - var(--max)) / 2));
  color: var(--muted);
  background: #0b1014;
  font-size: 13px;
}

.footer-brand { color: var(--text); }

.not-found {
  min-height: 100vh;
  display: grid;
  align-content: center;
}

.not-found h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
}

:focus-visible { outline: 3px solid #9be7c5; outline-offset: 4px; }

@media (max-width: 900px) {
  .site-header { min-height: 62px; }
  .menu-button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    color: var(--text);
    background: transparent;
    border: 1px solid #536570;
    border-radius: 6px;
  }
  .menu-lines,
  .menu-lines::before,
  .menu-lines::after {
    width: 18px;
    height: 2px;
    display: block;
    background: currentColor;
    content: "";
  }
  .menu-lines { position: relative; }
  .menu-lines::before { position: absolute; top: -6px; }
  .menu-lines::after { position: absolute; top: 6px; }
  .site-nav {
    position: fixed;
    inset: 62px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px 24px 26px;
    background: #111920;
    border-bottom: 1px solid #50616d;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid #2d3a43; }
  .site-nav .nav-contact { margin-top: 14px; padding: 12px 14px; text-align: center; border: 0; }
  .hero { min-height: 760px; background-position: 38% center; }
  .hero-content { padding-top: 40px; }
  .hero-caption { display: none; }
  .intro, .product { grid-template-columns: 1fr; }
  .intro { gap: 34px; align-items: start; }
  .product { gap: 42px; }
  .workflow-list { grid-template-columns: repeat(2, 1fr); }
  .workflow-list li:nth-child(2) { border-right: 0; }
  .workflow-list li:nth-child(n+3) { border-top: 1px solid #a8b4bb; }
  .machine-grid { grid-template-columns: 1fr; }
  .machine-grid article { min-height: 240px; }
  .machine-grid h3 { margin-top: 36px; }
  .control-heading { display: block; }
  .control-grid { grid-template-columns: 1fr; gap: 30px; }
  .guide-callout { align-items: start; flex-direction: column; }
  .guide-actions { min-width: 220px; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer > p:first-of-type { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 580px) {
  .section { width: min(var(--max), calc(100% - 32px)); padding: 76px 0; }
  .hero-content { width: calc(100% - 32px); margin-left: 16px; }
  .hero h1 { font-size: 60px; }
  .hero-lead { font-size: 19px; }
  .hero-actions { align-items: stretch; flex-direction: column; max-width: 290px; }
  .workflow, .machines, .contact { padding: 76px 16px; }
  .workflow-list { grid-template-columns: 1fr; }
  .workflow-list li,
  .workflow-list li + li { padding: 22px 0; border-top: 1px solid #a8b4bb; border-right: 0; }
  .workflow-list li:first-child { border-top: 0; }
  .workflow-list h3 { margin-top: 18px; }
  .machine-grid article { padding: 22px; }
  .product-figure { margin-right: -16px; margin-left: -16px; }
  .product-figure img { border-right: 0; border-left: 0; border-radius: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; }
  .site-footer > p:first-of-type { grid-column: auto; grid-row: auto; }
  .site-footer p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
