/* Seahorse Wallet - static site styles */

:root {
  --ink: #0b2e21;
  --ink-2: #3c5c4e;
  --muted: #6c877a;
  --bg: #ffffff;
  --mint: #f1faf4;
  --mint-2: #e3f4e9;
  --line: #dbe9e0;
  --line-2: #c7ded1;
  --brand: #5cc63f;
  --brand-ink: #0f7a3d;
  --brand-ink-2: #0a5c2e;
  --teal: #0e9c8e;
  --teal-ink: #0a6e64;
  --dark: #0a3b2a;
  --dark-2: #0f4c36;
  --amber: #a96a05;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 46, 33, 0.06), 0 1px 3px rgba(11, 46, 33, 0.05);
  --shadow-md: 0 18px 40px -24px rgba(11, 46, 33, 0.45);
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 800;
}

h1 {
  font-size: clamp(2rem, 4.6vw, 3.15rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.15rem);
}

h3 {
  font-size: 1.075rem;
  font-weight: 700;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
}

li + li {
  margin-top: 0.35rem;
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.9em;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

/* site.js replaces <i data-icon> with the real <svg class="icon">. These rules
   give the placeholder the same box as the icon it becomes, so the swap cannot
   shift layout (this was the source of the site's CLS). */
[data-icon] {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
}

.btn [data-icon] {
  width: 18px;
  height: 18px;
}

.hero__badge [data-icon] {
  width: 15px;
  height: 15px;
}

.hero__meta [data-icon] {
  width: 16px;
  height: 16px;
}

.card__icon [data-icon] {
  width: 21px;
  height: 21px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--dark);
  color: #fff;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: auto;
  height: 34px;
}

.brand__sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
  margin-top: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-weight: 600;
  font-size: 0.925rem;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--mint);
  color: var(--ink);
  text-decoration: none;
}

/* CTA that only appears inside the collapsed mobile menu. The extra class
   keeps this ahead of the later `.btn { display: inline-flex }` rule. */
.nav .nav__cta {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.lang-toggle button {
  border: 0;
  background: transparent;
  padding: 7px 11px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--dark);
  color: #fff;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--mint-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

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

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn--primary {
  background: var(--brand);
  color: #062514;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: #6ad24c;
}

.btn--dark {
  background: var(--dark);
  color: #fff;
}

.btn--dark:hover {
  background: var(--dark-2);
}

.btn--ghost {
  background: #fff;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink-2);
}

.btn--lg {
  padding: 14px 26px;
  font-size: 1.02rem;
}

.btn--block {
  width: 100%;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 56px 0 44px;
  background:
    radial-gradient(60% 90% at 88% 8%, rgba(92, 198, 63, 0.14), transparent 70%),
    radial-gradient(46% 70% at 4% 92%, rgba(14, 156, 142, 0.1), transparent 72%),
    var(--bg);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  gap: 48px;
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero__badge .icon {
  width: 15px;
  height: 15px;
  color: var(--teal);
}

.hero h1 {
  margin: 16px 0 12px;
}

.hero__lede {
  font-size: 1.075rem;
  color: var(--ink-2);
  max-width: 36em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 18px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--muted);
  font-size: 0.875rem;
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero__meta .icon {
  width: 16px;
  height: 16px;
  color: var(--brand-ink);
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}

/* The hero art is the transparent seahorse, so the shadow follows the
   silhouette instead of a bounding box. */
.hero__logo {
  width: min(100%, 300px);
  height: auto;
  filter: drop-shadow(0 20px 34px rgba(11, 46, 33, 0.2));
}

/* ---------- generic sections ---------- */

.section {
  padding: 64px 0;
}

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

.section__head {
  max-width: 46em;
  margin-bottom: 34px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--teal-ink);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.lede {
  color: var(--ink-2);
  font-size: 1.02rem;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card h3 {
  margin-bottom: 6px;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--mint-2);
  color: var(--brand-ink);
}

.card__icon .icon {
  width: 21px;
  height: 21px;
}

.chains {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chains li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-2);
}

.chains .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.dot--eth {
  background: #627eea;
}

.dot--bnb {
  background: #f0b90b;
}

.dot--polygon {
  background: #8247e5;
}

.dot--arbitrum {
  background: #12aaff;
}

.dot--optimism {
  background: #ff0420;
}

.dot--base {
  background: #0052ff;
}

.dot--solana {
  background: #9945ff;
}

.dot--tron {
  background: #ef0027;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  margin: 0;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.steps strong {
  display: block;
  margin-bottom: 4px;
}

.steps p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.94rem;
}

/* Inside a panel the steps are a list, not cards nested in a card. */
.steps--bare {
  grid-template-columns: 1fr;
}

.steps--bare li {
  position: relative;
  padding: 0 0 0 46px;
  background: transparent;
  border: 0;
}

.steps--bare li::before {
  position: absolute;
  left: 0;
  top: 0;
  margin-bottom: 0;
}

/* ---------- cta band ---------- */

.cta-band {
  padding: 56px 0;
  background: var(--dark);
  color: #fff;
}

.cta-band__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.cta-band h2 {
  margin-bottom: 6px;
}

.cta-band p {
  margin: 0;
  color: #a9dfc1;
  max-width: 44em;
}

.cta-band .btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
}

.cta-band .btn--ghost:hover {
  border-color: #fff;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 44px 0 30px;
  background: #06271b;
  color: #9dc4b1;
  font-size: 0.9rem;
}

.site-footer a {
  color: #cfe9da;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  margin-bottom: 10px;
}

.footer__brand img {
  width: auto;
  height: 34px;
}

.footer__col h4 {
  margin-bottom: 10px;
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.footer__col li + li {
  margin-top: 7px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding-top: 20px;
  font-size: 0.83rem;
}

/* ---------- download page ---------- */

.page-head {
  padding: 48px 0 8px;
}

.page-head h1 {
  margin-bottom: 8px;
}

.page-head p {
  color: var(--ink-2);
  max-width: 46em;
}

.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 26px 0 64px;
}

.panel {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.panel + .panel {
  margin-top: 18px;
}

.panel h2 {
  font-size: 1.2rem;
}

.release-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.release-head img {
  width: 62px;
  height: 62px;
  border-radius: 14px;
}

.release-head .ver {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
}

.release-head .rel-date {
  color: var(--muted);
  font-size: 0.87rem;
}

.release-head .btn {
  margin-left: auto;
}

.spec {
  margin: 20px 0 0;
  border-top: 1px solid var(--line);
}

.spec div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.spec dt {
  color: var(--muted);
  font-weight: 600;
}

.spec dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.hash {
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
}

.copy-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.copy-row .btn {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #f0d9a8;
  border-left: 3px solid #e0a534;
  border-radius: var(--radius);
  background: #fdf7e9;
  color: #6b4a05;
  font-size: 0.9rem;
}

.notice .icon {
  color: #b4790c;
  margin-top: 2px;
}

.notice p {
  margin: 0;
}

.dl-grid .notice {
  margin-bottom: 18px;
}

/* QR panel: the desktop-to-phone download path. */
.qr-panel {
  text-align: center;
}

.qr-panel h2 {
  margin-bottom: 16px;
}

.qr-panel .qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 14px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.qr-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.changelog {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-2);
  font-size: 0.94rem;
}

/* ---------- legal pages ---------- */

.prose {
  max-width: 76ch;
  padding: 8px 0 72px;
}

.prose h2 {
  margin-top: 40px;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 26px;
  font-size: 1.03rem;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose .meta {
  color: var(--muted);
  font-size: 0.86rem;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero__grid,
  .dl-grid,
  .grid--3,
  .steps,
  .grid--2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding: 36px 0 34px;
  }

  .hero__grid {
    gap: 30px;
  }

  .hero__visual {
    order: -1;
  }

  .hero__logo {
    width: min(62%, 210px);
  }

  /* The tagline under the brand name needs ~150px (zh) / ~200px (en) on one
     line. Below this width the header cannot spare it, and letting it wrap
     splits 「去中心化」 across lines. It stays in the HTML for crawlers. */
  .brand__sub {
    display: none;
  }

  .release-head .btn {
    margin-left: 0;
    width: 100%;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 50px 0;
  }
}

@media (max-width: 720px) {
  .brand {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  /* The primary CTA moves into the collapsed menu to keep the bar readable. */
  .header-actions .btn {
    display: none;
  }

  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 20px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .site-header[data-nav-open="true"] .nav {
    display: flex;
  }

  .nav a {
    padding: 11px 12px;
  }

  .nav .nav__cta {
    display: inline-flex;
    margin-top: 6px;
  }

  .menu-btn {
    display: inline-flex;
    order: 3;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }

  .cta-band__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .release-head {
    gap: 12px;
  }

  .spec div {
    flex-direction: column;
    gap: 2px;
  }

  .spec dd {
    text-align: left;
  }
}

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

  * {
    transition: none !important;
    animation: none !important;
  }
}
