/* ============================================================
   TextDrop — trial design spec (docs/网站.md §10)
   Palette derived from app icon: ink #22343F, brand blue #1A6FDE,
   mint #E9FBF8 on cool paper #FAFBFC. IBM Plex Sans/Mono, self-hosted.
   ============================================================ */

:root {
  /* tokens */
  --bg: #FAFBFC;
  --surface: #FFFFFF;
  --border: #E6EAF0;
  --ink: #22343F;
  --ink-2: #5C6B78;
  --brand: #1A6FDE;
  --brand-hover: #155BB8;
  --mint: #E9FBF8;
  --radius-card: 12px;
  --radius-control: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --maxw: 1080px;
  --font-sans: "IBM Plex Sans", system-ui, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/fonts/ibmplexsans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibmplexmono-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibmplexmono-500-latin.woff2") format("woff2");
}

/* base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container--narrow { max-width: 760px; }

.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.section { padding-block: 96px; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
.section--cta { text-align: center; }
.section__title { margin: 0 0 16px; font-size: 34px; line-height: 1.2; letter-spacing: -0.01em; }
.section__lede { margin: 0 auto 48px; max-width: 640px; color: var(--ink-2); font-size: 18px; }
.section--cta .section__lede { margin-bottom: 32px; }

/* header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header__inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand__logo { border-radius: 6px; }
.brand__name { font-size: 16px; }
.site-nav { display: flex; gap: 20px; margin-inline-start: auto; }
.site-nav a { color: var(--ink-2); font-size: 14.5px; font-weight: 500; }
.site-nav a:hover { color: var(--ink); text-decoration: none; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-hover); text-decoration: none; }
.btn--sm { padding: 9px 14px; font-size: 14px; }

.btn--download {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
  padding: 14px 20px;
  flex: 1;
  min-width: 0;
}
.btn--download:hover { border-color: var(--brand); text-decoration: none; }
.btn--download .btn__icon { width: 26px; height: 26px; flex-shrink: 0; color: var(--brand); }
.btn__label { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1.25; }
.btn__label strong { font-size: 15px; }

/* hero */
.hero { padding-block: 72px 96px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero__title { margin: 0 0 20px; font-size: 52px; line-height: 1.12; letter-spacing: -0.02em; }
.hero__sub { margin: 0 0 32px; font-size: 18px; color: var(--ink-2); max-width: 540px; }

.download__buttons { display: flex; gap: 12px; }

/* waitlist form */
.waitlist { margin-top: 20px; background: var(--mint); border: 1px solid #D2F0EA; border-radius: var(--radius-card); padding: 20px; max-width: 560px; }
.waitlist--center { margin-inline: auto; text-align: left; background: var(--surface); border-color: var(--border); }
.waitlist__label { display: block; font-weight: 600; margin-bottom: 10px; }
.waitlist__row { display: flex; gap: 8px; }
.waitlist__input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  background: var(--surface);
  color: var(--ink);
}
.waitlist__input:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.waitlist__note { margin: 10px 0 0; font-size: 13px; color: var(--ink-2); }
.waitlist__status { margin: 10px 0 0; font-size: 14px; font-weight: 500; }
.waitlist__status--ok { color: #0E7C6B; }
.waitlist__status--err { color: #B42318; }

/* hero demo stage */
.hero__demo { display: flex; justify-content: center; }
.demo-stage { display: flex; align-items: center; gap: 14px; }
.phone {
  width: 150px; height: 300px; flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.phone__screen {
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.phone__title { font-size: 11px; color: var(--ink-2); margin-bottom: 10px; }
.phone__text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  min-height: 0;
  white-space: pre-wrap;
  word-break: break-word;
  transition: opacity 0.35s ease;
}
.phone__text .caret { display: inline-block; width: 5px; height: 13px; background: var(--brand); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.phone__button {
  margin-top: 10px;
  background: var(--brand);
  color: #fff;
  border-radius: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 0;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.phone__button.is-pressed { transform: scale(0.96); background: var(--brand-hover); }
.phone__button.is-sent { background: #0E7C6B; }
.demo-arrow { width: 44px; color: var(--brand); flex-shrink: 0; transition: opacity 0.2s ease; }
.demo-arrow.is-flash { animation: arrowflash 0.6s ease; }
@keyframes arrowflash { 50% { opacity: 0.25; } }
.winwin {
  width: 240px; flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.winwin__bar {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 10px; font-style: normal; color: var(--ink-2);
}
.winwin__bar span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.winwin__bar em { margin-inline-start: 6px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.winwin__body {
  padding: 12px;
  min-height: 96px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  transition: opacity 0.35s ease;
}
.winwin__caret { display: inline-block; width: 5px; height: 12px; background: var(--brand); animation: blink 1s steps(1) infinite; }
.demo-stage .is-fading .phone__text, .demo-stage .is-fading .winwin__body { opacity: 0; }

/* demo placeholder */
.demo-placeholder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}
.demo-placeholder__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.demo-shot { margin: 0; }
.demo-shot__frame { border: 1px dashed #C9D3DF; border-radius: var(--radius-card); padding: 20px; background: var(--bg); }
.demo-shot figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.demo-placeholder__note { margin: 24px 0 0; font-size: 13px; color: var(--ink-2); text-align: center; }

.mockscreen { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; }
.mockscreen__bar { padding: 8px 12px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 12px; }
.mockscreen__row { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); align-items: center; }
.mockscreen__label { color: var(--ink-2); width: 70px; flex-shrink: 0; font-size: 12px; }
.mockscreen__value--ok { color: #0E7C6B; }
.mockscreen__mono { font-family: var(--font-mono); font-size: 11.5px; }
.mockscreen__qr { width: 52px; height: 52px; display: inline-block; background: repeating-conic-gradient(var(--ink) 0 25%, transparent 0 50%) 50% / 12px 12px; opacity: 0.35; border-radius: 4px; }
.mockscreen__actions { display: flex; gap: 8px; padding: 10px 12px; }
.mockscreen__chip { border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-size: 12px; color: var(--ink-2); background: var(--surface); }
.mockscreen__chip--primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.mockscreen__text { padding: 12px; font-family: var(--font-mono); font-size: 12px; line-height: 1.6; min-height: 110px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow); }
.step__num { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--brand); }
.step__title { margin: 10px 0 8px; font-size: 19px; }
.step__body { margin: 0; color: var(--ink-2); font-size: 15px; }

/* cards (benefits) */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow); }
.card__title { margin: 0 0 8px; font-size: 18px; }
.card__body { margin: 0; color: var(--ink-2); font-size: 15px; }

/* use cases */
.usecases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.usecase { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow); }
.usecase__title { margin: 0 0 8px; font-size: 18px; }
.usecase__body { margin: 0; color: var(--ink-2); font-size: 15px; }

/* trust */
.trustlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.trust { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 24px; }
.trust__dot { width: 10px; height: 10px; border-radius: 50%; background: #2BC0A8; margin-top: 7px; flex-shrink: 0; }
.trust strong { font-size: 16px; }
.trust p { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* pricing */
.pricecard { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 40px; box-shadow: var(--shadow); max-width: 860px; margin-inline: auto; }
.pricecard__price { display: block; font-size: 44px; font-weight: 700; letter-spacing: -0.02em; }
.pricecard__price small { font-size: 14px; font-weight: 500; color: var(--brand); margin-left: 8px; }
.pricecard__regular { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); }
.pricecard__note { margin: 16px 0 0; font-size: 14.5px; color: var(--ink-2); }
.pricecard__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.pricecard__list li { position: relative; padding-left: 26px; font-size: 15px; }
.pricecard__list li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 12px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* faq */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 0 24px; }
.faq__item summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 16px; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; float: right; color: var(--brand); font-size: 20px; font-weight: 500; }
.faq__item[open] summary::after { content: "–"; }
.faq__item p { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; }

/* page (privacy/support) */
.page { max-width: 760px; margin-inline: auto; padding: 72px 24px 120px; }
.page__head h1 { margin: 0 0 8px; font-size: 40px; letter-spacing: -0.02em; }
.page__body h2 { margin: 40px 0 12px; font-size: 22px; }
.page__body p { color: var(--ink-2); }
.page__body a { text-decoration: underline; }
.page__body ul { color: var(--ink-2); }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0 48px; background: var(--surface); }
.site-footer__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.site-footer__nav { display: flex; gap: 18px; margin-inline-start: auto; }
.site-footer__nav a { color: var(--ink-2); font-size: 14px; }
.site-footer__copy { flex-basis: 100%; margin: 16px 0 0; font-size: 13px; color: var(--ink-2); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(8px); transition: opacity 0.3s ease, transform 0.3s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .phone__text .caret, .winwin__caret { animation: none; }
}

/* responsive */
@media (max-width: 960px) {
  .hero { padding-block: 48px 72px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__title { font-size: 40px; }
  .section { padding-block: 64px; }
  .demo-placeholder__grid, .cards, .usecases, .trustlist { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .pricecard { grid-template-columns: 1fr; padding: 28px; }
  .site-nav { display: none; }
  .demo-stage { flex-direction: column-reverse; gap: 10px; }
  .demo-arrow { transform: rotate(270deg); }
}
@media (max-width: 560px) {
  .hero__title { font-size: 34px; }
  .download__buttons { gap: 8px; }
  .btn--download { padding: 10px 12px; }
  .btn--download .btn__icon { width: 20px; height: 20px; }
  .btn__label strong { font-size: 13.5px; }
  .waitlist__row { flex-direction: column; }
}
