/* Apple-like marketing page: light gray canvas, SF system stack, #0071e3 CTA */

:root {
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --separator: rgba(0, 0, 0, 0.08);
  --separator-strong: #d2d2d7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-active: #006edb;
  --focus-ring: rgba(0, 113, 227, 0.35);
  --radius-card: 18px;
  --radius-control: 12px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47059;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background: var(--canvas);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, #fbfbfd 0%, var(--canvas) 32%, var(--canvas) 100%);
}

/* Global nav — slim bar, like apple.com header strip */
.globalnav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(251, 251, 253, 0.72);
  border-bottom: 1px solid var(--separator);
}

.globalnav__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.globalnav__title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--text);
}

.globalnav__meta {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text-tertiary);
}

.main {
  max-width: 692px;
  margin: 0 auto;
  padding: 56px 22px 80px;
}

.hero {
  margin-bottom: 48px;
}

.hero__headline {
  margin: 0 0 12px;
  font-size: clamp(40px, 7vw, 56px);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.07143;
  color: var(--text);
}

.hero__subhead {
  margin: 0;
  max-width: 52ch;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.011em;
  line-height: 1.381;
  color: var(--text-secondary);
}

/* Product-style module card */
.module {
  background: var(--surface);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 12px 48px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 32px 28px 28px;
}

.module__block + .gen-btn {
  margin-top: 20px;
}

.module__block--output {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--separator);
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 8px;
}

.form-textarea {
  display: block;
  width: 100%;
  min-height: 144px;
  resize: vertical;
  margin: 0;
  padding: 16px 18px;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--separator-strong);
  border-radius: var(--radius-control);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.form-textarea::placeholder {
  color: var(--text-tertiary);
}

.form-textarea:hover {
  border-color: #b0b0b5;
}

.form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.form-hint {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.33337;
  letter-spacing: -0.01em;
  color: var(--text-tertiary);
}

/* 白色主按钮 + 左侧绿色箭头（按下右滑后消失，请求结束复位） */
.gen-btn {
  --arrow-slide: 200px;
  --apple-green: #34c759;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 28px;
  margin: 0;
  border: 1px solid #d2d2d7;
  border-radius: 980px;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.17647;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.15s var(--ease),
    opacity 0.2s ease;
}

.gen-btn:focus {
  outline: none;
}

.gen-btn:focus-visible {
  box-shadow: 0 0 0 4px var(--focus-ring), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.gen-btn:hover:not(:disabled) {
  border-color: #b0b0b5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gen-btn:active:not(:disabled):not(.is-arrow-go) {
  transform: scale(0.985);
}

.gen-btn:disabled {
  cursor: default;
  opacity: 0.55;
}

.gen-btn__arrow {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
  transform: translateY(-50%);
  filter: drop-shadow(0 0.5px 1px rgba(52, 199, 89, 0.35));
}

.gen-btn__arrow-svg {
  display: block;
}

.gen-btn__arrow-disc {
  fill: var(--apple-green);
}

.gen-btn__arrow-stem,
.gen-btn__arrow-head {
  vector-effect: non-scaling-stroke;
}

.gen-btn.is-arrow-go .gen-btn__arrow {
  animation: genArrowSlideFade 0.52s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

@keyframes genArrowSlideFade {
  0% {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  100% {
    transform: translateY(-50%) translateX(var(--arrow-slide));
    opacity: 0;
  }
}

.gen-btn__label {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.gen-btn.is-loading .gen-btn__label {
  opacity: 0.92;
}

.output-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.output-head__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}

.output__pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 5px 11px;
  border-radius: 980px;
  background: var(--canvas);
  color: var(--text-secondary);
  border: 1px solid var(--separator);
}

.output__pill--done {
  background: rgba(52, 199, 89, 0.12);
  color: #1a7f37;
  border-color: rgba(52, 199, 89, 0.35);
}

.output__pill.is-busy {
  background: rgba(0, 113, 227, 0.08);
  color: var(--blue);
  border-color: rgba(0, 113, 227, 0.25);
}

.output__pill.is-error {
  background: rgba(255, 59, 48, 0.08);
  color: #c41a12;
  border-color: rgba(255, 59, 48, 0.25);
}

.output__body {
  margin: 0;
  font-size: 17px;
  line-height: 1.58824;
  letter-spacing: -0.022em;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.output__body.is-typing {
  animation: fadeIn 0.35s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.footnote {
  max-width: 692px;
  margin: 0 auto;
  padding: 0 22px 40px;
  text-align: center;
}

.footnote p {
  margin: 0;
  font-size: 12px;
  line-height: 1.33337;
  color: var(--text-tertiary);
}

.footnote code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-secondary);
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: revealUp 0.8s var(--ease) forwards;
}

.reveal--1 {
  animation-delay: 0.06s;
}
.reveal--2 {
  animation-delay: 0.12s;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 734px) {
  .main {
    padding-top: 40px;
    padding-bottom: 64px;
  }

  .hero__subhead {
    font-size: 19px;
    line-height: 1.42105;
  }

  .module {
    padding: 24px 20px 22px;
  }

  .globalnav__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 18px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .output__body.is-typing {
    animation: none;
  }
}
