:root {
  --paper: #f3f0e8;
  --surface: #fbfaf6;
  --ink: #24303a;
  --ink-strong: #17202b;
  --muted: #6f7880;
  --line: #d8d5cc;
  --accent: #d8753f;
  --teal: #347d73;
  --blue: #5267a7;
  --deep: #17202b;
  --deep-soft: #243242;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 72px);
  color: #fffaf1;
  background: linear-gradient(to bottom, rgba(12, 18, 25, 0.72), rgba(12, 18, 25, 0));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
}

.brand-logo {
  display: block;
  width: 36px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.32));
}

nav {
  display: flex;
  gap: clamp(14px, 2.5vw, 30px);
  font-size: 14px;
  font-weight: 750;
}

nav a {
  opacity: 0.88;
}

nav a:hover {
  opacity: 1;
}

.hero {
  min-height: 82vh;
  display: flex;
  align-items: flex-end;
  padding: 112px clamp(22px, 7vw, 92px) 9vh;
  background:
    linear-gradient(90deg, rgba(12, 18, 25, 0.72), rgba(12, 18, 25, 0.36) 46%, rgba(12, 18, 25, 0.02)),
    url("/ymdx-company-assets/company-systems-hero.jpg") center / cover no-repeat;
}

.hero-copy {
  max-width: 780px;
  color: #fffaf1;
}

.mobile-break {
  display: none;
}

.mobile-title {
  display: none;
}

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

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

h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6.4vw, 72px);
  line-height: 1.06;
  font-weight: 900;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(29px, 4vw, 46px);
  line-height: 1.14;
  font-weight: 850;
  color: var(--ink-strong);
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.25;
  color: var(--ink-strong);
}

.lead {
  max-width: 680px;
  color: rgba(255, 250, 241, 0.86);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.68;
}

.mobile-lead {
  display: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-link,
.secondary-link,
.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-link {
  color: #fff;
  background: var(--accent);
}

.secondary-link {
  color: #fffaf1;
  border: 1px solid rgba(255, 250, 241, 0.32);
  background: rgba(255, 250, 241, 0.08);
}

.intro,
.band,
.products,
.solutions,
.contact {
  padding: clamp(58px, 8vw, 108px) clamp(22px, 7vw, 92px);
}

.section-head {
  max-width: 840px;
  margin-bottom: 30px;
}

.section-head.compact {
  margin-bottom: 18px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1fr);
  gap: clamp(26px, 5vw, 72px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.intro-body {
  max-width: 820px;
  padding-top: 4px;
}

.intro-body p,
.capability p,
.solution-grid p,
.product-copy p,
.contact p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.78;
}

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

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

.capability {
  min-height: 268px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 24px rgba(35, 45, 54, 0.06);
}

.index {
  display: inline-flex;
  margin-bottom: 42px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.products {
  display: grid;
  grid-template-columns: minmax(240px, 0.5fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
  color: #fffaf1;
  background: var(--deep);
}

.products h2 {
  color: #fffaf1;
}

.products .eyebrow {
  color: #ffb071;
}

.product-copy {
  max-width: 880px;
}

.product-copy p {
  color: rgba(255, 250, 241, 0.76);
}

.solutions {
  background: var(--surface);
}

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

.solution-grid article {
  min-height: 230px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(35, 45, 54, 0.05);
}

.solution-grid article::before {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-bottom: 24px;
  border-radius: 99px;
  background: var(--accent);
}

.solution-grid article:nth-child(2)::before {
  background: var(--teal);
}

.solution-grid article:nth-child(3)::before {
  background: var(--blue);
}

.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: #e7ebe6;
}

.contact > div {
  max-width: 720px;
}

.contact-button {
  color: #fff;
  background: var(--deep-soft);
  white-space: nowrap;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(22px, 7vw, 92px);
  color: #707982;
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
}

footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1040px) {
  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .solution-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header {
    position: absolute;
    padding: 16px 20px;
    justify-content: flex-start;
  }

  .brand {
    font-size: 15px;
  }

  .brand-logo {
    width: 31px;
    height: 34px;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: 78vh;
    padding: 106px 22px 54px;
    background:
      linear-gradient(90deg, rgba(12, 18, 25, 0.86), rgba(12, 18, 25, 0.62)),
      url("/ymdx-company-assets/company-systems-hero.jpg") 70% center / cover no-repeat;
  }

  .hero-copy {
    width: 100%;
    max-width: calc(100vw - 44px);
  }

  .mobile-break {
    display: inline;
  }

  h1 {
    font-size: 27px;
    line-height: 1.16;
  }

  h2 {
    max-width: 100%;
    font-size: 22px;
    line-height: 1.22;
  }

  h3 {
    font-size: 19px;
  }

  .lead {
    font-size: 15.5px;
    line-height: 1.72;
  }

  .desktop-lead {
    display: none;
  }

  .desktop-title {
    display: none;
  }

  .mobile-title {
    display: block;
  }

  .mobile-lead {
    display: block;
  }

  h1,
  h2,
  h3,
  .lead,
  .intro-body p,
  .product-copy p,
  .solution-grid p,
  .contact p {
    word-break: break-all;
  }

  .intro,
  .band,
  .products,
  .solutions,
  .contact {
    max-width: 100vw;
    overflow: hidden;
  }

  .section-head,
  .intro-body,
  .product-copy,
  .contact > div {
    max-width: 100%;
  }

  .intro,
  .products,
  .capability-grid,
  .solution-grid {
    grid-template-columns: 1fr;
  }

  .capability {
    min-height: auto;
  }

  .index {
    margin-bottom: 22px;
  }

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

  .contact-button,
  .primary-link,
  .secondary-link {
    width: 100%;
  }
}
