:root {
  --red: #f6043d;
  --red-deep: #b6112b;
  --ink: #1f2024;
  --graphite: #34363b;
  --muted: #73767d;
  --line: #e3e5e8;
  --mist: #f4f6f7;
  --paper: #fbfaf7;
  --gold: #b99b68;
  --white: #ffffff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 28px;
  padding: 14px clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(227, 229, 232, 0.92);
  backdrop-filter: blur(18px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand > img:first-child {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.brand-wordmark {
  width: 98px;
  height: auto;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  color: #3e4147;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--red);
}

.header-phone {
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  background: var(--ink);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-nav {
  position: fixed;
  top: 74px;
  right: 16px;
  z-index: 25;
  display: none;
  width: min(260px, calc(100vw - 32px));
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(31, 32, 36, 0.16);
}

.mobile-nav.is-open {
  display: grid;
}

.mobile-nav a {
  padding: 13px 14px;
  border-bottom: 1px solid #f0f1f2;
  font-size: 15px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: clamp(32px, 5vw, 76px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(56px, 7vw, 98px) clamp(20px, 4vw, 56px);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(244, 246, 247, 0.72)),
    url("brand/hexu-pattern-gray.png") center top / 640px auto repeat;
}

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

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

h1 {
  max-width: 720px;
  margin-bottom: 24px;
  font-size: clamp(42px, 6.3vw, 80px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 620px;
  margin-bottom: 24px;
  color: #4f535b;
  font-size: clamp(17px, 1.65vw, 21px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.hero-meta span,
.client-row span {
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--graphite);
  font-size: 14px;
  font-weight: 800;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 900;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--red);
}

.btn-secondary {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.btn-light {
  color: var(--red);
  background: var(--white);
}

.hero-visual {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-visual > img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.hero-caption {
  position: absolute;
  right: 20px;
  bottom: 20px;
  max-width: 310px;
  padding: 18px 20px;
  color: var(--white);
  background: rgba(31, 32, 36, 0.86);
  border-left: 4px solid var(--red);
}

.hero-caption strong {
  display: block;
  margin-bottom: 4px;
  font-size: 20px;
}

.hero-caption span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.section {
  padding: clamp(76px, 9vw, 124px) clamp(20px, 4vw, 56px);
}

.section-heading {
  max-width: var(--max);
  margin: 0 auto 44px;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.65fr);
  gap: 40px;
  align-items: end;
}

.section-heading h2,
.advantage-copy h2,
.contact-copy h2 {
  margin-bottom: 18px;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 950;
  line-height: 1.12;
}

.section-heading p:not(.eyebrow),
.advantage-copy p,
.contact-copy p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

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

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: var(--max);
  margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line);
}

.service-card {
  min-height: 280px;
  padding: 30px;
  background: var(--white);
}

.service-card span,
.process-list span {
  display: inline-block;
  margin-bottom: 34px;
  color: var(--red);
  font-size: 13px;
  font-weight: 950;
}

.service-card h3,
.case-card h3,
.case-feature-copy h3 {
  margin-bottom: 12px;
  font-size: 22px;
  line-height: 1.25;
}

.service-card p,
.case-card span,
.case-feature-copy p,
.box-type-copy p,
.process-list p,
.advantage-list p {
  color: var(--muted);
}

.box-type-section {
  background: var(--mist);
}

.box-type-carousel {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 1px;
  max-width: var(--max);
  margin: 0 auto;
  background: var(--line);
  border: 1px solid var(--line);
}

.box-type-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 0;
  overflow: hidden;
  background: var(--white);
}

.box-type-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  object-fit: contain;
  background: var(--white);
  opacity: 0;
  transform: translateX(18px);
  transition:
    opacity 0.55s ease,
    transform 0.75s ease;
}

.box-type-slide.is-active {
  opacity: 1;
  transform: translateX(0);
}

.box-type-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 3.2vw, 42px);
  background: var(--paper);
}

.box-type-copy span {
  display: block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.box-type-copy h3 {
  margin-bottom: 12px;
  font-size: 25px;
  line-height: 1.22;
}

.carousel-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.carousel-dot {
  width: 30px;
  height: 4px;
  padding: 0;
  background: #d8dce0;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

.carousel-dot.is-active {
  width: 52px;
  background: var(--red);
}

.advantage-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1.14fr);
  gap: clamp(32px, 6vw, 80px);
  padding: clamp(76px, 9vw, 124px) clamp(20px, 4vw, 56px);
  background: var(--ink);
}

.advantage-copy {
  max-width: 620px;
}

.advantage-copy h2 {
  color: var(--white);
}

.advantage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.advantage-list div {
  min-height: 190px;
  padding: 28px;
  background: #292b30;
}

.advantage-list strong {
  display: block;
  margin-bottom: 14px;
  color: var(--white);
  font-size: 20px;
}

.case-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1px;
  max-width: var(--max);
  margin: 0 auto 26px;
  background: var(--line);
  border: 1px solid var(--line);
}

.carousel-media {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--mist);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  transition:
    opacity 0.75s ease,
    transform 1.4s ease;
}

.carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.case-feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px);
  background: var(--paper);
}

.case-feature-copy span,
.case-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 900;
}

.case-feature-copy span,
.gallery-heading span {
  color: var(--red);
}

.gallery-heading {
  max-width: var(--max);
  margin: 42px auto 20px;
}

.gallery-heading span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.gallery-heading h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.other-cases-heading {
  margin-top: 56px;
}

.gallery-grid,
.case-grid {
  display: grid;
  max-width: var(--max);
  margin: 0 auto;
}

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

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.case-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.case-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.case-grid .case-card:first-child {
  display: block;
}

.case-grid .case-card:not(:first-child) {
  display: block;
  min-height: 0;
}

.case-grid .case-card::before {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: var(--red);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
  line-height: 34px;
  text-align: center;
}

.case-grid .case-card:nth-child(1)::before {
  content: "01";
}

.case-grid .case-card:nth-child(2)::before {
  content: "02";
}

.case-grid .case-card:nth-child(3)::before {
  content: "03";
}

.case-grid .case-card:nth-child(4)::before {
  content: "04";
}

.case-grid .case-card:nth-child(4) {
  grid-column: auto;
  display: block;
  min-height: 0;
}

.case-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  background: var(--mist);
}

.case-grid .case-card:first-child img {
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.case-grid .case-card:not(:first-child) img {
  height: auto;
  aspect-ratio: 4 / 3;
}

.case-grid .case-card:nth-child(4) img {
  min-height: 0;
}

.case-card div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 24px;
}

.case-grid .case-card:first-child div {
  justify-content: center;
  padding: 24px;
}

.case-grid .case-card:not(:first-child) div {
  border-top: 1px solid var(--line);
}

.client-section {
  padding: 76px clamp(20px, 4vw, 56px);
  background: var(--mist);
}

.compact {
  margin-bottom: 28px;
}

.client-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: var(--max);
  margin: 0 auto;
}

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

.process-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  background: var(--line);
  border: 1px solid var(--line);
}

.process-list li {
  min-height: 240px;
  padding: 26px;
  background: var(--white);
}

.process-list strong {
  display: block;
  margin-bottom: 12px;
  font-size: 19px;
}

.factory-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.62fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  padding-top: clamp(56px, 6vw, 86px);
  padding-bottom: clamp(56px, 6vw, 86px);
  background: var(--mist);
}

.factory-copy h2 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: clamp(30px, 3.3vw, 46px);
  font-weight: 950;
  line-height: 1.08;
}

.factory-copy p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.factory-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.factory-points span {
  min-height: 54px;
  padding: 15px 16px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 850;
}

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

.factory-photo {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.factory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.factory-photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  color: var(--white);
  background: rgba(29, 31, 36, 0.82);
  border-radius: 3px;
  font-size: 13px;
  font-weight: 850;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(72px, 8vw, 112px) clamp(20px, 4vw, 56px);
  color: var(--white);
  background:
    linear-gradient(0deg, rgba(246, 4, 61, 0.94), rgba(246, 4, 61, 0.94)),
    url("brand/hexu-pattern-red.png") center / 760px auto repeat;
}

.contact-copy .eyebrow,
.contact-copy p {
  color: rgba(255, 255, 255, 0.84);
}

.contact-copy h2 {
  max-width: 760px;
}

.contact-phone {
  display: block;
  margin-bottom: 14px;
  color: var(--white);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 950;
  white-space: nowrap;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 4vw, 56px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer-brand > img:first-child {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

@media (max-width: 1040px) {
  .hero,
  .split-heading,
  .box-type-carousel,
  .advantage-section,
  .case-feature,
  .factory-section,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .service-grid,
  .advantage-list,
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .case-grid .case-card:first-child,
  .case-grid .case-card:not(:first-child) {
    grid-row: auto;
    display: block;
    grid-template-columns: none;
    grid-template-rows: none;
    min-height: 0;
  }

  .case-grid .case-card:first-child img,
  .case-grid .case-card:not(:first-child) img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .case-grid .case-card:first-child div,
  .case-grid .case-card:not(:first-child) div {
    padding: 24px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

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

  .process-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .factory-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .factory-photo {
    min-height: 240px;
  }
}

@media (max-width: 760px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    padding: 12px 18px;
  }

  .brand > img:first-child {
    width: 34px;
    height: 34px;
  }

  .brand-wordmark {
    width: 86px;
  }

  .desktop-nav,
  .header-phone {
    display: none;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .hero {
    padding-top: 46px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(34px, 9vw, 42px);
    line-height: 1.12;
  }

  .hero-actions,
  .contact-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .hero-visual,
  .hero-visual > img {
    min-height: 360px;
  }

  .hero-caption {
    right: 14px;
    bottom: 14px;
    left: 14px;
    max-width: none;
  }

  .service-grid,
  .advantage-list,
  .case-grid,
  .process-list {
    grid-template-columns: 1fr;
  }

  .case-grid {
    gap: 14px;
  }

  .case-grid .case-card:first-child,
  .case-grid .case-card:not(:first-child) {
    grid-template-columns: none;
    min-height: 0;
  }

  .case-grid .case-card:first-child img,
  .case-grid .case-card:not(:first-child) img {
    min-height: 0;
  }

  .case-grid .case-card:first-child div,
  .case-grid .case-card:not(:first-child) div {
    padding: 18px;
  }

  .case-grid .case-card::before {
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    font-size: 11px;
    line-height: 28px;
  }

  .case-grid .case-card h3 {
    margin-bottom: 0;
    font-size: 20px;
  }

  .service-card,
  .advantage-list div,
  .process-list li {
    min-height: auto;
  }

  .box-type-stage {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }

  .box-type-slide {
    padding: 0;
  }

  .carousel-media {
    min-height: 360px;
  }

  .factory-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 22px;
  }

  .factory-points span {
    min-height: 48px;
    padding: 12px;
    font-size: 13px;
    line-height: 1.35;
  }

  .factory-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 26px;
  }

  .factory-photo {
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .factory-photo:first-child {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }

  .factory-photo figcaption {
    left: 10px;
    bottom: 10px;
    padding: 6px 9px;
    font-size: 12px;
  }

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

  .contact-phone {
    white-space: normal;
  }

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

@media (max-width: 420px) {
  h1 {
    font-size: 32px;
  }

  .section-heading h2,
  .advantage-copy h2,
  .factory-copy h2,
  .contact-copy h2 {
    font-size: 30px;
  }

  .factory-copy p:not(.eyebrow) {
    font-size: 15px;
    line-height: 1.75;
  }

  .case-grid .case-card:first-child,
  .case-grid .case-card:not(:first-child) {
    grid-template-columns: 1fr;
  }

  .case-grid .case-card:first-child img,
  .case-grid .case-card:not(:first-child) img {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .case-grid .case-card:first-child div,
  .case-grid .case-card:not(:first-child) div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}
