@import url("./tokens.css");

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--color-paper);
  color: var(--color-ink-2);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: var(--display-weight);
  letter-spacing: var(--tracking-tight);
  overflow-wrap: anywhere;
  min-width: 0;
}

p {
  margin: 0 0 var(--space-md);
}

a {
  color: var(--color-accent);
  text-underline-offset: 2px;
}

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

.wrap {
  width: min(100% - 2.5rem, var(--page-max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--space-md);
  top: -4rem;
  z-index: 20;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-pill);
  background: var(--color-ink);
  color: var(--color-accent-ink);
  text-decoration: none;
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-md);
}

/* ── buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.85rem 1.5rem;
  border: var(--rule-hair) solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-ink);
  box-shadow: var(--shadow-card);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-card);
}

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

.btn-ghost:hover {
  background: var(--color-paper-2);
  border-color: var(--color-ink-2);
}

.btn-ghost:active {
  transform: translateY(1px);
}

.btn-ghost-inverse {
  background: oklch(100% 0 0 / 0.14);
  border-color: oklch(100% 0 0 / 0.55);
  color: oklch(100% 0 0);
  backdrop-filter: blur(2px);
}

.btn-ghost-inverse:hover {
  background: oklch(100% 0 0 / 0.24);
}

/* ── header ───────────────────────────────────────────────── */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  padding-block: var(--space-lg);
  border-bottom: none;
  background: none;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15em;
  color: oklch(100% 0 0);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
  text-decoration: none;
  white-space: nowrap;
}

.brand span {
  color: var(--color-accent-2);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
}

.site-nav a {
  color: oklch(100% 0 0 / 0.88);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: oklch(100% 0 0);
  text-decoration: underline;
}

.nav-cta {
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-pill);
  background: oklch(100% 0 0);
  color: var(--color-ink) !important;
}

.nav-cta:hover {
  background: var(--color-accent);
  color: var(--color-accent-ink) !important;
  text-decoration: none !important;
}

/* ── hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(34rem, 78vh, 48rem);
  padding-block: clamp(7rem, 12vw, 10rem) var(--space-xl);
  background: var(--color-ink);
  color: oklch(100% 0 0);
  overflow: clip;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 34%;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      oklch(16% 0.02 40 / 0.70) 0%,
      oklch(16% 0.02 40 / 0.58) 40%,
      oklch(16% 0.02 40 / 0.88) 100%
    ),
    radial-gradient(
      120% 80% at 50% 46%,
      oklch(16% 0.02 40 / 0.46) 0%,
      oklch(16% 0.02 40 / 0) 70%
    );
}

.hero-inner {
  display: grid;
  justify-items: center;
  gap: 0;
  text-align: center;
}

.hero-copy {
  max-width: 44rem;
  display: grid;
  justify-items: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  color: oklch(100% 0 0);
  text-wrap: balance;
}

.hero-lede {
  margin-top: var(--space-lg);
  font-size: var(--text-lg);
  color: oklch(100% 0 0 / 0.86);
  max-width: 34rem;
}

.hero-copy .badges {
  justify-content: center;
  margin-top: var(--space-xl);
}

.hero-note {
  margin-top: var(--space-md);
  color: oklch(100% 0 0 / 0.72);
  font-size: var(--text-xs);
}

.hero-strip {
  width: 100%;
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0;
  padding-top: var(--space-lg);
  border-top: var(--rule-hair) solid oklch(100% 0 0 / 0.28);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm) var(--space-xl);
  list-style: none;
  text-align: left;
}

.hero-strip li {
  position: relative;
  padding-left: 1.35rem;
  color: oklch(100% 0 0 / 0.86);
  font-size: var(--text-sm);
  line-height: 1.45;
}

.hero-strip li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-2);
}

.hero-strip strong {
  color: oklch(100% 0 0);
  font-family: var(--font-display);
  font-weight: 600;
}

/* ── quick search ─────────────────────────────────────────── */
.search-band {
  padding-block: 0 var(--space-3xl);
}

/* ── app download ─────────────────────────────────────────── */
/* ── how it works ─────────────────────────────────────────── */
.how {
  padding-block: var(--space-3xl);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.how h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: var(--lh-snug);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xl);
  margin: var(--space-xl) 0 0;
  padding: 0;
  list-style: none;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-accent-ink);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
}

.steps h3 {
  margin-top: var(--space-md);
  font-size: var(--text-lg);
  font-weight: 600;
}

.steps p {
  margin: var(--space-xs) 0 0;
  color: var(--color-neutral);
  font-size: var(--text-sm);
  max-width: 30rem;
}

.download {
  padding-block: var(--space-3xl);
}

.app-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  border: var(--rule-card) solid var(--color-rule);
  border-radius: var(--radius-card);
  background: var(--color-field);
  box-shadow: var(--shadow-card);
}

.app-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.app-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-card);
}

.app-meta-text {
  display: grid;
  gap: 0.15rem;
}

.app-meta-text strong {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
}

.app-meta-text span {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.app-band-body p {
  margin-top: var(--space-md);
  color: var(--color-neutral);
  max-width: 34rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.badge {
  display: block;
  border-radius: 8px;
  transition: transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out);
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.badge:active {
  transform: translateY(1px);
}

.badge img,
.badge svg {
  display: block;
  height: 3.25rem;
  width: auto;
}

.badge-google img {
  height: 4.4rem;
  margin-block: -0.58rem;
}

.badge-web {
  display: grid;
  align-content: center;
  gap: 0.1rem;
  height: 3.25rem;
  padding-inline: 1rem;
  border: var(--rule-hair) solid oklch(100% 0 0 / 0.5);
  border-radius: 9px;
  background: oklch(100% 0 0 / 0.12);
  color: oklch(100% 0 0);
  text-decoration: none;
  backdrop-filter: blur(2px);
}

.badge-web:hover {
  background: oklch(100% 0 0 / 0.22);
  border-color: oklch(100% 0 0 / 0.8);
  text-decoration: none;
}

.badge-web-small {
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
  white-space: nowrap;
}

.badge-web-name {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* 浅色区块里的版本（合作方推广段、页脚） */
.badge-web--dark {
  border-color: var(--color-rule-2);
  background: var(--color-paper);
  color: var(--color-ink);
}

.badge-web--dark .badge-web-small {
  color: var(--color-muted);
}

.badge-web--dark:hover {
  background: var(--color-paper-2);
  border-color: var(--color-ink-2);
}

.app-shot {
  margin: 0;
  justify-self: center;
  border-radius: var(--radius-card);
  overflow: clip;
  box-shadow: var(--shadow-card);
}

.app-shot img {
  width: clamp(13rem, 26vw, 18rem);
  height: auto;
}

.app-note {
  margin: var(--space-md) 0 0;
  color: var(--color-muted);
  font-size: var(--text-xs);
}

/* ── screens ──────────────────────────────────────────────── */
.screens {
  padding-block: var(--space-3xl);
}

.screens h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: var(--lh-snug);
}

.screens-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.screen-card {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: clip;
  background: var(--color-paper-2);
  box-shadow: var(--shadow-card);
}

.screen-card img {
  width: 100%;
  height: auto;
}

.feature-list {
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
  max-width: 34rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent);
}

.feature-list strong {
  color: var(--color-ink);
  font-weight: 600;
}

/* ── community ────────────────────────────────────────────── */
.partner {
  padding-block: var(--space-3xl);
  background: var(--color-paper-2);
  border-top: var(--rule-hair) solid var(--color-rule);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.partner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.55fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.partner h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: var(--lh-snug);
}

.partner p {
  margin-top: var(--space-md);
  max-width: 44rem;
  color: var(--color-neutral);
}

.partner-action {
  display: grid;
  gap: var(--space-sm);
  justify-items: start;
}

.partner-note {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.community {
  padding-block: var(--space-3xl);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.community-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.community-figure {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: clip;
  box-shadow: var(--shadow-card);
}

.community-figure img {
  width: 100%;
  height: clamp(17rem, 34vw, 26rem);
  object-fit: cover;
  object-position: 50% 35%;
}

.community-body h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: var(--lh-snug);
}

.community-body p {
  margin-top: var(--space-md);
  color: var(--color-neutral);
}

.community-list {
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.community-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
}

.community-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--color-accent-2);
}

/* ── article ──────────────────────────────────────────────── */
.article {
  padding-block: var(--space-3xl);
  background: var(--color-paper-2);
  border-top: var(--rule-hair) solid var(--color-rule);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.article-inner {
  max-width: 48rem;
  margin-inline: auto;
}

.article h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-2xl);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
}

.article h3 {
  margin-top: var(--space-2xl);
  font-size: var(--text-lg);
  font-weight: 600;
}

.prose {
  margin-top: var(--space-lg);
  max-width: var(--measure);
  color: var(--color-neutral);
}

.prose p + h3 {
  margin-top: var(--space-xl);
}

.prose strong {
  color: var(--color-ink);
  font-weight: 600;
}

/* ── closing call to action ───────────────────────────────── */
.closing {
  padding-block: var(--space-3xl);
}

.closing-inner {
  display: grid;
  gap: var(--space-lg);
  justify-items: start;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-card);
  border: var(--rule-card) solid var(--color-rule);
  background: var(--color-paper-3);
  color: var(--color-neutral);
}

.closing h2 {
  color: var(--color-ink);
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: var(--lh-snug);
}

.closing p {
  margin: 0;
  max-width: 40rem;
  color: var(--color-neutral);
}

/* ── footer ───────────────────────────────────────────────── */
.legal-header {
  padding-block: var(--space-lg);
  background: var(--color-paper);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.brand--dark {
  color: var(--color-ink);
}

.brand--dark span {
  color: var(--color-accent);
}

.legal-header .site-nav a {
  color: var(--color-ink-2);
}

.legal-header .site-nav a:hover {
  color: var(--color-accent);
}

.legal {
  padding-block: var(--space-3xl);
}

.legal-inner {
  max-width: 46rem;
  margin-inline: auto;
}

.legal h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--text-3xl);
  line-height: var(--lh-snug);
}

.legal-updated {
  margin-top: var(--space-sm);
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.legal h2 {
  margin-top: var(--space-2xl);
  font-size: var(--text-lg);
  font-weight: 600;
}

.legal p,
.legal li {
  color: var(--color-neutral);
}

.legal p {
  margin-top: var(--space-md);
}

.legal ul {
  margin: var(--space-md) 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: var(--space-xs);
}

.legal a {
  color: var(--color-accent);
}

.legal-foot {
  padding-block: var(--space-xl) var(--space-2xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.site-footer {
  padding-block: var(--space-xl) var(--space-2xl);
  border-top: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper);
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.footer-inner {
  display: grid;
  gap: var(--space-sm);
  justify-items: start;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.footer-links a {
  color: var(--color-ink-2);
  white-space: nowrap;
}

.photo-credit {
  color: var(--color-muted);
}

.footer-partner {
  margin: 0;
  color: var(--color-muted);
}

.footer-partner a {
  color: var(--color-accent);
  font-weight: 500;
}

/* ── reveal on scroll ─────────────────────────────────────── */
.js .reveal {
  opacity: 0;
  transform: translateY(10px);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
}

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1080px) {
  .screens-grid {
    gap: var(--space-md);
  }
}

@media (max-width: 900px) {
  /* 手机上不再把导航压在照片上：标题会跟导航打架 */
  .site-header {
    position: static;
    background: var(--color-paper);
    border-bottom: var(--rule-hair) solid var(--color-rule);
  }

  .brand {
    color: var(--color-ink);
  }

  .brand span {
    color: var(--color-accent);
  }

  .site-nav a {
    color: var(--color-ink-2);
  }

  .site-nav a:hover {
    color: var(--color-accent);
  }

  .nav-cta {
    background: var(--color-ink);
    color: var(--color-accent-ink) !important;
  }

  .nav-cta:hover {
    background: var(--color-accent);
    color: var(--color-accent-ink) !important;
  }

  .hero {
    padding-block: var(--space-3xl) var(--space-xl);
    min-height: 0;
  }

  .hero-inner,
  .community-inner,
  .partner-inner,
  .app-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-strip,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-band {
    justify-items: start;
  }

  .app-shot {
    order: -1;
    justify-self: start;
  }

  .app-shot img {
    width: clamp(11rem, 42vw, 15rem);
  }

  .community-figure img {
    height: clamp(13rem, 44vw, 18rem);
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 1.75rem, var(--page-max));
  }

  .badge img,
  .badge svg {
    height: 2.9rem;
  }

  .badge-google img {
    height: 3.9rem;
    margin-block: -0.5rem;
  }

  .badge-web {
    height: 2.9rem;
    padding-inline: 0.85rem;
  }

  .badge-web-name {
    font-size: 0.8rem;
  }

  .site-header {
    padding-block: var(--space-md);
  }

  .header-inner {
    gap: var(--space-sm) var(--space-md);
  }

  .site-nav {
    gap: var(--space-sm) var(--space-md);
  }

  .hero {
    padding-block: var(--space-xl) var(--space-lg);
  }

  .closing-inner {
    padding: var(--space-xl) var(--space-lg);
  }
}

@media (max-width: 414px) {
  .site-nav a {
    font-size: var(--text-xs);
  }

  .app-band {
    padding: var(--space-lg);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .btn-primary:hover,
  .btn-primary:active,
  .btn-ghost:active {
    transform: none;
    transition: background-color var(--dur-fast) linear,
      color var(--dur-fast) linear;
  }
}
