/* =============================================================
   base.css — Cashard Global Design System
   Shared across ALL pages (sell, buy, about, contact, etc.)
   ============================================================= */

/* ===== CSS VARIABLES ===== */
:root {
  /* Backgrounds */
  --bg: #0d0f14;
  --bg2: #13161d;
  --bg3: #1a1e27;
  --bg4: #1f2330;
  --card: #20242e;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border2: rgba(255, 255, 255, 0.1);
  --border-soft: rgba(255, 255, 255, 0.05);

  /* Text */
  --txt: #f1f3f7;
  --txt2: #b8c0cc;
  --muted: #6b7385;
  --text-primary: #f8f9fa;
  --text-secondary: #c4c9d4;
  --text-muted: #868e96;

  /* Accent Colors */
  --accent: #FFB800;
  --accent2: #FF9500;
  --accent3: #FFD060;
  --accent-hover: #ffa500;
  --green: #00D09C;
  --green2: #00E5A8;
  --blue: #4A9EFF;
  --blue2: #6BB5FF;
  --red: #FF6B6B;
  --danger: #FF6B6B;
  --purple: #A78BFA;

  /* Neumorphism */
  --nm-light: rgba(255, 255, 255, 0.05);
  --nm-dark: rgba(0, 0, 0, 0.6);
  --nm-d: rgba(0, 0, 0, 0.7);
  --nm-l: rgba(255, 255, 255, 0.06);
  --nm-raised: 10px 10px 24px var(--nm-dark), -10px -10px 24px var(--nm-light);
  --nm-soft: 6px 6px 14px rgba(0, 0, 0, 0.7), -6px -6px 14px rgba(255, 255, 255, 0.04);
  --nm-deep: 14px 14px 36px var(--nm-d), -14px -14px 36px var(--nm-l);

  /* Animation */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, system-ui, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ===== BACKGROUND EFFECTS ===== */
.pattern-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: 0.6;
  z-index: -1;
}

.noise {
  position: fixed;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 12s ease-in-out infinite;
}

.orb1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.07) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.orb2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 208, 156, 0.06) 0%, transparent 70%);
  bottom: 10%;
  left: -150px;
  animation-delay: -4s;
}

.orb3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74, 158, 255, 0.05) 0%, transparent 70%);
  top: 40%;
  right: 10%;
  animation-delay: -8s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translateY(0) scale(1)
  }

  50% {
    transform: translateY(-40px) scale(1.05)
  }
}

/* ===== CIRCUIT-BOARD LOADER ===== */
#loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}

#loader.fade {
  opacity: 0;
  visibility: hidden;
}

.circuit-loader {
  width: 100%;
  max-width: 420px;
  padding: 0 20px;
}

.trace-bg {
  stroke: #333;
  stroke-width: 1.8;
  fill: none;
}

.trace-flow {
  stroke-width: 1.8;
  fill: none;
  stroke-dasharray: 40 400;
  stroke-dashoffset: 438;
  filter: drop-shadow(0 0 6px currentColor);
  animation: circuitFlow 3s cubic-bezier(0.5, 0, 0.9, 1) infinite;
}

.trace-flow.yellow {
  stroke: #ffea00;
  color: #ffea00;
}

.trace-flow.blue {
  stroke: #00ccff;
  color: #00ccff;
}

.trace-flow.green {
  stroke: #00ff15;
  color: #00ff15;
}

.trace-flow.purple {
  stroke: #9900ff;
  color: #9900ff;
}

.trace-flow.red {
  stroke: #ff3300;
  color: #ff3300;
}

@keyframes circuitFlow {
  to {
    stroke-dashoffset: 0;
  }
}

/* ===== SCROLL PROGRESS ===== */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green), var(--blue));
  z-index: 9990;
  transition: width 0.1s;
  width: 0%;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-left.in {
  opacity: 1;
  transform: none;
}

.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-right.in {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 {
  transition-delay: 0.1s
}

.reveal-delay-2 {
  transition-delay: 0.2s
}

.reveal-delay-3 {
  transition-delay: 0.3s
}

.reveal-delay-4 {
  transition-delay: 0.4s
}

/* ===== CURSOR SPOTLIGHT ===== */
.cursor-spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cursor-spotlight-inner {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 184, 0, 0.07) 0%, rgba(255, 150, 0, 0.03) 30%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  filter: blur(30px);
  transition: left 0.15s ease-out, top 0.15s ease-out;
}

/* ===== PARTICLES ===== */
.particles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0);
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(40px) scale(1);
  }
}

/* ===== NOISE GRAIN ===== */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

/* ===== UTILITY ===== */
.hidden {
  display: none !important;
}