/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --btn-h: 48px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--btn-h);
  padding: 0 22px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
  transition:
    transform var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    box-shadow var(--t-med) var(--ease),
    color var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(0) scale(0.98); }
.btn .icon { width: 18px; height: 18px; }

.btn-sm { --btn-h: 40px; padding: 0 16px; font-size: 14px; border-radius: 12px; }
.btn-lg { --btn-h: 56px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(157, 180, 255, 0.18) inset, 0 10px 30px -12px rgba(61, 107, 255, 0.7);
}
/* Light sweep on hover */
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 700ms var(--ease);
}
.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(157, 180, 255, 0.3) inset, 0 16px 40px -12px rgba(61, 107, 255, 0.9);
}
.btn-primary:hover::after { transform: translateX(110%); }

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
}
.btn-secondary:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -16px rgba(243, 241, 236, 0.5);
}

.btn-outline {
  border: 1px solid var(--line-strong);
  background: rgba(20, 20, 21, 0.6);
  color: var(--paper);
}
.btn-outline:hover {
  border-color: rgba(157, 180, 255, 0.45);
  background: var(--blue-a08);
}

/* Pressed pulse, played by js/effects.js as click feedback */
.btn.is-pressed::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, 0.35), transparent 60%);
  animation: press 520ms var(--ease) forwards;
}
@keyframes press {
  from { opacity: 1; transform: scale(0.4); }
  to { opacity: 0; transform: scale(1.6); }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(12, 12, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med) var(--ease), background-color var(--t-med) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(12, 12, 13, 0.88);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { display: block; border-radius: 6px; }
.brand-logo img { height: 28px; width: auto; }
.brand-tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--blue-a32);
  background: var(--blue-a08);
  color: var(--blue-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.header-nav { display: flex; gap: 6px; }
.header-nav a {
  padding: 8px 12px;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.header-nav a:hover { color: var(--paper); background: rgba(243, 241, 236, 0.05); }

/* ==========================================================================
   Eyes (brand mark, cursor-tracking). Markup generated by js/eyes.js.
   ========================================================================== */
.eyes svg { width: 100%; height: auto; overflow: visible; }
.eye-white { fill: var(--paper); }
.eye-pupil { fill: var(--ink); }
.eye-lid {
  fill: var(--blue);
  transform-box: fill-box;
  transform-origin: 50% 0;
  transform: scaleY(var(--lid, 0.35));
  transition: transform 220ms var(--ease-spring);
}
.eyes[data-mood="skeptical"] { --lid: 0.49; }
.eyes[data-mood="open"] { --lid: 0.35; }
.eyes.is-curious { --lid: 0.18; }
.eyes.is-blinking .eye-lid { transform: scaleY(1); transition-duration: 90ms; }

/* ==========================================================================
   Factor tiles (hero)
   ========================================================================== */
.factor-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.factor-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(20, 20, 21, 0.65);
  transition:
    border-color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}
.factor-tile:hover,
.factor-tile.is-active {
  border-color: rgba(61, 107, 255, 0.55);
  background: rgba(61, 107, 255, 0.09);
}
.factor-tile:hover { transform: translateY(-2px); }

.factor-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--blue-soft);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.factor-icon .icon { width: 18px; height: 18px; }
.factor-tile:hover .factor-icon,
.factor-tile.is-active .factor-icon {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.factor-text { display: flex; flex-direction: column; min-width: 0; }
.factor-name { font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.factor-sub {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Reward card (locked state)
   ========================================================================== */
@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.reward-card {
  position: relative;
  border-radius: var(--r-xl);
  padding: 1px;
  background: conic-gradient(from var(--spin), var(--line) 0deg, rgba(61, 107, 255, 0.75) 60deg, var(--line) 130deg, var(--line) 360deg);
  box-shadow: 0 40px 100px -40px rgba(61, 107, 255, 0.45), 0 20px 50px -30px rgba(0, 0, 0, 0.8);
  animation: spin 9s linear infinite;
}
@keyframes spin { to { --spin: 360deg; } }

.reward-card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.2vh, 22px);
  padding: clamp(18px, 2.6vh, 26px);
  border-radius: calc(var(--r-xl) - 1px);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(61, 107, 255, 0.14), transparent 60%),
    var(--surface);
  overflow: hidden;
}

.reward-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--subtle);
  box-shadow: 0 0 0 0 rgba(243, 241, 236, 0.35);
  animation: idle-pulse 2.4s var(--ease) infinite;
}
@keyframes idle-pulse {
  0% { box-shadow: 0 0 0 0 rgba(243, 241, 236, 0.3); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(243, 241, 236, 0); }
}

/* Factor ring */
.ring {
  --ring-size: clamp(190px, 33vh, 290px);
  position: relative;
  width: var(--ring-size);
  aspect-ratio: 1;
  margin-inline: auto;
}
.ring-svg { width: 100%; height: 100%; overflow: visible; }
.ring-track { fill: none; stroke: var(--line); stroke-width: 1; }
.ring-dots { fill: none; stroke: rgba(243, 241, 236, 0.14); stroke-width: 1.5; stroke-dasharray: 0.5 7; stroke-linecap: round; }
.ring-seg {
  fill: none;
  stroke: rgba(243, 241, 236, 0.11);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke var(--t-med) var(--ease), filter var(--t-med) var(--ease);
}
.ring-seg.is-active {
  stroke: var(--blue);
  filter: drop-shadow(0 0 10px rgba(61, 107, 255, 0.85));
}
.ring-seg-hit { fill: none; stroke: transparent; stroke-width: 22; }
.ring-scan {
  fill: none;
  stroke: rgba(157, 180, 255, 0.55);
  stroke-width: 1.5;
  stroke-linecap: round;
  transform-origin: 120px 120px;
  animation: scan 7s linear infinite;
}
@keyframes scan { to { transform: rotate(360deg); } }

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
}
.eyes-ring { width: 44%; }
.ring-caption {
  min-height: 1.4em;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--t-fast) var(--ease);
}
.ring-caption.is-factor { color: var(--paper); }

/* Hidden amount */
.reward-amount { text-align: center; }
.reward-title { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.redacted {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  border: 1px dashed var(--line-strong);
  background: rgba(12, 12, 13, 0.5);
}
.redacted-dots { display: inline-flex; gap: 7px; }
.redacted-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--paper);
  opacity: 0.22;
  animation: dot-wave 2.2s var(--ease) infinite;
  animation-delay: calc(var(--i, 0) * 110ms);
}
.redacted-dots i:nth-child(2) { --i: 1; }
.redacted-dots i:nth-child(3) { --i: 2; }
.redacted-dots i:nth-child(4) { --i: 3; }
.redacted-dots i:nth-child(5) { --i: 4; }
.redacted-dots i:nth-child(6) { --i: 5; }
@keyframes dot-wave {
  0%, 60%, 100% { opacity: 0.22; transform: translateY(0); }
  30% { opacity: 0.85; transform: translateY(-3px); }
}
.redacted-unit { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--subtle); }
.redacted-lock { width: 18px; height: 18px; color: var(--blue-soft); }

/* ==========================================================================
   Cards with a cursor-following glow
   ========================================================================== */
.glow-card {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.glow-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--gx, 50%) var(--gy, 0%), rgba(61, 107, 255, 0.14), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
.glow-card:hover { border-color: rgba(157, 180, 255, 0.24); }
.glow-card:hover::before { opacity: 1; }

/* "More is more" signal bars on factor cards */
.signal { display: inline-flex; align-items: flex-end; gap: 4px; height: 18px; }
.signal i {
  width: 5px;
  border-radius: 2px;
  background: var(--line-strong);
  transition: background-color 240ms var(--ease), transform 240ms var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.signal i:nth-child(1) { height: 6px; }
.signal i:nth-child(2) { height: 9px; --i: 1; }
.signal i:nth-child(3) { height: 12px; --i: 2; }
.signal i:nth-child(4) { height: 15px; --i: 3; }
.signal i:nth-child(5) { height: 18px; --i: 4; }
.glow-card:hover .signal i,
.glow-card:focus-within .signal i { background: var(--blue); }

/* ==========================================================================
   Ticker
   ========================================================================== */
.ticker {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(20, 20, 21, 0.6);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; }
.ticker-group span {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.ticker-group span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.ticker-group .ticker-em { color: var(--paper); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:first-child { border-top: 1px solid var(--line); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-sm);
  transition: color var(--t-fast) var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--blue-soft); }
.faq-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  color: var(--paper);
  transition: transform var(--t-med) var(--ease), background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.faq-icon .icon { width: 16px; height: 16px; }
.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--blue);
  border-color: var(--blue);
}
.faq-body { padding: 0 56px 24px 4px; color: var(--muted); font-size: 16px; max-width: 64ch; }
.faq-body a { color: var(--blue-soft); text-decoration: underline; text-underline-offset: 3px; }
.faq-item[open] .faq-body { animation: faq-in 360ms var(--ease); }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Contract address chip
   ========================================================================== */
.ca-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.ca-chip:hover { border-color: rgba(157, 180, 255, 0.35); background: var(--surface-2); }
.ca-label { font-weight: 700; color: var(--blue-soft); letter-spacing: 0.08em; font-size: 11px; }
.ca-value { font-family: var(--mono); color: var(--paper); }
.ca-icon { width: 15px; height: 15px; color: var(--muted); }
.ca-status {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  pointer-events: none;
}
.ca-chip.is-copied .ca-status { opacity: 1; transform: translate(-50%, 0); }
