/* ==========================================================================
   PilotPad — design system
   ========================================================================== */

:root {
  /* Brand palette */
  --void: #05050b;
  --ink: #0a0a14;
  --graphite: #12121e;
  --slate: #1b1b2b;
  --indigo: #6e5bff;
  --ultraviolet: #8b7bff;
  --lavender: #c9c2ff;
  --signal: #3be8c8;
  --ember: #ffb547;
  --rose: #ff6b8b;

  /* Text */
  --text: #f4f3ff;
  --text-2: rgba(232, 230, 255, 0.72);
  --text-3: rgba(220, 216, 255, 0.46);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);

  /* Type */
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Geometry */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1200px;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: rgba(110, 91, 255, 0.45); color: #fff; }

:focus-visible {
  outline: 2px solid var(--ultraviolet);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
}

p { margin: 0; }

.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Gradient text */
.grad {
  background: linear-gradient(100deg, #ffffff 0%, var(--lavender) 45%, var(--ultraviolet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-signal {
  background: linear-gradient(100deg, var(--lavender), var(--signal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   Liquid glass
   ========================================================================== */

.glass {
  --glass-r: var(--r-lg);
  position: relative;
  border-radius: var(--glass-r);
  background:
    radial-gradient(120% 140% at var(--mx, 20%) var(--my, 0%), rgba(255, 255, 255, 0.075), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 30px 80px -30px rgba(0, 0, 0, 0.75);
  isolation: isolate;
}

/* Gradient hairline border */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    140deg,
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0.06) 32%,
    rgba(255, 255, 255, 0.02) 60%,
    rgba(139, 123, 255, 0.32)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 1;
}

/* Specular sheen */
.glass::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 28%);
  pointer-events: none;
  z-index: 0;
}

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

.glass--tint {
  background:
    radial-gradient(120% 140% at var(--mx, 20%) var(--my, 0%), rgba(139, 123, 255, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(110, 91, 255, 0.12), rgba(110, 91, 255, 0.03));
}

.glass--sm { --glass-r: var(--r-md); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  --h: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 550;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), background 0.3s, color 0.3s;
  position: relative;
  isolation: isolate;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 16px; height: 16px; }

.btn--primary {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 52%),
    linear-gradient(135deg, #7a68ff, #5a45ff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(139, 123, 255, 0.5),
    0 10px 30px -8px rgba(110, 91, 255, 0.7),
    0 0 60px -10px rgba(110, 91, 255, 0.5);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(160, 148, 255, 0.7),
    0 16px 40px -8px rgba(110, 91, 255, 0.8),
    0 0 80px -6px rgba(110, 91, 255, 0.6);
}

.btn--glass {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 8px 24px -10px rgba(0, 0, 0, 0.6);
}
.btn--glass:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
  transform: translateY(-1px);
}

.btn--ghost { color: var(--text-2); padding: 0 14px; }
.btn--ghost:hover { color: var(--text); }
.btn--sm { --h: 36px; padding: 0 16px; font-size: 14px; }
.btn--lg { --h: 54px; padding: 0 28px; font-size: 16px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

/* ==========================================================================
   Small parts
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-2);
}
.pill .dot {
  display: inline-grid;
  place-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #0b0b14;
  background: var(--signal);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lavender);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ultraviolet));
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag--signal { color: var(--signal); background: rgba(59, 232, 200, 0.08); border-color: rgba(59, 232, 200, 0.2); }
.tag--violet { color: var(--lavender); background: rgba(110, 91, 255, 0.12); border-color: rgba(139, 123, 255, 0.28); }
.tag--ember { color: var(--ember); background: rgba(255, 181, 71, 0.08); border-color: rgba(255, 181, 71, 0.22); }

.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 0 rgba(59, 232, 200, 0.6);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 232, 200, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(59, 232, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 232, 200, 0); }
}

.icon { width: 20px; height: 20px; flex: none; }

/* Brand lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.04em;
}
.brand img, .brand svg { width: 30px; height: 30px; }
.brand b { font-weight: 600; color: #b8aeff; }

/* Ambient background */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 85% -10%, rgba(110, 91, 255, 0.16), transparent 70%),
    radial-gradient(50vw 50vh at -10% 30%, rgba(59, 70, 200, 0.10), transparent 70%),
    var(--void);
}
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Liquid-glass refraction filters live here (injected by JS) */
.lg-defs { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }

/* X (Twitter) links */
.xlink { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--text-2); flex: none;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line-2); transition: color .25s, background .25s; }
.xlink:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.xlink .icon { width: 15px; height: 15px; }
.xfollow { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; color: var(--text-2);
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line-2); transition: color .25s, background .25s; }
.xfollow:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.xfollow .icon { width: 14px; height: 14px; }
.xfollow--side { margin-top: 10px; width: 100%; justify-content: center; }

/* Contract address pill (next to the X link) */
.nav__social { display: flex; align-items: center; gap: 6px; margin-right: 4px; }
.ca { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px; font-size: 12.5px; color: var(--text-3);
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line-2); transition: color .25s, background .25s, box-shadow .25s; white-space: nowrap; }
.ca__k { height: 24px; padding: 0 8px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  color: var(--text-2); background: rgba(255, 255, 255, 0.07); }
.ca__copy { width: 13px; height: 13px; display: none; }
.ca:disabled { cursor: default; }
.ca--live { color: var(--text); cursor: pointer; }
.ca--live .ca__k { color: #0b0b14; background: var(--signal); }
.ca--live .ca__copy { display: block; color: var(--text-3); }
.ca--live:hover { background: rgba(255, 255, 255, 0.09); box-shadow: inset 0 0 0 1px rgba(59, 232, 200, .45); }
.ca--copied { box-shadow: inset 0 0 0 1px var(--signal); }
@media (max-width: 600px) {
  .nav__inner .brand { font-size: 17px; gap: 8px; }
  .nav__inner .brand img { width: 26px; height: 26px; }
  .nav__social { gap: 4px; margin-right: 0; }
  .ca { gap: 6px; padding: 0 10px 0 5px; font-size: 11px; }
  .ca__k { padding: 0 6px; font-size: 10px; }
  .ca__v { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
  .ca--live .ca__copy { display: none; }
  .nav__inner .xlink { width: 34px; height: 34px; }
}
@media (max-width: 360px) { .nav__inner .brand span { display: none; } }
