/* 社影设计系统 */
:root {
  --bg: #ffffff;
  --surface: #f7f7f7;
  --text-primary: #0a0a0a;
  --text-secondary: #525252;
  --text-muted: #737373;
  --border: #e6e6e6;
  --black: #0a0a0a;
  --white: #ffffff;

  --container-max: 1160px;
  --header-offset: 6.5rem;
  --page-gutter: 1.25rem;
  --section-space: clamp(4rem, 8.5vw, 7rem);
  --radius-card: 16px;
  --radius-sm: 10px;
  --radius-pill: 9999px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-offset) + 0.75rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--black);
  outline-offset: 4px;
}

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

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

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

.section {
  padding-block: var(--section-space);
  border-top: 1px solid var(--border);
}

.section-title {
  margin-bottom: clamp(1.5rem, 3.5vw, 2.75rem);
  font-size: clamp(1.875rem, 4.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: var(--page-gutter);
  padding: 0.5rem 1rem;
  transform: translateY(calc(-100% - 1.25rem));
  border-radius: var(--radius-pill);
  background: var(--black);
  color: var(--white);
}

.skip-link:focus {
  transform: translateY(0);
}

.pill-btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border: 1px solid var(--black);
  border-radius: var(--radius-pill);
  background: var(--black);
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  transition: background-color 0.2s ease, box-shadow 0.25s var(--ease-out),
    transform 0.25s var(--ease-out);
}

.pill-btn-lg {
  min-height: 52px;
  padding: 0.875rem 1.625rem;
  font-size: 0.9375rem;
}

@media (hover: hover) {
  .pill-btn:hover {
    transform: translateY(-2px);
    background: #262626;
    box-shadow: 0 6px 16px rgb(0 0 0 / 14%);
  }
}

.pill-btn:active {
  transform: scale(0.98);
}

/* 常驻导航 */
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  transition: background-color 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "brand download" "nav nav";
  column-gap: 0.75rem;
  align-items: center;
  padding-top: 0.5rem;
}

.brand {
  display: inline-flex;
  grid-area: brand;
  min-height: 44px;
  align-items: center;
  justify-self: start;
  gap: 0.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand img,
.download-panel > img {
  height: auto;
  border-radius: var(--radius-sm);
}

.header-download {
  grid-area: download;
  justify-self: end;
}

.site-nav {
  display: flex;
  grid-area: nav;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: clamp(0.75rem, 4vw, 2rem);
  margin-top: 0.375rem;
  border-top: 1px solid var(--border);
}

.nav-link {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link::after {
  position: absolute;
  inset: auto 0 5px;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  background: currentColor;
  content: "";
  transition: transform 0.25s var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

/* 首屏和真机预览 */
.hero-section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section-space);
}

.hero-layout,
.developer-layout {
  display: grid;
  align-items: center;
  gap: clamp(1.75rem, 5.25vw, 4.25rem);
}

.hero-title {
  margin-bottom: 0.625rem;
  font-size: clamp(3.5rem, 9vw, 5.75rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-tagline {
  margin-bottom: clamp(1.25rem, 2.5vw, 1.875rem);
  font-size: clamp(1.75rem, 3.8vw, 2.625rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.hero-tagline span {
  white-space: nowrap;
}

.hero-intro {
  max-width: 28rem;
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.75;
}

.hero-promise {
  margin-top: 0.625rem;
  font-size: 1rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem 0.875rem;
  margin-top: clamp(1.375rem, 3vw, 2rem);
}

.platform-note {
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
}

.hero-showcase {
  position: relative;
  width: 100%;
  max-width: 32rem;
  aspect-ratio: 1 / 1.04;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.device {
  --device-padding: clamp(4px, 0.6vw, 7px);
  --device-radius: clamp(15px, 3vw, 29px);

  position: absolute;
  padding: var(--device-padding);
  border-radius: var(--device-radius);
  background: var(--black);
}

.device img {
  width: 100%;
  height: auto;
  border-radius: calc(var(--device-radius) - var(--device-padding));
}

.device-home {
  top: 6%;
  left: 9%;
  width: 44%;
}

.device-moment {
  top: 16%;
  right: 9%;
  width: 35%;
}

/* 功能卡片 */
.features-grid,
.plans-grid {
  display: grid;
  gap: 1rem;
}

.feature-card,
.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--white);
}

/* 悬停位移使用单独的属性，避开 GSAP 入场使用的 transform。 */
.feature-card,
.plan-card,
.plan-details {
  transition: box-shadow 0.25s var(--ease-out), translate 0.25s var(--ease-out);
}

@media (hover: hover) {
  .feature-card:hover,
  .plan-card:hover,
  .plan-details:hover {
    translate: 0 -3px;
    box-shadow: 0 10px 26px rgb(0 0 0 / 8%);
  }
}

.feature-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.feature-copy {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.feature-copy h3,
.plan-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.feature-copy p,
.plan-card p,
.pro-features,
.plan-summary,
.developer-copy p {
  color: var(--text-secondary);
}

.feature-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 5;
  margin-top: auto;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.feature-preview img,
.developer-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.todo-preview img {
  object-position: center 28%;
}

.moment-preview img {
  object-position: center 20%;
}

.habits-preview img {
  object-position: center 6%;
}

/* 免费版和 Pro */
.plan-card,
.plan-details {
  padding: clamp(1.25rem, 3.2vw, 2rem);
}

.free-card {
  background: var(--surface);
}

.free-card h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.375rem, 2.7vw, 2rem);
}

.pro-audience {
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: normal;
}

.pro-features {
  display: grid;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.pro-features li {
  padding-block: 0.625rem;
  border-top: 1px solid var(--border);
}

.pro-features li:last-child {
  padding-bottom: 0;
}

.pro-features strong,
.developer-copy strong {
  color: var(--text-primary);
}

.plan-details {
  display: grid;
  gap: 0.875rem;
  align-items: center;
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.plan-price {
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.plan-price span {
  display: inline-block;
  white-space: nowrap;
}

.plan-price strong {
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* 开发者段和下载 */
.developer-copy .section-title {
  margin-bottom: 1.25rem;
}

.developer-copy p {
  max-width: 34rem;
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.75;
}

.developer-copy p + p {
  margin-top: 0.875rem;
}

.developer-preview {
  position: relative;
  width: 100%;
  max-width: 28rem;
  aspect-ratio: 1 / 1;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.developer-preview img {
  object-position: center 6%;
}

.download-section {
  padding-top: 0;
  border-top: 0;
}

.download-panel {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  text-align: center;
}

.download-panel > img {
  border-radius: var(--radius-card);
}

.download-copy .section-title {
  margin-bottom: 0.375rem;
  font-size: clamp(1.625rem, 3.8vw, 2.5rem);
}

.download-copy .platform-note {
  color: var(--text-secondary);
}

.site-footer {
  padding-block: 1.5rem 2.25rem;
  border-top: 1px solid var(--border);
}

.footer-inner,
.footer-details {
  display: grid;
  gap: 0.375rem;
}

.footer-details {
  color: var(--text-muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.footer-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
}

.footer-nav a:hover,
.footer-details a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (min-width: 48rem) {
  :root {
    --header-offset: 4.25rem;
    --page-gutter: 2rem;
  }

  .header-inner {
    min-height: var(--header-offset);
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "brand nav download";
    padding-top: 0;
  }

  .site-nav {
    margin-top: 0;
    border-top: 0;
  }

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

  .hero-showcase,
  .developer-preview {
    justify-self: end;
  }

  .features-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .plans-grid {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 1.5rem;
  }

  .plan-details {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .developer-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  }

  .download-panel {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
    gap: 1.5rem;
    text-align: left;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1.5rem;
  }

  .footer-nav {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-details {
    grid-column: 1;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    /* ScrollTrigger 刷新后可能以内联样式恢复平滑滚动。 */
    scroll-behavior: auto !important;
  }

  .site-header,
  .pill-btn,
  .nav-link::after,
  .feature-card,
  .plan-card,
  .plan-details {
    transition: none;
  }

  .pill-btn:hover,
  .pill-btn:active {
    transform: none;
  }

  .feature-card:hover,
  .plan-card:hover,
  .plan-details:hover {
    translate: none;
  }
}
