/* Mobile first Web3 wallet ecosystem layout */
:root {
  --primary: #2980FE;
  --primary-soft: #EAF3FF;
  --primary-faint: #F4F8FF;
  --ink: #172033;
  --muted: #637083;
  --soft: #F6F8FB;
  --line: #E5EAF1;
  --white: #FFFFFF;
  --deep: #25324A;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --shadow: 0 18px 45px rgba(41, 128, 254, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 38%, #FFFFFF 100%);
  line-height: 1.75;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { margin: 0 0 16px; color: var(--muted); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229,234,241,.78);
}
.header-inner, .container, .footer-inner {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
}
.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--deep);
  letter-spacing: .02em;
}
.logo img { width: 36px; height: 36px; object-fit: contain; }
.logo span { font-size: 20px; }
.nav-toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 9px;
}
.site-nav {
  display: none;
  position: absolute;
  left: 16px;
  right: 16px;
  top: 76px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.site-nav.is-open { display: grid; gap: 8px; }
.site-nav a {
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--deep);
  font-size: 15px;
}
.site-nav a:hover { background: var(--primary-soft); color: var(--primary); }

.section, .page-section { padding: 54px 0; }
.web3-hero {
  position: relative;
  padding: 52px 0 36px;
  overflow: hidden;
}
.web3-hero::before,
.web3-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(41,128,254,.18), rgba(41,128,254,0) 68%);
  pointer-events: none;
}
.web3-hero::before { width: 360px; height: 360px; right: -120px; top: -70px; }
.web3-hero::after { width: 260px; height: 260px; left: -110px; bottom: 20px; }
.hero-grid, .split-grid, .developer-grid, .submit-grid, .about-grid, .page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.eyebrow, .category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 16px;
}
.hero-copy h1, .page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 10vw, 68px);
  line-height: 1.06;
  letter-spacing: -.05em;
  color: var(--deep);
}
.hero-copy .lead, .page-hero .lead {
  font-size: 17px;
  color: #4F5F76;
  max-width: 760px;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(41,128,254,.22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px rgba(41,128,254,.26); }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; margin-top: 24px; }
.security-tags, .floating-tags, .mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.security-tags span, .floating-tags span, .mini-tags span, .tag {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--white);
  color: var(--deep);
  border: 1px solid var(--line);
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(37,50,74,.06);
}
.hero-visual {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
}
.device-frame {
  position: relative;
  z-index: 2;
  width: min(92%, 420px);
  padding: 22px;
  border-radius: 36px;
  background: linear-gradient(145deg, #FFFFFF, #EEF6FF);
  border: 1px solid rgba(41,128,254,.16);
  box-shadow: var(--shadow);
}
.device-frame img { margin: 0 auto; border-radius: 28px; }
.floating-tags span {
  position: absolute;
  z-index: 3;
  background: rgba(255,255,255,.95);
}
.floating-tags span:nth-child(1) { top: 8%; left: 0; }
.floating-tags span:nth-child(2) { top: 20%; right: 0; }
.floating-tags span:nth-child(3) { bottom: 20%; left: 2%; }
.floating-tags span:nth-child(4) { bottom: 6%; right: 8%; }

.section-head { margin-bottom: 24px; max-width: 760px; }
.section-head h2, .split-copy h2, .developer-copy h2, .submit-copy h2, .cta-section h2 {
  margin: 0 0 12px;
  color: var(--deep);
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.18;
  letter-spacing: -.035em;
}
.ecosystem-nav { padding-top: 26px; }
.ecosystem-grid, .category-grid, .risk-grid, .faq-grid, .related-grid, .page-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.ecosystem-card, .info-card, .risk-card, .faq-item, .step-card, .related-card, .page-panel, .checklist, .note-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 12px 34px rgba(37,50,74,.05);
}
.ecosystem-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ecosystem-card .label {
  width: fit-content;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 5px 10px;
  font-weight: 800;
  font-size: 13px;
}
.ecosystem-card h3, .info-card h3, .risk-card h3, .faq-item h3, .step-card h3, .related-card h3 { margin: 0; color: var(--deep); font-size: 20px; }
.text-link {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 800;
}
.text-link::after { content: "→"; }

.web3-section, .digital-assets-section { background: linear-gradient(180deg, #FFFFFF 0%, #F5F9FF 100%); }
.hardware-wallet-section, .swap-section, .privacy-section, .submit-chain-section { background: var(--soft); }
.split-grid {
  padding: 26px;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.74);
  border: 1px solid var(--line);
}
.image-card {
  padding: 20px;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #F6FAFF, #FFFFFF);
  border: 1px solid rgba(41,128,254,.14);
  box-shadow: var(--shadow);
}
.image-card img { margin: 0 auto; max-height: 430px; object-fit: contain; }
.feature-list, .clean-list {
  list-style: none;
  padding: 0;
  margin: 18px 0;
  display: grid;
  gap: 10px;
}
.feature-list li, .clean-list li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
}
.feature-list li::before, .clean-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .72em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
}
.privacy-section .privacy-panel, .safety-panel {
  background: linear-gradient(135deg, #FFFFFF, #F1F7FF);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 26px;
}
.submit-card, .developer-panel {
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid rgba(41,128,254,.18);
  background: linear-gradient(135deg, #FFFFFF, #EDF5FF);
  box-shadow: var(--shadow);
}
.developer-panel pre {
  margin: 0;
  white-space: pre-wrap;
  color: #31415C;
  background: #F6F8FB;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.65;
}
.process-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.step-card { position: relative; overflow: hidden; }
.step-no {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: var(--primary);
  color: var(--white);
  font-weight: 900;
  margin-bottom: 14px;
}
.risk-card {
  border-top: 4px solid var(--primary);
}
.risk-card strong { color: var(--deep); display: block; margin-top: 10px; }
.faq-item details { cursor: pointer; }
.faq-item summary {
  list-style: none;
  font-weight: 800;
  color: var(--deep);
}
.faq-item summary::-webkit-details-marker { display: none; }
.cta-section {
  margin: 34px 0 68px;
  padding: 40px 24px;
  text-align: center;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #EAF3FF, #FFFFFF 55%, #F6F8FB);
  border: 1px solid var(--line);
}
.cta-section p { max-width: 720px; margin-left: auto; margin-right: auto; }

.page-hero {
  padding: 54px 0 32px;
  background: linear-gradient(180deg, #FFFFFF, #F4F8FF);
}
.page-layout { align-items: start; }
.page-main { min-width: 0; }
.page-main h2 { color: var(--deep); font-size: 28px; margin: 24px 0 12px; line-height: 1.2; }
.page-sidebar { display: grid; gap: 16px; }
.checklist ul, .note-box ul { margin: 0; padding-left: 20px; color: var(--muted); }
.checklist li, .note-box li { margin: 8px 0; }
.page-cta { margin-top: 24px; }

.about-grid { align-items: stretch; }
.about-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.download-steps {
  counter-reset: downloadStep;
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.download-steps .step-card { counter-increment: downloadStep; }
.download-steps .step-card::before {
  content: counter(downloadStep, decimal-leading-zero);
  color: var(--primary);
  font-weight: 900;
  font-size: 14px;
}

.site-footer {
  background: #F6F8FB;
  border-top: 1px solid var(--line);
  padding: 42px 0 24px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
.footer-brand p { max-width: 560px; margin-top: 14px; }
.footer-links {
  display: grid;
  gap: 10px;
}
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  width: min(100% - 32px, 1180px);
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 640px) {
  .ecosystem-grid, .category-grid, .risk-grid, .faq-grid, .related-grid, .page-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-actions { flex-direction: row; align-items: center; }
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }
  .site-nav a { font-size: 14px; padding: 9px 10px; }
  .web3-hero { padding: 76px 0 48px; }
  .hero-grid, .split-grid, .developer-grid, .submit-grid, .about-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 46px; }
  .page-layout { grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; }
  .ecosystem-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ecosystem-card:first-child { grid-column: span 2; }
  .risk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .faq-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section, .page-section { padding: 78px 0; }
  .footer-inner { grid-template-columns: 1.2fr .8fr; }
}

@media (min-width: 1120px) {
  .site-nav a { padding: 10px 12px; }
  .category-grid, .page-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
