/* style.css
   Base: tokens, reset, animated environment, glass primitives, layout, stats, hero.
   Ported verbatim from the original design system — do not restyle. */

/* ==========================================================================
   PolDefi — liquid glass / aurora system
   ========================================================================== */

:root {
  /* aurora palette: deep purple -> electric blue -> cyan -> magenta -> deep red */
  --c-purple: #7c3aed;
  --c-purple-lt: #a78bfa;
  --c-blue: #2563eb;
  --c-blue-lt: #60a5fa;
  --c-cyan: #22d3ee;
  --c-magenta: #d946ef;
  --c-red: #f43f5e;

  --bg-0: #04030c;
  --bg-1: #090618;

  --ink: #f6f4ff;
  --ink-dim: #bfb9dd;
  --ink-faint: #837ca8;

  --stroke: rgba(255, 255, 255, 0.14);
  --stroke-soft: rgba(255, 255, 255, 0.08);

  --grad-aurora: linear-gradient(
    115deg,
    var(--c-purple) 0%,
    var(--c-blue) 26%,
    var(--c-cyan) 48%,
    var(--c-magenta) 74%,
    var(--c-red) 100%
  );
  --grad-aurora-soft: linear-gradient(
    115deg,
    rgba(124, 58, 237, 0.55),
    rgba(37, 99, 235, 0.42) 30%,
    rgba(34, 211, 238, 0.34) 52%,
    rgba(217, 70, 239, 0.4) 76%,
    rgba(244, 63, 94, 0.45)
  );

  /* layered glass depth */
  --shadow-glass:
    0 34px 68px -28px rgba(6, 2, 28, 0.92),
    0 14px 34px -18px rgba(0, 0, 0, 0.65),
    0 2px 6px -2px rgba(0, 0, 0, 0.4);
  --inset-glass:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    inset 0 24px 48px -40px rgba(255, 255, 255, 0.55),
    inset 0 0 80px rgba(124, 58, 237, 0.07);

  --radius-xl: 28px;
  --radius: 22px;
  --radius-sm: 14px;

  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'ss01', 'cv01';
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
  min-height: 100%;
}

/* Touch behaviour: no 300ms delay, no grey flash, no accidental text selection
   on controls, and no rubber-band overscroll chaining into wallet browsers. */
body {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button,
a,
input,
select {
  touch-action: manipulation;
}

button {
  -webkit-user-select: none;
  user-select: none;
}

/* Anything that can be long must be able to wrap rather than widen the page. */
img,
svg,
canvas {
  max-width: 100%;
}

/* ==========================================================================
   Animated environment
   ========================================================================== */

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(140% 120% at 50% 0%, #0a0722 0%, var(--bg-0) 70%);
}

.aurora {
  position: absolute;
  inset: -25vmax;
  filter: blur(70px) saturate(150%);
  opacity: 0.85;
  background:
    radial-gradient(32vmax 30vmax at 14% 12%, rgba(124, 58, 237, 0.62), transparent 62%),
    radial-gradient(30vmax 28vmax at 82% 8%, rgba(37, 99, 235, 0.55), transparent 62%),
    radial-gradient(26vmax 26vmax at 92% 58%, rgba(34, 211, 238, 0.34), transparent 62%),
    radial-gradient(30vmax 28vmax at 22% 88%, rgba(217, 70, 239, 0.42), transparent 62%),
    radial-gradient(28vmax 26vmax at 60% 96%, rgba(244, 63, 94, 0.4), transparent 62%);
  animation: aurora-drift 34s ease-in-out infinite alternate;
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1) rotate(0deg);
  }
  50% {
    transform: translate3d(2%, 1.5%, 0) scale(1.08) rotate(4deg);
  }
  100% {
    transform: translate3d(-1%, 2%, 0) scale(1.04) rotate(-3deg);
  }
}

.scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(4, 3, 12, 0.62) 100%),
    linear-gradient(180deg, rgba(4, 3, 12, 0.5) 0%, transparent 22%, transparent 78%, rgba(4, 3, 12, 0.65) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .aurora {
    animation: none;
  }
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
.display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.025em;
  margin: 0;
}

a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: color 0.2s var(--ease), text-shadow 0.2s var(--ease);
}
a:hover {
  color: #8ef0ff;
  text-shadow: 0 0 18px rgba(34, 211, 238, 0.6);
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 22px 140px;
}

/* ==========================================================================
   Glass primitives — transparent liquid crystal
   ========================================================================== */

.glass {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.028) 42%, rgba(255, 255, 255, 0.07) 100%),
    radial-gradient(130% 110% at 0% 0%, rgba(124, 58, 237, 0.19), transparent 58%),
    radial-gradient(120% 110% at 100% 100%, rgba(244, 63, 94, 0.13), transparent 58%),
    radial-gradient(120% 120% at 80% 0%, rgba(34, 211, 238, 0.1), transparent 55%);
  backdrop-filter: blur(30px) saturate(185%);
  -webkit-backdrop-filter: blur(30px) saturate(185%);
  box-shadow: var(--shadow-glass), var(--inset-glass);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s var(--ease);
}

/* gradient-tinted rim */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    140deg,
    rgba(167, 139, 250, 0.85) 0%,
    rgba(96, 165, 250, 0.42) 26%,
    rgba(34, 211, 238, 0.5) 50%,
    rgba(217, 70, 239, 0.45) 74%,
    rgba(244, 63, 94, 0.7) 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
  z-index: 2;
}

/* glossy top-left reflection */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.05) 14%,
    transparent 34%,
    transparent 76%,
    rgba(255, 255, 255, 0.045) 100%
  );
  mix-blend-mode: screen;
  opacity: 0.9;
}

.glass > * {
  position: relative;
  z-index: 3;
}

.card {
  padding: 26px;
}

.card-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.grid {
  display: grid;
  gap: 20px;
}
.g2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.g3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.g4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  perspective: 1400px;
}
.g-main {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: start;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}

.mt {
  margin-top: 16px;
}
.mt-lg {
  margin-top: 30px;
}
.mono {
  font-family: 'Space Grotesk', ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.dim {
  color: var(--ink-dim);
}
.faint {
  color: var(--ink-faint);
}
.small {
  font-size: 12.5px;
}

/* ==========================================================================
   3D statistic cards
   ========================================================================== */

.stat {
  padding: 22px;
  transform-style: preserve-3d;
  will-change: transform;
}
.stat:hover {
  transform: translateY(-8px) rotateX(5deg) rotateY(-3deg) scale(1.012);
  box-shadow:
    var(--shadow-glass),
    var(--inset-glass),
    0 0 0 1px rgba(167, 139, 250, 0.28),
    0 30px 70px -30px rgba(124, 58, 237, 0.85);
  border-color: rgba(255, 255, 255, 0.24);
}

.stat .label {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
  /* keep clear of the absolutely-positioned icon chip */
  padding-right: 50px;
}

.stat .value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(23px, 3.1vw, 31px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 12px;
  padding-right: 50px;
  background: linear-gradient(120deg, #ffffff 0%, #d9ccff 38%, #9fe6ff 68%, #ffc4d6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  word-break: break-word;
  text-shadow: 0 0 34px rgba(167, 139, 250, 0.28);
}

.stat .sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-dim);
  line-height: 1.5;
}

.stat .chip {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
  background: var(--grad-aurora-soft);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 22px -12px rgba(124, 58, 237, 0.9);
  z-index: 4;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 34px;
  overflow: hidden;
}
.hero-title {
  font-size: clamp(31px, 5vw, 50px);
  line-height: 1.04;
  background: linear-gradient(112deg, #ffffff 0%, #cbb6ff 32%, #7fe3ff 58%, #ff9ecb 82%, #ffb3b8 100%);
  background-size: 200% 200%;
  animation: grad-shift 14s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}

/* ==========================================================================
   Section headings
   ========================================================================== */

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-head h2::before {
  content: '';
  width: 4px;
  height: 22px;
  border-radius: 4px;
  background: var(--grad-aurora);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.9);
}

