:root {
  --ink: #182224;
  --muted: #647173;
  --paper: #fbfcfb;
  --white: #ffffff;
  --line: #dfe8e4;
  --sage: #6f9279;
  --blue: #286c9f;
  --coral: #d36b55;
  --yellow: #d0a83f;
  --soft-green: #eef6f0;
  --soft-blue: #edf5fb;
  --soft-coral: #fbf0ed;
  --shadow: 0 18px 45px rgba(24, 34, 36, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid rgba(24, 34, 36, 0.08);
  background: rgba(251, 252, 251, 0.84);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(1120px, calc(100% - 40px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.nav-links a {
  padding: 7px 10px;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(111, 146, 121, 0.12);
}

.hero {
  min-height: 82svh;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: url("aceworks-hero.png") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 247, 0.46);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 118px 0 58px;
}

.hero-copy {
  width: min(690px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--sage);
  font-size: 14px;
  font-weight: 760;
}

.eyebrow::before {
  content: "";
  width: 38px;
  height: 2px;
  background: currentColor;
}

h3 {
  margin-top: 0;
}
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(46px, 9vw, 104px);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 860;
}

.slogan {
  margin-bottom: 16px;
  font-size: clamp(20px, 3vw, 31px);
  line-height: 1.35;
  color: #263336;
  font-weight: 720;
}

.slogan span {
  display: block;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 520;
}

.hero-note {
  max-width: 540px;
  margin-bottom: 28px;
  color: #465558;
  font-size: 17px;
}

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

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-weight: 720;
  line-height: 1.2;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(24, 34, 36, 0.18);
}

.button.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.button.ghost {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

main {
  background: var(--paper);
}

.section {
  padding: 76px 0;
}

.section.white {
  background: var(--white);
}

.section.tint {
  background:
    linear-gradient(90deg, rgba(238, 246, 240, 0.82), rgba(237, 245, 251, 0.72));
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(260px, 0.3fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 30px;
}

h2 {
  margin-bottom: 12px;
  font-size: 36px;
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 820;
}

.lead {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.philosophy {
  padding-left: 18px;
  border-left: 4px solid var(--coral);
  color: #344447;
  font-size: 19px;
  font-weight: 700;
}

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

.product {
  min-width: 0;
  min-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.product:nth-child(1) {
  background: linear-gradient(180deg, #ffffff, var(--soft-blue));
}

.product:nth-child(2) {
  background: linear-gradient(180deg, #ffffff, var(--soft-green));
}

.product:nth-child(3) {
  background: linear-gradient(180deg, #ffffff, var(--soft-coral));
}

.product:nth-child(4) {
  background: linear-gradient(180deg, #ffffff, #f6f2e5);
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

h3 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.16;
  letter-spacing: 0;
  font-weight: 820;
}

.product-kicker {
  color: var(--muted);
  font-size: 14px;
}

.product-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 8px;
  background: var(--sage);
  font-weight: 820;
}

.product:nth-child(1) .product-icon {
  background: var(--blue);
}

.product:nth-child(3) .product-icon {
  background: var(--coral);
}

.product:nth-child(4) .product-icon {
  background: var(--yellow);
  color: var(--ink);
}

.product-copy {
  margin: 0;
  color: #344447;
  font-size: 17px;
}

.quote {
  margin: 14px 0 0;
  padding-left: 14px;
  border-left: 3px solid rgba(211, 107, 85, 0.66);
  color: #5a4945;
  font-size: 15px;
}

.product-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.qr-mini {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  padding: 7px;
  border: 1px solid rgba(24, 34, 36, 0.16);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  overflow: hidden;
}

.qr-mini .qr-grid {
  width: 100%;
  height: 100%;
}

.qr-callout {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.46fr) minmax(0, 0.54fr);
  gap: 22px;
  align-items: stretch;
}

.contact-panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.contact-panel h3 {
  font-size: 26px;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.contact-button {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.contact-button:hover {
  border-color: rgba(40, 108, 159, 0.42);
  background: var(--soft-blue);
}

.contact-button strong {
  display: block;
  color: var(--ink);
  line-height: 1.2;
}

.contact-button > span:first-child {
  color: var(--ink);
  font-size: inherit;
}

.contact-button > span:first-child > span {
  color: var(--muted);
  font-size: 13px;
}

.arrow {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 800;
}

.location {
  min-height: 100%;
  display: grid;
  align-content: end;
  padding: 26px;
  color: var(--white);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(24, 34, 36, 0.94), rgba(40, 108, 159, 0.74)),
    url("aceworks-hero.png") center / cover no-repeat;
}

.location p {
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.location strong {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

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

.friend-link {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
}

.friend-link:hover {
  border-color: rgba(111, 146, 121, 0.5);
  box-shadow: 0 12px 24px rgba(24, 34, 36, 0.08);
}

.friend-link strong {
  font-size: 16px;
  line-height: 1.3;
}

.friend-link span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 30px 0 38px;
  color: var(--muted);
  background: var(--ink);
}

.footer-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
}

.modal {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(16, 24, 26, 0.58);
}

.modal.is-open {
  display: flex;
}

.modal-dialog {
  width: min(380px, 100%);
  padding: 24px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.modal-title {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
}

.modal-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.qr-large {
  width: min(260px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  width: 100%;
  height: 100%;
  background: #fff;
}

.qr-cell {
  background: transparent;
}

.qr-cell.is-dark {
  background: var(--ink);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 900px) {
  .nav {
    min-height: 62px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 80svh;
    background-position: 58% center;
  }

  .hero::before {
    background: rgba(248, 250, 247, 0.68);
  }

  .section {
    padding: 58px 0;
  }

  .section-head,
  .contact-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .nav,
  .hero-inner,
  .wrap,
  .footer-inner {
    width: min(100% - 28px, 1120px);
  }

  .hero-inner {
    padding-top: 98px;
  }

  .hero-actions,
  .product-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .product,
  .contact-panel,
  .location {
    padding: 20px;
  }

  .product-top {
    align-items: center;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}
