/* ==========================================================================
   App landing — 主题变量与基础
   ========================================================================== */

:root {
  --color-bg: #f5f8fc;
  --color-bg-elevated: #ffffff;
  --color-surface: #eef4fb;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-accent: #2563eb;
  --color-accent-soft: rgba(37, 99, 235, 0.12);
  --color-accent-2: #1d4ed8;
  --color-border: rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.1);
  --shadow-card: 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: min(1120px, calc(100% - 40px));
  --header-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --reveal-duration: 0.65s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

/* ==========================================================================
   顶栏
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  line-height: 0;
  height: 100%;
  width: 100px;
  padding-top: 15px;
}

.logo img {
  margin-left: -20px;
  display: block;
  /* height: 38px;
  width: auto;
  max-width: min(200px, 46vw); */
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out);
}

.logo:hover img,
.logo:focus-visible img {
  opacity: 0.88;
}

.logo:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.site-nav {
  display: flex;
}

.nav-list {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-text);
  background: rgba(37, 99, 235, 0.06);
}

.nav-link.is-active {
  color: var(--color-accent-2);
  background: var(--color-accent-soft);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(4) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    max-height: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--color-border);
    transition: max-height 0.35s var(--ease-out);
  }

  .site-nav.is-open {
    max-height: 320px;
  }

  .nav-list {
    flex-direction: column;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0.15rem;
  }

  .nav-link {
    padding: 0.65rem 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-toggle-bar {
    transition: none;
  }

  .site-nav {
    transition: none;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(2rem, 5vw, 3rem);
}

.hero-bg {
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 120%;
  background: radial-gradient(ellipse at 28% 18%, rgba(37, 99, 235, 0.18), transparent 52%),
    radial-gradient(ellipse at 72% 55%, rgba(147, 197, 253, 0.45), transparent 48%),
    linear-gradient(165deg, #ffffff 0%, #f0f7ff 42%, #e8f1fc 100%);
  animation: hero-gradient-shift 18s ease-in-out infinite alternate;
}

@keyframes hero-gradient-shift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate3d(2%, -2%, 0) scale(1.03);
    opacity: 0.95;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg {
    animation: none;
  }
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  background: rgba(37, 99, 235, 0.1);
  border-radius: 999px;
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.75rem;
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out),
    background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.38);
}

.btn-ghost {
  color: var(--color-accent-2);
  border-color: rgba(37, 99, 235, 0.35);
  background: #ffffff;
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--color-accent);
  background: rgba(37, 99, 235, 0.06);
}

.btn-secondary {
  color: var(--color-accent-2);
  border-color: rgba(37, 99, 235, 0.25);
  background: #ffffff;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(37, 99, 235, 0.06);
}

.btn-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
}

/* ==========================================================================
   iPhone 风格设备外框（深色边框 + 屏幕区 + 灵动岛示意）
   ========================================================================== */

.device-phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 9 / 18.75;
  padding: 11px 11px 13px;
  border-radius: clamp(26px, 7vw, 40px);
  background: linear-gradient(165deg, #48484a 0%, #2c2c2e 22%, #1c1c1e 55%, #0d0d0f 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.14),
    inset 0 -2px 4px rgba(0, 0, 0, 0.45),
    0 22px 55px rgba(15, 23, 42, 0.26),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

.device-phone::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(34%, 108px);
  height: 27px;
  border-radius: 999px;
  background: linear-gradient(180deg, #0a0a0a 0%, #161616 100%);
  z-index: 3;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.device-phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border-radius: clamp(18px, 5vw, 30px);
  overflow: hidden;
  background: #0a0a0a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.device-phone__screen::after {
  content: "";
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  max-width: 112px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  z-index: 2;
  pointer-events: none;
}

.device-phone--compact {
  padding: 7px 7px 9px;
  border-radius: 20px;
  aspect-ratio: 9 / 18.4;
}

.device-phone--compact::before {
  top: 8px;
  height: 17px;
  width: 38%;
}

.device-phone--compact .device-phone__screen {
  border-radius: 13px;
}

.device-phone--compact .device-phone__screen::after {
  bottom: 5px;
  height: 3px;
  width: 28%;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .device-phone,
  .device-phone::before,
  .device-phone__screen::after {
    transition: none;
  }
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.hero-phone.device-phone {
  width: min(280px, 100%);
}

.hero-phone-img {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 0;
  }

  .hero-lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }
}

/* ==========================================================================
   Section 标题与滚动入场
   ========================================================================== */

.section-head {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

.section-desc {
  margin: 0;
  color: var(--color-muted);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity var(--reveal-duration) var(--ease-out),
    transform var(--reveal-duration) var(--ease-out);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

/* ==========================================================================
   Features 交替图文
   ========================================================================== */

.features {
  background: linear-gradient(180deg, var(--color-bg) 0%, #eef4fb 50%, var(--color-bg) 100%);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row--reverse .feature-media {
  order: 2;
}

.feature-row--reverse .feature-body {
  order: 1;
}

/* 功能区截图容器与首屏主预览一致：.hero-phone.device-phone + .hero-phone-img */
.features .hero-phone.device-phone {
  margin-inline: auto;
  transition: transform 0.35s var(--ease-out), filter 0.35s var(--ease-out);
}

.features .hero-phone.device-phone:hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 24px 40px rgba(15, 23, 42, 0.22)) brightness(1.02);
}

@media (prefers-reduced-motion: reduce) {
  .features .hero-phone.device-phone {
    transition: none;
  }

  .features .hero-phone.device-phone:hover {
    transform: none;
    filter: none;
  }
}

.shot-placeholder {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 45%, #60a5fa 100%);
}

.shot-placeholder--b {
  background: linear-gradient(225deg, #f0f9ff 0%, #7dd3fc 40%, #0284c7 100%);
}

.shot-placeholder--c {
  background: linear-gradient(90deg, #f0f9ff 0%, #bae6fd 50%, #38bdf8 100%);
}

.shot-placeholder--d {
  background: linear-gradient(145deg, #ecfdf5 0%, #6ee7b7 42%, #059669 100%);
}

.feature-title {
  margin: 0 0 0.75rem;
  font-size: 1.45rem;
}

.feature-text {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

.feature-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--color-muted);
}

.feature-list li {
  margin-bottom: 0.45rem;
}

@media (max-width: 768px) {
  .feature-row,
  .feature-row--reverse {
    grid-template-columns: 1fr;
  }

  .feature-row--reverse .feature-media,
  .feature-row--reverse .feature-body {
    order: unset;
  }
}

/* ==========================================================================
   Gallery 横向滚动
   ========================================================================== */

.gallery-section code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-accent-2);
}

.gallery-scroll {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-color: rgba(37, 99, 235, 0.35) transparent;
}

.gallery-scroll::-webkit-scrollbar {
  height: 8px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, 0.25);
  border-radius: 999px;
}

.gallery-card {
  flex: 0 0 min(200px, 48vw);
  scroll-snap-align: start;
  text-align: left;
  padding: 0.65rem 0.65rem 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-elevated);
  cursor: pointer;
  overflow: visible;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
    border-color 0.25s;
}

.gallery-card:hover,
.gallery-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
  border-color: rgba(37, 99, 235, 0.35);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card {
    transition: none;
  }

  .gallery-card:hover,
  .gallery-card:focus-visible {
    transform: none;
  }
}

.gallery-phone {
  display: flex;
  width: 100%;
}

.gallery-thumb {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  background-size: cover;
  background-position: top center;
}

.gallery-thumb--1 {
  background: linear-gradient(135deg, #bfdbfe, #60a5fa);
}

.gallery-thumb--2 {
  background: linear-gradient(135deg, #e0f2fe, #38bdf8);
}

.gallery-thumb--3 {
  background: linear-gradient(135deg, #dbeafe, #38bdf8);
}

.gallery-thumb--4 {
  background: linear-gradient(135deg, #f0f9ff, #7dd3fc);
}

.gallery-caption {
  display: block;
  padding: 0.75rem 0.85rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.gallery-hint {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
}

/* ==========================================================================
   CTA
   ========================================================================== */

.cta-section {
  background: radial-gradient(ellipse at 50% 0%, rgba(37, 99, 235, 0.12), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
  border-block: 1px solid var(--color-border);
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-text {
  margin: 0;
  color: var(--color-muted);
  max-width: 42ch;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-actions {
    width: 100%;
  }

  .cta-actions .btn {
    flex: 1 1 auto;
    min-width: 140px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-accent);
}

/* ==========================================================================
   Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(6px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(960px, 100%);
  max-height: min(86vh, 100%);
  margin: auto;
}

.lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-img {
  width: auto;
  max-width: min(420px, 92vw);
  max-height: min(86vh, 900px);
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.lightbox-fallback {
  width: min(420px, 92vw);
  margin-inline: auto;
}

.lightbox-fallback-inner {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.lightbox-fallback-inner[data-variant="1"] {
  background: linear-gradient(135deg, #bfdbfe, #60a5fa);
}

.lightbox-fallback-inner[data-variant="2"] {
  background: linear-gradient(135deg, #e0f2fe, #38bdf8);
}

.lightbox-fallback-inner[data-variant="3"] {
  background: linear-gradient(135deg, #dbeafe, #38bdf8);
}

.lightbox-fallback-inner[data-variant="4"] {
  background: linear-gradient(135deg, #f0f9ff, #7dd3fc);
}

@media (max-width: 640px) {
  .lightbox-close {
    top: auto;
    bottom: calc(100% + 0.5rem);
    right: 0;
  }
}
