/* CueGear / 碰杆 marketing homepage
   Brand tokens aligned with AppColors */

:root {
  --bg: #0a0f0d;
  --bg-elevated: #121a16;
  --bg-section: #0e1512;
  --felt: #1e3a2a;
  --felt-deep: #1a2e24;
  --primary: #2ecc71;
  --primary-soft: rgba(46, 204, 113, 0.16);
  --amber: #f39c12;
  --text: #f3f7f4;
  --text-muted: #9aada3;
  --text-dim: #6f8177;
  --line: rgba(224, 232, 227, 0.12);
  --shell: min(1120px, calc(100% - 2.5rem));
  --radius: 4px;
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-latin: "Space Grotesk", sans-serif;
  --font-body: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.visually-hidden {
  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: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  background: var(--primary);
  color: #062015;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease),
    border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(10, 15, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  z-index: 2;
}

.brand-mark__zh {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-mark__en {
  font-family: var(--font-latin);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

.nav-cta {
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(46, 204, 113, 0.45);
  border-radius: var(--radius);
  color: var(--primary) !important;
  background: var(--primary-soft);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: rgba(46, 204, 113, 0.28);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  z-index: 2;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.2rem;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  padding: calc(var(--header-h) + 2rem) 0 4.5rem;
  overflow: clip;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__photo {
  position: absolute;
  inset: 0;
  background:
    url("../assets/hero-felt.jpg") center / cover no-repeat,
    radial-gradient(ellipse at 70% 40%, #2a4a38 0%, #0a0f0d 70%);
  transform: scale(1.04);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 15, 13, 0.92) 0%, rgba(10, 15, 13, 0.72) 42%, rgba(10, 15, 13, 0.35) 100%),
    linear-gradient(180deg, rgba(10, 15, 13, 0.55) 0%, transparent 28%, rgba(10, 15, 13, 0.82) 100%);
}

.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  pointer-events: none;
  mix-blend-mode: soft-light;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  padding-bottom: 0.5rem;
}

.hero__brand {
  margin-bottom: 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 9vw, 5.75rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.12em;
  color: var(--text);
}

.hero__title {
  margin-bottom: 1rem;
  font-size: clamp(1.55rem, 3.4vw, 2.15rem);
  font-weight: 600;
  color: #d7e8dc;
}

.hero__lead {
  max-width: 28rem;
  margin-bottom: 1.85rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.1vw, 1.12rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), background 0.2s ease, border-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--primary);
  color: #062015;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #3ad67d;
}

.btn--ghost {
  border: 1px solid rgba(243, 247, 244, 0.28);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: rgba(243, 247, 244, 0.5);
  background: rgba(255, 255, 255, 0.06);
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.2%, 1%, 0);
  }
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(4.5rem, 10vw, 7.5rem) 0;
  border-top: 1px solid var(--line);
}

.section--gear {
  background:
    radial-gradient(ellipse 70% 60% at 90% 20%, rgba(46, 204, 113, 0.08), transparent 55%),
    var(--bg-section);
}

.section--split {
  background: var(--bg);
}

.section--plan {
  background:
    linear-gradient(180deg, #101814 0%, #0c1210 100%);
}

.section--learn {
  background: var(--bg-section);
}

.section--download {
  background:
    radial-gradient(ellipse 80% 70% at 50% 100%, rgba(46, 204, 113, 0.12), transparent 55%),
    var(--bg);
}

.eyebrow {
  margin-bottom: 0.75rem;
  font-family: var(--font-latin);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-copy h2,
.section-copy--center h2,
.split__copy h2,
.download-panel h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.7rem, 3.6vw, 2.45rem);
}

.section-copy p,
.section-copy--center p,
.split__copy p,
.download-panel > p {
  color: var(--text-muted);
  max-width: 34rem;
}

.section-copy--center {
  text-align: center;
  margin-inline: auto;
}

.section-copy--center p {
  margin-inline: auto;
}

.section-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

.section-grid--reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.section-grid--reverse .section-copy {
  order: 2;
}

.section-stack {
  display: grid;
  gap: clamp(2.5rem, 5vw, 3.5rem);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

/* Gear rail */

.gear-rail {
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(26, 46, 36, 0.85), rgba(14, 21, 18, 0.95));
}

.gear-rail__track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.gear-rail__track span {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 0.85rem;
  color: #d8e7de;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gear-rail__track span[data-level="0"],
.gear-rail__track span[data-level="1"],
.gear-rail__track span[data-level="2"],
.gear-rail__track span[data-level="3"] {
  border-color: rgba(205, 127, 50, 0.55);
  color: #e8c39a;
}

.gear-rail__track span[data-level="4"],
.gear-rail__track span[data-level="5"] {
  border-color: rgba(192, 192, 192, 0.55);
  color: #e4e4e4;
}

.gear-rail__track span[data-level="6"] {
  border-color: rgba(255, 215, 0, 0.55);
  color: #ffe566;
  background: rgba(255, 215, 0, 0.08);
}

.gear-rail__caption {
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Felt board visual */

.felt-board {
  position: relative;
  aspect-ratio: 1.55 / 1;
  border-radius: 10px;
  background: linear-gradient(145deg, #2a5340, #1e3a2a 55%, #163026);
  overflow: hidden;
  box-shadow: inset 0 0 0 12px #4a3424;
}

.felt-board__rail {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  pointer-events: none;
}

.felt-board__spots {
  position: absolute;
  inset: 18% 12%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.felt-board__spots i {
  width: clamp(0.7rem, 2.2vw, 1rem);
  aspect-ratio: 1;
  margin-inline: auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6, #f5f5f5 28%, #9aa3a0 70%);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  animation: spot-pulse 3.6s var(--ease) infinite;
}

.felt-board__spots i:nth-child(2) {
  animation-delay: 0.25s;
}
.felt-board__spots i:nth-child(3) {
  animation-delay: 0.5s;
}
.felt-board__spots i:nth-child(4) {
  animation-delay: 0.75s;
}
.felt-board__spots i:nth-child(5) {
  animation-delay: 1s;
}

.felt-board__cue {
  position: absolute;
  left: -8%;
  bottom: 28%;
  width: 78%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #8b5a2b, #d2a679 55%, #f4e6d0 78%, #eee 88%, #2ecc71 88% 100%);
  transform: rotate(-14deg);
  transform-origin: left center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  animation: cue-nudge 5.5s var(--ease) infinite;
}

@keyframes spot-pulse {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.9;
  }
  50% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@keyframes cue-nudge {
  0%,
  100% {
    transform: rotate(-14deg) translateX(0);
  }
  50% {
    transform: rotate(-13deg) translateX(6px);
  }
}

/* Plan steps */

.plan-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: plan;
}

.plan-steps li {
  position: relative;
  padding: 1.4rem 1.25rem 1.35rem;
  border-top: 2px solid rgba(46, 204, 113, 0.55);
  background: rgba(255, 255, 255, 0.02);
  counter-increment: plan;
}

.plan-steps li::before {
  content: counter(plan, decimal-leading-zero);
  display: block;
  margin-bottom: 0.85rem;
  font-family: var(--font-latin);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.plan-steps strong {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}

.plan-steps span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Feature list */

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.feature-list li {
  display: grid;
  gap: 0.35rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.feature-list strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.feature-list span {
  color: var(--text-muted);
}

/* Download */

.download-panel {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.download-panel > p {
  margin-inline: auto;
  margin-bottom: 1.75rem;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.store-btn {
  display: grid;
  gap: 0.15rem;
  min-width: min(100%, 15rem);
  padding: 0.95rem 1.2rem;
  text-align: left;
  border: 1px solid rgba(46, 204, 113, 0.4);
  border-radius: var(--radius);
  background: var(--primary-soft);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease);
}

.store-btn:hover,
.store-btn:focus-visible {
  transform: translateY(-1px);
  background: rgba(46, 204, 113, 0.24);
  border-color: rgba(46, 204, 113, 0.7);
}

.store-btn--muted {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.store-btn--muted:hover,
.store-btn--muted:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(243, 247, 244, 0.28);
}

.store-btn__label {
  font-weight: 600;
}

.store-btn__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  padding: 2.75rem 0 3rem;
  border-top: 1px solid var(--line);
  background: #070b09;
}

.footer-inner {
  display: grid;
  gap: 0.55rem;
  justify-items: start;
}

.footer-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}

.footer-brand__zh {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.footer-brand__en {
  font-family: var(--font-latin);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-tagline,
.footer-meta,
.footer-beian {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.footer-beian {
  margin-top: 0.15rem;
}

.footer-meta a:hover,
.footer-meta a:focus-visible,
.footer-beian a:hover,
.footer-beian a:focus-visible {
  color: var(--primary);
}

/* Reveal motion */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.hero .reveal:nth-child(1) {
  transition-delay: 0.05s;
}
.hero .reveal:nth-child(2) {
  transition-delay: 0.15s;
}
.hero .reveal:nth-child(3) {
  transition-delay: 0.25s;
}
.hero .reveal:nth-child(4) {
  transition-delay: 0.35s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__photo,
  .felt-board__spots i,
  .felt-board__cue {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .section-grid,
  .section-grid--reverse,
  .split {
    grid-template-columns: 1fr;
  }

  .section-grid--reverse .section-copy {
    order: 0;
  }

  .plan-steps {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {
  :root {
    --shell: min(1120px, calc(100% - 1.5rem));
    --header-h: 3.75rem;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.35rem;
    padding: 5rem 1.5rem 2rem;
    background: rgba(8, 12, 10, 0.96);
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .site-nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.95rem 0.25rem;
    font-size: 1.2rem;
    color: var(--text);
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    border-bottom: 0 !important;
  }

  .hero {
    align-items: center;
    padding-bottom: 3.5rem;
    text-align: left;
  }

  .hero__content {
    max-width: none;
  }

  .hero__brand {
    letter-spacing: 0.1em;
  }

  .gear-rail__track {
    gap: 0.3rem;
  }

  .gear-rail__track span {
    font-size: 0.75rem;
  }

  .download-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .store-btn {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .hero {
    min-height: 100svh;
    padding-top: calc(var(--header-h) + 1.25rem);
  }

  .hero__actions {
    width: 100%;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
  }

  .btn--ghost {
    flex-basis: 100%;
  }

  .section {
    padding: 3.5rem 0;
  }

  .felt-board {
    box-shadow: inset 0 0 0 8px #4a3424;
  }
}

@media (min-width: 1400px) {
  :root {
    --shell: min(1200px, calc(100% - 4rem));
  }
}

/* Large tablets / small laptops landscape */
@media (min-width: 769px) and (max-width: 1100px) {
  .hero__content {
    max-width: 32rem;
  }
}
