:root {
  --ink: #17211f;
  --muted: #5e6a65;
  --line: #d9dfdc;
  --paper: #f7f4ef;
  --soft: #ece6dc;
  --green: #2f6b57;
  --green-dark: #173f35;
  --gold: #c78a37;
  --white: #ffffff;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 64px);
  color: var(--white);
  background: rgba(23, 33, 31, 0.58);
  backdrop-filter: blur(16px);
}

.brand,
.main-nav,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  width: auto;
  height: 54px;
  gap: 14px;
  color: var(--white);
}

.logo-full,
.logo-mark {
  display: block;
  width: 286px;
  height: 100%;
  object-fit: contain;
}

.logo-mark {
  display: none;
}

.brand-company {
  display: inline-flex;
  max-width: 360px;
  align-items: center;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
}

.main-nav {
  gap: clamp(16px, 3vw, 34px);
  font-size: 15px;
}

.main-nav a {
  opacity: 0.86;
}

.main-nav a:hover {
  opacity: 1;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: center;
  padding: 120px clamp(20px, 7vw, 96px) 72px;
  overflow: hidden;
  color: var(--white);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(12, 22, 20, 0.82) 0%, rgba(12, 22, 20, 0.52) 45%, rgba(12, 22, 20, 0.12) 100%),
    linear-gradient(0deg, rgba(12, 22, 20, 0.46), rgba(12, 22, 20, 0.1));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.16;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.25;
}

.hero-copy {
  max-width: 620px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: var(--green);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.08);
}

.button.light {
  color: var(--green-dark);
  background: var(--white);
}

.button.primary.light:hover {
  color: var(--green-dark);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(12, 43, 34, 0.22);
}

.section {
  padding: clamp(48px, 7vw, 76px) clamp(20px, 7vw, 96px);
}

.compact {
  padding-top: clamp(34px, 5vw, 56px);
  padding-bottom: clamp(34px, 5vw, 56px);
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.contact-band p {
  color: var(--muted);
  font-size: 18px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 18px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.service-card {
  display: block;
  min-height: 218px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.service-card:hover {
  border-color: rgba(47, 107, 87, 0.45);
  box-shadow: 0 14px 30px rgba(23, 33, 31, 0.08);
  transform: translateY(-3px);
}

.card-number {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}

.service-card p {
  color: var(--muted);
}

.issue-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.issue-grid span {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--green-dark);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-align: center;
}

.details {
  display: grid;
  gap: 16px;
  padding-top: 0;
}

.detail-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  scroll-margin-top: 96px;
}

.detail-item h2 {
  margin-bottom: 12px;
  font-size: clamp(26px, 3vw, 36px);
}

.detail-item p:not(.section-kicker) {
  max-width: 700px;
  color: var(--muted);
  font-size: 17px;
}

.detail-item ul {
  margin: 18px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.detail-item li {
  margin: 6px 0;
}

.detail-item img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: linear-gradient(145deg, #ffffff, #eef3f1);
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 8px;
  padding: 18px;
}

.profibus-visual {
  position: relative;
  height: 220px;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #eef3f1);
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 8px;
}

.profibus-visual img {
  display: block;
  max-height: none;
  padding: 0;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.profibus-visual .profibus-tool-shot {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 2;
  width: 60%;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 18px rgba(23, 33, 31, 0.18));
}

.profibus-screens {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 8px;
  align-items: stretch;
  opacity: 1;
}

.profibus-screens img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  object-position: top left;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(23, 33, 31, 0.12);
  filter: saturate(1.12) contrast(1.08);
}

.profinet-visual {
  position: relative;
  height: 220px;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #eef3f1);
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 8px;
}

.profinet-visual img {
  display: block;
  max-height: none;
  padding: 0;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.profinet-visual .profinet-tool-shot {
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 2;
  width: 64%;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 18px rgba(23, 33, 31, 0.18));
}

.profinet-screens {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 8px;
  align-items: stretch;
  opacity: 1;
}

.profinet-screens img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  object-position: top left;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(23, 33, 31, 0.1);
}

.maintenance-visual {
  position: relative;
  height: 220px;
  padding: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #eef3f1);
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 8px;
}

.maintenance-visual img {
  display: block;
  max-height: none;
  padding: 0;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.maintenance-visual .maintenance-platform-shot {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 2;
  width: 60%;
  transform: translateX(-50%);
  background: var(--white);
  box-shadow: 0 12px 20px rgba(23, 33, 31, 0.12);
}

.maintenance-screens {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: 8px;
  align-items: stretch;
}

.maintenance-screens img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  object-position: top left;
  background: var(--white);
  box-shadow: 0 8px 18px rgba(23, 33, 31, 0.1);
}

.rectification-visual {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(145deg, #ffffff, #eef3f1);
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 8px;
}

.rectification-visual img {
  display: block;
  width: 100%;
  max-height: 118px;
  padding: 0;
  object-fit: contain;
  background: var(--white);
  border: 0;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(23, 33, 31, 0.08);
}

.testing-visual {
  height: 220px;
  overflow: hidden;
  padding: 14px;
  background: linear-gradient(145deg, #ffffff, #eef3f1);
  border: 1px solid rgba(23, 33, 31, 0.08);
  border-radius: 8px;
}

.testing-visual img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  padding: 0;
  object-fit: cover;
  object-position: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.tools {
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.industries {
  background: var(--paper);
}

.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.industry-grid article {
  min-height: 178px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.industry-grid h3 {
  font-size: 21px;
}

.industry-grid p {
  color: var(--muted);
}

.tool-grid,
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.case-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-grid article,
.case-grid article {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(23, 33, 31, 0.04);
}

.tool-grid img,
.case-grid img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: contain;
  background:
    radial-gradient(circle at 20% 10%, rgba(47, 107, 87, 0.09), transparent 34%),
    linear-gradient(145deg, #ffffff, #eef3f1);
  border-bottom: 1px solid var(--line);
}

.product-visual {
  object-fit: contain;
}

.interface-visual,
.diagram-visual {
  object-fit: contain;
}

.photo-visual,
.case-grid img.photo-visual {
  object-fit: cover;
  filter: saturate(0.88) contrast(0.94) brightness(1.02);
}

.case-grid article:first-child .photo-visual {
  object-position: center 54%;
}

.case-grid article:nth-child(2) .photo-visual {
  object-position: center 42%;
}

.case-grid article:nth-child(3) .photo-visual {
  object-position: center center;
}

.tool-grid h3,
.tool-grid p,
.case-grid h3,
.case-grid p {
  margin-left: 20px;
  margin-right: 20px;
}

.tool-grid h3,
.case-grid h3 {
  margin-top: 20px;
}

.tool-grid p,
.case-grid p {
  margin-bottom: 22px;
  color: var(--muted);
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(44px, 6vw, 64px) clamp(20px, 7vw, 96px);
  color: var(--white);
  background: var(--green-dark);
}

.contact-band h2,
.contact-band p {
  max-width: 720px;
}

.contact-band p {
  color: rgba(255, 255, 255, 0.74);
  margin-bottom: 0;
}

.contact-email {
  display: inline-flex;
  margin-top: 14px;
  color: var(--white);
  font-weight: 800;
}

.contact-email:hover {
  color: rgba(255, 255, 255, 0.78);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 7vw, 96px);
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.consult-modal[hidden] {
  display: none;
}

.consult-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.consult-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 20, 0.62);
  backdrop-filter: blur(8px);
}

.consult-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: clamp(26px, 4vw, 38px);
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.consult-dialog h2 {
  margin-bottom: 22px;
  font-size: clamp(28px, 4vw, 38px);
}

.consult-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.consult-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.consult-form label {
  display: grid;
  gap: 8px;
  color: var(--green-dark);
  font-weight: 800;
}

.consult-form input,
.consult-form select,
.consult-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.consult-form input:focus,
.consult-form select:focus,
.consult-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 107, 87, 0.12);
}

.consult-form .full-field,
.form-note,
.consult-form .button {
  grid-column: 1 / -1;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.floating-consult {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  min-width: 62px;
  height: 46px;
  color: var(--white);
  background: var(--green);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(23, 33, 31, 0.22);
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 800px) {
  .site-header {
    position: absolute;
    padding: 16px 20px;
  }

  .main-nav {
    gap: 14px;
    font-size: 14px;
  }

  .hero {
    min-height: 82vh;
    padding-top: 110px;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(12, 22, 20, 0.84), rgba(12, 22, 20, 0.42));
  }

  .issue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid,
  .tool-grid,
  .case-grid,
  .industry-grid,
  .detail-item {
    grid-template-columns: 1fr;
  }

  .detail-item {
    padding: 24px;
  }

  .detail-item img {
    max-height: 170px;
  }

  .profibus-visual {
    height: 190px;
  }

  .profinet-visual {
    height: 190px;
  }

  .maintenance-visual {
    height: 190px;
  }

  .service-card {
    min-height: auto;
  }

  .card-number {
    margin-bottom: 24px;
  }

  .contact-band,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .consult-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .brand {
    width: 46px;
    height: 46px;
    gap: 0;
  }

  .logo-full {
    display: none;
  }

  .logo-mark {
    display: block;
    width: 46px;
  }

  .brand-company {
    display: none;
  }

  h1 {
    font-size: 36px;
  }

  .button {
    width: 100%;
  }

  .profibus-visual,
  .profinet-visual,
  .maintenance-visual {
    height: auto;
    overflow: visible;
  }

  .profibus-visual img,
  .profinet-visual img,
  .maintenance-visual img {
    max-height: none;
  }

  .profibus-visual .profibus-tool-shot {
    position: static;
    width: 76%;
    margin: 0 auto 10px;
    transform: none;
  }

  .profibus-screens {
    position: static;
    grid-template-columns: 1fr;
  }

  .profibus-screens img,
  .profinet-screens img,
  .maintenance-screens img {
    height: auto;
  }

  .profinet-visual .profinet-tool-shot {
    position: static;
    width: 74%;
    margin: 0 auto 10px;
    transform: none;
  }

  .profinet-screens {
    position: static;
    grid-template-columns: 1fr;
  }

  .maintenance-screens {
    position: static;
    grid-template-columns: 1fr;
  }

  .maintenance-visual .maintenance-platform-shot {
    position: static;
    width: 100%;
    margin: 0 auto 10px;
    transform: none;
  }

  .floating-consult {
    right: 14px;
    bottom: 14px;
  }
}
