/* =========================================================
   RootData Landing - main.css
   Mobile-First · Dark data-terminal theme
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  --bg: #0b0e11;
  --surface: #14181d;
  --surface-2: #1b2128;
  --border: #262d36;
  --primary: #ff8a3d;
  --primary-hover: #f5731a;
  --primary-soft: rgba(255, 138, 61, 0.13);
  --text: #eaecef;
  --text-2: #9ca3af;
  --text-3: #6b7280;
  --up: #16c784;
  --down: #ea3943;

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --header-h: 64px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 20px;
}

.text-primary {
  color: var(--primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--primary);
  color: #2a1402;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  min-height: 50px;
  padding-inline: 28px;
  font-size: 16px;
}

.btn-sm {
  min-height: 40px;
  padding-inline: 16px;
  font-size: 14px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
}

.nav-links a:not(.btn) {
  font-size: 15px;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}
.nav-links a:not(.btn):hover {
  color: var(--primary);
}

/* Hamburger */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu panel */
.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu-links {
  display: flex;
  flex-direction: column;
  padding: 12px 20px 24px;
  animation: menuIn 0.22s var(--ease);
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  min-height: 50px;
  font-size: 16px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-menu-cta {
  width: 100%;
  margin-top: 18px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 48px 0 56px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(620px 320px at 50% -8%, rgba(22, 199, 132, 0.16), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px, 36px 36px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.hero-title {
  margin-top: 20px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  margin-top: 16px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-actions .btn {
  flex: 1 1 auto;
}

.hero-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-3);
}

.hero-visual {
  width: 100%;
}

/* ---------- Stats ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.stat-item {
  text-align: left;
}

.stat-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 4px;
  font-size: 13px;
  color: var(--text-2);
}

/* ---------- Sections ---------- */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section-kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.section-title {
  margin-top: 10px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-desc {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.feature-card {
  padding: 24px;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease),
    background-color 0.22s var(--ease);
}

.feature-card:hover {
  border-color: rgba(22, 199, 132, 0.55);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.feature-card h3 {
  margin-top: 16px;
  font-size: 18px;
  font-weight: 700;
}

.feature-card p {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-soft);
}

.chip-soft {
  color: var(--text-2);
  background: var(--surface-2);
}

/* ---------- WatchList rank table ---------- */
.rank-card {
  padding: 20px 16px;
}

.rank-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.rank-filter {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface-2);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.rank-filter.active {
  color: #2a1402;
  background: var(--primary);
  font-weight: 600;
}

.rank-table {
  width: 100%;
}

.rank-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 14px 8px;
  border-bottom: 1px solid var(--border);
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-row-head {
  display: none;
}

.rank-no {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.rank-project {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rank-name {
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-grade {
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.grade-a {
  color: var(--primary);
}
.grade-b {
  color: #7fd6ff;
}
.rank-trend {
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rank-trend.up {
  color: var(--up);
}
.rank-trend.down {
  color: var(--down);
}

.rank-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- Split sections ---------- */
.split {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.split-visual {
  width: 100%;
  display: flex;
  justify-content: center;
}

.check-list {
  margin: 20px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--primary-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF8A3D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* ---------- Partners ---------- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.partner-item:hover {
  border-color: rgba(22, 199, 132, 0.5);
  color: var(--text);
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 64px 0;
  background:
    radial-gradient(560px 240px at 50% 0%, rgba(22, 199, 132, 0.14), transparent 70%),
    var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-text {
  margin: 14px auto 0;
  max-width: 520px;
  font-size: 15px;
  color: var(--text-2);
}

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

.cta-actions .btn {
  flex: 0 0 auto;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: #080a0d;
  padding-top: 48px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding-bottom: 36px;
}

.footer-desc {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-2);
  max-width: 340px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-cta {
  color: var(--primary) !important;
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  padding-bottom: 24px;
}

.footer-bottom p {
  font-size: 12.5px;
  color: var(--text-3);
}

/* =========================================================
   Tablet: >= 768px
   ========================================================= */
@media (min-width: 768px) {
  .container {
    padding-inline: 24px;
  }

  .hero {
    padding: 72px 0 80px;
  }

  .hero-title {
    font-size: 46px;
  }

  .hero-actions .btn {
    flex: 0 0 auto;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .stat-number {
    font-size: 30px;
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 32px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .rank-card {
    padding: 24px;
  }

  .rank-row {
    grid-template-columns: 48px 1.6fr 1fr 0.9fr;
    gap: 16px;
    padding: 16px 12px;
  }

  .rank-row-head {
    display: grid;
    color: var(--text-3);
    font-size: 12.5px;
    font-weight: 600;
    background: var(--surface-2);
    border-radius: 8px;
    border-bottom: none;
    padding-block: 10px;
  }

  .rank-trend {
    text-align: right;
  }

  .rank-grade {
    text-align: center;
  }

  .split {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }

  .split-reverse .split-copy {
    order: 2;
  }
  .split-reverse .split-visual {
    order: 1;
  }

  .split-copy {
    flex: 1 1 50%;
  }

  .split-visual {
    flex: 1 1 50%;
  }

  .partner-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-brand {
    flex: 1 1 40%;
  }

  .footer-cols {
    grid-template-columns: repeat(3, 1fr);
    flex: 1 1 60%;
  }
}

/* =========================================================
   Desktop: >= 1024px
   ========================================================= */
@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 56px;
  }

  .hero-copy {
    flex: 1 1 48%;
  }

  .hero-visual {
    flex: 1 1 52%;
  }

  .hero-title {
    font-size: 52px;
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-card:hover {
    transform: translateY(-4px);
  }

  .cta-title {
    font-size: 36px;
  }
}

/* ---------- Verify modal ---------- */
.verify-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 7, 9, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.2s var(--ease);
}

.verify-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.verify-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 28px 24px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: popIn 0.24s var(--ease);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.verify-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--text-2);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.verify-close:hover {
  color: var(--text);
  background: var(--surface-2);
}

.verify-head {
  text-align: left;
  padding-right: 36px;
}

.verify-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.verify-title {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 800;
}

.verify-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
}

/* Puzzle */
.verify-puzzle {
  position: relative;
  height: 110px;
  margin-top: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(300px 120px at 20% 0%, rgba(255, 138, 61, 0.12), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #0e1216;
  background-size: 100% 100%, 24px 24px, 24px 24px, 100% 100%;
}

.puzzle-gap,
.puzzle-block {
  position: absolute;
  top: 34px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.puzzle-gap {
  left: var(--gap, 220px);
  border: 2px solid var(--primary);
  background: rgba(255, 138, 61, 0.14);
  box-shadow: inset 0 0 0 2px rgba(11, 14, 17, 0.6);
}

.puzzle-block {
  left: 0;
  transform: translateX(var(--tx, 0px));
  border: 1px solid rgba(255, 180, 120, 0.7);
  background: linear-gradient(160deg, #ffb071, #f5731a);
  box-shadow: 0 4px 12px rgba(245, 115, 26, 0.4);
}

/* Track */
.verify-track {
  position: relative;
  height: 50px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.verify-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: calc(var(--tx, 0px) + 25px);
  border-radius: 999px;
  background: var(--primary-soft);
}

.verify-track-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 56px;
  font-size: 13.5px;
  color: var(--text-2);
  pointer-events: none;
  white-space: nowrap;
}

.verify-handle {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary);
  color: #2a1402;
  transform: translateX(var(--tx, 0px));
  box-shadow: 0 4px 14px rgba(245, 115, 26, 0.45);
  cursor: grab;
  transition: background-color 0.2s var(--ease);
}

.verify-handle:active {
  cursor: grabbing;
}

.verify-track.is-dragging .verify-handle,
.verify-track.is-dragging .puzzle-block {
  transition: none;
}

/* 失败回弹 */
.verify-track.is-reset .verify-handle,
.verify-track.is-reset .verify-progress,
.verify-track.is-reset .puzzle-block {
  transition: transform 0.35s var(--ease), width 0.35s var(--ease);
}

/* 成功态 */
.verify-track.is-success {
  border-color: var(--primary);
}
.verify-track.is-success .verify-handle {
  background: var(--primary);
}
.verify-track.is-success .verify-track-text {
  color: var(--primary);
}

.verify-success {
  margin-top: 20px;
  text-align: center;
  animation: fadeIn 0.25s var(--ease);
}

.verify-success[hidden] {
  display: none;
}

.verify-success-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

.verify-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary-soft);
}

.verify-go {
  width: 100%;
  margin-top: 16px;
}

body.is-verifying {
  overflow: hidden;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
