/* CryptoBox — marketing site */
:root {
  --bg-deep: #050508;
  --bg-elevated: rgba(18, 18, 28, 0.72);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f8;
  --text-muted: #9898a8;
  --accent-start: #7c3aed;
  --accent-mid: #6366f1;
  --accent-end: #22d3ee;
  --glow-purple: rgba(124, 58, 237, 0.45);
  --glow-cyan: rgba(34, 211, 238, 0.25);
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --max: 72rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: hidden;
}

html[data-lang="zh-CN"] body {
  font-family: "Noto Sans SC", var(--font);
}

html[data-lang="zh-TW"] body {
  font-family: "Noto Sans TC", var(--font);
}

/* Ambient background */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--glow-purple), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(99, 102, 241, 0.15), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, var(--glow-cyan), transparent),
    var(--bg-deep);
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Glass card */
.glass {
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.gradient-text {
  background: linear-gradient(135deg, #c4b5fd, #a5b4fc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-mid));
  color: white;
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--glass-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.site-header.scrolled {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.logo span {
  font-weight: 600;
  opacity: 0.85;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-desktop a:hover {
  color: var(--text);
}

.header-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: auto;
}

.lang-switcher {
  flex-shrink: 0;
}

.lang-switcher--links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
  max-width: min(100%, 14rem);
  justify-content: flex-end;
  font-size: 0.8125rem;
  font-weight: 500;
}

.lang-switcher--links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.lang-switcher--links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.lang-switcher--links a.is-active {
  color: var(--text);
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.lang-switcher__sep {
  color: var(--text-muted);
  opacity: 0.6;
  user-select: none;
}

.lang-select {
  appearance: none;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.06)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239898a8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 0.5rem center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.lang-select:hover,
.lang-select:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(167, 139, 250, 0.35);
  color: var(--text);
  outline: none;
}

.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;
}

.nav-cta {
  display: none;
  gap: 0.75rem;
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  margin-top: 0.75rem;
  border-radius: var(--radius-lg);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
    flex: 1;
    justify-content: center;
  }

  .nav-cta {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }
}

/* Hero */
.hero {
  padding: 8rem 0 4rem;
  position: relative;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c4b5fd;
  border: 1px solid rgba(196, 181, 253, 0.35);
  background: rgba(124, 58, 237, 0.12);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 1rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 0 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.hero-meta strong {
  color: var(--text);
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
}

/* Phone mockup */
.phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.phone-frame {
  position: relative;
  width: min(280px, 85vw);
  padding: 12px;
  border-radius: 36px;
  background: linear-gradient(145deg, #2a2a35, #12121a);
  box-shadow:
    0 50px 100px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: rotateY(-8deg) rotateX(4deg);
  transition: transform 0.6s ease;
}

.phone-wrap:hover .phone-frame {
  transform: rotateY(-4deg) rotateX(2deg) scale(1.02);
}

.phone-screen {
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.phone-screen img {
  width: 100%;
  height: auto;
}

.phone-glow {
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.35), transparent 65%);
  z-index: -1;
  filter: blur(40px);
}

/* Sections */
section {
  padding: 5rem 0;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a78bfa;
  margin: 0 0 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  max-width: 40rem;
}

.section-desc {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 0 2.5rem;
}

/* Trust strip */
.trust-strip {
  padding: 2rem 0;
  border-block: 1px solid var(--glass-border);
}

.trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem 3rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.trust-inner span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.trust-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
}

/* Feature cards */
.feature-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  padding: 1.5rem;
  transition: transform 0.25s, border-color 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 139, 250, 0.35);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Bento */
.bento {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .bento-large {
    grid-row: span 2;
  }
}

.bento-item {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.bento-content {
  padding: 1.5rem 1.5rem 0;
}

.bento-content h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.bento-content p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-bottom: 1rem;
}

.bento-img {
  margin-top: auto;
  padding: 0 1rem 1rem;
}

.bento-img img {
  border-radius: 16px;
  width: 100%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

/* Pill list */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pill {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* Two column */
.split {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

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

.split-visual img {
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
}

.split-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.split-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.split-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-box {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat-box .num {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  background: linear-gradient(135deg, #e9d5ff, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-box .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* FAQ */
.faq-list {
  max-width: 42rem;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--glass-border);
}

.faq-item button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.faq-item button svg {
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-item.open button svg {
  transform: rotate(180deg);
}

.faq-panel {
  display: none;
  padding: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-item.open .faq-panel {
  display: block;
}

/* CTA band */
.cta-band {
  margin: 2rem 0;
  padding: 4rem 2rem;
  border-radius: var(--radius-xl);
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.25);
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 50%);
  pointer-events: none;
}

.cta-band h2 {
  position: relative;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
}

.cta-band p {
  position: relative;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 28rem;
  margin-inline: auto;
}

/* Footer */
.site-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand {
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.footer-col h4 {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent-mid);
  color: white;
  border-radius: 8px;
  z-index: 200;
}

.skip-link:focus {
  top: 1rem;
}

/* Legal / policy pages */
.legal-page main {
  padding-top: 6rem;
  padding-bottom: 4rem;
}

.legal-doc {
  max-width: 42rem;
  margin: 0 auto;
}

.legal-doc h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.legal-doc .legal-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
}

.legal-doc h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.legal-doc p,
.legal-doc li {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.legal-doc p {
  margin: 0 0 1rem;
}

.legal-doc ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc li {
  margin-bottom: 0.5rem;
}

.legal-doc a {
  color: #a5b4fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc a:hover {
  color: #c4b5fd;
}

.legal-doc .legal-intro {
  color: var(--text);
}

.legal-doc .legal-toc {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal-doc .legal-toc li {
  margin-bottom: 0.35rem;
}

.legal-doc .legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.legal-doc .legal-table th,
.legal-doc .legal-table td {
  border: 1px solid var(--glass-border);
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-doc .legal-table thead th {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.2s;
}

.legal-back:hover {
  color: var(--text);
}
