/**
 * FuQi Landing — visual-first, BRAND_CI_VI_UI_UX.md
 */

:root {
  --brand-red: #C62828;
  --brand-red-bright: #E53935;
  --brand-gold: #FFD54F;
  --brand-gold-deep: #C9A227;
  --bg-default: #0F172A;
  --bg-elevated: #1E293B;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --border: rgba(148, 163, 184, 0.22);
  --border-strong: rgba(229, 57, 53, 0.35);
  --accent: #38BDF8;
  --semantic-ok: #0D9488;
  --space-page-x: clamp(1rem, 4vw, 2rem);
  --space-section: clamp(2.5rem, 6vw, 3.5rem);
  --radius-card: 14px;
  --radius-btn: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Noto Sans TC', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

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

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

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-page-x);
}

.container--narrow { max-width: 640px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem var(--space-page-x);
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.site-header__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(229, 57, 53, 0.2), rgba(15, 23, 42, 0.85) 72%);
  border: 1px solid rgba(255, 213, 79, 0.18);
}

.site-header__logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.site-header__name { font-weight: 700; }

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.88rem;
}

.site-header__nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.site-header__nav a:hover { color: var(--text-primary); }

.site-header__nav-cta {
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-strong);
  color: var(--brand-gold) !important;
  background: rgba(198, 40, 40, 0.12);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  overflow: hidden;
}

.lang-switch__btn {
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
}

.lang-switch__btn.is-active {
  color: var(--brand-gold);
  background: rgba(198, 40, 40, 0.18);
}

/* Typography */
.eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-gold-deep);
}

.eyebrow--center { text-align: center; }

.section-title {
  margin: 0 0 1.75rem;
  text-align: center;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero split */
.hero--split {
  padding: 2.5rem 0 3rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 55% at 20% 0%, rgba(198, 40, 40, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(56, 189, 248, 0.06), transparent 50%),
    var(--bg-default);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 2rem;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-page-x);
}

.hero-title {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.12;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 36ch;
}

.hero-trust {
  margin: 1.25rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.cta-group, .cta-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 0.78rem 1.35rem;
  border-radius: var(--radius-btn);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s, filter 0.15s;
}

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

.btn-brand {
  background: linear-gradient(135deg, var(--brand-red), var(--brand-red-bright));
  color: var(--text-primary);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-default);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn--pulse {
  animation: cta-pulse 3s ease-in-out infinite;
}

@keyframes cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
  50% { box-shadow: 0 0 0 8px rgba(229, 57, 53, 0.12); }
}

/* Phone mockup */
.phone {
  position: relative;
  margin: 0 auto;
}

.phone--hero {
  width: 100%;
  max-width: 280px;
}

.phone--sm { width: 200px; }

.phone__bezel {
  border-radius: 32px;
  padding: 10px;
  background: linear-gradient(145deg, #334155, #0f172a);
  border: 1px solid rgba(255, 213, 79, 0.15);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 40px rgba(198, 40, 40, 0.12);
}

.phone__notch {
  width: 36%;
  height: 22px;
  margin: 0 auto 8px;
  border-radius: 0 0 12px 12px;
  background: #0b1220;
}

.phone__body {
  border-radius: 22px;
  overflow: hidden;
  background: #0b1220;
  min-height: 360px;
  position: relative;
}

.phone--sm .phone__body { min-height: 280px; }

.phone__home-indicator {
  width: 36%;
  height: 4px;
  margin: 8px auto 2px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.35);
}

.hero-phone {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 300px;
  min-width: 260px;
}

.hero-phone__glow {
  position: absolute;
  inset: 10% 5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 40, 40, 0.25), transparent 70%);
  filter: blur(24px);
  animation: glow-float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes glow-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.7; }
  50% { transform: translateY(-12px) scale(1.05); opacity: 1; }
}

.hero-phone .phone {
  animation: phone-float 5s ease-in-out infinite;
}

@keyframes phone-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.hero-phone__slides {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
}

.phone--hero .phone__body {
  width: 100%;
}

.phone__body--shot {
  padding: 0;
  min-height: 360px;
  background: #0b1220;
}

.phone-shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(10px) scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
  overflow: hidden;
}

.phone-shot.is-active {
  opacity: 1;
  transform: none;
}

.phone-shot__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--shot-focus, center center);
  transform: scale(var(--shot-scale, 1.12));
  transform-origin: center center;
  display: block;
  pointer-events: none;
  user-select: none;
}

.phone--sm .phone__body--shot {
  min-height: 280px;
}

.phone--sm .phone-shot {
  position: relative;
  opacity: 1;
  transform: none;
  height: 100%;
  min-height: 280px;
}

.hero-phone__dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-phone__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
}

.hero-phone__dot.is-active {
  background: var(--brand-gold);
  transform: scale(1.2);
}

/* Mock screens */
.mock-screen__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mock-screen__fu {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-gold);
}

.mock-screen__tab {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-gold);
}

.mock-screen__caption {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.mock-screen__total {
  text-align: center;
  margin-bottom: 16px;
}

.mock-screen__total-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.mock-screen__total-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  animation: count-shimmer 4s ease-in-out infinite;
}

@keyframes count-shimmer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.mock-screen__change {
  font-size: 0.7rem;
  color: var(--semantic-ok);
}

.mock-bar {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.68rem;
}

.mock-bar__track {
  height: 6px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.mock-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-gold-deep));
  animation: bar-grow 2.5s ease-out forwards;
  transform-origin: left;
  width: 0;
}

.mock-bar:nth-child(1) .mock-bar__fill { animation-delay: 0.2s; width: 65%; }
.mock-bar:nth-child(2) .mock-bar__fill { animation-delay: 0.5s; width: 42%; }

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.mock-screen__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

.mock-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  background: rgba(198, 40, 40, 0.2);
  border: 1px solid var(--border-strong);
  color: var(--brand-gold);
}

.mock-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mock-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.72rem;
}

.mock-list__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.mock-list__main { flex: 1; min-width: 0; }

.mock-list__label { display: block; font-weight: 600; }

.mock-list__sub {
  display: block;
  font-size: 0.6rem;
  color: var(--text-secondary);
}

.mock-list__value {
  font-weight: 600;
  color: var(--brand-gold);
}

/* Concepts */
.concepts {
  padding: var(--space-section) 0;
  background: rgba(11, 18, 32, 0.5);
}

.concepts__title {
  text-align: center;
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.concepts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.concept-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.45);
  transition: transform 0.2s, border-color 0.2s;
}

.concept-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.concept-card__emoji {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.concept-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.concept-card__line {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Showcase */
.showcase {
  padding: var(--space-section) 0;
}

.showcase__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.showcase-card {
  text-align: center;
}

.showcase-card__tab {
  margin: 1rem 0 0.25rem;
  font-size: 1rem;
  font-weight: 600;
}

.showcase-card__caption {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Why pills */
.why-band {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--border);
}

.why-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.why-pill {
  padding: 1rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.why-pill__title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-gold);
}

.why-pill__body {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* How visual */
.how-visual {
  padding: var(--space-section) 0;
  background: rgba(11, 18, 32, 0.45);
}

.how-visual__track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: 820px;
  margin: 0 auto;
}

.how-visual__step {
  flex: 1 1 140px;
  max-width: 200px;
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.4);
  position: relative;
}

.how-visual__emoji {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.35rem;
}

.how-visual__num {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--brand-gold-deep);
}

.how-visual__title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.how-visual__body {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.how-visual__arrow {
  align-self: center;
  font-size: 1.25rem;
  color: var(--brand-gold-deep);
  opacity: 0.6;
}

/* Safety flow infographic */
.safety {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--border);
}

.safety__intro {
  text-align: center;
  max-width: 42ch;
  margin: -0.5rem auto 2rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.safety-flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 880px;
  margin: 0 auto;
}

.safety-flow__node {
  flex: 1 1 120px;
  max-width: 160px;
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.5);
}

.safety-flow__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  color: var(--brand-gold);
  background: rgba(198, 40, 40, 0.15);
  border: 1px solid var(--border-strong);
}

.safety-flow__label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}

.safety-flow__desc {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

.safety-flow__connector {
  flex: 0 0 32px;
  align-self: center;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-gold-deep), transparent);
  position: relative;
}

.safety-flow__connector::after {
  content: '';
  position: absolute;
  right: 0;
  top: -3px;
  border: 4px solid transparent;
  border-left-color: var(--brand-gold-deep);
}

/* FAQ */
.faq {
  padding: var(--space-section) 0;
  border-top: 1px solid var(--border);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.35);
}

.faq-item__q {
  padding: 0.9rem 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  font-size: 0.92rem;
}

.faq-item__q::-webkit-details-marker { display: none; }

.faq-item[open] .faq-item__q { color: var(--brand-gold); }

.faq-item__a {
  margin: 0;
  padding: 0 1rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* CTA & footer */
.cta-section {
  padding: var(--space-section) var(--space-page-x);
  text-align: center;
  border-top: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(198, 40, 40, 0.12), transparent 70%),
    var(--bg-default);
}

.cta-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
}

.cta-desc {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
}

.cta-disclaimer {
  margin: 1rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer {
  margin-top: auto;
  padding: 1.25rem var(--space-page-x) 1.75rem;
  border-top: 1px solid var(--border);
}

.footer-text {
  margin: 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-text a { text-decoration: none; }
.footer-text a:hover { color: var(--brand-gold); }

.landing-loading,
.landing-error {
  padding: 4rem var(--space-page-x);
  text-align: center;
  color: var(--text-secondary);
}

.landing-error { color: var(--brand-red-bright); }

/* Responsive */
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-phone {
    min-width: 0;
    max-width: 280px;
    margin: 0 auto;
  }

  .hero-subtitle { margin-left: auto; margin-right: auto; }

  .cta-group { justify-content: center; }

  .concepts__grid,
  .showcase__grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .why-pills {
    grid-template-columns: 1fr 1fr;
  }

  .how-visual__arrow { display: none; }

  .safety-flow__connector { display: none; }
}

@media (max-width: 640px) {
  .site-header__nav a[href^="#"] { display: none; }

  .why-pills { grid-template-columns: 1fr; }

  .btn { width: 100%; max-width: 300px; }
}

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

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-phone .phone,
  .hero-phone__glow,
  .btn--pulse,
  .phone-shot__img,
  .mock-bar__fill {
    animation: none !important;
  }

  .hero-phone__slides .phone-shot {
    transition: none;
  }
}
