:root {
  --hexu-red: #f6043d;
  --red-deep: #9f1027;
  --ink: #202126;
  --graphite: #43464d;
  --muted: #757a83;
  --line: #dfe4ea;
  --paper: #f7f8fa;
  --panel: #ffffff;
  --steel: #4d6c7b;
  --leaf: #4f8b6b;
  --amber: #b2844e;
  --soft-red: #fff0f3;
  --shadow: 0 16px 50px rgba(24, 28, 36, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0, #f5f7fa 460px, #eef1f5 100%),
    var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  line-height: 1.55;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  min-height: 44px;
  padding: 0 16px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

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

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

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(246, 4, 61, 0.24);
  outline-offset: 2px;
  border-color: var(--hexu-red);
}

.app-shell {
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(32, 33, 38, 0.04);
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(223, 228, 234, 0.88);
  backdrop-filter: blur(16px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-lockup img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.brand-lockup span,
.brand-lockup strong,
.brand-lockup small {
  display: block;
  min-width: 0;
}

.brand-lockup strong {
  font-size: 16px;
  font-weight: 950;
}

.brand-lockup small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.wechat-pill {
  flex: 0 0 auto;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

main {
  padding-bottom: 84px;
}

section {
  scroll-margin-top: 78px;
}

.hero {
  padding: 16px 16px 22px;
}

.hero-media {
  overflow: hidden;
  min-height: 210px;
  background: #e7e1d6;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.hero-copy {
  padding: 22px 2px 8px;
}

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

h1,
h2 {
  margin: 0;
  font-weight: 950;
  line-height: 1.12;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 25px;
}

p {
  margin: 0;
}

.hero-copy p:last-child,
.section-heading > p:last-child,
.contact-card p {
  margin-top: 12px;
  color: var(--graphite);
  font-size: 15px;
}

.plan-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.plan-strip article {
  min-width: 0;
  padding: 15px 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-strip .featured {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(246, 4, 61, 0.95), rgba(159, 16, 39, 0.96)),
    url("assets/brand/hexu-pattern-red.png") center / 360px auto;
  border-color: transparent;
}

.plan-strip span,
.plan-strip small,
.plan-card span,
.plan-card small,
.case-rail span,
.wechat-number span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.plan-strip .featured span,
.plan-strip .featured small {
  color: rgba(255, 255, 255, 0.78);
}

.plan-strip strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
  line-height: 1;
}

.hero-actions,
.summary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.primary-button,
.secondary-button,
.plan-card a,
.summary-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 950;
  text-align: center;
}

.primary-button,
.plan-card a {
  color: #fff;
  background: var(--hexu-red);
  border: 1px solid var(--hexu-red);
}

.secondary-button,
.summary-actions a {
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
}

.tool-panel,
.definition-panel,
.plans,
.cases,
.process-panel,
.brief-form-section,
.contact-panel {
  padding: 22px 16px;
}

.section-heading {
  margin-bottom: 14px;
}

.service-grid {
  display: grid;
  gap: 10px;
}

.service-grid article {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.service-grid b {
  font-size: 15px;
  font-weight: 950;
}

.service-grid p,
.definition-card small,
.boundary-note p {
  color: var(--muted);
  font-size: 13px;
}

.definition-card,
.boundary-note,
.summary-card,
.contact-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(24, 28, 36, 0.06);
}

.definition-card p {
  color: var(--graphite);
  font-size: 15px;
}

.compare-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  background: #f4f6f8;
  border-radius: 8px;
}

.compare-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.compare-row strong {
  font-size: 15px;
}

.compare-row.positive {
  color: #fff;
  background: var(--steel);
}

.compare-row.positive span {
  color: rgba(255, 255, 255, 0.76);
}

.definition-card small {
  display: block;
  margin-top: 12px;
}

.plan-cards {
  display: grid;
  gap: 12px;
}

.plan-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.plan-card.preferred {
  border-color: rgba(246, 4, 61, 0.28);
  box-shadow: 0 12px 36px rgba(246, 4, 61, 0.1);
}

.plan-card strong {
  display: block;
  margin: 5px 0;
  color: var(--hexu-red);
  font-size: 36px;
  line-height: 1;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  margin: 15px 0;
  padding: 0;
  list-style: none;
}

.plan-card li {
  position: relative;
  padding-left: 18px;
  color: var(--graphite);
  font-size: 14px;
}

.plan-card li::before {
  position: absolute;
  top: 9px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--leaf);
  border-radius: 50%;
  content: "";
}

.boundary-note {
  margin-top: 12px;
  background: #fffaf3;
  border-color: #ead8bd;
}

.boundary-note strong {
  display: block;
  margin-bottom: 6px;
  color: #7b5522;
}

.case-viewer {
  display: grid;
  gap: 12px;
}

.case-stage {
  position: relative;
  display: grid;
  min-height: 320px;
  max-height: 430px;
  margin: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7fa;
  box-shadow: 0 10px 30px rgba(24, 28, 36, 0.06);
}

.case-stage img {
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: contain;
}

.case-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 42px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  place-items: center;
  color: #fff;
  background: rgba(32, 33, 38, 0.82);
  border: 0;
  border-radius: 8px;
  font-size: 28px;
  font-weight: 950;
  transform: translateY(-50%);
}

.case-arrow.prev {
  left: 10px;
}

.case-arrow.next {
  right: 10px;
}

.case-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.case-meta span {
  font-weight: 850;
}

.case-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.case-thumbs::-webkit-scrollbar {
  display: none;
}

.case-thumbs button {
  flex: 0 0 68px;
  width: 68px;
  height: 54px;
  min-height: 54px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 8px;
}

.case-thumbs button.active {
  border-color: var(--hexu-red);
}

.case-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.process-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.process-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  counter-increment: step;
}

.process-list li::before {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 950;
  content: counter(step, decimal-leading-zero);
}

.process-list span {
  font-weight: 850;
}

.brief-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--graphite);
  font-size: 13px;
  font-weight: 850;
}

.brief-form .primary-button {
  width: 100%;
  margin-top: 2px;
}

.summary-card {
  margin-top: 12px;
  scroll-margin-top: 92px;
}

.summary-head {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
}

.summary-head strong {
  font-size: 16px;
}

.summary-head small {
  color: var(--muted);
}

#summaryText {
  min-height: 210px;
  color: var(--graphite);
  background: #f8fafc;
}

.summary-actions button {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
  font-weight: 950;
}

.contact-card {
  display: grid;
  gap: 16px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(32, 33, 38, 0.96), rgba(61, 72, 81, 0.94)),
    url("assets/brand/hexu-pattern-gray.png") center / 420px auto;
  border-color: transparent;
}

.contact-card .eyebrow {
  color: #ff6b87;
}

.contact-card h2 {
  color: #fff;
}

.contact-card p {
  color: rgba(255, 255, 255, 0.76);
}

.wechat-number,
.phone-number {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.phone-number {
  margin-top: 10px;
}

.wechat-number span,
.phone-number span {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.68);
}

.wechat-number strong,
.phone-number strong {
  min-width: 0;
  font-size: 15px;
  word-break: break-all;
}

.wechat-number button,
.phone-number a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  color: #fff;
  background: var(--hexu-red);
  border-color: var(--hexu-red);
  border-radius: 8px;
  font-weight: 950;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 18px;
  min-height: 210px;
  color: var(--ink);
  background: #fff;
  border-radius: 8px;
  text-align: center;
}

.qr-placeholder img {
  width: min(100%, 230px);
  max-height: 230px;
  object-fit: contain;
  border-radius: 6px;
}

.qr-placeholder span {
  font-weight: 950;
}

.qr-placeholder small {
  max-width: 230px;
  color: var(--muted);
  font-size: 12px;
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 520px;
  margin: 0 auto;
  padding: 7px 8px max(7px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.tabbar a {
  display: grid;
  min-height: 44px;
  place-items: center;
  color: var(--muted);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 950;
}

.tabbar a.active {
  color: var(--hexu-red);
  background: var(--soft-red);
}

@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    overflow: hidden;
    border-radius: 18px;
  }

  .tabbar {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0 0 18px 18px;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 30px;
  }

  .plan-strip,
  .hero-actions,
  .summary-actions {
    grid-template-columns: 1fr;
  }

  .service-grid article {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
