:root {
  --ink: #1a2332;
  --ink-soft: #2c3a4f;
  --seal: #c41e3a;
  --seal-deep: #9e1830;
  --mist: #e8eef4;
  --mist-deep: #d5e0ea;
  --paper: #f4f7fa;
  --line: rgba(26, 35, 50, 0.12);
  --muted: #5a6b7d;
  --white: #fbfdfe;
  --check-a: #e8edf2;
  --check-b: #f7f9fb;
  --radius: 6px;
  --font-brand: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1040px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 55% at 90% -5%, rgba(196, 30, 58, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 30%, rgba(26, 35, 50, 0.07), transparent 50%),
    linear-gradient(165deg, var(--paper) 0%, var(--mist) 55%, var(--mist-deep) 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
}

a {
  color: var(--seal-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(244, 247, 250, 0.82);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 2px solid var(--seal);
  box-shadow: inset 0 0 0 3px transparent;
  background:
    radial-gradient(circle at center, var(--seal) 0 22%, transparent 23%),
    transparent;
}

.brand__name {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--seal-deep);
}

.site-nav a[aria-current="page"] {
  font-weight: 700;
}

/* —— Buttons —— */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.65rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s ease, border-color 0.2s ease,
    box-shadow 0.25s var(--ease);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--seal);
  color: var(--white);
  box-shadow: 0 8px 24px rgba(196, 30, 58, 0.22);
}

.btn--primary:hover:not(:disabled) {
  background: var(--seal-deep);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn--ghost:hover:not(:disabled) {
  border-color: rgba(26, 35, 50, 0.28);
  background: rgba(255, 255, 255, 0.45);
}

.btn--sm {
  min-height: 2.15rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.86rem;
}

/* —— Home hero —— */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 8% 10% auto auto;
  width: min(48vw, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(196, 30, 58, 0.22);
  background:
    radial-gradient(circle at 50% 50%, rgba(196, 30, 58, 0.18) 0 12%, transparent 13%),
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(196, 30, 58, 0.06) 39% 62%, transparent 63%);
  animation: seal-spin 28s linear infinite;
  pointer-events: none;
}

@keyframes seal-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__glow {
    animation: none;
  }
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.25rem 3.5rem;
  width: 100%;
}

.hero__brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-brand);
  font-size: clamp(4.2rem, 14vw, 7.5rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--ink);
  animation: rise-in 0.8s var(--ease) both;
}

.hero__headline {
  margin: 0 0 0.55rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 600;
  color: var(--ink-soft);
  animation: rise-in 0.8s var(--ease) 0.08s both;
}

.hero__support {
  margin: 0 0 1.75rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.05rem;
  animation: rise-in 0.8s var(--ease) 0.14s both;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise-in 0.8s var(--ease) 0.2s both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__brand,
  .hero__headline,
  .hero__support,
  .hero__actions {
    animation: none;
  }
}

/* —— Sections —— */
.section {
  padding: 1rem 0 4.5rem;
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-brand);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 600;
  color: var(--ink);
}

.section__lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  max-width: 32rem;
}

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-link {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1rem;
  row-gap: 0.2rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: padding 0.25s var(--ease), background 0.2s ease;
}

.tool-link:last-child,
li:last-child .tool-link {
  border-bottom: 1px solid var(--line);
}

a.tool-link:hover {
  padding-left: 0.35rem;
}

.tool-link__name {
  grid-column: 1;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}

.tool-link__desc {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.95rem;
}

.tool-link__go {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--seal-deep);
  white-space: nowrap;
}

.tool-link--soon {
  opacity: 0.55;
  cursor: default;
}

.tool-link--soon .tool-link__go {
  color: var(--muted);
  font-weight: 500;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.25rem;
}

.site-footer__brand {
  margin: 0 0 0.5rem;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 1.1rem;
}

.site-footer__links {
  margin: 0 0 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.site-footer__links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
}

.site-footer__links a:hover {
  color: var(--seal-deep);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Tool page —— */
.tool-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.25rem 4rem;
}

.tool-intro {
  margin-bottom: 1.75rem;
}

.tool-intro__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--seal-deep);
  letter-spacing: 0.04em;
}

.tool-intro__title {
  margin: 0 0 0.55rem;
  font-family: var(--font-brand);
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

.tool-intro__lead {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.tool-workspace {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 880px) {
  .tool-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    align-items: start;
  }
}

.panel {
  padding: 1.15rem 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255, 255, 255, 0.55);
}

.panel__title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 168px;
  padding: 1.5rem 1rem;
  border: 1.5px dashed rgba(26, 35, 50, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.4);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.25s var(--ease);
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--seal);
  background: rgba(196, 30, 58, 0.04);
}

.dropzone__title {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.dropzone__hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin-top: 1.1rem;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.control[hidden] {
  display: none !important;
}

.control__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.control label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.control__value {
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  color: var(--muted);
}

.control input[type="range"] {
  width: 100%;
  accent-color: var(--seal);
}

.control--check {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
}

.control--check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--seal);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.15rem;
}

.preview-stage {
  position: relative;
  min-height: 280px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--check-b);
  background-image:
    linear-gradient(45deg, var(--check-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--check-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--check-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--check-a) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-stage__empty {
  margin: 0;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

.preview-stage canvas {
  display: block;
  max-width: 100%;
  max-height: min(62vh, 520px);
  width: auto;
  height: auto;
}

.preview-stage canvas[hidden],
.preview-stage img[hidden] {
  display: none !important;
}

.preview-meta {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.note {
  margin: 1.5rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.howto,
.faq {
  margin-top: 2.5rem;
  max-width: 40rem;
}

.demo-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 11rem));
  gap: 1rem;
  margin: 1.35rem 0 0;
  padding: 0;
  max-width: 24rem;
}

.demo-compare__cell {
  margin: 0;
  text-align: center;
}

.demo-compare__cell img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  background: #fff;
}

.demo-compare__cell--after img {
  background-color: var(--check-a);
  background-image:
    linear-gradient(45deg, var(--check-b) 25%, transparent 25%),
    linear-gradient(-45deg, var(--check-b) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--check-b) 75%),
    linear-gradient(-45deg, transparent 75%, var(--check-b) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.demo-compare figcaption {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.howto__title,
.faq__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-brand);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  color: var(--ink);
}

.howto__list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.howto__list li {
  margin-bottom: 0.45rem;
}

.howto__list li:last-child {
  margin-bottom: 0;
}

.faq-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-list__item {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.faq-list__item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-list__q {
  margin: 0 0 0.3rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.faq-list__a {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.format-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.format-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.format-pill:hover {
  border-color: rgba(26, 35, 50, 0.28);
}

.format-pill.is-active {
  border-color: var(--seal);
  color: var(--seal-deep);
  background: rgba(196, 30, 58, 0.06);
}

.size-compare {
  margin: 0.85rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.size-compare strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.size-compare__save {
  color: var(--seal-deep);
  font-weight: 700;
}

.size-compare__save.is-worse {
  color: var(--seal-deep);
  opacity: 0.85;
}

/* —— Lead CTA（定制开发） —— */
.lead-cta {
  margin-top: 3rem;
  padding: 2rem 1.35rem;
  border-top: 1px solid var(--line);
  text-align: center;
  background:
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(196, 30, 58, 0.06), transparent 65%),
    rgba(255, 255, 255, 0.35);
  border-radius: calc(var(--radius) + 2px);
}

.lead-cta__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--seal-deep);
}

.lead-cta__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-brand);
  font-size: clamp(1.45rem, 3.2vw, 1.9rem);
  font-weight: 700;
  color: var(--ink);
}

.lead-cta__lead {
  margin: 0 auto 1.1rem;
  max-width: 30rem;
  color: var(--muted);
}

.lead-cta__action {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.lead-cta__hint {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.wechat-copy {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--seal-deep);
  font: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.25rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.wechat-copy:hover {
  color: var(--seal);
}

.wechat-copy.is-copied {
  color: #0b5f59;
  text-decoration: none;
}

.preview-stage img {
  display: block;
  max-width: 100%;
  max-height: min(62vh, 520px);
  width: auto;
  height: auto;
  transition: opacity 0.15s ease;
}

.preview-stage img.is-updating {
  opacity: 0.55;
}

.preview-stage img[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .hero__content {
    padding-top: 3.25rem;
  }

  .demo-compare {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .tool-link {
    grid-template-columns: 1fr;
  }

  .tool-link__go {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0.25rem;
  }
}
