/* Token page. Builds on design-system.css tokens and hero.css nav/footer/buttons. */

.token-page {
  max-width: 46rem;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 5rem) 1rem 4rem;
  position: relative;
  z-index: 10;
}

.token-intro h1 {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text-main);
}

.token-lead {
  margin-top: 1.25rem;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 36rem;
}

/* Wallet panel: the dual pill mark lights up — teal when connected, orange when holding. */
.wallet-panel {
  margin-top: 3rem;
  padding: 1.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--bg-card-border);
  border-radius: 1.5rem;
}

.wallet-state {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.holder-mark {
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
}

.holder-mark path {
  opacity: 0.18;
  transition: opacity var(--duration-slow) var(--ease-smooth);
}

.wallet-panel[data-connected] #mark-connected,
.wallet-panel[data-holder] #mark-holder {
  opacity: 1;
}

.wallet-balance {
  font-size: clamp(1.75rem, 6vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

.wallet-status {
  margin-top: 0.35rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.wallet-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wallet-actions:empty {
  display: none;
}

.token-page .btn-secondary-outline,
.token-page .btn-primary-glow {
  font-size: 0.95rem;
  padding: 0.7rem 1.35rem;
  cursor: pointer;
}

.token-page button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* Sections */
.token-section {
  margin-top: 4rem;
}

.token-section h2 {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.token-section p,
.plain-list li,
.fund-log li {
  color: var(--text-muted);
  line-height: 1.65;
}

.token-section p + p {
  margin-top: 0.75rem;
}

.pack-list,
.fund-log,
.plain-list {
  list-style: none;
  margin-top: 1.25rem;
}

.pack-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid var(--bg-card-border);
}

.pack-list li:last-child {
  border-bottom: 1px solid var(--bg-card-border);
}

.pack-name {
  font-weight: 600;
  color: var(--text-main);
}

.pack-count {
  color: var(--text-faint);
  margin-left: 0.5rem;
}

.wallet-address {
  color: var(--text-faint);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.wallet-address:empty {
  display: none;
}

.pack-fallback {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pack-fallback a {
  color: var(--accent-teal-bright);
  text-underline-offset: 3px;
}

.pack-error {
  flex-basis: 100%;
  color: var(--accent-orange-bright);
  font-size: 0.9rem;
}

.plain-list li {
  padding-left: 1.25rem;
  position: relative;
}

.plain-list li + li {
  margin-top: 0.5rem;
}

.plain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent-teal-bright);
}

.token-facts {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.9rem 1.5rem;
  margin-top: 1.25rem;
}

.token-facts dt {
  color: var(--text-faint);
}

.token-facts dd {
  color: var(--text-main);
  line-height: 1.5;
}

.token-facts code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

.token-facts a,
.issuer-line a {
  color: var(--accent-teal-bright);
  text-underline-offset: 3px;
}

.token-facts dd a {
  display: inline-block;
  margin-top: 0.25rem;
}

.fact-note {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.copy-btn {
  margin-left: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.buy-line {
  margin-top: 2rem;
}

.issuer-line {
  margin-top: 1.5rem;
  color: var(--text-faint);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.token-page :is(a, button):focus-visible {
  outline: 2px solid var(--accent-teal-bright);
  outline-offset: 3px;
}

@media (max-width: 560px) {
  .token-facts {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .token-facts dd {
    margin-bottom: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .holder-mark path {
    transition: none;
  }
}
