/*
 * SIGIL Graph — Codex visual pass
 * A non-destructive layer over the original production bundle.
 */

:root {
  --bg: #080b0a;
  --bg2: #0c1210;
  --panel: #111916;
  --panel2: #17221e;
  --border: rgba(125, 227, 195, 0.18);
  --accent: #10a37f;
  --accent-bright: #7de3c3;
  --gold: #f4b860;
  --text: #f2f7f4;
  --dim: #a5b5ae;
  --dimmer: #6e8078;
  --ok: #49d59e;
  --warn: #ffc66d;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(125, 227, 195, 0.36) #080b0a;
  overflow-x: clip;
}

body {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background:
    radial-gradient(70% 44% at 4% -8%, rgba(16, 163, 127, 0.24), transparent 68%),
    radial-gradient(50% 40% at 96% 4%, rgba(80, 143, 255, 0.15), transparent 70%),
    radial-gradient(42% 34% at 55% 46%, rgba(244, 184, 96, 0.06), transparent 72%),
    linear-gradient(180deg, #0a0e0c 0%, #080b0a 46%, #090d0b 100%);
  background-attachment: fixed;
}

body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(125, 227, 195, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 227, 195, 0.026) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 64% at 50% 22%, #000 12%, transparent 76%);
  mask-image: radial-gradient(ellipse 80% 64% at 50% 22%, #000 12%, transparent 76%);
}

body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.2;
  background: repeating-linear-gradient(110deg, transparent 0 18px, rgba(255, 255, 255, 0.008) 19px 20px);
}

::selection {
  color: #04110d;
  background: #7de3c3;
}

a,
button,
.tab,
.copy-pill {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
.tab:focus-visible,
.copy-pill:focus-visible,
.input:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.topbar {
  padding: 13px 24px;
  background: linear-gradient(180deg, rgba(8, 12, 10, 0.92), rgba(8, 12, 10, 0.78));
  border-bottom-color: rgba(125, 227, 195, 0.16);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
}

.brand {
  gap: 11px;
  letter-spacing: 0.15px;
}

.brand .mark {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(145deg, #7de3c3 0%, #10a37f 48%, #4d8eff 100%);
  box-shadow: 0 0 0 4px rgba(16, 163, 127, 0.08), 0 0 26px rgba(16, 163, 127, 0.46);
}

.brand .mark::after {
  position: absolute;
  inset: -30% -90%;
  content: "";
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent 35%, rgba(255, 255, 255, 0.38), transparent 65%);
  animation: sigil-sheen 7s ease-in-out infinite;
}

@keyframes sigil-sheen {
  0%, 72%, 100% { transform: translateX(-34%) rotate(22deg); }
  86% { transform: translateX(34%) rotate(22deg); }
}

.topbar nav a {
  position: relative;
  color: #91a39b;
  transition: color 0.18s ease;
}

.topbar nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  transition: transform 0.18s ease;
}

.topbar nav a:hover,
.topbar nav a:focus-visible {
  color: var(--text);
}

.topbar nav a:hover::after,
.topbar nav a:focus-visible::after {
  transform: scaleX(1);
}

.copy-pill {
  border-color: rgba(125, 227, 195, 0.2);
  background: linear-gradient(180deg, rgba(24, 38, 33, 0.96), rgba(14, 23, 19, 0.96));
}

.copy-pill:hover {
  border-color: rgba(125, 227, 195, 0.6);
  box-shadow: 0 0 26px rgba(16, 163, 127, 0.22);
}

.copy-pill code,
.copy-pill .copy-btn {
  color: var(--accent-bright);
}

.copy-pill .copy-btn {
  background: rgba(16, 163, 127, 0.16);
}

.btn {
  min-height: 38px;
  border-color: rgba(125, 227, 195, 0.2);
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

.btn-primary {
  color: #04110d;
  background: linear-gradient(120deg, #78e0c0 0%, #19b48d 48%, #5c9cff 130%);
  box-shadow: 0 8px 28px rgba(16, 163, 127, 0.26), inset 0 1px rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.06) saturate(1.08);
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(16, 163, 127, 0.34), inset 0 1px rgba(255, 255, 255, 0.34);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.025);
}

.btn-ghost:hover {
  border-color: rgba(125, 227, 195, 0.55);
  transform: translateY(-2px);
}

.hero {
  position: relative;
  padding-top: 78px;
  padding-bottom: 54px;
  align-items: center;
}

.hero::before {
  position: absolute;
  z-index: -1;
  top: 28px;
  right: 4%;
  width: 390px;
  height: 390px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(125, 227, 195, 0.08);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, transparent 0 27%, rgba(125, 227, 195, 0.08) 27.5% 28%, transparent 28.5% 46%, rgba(83, 146, 255, 0.07) 46.5% 47%, transparent 47.5%),
    conic-gradient(from 40deg, transparent, rgba(125, 227, 195, 0.11), transparent 30%, rgba(83, 146, 255, 0.08), transparent 70%);
  filter: blur(0.2px);
  opacity: 0.85;
  animation: graph-orbit 28s linear infinite;
}

@keyframes graph-orbit {
  to { transform: rotate(360deg); }
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -1.7px;
  text-wrap: balance;
}

.hero h1 .grad {
  background-image: linear-gradient(105deg, #7de3c3 2%, #75baff 52%, #f4b860 100%);
}

.hero p.lede {
  color: #a9b8b1;
  line-height: 1.72;
}

.badge {
  color: #9cebd2;
  border-color: rgba(125, 227, 195, 0.2);
  background: linear-gradient(180deg, rgba(16, 163, 127, 0.12), rgba(16, 163, 127, 0.055));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.wallet-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(125, 227, 195, 0.24);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(79, 143, 255, 0.11), transparent 62%),
    linear-gradient(155deg, rgba(24, 37, 32, 0.98), rgba(14, 21, 18, 0.98));
  box-shadow: 0 24px 78px rgba(0, 0, 0, 0.44), 0 0 50px rgba(16, 163, 127, 0.07), inset 0 1px rgba(255, 255, 255, 0.055);
}

.wallet-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, transparent, #7de3c3 22%, #5e9cff 68%, transparent);
}

.wallet-card h3 {
  font-size: 16px;
}

.tabs {
  border: 1px solid rgba(125, 227, 195, 0.08);
  background: rgba(2, 8, 5, 0.48);
}

.tab {
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.tab.active {
  background: linear-gradient(180deg, rgba(34, 53, 45, 0.95), rgba(24, 38, 32, 0.95));
  box-shadow: 0 0 0 1px rgba(125, 227, 195, 0.18), 0 6px 18px rgba(0, 0, 0, 0.18);
}

.input {
  border-color: rgba(125, 227, 195, 0.18);
  background: rgba(2, 8, 5, 0.52);
}

.input:focus {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(16, 163, 127, 0.12);
}

.phrase-box {
  color: #ffd08b;
  border-color: rgba(244, 184, 96, 0.44);
  background: rgba(244, 184, 96, 0.07);
}

.stripe {
  border-color: rgba(125, 227, 195, 0.14);
  background:
    linear-gradient(90deg, rgba(16, 163, 127, 0.08), rgba(79, 143, 255, 0.045) 50%, rgba(244, 184, 96, 0.055)),
    rgba(10, 15, 12, 0.76);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.018);
}

.stat .num {
  color: #ecf8f3;
  text-shadow: 0 0 22px rgba(125, 227, 195, 0.15);
}

.stat:nth-child(2) .num,
.stat:nth-child(4) .num {
  color: #9bc5ff;
}

.stat:nth-child(3) .num,
.stat:nth-child(5) .num {
  color: #ffd08b;
}

.section {
  position: relative;
}

.section .kicker {
  color: var(--accent-bright);
}

.section h2 {
  color: #f4f8f6;
  letter-spacing: -0.4px;
  text-wrap: balance;
}

.card {
  position: relative;
  overflow: hidden;
  border-color: rgba(125, 227, 195, 0.15);
  background:
    linear-gradient(150deg, rgba(22, 33, 28, 0.9), rgba(10, 15, 12, 0.88)),
    var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.card::after {
  position: absolute;
  right: -34px;
  bottom: -44px;
  width: 110px;
  height: 110px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(125, 227, 195, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(125, 227, 195, 0.018), 0 0 0 36px rgba(79, 143, 255, 0.012);
}

.card:hover {
  z-index: 1;
  transform: translateY(-4px);
  border-color: rgba(125, 227, 195, 0.36);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3), 0 0 34px rgba(16, 163, 127, 0.055), inset 0 1px rgba(255, 255, 255, 0.04);
}

.card .ic {
  color: var(--accent-bright);
  filter: drop-shadow(0 0 10px rgba(125, 227, 195, 0.26));
}

.card .num {
  color: var(--gold);
}

.honesty {
  border-color: rgba(244, 184, 96, 0.31);
  background:
    linear-gradient(105deg, rgba(244, 184, 96, 0.075), rgba(244, 184, 96, 0.025) 55%, rgba(16, 163, 127, 0.045)),
    rgba(12, 17, 14, 0.72);
  box-shadow: inset 3px 0 #f4b860;
}

footer {
  border-top-color: rgba(125, 227, 195, 0.13);
  background: linear-gradient(180deg, transparent, rgba(16, 163, 127, 0.035));
}

footer a:hover,
footer a:focus-visible {
  color: var(--accent-bright);
}

@media (max-width: 920px) {
  .hero {
    max-width: 720px;
    padding-top: 58px;
  }

  .hero::before {
    top: 36%;
    right: -150px;
  }

  .wallet-card {
    width: 100%;
    max-width: 680px;
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-wrap: wrap;
    padding: 10px 14px 8px;
  }

  .topbar nav {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: clamp(16px, 8vw, 34px);
    padding-top: 8px;
    border-top: 1px solid rgba(125, 227, 195, 0.1);
  }

  .topbar nav a {
    font-size: 12px;
  }

  .copy-pill {
    padding: 5px;
  }

  .copy-pill code {
    display: none;
  }

  .copy-pill .copy-btn {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 560px) {
  .topbar-actions {
    gap: 7px;
  }

  .topbar-actions .btn {
    padding-inline: 11px;
    font-size: 12px;
  }

  .hero {
    padding: 46px 18px 36px;
  }

  .hero h1 {
    font-size: clamp(37px, 12vw, 50px);
    letter-spacing: -1.2px;
  }

  .hero p.lede {
    font-size: 15px;
  }

  .wallet-card {
    padding: 18px;
    border-radius: 16px;
  }

  .stripe .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 18px;
    padding-inline: 18px;
  }

  .stat .num {
    font-size: 19px;
  }

  .section {
    padding: 44px 18px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
