/* AI 工作手机 · aiworkphone.com — page styles (tokens in tokens.css) */

/* ── Fonts (self-hosted, latin subsets; CJK via system stack) ── */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--color-accent); color: var(--color-paper); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--space-3xs);
}

.shell {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-sm);
  z-index: var(--z-modal);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-pill);
}
.skip-link:focus-visible { left: var(--page-gutter); }

/* ── Nav · N1b canonical SaaS bar, frost-on-scroll ── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-sticky);
  background: transparent;
  border-bottom: var(--rule-hair) solid transparent;
  transition: background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out);
}
.nav.is-scrolled {
  background: color-mix(in oklch, var(--color-paper) 78%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--color-rule);
}
.nav__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-md);
}
.nav__brand { justify-self: start; display: flex; align-items: baseline; gap: var(--space-sm); }
.nav__brand b { font-family: var(--font-display); font-weight: 700; font-size: var(--text-md); letter-spacing: -0.01em; }
.nav__brand span { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-xs); color: var(--color-muted); letter-spacing: 0.02em; }
.nav__center { justify-self: center; display: flex; gap: var(--space-2xs); }
.nav__link {
  white-space: nowrap;
  padding: var(--space-sm) var(--space-md);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-muted);
  border-radius: var(--radius-pill);
  transition: color var(--dur-micro) var(--ease-out);
}
.nav__link:hover { color: var(--color-ink); }
.nav__link.is-active { color: var(--color-accent); }
.nav__right { justify-self: end; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  white-space: nowrap;
  min-height: 44px;
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: transform 100ms var(--ease-out),
              background-color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              box-shadow var(--dur-short) var(--ease-out);
}
.btn--fill {
  background: var(--color-ink);
  color: var(--color-paper);
  border: var(--rule-hair) solid var(--color-ink);
}
.btn--fill:hover {
  transform: translateY(-1.5px);
  box-shadow: var(--shadow-whisper);
}
.btn--fill:active { transform: translateY(1px); box-shadow: none; }
.btn--outline {
  background: transparent;
  color: var(--color-ink);
  border: var(--rule-hair) solid var(--color-rule-2);
}
.btn--outline:hover {
  transform: translateY(-1.5px);
  border-color: var(--color-ink);
}
.btn--outline:active { transform: translateY(1px); }
.btn--sm { padding: var(--space-2xs) var(--space-lg); min-height: 44px; }

/* ── Hero · two-column, title left / lede right (genre canonical) ── */
.hero {
  padding-top: clamp(calc(var(--space-2xl) * 1.5), 16vh, calc(var(--space-2xl) * 2.25));
  padding-bottom: calc(var(--space-3xl) * 2);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-2xl);
  align-items: end;
}
.hero h1 { font-size: var(--text-display); max-width: 16ch; }
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
  letter-spacing: 0.04em;
}
.hero__kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 2px;
  flex: none;
}
.hero__sub {
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.7;
  max-width: 46ch;
  margin-top: var(--space-md);
}
.hero__sub b { color: var(--color-ink); font-weight: 500; }
.hero__ctas {
  margin-top: var(--space-xl);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ── Signature · 留存刻度尺 (retention ruler) ── */
.ruler {
  margin-block: var(--space-3xl) 0;
  position: relative;
  height: 72px;
}
.ruler__line {
  position: absolute;
  inset-inline: 0;
  top: 50%;
  height: var(--rule-hair);
  background: var(--color-rule-2);
}
.ruler__ticks {
  position: absolute;
  inset-inline: 0;
  top: calc(50% - 5px);
  height: 10px;
  background: repeating-linear-gradient(
    to right,
    var(--color-rule) 0 1px,
    transparent 1px 10%
  );
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.ruler__evt {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-ink);
}
.ruler__evt--alert { background: var(--color-accent); }
.ruler__lbl {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--text-xs);
  color: var(--color-muted);
  white-space: nowrap;
}
.ruler__lbl--up { transform: translate(-50%, calc(-50% - var(--space-lg))); }
.ruler__lbl--dn { transform: translate(-50%, calc(-50% + var(--space-lg))); }
.ruler__lbl--up::after,
.ruler__lbl--dn::after {
  content: "";
  position: absolute;
  left: 50%;
  width: var(--rule-hair);
  height: 12px;
  background: var(--color-rule);
}
.ruler__lbl--up::after { top: 100%; }
.ruler__lbl--dn::after { bottom: 100%; }
.ruler__lbl--alert { color: var(--color-accent); }

/* ── Section shell ── */
.section { padding-block: var(--space-3xl); }
.section__head { max-width: 60ch; margin-bottom: var(--space-2xl); }
.section__head h2 { font-size: var(--text-display-s); }
.section__head p {
  margin-top: var(--space-sm);
  color: var(--color-muted);
  max-width: 52ch;
}

/* ── Bento · F1, tiles=8, irregular spans, hairline borders ── */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(10.5rem, auto);
  gap: var(--space-md);
}
.cell {
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-tile);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: var(--color-paper);
  transition: border-color var(--dur-short) var(--ease-out);
}
.cell:hover { border-color: var(--color-rule-2); }
.cell h3 { font-size: var(--text-lg); }
.cell p { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.7; }
.span-2x2 { grid-column: span 2; grid-row: span 2; }
.span-2x1 { grid-column: span 2; }
.cell--dark {
  background: var(--color-ink-2);
  border-color: var(--color-ink-2);
  color: var(--color-on-ink);
}
.cell--dark:hover { border-color: var(--color-rule-dark); }
.cell--dark h3 { color: var(--color-on-ink); font-size: var(--text-xl); }
.cell--dark p { color: var(--color-on-ink-mut); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-xs); margin-top: var(--space-2xs); }
.chips span {
  font-size: var(--text-xs);
  color: var(--color-on-ink);
  border: var(--rule-hair) solid var(--color-rule-dark);
  border-radius: var(--radius-pill);
  padding: var(--space-3xs) var(--space-sm);
  white-space: nowrap;
}
.cell--dark .footnote {
  margin-top: auto;
  font-size: var(--text-xs);
  color: var(--color-on-ink-mut);
  border-top: var(--rule-hair) solid var(--color-rule-dark);
  padding-top: var(--space-sm);
}
.cell--stat { align-items: flex-start; justify-content: center; }
.cell--stat .num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
}
.cell--stat .cap { font-size: var(--text-sm); color: var(--color-muted); }
.cell--wide h3 { font-size: var(--text-lg); }
.cell--wide .duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-2xs);
}
.cell--wide .duo div { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.7; }
.cell--wide .duo b { display: block; color: var(--color-ink); font-weight: 500; font-size: var(--text-sm); margin-bottom: var(--space-3xs); }

/* ── Stat strip · T4 (full-bleed band, content centered) ── */
.stats-band {
  border-block: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-2xl);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-lg);
}
.stats .stat { display: flex; flex-direction: column; gap: var(--space-3xs); }
.stats .num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.75rem, 3vw, 2.4414rem);
  letter-spacing: -0.02em;
}
.stats .num sup { font-size: 0.55em; letter-spacing: 0; }
.stats .cap { font-size: var(--text-sm); color: var(--color-muted); }
.stats-note {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ── Spec sheet · F3 (12 functions) ── */
.spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-3xl);
}
.spec-row {
  display: grid;
  grid-template-columns: 3ch 9rem minmax(0, 1fr);
  gap: var(--space-md);
  align-items: baseline;
  padding-block: var(--space-md);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  font-variant-numeric: tabular-nums;
}
.spec-row:first-child, .spec-row:nth-child(2) { border-top: var(--rule-hair) solid var(--color-rule); }
.spec-row .no { font-family: var(--font-mono); font-weight: 500; font-size: var(--text-xs); color: var(--color-neutral); }
.spec-row dt { font-weight: 500; font-size: var(--text-sm); white-space: nowrap; }
.spec-row dd { margin: 0; font-size: var(--text-sm); color: var(--color-muted); line-height: 1.6; }

/* ── Industries ── */
.industries { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
.industries span {
  border: var(--rule-hair) solid var(--color-rule-2);
  border-radius: var(--radius-pill);
  padding: var(--space-2xs) var(--space-lg);
  font-size: var(--text-sm);
  white-space: nowrap;
}

/* ── FAQ · conversational accordion ── */
.faq details { border-bottom: var(--rule-hair) solid var(--color-rule); }
.faq details:first-child { border-top: var(--rule-hair) solid var(--color-rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  min-height: 64px;
  padding-block: var(--space-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-size: var(--text-md); font-weight: 500; letter-spacing: 0; }
.faq summary .tw {
  flex: none;
  width: 11px;
  height: 11px;
  position: relative;
}
.faq summary .tw::before,
.faq summary .tw::after {
  content: "";
  position: absolute;
  background: var(--color-ink);
  inset-inline: 0;
  top: 50%;
  height: 1.5px;
  transform: translateY(-50%);
  transition: transform var(--dur-short) var(--ease-in-out);
}
.faq summary .tw::after { transform: translateY(-50%) rotate(90deg); }
.faq details[open] summary .tw::after { transform: translateY(-50%) rotate(0deg); }
.faq .a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-long) var(--ease-in-out);
}
.faq details[open] .a-wrap { grid-template-rows: 1fr; }
.faq .a-inner { overflow: hidden; }
.faq .a-inner p {
  padding-bottom: var(--space-lg);
  color: var(--color-muted);
  max-width: 62ch;
  font-size: var(--text-sm);
  line-height: 1.75;
}

/* ── Closing statement band ── */
.closing {
  background: var(--color-paper-2);
  border-block: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-3xl);
}
.closing__kicker {
  font-size: var(--text-sm);
  color: var(--color-muted);
  letter-spacing: 0.04em;
}
.closing__line {
  margin-top: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 24ch;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* ── Footer · Ft2 inline single line ── */
.foot {
  padding-block: var(--space-xl);
}
.foot__inner {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  align-items: baseline;
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.foot__inner .sep { color: var(--color-rule-2); }
.foot a.icp { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--color-rule-2); }
.foot a.icp:hover { text-decoration-color: var(--color-accent); color: var(--color-ink); }

/* ── Motion · one-shot reveals (tiles + stats) ── */
.reveal {
  opacity: 0;
  transform: translateY(8px);
}
.reveal.is-in {
  animation: reveal var(--dur-long) var(--ease-out) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── Responsive ── */
@media (max-width: 60rem) {
  .nav__center { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2x2 { grid-column: span 2; grid-row: span 1; }
  .span-2x1 { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-xl); }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec-row:nth-child(2) { border-top: none; }
  .ruler { height: 56px; }
  .ruler__evt--r2, .ruler__lbl--r2 { display: none; }
}
@media (max-width: 40rem) {
  .hero {
    padding-top: calc(var(--space-2xl) * 1.25);
    padding-bottom: calc(var(--space-3xl) * 1.25);
  }
  .hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .span-2x2, .span-2x1 { grid-column: span 1; }
  .cell--wide .duo { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .ruler__evt--r3, .ruler__lbl--r3 { display: none; }
  .ruler__lbl--dn { transform: translate(-50%, calc(-50% + var(--space-md))); }
  .spec-row { grid-template-columns: 3ch minmax(0, 1fr); }
  .spec-row dd { grid-column: 2; }
}
