@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* ==========================================
     PALETA DE COLORES RESTRINGIDA & COHESIVA
     ========================================== */
  /* 1. Lienzo Arcilla Oscura (Obsidian Slate) */
  --bg-primary: #07090E;
  --bg-surface: #0E1420;
  --bg-surface-elevated: #141C2D;
  --bg-card: #121927;
  --bg-card-hover: #172134;
  --bg-recessed: #090D15;

  /* 2. Oro Gadex Táctil (Clay Gold — Acento Primario) */
  --gold-primary: #E5B25D;
  --gold-light: #FDEED2;
  --gold-dark: #A67B2E;
  --gold-border: rgba(229, 178, 93, 0.32);
  --gold-glow: rgba(229, 178, 93, 0.22);
  --gold-surface: rgba(229, 178, 93, 0.08);

  /* 3. Zafiro Tecnológico (Clay Sapphire — Acento Secundario) */
  --sapphire-primary: #3B82F6;
  --sapphire-light: #93C5FD;
  --sapphire-dark: #1D4ED8;
  --sapphire-border: rgba(59, 130, 246, 0.3);
  --sapphire-glow: rgba(59, 130, 246, 0.18);
  --sapphire-surface: rgba(59, 130, 246, 0.08);

  /* 4. Tipografía y Neutros (WCAG Alto Contraste) */
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --border-hairline: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(255, 255, 255, 0.18);

  /* ==========================================
     TOKENS CLAYMORPHISM: RADIOS & SOMBRAS 3D
     ========================================== */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --radius-pill: 9999px;

  /* Elevación e Iluminación Arcilla de Tarjetas */
  --clay-card-shadow: 
    0 14px 28px -6px rgba(0, 0, 0, 0.55),
    0 4px 10px -2px rgba(0, 0, 0, 0.35),
    inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.08),
    inset -2.5px -2.5px 5px rgba(0, 0, 0, 0.55);

  --clay-card-shadow-hover: 
    0 22px 38px -8px rgba(0, 0, 0, 0.65),
    0 8px 16px -4px rgba(0, 0, 0, 0.45),
    inset 2px 2px 3px rgba(255, 255, 255, 0.12),
    inset -2.5px -2.5px 6px rgba(0, 0, 0, 0.65);

  /* Cavidad Hundida (Inputs, Especificaciones, Ranuras) */
  --clay-recessed-shadow: 
    inset 2px 2px 5px rgba(0, 0, 0, 0.6),
    inset -1.5px -1.5px 3px rgba(255, 255, 255, 0.04);

  /* Botón Oro Arcilla (Táctil & Inflado) */
  --clay-btn-gold: linear-gradient(145deg, #F2C772 0%, #D59E45 55%, #BD872E 100%);
  --clay-btn-gold-shadow: 
    0 8px 20px -4px rgba(229, 178, 93, 0.38),
    0 3px 6px -2px rgba(0, 0, 0, 0.4),
    inset 1.5px 1.5px 2.5px rgba(255, 255, 255, 0.55),
    inset -2px -2px 4px rgba(120, 80, 15, 0.45);

  --clay-btn-gold-shadow-hover: 
    0 12px 26px -4px rgba(229, 178, 93, 0.5),
    0 4px 8px -2px rgba(0, 0, 0, 0.4),
    inset 2px 2px 3px rgba(255, 255, 255, 0.7),
    inset -2px -2px 5px rgba(120, 80, 15, 0.5);

  --clay-btn-gold-active: 
    0 3px 8px -2px rgba(229, 178, 93, 0.25),
    inset 2px 2px 4px rgba(110, 70, 10, 0.5),
    inset -1px -1px 2px rgba(255, 255, 255, 0.25);

  /* Botón Secundario Arcilla Pizarra */
  --clay-btn-sec: linear-gradient(145deg, #1A2436 0%, #111826 100%);
  --clay-btn-sec-shadow: 
    0 6px 16px -3px rgba(0, 0, 0, 0.5),
    inset 1.5px 1.5px 2px rgba(255, 255, 255, 0.09),
    inset -2px -2px 4px rgba(0, 0, 0, 0.65);

  --clay-btn-sec-shadow-hover: 
    0 10px 22px -4px rgba(0, 0, 0, 0.6),
    inset 2px 2px 3px rgba(255, 255, 255, 0.14),
    inset -2px -2px 5px rgba(0, 0, 0, 0.7);

  --clay-btn-sec-active: 
    0 2px 6px -1px rgba(0, 0, 0, 0.6),
    inset 2px 2px 4px rgba(0, 0, 0, 0.75),
    inset -1px -1px 2px rgba(255, 255, 255, 0.05);

  /* Animación física de muelle (Spring feel) */
  --spring-transition: all 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);

  /* ==========================================
     CURVAS & CONSTANTES DE MOVIMIENTO SUAVIZADO
     ========================================== */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
  --spring-smooth: cubic-bezier(0.34, 1.4, 0.64, 1);
  --spring-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-smooth: all 0.3s var(--ease-out-expo);
  --transition-tactile: transform 0.22s var(--spring-smooth), box-shadow 0.25s var(--ease-out-expo), border-color 0.2s ease, background 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  overflow-x: hidden;
  line-height: 1.6;
  letter-spacing: -0.01em;
  touch-action: manipulation;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: 
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(229, 178, 93, 0.06) 0%, transparent 70%),
    radial-gradient(circle at 85% 45%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 15% 80%, rgba(229, 178, 93, 0.03) 0%, transparent 50%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
  color: var(--text-primary);
  font-weight: 700;
}

/* ==========================================
   SCROLLBAR TÁCTIL
   ========================================== */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #182234;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* ==========================================
   TIPOGRAFÍAS Y ETIQUETAS
   ========================================== */
.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.gold-gradient-text {
  background: linear-gradient(135deg, #FFF6E0 0%, #E5B25D 50%, #C49439 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.sapphire-gradient-text {
  background: linear-gradient(135deg, #DBEAFE 0%, #3B82F6 60%, #1D4ED8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

/* ==========================================
   BOTONES CLAYMORPHISM MINIMALISTAS
   ========================================== */
.btn-primary {
  background: var(--clay-btn-gold);
  color: #080B11;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--clay-btn-gold-shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--spring-transition);
  user-select: none;
}

.btn-primary:hover {
  box-shadow: var(--clay-btn-gold-shadow-hover);
  transform: translateY(-2px);
  color: #040609;
}

.btn-primary:active {
  box-shadow: var(--clay-btn-gold-active);
  transform: translateY(1px) scale(0.98);
}

.btn-secondary {
  background: var(--clay-btn-sec);
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-light);
  box-shadow: var(--clay-btn-sec-shadow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--spring-transition);
  user-select: none;
}

.btn-secondary:hover {
  box-shadow: var(--clay-btn-sec-shadow-hover);
  border-color: var(--border-highlight);
  color: #FFF;
  transform: translateY(-2px);
}

.btn-secondary:active {
  box-shadow: var(--clay-btn-sec-active);
  transform: translateY(1px) scale(0.98);
}

.btn-icon {
  background: var(--clay-btn-sec);
  border: 1px solid var(--border-light);
  box-shadow: var(--clay-btn-sec-shadow);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--spring-transition);
  user-select: none;
  position: relative;
}

.btn-icon:hover {
  border-color: var(--gold-border);
  color: var(--gold-light);
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.6), inset 1.5px 1.5px 2px rgba(229, 178, 93, 0.25), inset -2px -2px 4px rgba(0, 0, 0, 0.7);
  transform: translateY(-2px);
}

.btn-icon:active {
  box-shadow: var(--clay-btn-sec-active);
  transform: translateY(1px) scale(0.96);
}

/* ==========================================
   BADGES & PÍLDORAS TÁCTILES
   ========================================== */
.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  box-shadow: inset 1px 1px 1.5px rgba(255, 255, 255, 0.06), 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tag-badge-gold {
  border-color: var(--gold-border);
  background: rgba(229, 178, 93, 0.1);
  color: var(--gold-light);
  box-shadow: inset 1px 1px 2px rgba(229, 178, 93, 0.2), 0 2px 6px rgba(229, 178, 93, 0.15);
}

.tag-badge-sapphire {
  border-color: var(--sapphire-border);
  background: rgba(59, 130, 246, 0.1);
  color: #BFDBFE;
  box-shadow: inset 1px 1px 2px rgba(59, 130, 246, 0.2), 0 2px 6px rgba(59, 130, 246, 0.15);
}

/* ==========================================
   SISTEMA DE ANIMACIONES SUAVIZADAS
   ========================================== */
@keyframes claySmoothRise {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes bottomSheetIn {
  from {
    opacity: 0;
    transform: translate3d(0, 100%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes clayBreathingGlow {
  0%, 100% {
    box-shadow: var(--clay-btn-gold-shadow);
  }
  50% {
    box-shadow: 0 12px 28px -2px rgba(229, 178, 93, 0.52), 
                0 4px 10px -1px rgba(0, 0, 0, 0.35),
                inset 2px 2px 3px rgba(255, 255, 255, 0.7), 
                inset -2px -2px 4px rgba(120, 80, 15, 0.45);
  }
}

@keyframes claySoftShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Clases de animación aplicada */
.clay-animate-rise {
  animation: claySmoothRise 0.45s var(--ease-out-expo) forwards;
  will-change: transform, opacity;
}

.clay-glow-pulse {
  animation: clayBreathingGlow 3.5s infinite ease-in-out;
}

/* ==========================================
   FEEDBACK TÁCTIL EN PANTALLAS TÁCTILES
   ========================================== */
@media (hover: none) {
  .btn-primary:active {
    transform: scale(0.96) translate3d(0, 1px, 0) !important;
    box-shadow: var(--clay-btn-gold-active) !important;
  }
  
  .btn-secondary:active, .btn-icon:active {
    transform: scale(0.96) translate3d(0, 1px, 0) !important;
    box-shadow: var(--clay-btn-sec-active) !important;
  }

  .gx-cat-tab:active {
    transform: scale(0.96) !important;
  }

  .gx-app-card:active {
    transform: scale(0.99) translate3d(0, 1px, 0);
  }
}

/* ==========================================
   ACCESIBILIDAD: PREFERENCIA DE MOVIMIENTO REDUCIDO
   ========================================== */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


