/* Retsina Software — hand-written stylesheet, no framework */

:root {
  --bg: #0a0e17;
  --surface: #10182a;
  --surface-2: #16203a;
  --border: #23304f;
  --text: #e8ecf4;
  --text-secondary: #9aa7bf;
  --text-muted: #6b7891;
  --accent: #14f195;
  --accent-2: #9945ff;
  --good: #14f195;
  --bad: #ff6b6b;
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.container_narrow { max-width: 800px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 700; margin-bottom: 0.5rem; }
h3 { font-size: 1.15rem; font-weight: 650; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section { padding: 72px 0; }
.section_sub { color: var(--text-secondary); max-width: 560px; margin-bottom: 2rem; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav_inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.nav_logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}
.nav_logo:hover { text-decoration: none; }
.nav_mark { color: var(--accent); flex-shrink: 0; }

.nav_links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav_links a { color: var(--text-secondary); font-size: 0.95rem; }
.nav_links a:hover { color: var(--text); text-decoration: none; }

.nav_cta {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  color: var(--text) !important;
}
.nav_cta:hover { border-color: var(--accent); }

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

.hero { padding: 88px 0 40px; }

.hero_grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero_sub {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin: 1.2rem 0 2rem;
  max-width: 480px;
}

.button-group { display: flex; gap: 12px; flex-wrap: wrap; }

.button {
  display: inline-block;
  background: var(--accent);
  color: #04160d;
  font-weight: 650;
  padding: 12px 26px;
  border-radius: 999px;
  transition: filter 0.15s ease;
}
.button:hover { filter: brightness(1.1); text-decoration: none; }

.button.is-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.button.is-secondary:hover { border-color: var(--text-secondary); }

.hero_visual { display: flex; justify-content: center; }
.globe { width: 100%; max-width: 480px; height: auto; }

.node_dot { fill: var(--accent); }
.node_halo {
  fill: var(--accent);
  opacity: 0.18;
  animation: pulse 2.6s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.node_label {
  fill: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.18; }
  50% { transform: scale(1.5); opacity: 0.32; }
}

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

/* ---------- validator card ---------- */

.validator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.validator-card_head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.validator-card_name { font-size: 1.4rem; }
.validator-card_meta { color: var(--text-secondary); font-size: 0.92rem; margin-top: 2px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
}
.badge_dot { width: 8px; height: 8px; border-radius: 50%; }
.badge[data-state="active"] { color: var(--good); }
.badge[data-state="active"] .badge_dot { background: var(--good); }
.badge[data-state="delinquent"] { color: var(--bad); }
.badge[data-state="delinquent"] .badge_dot { background: var(--bad); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 14px 16px;
}

.stat_label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat_value {
  font-size: 1.45rem;
  font-weight: 650;
  color: var(--text);
}

.stat_unit { font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); }
.stat_note { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }

.stat-source {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 14px 0 24px;
}

/* ---------- keys ---------- */

.keys {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.key_label {
  flex: 0 0 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.key_value {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}

.copy-btn {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-secondary); }
.copy-btn.copied { color: var(--good); border-color: var(--good); }

.key_links { font-size: 0.85rem; color: var(--text-muted); margin-top: 14px; }

/* ---------- features ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 2rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.feature_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--accent);
  margin-bottom: 14px;
}

.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 2rem;
  list-style: none;
  counter-reset: step;
}

.step {
  border-left: 2px solid var(--border);
  padding-left: 20px;
}

.step_num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- faq ---------- */

.faq-list { margin-top: 1.6rem; }

.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  color: var(--text-muted);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.15s ease;
}
.faq-list details[open] summary::after { transform: rotate(45deg); }

.faq-list details p {
  color: var(--text-secondary);
  padding-bottom: 16px;
  max-width: 640px;
}

.faq_contact { margin-top: 1.6rem; color: var(--text-secondary); }

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

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer_inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer_inner p { color: var(--text-muted); font-size: 0.9rem; }

.footer_social {
  display: flex;
  gap: 18px;
  list-style: none;
}

.footer_social a { color: var(--text-secondary); display: inline-flex; }
.footer_social a:hover { color: var(--text); }

/* ---------- network stats ---------- */

.net-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 28px; }

.meter {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}
.meter_fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.6s ease;
}

.compare { overflow-x: auto; }

.compare_table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare_table th,
.compare_table td {
  text-align: left;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.compare_table tbody tr:last-child th,
.compare_table tbody tr:last-child td { border-bottom: none; }

.compare_table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: var(--surface-2);
}

.compare_table tbody th {
  font-weight: 500;
  color: var(--text-secondary);
}

.compare_table td:nth-child(2) { color: var(--accent); font-weight: 650; }

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

/* ---------- staking modal ---------- */

.validator-card_cta { margin-top: 20px; }

.stake-modal {
  background: transparent;
  border: none;
  padding: 0;
  max-width: 100%;
}
.stake-modal::backdrop {
  background: rgba(4, 6, 12, 0.7);
  backdrop-filter: blur(4px);
}

.stake-modal_inner {
  width: min(440px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  color: var(--text);
}

.stake-modal_head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stake-modal_close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.stake-modal_close:hover { color: var(--text); }

.wallet-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }

.wallet-btn {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease;
}
.wallet-btn:hover { border-color: var(--accent); }

.stake_hint { color: var(--text-secondary); font-size: 0.92rem; }
.stake_note { color: var(--text-muted); font-size: 0.8rem; margin: 10px 0; }
.stake_error { color: var(--bad); font-size: 0.88rem; min-height: 1.2em; margin-bottom: 10px; }
.stake_success { color: var(--good); font-weight: 650; font-size: 1.1rem; margin-bottom: 8px; }

.stake_row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.stake_row span:first-child { color: var(--text-secondary); }

.stake_label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 16px 0 6px;
}

.stake_input-row { display: flex; gap: 8px; }

.stake_input-row input {
  flex: 1;
  font-family: var(--font);
  font-size: 1.1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
}
.stake_input-row input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

#stake-step-pending { text-align: center; padding: 24px 0; }

.spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2.5s; }
}

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

@media (max-width: 900px) {
  .hero_grid { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding-top: 56px; }
  .hero_visual { order: -1; }
  .globe { max-width: 360px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .net-grid { grid-template-columns: 1fr; }
  .feature-grid, .steps { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav_links { gap: 14px; }
  .nav_links a:not(.nav_cta) { font-size: 0.85rem; }
  .nav_logo span { display: none; }
  .section { padding: 48px 0; }
  .validator-card { padding: 20px; }
  .validator-card_head { flex-direction: column; }
  .key_label { flex-basis: 100%; }
}
