:root {
  --paper: #f4f3ed;
  --white: #fffef9;
  --ink: #16201e;
  --muted: #68726e;
  --line: #cbd1cc;
  --mint: #2ec4a6;
  --mint-dark: #167763;
  --coral: #f06d5d;
  --yellow: #f4c84b;
  --blue: #3e72d9;
  --radius: 6px;
  --max: 1180px;
  --motion-quick: 160ms;
  --motion-standard: 320ms;
  --motion-slow: 720ms;
  --ease-enter: cubic-bezier(.05, .7, .1, 1);
  --ease-ui: cubic-bezier(.2, 0, 0, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
a { color: inherit; }
button, input { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  background: rgba(255, 254, 249, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 850; text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: var(--ink);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--mint);
}
nav { display: flex; gap: 28px; }
nav a { color: #3f4945; font-size: 14px; font-weight: 700; text-decoration: none; }
nav a:hover { color: var(--mint-dark); }
.brand, nav a, .status { transition: color var(--motion-quick) var(--ease-ui), transform var(--motion-quick) var(--ease-ui); }
.brand:hover { transform: translateY(-1px); }
.status { justify-self: end; font-size: 13px; color: var(--muted); }
.status i { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--mint); }

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 64px));
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #233734;
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-shade { position: absolute; inset: 0; background: rgba(11, 26, 24, 0.44); }
.hero-scan {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 13%;
  width: 2px;
  background: rgba(132, 240, 215, .6);
  box-shadow: 8px 0 0 rgba(132, 240, 215, .12);
  opacity: 0;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 64px;
  color: var(--white);
}
.eyebrow { margin: 0 0 12px; color: #c6f6e8; font: 800 12px/1.2 ui-monospace, monospace; text-transform: uppercase; }
.eyebrow.dark { color: var(--mint-dark); }
h1, h2, h3, p { letter-spacing: 0; }
h1 { max-width: 720px; margin: 0; font-size: clamp(52px, 8vw, 112px); line-height: 0.94; }
.hero-copy { max-width: 600px; margin: 26px 0 0; font-size: clamp(17px, 2vw, 22px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button {
  min-height: 44px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--motion-quick) var(--ease-ui),
    background-color var(--motion-quick) var(--ease-ui),
    border-color var(--motion-quick) var(--ease-ui),
    box-shadow var(--motion-standard) var(--ease-ui);
}
.button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(22, 32, 30, .14); }
.button:not(:disabled):active, .button.is-pressed { transform: translateY(1px) scale(.97); box-shadow: 0 2px 0 rgba(22, 32, 30, .1); }
.button.primary { background: var(--mint); color: #102521; }
.button.primary:hover { background: #5ad8bf; }
.button.secondary { color: var(--white); border-color: rgba(255,255,255,.7); background: rgba(17, 31, 29, .5); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 0; margin: 56px 0 0; }
.hero-meta div { min-width: 170px; padding: 0 28px 0 0; margin-right: 28px; border-right: 1px solid rgba(255,255,255,.34); }
.hero-meta div:last-child { border-right: 0; }
.hero-meta dt { color: #c8d2ce; font-size: 12px; }
.hero-meta dd { margin: 2px 0 0; font-weight: 800; }

.tool-section, .guide-section, .feedback-section { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 104px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 36px; }
.section-heading h2, .license-intro h2, .payment-section h2, .feedback-section h2 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; }
.section-heading > p { max-width: 440px; margin: 0; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: 1.45fr .775fr .775fr; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.tool-card { min-width: 0; display: grid; grid-template-columns: 80px 1fr; background: var(--white); border-right: 1px solid var(--ink); }
.tool-card { transition: transform var(--motion-standard) var(--ease-enter), box-shadow var(--motion-standard) var(--ease-ui); }
.tool-card:hover { position: relative; z-index: 2; transform: translateY(-5px); box-shadow: 0 14px 0 rgba(22, 32, 30, .1); }
.tool-card:last-child { border-right: 0; }
.tool-index { padding: 20px 10px; color: var(--ink); background: var(--mint); font: 850 13px/1 ui-monospace, monospace; writing-mode: vertical-rl; }
.tool-index { transition: padding-top var(--motion-standard) var(--ease-enter); }
.tool-card:hover .tool-index { padding-top: 28px; }
.tool-index.coral { background: var(--coral); }
.tool-index.yellow { background: var(--yellow); }
.tool-body { padding: 30px; }
.tool-title-row { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.tool-card h3 { margin: 10px 0 8px; font-size: 28px; line-height: 1.2; }
.tool-card p { color: var(--muted); }
.tag { display: inline-block; padding: 3px 8px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 800; }
.tag.ready { color: var(--mint-dark); }
.tag.testing { color: #a83a2f; }
.tag.planning { color: #8b6910; }
.platform { padding: 5px 8px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font: 800 12px ui-monospace, monospace; }
.feature-list { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 22px 0 28px; list-style: none; font-size: 13px; font-weight: 700; }
.feature-list li::before { content: "◆"; margin-right: 7px; color: var(--mint-dark); font-size: 9px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.dark-button { background: var(--ink) !important; color: var(--white) !important; }
.dark-button:hover { background: #34433f !important; }
.text-link { color: var(--ink); font-weight: 800; text-underline-offset: 4px; }
.button.disabled { margin-top: 14px; background: #e8e8e2; color: #8a918e; cursor: not-allowed; }

.license-section {
  padding: 84px max(24px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 72px;
  align-items: center;
  background: var(--white);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.license-intro p:last-child { color: var(--muted); max-width: 480px; }
.license-form { padding: 30px 0; border-top: 3px solid var(--mint); border-bottom: 1px solid var(--line); }
.license-form { position: relative; overflow: hidden; }
.license-form::after {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 34%;
  height: 3px;
  background: var(--yellow);
  opacity: 0;
}
.license-form.is-loading::after { opacity: 1; animation: license-scan 900ms var(--ease-ui) infinite; }
.license-form label { display: block; margin-bottom: 10px; font-weight: 800; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input-row input { min-width: 0; min-height: 48px; padding: 10px 14px; border: 1px solid #97a19d; border-radius: var(--radius); background: #fff; color: var(--ink); font-family: ui-monospace, monospace; text-transform: uppercase; }
.input-row input:focus { outline: 3px solid rgba(46,196,166,.24); border-color: var(--mint-dark); }
.form-result { min-height: 26px; margin: 14px 0 0; font-weight: 750; }
.form-result.success { color: var(--mint-dark); }
.form-result.error { color: #b33e31; }
.form-result.result-enter { animation: result-enter 360ms var(--ease-enter) both; }
.license-form.result-error { animation: form-shake 340ms ease-in-out; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0; list-style: none; border-top: 1px solid var(--ink); }
.steps li { min-height: 190px; padding: 26px 22px; border-right: 1px solid var(--line); }
.steps li:last-child { border-right: 0; }
.steps span { color: var(--coral); font: 850 13px ui-monospace, monospace; }
.steps h3 { margin: 24px 0 4px; font-size: 20px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; }
.notice { margin-top: 34px; padding: 22px 24px; display: grid; grid-template-columns: 140px 1fr; gap: 20px; background: #fff8dd; border-left: 5px solid var(--yellow); }
.notice p { margin: 0; color: #655c42; }

.payment-section {
  padding: 82px max(24px, calc((100vw - var(--max)) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 44px;
  color: var(--white);
  background: var(--blue);
}
.payment-section p:last-child { max-width: 620px; color: #e0e8ff; }
.light-disabled { flex: 0 0 auto; color: #5670a8; background: #dce5f8; cursor: not-allowed; }
.feedback-section { text-align: center; }
.feedback-section > p:not(.eyebrow) { max-width: 680px; margin: 18px auto 28px; color: var(--muted); }
footer { padding: 28px max(24px, calc((100vw - var(--max)) / 2)); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); background: var(--white); border-top: 1px solid var(--line); font-size: 13px; }
footer a { color: inherit; text-underline-offset: 3px; }

.motion-ready .hero-content > * { opacity: 0; transform: translateY(22px); }
.motion-ready .hero-art { transform: scale(1.025); }
.motion-ready .hero.is-entered .hero-art { transform: scale(1); transition: transform 1100ms var(--ease-enter); }
.motion-ready .hero.is-entered .hero-content > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms var(--ease-enter), transform 520ms var(--ease-enter);
}
.motion-ready .hero.is-entered .hero-content > :nth-child(2) { transition-delay: 70ms; }
.motion-ready .hero.is-entered .hero-content > :nth-child(3) { transition-delay: 120ms; }
.motion-ready .hero.is-entered .hero-content > :nth-child(4) { transition-delay: 170ms; }
.motion-ready .hero.is-entered .hero-content > :nth-child(5) { transition-delay: 220ms; }
.motion-ready .hero.is-entered .hero-scan { animation: hero-scan 900ms 280ms var(--ease-enter) both; }

.motion-ready .reveal-target { opacity: 0; transform: translateY(26px); }
.motion-ready .reveal-target.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 480ms var(--ease-enter), transform 480ms var(--ease-enter);
  transition-delay: var(--reveal-delay, 0ms);
}

@keyframes hero-scan {
  0% { opacity: 0; transform: translateX(-80px); }
  20% { opacity: .75; }
  100% { opacity: 0; transform: translateX(520px); }
}
@keyframes license-scan {
  from { transform: translateX(0); }
  to { transform: translateX(400%); }
}
@keyframes result-enter {
  0% { opacity: 0; transform: translateY(8px) scale(.98); }
  65% { transform: translateY(-1px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes form-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  nav { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { border-right: 0; border-bottom: 1px solid var(--ink); }
  .tool-card:last-child { border-bottom: 0; }
  .license-section { grid-template-columns: 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(2) { border-right: 0; }
  .steps li { border-bottom: 1px solid var(--line); }
  .steps li:nth-child(n+3) { border-bottom: 0; }
}

@media (max-width: 600px) {
  .site-header { min-height: 56px; padding: 0 16px; }
  .status { display: none; }
  .hero { min-height: 680px; }
  .hero-art { object-position: 62% center; }
  .hero-shade { background: rgba(11, 26, 24, 0.58); }
  .hero-content { width: calc(100% - 32px); padding: 60px 0 44px; }
  h1 { font-size: 54px; }
  .hero-meta { gap: 20px; margin-top: 42px; }
  .hero-meta div { min-width: 130px; padding: 0; margin: 0; border: 0; }
  .tool-section, .guide-section, .feedback-section { width: calc(100% - 32px); padding: 72px 0; }
  .section-heading { align-items: start; flex-direction: column; gap: 14px; }
  .tool-card { grid-template-columns: 52px 1fr; }
  .tool-body { padding: 24px 20px; }
  .license-section { padding: 64px 16px; }
  .input-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li:nth-child(2), .steps li:nth-child(n+3) { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .steps li:last-child { border-bottom: 0; }
  .notice { grid-template-columns: 1fr; gap: 6px; }
  .payment-section { align-items: start; flex-direction: column; padding: 64px 16px; }
  footer { flex-direction: column; padding: 24px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .motion-ready .hero-content > *,
  .motion-ready .reveal-target,
  .motion-ready .hero-art {
    opacity: 1;
    transform: none;
  }
  .hero-scan { display: none; }
}
