:root {
  --ink: #101418;
  --muted: #5f6b73;
  --paper: #f6f2ea;
  --panel: #ffffff;
  --line: rgba(16, 20, 24, 0.14);
  --night: #071016;
  --teal: #16b8b1;
  --amber: #d69a3a;
  --steel: #d7e4e6;
  --max: 1160px;
  --header-h: 72px;
  font-family:
    "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

body.nav-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 clamp(20px, 4vw, 56px);
  color: #fff;
  transition:
    background 220ms ease,
    border-color 220ms ease,
    backdrop-filter 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(7, 16, 22, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  position: relative;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  background: var(--amber);
}

.brand-mark::before {
  width: 10px;
  height: 2px;
  top: 11px;
  left: 6px;
}

.brand-mark::after {
  width: 2px;
  height: 10px;
  top: 6px;
  left: 11px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.site-nav a {
  position: relative;
  padding: 10px 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--teal);
  transition: transform 180ms ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.site-header.is-open .nav-toggle span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.site-header.is-open .nav-toggle span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.hero {
  min-height: 100svh;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--night);
}

.hero-media,
.hero-scrim {
  position: absolute;
  inset: 0;
}

.hero-media {
  background:
    image-set(
      url("assets/hero-factory-agent.webp") type("image/webp"),
      url("assets/hero-factory-agent.png") type("image/png")
    )
    center / cover no-repeat;
  transform: scale(1.02);
  animation: slow-drift 18s ease-in-out infinite alternate;
}

.hero-scrim {
  background:
    linear-gradient(
      90deg,
      rgba(3, 8, 12, 0.96) 0%,
      rgba(3, 8, 12, 0.72) 32%,
      rgba(3, 8, 12, 0.18) 62%,
      rgba(3, 8, 12, 0.12) 100%
    ),
    linear-gradient(180deg, rgba(3, 8, 12, 0.2), rgba(3, 8, 12, 0.68));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100% - 40px));
  padding-top: calc(var(--header-h) + 12vh);
  margin-left: clamp(20px, 7vw, 96px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(52px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero h1 span {
  display: inline-block;
}

.hero-copy {
  width: min(540px, 100%);
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.btn.primary {
  color: #071016;
  background: var(--teal);
}

.btn.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  width: min(420px, 100%);
  margin: 58px 0 0;
  background: rgba(255, 255, 255, 0.14);
}

.hero-metrics div {
  padding: 18px 16px;
  background: rgba(3, 8, 12, 0.52);
}

.hero-metrics dt {
  color: #fff;
  font-weight: 800;
}

.hero-metrics dd {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(76px, 9vw, 132px) 0;
}

.intro-layout,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1fr);
  gap: clamp(42px, 7vw, 100px);
  align-items: start;
}

.section-copy h2,
.flow-sticky h2,
.section-heading h2,
.contact-copy h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: 0;
}

.section-copy p,
.flow-sticky p,
.contact-copy p {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.capability-list {
  display: grid;
  gap: 18px;
}

.capability,
.scenario-item,
.flow-step {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.capability-index {
  display: block;
  margin-bottom: 34px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
}

.capability h3,
.scenario-item h3,
.flow-step h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0;
}

.capability p,
.scenario-item p,
.flow-step p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.flow {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1fr);
  gap: clamp(44px, 8vw, 120px);
  border-top: 1px solid var(--line);
}

.flow-sticky {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
}

.flow-steps {
  display: grid;
  gap: 44px;
  counter-reset: flow;
}

.flow-step {
  min-height: 170px;
  position: relative;
  padding-left: 78px;
}

.flow-step::before {
  counter-increment: flow;
  content: "0" counter(flow);
  position: absolute;
  left: 0;
  top: 18px;
  color: rgba(16, 20, 24, 0.24);
  font-size: 30px;
  font-weight: 900;
}

.flow-step span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.section-heading {
  width: min(760px, 100%);
  margin-bottom: 54px;
}

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

.scenario {
  border-top: 1px solid var(--line);
}

.architecture {
  color: #fff;
  background: var(--night);
  width: 100%;
  max-width: none;
  padding-left: max(20px, calc((100vw - var(--max)) / 2));
  padding-right: max(20px, calc((100vw - var(--max)) / 2));
}

.architecture .section-heading,
.architecture .section-kicker {
  color: var(--steel);
}

.architecture .section-kicker {
  color: var(--teal);
}

.arch-map {
  display: grid;
  gap: 1px;
  background:
    linear-gradient(90deg, rgba(22, 184, 177, 0.42), rgba(214, 154, 58, 0.2)),
    rgba(255, 255, 255, 0.1);
}

.arch-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  min-height: 96px;
  padding: 24px 28px;
  background: rgba(7, 16, 22, 0.92);
}

.arch-row span {
  color: var(--teal);
  font-weight: 900;
  font-size: 24px;
}

.arch-row p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.7;
}

.contact {
  width: min(var(--max), calc(100% - 40px));
}

.contact-form {
  padding: clamp(24px, 4vw, 38px);
  color: #fff;
  background: #101418;
}

.contact-form label {
  display: block;
  margin-bottom: 18px;
}

.contact-form span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0;
  padding: 14px 15px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
}

.contact-form textarea {
  resize: vertical;
}

.form-submit {
  width: 100%;
  border: 0;
  cursor: pointer;
}

.form-note {
  min-height: 22px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(20px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.72);
  background: #101418;
}

.site-footer a {
  color: var(--teal);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 680ms ease,
    transform 680ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slow-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    padding: 14px 20px 22px;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    background: rgba(7, 16, 22, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .site-header.is-open .site-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 16px 0;
    font-size: 18px;
  }

  .hero {
    min-height: 760px;
  }

  .hero-media {
    background-position: 62% center;
  }

  .hero-content {
    padding-top: calc(var(--header-h) + 92px);
  }

  .hero-metrics,
  .intro-layout,
  .flow,
  .contact {
    grid-template-columns: 1fr;
  }

  .flow-sticky {
    position: static;
  }

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

  .arch-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 620px) {
  :root {
    --header-h: 64px;
  }

  .site-header {
    padding: 0 16px;
  }

  .brand span:last-child {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero {
    min-height: 720px;
  }

  .hero-media {
    background-position: 69% center;
  }

  .hero-scrim {
    background:
      linear-gradient(
        90deg,
        rgba(3, 8, 12, 0.96) 0%,
        rgba(3, 8, 12, 0.7) 58%,
        rgba(3, 8, 12, 0.36) 100%
      ),
      linear-gradient(180deg, rgba(3, 8, 12, 0.16), rgba(3, 8, 12, 0.78));
  }

  .hero-content {
    width: calc(100% - 32px);
    margin-left: 16px;
    padding-top: calc(var(--header-h) + 62px);
  }

  .hero h1 {
    font-size: clamp(48px, 17vw, 72px);
  }

  .hero-copy {
    font-size: 16px;
  }

  .hero-actions,
  .hero-actions .btn {
    width: 100%;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    margin-top: 34px;
  }

  .section {
    width: calc(100% - 32px);
    padding: 72px 0;
  }

  .section-copy h2,
  .flow-sticky h2,
  .section-heading h2,
  .contact-copy h2 {
    font-size: 34px;
  }

  .flow-step {
    padding-left: 54px;
  }

  .flow-step::before {
    font-size: 24px;
  }

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

  .architecture {
    padding-left: 16px;
    padding-right: 16px;
  }

  .arch-row {
    padding: 22px 18px;
  }

  .arch-row span {
    font-size: 21px;
  }

  .contact {
    width: calc(100% - 32px);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
